diff --git a/.clang-format b/.clang-format index 08711a1a1b..6e062f951d 100644 --- a/.clang-format +++ b/.clang-format @@ -50,6 +50,7 @@ ObjCSpaceBeforeProtocolList: true PackConstructorInitializers: Never PointerAlignment: Left ReflowComments: true +SortIncludes: Never SpaceAfterCStyleCast: false SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bf5b10a608..eaa020b5b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,9 +10,12 @@ files: | src/Mod/Assembly| src/Mod/Cloud| src/Mod/Drawing| + src/Mod/Fem/App| + src/Mod/Fem/Gui| src/Mod/Import| src/Mod/Inspection| src/Mod/JtReader| + src/Mod/Mesh| src/Mod/MeshPart| src/Mod/Plot| src/Mod/Points| @@ -33,6 +36,8 @@ exclude: | .*vcxproj.*| src/Mod/Import/App/SCL| src/Mod/Import/App/SCL_output| + src/Mod/Mesh/App/TestData| + src/Mod/Mesh/App/WildMagic4| src/Mod/Robot/App/kdl_cp| src/Mod/Robot/Lib ) diff --git a/src/3rdParty/OpenGL/api/GL/glext.h b/src/3rdParty/OpenGL/api/GL/glext.h index d54a2e7728..5c999aa82a 100644 --- a/src/3rdParty/OpenGL/api/GL/glext.h +++ b/src/3rdParty/OpenGL/api/GL/glext.h @@ -51,7 +51,7 @@ extern "C" { #define GLAPI extern #endif -#define GL_GLEXT_VERSION 20170209 +#define GL_GLEXT_VERSION 20180221 /* Generated C header for: * API: gl @@ -353,15 +353,17 @@ GLAPI void APIENTRY glMultTransposeMatrixd (const GLdouble *m); #define GL_TEXTURE_FILTER_CONTROL 0x8500 #define GL_DEPTH_TEXTURE_MODE 0x884B #define GL_COMPARE_R_TO_TEXTURE 0x884E -#define GL_FUNC_ADD 0x8006 -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B -#define GL_MIN 0x8007 -#define GL_MAX 0x8008 +#define GL_BLEND_COLOR 0x8005 +#define GL_BLEND_EQUATION 0x8009 #define GL_CONSTANT_COLOR 0x8001 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 #define GL_CONSTANT_ALPHA 0x8003 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_FUNC_ADD 0x8006 +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_FUNC_SUBTRACT 0x800A +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount); typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei drawcount); @@ -2865,6 +2867,42 @@ GLAPI void APIENTRY glTextureBarrier (void); #endif #endif /* GL_VERSION_4_5 */ +#ifndef GL_VERSION_4_6 +#define GL_VERSION_4_6 1 +#define GL_SHADER_BINARY_FORMAT_SPIR_V 0x9551 +#define GL_SPIR_V_BINARY 0x9552 +#define GL_PARAMETER_BUFFER 0x80EE +#define GL_PARAMETER_BUFFER_BINDING 0x80EF +#define GL_CONTEXT_FLAG_NO_ERROR_BIT 0x00000008 +#define GL_VERTICES_SUBMITTED 0x82EE +#define GL_PRIMITIVES_SUBMITTED 0x82EF +#define GL_VERTEX_SHADER_INVOCATIONS 0x82F0 +#define GL_TESS_CONTROL_SHADER_PATCHES 0x82F1 +#define GL_TESS_EVALUATION_SHADER_INVOCATIONS 0x82F2 +#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED 0x82F3 +#define GL_FRAGMENT_SHADER_INVOCATIONS 0x82F4 +#define GL_COMPUTE_SHADER_INVOCATIONS 0x82F5 +#define GL_CLIPPING_INPUT_PRIMITIVES 0x82F6 +#define GL_CLIPPING_OUTPUT_PRIMITIVES 0x82F7 +#define GL_POLYGON_OFFSET_CLAMP 0x8E1B +#define GL_SPIR_V_EXTENSIONS 0x9553 +#define GL_NUM_SPIR_V_EXTENSIONS 0x9554 +#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF +#define GL_TRANSFORM_FEEDBACK_OVERFLOW 0x82EC +#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW 0x82ED +typedef void (APIENTRYP PFNGLSPECIALIZESHADERPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLPOLYGONOFFSETCLAMPPROC) (GLfloat factor, GLfloat units, GLfloat clamp); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShader (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +GLAPI void APIENTRY glMultiDrawArraysIndirectCount (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectCount (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glPolygonOffsetClamp (GLfloat factor, GLfloat units, GLfloat clamp); +#endif +#endif /* GL_VERSION_4_6 */ + #ifndef GL_ARB_ES2_compatibility #define GL_ARB_ES2_compatibility 1 #endif /* GL_ARB_ES2_compatibility */ @@ -3353,6 +3391,16 @@ GLAPI void APIENTRY glFramebufferTextureFaceARB (GLenum target, GLenum attachmen #define GL_ARB_get_texture_sub_image 1 #endif /* GL_ARB_get_texture_sub_image */ +#ifndef GL_ARB_gl_spirv +#define GL_ARB_gl_spirv 1 +#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551 +#define GL_SPIR_V_BINARY_ARB 0x9552 +typedef void (APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glSpecializeShaderARB (GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue); +#endif +#endif /* GL_ARB_gl_spirv */ + #ifndef GL_ARB_gpu_shader5 #define GL_ARB_gpu_shader5 1 #endif /* GL_ARB_gpu_shader5 */ @@ -3458,8 +3506,6 @@ typedef unsigned short GLhalfARB; #ifndef GL_ARB_imaging #define GL_ARB_imaging 1 -#define GL_BLEND_COLOR 0x8005 -#define GL_BLEND_EQUATION 0x8009 #define GL_CONVOLUTION_1D 0x8010 #define GL_CONVOLUTION_2D 0x8011 #define GL_SEPARABLE_2D 0x8012 @@ -3596,11 +3642,11 @@ GLAPI void APIENTRY glResetMinmax (GLenum target); #define GL_ARB_indirect_parameters 1 #define GL_PARAMETER_BUFFER_ARB 0x80EE #define GL_PARAMETER_BUFFER_BINDING_ARB 0x80EF -typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTCOUNTARBPROC) (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTCOUNTARBPROC) (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); #ifdef GL_GLEXT_PROTOTYPES -GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); -GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawArraysIndirectCountARB (GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); #endif #endif /* GL_ARB_indirect_parameters */ @@ -3877,6 +3923,10 @@ GLAPI void APIENTRY glPointParameterfvARB (GLenum pname, const GLfloat *params); #define GL_COORD_REPLACE_ARB 0x8862 #endif /* GL_ARB_point_sprite */ +#ifndef GL_ARB_polygon_offset_clamp +#define GL_ARB_polygon_offset_clamp 1 +#endif /* GL_ARB_polygon_offset_clamp */ + #ifndef GL_ARB_post_depth_coverage #define GL_ARB_post_depth_coverage 1 #endif /* GL_ARB_post_depth_coverage */ @@ -4275,6 +4325,10 @@ GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xo #define GL_ARB_sparse_texture_clamp 1 #endif /* GL_ARB_sparse_texture_clamp */ +#ifndef GL_ARB_spirv_extensions +#define GL_ARB_spirv_extensions 1 +#endif /* GL_ARB_spirv_extensions */ + #ifndef GL_ARB_stencil_texturing #define GL_ARB_stencil_texturing 1 #endif /* GL_ARB_stencil_texturing */ @@ -4427,6 +4481,10 @@ GLAPI void APIENTRY glGetCompressedTexImageARB (GLenum target, GLint level, void #define GL_DOT3_RGBA_ARB 0x86AF #endif /* GL_ARB_texture_env_dot3 */ +#ifndef GL_ARB_texture_filter_anisotropic +#define GL_ARB_texture_filter_anisotropic 1 +#endif /* GL_ARB_texture_filter_anisotropic */ + #ifndef GL_ARB_texture_filter_minmax #define GL_ARB_texture_filter_minmax 1 #define GL_TEXTURE_REDUCTION_MODE_ARB 0x9366 @@ -4932,6 +4990,16 @@ GLAPI void APIENTRY glBlendBarrierKHR (void); #define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008 #endif /* GL_KHR_no_error */ +#ifndef GL_KHR_parallel_shader_compile +#define GL_KHR_parallel_shader_compile 1 +#define GL_MAX_SHADER_COMPILER_THREADS_KHR 0x91B0 +#define GL_COMPLETION_STATUS_KHR 0x91B1 +typedef void (APIENTRYP PFNGLMAXSHADERCOMPILERTHREADSKHRPROC) (GLuint count); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glMaxShaderCompilerThreadsKHR (GLuint count); +#endif +#endif /* GL_KHR_parallel_shader_compile */ + #ifndef GL_KHR_robust_buffer_access_behavior #define GL_KHR_robust_buffer_access_behavior 1 #endif /* GL_KHR_robust_buffer_access_behavior */ @@ -5411,6 +5479,10 @@ GLAPI void APIENTRY glGetNamedFramebufferParameterfvAMD (GLuint framebuffer, GLe #define GL_FLOAT16_MAT4x3_AMD 0x91CD #endif /* GL_AMD_gpu_shader_half_float */ +#ifndef GL_AMD_gpu_shader_int16 +#define GL_AMD_gpu_shader_int16 1 +#endif /* GL_AMD_gpu_shader_int16 */ + #ifndef GL_AMD_gpu_shader_int64 #define GL_AMD_gpu_shader_int64 1 typedef int64_t GLint64EXT; @@ -5632,6 +5704,14 @@ GLAPI void APIENTRY glSetMultisamplefvAMD (GLenum pname, GLuint index, const GLf #define GL_AMD_shader_explicit_vertex_parameter 1 #endif /* GL_AMD_shader_explicit_vertex_parameter */ +#ifndef GL_AMD_shader_gpu_shader_half_float_fetch +#define GL_AMD_shader_gpu_shader_half_float_fetch 1 +#endif /* GL_AMD_shader_gpu_shader_half_float_fetch */ + +#ifndef GL_AMD_shader_image_load_store_lod +#define GL_AMD_shader_image_load_store_lod 1 +#endif /* GL_AMD_shader_image_load_store_lod */ + #ifndef GL_AMD_shader_stencil_export #define GL_AMD_shader_stencil_export 1 #endif /* GL_AMD_shader_stencil_export */ @@ -5671,6 +5751,10 @@ GLAPI void APIENTRY glStencilOpValueAMD (GLenum face, GLuint value); #endif #endif /* GL_AMD_stencil_operation_extended */ +#ifndef GL_AMD_texture_gather_bias_lod +#define GL_AMD_texture_gather_bias_lod 1 +#endif /* GL_AMD_texture_gather_bias_lod */ + #ifndef GL_AMD_texture_texture4 #define GL_AMD_texture_texture4 1 #endif /* GL_AMD_texture_texture4 */ @@ -7222,6 +7306,17 @@ GLAPI void APIENTRY glDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint en #endif #endif /* GL_EXT_draw_range_elements */ +#ifndef GL_EXT_external_buffer +#define GL_EXT_external_buffer 1 +typedef void *GLeglClientBufferEXT; +typedef void (APIENTRYP PFNGLBUFFERSTORAGEEXTERNALEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEEXTERNALEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glBufferStorageExternalEXT (GLenum target, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +GLAPI void APIENTRY glNamedBufferStorageExternalEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLeglClientBufferEXT clientBuffer, GLbitfield flags); +#endif +#endif /* GL_EXT_external_buffer */ + #ifndef GL_EXT_fog_coord #define GL_EXT_fog_coord 1 #define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 @@ -7565,6 +7660,89 @@ GLAPI void APIENTRY glTextureMaterialEXT (GLenum face, GLenum mode); #endif #endif /* GL_EXT_light_texture */ +#ifndef GL_EXT_memory_object +#define GL_EXT_memory_object 1 +#define GL_TEXTURE_TILING_EXT 0x9580 +#define GL_DEDICATED_MEMORY_OBJECT_EXT 0x9581 +#define GL_PROTECTED_MEMORY_OBJECT_EXT 0x959B +#define GL_NUM_TILING_TYPES_EXT 0x9582 +#define GL_TILING_TYPES_EXT 0x9583 +#define GL_OPTIMAL_TILING_EXT 0x9584 +#define GL_LINEAR_TILING_EXT 0x9585 +#define GL_NUM_DEVICE_UUIDS_EXT 0x9596 +#define GL_DEVICE_UUID_EXT 0x9597 +#define GL_DRIVER_UUID_EXT 0x9598 +#define GL_UUID_SIZE_EXT 16 +typedef void (APIENTRYP PFNGLGETUNSIGNEDBYTEVEXTPROC) (GLenum pname, GLubyte *data); +typedef void (APIENTRYP PFNGLGETUNSIGNEDBYTEI_VEXTPROC) (GLenum target, GLuint index, GLubyte *data); +typedef void (APIENTRYP PFNGLDELETEMEMORYOBJECTSEXTPROC) (GLsizei n, const GLuint *memoryObjects); +typedef GLboolean (APIENTRYP PFNGLISMEMORYOBJECTEXTPROC) (GLuint memoryObject); +typedef void (APIENTRYP PFNGLCREATEMEMORYOBJECTSEXTPROC) (GLsizei n, GLuint *memoryObjects); +typedef void (APIENTRYP PFNGLMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, const GLint *params); +typedef void (APIENTRYP PFNGLGETMEMORYOBJECTPARAMETERIVEXTPROC) (GLuint memoryObject, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM2DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM3DMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLBUFFERSTORAGEMEMEXTPROC) (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM2DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM2DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM3DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM3DMULTISAMPLEEXTPROC) (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEMEMEXTPROC) (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXSTORAGEMEM1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +typedef void (APIENTRYP PFNGLTEXTURESTORAGEMEM1DEXTPROC) (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGetUnsignedBytevEXT (GLenum pname, GLubyte *data); +GLAPI void APIENTRY glGetUnsignedBytei_vEXT (GLenum target, GLuint index, GLubyte *data); +GLAPI void APIENTRY glDeleteMemoryObjectsEXT (GLsizei n, const GLuint *memoryObjects); +GLAPI GLboolean APIENTRY glIsMemoryObjectEXT (GLuint memoryObject); +GLAPI void APIENTRY glCreateMemoryObjectsEXT (GLsizei n, GLuint *memoryObjects); +GLAPI void APIENTRY glMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, const GLint *params); +GLAPI void APIENTRY glGetMemoryObjectParameterivEXT (GLuint memoryObject, GLenum pname, GLint *params); +GLAPI void APIENTRY glTexStorageMem2DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem2DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem3DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem3DMultisampleEXT (GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glBufferStorageMemEXT (GLenum target, GLsizeiptr size, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem2DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem2DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem3DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem3DMultisampleEXT (GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glNamedBufferStorageMemEXT (GLuint buffer, GLsizeiptr size, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTexStorageMem1DEXT (GLenum target, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +GLAPI void APIENTRY glTextureStorageMem1DEXT (GLuint texture, GLsizei levels, GLenum internalFormat, GLsizei width, GLuint memory, GLuint64 offset); +#endif +#endif /* GL_EXT_memory_object */ + +#ifndef GL_EXT_memory_object_fd +#define GL_EXT_memory_object_fd 1 +#define GL_HANDLE_TYPE_OPAQUE_FD_EXT 0x9586 +typedef void (APIENTRYP PFNGLIMPORTMEMORYFDEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportMemoryFdEXT (GLuint memory, GLuint64 size, GLenum handleType, GLint fd); +#endif +#endif /* GL_EXT_memory_object_fd */ + +#ifndef GL_EXT_memory_object_win32 +#define GL_EXT_memory_object_win32 1 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_EXT 0x9587 +#define GL_HANDLE_TYPE_OPAQUE_WIN32_KMT_EXT 0x9588 +#define GL_DEVICE_LUID_EXT 0x9599 +#define GL_DEVICE_NODE_MASK_EXT 0x959A +#define GL_LUID_SIZE_EXT 8 +#define GL_HANDLE_TYPE_D3D12_TILEPOOL_EXT 0x9589 +#define GL_HANDLE_TYPE_D3D12_RESOURCE_EXT 0x958A +#define GL_HANDLE_TYPE_D3D11_IMAGE_EXT 0x958B +#define GL_HANDLE_TYPE_D3D11_IMAGE_KMT_EXT 0x958C +typedef void (APIENTRYP PFNGLIMPORTMEMORYWIN32HANDLEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, void *handle); +typedef void (APIENTRYP PFNGLIMPORTMEMORYWIN32NAMEEXTPROC) (GLuint memory, GLuint64 size, GLenum handleType, const void *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportMemoryWin32HandleEXT (GLuint memory, GLuint64 size, GLenum handleType, void *handle); +GLAPI void APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GLenum handleType, const void *name); +#endif +#endif /* GL_EXT_memory_object_win32 */ + #ifndef GL_EXT_misc_attribute #define GL_EXT_misc_attribute 1 #endif /* GL_EXT_misc_attribute */ @@ -7806,6 +7984,55 @@ GLAPI void APIENTRY glSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei #endif #endif /* GL_EXT_secondary_color */ +#ifndef GL_EXT_semaphore +#define GL_EXT_semaphore 1 +#define GL_LAYOUT_GENERAL_EXT 0x958D +#define GL_LAYOUT_COLOR_ATTACHMENT_EXT 0x958E +#define GL_LAYOUT_DEPTH_STENCIL_ATTACHMENT_EXT 0x958F +#define GL_LAYOUT_DEPTH_STENCIL_READ_ONLY_EXT 0x9590 +#define GL_LAYOUT_SHADER_READ_ONLY_EXT 0x9591 +#define GL_LAYOUT_TRANSFER_SRC_EXT 0x9592 +#define GL_LAYOUT_TRANSFER_DST_EXT 0x9593 +#define GL_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_EXT 0x9530 +#define GL_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_EXT 0x9531 +typedef void (APIENTRYP PFNGLGENSEMAPHORESEXTPROC) (GLsizei n, GLuint *semaphores); +typedef void (APIENTRYP PFNGLDELETESEMAPHORESEXTPROC) (GLsizei n, const GLuint *semaphores); +typedef GLboolean (APIENTRYP PFNGLISSEMAPHOREEXTPROC) (GLuint semaphore); +typedef void (APIENTRYP PFNGLSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, const GLuint64 *params); +typedef void (APIENTRYP PFNGLGETSEMAPHOREPARAMETERUI64VEXTPROC) (GLuint semaphore, GLenum pname, GLuint64 *params); +typedef void (APIENTRYP PFNGLWAITSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); +typedef void (APIENTRYP PFNGLSIGNALSEMAPHOREEXTPROC) (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenSemaphoresEXT (GLsizei n, GLuint *semaphores); +GLAPI void APIENTRY glDeleteSemaphoresEXT (GLsizei n, const GLuint *semaphores); +GLAPI GLboolean APIENTRY glIsSemaphoreEXT (GLuint semaphore); +GLAPI void APIENTRY glSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, const GLuint64 *params); +GLAPI void APIENTRY glGetSemaphoreParameterui64vEXT (GLuint semaphore, GLenum pname, GLuint64 *params); +GLAPI void APIENTRY glWaitSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *srcLayouts); +GLAPI void APIENTRY glSignalSemaphoreEXT (GLuint semaphore, GLuint numBufferBarriers, const GLuint *buffers, GLuint numTextureBarriers, const GLuint *textures, const GLenum *dstLayouts); +#endif +#endif /* GL_EXT_semaphore */ + +#ifndef GL_EXT_semaphore_fd +#define GL_EXT_semaphore_fd 1 +typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREFDEXTPROC) (GLuint semaphore, GLenum handleType, GLint fd); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportSemaphoreFdEXT (GLuint semaphore, GLenum handleType, GLint fd); +#endif +#endif /* GL_EXT_semaphore_fd */ + +#ifndef GL_EXT_semaphore_win32 +#define GL_EXT_semaphore_win32 1 +#define GL_HANDLE_TYPE_D3D12_FENCE_EXT 0x9594 +#define GL_D3D12_FENCE_VALUE_EXT 0x9595 +typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREWIN32HANDLEEXTPROC) (GLuint semaphore, GLenum handleType, void *handle); +typedef void (APIENTRYP PFNGLIMPORTSEMAPHOREWIN32NAMEEXTPROC) (GLuint semaphore, GLenum handleType, const void *name); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glImportSemaphoreWin32HandleEXT (GLuint semaphore, GLenum handleType, void *handle); +GLAPI void APIENTRY glImportSemaphoreWin32NameEXT (GLuint semaphore, GLenum handleType, const void *name); +#endif +#endif /* GL_EXT_semaphore_win32 */ + #ifndef GL_EXT_separate_shader_objects #define GL_EXT_separate_shader_objects 1 #define GL_ACTIVE_PROGRAM_EXT 0x8B8D @@ -7826,6 +8053,19 @@ GLAPI GLuint APIENTRY glCreateShaderProgramEXT (GLenum type, const GLchar *strin #define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA #endif /* GL_EXT_separate_specular_color */ +#ifndef GL_EXT_shader_framebuffer_fetch +#define GL_EXT_shader_framebuffer_fetch 1 +#define GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT 0x8A52 +#endif /* GL_EXT_shader_framebuffer_fetch */ + +#ifndef GL_EXT_shader_framebuffer_fetch_non_coherent +#define GL_EXT_shader_framebuffer_fetch_non_coherent 1 +typedef void (APIENTRYP PFNGLFRAMEBUFFERFETCHBARRIEREXTPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glFramebufferFetchBarrierEXT (void); +#endif +#endif /* GL_EXT_shader_framebuffer_fetch_non_coherent */ + #ifndef GL_EXT_shader_image_load_formatted #define GL_EXT_shader_image_load_formatted 1 #endif /* GL_EXT_shader_image_load_formatted */ @@ -8126,6 +8366,8 @@ GLAPI void APIENTRY glTexBufferEXT (GLenum target, GLenum internalformat, GLuint #ifndef GL_EXT_texture_filter_minmax #define GL_EXT_texture_filter_minmax 1 +#define GL_TEXTURE_REDUCTION_MODE_EXT 0x9366 +#define GL_WEIGHTED_AVERAGE_EXT 0x9367 #endif /* GL_EXT_texture_filter_minmax */ #ifndef GL_EXT_texture_integer @@ -8672,6 +8914,16 @@ GLAPI void APIENTRY glVertexWeightPointerEXT (GLint size, GLenum type, GLsizei s #endif #endif /* GL_EXT_vertex_weighting */ +#ifndef GL_EXT_win32_keyed_mutex +#define GL_EXT_win32_keyed_mutex 1 +typedef GLboolean (APIENTRYP PFNGLACQUIREKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key, GLuint timeout); +typedef GLboolean (APIENTRYP PFNGLRELEASEKEYEDMUTEXWIN32EXTPROC) (GLuint memory, GLuint64 key); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLboolean APIENTRY glAcquireKeyedMutexWin32EXT (GLuint memory, GLuint64 key, GLuint timeout); +GLAPI GLboolean APIENTRY glReleaseKeyedMutexWin32EXT (GLuint memory, GLuint64 key); +#endif +#endif /* GL_EXT_win32_keyed_mutex */ + #ifndef GL_EXT_window_rectangles #define GL_EXT_window_rectangles 1 #define GL_INCLUSIVE_EXT 0x8F10 @@ -8944,7 +9196,7 @@ typedef void (APIENTRYP PFNGLENDPERFQUERYINTELPROC) (GLuint queryHandle); typedef void (APIENTRYP PFNGLGETFIRSTPERFQUERYIDINTELPROC) (GLuint *queryId); typedef void (APIENTRYP PFNGLGETNEXTPERFQUERYIDINTELPROC) (GLuint queryId, GLuint *nextQueryId); typedef void (APIENTRYP PFNGLGETPERFCOUNTERINFOINTELPROC) (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +typedef void (APIENTRYP PFNGLGETPERFQUERYDATAINTELPROC) (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); typedef void (APIENTRYP PFNGLGETPERFQUERYIDBYNAMEINTELPROC) (GLchar *queryName, GLuint *queryId); typedef void (APIENTRYP PFNGLGETPERFQUERYINFOINTELPROC) (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); #ifdef GL_GLEXT_PROTOTYPES @@ -8955,7 +9207,7 @@ GLAPI void APIENTRY glEndPerfQueryINTEL (GLuint queryHandle); GLAPI void APIENTRY glGetFirstPerfQueryIdINTEL (GLuint *queryId); GLAPI void APIENTRY glGetNextPerfQueryIdINTEL (GLuint queryId, GLuint *nextQueryId); GLAPI void APIENTRY glGetPerfCounterInfoINTEL (GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar *counterName, GLuint counterDescLength, GLchar *counterDesc, GLuint *counterOffset, GLuint *counterDataSize, GLuint *counterTypeEnum, GLuint *counterDataTypeEnum, GLuint64 *rawCounterMaxValue); -GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid *data, GLuint *bytesWritten); +GLAPI void APIENTRY glGetPerfQueryDataINTEL (GLuint queryHandle, GLuint flags, GLsizei dataSize, void *data, GLuint *bytesWritten); GLAPI void APIENTRY glGetPerfQueryIdByNameINTEL (GLchar *queryName, GLuint *queryId); GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLength, GLchar *queryName, GLuint *dataSize, GLuint *noCounters, GLuint *noInstances, GLuint *capsMask); #endif @@ -8976,6 +9228,11 @@ GLAPI void APIENTRY glGetPerfQueryInfoINTEL (GLuint queryId, GLuint queryNameLen #define GL_PACK_INVERT_MESA 0x8758 #endif /* GL_MESA_pack_invert */ +#ifndef GL_MESA_program_binary_formats +#define GL_MESA_program_binary_formats 1 +#define GL_PROGRAM_BINARY_FORMAT_MESA 0x875F +#endif /* GL_MESA_program_binary_formats */ + #ifndef GL_MESA_resize_buffers #define GL_MESA_resize_buffers 1 typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (void); @@ -8984,6 +9241,17 @@ GLAPI void APIENTRY glResizeBuffersMESA (void); #endif #endif /* GL_MESA_resize_buffers */ +#ifndef GL_MESA_shader_integer_functions +#define GL_MESA_shader_integer_functions 1 +#endif /* GL_MESA_shader_integer_functions */ + +#ifndef GL_MESA_tile_raster_order +#define GL_MESA_tile_raster_order 1 +#define GL_TILE_RASTER_ORDER_FIXED_MESA 0x8BB8 +#define GL_TILE_RASTER_ORDER_INCREASING_X_MESA 0x8BB9 +#define GL_TILE_RASTER_ORDER_INCREASING_Y_MESA 0x8BBA +#endif /* GL_MESA_tile_raster_order */ + #ifndef GL_MESA_window_pos #define GL_MESA_window_pos 1 typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); @@ -9045,6 +9313,10 @@ GLAPI void APIENTRY glWindowPos4svMESA (const GLshort *v); #define GL_YCBCR_MESA 0x8757 #endif /* GL_MESA_ycbcr_texture */ +#ifndef GL_NVX_blend_equation_advanced_multi_draw_buffers +#define GL_NVX_blend_equation_advanced_multi_draw_buffers 1 +#endif /* GL_NVX_blend_equation_advanced_multi_draw_buffers */ + #ifndef GL_NVX_conditional_render #define GL_NVX_conditional_render 1 typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERNVXPROC) (GLuint id); @@ -9064,6 +9336,32 @@ GLAPI void APIENTRY glEndConditionalRenderNVX (void); #define GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX 0x904B #endif /* GL_NVX_gpu_memory_info */ +#ifndef GL_NVX_linked_gpu_multicast +#define GL_NVX_linked_gpu_multicast 1 +#define GL_LGPU_SEPARATE_STORAGE_BIT_NVX 0x0800 +#define GL_MAX_LGPU_GPUS_NVX 0x92BA +typedef void (APIENTRYP PFNGLLGPUNAMEDBUFFERSUBDATANVXPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLLGPUCOPYIMAGESUBDATANVXPROC) (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRYP PFNGLLGPUINTERLOCKNVXPROC) (void); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glLGPUNamedBufferSubDataNVX (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glLGPUCopyImageSubDataNVX (GLuint sourceGpu, GLbitfield destinationGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srxY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); +GLAPI void APIENTRY glLGPUInterlockNVX (void); +#endif +#endif /* GL_NVX_linked_gpu_multicast */ + +#ifndef GL_NV_alpha_to_coverage_dither_control +#define GL_NV_alpha_to_coverage_dither_control 1 +#define GL_ALPHA_TO_COVERAGE_DITHER_DEFAULT_NV 0x934D +#define GL_ALPHA_TO_COVERAGE_DITHER_ENABLE_NV 0x934E +#define GL_ALPHA_TO_COVERAGE_DITHER_DISABLE_NV 0x934F +#define GL_ALPHA_TO_COVERAGE_DITHER_MODE_NV 0x92BF +typedef void (APIENTRYP PFNGLALPHATOCOVERAGEDITHERCONTROLNVPROC) (GLenum mode); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glAlphaToCoverageDitherControlNV (GLenum mode); +#endif +#endif /* GL_NV_alpha_to_coverage_dither_control */ + #ifndef GL_NV_bindless_multi_draw_indirect #define GL_NV_bindless_multi_draw_indirect 1 typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTBINDLESSNVPROC) (GLenum mode, const void *indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); @@ -9180,6 +9478,10 @@ GLAPI void APIENTRY glBlendBarrierNV (void); #define GL_BLEND_ADVANCED_COHERENT_NV 0x9285 #endif /* GL_NV_blend_equation_advanced_coherent */ +#ifndef GL_NV_blend_minmax_factor +#define GL_NV_blend_minmax_factor 1 +#endif /* GL_NV_blend_minmax_factor */ + #ifndef GL_NV_blend_square #define GL_NV_blend_square 1 #endif /* GL_NV_blend_square */ @@ -9297,6 +9599,11 @@ GLAPI void APIENTRY glConservativeRasterParameterfNV (GLenum pname, GLfloat valu #endif #endif /* GL_NV_conservative_raster_dilate */ +#ifndef GL_NV_conservative_raster_pre_snap +#define GL_NV_conservative_raster_pre_snap 1 +#define GL_CONSERVATIVE_RASTER_MODE_PRE_SNAP_NV 0x9550 +#endif /* GL_NV_conservative_raster_pre_snap */ + #ifndef GL_NV_conservative_raster_pre_snap_triangles #define GL_NV_conservative_raster_pre_snap_triangles 1 #define GL_CONSERVATIVE_RASTER_MODE_NV 0x954D @@ -9308,6 +9615,10 @@ GLAPI void APIENTRY glConservativeRasterParameteriNV (GLenum pname, GLint param) #endif #endif /* GL_NV_conservative_raster_pre_snap_triangles */ +#ifndef GL_NV_conservative_raster_underestimation +#define GL_NV_conservative_raster_underestimation 1 +#endif /* GL_NV_conservative_raster_underestimation */ + #ifndef GL_NV_copy_depth_to_color #define GL_NV_copy_depth_to_color 1 #define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E @@ -9357,6 +9668,23 @@ GLAPI void APIENTRY glDrawTextureNV (GLuint texture, GLuint sampler, GLfloat x0, #endif #endif /* GL_NV_draw_texture */ +#ifndef GL_NV_draw_vulkan_image +#define GL_NV_draw_vulkan_image 1 +typedef void (APIENTRY *GLVULKANPROCNV)(void); +typedef void (APIENTRYP PFNGLDRAWVKIMAGENVPROC) (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +typedef GLVULKANPROCNV (APIENTRYP PFNGLGETVKPROCADDRNVPROC) (const GLchar *name); +typedef void (APIENTRYP PFNGLWAITVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKSEMAPHORENVPROC) (GLuint64 vkSemaphore); +typedef void (APIENTRYP PFNGLSIGNALVKFENCENVPROC) (GLuint64 vkFence); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glDrawVkImageNV (GLuint64 vkImage, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); +GLAPI GLVULKANPROCNV APIENTRY glGetVkProcAddrNV (const GLchar *name); +GLAPI void APIENTRY glWaitVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkSemaphoreNV (GLuint64 vkSemaphore); +GLAPI void APIENTRY glSignalVkFenceNV (GLuint64 vkFence); +#endif +#endif /* GL_NV_draw_vulkan_image */ + #ifndef GL_NV_evaluators #define GL_NV_evaluators 1 #define GL_EVAL_2D_NV 0x86C0 @@ -9591,6 +9919,41 @@ GLAPI void APIENTRY glFramebufferTextureFaceEXT (GLenum target, GLenum attachmen #define GL_NV_geometry_shader_passthrough 1 #endif /* GL_NV_geometry_shader_passthrough */ +#ifndef GL_NV_gpu_multicast +#define GL_NV_gpu_multicast 1 +#define GL_PER_GPU_STORAGE_BIT_NV 0x0800 +#define GL_MULTICAST_GPUS_NV 0x92BA +#define GL_RENDER_GPU_MASK_NV 0x9558 +#define GL_PER_GPU_STORAGE_NV 0x9548 +#define GL_MULTICAST_PROGRAMMABLE_SAMPLE_LOCATION_NV 0x9549 +typedef void (APIENTRYP PFNGLRENDERGPUMASKNVPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLMULTICASTBUFFERSUBDATANVPROC) (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +typedef void (APIENTRYP PFNGLMULTICASTCOPYBUFFERSUBDATANVPROC) (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLMULTICASTCOPYIMAGESUBDATANVPROC) (GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +typedef void (APIENTRYP PFNGLMULTICASTBLITFRAMEBUFFERNVPROC) (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRYP PFNGLMULTICASTFRAMEBUFFERSAMPLELOCATIONSFVNVPROC) (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +typedef void (APIENTRYP PFNGLMULTICASTBARRIERNVPROC) (void); +typedef void (APIENTRYP PFNGLMULTICASTWAITSYNCNVPROC) (GLuint signalGpu, GLbitfield waitGpuMask); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUIVNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLint64 *params); +typedef void (APIENTRYP PFNGLMULTICASTGETQUERYOBJECTUI64VNVPROC) (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glRenderGpuMaskNV (GLbitfield mask); +GLAPI void APIENTRY glMulticastBufferSubDataNV (GLbitfield gpuMask, GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data); +GLAPI void APIENTRY glMulticastCopyBufferSubDataNV (GLuint readGpu, GLbitfield writeGpuMask, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GLAPI void APIENTRY glMulticastCopyImageSubDataNV (GLuint srcGpu, GLbitfield dstGpuMask, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +GLAPI void APIENTRY glMulticastBlitFramebufferNV (GLuint srcGpu, GLuint dstGpu, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLAPI void APIENTRY glMulticastFramebufferSampleLocationsfvNV (GLuint gpu, GLuint framebuffer, GLuint start, GLsizei count, const GLfloat *v); +GLAPI void APIENTRY glMulticastBarrierNV (void); +GLAPI void APIENTRY glMulticastWaitSyncNV (GLuint signalGpu, GLbitfield waitGpuMask); +GLAPI void APIENTRY glMulticastGetQueryObjectivNV (GLuint gpu, GLuint id, GLenum pname, GLint *params); +GLAPI void APIENTRY glMulticastGetQueryObjectuivNV (GLuint gpu, GLuint id, GLenum pname, GLuint *params); +GLAPI void APIENTRY glMulticastGetQueryObjecti64vNV (GLuint gpu, GLuint id, GLenum pname, GLint64 *params); +GLAPI void APIENTRY glMulticastGetQueryObjectui64vNV (GLuint gpu, GLuint id, GLenum pname, GLuint64 *params); +#endif +#endif /* GL_NV_gpu_multicast */ + #ifndef GL_NV_gpu_program4 #define GL_NV_gpu_program4 1 #define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 @@ -10208,6 +10571,32 @@ GLAPI void APIENTRY glPrimitiveRestartIndexNV (GLuint index); #endif #endif /* GL_NV_primitive_restart */ +#ifndef GL_NV_query_resource +#define GL_NV_query_resource 1 +#define GL_QUERY_RESOURCE_TYPE_VIDMEM_ALLOC_NV 0x9540 +#define GL_QUERY_RESOURCE_MEMTYPE_VIDMEM_NV 0x9542 +#define GL_QUERY_RESOURCE_SYS_RESERVED_NV 0x9544 +#define GL_QUERY_RESOURCE_TEXTURE_NV 0x9545 +#define GL_QUERY_RESOURCE_RENDERBUFFER_NV 0x9546 +#define GL_QUERY_RESOURCE_BUFFEROBJECT_NV 0x9547 +typedef GLint (APIENTRYP PFNGLQUERYRESOURCENVPROC) (GLenum queryType, GLint tagId, GLuint bufSize, GLint *buffer); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI GLint APIENTRY glQueryResourceNV (GLenum queryType, GLint tagId, GLuint bufSize, GLint *buffer); +#endif +#endif /* GL_NV_query_resource */ + +#ifndef GL_NV_query_resource_tag +#define GL_NV_query_resource_tag 1 +typedef void (APIENTRYP PFNGLGENQUERYRESOURCETAGNVPROC) (GLsizei n, GLint *tagIds); +typedef void (APIENTRYP PFNGLDELETEQUERYRESOURCETAGNVPROC) (GLsizei n, const GLint *tagIds); +typedef void (APIENTRYP PFNGLQUERYRESOURCETAGNVPROC) (GLint tagId, const GLchar *tagString); +#ifdef GL_GLEXT_PROTOTYPES +GLAPI void APIENTRY glGenQueryResourceTagNV (GLsizei n, GLint *tagIds); +GLAPI void APIENTRY glDeleteQueryResourceTagNV (GLsizei n, const GLint *tagIds); +GLAPI void APIENTRY glQueryResourceTagNV (GLint tagId, const GLchar *tagString); +#endif +#endif /* GL_NV_query_resource_tag */ + #ifndef GL_NV_register_combiners #define GL_NV_register_combiners 1 #define GL_REGISTER_COMBINERS_NV 0x8522 @@ -10484,6 +10873,10 @@ GLAPI void APIENTRY glTextureImage3DMultisampleCoverageNV (GLuint texture, GLenu #define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 #endif /* GL_NV_texture_rectangle */ +#ifndef GL_NV_texture_rectangle_compressed +#define GL_NV_texture_rectangle_compressed 1 +#endif /* GL_NV_texture_rectangle_compressed */ + #ifndef GL_NV_texture_shader #define GL_NV_texture_shader 1 #define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 06edbd33e8..067a58faa1 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -29,6 +29,7 @@ # include # include # elif defined(__MINGW32__) +# undef WINVER # define WINVER 0x502 // needed for SetDllDirectory # include # endif diff --git a/src/App/Document.cpp b/src/App/Document.cpp index 3d13f19de0..c4e56c7702 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -64,6 +64,7 @@ recompute path. Also, it enables more complicated dependencies beyond trees. #endif #include +#include #include #ifdef USE_OLD_DAG @@ -103,6 +104,7 @@ recompute path. Also, it enables more complicated dependencies beyond trees. #include "License.h" #include "Link.h" #include "MergeDocuments.h" +#include "StringHasher.h" #include "Transactions.h" #ifdef _MSC_VER @@ -137,6 +139,7 @@ static bool globalIsRelabeling; DocumentP::DocumentP() { + Hasher = new StringHasher; static std::random_device _RD; static std::mt19937 _RGEN(_RD()); static std::uniform_int_distribution<> _RDIST(0, 5000); @@ -922,11 +925,27 @@ std::string Document::getTransientDirectoryName(const std::string& uuid, const s void Document::Save (Base::Writer &writer) const { + d->hashers.clear(); + addStringHasher(d->Hasher); + writer.Stream() << R"(" << endl; + << "\" FileVersion=\"" << writer.getFileVersion() + << "\" StringHasher=\"1\">\n"; + + writer.incInd(); + + d->Hasher->setPersistenceFileName("StringHasher.Table"); + for (auto o : d->objectArray) { + o->beforeSave(); + } + beforeSave(); + + d->Hasher->Save(writer); + + writer.decInd(); PropertyContainer::Save(writer); @@ -938,7 +957,9 @@ void Document::Save (Base::Writer &writer) const void Document::Restore(Base::XMLReader &reader) { int i,Cnt; + d->hashers.clear(); d->touchedObjs.clear(); + addStringHasher(d->Hasher); setStatus(Document::PartialDoc,false); reader.readElement("Document"); @@ -955,6 +976,12 @@ void Document::Restore(Base::XMLReader &reader) reader.FileVersion = 0; } + if (reader.hasAttribute("StringHasher")) { + d->Hasher->Restore(reader); + } else { + d->Hasher->clear(); + } + // When this document was created the FileName and Label properties // were set to the absolute path or file name, respectively. To save // the document to the file it was loaded from or to show the file name @@ -1019,6 +1046,30 @@ void Document::Restore(Base::XMLReader &reader) reader.readEndElement("Document"); } +std::pair Document::addStringHasher(const StringHasherRef & hasher) const { + if (!hasher) + return std::make_pair(false, 0); + auto ret = d->hashers.left.insert(HasherMap::left_map::value_type(hasher,(int)d->hashers.size())); + if (ret.second) + hasher->clearMarks(); + return std::make_pair(ret.second,ret.first->second); +} + +StringHasherRef Document::getStringHasher(int idx) const { + if(idx<0) { + return d->Hasher; + return d->Hasher; + } + StringHasherRef hasher; + auto it = d->hashers.right.find(idx); + if(it == d->hashers.right.end()) { + hasher = new StringHasher; + d->hashers.right.insert(HasherMap::right_map::value_type(idx,hasher)); + }else + hasher = it->second; + return hasher; +} + struct DocExportStatus { Document::ExportStatus status; std::set objs; @@ -1055,6 +1106,7 @@ Document::ExportStatus Document::isExporting(const App::DocumentObject *obj) con void Document::exportObjects(const std::vector& obj, std::ostream& out) { DocumentExporting exporting(obj); + d->hashers.clear(); if(FC_LOG_INSTANCE.isEnabled(FC_LOGLEVEL_LOG)) { for(auto o : obj) { @@ -1091,6 +1143,7 @@ void Document::exportObjects(const std::vector& obj, std:: // write additional files writer.writeFiles(); + d->hashers.clear(); } #define FC_ATTR_DEPENDENCIES "Dependencies" @@ -1401,6 +1454,7 @@ void Document::addRecomputeObject(DocumentObject *obj) { std::vector Document::importObjects(Base::XMLReader& reader) { + d->hashers.clear(); Base::FlagToggler<> flag(globalIsRestoring, false); Base::ObjectStatusLocker restoreBit(Status::Restoring, this); Base::ObjectStatusLocker restoreBit2(Status::Importing, this); @@ -1452,6 +1506,7 @@ Document::importObjects(Base::XMLReader& reader) o->setStatus(App::ObjImporting,false); } + d->hashers.clear(); return objs; } @@ -1464,6 +1519,8 @@ unsigned int Document::getMemSize () const for (it = d->objectArray.begin(); it != d->objectArray.end(); ++it) size += (*it)->getMemSize(); + size += d->Hasher->getMemSize(); + // size of the document properties... size += PropertyContainer::getMemSize(); diff --git a/src/App/Document.h b/src/App/Document.h index ad202a31d3..1f89b74ec5 100644 --- a/src/App/Document.h +++ b/src/App/Document.h @@ -23,6 +23,12 @@ #ifndef APP_DOCUMENT_H #define APP_DOCUMENT_H +#include +#include +#include +#include +#include + #include "PropertyContainer.h" #include "PropertyLinks.h" #include "PropertyStandard.h" @@ -44,6 +50,8 @@ namespace App class DocumentPy; // the python document class class Application; class Transaction; + class StringHasher; + using StringHasherRef = Base::Reference; } namespace App @@ -465,6 +473,33 @@ public: (const App::DocumentObject* from, const App::DocumentObject* to) const; //@} + /** Called by a property during save to store its StringHasher + * + * @param hasher: the input hasher + * @return Returns a pair. The boolean indicates if the + * StringHasher has been added before. The integer is the hasher index. + * + * The StringHasher object is designed to be shared among multiple objects. + * We must not save duplicate copies of the same hasher, and must be + * able to restore with the same sharing relationship. This function returns + * whether the hasher has been added before by other objects, and the index + * of the hasher. If the hasher has not been added before, the object must + * save the hasher by calling StringHasher::Save + */ + std::pair addStringHasher(const StringHasherRef & hasher) const; + + /** Called by property to restore its StringHasher + * + * @param index: the index previously returned by calling addStringHasher() + * during save. Or if is negative, then return document's own string hasher. + * + * @return Return the resulting string hasher. + * + * The caller is responsible for restoring the hasher if the caller is the first + * owner of the hasher, i.e. if addStringHasher() returns true during save. + */ + StringHasherRef getStringHasher(int index=-1) const; + /** Return the links to a given object * * @param links: holds the links found diff --git a/src/App/Property.h b/src/App/Property.h index 8957956124..59c6ff505b 100644 --- a/src/App/Property.h +++ b/src/App/Property.h @@ -261,6 +261,8 @@ public: */ int64_t getID() const {return _id;} + virtual void beforeSave() const {} + friend class PropertyContainer; friend struct PropertyData; friend class DynamicProperty; diff --git a/src/App/PropertyContainer.cpp b/src/App/PropertyContainer.cpp index 5812d3578d..2ccf2c8f1e 100644 --- a/src/App/PropertyContainer.cpp +++ b/src/App/PropertyContainer.cpp @@ -239,6 +239,23 @@ void PropertyContainer::handleChangedPropertyType(DocumentReader &reader, const PropertyData PropertyContainer::propertyData; +void PropertyContainer::beforeSave() const +{ + std::map Map; + getPropertyMap(Map); + for (auto& entry : Map) { + auto prop = entry.second; + if (!prop->testStatus(Property::PropDynamic) + && (prop->testStatus(Property::Transient) + || ((getPropertyType(prop) & Prop_Transient) != 0))) { + // Nothing + } + else { + prop->beforeSave(); + } + } +} + void PropertyContainer::Save (Base::Writer &writer) const { std::map Map; @@ -257,8 +274,9 @@ void PropertyContainer::Save (Base::Writer &writer) const { transients.push_back(prop); it = Map.erase(it); - }else + } else { ++it; + } } writer.incInd(); // indentation for 'Properties Count' diff --git a/src/App/PropertyContainer.h b/src/App/PropertyContainer.h index f9c6e91c4f..f31099adb7 100644 --- a/src/App/PropertyContainer.h +++ b/src/App/PropertyContainer.h @@ -231,6 +231,7 @@ public: void Save (Base::Writer &writer) const override; void Restore(Base::XMLReader &reader) override; void Restore(Base::DocumentReader &reader, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *containerEl) override; + virtual void beforeSave() const; virtual void editProperty(const char * /*propName*/) {} diff --git a/src/App/PropertyPythonObject.cpp b/src/App/PropertyPythonObject.cpp index 1955e7f42c..e21738f575 100644 --- a/src/App/PropertyPythonObject.cpp +++ b/src/App/PropertyPythonObject.cpp @@ -92,11 +92,19 @@ std::string PropertyPythonObject::toString() const throw Py::Exception(); Py::Callable method(pickle.getAttr(std::string("dumps"))); Py::Object dump; - if (this->object.hasAttr("__getstate__")) { + if (this->object.hasAttr("dumps")) { + Py::Tuple args; + Py::Callable state(this->object.getAttr("dumps")); + dump = state.apply(args); + } +#if PY_VERSION_HEX < 0x030b0000 + // support add-ons that use the old method names + else if (this->object.hasAttr("__getstate__")) { Py::Tuple args; Py::Callable state(this->object.getAttr("__getstate__")); dump = state.apply(args); } +#endif else if (this->object.hasAttr("__dict__")) { dump = this->object.getAttr("__dict__"); } @@ -134,12 +142,21 @@ void PropertyPythonObject::fromString(const std::string& repr) args.setItem(0, Py::String(repr)); Py::Object res = method.apply(args); - if (this->object.hasAttr("__setstate__")) { + if (this->object.hasAttr("loads")) { + Py::Tuple args(1); + args.setItem(0, res); + Py::Callable state(this->object.getAttr("loads")); + state.apply(args); + } +#if PY_VERSION_HEX < 0x030b0000 + // support add-ons that use the old method names + else if (this->object.hasAttr("__setstate__")) { Py::Tuple args(1); args.setItem(0, res); Py::Callable state(this->object.getAttr("__setstate__")); state.apply(args); } +#endif else if (this->object.hasAttr("__dict__")) { if (!res.isNone()) { this->object.setAttr("__dict__", res); diff --git a/src/App/private/DocumentP.h b/src/App/private/DocumentP.h index a065ce7141..a85d90af50 100644 --- a/src/App/private/DocumentP.h +++ b/src/App/private/DocumentP.h @@ -25,11 +25,14 @@ #include #include +#include #include +#include #include #include #include + // using VertexProperty = boost::property; using DependencyList = boost::adjacency_list < boost::vecS, // class OutEdgeListS : a Sequence or an AssociativeContainer @@ -47,6 +50,7 @@ using Node = std::vector ; using Path = std::vector ; namespace App { +using HasherMap = boost::bimap; class Transaction; // Pimpl class @@ -74,6 +78,7 @@ struct DocumentP unsigned int UndoMemSize; unsigned int UndoMaxStackSize; std::string programVersion; + mutable HasherMap hashers; #ifdef USE_OLD_DAG DependencyList DepList; std::map VertexObjectList; @@ -82,6 +87,8 @@ struct DocumentP std::multimap > _RecomputeLog; + StringHasherRef Hasher; + DocumentP(); void addRecomputeLog(const char *why, App::DocumentObject *obj) { diff --git a/src/Base/Resources/translations/Base_pl.ts b/src/Base/Resources/translations/Base_pl.ts index 185d4c4db0..1c6eb4c9f2 100644 --- a/src/Base/Resources/translations/Base_pl.ts +++ b/src/Base/Resources/translations/Base_pl.ts @@ -6,7 +6,7 @@ Standard (mm, kg, s, degree) - Standardowe (mm, kg, s, °) + Standardowy (mm, kg, s, °) @@ -36,12 +36,12 @@ Metric small parts & CNC(mm, mm/min) - Mniejsze części i CNC, metryczny (mm, mm/min) + Metryczny dla mniejszych części i CNC (mm, mm/min) Imperial for Civil Eng (ft, ft/sec) - Inżynieria lądowa brytyjskie (ft, ft/s) + Inżynieria lądowa brytyjski (ft, ft/s) diff --git a/src/Doc/CONTRIBUTORS b/src/Doc/CONTRIBUTORS index 2c7e2c109f..82753e70d3 100644 --- a/src/Doc/CONTRIBUTORS +++ b/src/Doc/CONTRIBUTORS @@ -15,6 +15,7 @@ asakura Asier Sarasua Balázs Bámer Bartlomiej Niemiec +Bas Ruigrok (Rexbas) bejant Benjamin Alterauge Bernd Hahnebach diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index 248ea7ac4e..16169537f8 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -833,6 +833,8 @@ SET(View3D_CPP_SRCS View3DPy.cpp View3DViewerPy.cpp NaviCube.cpp + NavigationAnimator.cpp + NavigationAnimation.cpp ) SET(View3D_SRCS ${View3D_CPP_SRCS} @@ -855,6 +857,8 @@ SET(View3D_SRCS CoinRiftWidget.h View3DViewerPy.h NaviCube.h + NavigationAnimator.h + NavigationAnimation.h ) SOURCE_GROUP("View3D" FILES ${View3D_SRCS}) diff --git a/src/Gui/CommandLink.cpp b/src/Gui/CommandLink.cpp index edb69c974e..10b8c50a2e 100644 --- a/src/Gui/CommandLink.cpp +++ b/src/Gui/CommandLink.cpp @@ -206,7 +206,12 @@ StdCmdLinkMake::StdCmdLinkMake() { sGroup = "Link"; sMenuText = QT_TR_NOOP("Make link"); - sToolTipText = QT_TR_NOOP("Create a link to the selected object(s)"); + static std::string toolTip = std::string("

") + + QT_TR_NOOP("A Link is an object that references or links to another object in the same " + "document, or in another document.Unlike Clones, Links reference the original Shape directly, " + " making them more memory efficient which helps with the creation of complex assemblies.") + + "

"; + sToolTipText = toolTip.c_str(); sWhatsThis = "Std_LinkMake"; sStatusTip = sToolTipText; eType = AlterDoc; @@ -214,7 +219,7 @@ StdCmdLinkMake::StdCmdLinkMake() } bool StdCmdLinkMake::isActive() { - return !!App::GetApplication().getActiveDocument(); + return App::GetApplication().getActiveDocument(); } void StdCmdLinkMake::activated(int) { @@ -878,6 +883,7 @@ public: eType = AlterDoc; bCanLog = false; + addCommand(new StdCmdLinkMake()); addCommand(new StdCmdLinkMakeRelative()); addCommand(new StdCmdLinkReplace()); addCommand(new StdCmdLinkUnlink()); @@ -898,7 +904,6 @@ namespace Gui { void CreateLinkCommands() { CommandManager &rcCmdMgr = Application::Instance->commandManager(); - rcCmdMgr.addCommand(new StdCmdLinkMake()); rcCmdMgr.addCommand(new StdCmdLinkActions()); rcCmdMgr.addCommand(new StdCmdLinkMakeGroup()); rcCmdMgr.addCommand(new StdCmdLinkSelectActions()); diff --git a/src/Gui/CommandStructure.cpp b/src/Gui/CommandStructure.cpp index 70dcff97eb..4c0c597f8b 100644 --- a/src/Gui/CommandStructure.cpp +++ b/src/Gui/CommandStructure.cpp @@ -49,7 +49,13 @@ StdCmdPart::StdCmdPart() { sGroup = "Structure"; sMenuText = QT_TR_NOOP("Create part"); - sToolTipText = QT_TR_NOOP("Create a new part and make it active"); + static std::string toolTip = std::string("

") + + QT_TR_NOOP("A Part is is a general purpose container to keep together a " + "group of objects so that they act as a unit in the 3D view.\n" + "It is meant to arrange objects that have a Part TopoShape, like Part Primitives, PartDesign" + " Bodies, and other Parts.") + + "

"; + sToolTipText = toolTip.c_str(); sWhatsThis = "Std_Part"; sStatusTip = sToolTipText; sPixmap = "Geofeaturegroup"; @@ -90,7 +96,13 @@ StdCmdGroup::StdCmdGroup() { sGroup = "Structure"; sMenuText = QT_TR_NOOP("Create group"); - sToolTipText = QT_TR_NOOP("Create a new group for ordering objects"); + static std::string toolTip = std::string("

") + + QT_TR_NOOP("A Group is a general purpose container to group objects in the " + "Tree view, regardless of their data type. It is a simple folder to organize " + "the objects in a model.") + + "

"; + + sToolTipText = toolTip.c_str(); sWhatsThis = "Std_Group"; sStatusTip = sToolTipText; sPixmap = "folder"; diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 2ad6a44e85..49c9fe0301 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -3577,10 +3577,14 @@ StdCmdSelBack::StdCmdSelBack() :Command("Std_SelBack") { sGroup = "View"; - sMenuText = QT_TR_NOOP("&Back"); - sToolTipText = QT_TR_NOOP("Go back to previous selection"); + sMenuText = QT_TR_NOOP("Selection Back"); + static std::string toolTip = std::string("

") + + QT_TR_NOOP("Restore the previous Tree view selection. " + "Only works if Tree RecordSelection mode is switched on.") + + "

"; + sToolTipText = toolTip.c_str(); sWhatsThis = "Std_SelBack"; - sStatusTip = QT_TR_NOOP("Go back to previous selection"); + sStatusTip = sToolTipText; sPixmap = "sel-back"; sAccel = "S, B"; eType = AlterSelection; @@ -3607,10 +3611,14 @@ StdCmdSelForward::StdCmdSelForward() :Command("Std_SelForward") { sGroup = "View"; - sMenuText = QT_TR_NOOP("&Forward"); - sToolTipText = QT_TR_NOOP("Repeat the backed selection"); + sMenuText = QT_TR_NOOP("Selection Forward"); + static std::string toolTip = std::string("

") + + QT_TR_NOOP("Restore the next Tree view selection. " + "Only works if Tree RecordSelection mode is switched on.") + + "

"; + sToolTipText = toolTip.c_str(); sWhatsThis = "Std_SelForward"; - sStatusTip = QT_TR_NOOP("Repeat the backed selection"); + sStatusTip = sToolTipText; sPixmap = "sel-forward"; sAccel = "S, F"; eType = AlterSelection; @@ -3876,6 +3884,11 @@ public: addCommand(new StdTreeDrag(),!cmds.empty()); addCommand(new StdTreeSelection(),!cmds.empty()); + + addCommand(); + + addCommand(new StdCmdSelBack()); + addCommand(new StdCmdSelForward()); } const char* className() const override {return "StdCmdTreeViewActions";} }; diff --git a/src/Gui/DemoMode.cpp b/src/Gui/DemoMode.cpp index e0cd425b63..e3c67c141c 100644 --- a/src/Gui/DemoMode.cpp +++ b/src/Gui/DemoMode.cpp @@ -91,7 +91,7 @@ void DemoMode::reset() view->getViewer()->stopAnimating(); ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/View"); - hGrp->Notify("UseAutoRotation"); + hGrp->Notify("UseNavigationAnimations"); } void DemoMode::accept() @@ -272,8 +272,9 @@ void DemoMode::startAnimation(Gui::View3DInventor* view) { if (!view->getViewer()->isAnimationEnabled()) view->getViewer()->setAnimationEnabled(true); - view->getViewer()->startAnimating(getDirection(view), - getSpeed(ui->speedSlider->value())); + + view->getViewer()->startSpinningAnimation(getDirection(view), + getSpeed(ui->speedSlider->value())); } void DemoMode::onTimerCheckToggled(bool on) diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index 5767c93723..6d499d35d1 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -700,10 +700,11 @@ void Document::slotNewObject(const App::DocumentObject& Obj) } else if (cName!=Obj.getViewProviderName() && !pcProvider->allowOverride(Obj)) { FC_WARN("View provider type '" << cName << "' does not support " << Obj.getFullName()); + delete pcProvider; pcProvider = nullptr; cName = Obj.getViewProviderName(); } - else { + else { break; } } diff --git a/src/Gui/FileDialog.cpp b/src/Gui/FileDialog.cpp index d340197489..fc24dec76f 100644 --- a/src/Gui/FileDialog.cpp +++ b/src/Gui/FileDialog.cpp @@ -27,6 +27,7 @@ # include # include # include +# include # include # include # include @@ -889,16 +890,17 @@ SelectModule::SelectModule (const QString& type, const SelectModule::Dict& types spacerItem1 = new QSpacerItem(131, 31, QSizePolicy::Expanding, QSizePolicy::Minimum); hboxLayout->addItem(spacerItem1); - okButton = new QPushButton(this); - okButton->setObjectName(QString::fromUtf8("okButton")); - okButton->setText(tr("Select")); - okButton->setEnabled(false); + buttonBox = new QDialogButtonBox(this); + buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setStandardButtons(QDialogButtonBox::Open | QDialogButtonBox::Cancel); + buttonBox->button(QDialogButtonBox::Open)->setEnabled(false); - hboxLayout->addWidget(okButton); + hboxLayout->addWidget(buttonBox); gridLayout->addLayout(hboxLayout, 2, 0, 1, 1); // connections - connect(okButton, &QPushButton::clicked, this, &SelectModule::accept); + connect(buttonBox, &QDialogButtonBox::accepted, this, &SelectModule::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &SelectModule::reject); #if QT_VERSION < QT_VERSION_CHECK(5,15,0) connect(group, qOverload(&QButtonGroup::buttonClicked), this, &SelectModule::onButtonClicked); #else @@ -916,16 +918,13 @@ void SelectModule::accept() void SelectModule::reject() { - if (group->checkedButton()) - QDialog::reject(); + QDialog::reject(); } void SelectModule::onButtonClicked() { - if (group->checkedButton()) - okButton->setEnabled(true); - else - okButton->setEnabled(false); + QWidget* button = buttonBox->button(QDialogButtonBox::Open); + button->setEnabled(group->checkedButton() != nullptr); } QString SelectModule::getModule() const @@ -1049,8 +1048,13 @@ SelectModule::Dict SelectModule::importHandler(const QStringList& fileNames, con if (dlg.exec()) { QString mod = dlg.getModule(); const QStringList& files = fileExtension[it.key()]; - for (const auto & file : files) + for (const auto & file : files) { dict[file] = mod; + } + } + else { + // Cancelled + return {}; } } } diff --git a/src/Gui/FileDialog.h b/src/Gui/FileDialog.h index e80d366d79..62f0ddfb83 100644 --- a/src/Gui/FileDialog.h +++ b/src/Gui/FileDialog.h @@ -32,6 +32,7 @@ #include class QButtonGroup; +class QDialogButtonBox; class QGridLayout; class QGroupBox; class QHBoxLayout; @@ -269,7 +270,7 @@ private Q_SLOTS: void onButtonClicked(); private: - QPushButton *okButton; + QDialogButtonBox *buttonBox; QButtonGroup* group; QGridLayout *gridLayout; QHBoxLayout *hboxLayout; diff --git a/src/Gui/Language/FreeCAD.ts b/src/Gui/Language/FreeCAD.ts index 2662dae4d2..671b2fa1a0 100644 --- a/src/Gui/Language/FreeCAD.ts +++ b/src/Gui/Language/FreeCAD.ts @@ -122,12 +122,12 @@
- + Delete - + Paste expressions @@ -188,9 +188,9 @@
+ - Transform @@ -220,7 +220,7 @@ - + Edit image @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down - - Gui::ControlSingleton - - - Task panel - - - Gui::DAG::Model @@ -1817,72 +1809,92 @@ same time. The one with the highest priority will be triggered. - + + Find file: + + + + + Case-insensitive search for filenames, regular expressions supported + + + + + Find in files: + + + + + Filter by case-insensitive file content, regular expressions supported + + + + User macros - + System macros - + Execute - + Close - + Create - + Delete - + Edit - + Rename - + Duplicate - + Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar - + Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download - + User macros location: @@ -1890,71 +1902,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros - + Read-only - + Macro file - + Enter a file name, please: - - - + + + Existing file - + '%1'. This file already exists. - + Cannot create file - + Creation of file '%1' failed. - + Delete macro - + Do you really want to delete the macro '%1'? - + Do not show again - + Guided Walkthrough - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1962,76 +1974,76 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close - + Walkthrough, dialog 1 of 1 - + Walkthrough, dialog 2 of 2 - + Walkthrough instructions: Click right arrow button (->), then Close. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. - + Renaming Macro File - - + + Enter new name: - - + + '%1' already exists. - + Rename Failed - + Failed to rename to '%1'. Perhaps a file permission error? - + Duplicate Macro - + Duplicate Failed - + Failed to duplicate to '%1'. Perhaps a file permission error? @@ -4252,6 +4264,16 @@ horizontal space in Python console Save history + + + Python profiler interval (milliseconds): + + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + + Gui::Dialog::DlgSettingsSelection @@ -4364,16 +4386,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: - + Middle: + + + Color Bar + + + + + Label text color + + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + + Label text size + + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + + Switches the colors of the gradient @@ -4396,7 +4443,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: @@ -4426,17 +4473,17 @@ Larger value eases to pick things, but can make small features impossible to sel - + Central: - + Midway: - + End: @@ -5409,22 +5456,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View - - - - Model - - - - - - Tasks - - Gui::DockWnd::PropertyDockView @@ -5651,65 +5686,65 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file - + %1. This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document - + The document has been modified. Do you want to save your changes? - + FreeCAD macro - + Export PDF - + PDF file - + untitled[*] - + - Editor - + %1 chars removed - + %1 chars added - + Formatted @@ -5860,39 +5895,46 @@ Do you want to save your changes? - + PNG format - + Bitmap format - + GIF format - + JPG format - + SVG format - - + + PDF format - - + + + Graphviz format + + + + + + Export graph @@ -6053,7 +6095,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension @@ -6063,62 +6105,62 @@ Do you want to save your changes? - + Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager - + Close All - - - + + + Toggles this toolbar - - - + + + Toggles this dockable window - + WARNING: This is a development version. - + Please do not use it in a production environment. - - + + Unsaved document - + The exported object contains external link. Please save the documentat least once before exporting. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? @@ -6486,116 +6528,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit - + The application is still running. Do you want to exit without saving your data? - - - - + + + + Python console - + Unhandled PyCXX exception. - + Unhandled FreeCAD exception. - + Unhandled std C++ exception. - + Unhandled unknown C++ exception. - + &Copy - + &Copy command - + &Copy history - + Save history as... - + Save history - + Saves Python history across %1 sessions - + &Paste - + Select All - + Clear console - + Insert file name... - + Word wrap - + Save History - + Macro Files - + Insert file name - + All Files @@ -6680,22 +6722,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous - + Next - + Case sensitive - + Whole words @@ -6808,17 +6850,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments - + Translation Increment: - + Rotation Increment: @@ -7643,37 +7685,42 @@ Do you want to specify another directory? QDockWidget - + Tree view - + + Tasks + + + + Property view - + Selection view - - Combo View + + Model - + DAG View - + Report view - + Python console @@ -7749,12 +7796,12 @@ Do you want to specify another directory? - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version @@ -7795,70 +7842,70 @@ Do you want to specify another directory? - + Printing... - + Exporting PDF... - - + + Unsaved document - + The exported object contains external link. Please save the documentat least once before exporting. - - + + Delete failed - + Dependency error - + Copy selected - + Copy active document - + Copy all documents - + Paste - + Expression error - + Failed to parse some of the expressions. Please check the Report View for more details. - + Failed to paste expressions @@ -8264,7 +8311,7 @@ Choose 'Abort' to abort - + Save Macro @@ -8331,7 +8378,7 @@ Please open a browser window and type in: http://localhost:%1. - + Options... @@ -8378,42 +8425,42 @@ Please open a browser window and type in: http://localhost:%1. - + Do you want to save your changes to document '%1' before closing? - + Do you want to save your changes to document before closing? - + If you don't save, your changes will be lost. - + Apply answer to all - + %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? - + Delete macro - + Not allowed to delete system-wide macros @@ -8433,12 +8480,17 @@ Please open a browser window and type in: http://localhost:%1. - + Translation: - + + Translation XY: + + + + Rotation: @@ -8641,7 +8693,7 @@ the current copy will be lost. - + Color Gradient @@ -8747,13 +8799,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... - - + + Align the selected objects @@ -8831,13 +8883,13 @@ the current copy will be lost. StdCmdCopy - + C&opy - - + + Copy operation @@ -8845,13 +8897,13 @@ the current copy will be lost. StdCmdCut - + &Cut - - + + Cut out @@ -8859,13 +8911,13 @@ the current copy will be lost. StdCmdDelete - + &Delete - - + + Deletes the selected objects @@ -9013,13 +9065,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection - - + + Put duplicates of the selected objects to the active document @@ -9027,17 +9079,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode - + Toggles the selected object's edit mode - + Activates or Deactivates the selected object's edit mode @@ -9069,13 +9121,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions - - + + Actions that apply to expressions @@ -9567,19 +9619,19 @@ the current copy will be lost. StdCmdNew - + &New - - + + Create a new empty document - + Unnamed @@ -9662,13 +9714,13 @@ the current copy will be lost. StdCmdPaste - + &Paste - - + + Paste operation @@ -9676,13 +9728,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... - - + + Place the selected objects @@ -9690,13 +9742,13 @@ the current copy will be lost. StdCmdPrint - + &Print... - - + + Print the document @@ -9704,13 +9756,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... - - + + Export the document as PDF @@ -9718,17 +9770,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... - + Print the document - + Print preview @@ -9736,13 +9788,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... - - + + Show details of the currently active project @@ -9750,13 +9802,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... - - + + Utility to extract or create project files @@ -9778,13 +9830,13 @@ the current copy will be lost. StdCmdQuit - + E&xit - - + + Quits the application @@ -9834,13 +9886,13 @@ the current copy will be lost. StdCmdRedo - + &Redo - - + + Redoes a previously undone action @@ -9848,13 +9900,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh - - + + Recomputes the current active document @@ -9876,13 +9928,13 @@ the current copy will be lost. StdCmdRevert - + Revert - - + + Reverts to the saved version of this file @@ -9890,13 +9942,13 @@ the current copy will be lost. StdCmdSave - + &Save - - + + Save the active document @@ -9904,13 +9956,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All - - + + Save all opened document @@ -9918,13 +9970,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... - - + + Save the active document under a new file name @@ -9932,13 +9984,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... - - + + Save a copy of the active document under a new file name @@ -10002,13 +10054,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All - - + + Select all @@ -10240,13 +10292,13 @@ the current copy will be lost. StdCmdTransform - + Transform... - - + + Transform the geometry of selected objects @@ -10254,13 +10306,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform - - + + Transform the selected object in the 3d view @@ -10324,13 +10376,13 @@ the current copy will be lost. StdCmdUndo - + &Undo - - + + Undo exactly one action @@ -11130,7 +11182,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11138,7 +11190,7 @@ Are you sure you want to continue? - + Object dependencies @@ -11227,12 +11279,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies - + To link to external objects, the document must be saved at least once. Do you want to save the document now? @@ -11249,7 +11301,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11260,17 +11312,17 @@ Do you still want to proceed? Std_Revert - + Revert document - + This will discard all the changes since last file save. - + Do you want to continue? @@ -11927,23 +11979,15 @@ after FreeCAD launches - - Gui::InteractiveScale - - - Enter desired distance between the points - - - NaviCubeDraggableCmd - + Movable navigation cube - + Drag and place NaviCube @@ -12407,77 +12451,72 @@ display the splash screen - + Small (%1px) - + Medium (%1px) - + Large (%1px) - + Extra large (%1px) - + Custom (%1px) - + Combo View - + TreeView and PropertyView - - Both - - - - + Preference Pack Name - + Tags - + Apply - + Apply the %1 preference pack - + Choose a FreeCAD config file to import - + File exists - + A preference pack with that name already exists. Overwrite? @@ -12778,4 +12817,18 @@ You can now use Theme to get a full customization of the interface. + + StdCmdExportDependencyGraph + + + Export dependency graph... + + + + + + Export the dependency graph to a file + + + diff --git a/src/Gui/Language/FreeCAD_be.ts b/src/Gui/Language/FreeCAD_be.ts index 42b4d79a65..a77696af2d 100644 --- a/src/Gui/Language/FreeCAD_be.ts +++ b/src/Gui/Language/FreeCAD_be.ts @@ -122,12 +122,12 @@ Імпарт - + Delete Выдаліць - + Paste expressions Уставіць выраз @@ -188,9 +188,9 @@ Размясціць + - Transform Пераўтварыць @@ -220,7 +220,7 @@ Пераключыць магчымасць выбару - + Edit image Змяніць выяву @@ -615,14 +615,6 @@ while doing a left or right click and move the mouse up or down &Скасаваць - - Gui::ControlSingleton - - - Task panel - Панэль задач - - Gui::DAG::Model @@ -1824,72 +1816,92 @@ same time. The one with the highest priority will be triggered. Імя макраса: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Карыстальніцкія макрасы - + System macros Сістэмныя макрасы - + Execute Выканаць - + Close Зачыніць - + Create Стварыць - + Delete Выдаліць - + Edit Змяніць - + Rename Пераназваць - + Duplicate Паўтарыць - + Launch a guide on how to set up a macro in a custom global toolbar. Запусціце кіраўніцтва па наладцы макрасаў на карыстальніцкай глабальнай панэлі інструментаў. - + Toolbar Панэль інструментаў - + Open Addon Manager where macros created by the community and other addons can be downloaded. Адчыніць Кіраванне дадаткамі, дзе можна спампаваць макрасы, якія створаныя супольнасцю, і іншыя дадаткі. - + Download Спампаваць - + User macros location: Месцазнаходжанне карыстальніцкіх макрасаў: @@ -1897,72 +1909,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Макрас - + Read-only Толькі для чытання - + Macro file Файл макраса - + Enter a file name, please: Калі ласка, увядзіце імя файла: - - - + + + Existing file Існуючы файл - + '%1'. This file already exists. '%1'. Файл ужо існуе. - + Cannot create file Не атрмылася стварыць файл - + Creation of file '%1' failed. Не атрымалася стварыць файл '%1'. - + Delete macro Выдаліць макрас - + Do you really want to delete the macro '%1'? Сапраўды жадаеце выдаліць макрас '%1'? - + Do not show again Не паказваць зноў - + Guided Walkthrough Пакрокавае Кіраўніцтва - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,78 +1985,78 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Пакрокавы даведнік, акно 1 з 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Пакрокавыя інструкцыі: Запоўніце поля, якія адсутнічаюць (неабавязкова), потым націсніце Дадаць, потым Зачыніць - + Walkthrough, dialog 1 of 1 Пакрокавы даведнік, акно 1 з 1 - + Walkthrough, dialog 2 of 2 Пакрокавы даведнік, акно 2 з 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Пакрокавыя інструкцыі: Пстрыкніце кнопку з стрэлкай управа (->), потым Зачыніць. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Пакрокавыя інструкцыі: Пстрыкніце Новы, потым кнопку з правай стрэлкай (->), потым Зачыніць. - + Renaming Macro File Пераназваць файл макраса - - + + Enter new name: Увядзіце новую назву: - - + + '%1' already exists. '%1' ужо існуе. - + Rename Failed Пераназваць не атрымалася - + Failed to rename to '%1'. Perhaps a file permission error? Не атрымалася пераназваць у '%1'. Магчыма, памылка дазволу файла? - + Duplicate Macro Паўтарыць макрас - + Duplicate Failed Памылка паўтору - + Failed to duplicate to '%1'. Perhaps a file permission error? Не атрымалася паўтарыць у '%1'. @@ -4299,6 +4311,16 @@ horizontal space in Python console Save history Захаваць гісторыю + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4413,16 +4435,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Зверху: - + Middle: Пасярэдзіне: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4445,7 +4492,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Знізу: @@ -4475,17 +4522,17 @@ Larger value eases to pick things, but can make small features impossible to sel Колер фону для бягучых кантэйнераў у праглядзе дрэва - + Central: Цэнтральны: - + Midway: Пасярэдзіне: - + End: У канцы: @@ -5467,22 +5514,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Камбінаваны прагляд - - - - Model - Мадэль - - - - - Tasks - Задачы - Gui::DockWnd::PropertyDockView @@ -5709,12 +5744,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Зменены файл - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5723,54 +5758,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Незахаваны дакумент - + The document has been modified. Do you want to save your changes? Дакумент быў зменены. Ці жадаеце вы захаваць свае змены? - + FreeCAD macro Макрас FreeCAD - + Export PDF Экспартаваць у PDF - + PDF file Файл PDF - + untitled[*] без назвы[*] - + - Editor - Рэдактар - + %1 chars removed %1 знакаў выдалена - + %1 chars added %1 знакаў дададзена - + Formatted Адфарматаваны @@ -5921,39 +5956,46 @@ Do you want to save your changes? Graphviz не атрымалася стварыць файл выявы - + PNG format Фармат PNG - + Bitmap format Фармат BMP - + GIF format Фармат GIF - + JPG format Фармат JPG - + SVG format Фармат SVG - - + + PDF format Фармат PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Экспартаваць дыяграму @@ -6114,7 +6156,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Вымярэнне @@ -6124,62 +6166,62 @@ Do you want to save your changes? Гатовы - + Help addon needed! Неабходны дадатак даведкі! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Даведачная сістэма %1 цяпер апрацоўваецца дадаткам "Даведка". Яго можна лёгка ўсталяваць праз Кіраванне дадаткамі - + Open Addon Manager Адчыніць Кіраванне дадаткамі - + Close All Зачыніць усё - - - + + + Toggles this toolbar Пераключае панэль інструментаў - - - + + + Toggles this dockable window Пераключае ўбудаванае акно - + WARNING: This is a development version. ПАПЯРЭДЖАННЕ: Гэта версія для распрацоўшчыкаў. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Калі ласка, не ўжывайце ў вытворчым асяроддзі. - - + + Unsaved document Незахаваны дакумент - + The exported object contains external link. Please save the documentat least once before exporting. Аб'ект, які экспартуецца, утрымлівае знешні спасылак. Калі ласка, захавайце дакумент хаця б адзін раз перад экспартаваннем. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Каб стварыць спасылак на знешнія аб'екты, дакумент павінен быць захаваны хаця б адзін раз. @@ -6551,117 +6593,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Выйсці з сістэмы - + The application is still running. Do you want to exit without saving your data? Праграма ўсё яшчэ запушчаная. Ці жадаеце вы выйсці без захавання вашых дадзеных? - - - - + + + + Python console Кансоль Python - + Unhandled PyCXX exception. Неапрацаванае выключэнне PyCXX. - + Unhandled FreeCAD exception. Неапрацаванае выключэнне FreeCAD. - + Unhandled std C++ exception. Неапрацаванае выключэнне std C++. - + Unhandled unknown C++ exception. Неапрацаванае невядомае выключэнне C++. - + &Copy &Капіраваць - + &Copy command &Скапіраваць каманду - + &Copy history &Скапіраваць гісторыю - + Save history as... Захаваць гісторыю як... - + Save history Захаваць гісторыю - + Saves Python history across %1 sessions Захоўвае гісторыю Python у %1 сеансах - + &Paste &Уставіць - + Select All Пазначыць усё - + Clear console Ачысціць кансоль - + Insert file name... Уставіць імя файла... - + Word wrap Перанос па словах - + Save History Захаваць гісторыю - + Macro Files Файлы макрасаў - + Insert file name Уставіць імя файла - + All Files Усе файлы @@ -6746,22 +6788,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Папярэдні - + Next Наступны - + Case sensitive З улікам рэгістра - + Whole words Слова цалкам @@ -6872,23 +6914,23 @@ Do you want to specify another directory? Position - Position + Становішча Gui::TaskCSysDragger - + Increments Павелічэнне - + Translation Increment: Павелічэнне пераносу: - + Rotation Increment: Павелічэнне вярчэння: @@ -7714,37 +7756,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Прагляд дрэва - + + Tasks + Задачы + + + Property view Выгляд уласцівасці - + Selection view Выгляд абранага - - Combo View - Камбінаваны прагляд + + Model + Мадэль - + DAG View Выгляд DAG - + Report view Прагляд справаздачы - + Python console Кансоль Python @@ -7820,14 +7867,14 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Ваша сістэма працуе пад кіраваннем OpenGL%1.%2. Для FreeCAD патрабуецца OpenGL версіі 2.0 ці вышэй. Калі ласка, абновіце ваш графічны драйвер і/ці відэакарту па неабходнасці. - + Invalid OpenGL Version Хібная версія OpenGL @@ -7868,71 +7915,71 @@ Do you want to specify another directory? Экспартаваць файл - + Printing... Друк... - + Exporting PDF... Экспарт у PDF... - - + + Unsaved document Незахаваны дакумент - + The exported object contains external link. Please save the documentat least once before exporting. Аб'ект, які экспартуецца, утрымлівае знешні спасылак. Калі ласка, захавайце дакумент хаця б адзін раз перад экспартаваннем. - - + + Delete failed Выдаліць не атрымалася - + Dependency error Памылка залежнасці - + Copy selected Скапіраваць абранае - + Copy active document Капіраваць бягучы дакумент - + Copy all documents Капіраваць усе дакументы - + Paste Уставіць - + Expression error Памылка выразу - + Failed to parse some of the expressions. Please check the Report View for more details. Не атрымалася разабраць некаторыя выразы. Калі ласка, азнаёмцеся з праглядам справаздачы для атрымання больш падрабязнай інфармацыі. - + Failed to paste expressions Не атрымалася ўставіць выраз @@ -8349,7 +8396,7 @@ Choose 'Abort' to abort Абярыце 'Перапыніць', каб перапыніць - + Save Macro Захаваць макрас @@ -8418,7 +8465,7 @@ Please open a browser window and type in: http://localhost:%1. Немагчыма запусціць сістэмны аглядальнік. - + Options... Налады... @@ -8465,42 +8512,42 @@ Please open a browser window and type in: http://localhost:%1. Ці жадаеце вы зачыніць дыялогавае акно? - + Do you want to save your changes to document '%1' before closing? Ці жадаеце вы захаваць свае змены ў дакуменце '%1' перад закрыццём? - + Do you want to save your changes to document before closing? Ці жадаеце вы захаваць свае змены ў дакуменце перад закрыццём? - + If you don't save, your changes will be lost. Калі вы не захаваеце, вашыя змены будуць незваротна страчаныя. - + Apply answer to all Прымяніць адказ да ўсіх - + %1 Document(s) not saved %1 дакументы не захаваныя - + Some documents could not be saved. Do you want to cancel closing? Некаторыя дакументы не атрымалася захаваць. Ці жадаеце вы скасаваць закрыццё? - + Delete macro Выдаліць макрас - + Not allowed to delete system-wide macros Не дазваляецца выдаляць агульнасістэмныя макрасы @@ -8520,12 +8567,17 @@ Please open a browser window and type in: http://localhost:%1. %1 не пусты, ці выдаліць таксама і яго змест? - + Translation: Перанос: - + + Translation XY: + Translation XY: + + + Rotation: Вярчэнне: @@ -8732,7 +8784,7 @@ the current copy will be lost. Змяніць выяву... - + Color Gradient Градыент колеру @@ -8838,13 +8890,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Выраўноўванне... - - + + Align the selected objects Выраўнаваць абраныя аб'екты @@ -8922,13 +8974,13 @@ the current copy will be lost. StdCmdCopy - + C&opy &Капіраваць - - + + Copy operation Аперацыя капіравання @@ -8936,13 +8988,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Выразаць - - + + Cut out Аперацыя выразання @@ -8950,13 +9002,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Выдаліць - - + + Deletes the selected objects Выдаляе абраныя аб'екты @@ -9104,13 +9156,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Паўтарыць выбар - - + + Put duplicates of the selected objects to the active document Размяшчае паўторны выбар аб'ектаў у бягучы дакумент @@ -9118,17 +9170,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Пераключыць рэжым &змены - + Toggles the selected object's edit mode Пераключае абраныя аб'екты ў рэжым змены - + Activates or Deactivates the selected object's edit mode Уключае ці адключае рэжым змены абраных аб'ектаў @@ -9160,13 +9212,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Дзеянні з выразам - - + + Actions that apply to expressions Дзеянні, якія прымяняюцца да выразаў @@ -9658,19 +9710,19 @@ the current copy will be lost. StdCmdNew - + &New &Новы - - + + Create a new empty document Стварыць новы пусты дакумент - + Unnamed Без назвы @@ -9753,13 +9805,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Уставіць - - + + Paste operation Аперацыя ўстаўкі @@ -9767,13 +9819,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Размяшчэнне... - - + + Place the selected objects Размясціць абраныя аб'екты @@ -9781,13 +9833,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Друкаваць... - - + + Print the document Друкуе дакумент @@ -9795,13 +9847,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Экспартаваць у PDF... - - + + Export the document as PDF Экспартуе дакумент у PDF @@ -9809,17 +9861,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Папярэдні прагляд друку... - + Print the document Друкуе дакумент - + Print preview Папярэдні прагляд друку @@ -9827,13 +9879,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... &Інфармацыя аб праекце... - - + + Show details of the currently active project Паказаць падрабязную інфармацыю аб бягучым праекце @@ -9841,13 +9893,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Службовыя інструменты праекту... - - + + Utility to extract or create project files Службовыя інструменты для вымання ці стварэння файлаў праекту @@ -9869,13 +9921,13 @@ the current copy will be lost. StdCmdQuit - + E&xit &Выйсці - - + + Quits the application Завяршае працу з праграмай @@ -9925,13 +9977,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Зрабіць нанова - - + + Redoes a previously undone action Зрабіць нанова раней адмененае дзеянне @@ -9939,13 +9991,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Абнавіць - - + + Recomputes the current active document Перачытаць бягучы дакумент @@ -9967,13 +10019,13 @@ the current copy will be lost. StdCmdRevert - + Revert Вярнуць - - + + Reverts to the saved version of this file Вяртае да захаванай версіі файла @@ -9981,13 +10033,13 @@ the current copy will be lost. StdCmdSave - + &Save &Захаваць - - + + Save the active document Захоўвае бягучы дакумент @@ -9995,13 +10047,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Захаваць усе - - + + Save all opened document Захоўвае ўсе адчыненыя дакументы @@ -10009,13 +10061,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Захаваць &як... - - + + Save the active document under a new file name Захоўвае бягучы дакумент з новым іменем файла @@ -10023,13 +10075,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Захаваць &копію... - - + + Save a copy of the active document under a new file name Захоўвае копію бягучага дакумента з новым іменем файла @@ -10093,13 +10145,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Пазначыць &усё - - + + Select all Пазначыць усё @@ -10331,13 +10383,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Пераўтварыць... - - + + Transform the geometry of selected objects Пераўтварае геаметрыю абранага аб'екту @@ -10345,13 +10397,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Пераўтварыць - - + + Transform the selected object in the 3d view Пераўтварае абраны аб'ект у трохмерным прадстаўленні @@ -10415,13 +10467,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Адкаціць - - + + Undo exactly one action Адкаціць толькі адно дзеянне @@ -11221,7 +11273,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11232,7 +11284,7 @@ Are you sure you want to continue? - + Object dependencies Залежнасці аб'екта @@ -11321,12 +11373,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Залежнасці аб'екта - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Каб стварыць спасылак на знешнія аб'екты, дакумент павінен быць захаваны хаця б адзін раз. @@ -11344,7 +11396,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11358,17 +11410,17 @@ Do you still want to proceed? Std_Revert - + Revert document Аднавіць дакумент - + This will discard all the changes since last file save. Гэта прывядзе да скасавання ўсіх змен з моманту апошняга захавання файла. - + Do you want to continue? Ці жадаеце вы пряцягнуць? @@ -11798,17 +11850,17 @@ after FreeCAD launches XY-Plane - XY-Plane + Плоскасць XY XZ-Plane - XZ-Plane + Плоскасць XZ YZ-Plane - YZ-Plane + Плоскасць YZ @@ -11818,7 +11870,7 @@ after FreeCAD launches Offset: - Offset: + Зрушэнне: @@ -12030,23 +12082,15 @@ after FreeCAD launches Загрузка выявы - - Gui::InteractiveScale - - - Enter desired distance between the points - Увядзіце патрэбную адлегласць паміж кропкамі - - NaviCubeDraggableCmd - + Movable navigation cube Рухомы куб навігацыі - + Drag and place NaviCube Перацягнуць у Куб навігацыі @@ -12520,77 +12564,72 @@ display the splash screen Кіраваць пакетамі пераваг - + Small (%1px) Малы (%1px) - + Medium (%1px) Сярэдні (%1px) - + Large (%1px) Вялікі (%1px) - + Extra large (%1px) Вельмі вялікі (%1px) - + Custom (%1px) Карыстальніцкі (%1px) - + Combo View Камбінаваны прагляд - + TreeView and PropertyView Прагляд дрэва і ўласцівасцяў - - Both - Абодва - - - + Preference Pack Name Назва Пакета перавагі - + Tags Меткі - + Apply Прымяніць - + Apply the %1 preference pack Прымяніць пакет перавагі %1 - + Choose a FreeCAD config file to import Абраць файл наладаў FreeCAD для імпартавання - + File exists Файл інсуе - + A preference pack with that name already exists. Overwrite? Пакет перавагі з такой назвай ужо існуе. Перазапісаць? @@ -12897,4 +12936,18 @@ You can now use Theme to get a full customization of the interface. Усе фільтры выбару ачышчаныя + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_ca.ts b/src/Gui/Language/FreeCAD_ca.ts index 68bb398cc2..c065bacdd6 100644 --- a/src/Gui/Language/FreeCAD_ca.ts +++ b/src/Gui/Language/FreeCAD_ca.ts @@ -122,12 +122,12 @@ Importa - + Delete Elimina - + Paste expressions Enganxa expressions @@ -188,9 +188,9 @@ Posició + - Transform Transformar @@ -220,7 +220,7 @@ Commuta la selectivitat - + Edit image Edita la imatge @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Cancel·la - - Gui::ControlSingleton - - - Task panel - Tauler de tasques - - Gui::DAG::Model @@ -1821,72 +1813,92 @@ same time. The one with the highest priority will be triggered. Nom de la macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macros de l'usuari - + System macros Macros del sistema - + Execute Executa - + Close Tanca - + Create Crea - + Delete Elimina - + Edit Edita - + Rename Reanomena - + Duplicate Duplica - + Launch a guide on how to set up a macro in a custom global toolbar. Inicieu una guia sobre com configurar una macro en una barra d'eines global personalitzada. - + Toolbar Barra d'eines - + Open Addon Manager where macros created by the community and other addons can be downloaded. Obriu el Gestor de complements on es poden descarregar macros creades per la comunitat i altres complements. - + Download Descarregar - + User macros location: Ubicació de les macros de l'usuari: @@ -1894,71 +1906,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Només de lectura - + Macro file Fitxer de la macro - + Enter a file name, please: Introduïu un nom de fitxer, si us plau: - - - + + + Existing file El fitxer ja existeix - + '%1'. This file already exists. '%1'. Aquest fitxer ja existeix. - + Cannot create file No es pot crear el fitxer. - + Creation of file '%1' failed. La creació del fitxer '%1' ha fallat. - + Delete macro Suprimeix la macro - + Do you really want to delete the macro '%1'? Esteu segur que voleu suprimir la macro '%1'? - + Do not show again No ho tornis a mostrar - + Guided Walkthrough Procediment guiat - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1969,78 +1981,78 @@ Nota: els vostres canvis s'aplicaran quan canvieu de banc de treball - + Walkthrough, dialog 1 of 2 Procediment guiat, diàleg 1 de 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instruccions del procediment guiat: ompliu els camps que falten (opcional), feu clic a Afegir i després a Tanca - + Walkthrough, dialog 1 of 1 Procediment guiat, diàleg 1 de 1 - + Walkthrough, dialog 2 of 2 Procediment guiat, diàleg 2 de 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instruccions del procediment guiat: feu clic en el botó de fletxa dreta (->) i després a Tanca. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instruccions del procediment guiat: feu clic a Nou, després en el botó de fletxa dreta (->) i després a Tanca. - + Renaming Macro File S'està reanomenant l'arxiu de Macro - - + + Enter new name: Introduiu el nou nom: - - + + '%1' already exists. '%1' ja existeix. - + Rename Failed Error al reanomenar - + Failed to rename to '%1'. Perhaps a file permission error? No ha pogut canviar el nom per '%1'. Pot ser és un problema de permisos d'arxiu? - + Duplicate Macro Duplica la macro - + Duplicate Failed Duplicació fallida - + Failed to duplicate to '%1'. Perhaps a file permission error? No s'ha pogut duplicar «%1». @@ -4304,6 +4316,16 @@ horizontal space in Python console Save history Desa l'historial + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4418,16 +4440,41 @@ Un valor més gran en facilita la selecció, però pot fer que les propietats pe - + Top: Dalt: - + Middle: Mig: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4450,7 +4497,7 @@ Un valor més gran en facilita la selecció, però pot fer que les propietats pe - + Bottom: A baix: @@ -4480,17 +4527,17 @@ Un valor més gran en facilita la selecció, però pot fer que les propietats pe Color de fons per a contenidors actius en la vista d’arbre - + Central: Central: - + Midway: A mig camí: - + End: Fi: @@ -5467,22 +5514,10 @@ seleccionats abans d'obrir aquest diàleg Gui::DockWnd::ComboView - + Combo View Visualització combinada - - - - Model - Model - - - - - Tasks - Tasques - Gui::DockWnd::PropertyDockView @@ -5709,12 +5744,12 @@ seleccionats abans d'obrir aquest diàleg Gui::EditorView - + Modified file S'ha modificat el fitxer - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5723,53 +5758,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document El document no s'ha desat - + The document has been modified. Do you want to save your changes? El document s'ha modificat. Voleu desar-ne els canvis? - + FreeCAD macro Macro de FreeCAD - + Export PDF Exporta a PDF - + PDF file Arxiu PDF - + untitled[*] sense títol[*] - + - Editor - Editor - + %1 chars removed S'han eliminat %1 caràcters - + %1 chars added S'han afegit %1 caràcters - + Formatted Formatat @@ -5920,39 +5955,46 @@ Do you want to save your changes? El Graphviz no ha pogut crear un fitxer d'imatge. - + PNG format Format PNG - + Bitmap format Format de mapa de bits - + GIF format Format GIF - + JPG format Format JPG - + SVG format Format SVG - - + + PDF format Format PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Exporta el gràfic @@ -6113,7 +6155,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Cota @@ -6123,62 +6165,62 @@ Do you want to save your changes? Preparat - + Help addon needed! Necessiteu un complement d'ajuda! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager El sistema d'ajuda de % 1 ara és gestionat pel complement "Ajuda". Es pot instal·lar fàcilment mitjançant el Gestor de complements - + Open Addon Manager Obriu el Gestor de complements - + Close All Tanca-ho tot - - - + + + Toggles this toolbar Commuta la barra d'eines - - - + + + Toggles this dockable window Commuta la finestra flotant - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document El document no s'ha desat - + The exported object contains external link. Please save the documentat least once before exporting. L’objecte exportat conté un enllaç extern. Deseu el documenta almenys una vegada abans d’exportar-lo. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Per a enllaçar amb objectes externs, el document s’ha de desar almenys una vegada. @@ -6547,117 +6589,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Sortida del sistema - + The application is still running. Do you want to exit without saving your data? L'aplicació està encara en funcionament. Esteu segur que voleu sortir sense desar les dades? - - - - + + + + Python console Consola de Python - + Unhandled PyCXX exception. S'ha produït una excepció no gestionada de PyCXX. - + Unhandled FreeCAD exception. S'ha produït una excepció no gestionada de FreeCAD - + Unhandled std C++ exception. S'ha produït una excepció no gestionada de C++ estàndard. - + Unhandled unknown C++ exception. S'ha produït una excepció de C++ no gestionada desconeguda. - + &Copy &Copia - + &Copy command &Copia l'ordre - + &Copy history &Copia l'historial - + Save history as... Anomena i desa l'historial... - + Save history Desa l'historial - + Saves Python history across %1 sessions Desa l'historial de Python entre %1 sessions - + &Paste A&pega - + Select All Selecciona-ho tot - + Clear console Neteja la consola - + Insert file name... Inseriu un nom de fitxer... - + Word wrap Ajust de paraules - + Save History Desa l'historial - + Macro Files Fitxers de macro - + Insert file name Inseriu un nom de fitxer - + All Files Tots els fitxers @@ -6742,22 +6784,22 @@ Esteu segur que voleu sortir sense desar les dades? Gui::SearchBar - + Previous Anterior - + Next Següent - + Case sensitive Distingeix entre majúscules i minúscules - + Whole words Paraules senceres @@ -6870,17 +6912,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Increments - + Translation Increment: Increment de translació: - + Rotation Increment: Increment de rotació: @@ -7705,37 +7747,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Vista d'arbre - + + Tasks + Tasques + + + Property view Visualització de les propietats - + Selection view Visualització de la selecció - - Combo View - Visualització combinada + + Model + Model - + DAG View Vista DAG - + Report view Visualització de l'informe - + Python console Consola de Python @@ -7811,12 +7858,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7857,71 +7904,71 @@ Do you want to specify another directory? Exporta el fitxer - + Printing... S'està imprimint... - + Exporting PDF... S'està exportant a PDF... - - + + Unsaved document El document no s'ha desat - + The exported object contains external link. Please save the documentat least once before exporting. L’objecte exportat conté un enllaç extern. Deseu el documenta almenys una vegada abans d’exportar-lo. - - + + Delete failed No s'ha pogut eliminar - + Dependency error Error de dependència - + Copy selected Copia la selecció - + Copy active document Copia el document actiu - + Copy all documents Copia tots el documents - + Paste Enganxa - + Expression error S'ha produït un error d'expressió - + Failed to parse some of the expressions. Please check the Report View for more details. No s'han pogut analitzar algunes de les expressions. Per a obtindre més detalls, consulteu la vista de l'informe. - + Failed to paste expressions No s'han pogut enganxar les expressions @@ -8335,7 +8382,7 @@ Trieu «No» per a desfer només en el document actiu. Trieu «Interromp» per a interrompre - + Save Macro Desa la macro @@ -8402,7 +8449,7 @@ Please open a browser window and type in: http://localhost:%1. No es pot obrir el navegador del sistema. - + Options... Opcions... @@ -8449,42 +8496,42 @@ Please open a browser window and type in: http://localhost:%1. Do you want to close this dialog? - + Do you want to save your changes to document '%1' before closing? Voleu desar els canvis en el document '%1' abans de tancar? - + Do you want to save your changes to document before closing? Voleu desar els vostres canvis en el document abans de tancar? - + If you don't save, your changes will be lost. Si no guardeu els canvis, es perdran. - + Apply answer to all Envia la resposta a tots - + %1 Document(s) not saved Document (s) %1 no desat - + Some documents could not be saved. Do you want to cancel closing? Alguns documents no s'han pogut desar. Vol cancel·lar la sortida? - + Delete macro Suprimeix la macro - + Not allowed to delete system-wide macros No es permet eliminar les macros del sistema @@ -8504,12 +8551,17 @@ Please open a browser window and type in: http://localhost:%1. L'%1 no és buit, voleu esborrar-ne le contingut? - + Translation: Translació: - + + Translation XY: + Translation XY: + + + Rotation: Rotació: @@ -8717,7 +8769,7 @@ la còpia actual es perdrà. Canvia imatge... - + Color Gradient Color del degradat @@ -8823,13 +8875,13 @@ la còpia actual es perdrà. StdCmdAlignment - + Alignment... Alineació... - - + + Align the selected objects Alinea els objectes seleccionats @@ -8907,13 +8959,13 @@ la còpia actual es perdrà. StdCmdCopy - + C&opy C&opia - - + + Copy operation Copia l'operació @@ -8921,13 +8973,13 @@ la còpia actual es perdrà. StdCmdCut - + &Cut &Retalla - - + + Cut out Retalla @@ -8935,13 +8987,13 @@ la còpia actual es perdrà. StdCmdDelete - + &Delete &Elimina - - + + Deletes the selected objects Elimina els objectes seleccionats @@ -9089,13 +9141,13 @@ la còpia actual es perdrà. StdCmdDuplicateSelection - + Duplicate selection Duplica la selecció - - + + Put duplicates of the selected objects to the active document Posa els duplicats dels objectes seleccionats en el document actiu @@ -9103,17 +9155,17 @@ la còpia actual es perdrà. StdCmdEdit - + Toggle &Edit mode Commuta el mode d'&edició - + Toggles the selected object's edit mode Commuta el mode d'edició de l'objecte seleccionat - + Activates or Deactivates the selected object's edit mode Entra o surt del mode d'edició de l'objecte seleccionat @@ -9145,13 +9197,13 @@ la còpia actual es perdrà. StdCmdExpression - + Expression actions Accions d’expressió - - + + Actions that apply to expressions Accions que s'apliquen a expressions @@ -9643,19 +9695,19 @@ la còpia actual es perdrà. StdCmdNew - + &New &Nou - - + + Create a new empty document Crea un document buit nou - + Unnamed Sense nom @@ -9738,13 +9790,13 @@ la còpia actual es perdrà. StdCmdPaste - + &Paste A&pega - - + + Paste operation Apega l'operació @@ -9752,13 +9804,13 @@ la còpia actual es perdrà. StdCmdPlacement - + Placement... Posició... - - + + Place the selected objects Col·loca els objectes seleccionats @@ -9766,13 +9818,13 @@ la còpia actual es perdrà. StdCmdPrint - + &Print... Im&primeix... - - + + Print the document Imprimeix el document @@ -9780,13 +9832,13 @@ la còpia actual es perdrà. StdCmdPrintPdf - + &Export PDF... &Exporta a PDF... - - + + Export the document as PDF Exporta el document com a PDF @@ -9794,17 +9846,17 @@ la còpia actual es perdrà. StdCmdPrintPreview - + &Print preview... &Previsualització de la impressió... - + Print the document Imprimeix el document - + Print preview Previsualització de la impressió @@ -9812,13 +9864,13 @@ la còpia actual es perdrà. StdCmdProjectInfo - + Project i&nformation... I&nformació del projecte... - - + + Show details of the currently active project Mostra els detalls del projecte actiu actual @@ -9826,13 +9878,13 @@ la còpia actual es perdrà. StdCmdProjectUtil - + Project utility... Utilitat del projecte... - - + + Utility to extract or create project files Utilitat per a extraure o crear fitxers de projecte @@ -9854,13 +9906,13 @@ la còpia actual es perdrà. StdCmdQuit - + E&xit Surt &x - - + + Quits the application Surt de l'aplicació @@ -9910,13 +9962,13 @@ la còpia actual es perdrà. StdCmdRedo - + &Redo &Refés - - + + Redoes a previously undone action Refà l'acció prèviament desfeta @@ -9924,13 +9976,13 @@ la còpia actual es perdrà. StdCmdRefresh - + &Refresh &Actualitza - - + + Recomputes the current active document Recalcula el document actiu actualment @@ -9952,13 +10004,13 @@ la còpia actual es perdrà. StdCmdRevert - + Revert Torna a una versió anterior - - + + Reverts to the saved version of this file Torna a la versió guardada d'aquest fitxer @@ -9966,13 +10018,13 @@ la còpia actual es perdrà. StdCmdSave - + &Save &Guarda - - + + Save the active document Desa el document actiu @@ -9980,13 +10032,13 @@ la còpia actual es perdrà. StdCmdSaveAll - + Save All Desa-ho tot - - + + Save all opened document Desa tots els documents oberts @@ -9994,13 +10046,13 @@ la còpia actual es perdrà. StdCmdSaveAs - + Save &As... &Anomena i desa... - - + + Save the active document under a new file name Guarda el document actiu amb un altre nom... @@ -10008,13 +10060,13 @@ la còpia actual es perdrà. StdCmdSaveCopy - + Save a &Copy... Desa una &còpia... - - + + Save a copy of the active document under a new file name Guarda una còpia del document actiu amb un altre nom... @@ -10078,13 +10130,13 @@ la còpia actual es perdrà. StdCmdSelectAll - + Select &All Seleccion&a-ho tot - - + + Select all Selecciona-ho tot @@ -10316,13 +10368,13 @@ la còpia actual es perdrà. StdCmdTransform - + Transform... Transforma... - - + + Transform the geometry of selected objects Transforma la geometria dels objectes seleccionats @@ -10330,13 +10382,13 @@ la còpia actual es perdrà. StdCmdTransformManip - + Transform Transformar - - + + Transform the selected object in the 3d view Transforma l'objecte seleccionat en la vista 3D @@ -10400,13 +10452,13 @@ la còpia actual es perdrà. StdCmdUndo - + &Undo &Desfés - - + + Undo exactly one action Desfés exactament una acció @@ -11206,7 +11258,7 @@ la còpia actual es perdrà. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11217,7 +11269,7 @@ Segur que voleu continuar? - + Object dependencies Dependències de l'objecte @@ -11306,12 +11358,12 @@ Segur que voleu continuar? Std_DuplicateSelection - + Object dependencies Dependències de l'objecte - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Per a enllaçar amb objectes externs, el document s’ha de desar almenys una vegada. @@ -11329,7 +11381,7 @@ Voleu desar el document ara? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11343,17 +11395,17 @@ Encara voleu continuar? Std_Revert - + Revert document Torneu a la versió anterior del document - + This will discard all the changes since last file save. Això descartarà tots els canvis des de l'última acció de desar el fitxer. - + Do you want to continue? Voleu continuar? @@ -12016,23 +12068,15 @@ en iniciar FreeCAD Carrega una imatge - - Gui::InteractiveScale - - - Enter desired distance between the points - Entra la distància desitjada entre els punts - - NaviCubeDraggableCmd - + Movable navigation cube Cub de navegació movible - + Drag and place NaviCube Arrossega i posiciona el NaviCube @@ -12502,77 +12546,72 @@ quan arrenca FreeCAD. Si aquesta opció està marcada, FreeCAD en mostrarà una< Gestioneu els paquets de preferències - + Small (%1px) Petit (%1px) - + Medium (%1px) Mitjà (%1px) - + Large (%1px) Gran (%1px) - + Extra large (%1px) Molt gran (%1px) - + Custom (%1px) Personalitzat (%1px) - + Combo View Visualització combinada - + TreeView and PropertyView Vista d'arbre i vista de les propietats - - Both - Ambdós - - - + Preference Pack Name Nom del paquet de preferències - + Tags Etiquetes - + Apply Aplica - + Apply the %1 preference pack Apliqueu el paquet de preferències %1 - + Choose a FreeCAD config file to import Trieu un fitxer de configuració del FreeCAD per importar - + File exists El fitxer ja existeix - + A preference pack with that name already exists. Overwrite? Ja existeix un paquet de preferències amb el mateix nom. Voleu sobreescriure'l? @@ -12879,4 +12918,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_cs.ts b/src/Gui/Language/FreeCAD_cs.ts index 73811b979d..ee87496ebe 100644 --- a/src/Gui/Language/FreeCAD_cs.ts +++ b/src/Gui/Language/FreeCAD_cs.ts @@ -56,7 +56,7 @@ Position - Pozice + Poloha @@ -122,12 +122,12 @@ Import - + Delete Odstranit - + Paste expressions Vložit výrazy @@ -188,9 +188,9 @@ Umístění + - Transform Transformace @@ -220,7 +220,7 @@ Přepnout možnost výběru - + Edit image Upravit obrázek @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down Zrušit - - Gui::ControlSingleton - - - Task panel - Panel Tvorby - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ současně. Spustí se ten s nejvyšší prioritou. Název makra: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Uživatelská makra - + System macros Systémová makra - + Execute Spustit - + Close Zavřít - + Create Vytvořit - + Delete Odstranit - + Edit Upravit - + Rename Přejmenovat - + Duplicate Duplikovat - + Launch a guide on how to set up a macro in a custom global toolbar. Spustit návod jak spustit makro z globálního panelu nástrojů. - + Toolbar Panel nástrojů - + Open Addon Manager where macros created by the community and other addons can be downloaded. Otevřít Správce rozšíření, kde lze stáhnout makra vytvořená komunitou a další doplňky. - + Download Stáhnout - + User macros location: Umístění uživatelských maker: @@ -1898,72 +1910,72 @@ současně. Spustí se ten s nejvyšší prioritou. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makra - + Read-only Jen pro čtení - + Macro file Makro soubor - + Enter a file name, please: Zadejte název souboru, prosím: - - - + + + Existing file Existující soubor - + '%1'. This file already exists. '%1'. Tento soubor již existuje. - + Cannot create file Nelze vytvořit soubor - + Creation of file '%1' failed. Vytvoření souboru '%1' se nezdařilo. - + Delete macro Odstranit makro - + Do you really want to delete the macro '%1'? Opravdu chcete odstranit makro '%1'? - + Do not show again Znovu nezobrazovat - + Guided Walkthrough Komentovaná prohlídka - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,76 +1986,76 @@ Poznámka: změny budou aplikovány při dalším přepnutí pracovních prostř - + Walkthrough, dialog 1 of 2 Průvodce, dialog 1 ze 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instrukce průvodce: Vyplňte chybějící pole (volitelné) a klikněte na tlačítko Přidat, poté Zavřít - + Walkthrough, dialog 1 of 1 Průvodce, dialog 1 ze 1 - + Walkthrough, dialog 2 of 2 Průvodce, dialog 2 ze 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instrukce průvodce: Klikněte na tlačítko šipky doprava (->), a potom Zavřít. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instrukce průvodce: Klikněte na Nový, potom na pravou šipku (->) a potom Zavřít. - + Renaming Macro File Přejmenovávání souboru makra - - + + Enter new name: Zadejte nový název: - - + + '%1' already exists. "%1" už existuje. - + Rename Failed Přejmenování selhalo - + Failed to rename to '%1'. Perhaps a file permission error? Nepodařilo se přejmenovat na "%1". Chyba oprávnění k souboru? - + Duplicate Macro Duplikovat makro - + Duplicate Failed Duplikace selhala - + Failed to duplicate to '%1'. Perhaps a file permission error? Duplikace selhala na "%1". @@ -2850,7 +2862,7 @@ issues ranging from graphical anomalies to GPU crash bugs. Remember to report this setting as enabled when seeking support on the FreeCAD forums Pokud je vybrána možnost Vertex Buffer Objects (VBO), bude použita. VBO je funkce OpenGL, která poskytuje metody pro nahrávání -vertexových dat (pozice, normálový vektor, barva atd.) do grafické karty. +vertexových dat (poloha, normálový vektor, barva atd.) do grafické karty. VBO nabízí výrazné zvýšení výkonu, protože data se nacházejí v grafické paměti, nikoliv v systémové paměti, a tak je možné, že mohou být vykreslována přímo grafickým procesorem. @@ -2954,7 +2966,7 @@ ale pomalejší odezvu na jakékoli změny scény. Size of vertices in the Sketcher, TechDraw and other workbenches - Velikost vrcholů v Náčrtu, TechDraw a dalších pracovních prostředích + Velikost vrcholů v náčrtu, TechDraw a dalších pracovních prostředích @@ -4104,7 +4116,7 @@ Volný otočný stůl: díl se bude otáčet kolem osy z. Rotations in 3D will use current cursor position as center for rotation - 3D Rotace bude používat aktuální pozici kurzoru jako střed rotace + 3D Rotace bude používat aktuální polohu kurzoru jako střed rotace @@ -4161,7 +4173,7 @@ Hodnota je průměr koule tak, aby se vešla na obrazovku. Zoom operations will be performed at position of mouse pointer - Přiblížení bude provedeno na pozici kurzoru myši + Přiblížení bude provedeno na poloze kurzoru myši @@ -4309,6 +4321,16 @@ místo v konzoli Pythonu Save history Uložit historii + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4422,16 +4444,41 @@ Vyšší hodnota usnadňuje výběr věcí, ale může znemožnit výběr malýc - + Top: Horní: - + Middle: Střední: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4454,7 +4501,7 @@ Vyšší hodnota usnadňuje výběr věcí, ale může znemožnit výběr malýc - + Bottom: Dole: @@ -4484,17 +4531,17 @@ Vyšší hodnota usnadňuje výběr věcí, ale může znemožnit výběr malýc Barva pozadí pro aktivní kontejnery ve stromovém zobrazení - + Central: Centrální: - + Midway: Uprostřed: - + End: Konec: @@ -5222,7 +5269,7 @@ Sloupec "Status" ukazuje zda je možné dokument obnovit. Please select 1, 2, or 3 points before clicking this button. A point may be on a vertex, face, or edge. If on a face or edge the point used will be the point at the mouse position along face or edge. If 1 point is selected it will be used as the center of rotation. If 2 points are selected the midpoint between them will be the center of rotation and a new custom axis will be created, if needed. If 3 points are selected the first point becomes the center of rotation and lies on the vector that is normal to the plane defined by the 3 points. Some distance and angle information is provided in the report view, which can be useful when aligning objects. For your convenience when Shift + click is used the appropriate distance or angle is copied to the clipboard. - Před stisknutím tohoto tlačítka prosím vyberte 1, 2 nebo 3 body. Bod může být na vrcholu, ploše nebo hraně. Je-li na ploše nebo hraně, pak bude použit bod na pozici myši podél plochy nebo hrany. Je-li vybrán 1 bod, pak bude použit jako střed rotace. Jsou-li vybrány 2 body, pak bude střední bod mezi nimi středem rotace a bude vytvořena nová uživatelská osa, je-li potřeba. Jsou-li vybrány 3 body, první bod bude středem rotace a bude podél vektoru, který je normálou roviny dané třemi body. Vzdálenost a úhlová informace jsou v zobrazení reportu, což může být užitečné pro zarovnání objektů. Příslušnou vzdálenost a úhel je možné zkopírovat do schánky kliknutím se Shiftem. + Před stisknutím tohoto tlačítka prosím vyberte 1, 2 nebo 3 body. Bod může být na vrcholu, ploše nebo hraně. Je-li na ploše nebo hraně, pak bude použit bod na poloze myši podél plochy nebo hrany. Je-li vybrán 1 bod, pak bude použit jako střed rotace. Jsou-li vybrány 2 body, pak bude střední bod mezi nimi středem rotace a bude vytvořena nová uživatelská osa, je-li potřeba. Jsou-li vybrány 3 body, první bod bude středem rotace a bude podél vektoru, který je normálou roviny dané třemi body. Vzdálenost a úhlová informace jsou v zobrazení reportu, což může být užitečné pro zarovnání objektů. Příslušnou vzdálenost a úhel je možné zkopírovat do schánky kliknutím se Shiftem. @@ -5472,22 +5519,10 @@ původně vybranými před otevřením tohoto dialogu Gui::DockWnd::ComboView - + Combo View Kombinované zobrazení - - - - Model - Model - - - - - Tasks - Tvorba - Gui::DockWnd::PropertyDockView @@ -5714,66 +5749,66 @@ původně vybranými před otevřením tohoto dialogu Gui::EditorView - + Modified file Změněný soubor - + %1. This has been modified outside of the source editor. Do you want to reload it? %1. byl změněn mimo Editor zdrojového kódu. Chcete se znovu načíst? - + Unsaved document Neuložený dokument - + The document has been modified. Do you want to save your changes? Dokument byl změněn. Chcete uložit provedené změny? - + FreeCAD macro FreeCAD makro - + Export PDF Export PDF - + PDF file PDF soubor - + untitled[*] bez názvu[*] - + - Editor - Editor - + %1 chars removed %1 znaky odstraněny - + %1 chars added %1 znaků z přidané - + Formatted Formátováno @@ -5878,7 +5913,7 @@ Chcete uložit provedené změny? Drag screen with one finger OR press left mouse button. In Sketcher && other edit modes, hold Alt in addition. - Táhněte obrazovku jedním prstem NEBO stiskněté levé tlačítko myši. V Náčrtu a dalších editačních módech držte navíc Alt. + Táhněte obrazovku jedním prstem NEBO stiskněté levé tlačítko myši. V náčrtu a dalších režimech úprav držte navíc Alt. @@ -5924,39 +5959,46 @@ Chcete uložit provedené změny? Graphvizu se nepodařilo vytvořit soubor s obrázkem - + PNG format Formát PNG - + Bitmap format Formát rastrového obrázku - + GIF format Formát GIF - + JPG format Formát JPG - + SVG format SVG formát - - + + PDF format PDF formát - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportovat graf @@ -6117,7 +6159,7 @@ Chcete uložit provedené změny? Gui::MainWindow - + Dimension Rozměr @@ -6127,62 +6169,62 @@ Chcete uložit provedené změny? Připraven - + Help addon needed! Doplněk nápovědy je potřeba! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Systém nápovědy %1 je nyní zpracován doplňkem "Nápověda". Může být snadno nainstalován prostřednictvím Správce rozšíření - + Open Addon Manager Otevřít správce rozšíření - + Close All Zavřít vše - - - + + + Toggles this toolbar Přepíná panel nástrojů - - - + + + Toggles this dockable window Přepíná dokovatelný okna - + WARNING: This is a development version. VAROVÁNÍ: Toto je vývojová verze. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Nepoužívejte prosím ve výrobním prostředí. - - + + Unsaved document Neuložený dokument - + The exported object contains external link. Please save the documentat least once before exporting. Exportovaný objekt obsahuje externí odkaz. Před exportem uložte dokument alespoň jednou. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Pro propojení s externími objekty musí být dokument uložen alespoň jednou. @@ -6331,7 +6373,7 @@ V pravém pohledu jsou %2 body vybrány. Drag screen with one finger OR press ALT + left mouse button. In Sketcher and other edit modes, hold Alt in addition. - Táhněte obrazovku jedním prstem NEBO stiskněte ALT + levé tlačítko myši. V Náčrtu a dalších editačních módech držte navíc Alt. + Táhněte obrazovku jedním prstem NEBO stiskněte ALT + levé tlačítko myši. V náčrtu a dalších režimech úprav držte navíc Alt. @@ -6556,117 +6598,117 @@ V pravém pohledu jsou %2 body vybrány. Gui::PythonConsole - + System exit Ukončení činnosti systému - + The application is still running. Do you want to exit without saving your data? Aplikace je stále spuštěn. Chcete průvodce ukončit bez uložení dat? - - - - + + + + Python console Python konzole - + Unhandled PyCXX exception. Neošetřená výjimka PyCXX. - + Unhandled FreeCAD exception. Neošetřená výjimka FreeCAD. - + Unhandled std C++ exception. Neošetřená výjimka std C++. - + Unhandled unknown C++ exception. Neošetřená neznámá výjimka C++. - + &Copy &Kopírovat - + &Copy command &Příkaz kopírovat - + &Copy history Kopírovat historii - + Save history as... Uložit historii jako... - + Save history Uložit historii - + Saves Python history across %1 sessions Uloží historii Pythonu napříč %1 relacemi - + &Paste &Vložit - + Select All Vybrat vše - + Clear console Vyčistit terminál - + Insert file name... Vložit název souboru... - + Word wrap Zalamování řádků - + Save History Uložit historii - + Macro Files Soubory maker - + Insert file name Vložit název souboru - + All Files Všechny soubory @@ -6751,22 +6793,22 @@ Chcete průvodce ukončit bez uložení dat? Gui::SearchBar - + Previous Předchozí - + Next Další - + Case sensitive Rozlišovat velikost písmen - + Whole words Celá slova @@ -6873,23 +6915,23 @@ Do you want to specify another directory? Position - Position + Poloha Gui::TaskCSysDragger - + Increments Přírůstek - + Translation Increment: Krok posunutí: - + Rotation Increment: Krok otočení: @@ -7714,37 +7756,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Stromové zobrazení - + + Tasks + Tvorba + + + Property view Vlastnosti zobrazení - + Selection view Výběr zobrazení - - Combo View - Kombinované zobrazení + + Model + Model - + DAG View DAG zobrazení - + Report view Zobrazení reportu - + Python console Python konzole @@ -7820,12 +7867,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Tento systém běží na OpenGL %1.%2. FreeCAD vyžaduje OpenGL 2.0 nebo vyšší. Aktualizujte prosím své grafické ovladače a/nebo kartu podle potřeby. - + Invalid OpenGL Version Neplatná verze OpenGL @@ -7866,71 +7913,71 @@ Do you want to specify another directory? Exportovat soubor - + Printing... Tisk... - + Exporting PDF... Exportovat PDF... - - + + Unsaved document Neuložený dokument - + The exported object contains external link. Please save the documentat least once before exporting. Exportovaný objekt obsahuje externí odkaz. Před exportem uložte dokument alespoň jednou. - - + + Delete failed Smazání se nezdařilo - + Dependency error Chyba závislosti - + Copy selected Kopírovat výběr - + Copy active document Kopírovat aktivní dokument - + Copy all documents Kopírovat všechny dokumenty - + Paste Vložit - + Expression error Chyba výrazu - + Failed to parse some of the expressions. Please check the Report View for more details. Některé výrazy se nepodařilo analyzovat. Další podrobnosti najdete v zobrazení Přehledu. - + Failed to paste expressions Nepodařilo se vložit výrazy @@ -8346,7 +8393,7 @@ Zvolte 'Ne' pro vrácení pouze v aktivním dokumentu. Zvolte 'Přerušit' pro zrušení - + Save Macro Uložit makro @@ -8415,7 +8462,7 @@ Prosím, otevřete okno prohlížeče a zadejte: http://localhost:%1.Nelze otevřít systémový prohlížeč. - + Options... Možnosti... @@ -8462,42 +8509,42 @@ Prosím, otevřete okno prohlížeče a zadejte: http://localhost:%1.Chcete zavřít tento dialog? - + Do you want to save your changes to document '%1' before closing? Přejete si uložit změny v dokumentu "%1" před zavřením? - + Do you want to save your changes to document before closing? Přejete si uložit změny před zavřením dokumentu? - + If you don't save, your changes will be lost. V případě neuložení dokumentu budou změny ztraceny. - + Apply answer to all Použít odpověď na všechny - + %1 Document(s) not saved %1 dokument(y) nebyl(y) uložen(y) - + Some documents could not be saved. Do you want to cancel closing? Některé dokumenty nelze uložit. Chcete zrušit uzavření? - + Delete macro Odstranit makro - + Not allowed to delete system-wide macros Není povoleno mazat systémová makra @@ -8517,12 +8564,17 @@ Prosím, otevřete okno prohlížeče a zadejte: http://localhost:%1.%1 není prázdný, odstranit jeho obsah také? - + Translation: Překlad: - + + Translation XY: + Translation XY: + + + Rotation: Rotace: @@ -8732,7 +8784,7 @@ na aktuální kopii budou ztraceny. Změnit obrázek... - + Color Gradient Barevný přechod @@ -8838,13 +8890,13 @@ na aktuální kopii budou ztraceny. StdCmdAlignment - + Alignment... Zarovnání... - - + + Align the selected objects Zarovnat vybrané objekty @@ -8922,13 +8974,13 @@ na aktuální kopii budou ztraceny. StdCmdCopy - + C&opy Kopírovat - - + + Copy operation Operace kopírování @@ -8936,13 +8988,13 @@ na aktuální kopii budou ztraceny. StdCmdCut - + &Cut Vyjmout - - + + Cut out Vystřihnout @@ -8950,13 +9002,13 @@ na aktuální kopii budou ztraceny. StdCmdDelete - + &Delete &Odstranit - - + + Deletes the selected objects Odstraní vybrané objekty @@ -9104,13 +9156,13 @@ na aktuální kopii budou ztraceny. StdCmdDuplicateSelection - + Duplicate selection Duplikovat výběr - - + + Put duplicates of the selected objects to the active document Vložit vybrané duplikáty objektů do aktivního dokumentu @@ -9118,17 +9170,17 @@ na aktuální kopii budou ztraceny. StdCmdEdit - + Toggle &Edit mode Přepnout režim úprav - + Toggles the selected object's edit mode Přepíná režim úprav vybraného objektu - + Activates or Deactivates the selected object's edit mode Aktivuje nebo deaktivuje režim úprav vybraného objektu @@ -9160,13 +9212,13 @@ na aktuální kopii budou ztraceny. StdCmdExpression - + Expression actions Akce výrazu - - + + Actions that apply to expressions Akce, které se vztahují na výrazy @@ -9291,7 +9343,7 @@ na aktuální kopii budou ztraceny. Freezes the current view position - Zmrazí aktuální pozici zobrazení + Zmrazí aktuální polohu zobrazení @@ -9658,19 +9710,19 @@ na aktuální kopii budou ztraceny. StdCmdNew - + &New Nový - - + + Create a new empty document Vytvořit nový prázdný dokument - + Unnamed Nepojmenovaný @@ -9753,13 +9805,13 @@ na aktuální kopii budou ztraceny. StdCmdPaste - + &Paste &Vložit - - + + Paste operation Operace vložení @@ -9767,13 +9819,13 @@ na aktuální kopii budou ztraceny. StdCmdPlacement - + Placement... Umístění... - - + + Place the selected objects Umístit vybrané objekty @@ -9781,13 +9833,13 @@ na aktuální kopii budou ztraceny. StdCmdPrint - + &Print... Tisk... - - + + Print the document Tisk dokumentu @@ -9795,13 +9847,13 @@ na aktuální kopii budou ztraceny. StdCmdPrintPdf - + &Export PDF... Export do PDF... - - + + Export the document as PDF Exportovat dokument jako PDF @@ -9809,17 +9861,17 @@ na aktuální kopii budou ztraceny. StdCmdPrintPreview - + &Print preview... &Náhled tisku... - + Print the document Tisk dokumentu - + Print preview Náhled tisku @@ -9827,13 +9879,13 @@ na aktuální kopii budou ztraceny. StdCmdProjectInfo - + Project i&nformation... Informace o projektu... - - + + Show details of the currently active project Zobrazit podrobnosti o aktivním projektu @@ -9841,13 +9893,13 @@ na aktuální kopii budou ztraceny. StdCmdProjectUtil - + Project utility... Nástroje projektu... - - + + Utility to extract or create project files Nástroje na rozbalení a nebo vytvoření souborů projetu @@ -9869,13 +9921,13 @@ na aktuální kopii budou ztraceny. StdCmdQuit - + E&xit Konec - - + + Quits the application Ukončí aplikaci @@ -9925,13 +9977,13 @@ na aktuální kopii budou ztraceny. StdCmdRedo - + &Redo Znovu - - + + Redoes a previously undone action Znovu provést předchozí vrácenou akci @@ -9939,13 +9991,13 @@ na aktuální kopii budou ztraceny. StdCmdRefresh - + &Refresh Aktualizovat - - + + Recomputes the current active document Přepočítat aktivní dokument @@ -9967,13 +10019,13 @@ na aktuální kopii budou ztraceny. StdCmdRevert - + Revert Vrátit - - + + Reverts to the saved version of this file Vrátit se k uložené verzi tohoto souboru @@ -9981,13 +10033,13 @@ na aktuální kopii budou ztraceny. StdCmdSave - + &Save Uložit - - + + Save the active document Uloží aktivní dokument @@ -9995,13 +10047,13 @@ na aktuální kopii budou ztraceny. StdCmdSaveAll - + Save All Uložit vše - - + + Save all opened document Uložit všechny otevřené dokumenty @@ -10009,13 +10061,13 @@ na aktuální kopii budou ztraceny. StdCmdSaveAs - + Save &As... Uložit jako... - - + + Save the active document under a new file name Uložit aktivní dokument pod novým názvem @@ -10023,13 +10075,13 @@ na aktuální kopii budou ztraceny. StdCmdSaveCopy - + Save a &Copy... Ulož kopii... - - + + Save a copy of the active document under a new file name Uložit kopii aktivního dokumento pod novým názvem @@ -10093,13 +10145,13 @@ na aktuální kopii budou ztraceny. StdCmdSelectAll - + Select &All Vybrat vše - - + + Select all Vybrat vše @@ -10241,7 +10293,7 @@ na aktuální kopii budou ztraceny. Add or remove a breakpoint at this position - Přidat nebo odebrat zarážku na této pozici + Přidat nebo odebrat zarážku na této poloze @@ -10331,13 +10383,13 @@ na aktuální kopii budou ztraceny. StdCmdTransform - + Transform... Transformace... - - + + Transform the geometry of selected objects Transformace geometrie vybraných objektů @@ -10345,13 +10397,13 @@ na aktuální kopii budou ztraceny. StdCmdTransformManip - + Transform Transformace - - + + Transform the selected object in the 3d view Transformovat na vybraný objekt v 3d zobrazení @@ -10415,13 +10467,13 @@ na aktuální kopii budou ztraceny. StdCmdUndo - + &Undo &Zpět - - + + Undo exactly one action Vrátit zpět jednu akci @@ -10633,7 +10685,7 @@ na aktuální kopii budou ztraceny. Issue the camera position to the console and to a macro, to easily recall this position - Výchozí nastavení pozice kamery v konzole a v makru pro jednoduší vyvolání této pozice + Výchozí nastavení polohy kamery v konzole a v makru pro jednoduší vyvolání této polohy @@ -11221,7 +11273,7 @@ na aktuální kopii budou ztraceny. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11232,7 +11284,7 @@ Opravdu chcete pokračovat? - + Object dependencies Závislosti objektu @@ -11321,12 +11373,12 @@ Opravdu chcete pokračovat? Std_DuplicateSelection - + Object dependencies Závislosti objektu - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Pro propojení s externími objekty musí být dokument uložen alespoň jednou. @@ -11344,7 +11396,7 @@ Chcete dokument nyní uložit? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11358,17 +11410,17 @@ Chcete pokračovat? Std_Revert - + Revert document Obnovit dokument - + This will discard all the changes since last file save. Toto vymaže všechny změny před posledním uložením souboru. - + Do you want to continue? Chcete pokračovat? @@ -11708,7 +11760,7 @@ V současné době má váš systém následující pracovní plochy:</p>& Start up workbench: - Spustit pracovní úroveň: + Pracovní prostředí při spuštění: @@ -11720,7 +11772,7 @@ po spuštění FreeCADu Workbench selector position : - Poloha voliče pracovního prostředí : + Poloha voliče pracovního prostředí: @@ -11799,17 +11851,17 @@ po spuštění FreeCADu XY-Plane - XY-Plane + Rovina XY XZ-Plane - XZ-Plane + Rovina XZ YZ-Plane - YZ-Plane + Rovina YZ @@ -11819,7 +11871,7 @@ po spuštění FreeCADu Offset: - Offset: + Odsazení: @@ -12031,23 +12083,15 @@ po spuštění FreeCADu Načte obrázek - - Gui::InteractiveScale - - - Enter desired distance between the points - Zadejte požadovanou vzdálenost mezi body - - NaviCubeDraggableCmd - + Movable navigation cube Pohyblivá navigační krychle - + Drag and place NaviCube Přetáhnout a umístit NaviCube @@ -12522,77 +12566,72 @@ FreeCAD toto okno zobrazí Spravovat balíčky předvoleb - + Small (%1px) Malé (%1px) - + Medium (%1px) Střední (%1px) - + Large (%1px) Velké (%1px) - + Extra large (%1px) Velmi velké (%1px) - + Custom (%1px) Vlastní (%1px) - + Combo View Kombinované zobrazení - + TreeView and PropertyView TreeView a PropertyView - - Both - Obě - - - + Preference Pack Name Název balíčku předvoleb - + Tags Štítky - + Apply Použít - + Apply the %1 preference pack Použít balíček předvoleb %1 - + Choose a FreeCAD config file to import Vyberte konfigurační soubor FreeCAD pro import - + File exists Soubor existuje - + A preference pack with that name already exists. Overwrite? Balíček předvoleb s tímto názvem již existuje. Přepsat? @@ -12900,4 +12939,18 @@ Nyní můžete použít Motiv k úplnému přizpůsobení rozhraní.Všechny filtry výběru vymazány + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_de.ts b/src/Gui/Language/FreeCAD_de.ts index 1d1b94b65b..eccd6b1c0c 100644 --- a/src/Gui/Language/FreeCAD_de.ts +++ b/src/Gui/Language/FreeCAD_de.ts @@ -122,12 +122,12 @@ Importieren - + Delete Löschen - + Paste expressions Ausdrücke einfügen @@ -188,9 +188,9 @@ Positionierung + - Transform Transformieren @@ -220,7 +220,7 @@ Selektierbarkeit an/aus - + Edit image Bild bearbeiten @@ -615,14 +615,6 @@ while doing a left or right click and move the mouse up or down A&bbrechen - - Gui::ControlSingleton - - - Task panel - Taskleiste - - Gui::DAG::Model @@ -1824,72 +1816,92 @@ same time. The one with the highest priority will be triggered. Makroname: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Benutzermakros - + System macros Systemmakros - + Execute Ausführen - + Close Schließen - + Create Erstellen - + Delete Löschen - + Edit Bearbeiten - + Rename Umbenennen - + Duplicate Kopieren - + Launch a guide on how to set up a macro in a custom global toolbar. Starten Sie eine Anleitung, wie Sie ein Makro in einer benutzerdefinierten globalen Symbolleiste einrichten können. - + Toolbar Symbolleiste - + Open Addon Manager where macros created by the community and other addons can be downloaded. Öffnen Sie den Erweiterungsmanager, in dem von der Community erstellte Makros und andere Erweiterungen heruntergeladen werden können. - + Download Herunterladen - + User macros location: Speicherort der Benutzermakros: @@ -1897,72 +1909,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makros - + Read-only Nur Lesezugriff - + Macro file Makro-Datei - + Enter a file name, please: Geben Sie bitte einen Dateinamen an: - - - + + + Existing file Vorhandene Datei - + '%1'. This file already exists. '%1'.\n Diese Datei ist bereits vorhanden. - + Cannot create file Datei kann nicht erstellt werden - + Creation of file '%1' failed. Erstellen der Datei %1' fehlgeschlagen. - + Delete macro Makro löschen - + Do you really want to delete the macro '%1'? Möchten Sie das Makro '%1' wirklich löschen? - + Do not show again Nicht noch einmal anzeigen - + Guided Walkthrough Programm-Einführung - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,77 +1985,77 @@ Hinweis: Ihre Änderungen werden beim nächsten Wechsel im Arbeitsbereich wirksa - + Walkthrough, dialog 1 of 2 Lösungsansatz, Dialog 1 von 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Lösung: Füllen Sie fehlende Felder aus (optional) und klicken Sie auf Hinzufügen, dann schließen - + Walkthrough, dialog 1 of 1 Lösungsansatz, Dialog 1 von 1 - + Walkthrough, dialog 2 of 2 Lösungsansatz, Dialog 2 von 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Lösungsansatz: Klicken Sie auf den rechten Pfeil (->), dann Schließen. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Lösungsansatz: Klicken Sie auf Neu, dann rechten Pfeil (->), dann Schließen. - + Renaming Macro File Makrodatei umbenennen - - + + Enter new name: Neuen Namen eingeben: - - + + '%1' already exists. '%1' ist bereits vorhanden. - + Rename Failed Umbenennen fehlgeschlagen - + Failed to rename to '%1'. Perhaps a file permission error? Umbenennen nach '%1' fehlgeschlagen. Möglicherweise ein Dateizugriffsfehler? - + Duplicate Macro Makro kopieren - + Duplicate Failed Kopieren fehlgeschlagen - + Failed to duplicate to '%1'. Perhaps a file permission error? Fehler beim Kopieren nach '%1'. Vielleicht liegt ein Dateiberechtigungsfehler vor? @@ -2345,7 +2357,7 @@ Wählen Sie bitte ein anderes Verzeichnis aus. Search Group - Nach Gruppen suchen + Gruppe suchen @@ -4288,7 +4300,7 @@ wenn sie die verfügbare Zeilenlänge überschreiten The cursor shape will be a block - Die Form des Eingabezeigers wird ein Block sein + Der Eingabezeiger wird als gefülltes Rechteck angezeigt @@ -4305,6 +4317,16 @@ wenn sie die verfügbare Zeilenlänge überschreiten Save history Verlauf speichern + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4359,12 +4381,12 @@ Größere Werte erleichtern das Selektieren von Dingen, können aber die Auswahl Preselect the object in 3D view when mouse over the tree item - Vorauswählen des Objekts in 3D -ansicht, wenn die Maus über das Baumelement fährt + Vorauswählen des Objekts in der 3D -Ansicht, wenn die Maus über das Baumelement fährt Record selection in tree view in order to go back/forward using navigation button - Auswahl in der Baumansicht aufzeichnen, um mit der Navigationstaste zurück/vor zu gehen + Auswahl in der Baumansicht aufzeichnen, um mit einer Navigationstaste zurück- bzw. vorwärtszugehen @@ -4418,16 +4440,41 @@ Größere Werte erleichtern das Selektieren von Dingen, können aber die Auswahl - + Top: Oben: - + Middle: Mitte: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4450,7 +4497,7 @@ Größere Werte erleichtern das Selektieren von Dingen, können aber die Auswahl - + Bottom: Unten: @@ -4480,17 +4527,17 @@ Größere Werte erleichtern das Selektieren von Dingen, können aber die Auswahl Hintergrundfarbe für aktive Container in der Baumansicht - + Central: Farbe in der Mitte: - + Midway: Farbe in der Mitte: - + End: Ende: @@ -5376,7 +5423,7 @@ The 'Status' column shows whether the document could be recovered. Transform - Transformierung + Transformieren @@ -5467,22 +5514,10 @@ dieses Dialogs ausgewählt wurden Gui::DockWnd::ComboView - + Combo View Combo-Ansicht - - - - Model - Modell - - - - - Tasks - Aufgaben - Gui::DockWnd::PropertyDockView @@ -5709,12 +5744,12 @@ dieses Dialogs ausgewählt wurden Gui::EditorView - + Modified file Geänderte Datei - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5723,54 +5758,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Nicht gespeichertes Dokument - + The document has been modified. Do you want to save your changes? Das Dokument wurde geändert. Sollen die Änderungen gespeichert werden? - + FreeCAD macro FreeCAD Makro - + Export PDF PDF exportieren - + PDF file PDF-Datei - + untitled[*] Unbenannt[*] - + - Editor - Editor - + %1 chars removed %1 Zeichen gelöscht - + %1 chars added %1 Zeichen hinzugefügt - + Formatted Formatiert @@ -5921,39 +5956,46 @@ Sollen die Änderungen gespeichert werden? Graphviz konnte keine Bild-Datei erstellen - + PNG format PNG-Format - + Bitmap format Bitmap-Format - + GIF format GIF-Format - + JPG format JPG-Format - + SVG format SVG-Format - - + + PDF format PDF-Format - - + + + Graphviz format + Graphviz format + + + + + Export graph Graphik exportieren @@ -6114,7 +6156,7 @@ Sollen die Änderungen gespeichert werden? Gui::MainWindow - + Dimension Abmessung @@ -6124,62 +6166,62 @@ Sollen die Änderungen gespeichert werden? Bereit - + Help addon needed! Hilfe-Erweiterung benötigt! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Das Hilfesystem von %1 wird nun durch die Erweiterung "Hilfe" verwaltet. Es kann einfach über den Erweiterungsmanager installiert werden - + Open Addon Manager Erweiterungsmanager öffnen - + Close All Alles schließen - - - + + + Toggles this toolbar Symbolleiste ein-/ausschalten - - - + + + Toggles this dockable window Andockbares Fenster ein-/ausschalten - + WARNING: This is a development version. ACHTUNG: Dies ist eine Entwicklungsversion. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Bitte nicht in einer Produktionsumgebung verwenden. - - + + Unsaved document Nicht gespeichertes Dokument - + The exported object contains external link. Please save the documentat least once before exporting. - Das exportierte Objekt enthält einen externen Link. Bitte speichern Sie das Dokument mindestens einmal vor dem Exportieren. + Das exportierte Objekt enthält einen externen Link. Das Dokument sollte vor dem Exportieren mindestens einmal gespeichert werden. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Um zu externen Objekten zu verlinken, muss das Dokument mindestens einmal gespeichert werden. @@ -6315,7 +6357,7 @@ How do you want to proceed? Tap OR click left mouse button. - Tippen Sie auf den Bildschirm, oder klicken sie mit der linken Maustaste. + Auf Bildschirm/Touchpad tippen, oder mit der linken Maustaste klicken. @@ -6551,117 +6593,117 @@ ODER ALT-Taste + rechte Maustaste drücken ODER Bild auf/Bild ab auf der Tastatu Gui::PythonConsole - + System exit System beenden - + The application is still running. Do you want to exit without saving your data? Die Anwendung läuft immer noch. Wollen Sie sie beenden, ohne Ihre Daten zu speichern? - - - - + + + + Python console Python-Konsole - + Unhandled PyCXX exception. Unbehandelte PyCXX-Ausnahme. - + Unhandled FreeCAD exception. Unbehandelte FreeCAD-Ausnahme. - + Unhandled std C++ exception. Unbehandelte std C++-Ausnahme. - + Unhandled unknown C++ exception. Unbehandelte C++-Ausnahme. - + &Copy &Kopieren - + &Copy command &Befehle kopieren - + &Copy history &Verlauf kopieren - + Save history as... Verlauf speichern unter... - + Save history Verlauf speichern - + Saves Python history across %1 sessions Speichert Python-Verlauf über %1 Sitzungen - + &Paste Ein&fügen - + Select All Alles auswählen - + Clear console Konsole leeren - + Insert file name... Dateinamen einfügen... - + Word wrap Zeilenumbruch - + Save History Verlauf speichern - + Macro Files Makro-Dateien - + Insert file name Dateinamen einfügen - + All Files Alle Dateien @@ -6746,22 +6788,22 @@ Wollen Sie sie beenden, ohne Ihre Daten zu speichern? Gui::SearchBar - + Previous Vorherige - + Next Weiter - + Case sensitive Groß-/Kleinschreibung - + Whole words Ganze Wörter @@ -6878,17 +6920,17 @@ Möchten Sie ein anderes Verzeichnis angeben? Gui::TaskCSysDragger - + Increments Schrittweiten - + Translation Increment: Bewegungsschrittweite: - + Rotation Increment: Drehungsschrittweite: @@ -7484,7 +7526,7 @@ Möchten Sie ein anderes Verzeichnis angeben? Mark this object to be recomputed - Markiere dieses Objekt um es neu zu berechnen + Markiert dieses Objekt, um es neu zu berechnen @@ -7713,37 +7755,42 @@ Möchten Sie ein anderes Verzeichnis angeben? QDockWidget - + Tree view Baumansicht - + + Tasks + Aufgaben + + + Property view Eigenschaften - + Selection view Auswahlansicht - - Combo View - Combo-Ansicht + + Model + Modell - + DAG View DAG-Ansicht - + Report view Ausgabefenster - + Python console Python-Konsole @@ -7819,12 +7866,12 @@ Möchten Sie ein anderes Verzeichnis angeben? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7865,71 +7912,71 @@ Möchten Sie ein anderes Verzeichnis angeben? Exportiere Datei - + Printing... Drucken... - + Exporting PDF... Exportiert als PDF... - - + + Unsaved document Nicht gespeichertes Dokument - + The exported object contains external link. Please save the documentat least once before exporting. - Das exportierte Objekt enthält einen externen Link. Bitte speichern Sie das Dokument mindestens einmal vor dem Exportieren. + Das exportierte Objekt enthält einen externen Link. Das Dokument sollte vor dem Exportieren mindestens einmal gespeichert werden. - - + + Delete failed Löschen fehlgeschlagen - + Dependency error Abhängigkeitsfehler - + Copy selected Ausgewählte kopieren - + Copy active document Aktives Dokument kopieren - + Copy all documents Alle Dokumente kopieren - + Paste Einfügen - + Expression error Ausdrucksfehler - + Failed to parse some of the expressions. Please check the Report View for more details. Fehler beim Analysieren einiger Ausdrücke. Weitere Einzelheiten finden sich im Ausgabefenster. - + Failed to paste expressions Das Einfügen von Ausdrücken ist fehlgeschlagen @@ -8346,7 +8393,7 @@ Wählen Sie 'Nein' um nur im aktiven Dokument rückgängig zu machen. Wählen Sie 'Abbrechen' um abzubrechen - + Save Macro Makro speichern @@ -8415,7 +8462,7 @@ Bitte starten Sie einen Browser und geben darin ein: http://localhost:%1.Kann Systembrowser nicht starten. - + Options... Einstellungen... @@ -8462,42 +8509,42 @@ Bitte starten Sie einen Browser und geben darin ein: http://localhost:%1.Möchten Sie diesen Dialog zu schließen? - + Do you want to save your changes to document '%1' before closing? Möchten Sie Ihre Änderungen an dem Dokument '%1' vor dem Schließen speichern? - + Do you want to save your changes to document before closing? Möchten Sie Ihre Änderungen am Dokument vor dem Schließen speichern? - + If you don't save, your changes will be lost. - Wenn Sie nicht speichern, gehen Ihre Änderungen verloren. + Ohne Speichern gehen die Änderungen verloren. - + Apply answer to all Antwort auf alle anwenden - + %1 Document(s) not saved %1 Dokument(e) nicht gespeichert - + Some documents could not be saved. Do you want to cancel closing? Einige Dokumente konnten nicht gespeichert werden. Möchtest du das Schließen abbrechen? - + Delete macro Makro löschen - + Not allowed to delete system-wide macros Keine Erlaubnis, die systemweiten Makros zu löschen @@ -8517,12 +8564,17 @@ Bitte starten Sie einen Browser und geben darin ein: http://localhost:%1.Der %1 ist nicht leer, auch seinen Inhalt löschen? - + Translation: Verschiebung: - + + Translation XY: + Translation XY: + + + Rotation: Drehung: @@ -8729,7 +8781,7 @@ the current copy will be lost. Bild ändern... - + Color Gradient Farbverlauf @@ -8835,13 +8887,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Ausrichtung... - - + + Align the selected objects Die ausgewählten Objekte ausrichten @@ -8919,13 +8971,13 @@ the current copy will be lost. StdCmdCopy - + C&opy &Kopieren - - + + Copy operation Kopieren @@ -8933,13 +8985,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Ausschneiden - - + + Cut out Ausschneiden @@ -8947,13 +8999,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Löschen - - + + Deletes the selected objects Löscht die ausgewählten Objekte @@ -9101,13 +9153,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Auswahl duplizieren - - + + Put duplicates of the selected objects to the active document Duplikate der selektierten Objekte in aktives Dokument einfügen @@ -9115,17 +9167,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Bearbeitungsmodus umschalten - + Toggles the selected object's edit mode Schaltet den Bearbeitungsmodus des ausgewählten Objekts um - + Activates or Deactivates the selected object's edit mode Aktiviert oder deaktiviert den Bearbeiten-Modus des ausgewählten Objekts @@ -9157,13 +9209,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Ausdruck-Aktionen - - + + Actions that apply to expressions Aktionen, die auf Ausdrücke angewendet werden @@ -9655,19 +9707,19 @@ the current copy will be lost. StdCmdNew - + &New &Neu - - + + Create a new empty document Neues Dokument erstellen - + Unnamed Unbenannt @@ -9750,13 +9802,13 @@ the current copy will be lost. StdCmdPaste - + &Paste Ein&fügen - - + + Paste operation Einfügen @@ -9764,13 +9816,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Positionierung... - - + + Place the selected objects Platziere die ausgewählten Objekte @@ -9778,13 +9830,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Drucken... - - + + Print the document Dokument drucken @@ -9792,13 +9844,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... PDF &exportieren... - - + + Export the document as PDF Das Dokument als PDF exportieren @@ -9806,17 +9858,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Druckvorschau... - + Print the document Dokument drucken - + Print preview Druckvorschau @@ -9824,13 +9876,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Projekti&nformationen... - - + + Show details of the currently active project Details des momentan aktiven Projekts anzeigen @@ -9838,13 +9890,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Projekt-Hilfsprogramm... - - + + Utility to extract or create project files Hilfsprogramm zum Entpacken oder Erstellen von Projektdateien @@ -9866,13 +9918,13 @@ the current copy will be lost. StdCmdQuit - + E&xit B&eenden - - + + Quits the application Anwendung beenden @@ -9922,13 +9974,13 @@ the current copy will be lost. StdCmdRedo - + &Redo Wieder&herstellen - - + + Redoes a previously undone action Zuletzt rückgängig gemachte Aktion wiederherstellen @@ -9936,13 +9988,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh A&ktualisieren - - + + Recomputes the current active document Das momentan aktive Dokument aktualisieren @@ -9964,13 +10016,13 @@ the current copy will be lost. StdCmdRevert - + Revert Änderungen widerrufen - - + + Reverts to the saved version of this file Zurücksetzen auf die zuletzt gespeicherte Version dieser Datei @@ -9978,13 +10030,13 @@ the current copy will be lost. StdCmdSave - + &Save &Speichern - - + + Save the active document Aktives Dokument speichern @@ -9992,13 +10044,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Alles speichern - - + + Save all opened document Alle geöffneten Dokumente speichern @@ -10006,13 +10058,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Speichern &unter... - - + + Save the active document under a new file name Aktives Dokument unter anderem Namen speichern @@ -10020,13 +10072,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Spei&chern einer Kopie... - - + + Save a copy of the active document under a new file name Speichern Sie eine Kopie des aktiven Dokuments unter einem neuen Dateinamen @@ -10090,13 +10142,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All &Alles auswählen - - + + Select all Alles auswählen @@ -10328,13 +10380,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Transformieren... - - + + Transform the geometry of selected objects Geometrie ausgewählter Objekte transformieren @@ -10342,13 +10394,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform - Transformieren + Transformierung - - + + Transform the selected object in the 3d view Ausgewähltes Objekt in der 3D-Ansicht transformieren @@ -10412,13 +10464,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Rückgängig - - + + Undo exactly one action Letzte Aktion rückgängig machen @@ -11020,7 +11072,7 @@ the current copy will be lost. Preselect the object in 3D view when mouse over the tree item - Vorauswählen des Objekts in 3D -ansicht, wenn die Maus über das Baumelement fährt + Zeigt das Objekt in der 3D -Ansicht als vorausgewählt an, wenn der Mauszeiger über das Baumelement fährt @@ -11033,7 +11085,7 @@ the current copy will be lost. Record selection in tree view in order to go back/forward using navigation button - Auswahl in der Baumansicht aufzeichnen, um mit der Navigationstaste zurück/vor zu gehen + Zeichnet die Auswahl in der Baumansicht auf, um mit einer Navigationstaste zurück- bzw. vorwärtsgehen zu können @@ -11218,7 +11270,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11229,7 +11281,7 @@ Sind Sie sicher, dass Sie fortfahren möchten? - + Object dependencies Objektabhängigkeiten @@ -11318,12 +11370,12 @@ Sind Sie sicher, dass Sie fortfahren möchten? Std_DuplicateSelection - + Object dependencies Objektabhängigkeiten - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Um zu externen Objekten zu verlinken, muss das Dokument mindestens einmal gespeichert werden. @@ -11341,7 +11393,7 @@ Möchten Sie das Dokument jetzt speichern? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11355,17 +11407,17 @@ Trotzdem fortfahren? Std_Revert - + Revert document Änderung am Dokument zurücknehmen - + This will discard all the changes since last file save. Dies wird alle Änderungen seit dem letzten Speichern der Datei verwerfen. - + Do you want to continue? Fortfahren? @@ -11810,7 +11862,7 @@ after FreeCAD launches Reverse direction - Umgekehrte Richtung + Richtung umkehren @@ -12027,23 +12079,15 @@ after FreeCAD launches Lädt ein Bild - - Gui::InteractiveScale - - - Enter desired distance between the points - Gewünschten Abstand zwischen den Punkten eingeben - - NaviCubeDraggableCmd - + Movable navigation cube Beweglicher Navigationswürfel - + Drag and place NaviCube Navigationswürfel ziehen und platzieren @@ -12115,7 +12159,7 @@ after FreeCAD launches The cursor shape will be a block - Die Form des Eingabezeigers wird ein Block sein + Der Eingabezeiger wird als gefülltes Rechteck angezeigt @@ -12516,77 +12560,72 @@ display the splash screen Verwaltung von Einstellungspaketen - + Small (%1px) Klein (%1px) - + Medium (%1px) Mittel (%1px) - + Large (%1px) Groß (%1px) - + Extra large (%1px) Extra groß (%1px) - + Custom (%1px) Benutzerdefiniert (%1px) - + Combo View Combo-Ansicht - + TreeView and PropertyView Baumansicht und Eigenschafteneditor - - Both - Beide - - - + Preference Pack Name Einstellunspaketname - + Tags Tags - + Apply Übernehmen - + Apply the %1 preference pack Anwenden des %1-Einstellungspakets - + Choose a FreeCAD config file to import Wähle eine FreeCAD-Konfigurationsdatei zum Import aus - + File exists Datei bereits vorhanden - + A preference pack with that name already exists. Overwrite? Ein Einstellungspaket mit diesem Namen existiert bereits. Möchten Sie es überschreiben? @@ -12894,4 +12933,18 @@ You can now use Theme to get a full customization of the interface.Alle Auswahlfilter gelöscht + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_el.ts b/src/Gui/Language/FreeCAD_el.ts index 880d2ae174..15defd4704 100644 --- a/src/Gui/Language/FreeCAD_el.ts +++ b/src/Gui/Language/FreeCAD_el.ts @@ -122,12 +122,12 @@ Εισάγετε - + Delete Διαγραφή - + Paste expressions Επικόλληση εκφράσεων @@ -188,9 +188,9 @@ Τοποθέτηση + - Transform Μετατόπιση @@ -220,7 +220,7 @@ Εναλλαγή επιλεξιμότητας - + Edit image Επεξεργασία εικόνας @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down Ακύρωση - - Gui::ControlSingleton - - - Task panel - Πίνακας εργασιών - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. Όνομα μακροεντολής: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Μακροεντολές χρήστη - + System macros Μακροεντολές συστήματος - + Execute Εκτέλεση - + Close Κλείσιμο - + Create Δημιουργήστε - + Delete Διαγραφή - + Edit Επεξεργασία - + Rename Μετονομασία - + Duplicate Duplicate - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Toolbar - + Open Addon Manager where macros created by the community and other addons can be downloaded. Άνοιγμα του Διαχειριστή πρόσθετων όπου μπορείτε να κατεβάσετε μακροεντολές που δημιουργούνται από την κοινότητα και άλλα πρόσθετα. - + Download Λήψη - + User macros location: Τοποθεσία μακροεντολών χρήστη: @@ -1898,72 +1910,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Μακροεντολές - + Read-only Μόνο για ανάγνωση - + Macro file Αρχείο μακροεντολής - + Enter a file name, please: Εισάγετε ένα όνομα αρχείου, παρακαλώ: - - - + + + Existing file Υπάρχον αρχείο - + '%1'. This file already exists. '%1'. Αυτό το αρχείο υπάρχει ήδη. - + Cannot create file Αδύνατη η δημιουργία αρχείου - + Creation of file '%1' failed. Η δημιουργία του αρχείου '% 1' απέτυχε. - + Delete macro Διαγραφή μακροεντολής - + Do you really want to delete the macro '%1'? Θέλετε πραγματικά να διαγράψετε την μακροεντολή '%1'; - + Do not show again Να μην εμφανιστεί ξανά - + Guided Walkthrough Καθοδήγηση - Περιήγηση - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Περιγράφει, διαλόγου 1 από 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Οδηγίες περιγραφή: Συμπληρώστε τα πεδία που λείπουν (προαιρετικά) και μετά κάντε κλικ στην επιλογή Προσθήκη, έπειτα Κλείσιμο - + Walkthrough, dialog 1 of 1 Περιήγηση, διαλόγου 1 από 1 - + Walkthrough, dialog 2 of 2 Περιήγηση, διαλόγου 2 από 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Οδηγίες περιήγησης: Κάντε κλικ στο κουμπί με το δεξί βέλος (->) και, στη συνέχεια, στο Κλείσιμο. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Οδηγίες περιήγησης: Κάντε κλικ στο Νέο, στη συνέχεια στο κουμπί με το δεξί βέλος (->) και στη συνέχεια στο Κλείσιμο. - + Renaming Macro File Πραγματοποιείται μετονομασία του Αρχείου Μακροεντολής - - + + Enter new name: Εισάγετε νέο όνομα: - - + + '%1' already exists. Το '%1' υπάρχει ήδη. - + Rename Failed Η Μετονομασία Απέτυχε - + Failed to rename to '%1'. Perhaps a file permission error? Αποτυχία μετονομασίας σε '%1'. Ίσως υπάρχει κάποιο σφάλμα άδειας αρχείου; - + Duplicate Macro Διπλογραφή της Μακροεντολής - + Duplicate Failed Αποτυχία Κατά τη Διπλογραφή - + Failed to duplicate to '%1'. Perhaps a file permission error? Αποτυχία κατά την διπλογραφή στο '%1'. @@ -4310,6 +4322,16 @@ horizontal space in Python console Save history Save history + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4424,16 +4446,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4456,7 +4503,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Κάτω: @@ -4486,17 +4533,17 @@ Larger value eases to pick things, but can make small features impossible to sel Background color for active containers in tree view - + Central: Κέντρο: - + Midway: Μεσαίο: - + End: Τέλος: @@ -5474,22 +5521,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Συνδυασμένη Προβολή - - - - Model - Μοντέλο - - - - - Tasks - Ανατεθειμένες Εργασίες - Gui::DockWnd::PropertyDockView @@ -5716,12 +5751,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Τροποποιημένο αρχείο - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5730,54 +5765,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Μη αποθηκευμένο έγγραφο - + The document has been modified. Do you want to save your changes? Το έγγραφο έχει τροποποιηθεί. Θέλετε να αποθηκεύσετε τις αλλαγές σας; - + FreeCAD macro Μακροεντολή FreeCAD - + Export PDF Εξαγωγή σε PDF - + PDF file Αρχείο PDF - + untitled[*] χωρίς τίτλο[*] - + - Editor - Πρόγραμμα Επεξεργασίας - + %1 chars removed Απομακρύνθηκαν %1 χαρακτήρες - + %1 chars added Προστέθηκαν %1 χαρακτήρες - + Formatted Μορφοποιημένο @@ -5929,39 +5964,46 @@ Do you want to save your changes? Το λογισμικό Graphviz απέτυχε στη δημιουργία αρχείου εικόνας - + PNG format Μορφή PNG - + Bitmap format Μορφή Bitmap - + GIF format Μορφή GIF - + JPG format Μορφή JPG - + SVG format Μορφή SVG - - + + PDF format Μορφή PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Εξαγωγή γραφικού @@ -6122,7 +6164,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Διάσταση @@ -6132,62 +6174,62 @@ Do you want to save your changes? Έτοιμο - + Help addon needed! Απαιτείται πρόσθετο βοήθειας! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Το σύστημα βοήθειας του %1 αντιμετωπίζεται τώρα από το πρόσθετο "Βοήθεια". Μπορεί εύκολα να εγκατασταθεί μέσω του Διαχειριστή πρόσθετων - + Open Addon Manager Άνοιγμα Διαχειριστή Πρόσθετων - + Close All Κλείσιμο Όλων - - - + + + Toggles this toolbar Εναλλάσσει την λειτουργία εμφάνισης/απόκρυψης αυτής της γραμμής εργαλείων - - - + + + Toggles this dockable window Εναλλάσσει την λειτουργία εμφάνισης/απόκρυψης αυτού του προσδέσιμου παραθύρου - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Μη αποθηκευμένο έγγραφο - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -6559,116 +6601,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit Έξοδος συστήματος - + The application is still running. Do you want to exit without saving your data? Η εφαρμογή εξακολουθεί να εκτελείται. Θέλετε να πραγματοποιήσετε έξοδο χωρίς να αποθηκεύσετε τα δεδομένα σας; - - - - + + + + Python console Κονσόλα Python - + Unhandled PyCXX exception. Μη επεξεργάσιμη εξαίρεση PyCXX. - + Unhandled FreeCAD exception. Μη επεξεργάσιμη εξαίρεση FreeCAD. - + Unhandled std C++ exception. Τυπική μη διαχειρίσιμη εξαίρεση C++. - + Unhandled unknown C++ exception. Άγνωστη μη διαχειρίσιμη εξαίρεση C++. - + &Copy Αντιγραφή - + &Copy command Αντιγραφή εντολής - + &Copy history Αντιγραφή ιστορικού - + Save history as... Αποθήκευση ιστορικού ως... - + Save history Save history - + Saves Python history across %1 sessions Saves Python history across %1 sessions - + &Paste Ε&πικόλληση - + Select All Επιλογή Όλων - + Clear console Εκκαθάριση κονσόλας - + Insert file name... Εισάγετε όνομα αρχείου... - + Word wrap Αναδίπλωση λέξεων - + Save History Αποθήκευση Ιστορικού - + Macro Files Αρχεία Μακροεντολών - + Insert file name Εισάγετε όνομα αρχείου - + All Files Όλα τα Αρχεία @@ -6753,22 +6795,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Previous - + Next Next - + Case sensitive Case sensitive - + Whole words Whole words @@ -6885,17 +6927,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Προσαυξήσεις - + Translation Increment: Βήμα της Μεταμόρφωσης: - + Rotation Increment: Βήμα της Περιστροφής: @@ -7720,37 +7762,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Προβολή δενδροδιαγράμματος - + + Tasks + Ανατεθειμένες Εργασίες + + + Property view Προβολή ιδιοτήτων - + Selection view Προβολή επιλογής - - Combo View - Συνδυασμένη Προβολή + + Model + Μοντέλο - + DAG View Προβολή Κατευθυνόμενου Ακυκλικού Γραφήματος - + Report view Προβολή αναφοράς - + Python console Κονσόλα Python @@ -7826,12 +7873,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7872,71 +7919,71 @@ Do you want to specify another directory? Εξαγωγή αρχείου - + Printing... Πραγματοποιείται εκτύπωση... - + Exporting PDF... Πραγματοποιείται εξαγωγή αρχείου PDF... - - + + Unsaved document Μη αποθηκευμένο έγγραφο - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - - + + Delete failed Delete failed - + Dependency error Dependency error - + Copy selected Copy selected - + Copy active document Copy active document - + Copy all documents Copy all documents - + Paste Paste - + Expression error Expression error - + Failed to parse some of the expressions. Please check the Report View for more details. Failed to parse some of the expressions. Please check the Report View for more details. - + Failed to paste expressions Failed to paste expressions @@ -8354,7 +8401,7 @@ Choose 'Abort' to abort Επιλέξτε 'Εγκατάλειψη' για να καταργήσετε - + Save Macro Αποθήκευση Μακροεντολής @@ -8423,7 +8470,7 @@ Please open a browser window and type in: http://localhost:%1. Αδυναμία ανοίγματος του πλοηγού διαδικτύου του συστήματός σου. - + Options... Επιλογές... @@ -8470,42 +8517,42 @@ Please open a browser window and type in: http://localhost:%1. Do you want to close this dialog? - + Do you want to save your changes to document '%1' before closing? Θέλετε να αποθηκεύσετε τις αλλαγές σας στο έγγραφο '%1' πριν το κλείσιμο; - + Do you want to save your changes to document before closing? Do you want to save your changes to document before closing? - + If you don't save, your changes will be lost. Αν δεν κάνετε αποθήκευση, οι αλλαγές σας θα χαθούν. - + Apply answer to all Apply answer to all - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Ορισμένα έγγραφα δεν ήταν δυνατόν να αποθηκευτούν. Θέλετε να ακυρώσετε τον τερματισμό; - + Delete macro Διαγραφή μακροεντολής - + Not allowed to delete system-wide macros Δεν επιτρέπεται να διαγράψετε μακροεντολές συστήματος @@ -8525,12 +8572,17 @@ Please open a browser window and type in: http://localhost:%1. Το %1 δεν είναι άδειο, να διαγραφεί και το περιεχόμενό του; - + Translation: Μετάφραση: - + + Translation XY: + Translation XY: + + + Rotation: Περιστροφή: @@ -8737,7 +8789,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8843,13 +8895,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Ευθυγράμμιση... - - + + Align the selected objects Ευθυγράμμιση των επιλεγμένων αντικειμένων @@ -8927,13 +8979,13 @@ the current copy will be lost. StdCmdCopy - + C&opy Αντιγραφή - - + + Copy operation Αντιγραφή λειτουργίας @@ -8941,13 +8993,13 @@ the current copy will be lost. StdCmdCut - + &Cut Περικοπή - - + + Cut out Περικοπή @@ -8955,13 +9007,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Διαγραφή - - + + Deletes the selected objects Διαγράφει τα επιλεγμένα αντικείμενα @@ -9109,13 +9161,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Αντιγραφή επιλογής - - + + Put duplicates of the selected objects to the active document Τοποθετήστε αντίγραφα των επιλεγμένων αντικειμένων στο ενεργό έγγραφο @@ -9123,17 +9175,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Εναλλαγή της λειτουργίας &Επεξεργασίας - + Toggles the selected object's edit mode Εναλλάσσει την λειτουργία επεξεργασίας των επιλεγμένων αντικειμένων - + Activates or Deactivates the selected object's edit mode Ενεργοποιεί ή Απενεργοποιεί την κατάσταση λειτουργίας επεξεργασίας του επιλεγμένου αντικείμενου @@ -9165,13 +9217,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Expression actions - - + + Actions that apply to expressions Actions that apply to expressions @@ -9663,19 +9715,19 @@ the current copy will be lost. StdCmdNew - + &New &Νέο - - + + Create a new empty document Δημιουργήστε ένα νέο κενό έγγραφο - + Unnamed Ανώνυμο @@ -9758,13 +9810,13 @@ the current copy will be lost. StdCmdPaste - + &Paste Ε&πικόλληση - - + + Paste operation Λειτουργία επικόλλησης @@ -9772,13 +9824,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Τοποθέτηση... - - + + Place the selected objects Τοποθετήστε τα επιλεγμένα αντικείμενα @@ -9786,13 +9838,13 @@ the current copy will be lost. StdCmdPrint - + &Print... Εκτύ&πωση... - - + + Print the document Εκτυπώστε το έγγραφο @@ -9800,13 +9852,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Εξαγωγή σε PDF... - - + + Export the document as PDF Εξαγωγή του εγγράφου ως PDF @@ -9814,17 +9866,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Προεπισκόπηση εκτύπωσης... - + Print the document Εκτυπώστε το έγγραφο - + Print preview Προεπισκόπηση εκτύπωσης @@ -9832,13 +9884,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Πληροφορίες Έργου... - - + + Show details of the currently active project Εμφανίστε λεπτομέρειες του τρέχοντος ενεργού έργου @@ -9846,13 +9898,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Βοηθητική εφαρμογή έργου... - - + + Utility to extract or create project files Βοηθητική εφαρμογή για να εξαγάγετε ή να δημιουργήσετε αρχεία έργου @@ -9874,13 +9926,13 @@ the current copy will be lost. StdCmdQuit - + E&xit Έξοδος - - + + Quits the application Εγκαταλείπει την εφαρμογή @@ -9930,13 +9982,13 @@ the current copy will be lost. StdCmdRedo - + &Redo Επανάληψη - - + + Redoes a previously undone action Επαναλαμβάνει μια ενέργεια που είχε προηγουμένως αναιρεθεί @@ -9944,13 +9996,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh Ανανέωση - - + + Recomputes the current active document Πραγματοποιεί επανεκτέλεση υπολογισμών για το τρέχον ενεργό έγγραφο @@ -9972,13 +10024,13 @@ the current copy will be lost. StdCmdRevert - + Revert Επαναφορά - - + + Reverts to the saved version of this file Πραγματοποιεί επαναφορά στην αποθηκευμένη έκδοση αυτού του αρχείου @@ -9986,13 +10038,13 @@ the current copy will be lost. StdCmdSave - + &Save Αποθήκευ&ση - - + + Save the active document Αποθήκευση του ενεργού εγγράφου @@ -10000,13 +10052,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Αποθήκευση όλων - - + + Save all opened document Αποθήκευση όλων των ανοιγμένων εγγράφων @@ -10014,13 +10066,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... &Αποθήκευση Ως... - - + + Save the active document under a new file name Αποθήκευση του ενεργού εγγράφου με νέο όνομα αρχείου @@ -10028,13 +10080,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Αποθήκευση ενός Αντιγράφου... - - + + Save a copy of the active document under a new file name Αποθήκευση ενός αντιγράφου του ενεργού εγγράφου με νέο όνομα αρχείου @@ -10098,13 +10150,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Επιλογή Όλων - - + + Select all Επιλογή όλων @@ -10336,13 +10388,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Μετατόπιση... - - + + Transform the geometry of selected objects Μετασχηματισμός της γεωμετρίας των επιλεγμένων αντικειμένων @@ -10350,13 +10402,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Μετατόπιση - - + + Transform the selected object in the 3d view Μετασχηματισμός του επιλεγμένου αντικειμένου στην τρισδιάστατη προβολή @@ -10420,13 +10472,13 @@ the current copy will be lost. StdCmdUndo - + &Undo Αναίρεση - - + + Undo exactly one action Αναίρεση ακριβώς μιας πράξης @@ -11227,7 +11279,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11238,7 +11290,7 @@ Are you sure you want to continue; - + Object dependencies Εξαρτήσεις αντικειμένου @@ -11327,12 +11379,12 @@ Are you sure you want to continue; Std_DuplicateSelection - + Object dependencies Εξαρτήσεις αντικειμένου - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -11350,7 +11402,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11364,17 +11416,17 @@ Do you still want to proceed; Std_Revert - + Revert document Επαναφορά εγγράφου - + This will discard all the changes since last file save. Αυτό θα πραγματοποιήσει απόρριψη όλων των αλλαγών από την τελευταία αποθήκευση αρχείου. - + Do you want to continue? Θέλετε να συνεχίσετε; @@ -12037,23 +12089,15 @@ after FreeCAD launches Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12526,77 +12570,72 @@ display the splash screen Διαχείριση πακέτων προτιμήσεων - + Small (%1px) Μικρό (%1px) - + Medium (%1px) Μεσαίο (%1px) - + Large (%1px) Μεγάλο (%1px) - + Extra large (%1px) Πολύ μεγάλο (%1px) - + Custom (%1px) Προσαρμοσμένο (%1px) - + Combo View Συνδυασμένη Προβολή - + TreeView and PropertyView TreeView and PropertyView - - Both - Both - - - + Preference Pack Name Όνομα Πακέτου Προτίμησης - + Tags Ετικέτες - + Apply Εφαρμογή - + Apply the %1 preference pack Εφαρμογή του %1 πακέτου προτιμήσεων - + Choose a FreeCAD config file to import Επιλέξτε ένα αρχείο ρυθμίσεων FreeCAD για εισαγωγή - + File exists Το αρχείο υπάρχει - + A preference pack with that name already exists. Overwrite? Ένα πακέτο προτιμήσεων με αυτό το όνομα υπάρχει ήδη. Αντικατάσταση; @@ -12900,4 +12939,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_es-AR.ts b/src/Gui/Language/FreeCAD_es-AR.ts index 2ff17dcc6b..dc86bd1cdd 100644 --- a/src/Gui/Language/FreeCAD_es-AR.ts +++ b/src/Gui/Language/FreeCAD_es-AR.ts @@ -122,12 +122,12 @@ Importar - + Delete Eliminar - + Paste expressions Pegar expresiones @@ -188,9 +188,9 @@ Ubicación + - Transform Transformar @@ -220,7 +220,7 @@ Alternar seleccionabilidad - + Edit image Editar imagen @@ -615,14 +615,6 @@ mientras hace un clic izquierdo o derecho y mueve el mouse hacia arriba o hacia &Cancelar - - Gui::ControlSingleton - - - Task panel - Panel de tareas - - Gui::DAG::Model @@ -1824,72 +1816,92 @@ same time. The one with the highest priority will be triggered. Nombre de la macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macros del usuario - + System macros Macros del sistema - + Execute Ejecutar - + Close Cerrar - + Create Crear - + Delete Eliminar - + Edit Editar - + Rename Renombrar - + Duplicate Duplicar - + Launch a guide on how to set up a macro in a custom global toolbar. Inicie una guía sobre cómo configurar una macro en una barra de herramientas global personalizada. - + Toolbar Barra de herramientas - + Open Addon Manager where macros created by the community and other addons can be downloaded. Abrir el gestor de complementos donde se pueden descargar macros creadas por la comunidad y otros complementos. - + Download Descargar - + User macros location: Ubicación de las macros del usuario: @@ -1897,72 +1909,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Sólo lectura - + Macro file Archivo de macro - + Enter a file name, please: Ingrese un nombre de archivo, por favor: - - - + + + Existing file Archivo existente - + '%1'. This file already exists. '%1'. Este archivo ya existe. - + Cannot create file No se puede crear el archivo - + Creation of file '%1' failed. Error al crear el archivo '%1'. - + Delete macro Eliminar macro - + Do you really want to delete the macro '%1'? ¿Realmente desea eliminar la macro '%1'? - + Do not show again No mostrar de nuevo - + Guided Walkthrough Tutorial guiado - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,78 +1985,78 @@ Nota: tus cambios se aplicarán cuando cambies de banco de trabajo - + Walkthrough, dialog 1 of 2 Tutorial, diálogo 1 de 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instrucciones del tutorial: Rellene los campos que faltan (opcional) y luego haga clic en Agregar, luego en Cerrar - + Walkthrough, dialog 1 of 1 Tutorial, diálogo 1 de 1 - + Walkthrough, dialog 2 of 2 Tutorial, diálogo 2 de 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instrucciones del tutorial: Haga clic en el botón derecho de la flecha (->), luego cierre. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instrucciones del tutorial: Haga clic en Nuevo, luego en la flecha derecha (->) botón, luego en Cerrar. - + Renaming Macro File Renombrar el archivo de la Macro - - + + Enter new name: Introduce nuevo nombre: - - + + '%1' already exists. '%1' ya existe. - + Rename Failed Renombrar fallido - + Failed to rename to '%1'. Perhaps a file permission error? Error al renombrar a '%1'. ¿Tal vez un error de permiso de archivo? - + Duplicate Macro Duplicar Macro - + Duplicate Failed Error al Duplicar - + Failed to duplicate to '%1'. Perhaps a file permission error? Error al duplicar en '%1'. @@ -2955,7 +2967,7 @@ pero una respuesta más lenta a cualquier cambio de escena. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Tamaño de los vértices en el croque, Sorteo Técnico y otros bancos de trabajo @@ -4307,6 +4319,16 @@ espacio horizontal disponible en la consola de Python Save history Guardar historial + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4421,16 +4443,41 @@ Valor más grande facilita la selección de cosas, pero puede hacer imposible se - + Top: Superior: - + Middle: Medio: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4453,7 +4500,7 @@ Valor más grande facilita la selección de cosas, pero puede hacer imposible se - + Bottom: Inferior: @@ -4483,17 +4530,17 @@ Valor más grande facilita la selección de cosas, pero puede hacer imposible se Color de fondo para contenedores activos en vista de árbol - + Central: Central: - + Midway: Intermedio: - + End: Fin: @@ -5470,22 +5517,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Vista combinada - - - - Model - Modelo - - - - - Tasks - Tareas - Gui::DockWnd::PropertyDockView @@ -5712,12 +5747,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Archivo modificado - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5726,54 +5761,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Documento sin guardar - + The document has been modified. Do you want to save your changes? El documento ha sido modificado. Desea guardar los cambios? - + FreeCAD macro Macro de FreeCAD - + Export PDF Exportar a PDF - + PDF file Archivo PDF - + untitled[*] sin título[*] - + - Editor - Editor - + %1 chars removed %1 caracteres eliminados - + %1 chars added %1 caracteres añadidos - + Formatted Formateado @@ -5924,39 +5959,46 @@ Desea guardar los cambios? Graphviz falló al crear un archivo de imagen - + PNG format Formato PNG - + Bitmap format Formato de mapa de bits - + GIF format Formato GIF - + JPG format Formato JPG - + SVG format Formato SVG - - + + PDF format Formato PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportar gráfico @@ -6117,7 +6159,7 @@ Desea guardar los cambios? Gui::MainWindow - + Dimension Cota @@ -6127,62 +6169,62 @@ Desea guardar los cambios? Listo - + Help addon needed! ¡Se necesita el complemento de ayuda! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager El sistema de ayuda de %1 ahora es manejado por el complemento "Ayuda". Se puede instalar fácilmente a través del Administrador de Complementos - + Open Addon Manager Abrir gestor de complementos - + Close All Cerrar todo - - - + + + Toggles this toolbar Alterna esta barra de herramientas - - - + + + Toggles this dockable window Alterna esta ventana acoplable - + WARNING: This is a development version. ADVERTENCIA: Esta es una versión de desarrollo. - + Please do not use it in a production environment. - Please do not use it in a production environment. + No se utilice en entornos de producción. - - + + Unsaved document Documento sin guardar - + The exported object contains external link. Please save the documentat least once before exporting. El objeto exportado contiene un vínculo externo. Por favor, guarde el documento al menos una vez antes de exportar. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Para vincular a objetos externos, el documento debe guardarse al menos una vez. @@ -6551,117 +6593,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Salida del sistema - + The application is still running. Do you want to exit without saving your data? La aplicación aún se está ejecutando. ¿Quieres salir sin guardar tus datos? - - - - + + + + Python console Consola de Python - + Unhandled PyCXX exception. Excepción de PyCXX no gestionada. - + Unhandled FreeCAD exception. Excepción de FreeCAD no gestionada. - + Unhandled std C++ exception. Excepción de std C++ no gestionada. - + Unhandled unknown C++ exception. Excepción desconocida de C++ no gestionada. - + &Copy &Copiar - + &Copy command &Comando copiar - + &Copy history &Copiar historial - + Save history as... Guardar historial como... - + Save history Guardar historial - + Saves Python history across %1 sessions Guarda el historial de Python en %1 sesiones - + &Paste &Pegar - + Select All Seleccionar Todo - + Clear console Limpiar consola - + Insert file name... Insertar nombre de archivo... - + Word wrap Ajuste de línea de texto - + Save History Guardar Historial - + Macro Files Archivos macro - + Insert file name Insertar nombre de archivo - + All Files Todos los Archivos @@ -6746,22 +6788,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Previo - + Next Siguiente - + Case sensitive Distingue mayúsculas y minúsculas - + Whole words Palabras completas @@ -6878,17 +6920,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Incrementos - + Translation Increment: Incremento de Traslación: - + Rotation Increment: Incremento de Rotación: @@ -7713,37 +7755,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Vista de árbol - + + Tasks + Tareas + + + Property view Vista de Propiedades - + Selection view Vista de selección - - Combo View - Vista combinada + + Model + Modelo - + DAG View Vista DAG - + Report view Vista de informe - + Python console Consola de Python @@ -7819,12 +7866,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Este sistema está ejecutando OpenGL %1.%2. FreeCAD requiere OpenGL 2.0 o superior. Por favor actualice su controlador gráfico y/o tarjeta de ser necesario. - + Invalid OpenGL Version Versión OpenGL inválida @@ -7865,71 +7912,71 @@ Do you want to specify another directory? Exportar archivo - + Printing... Imprimiendo... - + Exporting PDF... Exportando a PDF... - - + + Unsaved document Documento sin guardar - + The exported object contains external link. Please save the documentat least once before exporting. El objeto exportado contiene un vínculo externo. Por favor, guarde el documento al menos una vez antes de exportar. - - + + Delete failed Error al eliminar - + Dependency error Error de dependencia - + Copy selected Copiar seleccionado - + Copy active document Copiar documento activo - + Copy all documents Copiar todos los documentos - + Paste Pegar - + Expression error Error de Expresión - + Failed to parse some of the expressions. Please check the Report View for more details. Error al analizar alguna(s) de las expresiones. Por favor, compruebe la Vista de Informe para más detalles. - + Failed to paste expressions Error al pegar expresiones @@ -8344,7 +8391,7 @@ Elija 'No' para revertir solo en el documento activo. Elija 'Anular' para anular - + Save Macro Guardar Macro @@ -8413,7 +8460,7 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. Incapaz de abrir su navegador del sistema. - + Options... Opciones... @@ -8460,42 +8507,42 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. ¿Desea cerrar este diálogo? - + Do you want to save your changes to document '%1' before closing? ¿Desea guardar el documento '%1' antes de cerrar? - + Do you want to save your changes to document before closing? ¿Desea guardar los cambios en el documento antes de cerrar? - + If you don't save, your changes will be lost. Si no guarda, los cambios se perderán. - + Apply answer to all Aplicar respuesta a todos - + %1 Document(s) not saved %1 Documento(s) no guardados - + Some documents could not be saved. Do you want to cancel closing? Algunos documentos no se han podido guardar. ¿Desea cancelar el cierre? - + Delete macro Eliminar macro - + Not allowed to delete system-wide macros No se permite eliminar macros del sistema @@ -8515,12 +8562,17 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. La %1 no está vacía, ¿borrar su contenido? - + Translation: Traslación: - + + Translation XY: + Translation XY: + + + Rotation: Rotación: @@ -8729,7 +8781,7 @@ la copia actual se perderá. Cambiar imagen... - + Color Gradient Gradiente de color @@ -8835,13 +8887,13 @@ la copia actual se perderá. StdCmdAlignment - + Alignment... Alineación... - - + + Align the selected objects Alinea los objetos seleccionados @@ -8919,13 +8971,13 @@ la copia actual se perderá. StdCmdCopy - + C&opy Copiar - - + + Copy operation Operación de copia @@ -8933,13 +8985,13 @@ la copia actual se perderá. StdCmdCut - + &Cut &Cortar - - + + Cut out Recorta @@ -8947,13 +8999,13 @@ la copia actual se perderá. StdCmdDelete - + &Delete Eliminar - - + + Deletes the selected objects Elimina los elementos seleccionados @@ -9101,13 +9153,13 @@ la copia actual se perderá. StdCmdDuplicateSelection - + Duplicate selection Duplicar la selección - - + + Put duplicates of the selected objects to the active document Pone los duplicados de los objetos seleccionados en el documento activo @@ -9115,17 +9167,17 @@ la copia actual se perderá. StdCmdEdit - + Toggle &Edit mode Alternar &modo de edición - + Toggles the selected object's edit mode Activa o desactiva el modo de edición del objeto seleccionado - + Activates or Deactivates the selected object's edit mode Activa o desactiva el modo de edición del objeto seleccionado @@ -9157,13 +9209,13 @@ la copia actual se perderá. StdCmdExpression - + Expression actions Acciones de expresión - - + + Actions that apply to expressions Acciones que se aplican a las expresiones @@ -9655,19 +9707,19 @@ la copia actual se perderá. StdCmdNew - + &New &Nuevo - - + + Create a new empty document Crea un documento vacío nuevo - + Unnamed Sin nombre @@ -9750,13 +9802,13 @@ la copia actual se perderá. StdCmdPaste - + &Paste &Pegar - - + + Paste operation Operación de pegar @@ -9764,13 +9816,13 @@ la copia actual se perderá. StdCmdPlacement - + Placement... Ubicación... - - + + Place the selected objects Ubica los elementos seleccionados @@ -9778,13 +9830,13 @@ la copia actual se perderá. StdCmdPrint - + &Print... &Imprimir... - - + + Print the document Imprime el documento @@ -9792,13 +9844,13 @@ la copia actual se perderá. StdCmdPrintPdf - + &Export PDF... &Exportar PDF... - - + + Export the document as PDF Exporta el documento como PDF @@ -9806,17 +9858,17 @@ la copia actual se perderá. StdCmdPrintPreview - + &Print preview... &Vista previa de impresión... - + Print the document Imprime el documento - + Print preview Vista previa de impresión @@ -9824,13 +9876,13 @@ la copia actual se perderá. StdCmdProjectInfo - + Project i&nformation... &Información del proyecto... - - + + Show details of the currently active project Muestra detalles del proyecto activo actual @@ -9838,13 +9890,13 @@ la copia actual se perderá. StdCmdProjectUtil - + Project utility... Utilidad del proyecto... - - + + Utility to extract or create project files Utilidad para extraer o crear archivos de proyecto @@ -9866,13 +9918,13 @@ la copia actual se perderá. StdCmdQuit - + E&xit S&alir - - + + Quits the application Sale de la aplicación @@ -9922,13 +9974,13 @@ la copia actual se perderá. StdCmdRedo - + &Redo &Rehacer - - + + Redoes a previously undone action Rehace una acción previa de deshacer @@ -9936,13 +9988,13 @@ la copia actual se perderá. StdCmdRefresh - + &Refresh &Actualizar - - + + Recomputes the current active document Recalcula el documento activo actual @@ -9964,13 +10016,13 @@ la copia actual se perderá. StdCmdRevert - + Revert Revertir - - + + Reverts to the saved version of this file Vuelve a la versión guardada del archivo @@ -9978,13 +10030,13 @@ la copia actual se perderá. StdCmdSave - + &Save &Guardar - - + + Save the active document Guarda el documento activo @@ -9992,13 +10044,13 @@ la copia actual se perderá. StdCmdSaveAll - + Save All Guardar todo - - + + Save all opened document Guarda todos los documentos abiertos @@ -10006,13 +10058,13 @@ la copia actual se perderá. StdCmdSaveAs - + Save &As... Guardar &como... - - + + Save the active document under a new file name Guarda el documento activo con un nuevo nombre de archivo @@ -10020,13 +10072,13 @@ la copia actual se perderá. StdCmdSaveCopy - + Save a &Copy... Guardar una &copia... - - + + Save a copy of the active document under a new file name Guarda una copia del documento activo con un nuevo nombre de archivo @@ -10090,13 +10142,13 @@ la copia actual se perderá. StdCmdSelectAll - + Select &All Seleccionar &todo - - + + Select all Selecciona todo @@ -10328,13 +10380,13 @@ la copia actual se perderá. StdCmdTransform - + Transform... Transformar... - - + + Transform the geometry of selected objects Transformar la geometría de los objetos seleccionados @@ -10342,13 +10394,13 @@ la copia actual se perderá. StdCmdTransformManip - + Transform Transformar - - + + Transform the selected object in the 3d view Transforma el objeto seleccionado en la vista 3d @@ -10412,13 +10464,13 @@ la copia actual se perderá. StdCmdUndo - + &Undo &Deshacer - - + + Undo exactly one action Deshace exactamente una acción @@ -11218,7 +11270,7 @@ la copia actual se perderá. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11229,7 +11281,7 @@ Are you sure you want to continue? - + Object dependencies Dependencias del objeto @@ -11318,12 +11370,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Dependencias del objeto - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Para vincular a objetos externos, el documento debe guardarse al menos una vez. @@ -11341,7 +11393,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11355,17 +11407,17 @@ Por favor, compruebe la Vista de Reportes para más detalles. Std_Revert - + Revert document Revertir documento - + This will discard all the changes since last file save. Esto descartará todos los cambios desde el último archivo guardado. - + Do you want to continue? ¿Desea continuar? @@ -11747,7 +11799,7 @@ after FreeCAD launches Choose orientation - Choose orientation + Elige la orientación @@ -12027,23 +12079,15 @@ after FreeCAD launches Carga una imagen - - Gui::InteractiveScale - - - Enter desired distance between the points - Introduzca la distancia deseada entre los puntos - - NaviCubeDraggableCmd - + Movable navigation cube Cubo de navegación movible - + Drag and place NaviCube Arrastrar y colocar NaviCube @@ -12517,77 +12561,72 @@ la pantalla de bienvenida Administrar paquetes de preferencias - + Small (%1px) Pequeño (%1px) - + Medium (%1px) Medio (%1px) - + Large (%1px) Grande (%1px) - + Extra large (%1px) Extra grande (%1px) - + Custom (%1px) Personalizado (%1px) - + Combo View Vista combinada - + TreeView and PropertyView Vista de árbol y vista de propiedades - - Both - Ambas - - - + Preference Pack Name Nombre del paquete de preferencias - + Tags Etiquetas - + Apply Aplicar - + Apply the %1 preference pack Aplicar el %1 paquete de preferencias - + Choose a FreeCAD config file to import Elige un archivo de configuración de FreeCAD para importar - + File exists El archivo ya existe - + A preference pack with that name already exists. Overwrite? Ya existe un paquete de preferencias con ese nombre. ¿Sobrescribir? @@ -12810,8 +12849,8 @@ from Python console to Report view panel Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Aplicar manualmente hojas de estilo .qss Qt. Esta es la forma heredada que se utilizó para personalizar la interfaz. +Ahora puedes usar tema para obtener una personalización completa de la interfaz. @@ -12837,7 +12876,7 @@ You can now use Theme to get a full customization of the interface. Change the Selection filter - Cambiar el filtro de selección + Cambia el filtro de selección @@ -12851,7 +12890,7 @@ You can now use Theme to get a full customization of the interface. Select a Vertex/Vertices - Seleccione un vértice/vértices + Selecciona un vértice/vértices @@ -12859,13 +12898,13 @@ You can now use Theme to get a full customization of the interface. Edge Selection - Selección de arista + Selección de bordes Select Edge(s) - Seleccione arista(s) + Selecciona arista(s) @@ -12879,7 +12918,7 @@ You can now use Theme to get a full customization of the interface. Select Face(s) - Seleccione cara(s) + Selecciona cara(s) @@ -12889,7 +12928,21 @@ You can now use Theme to get a full customization of the interface. All selection filters cleared - Todos los filtros de selección eliminados + Todos los filtros de selección quitados + + + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file diff --git a/src/Gui/Language/FreeCAD_es-ES.ts b/src/Gui/Language/FreeCAD_es-ES.ts index 53a0b5a89a..3caccfeff2 100644 --- a/src/Gui/Language/FreeCAD_es-ES.ts +++ b/src/Gui/Language/FreeCAD_es-ES.ts @@ -122,12 +122,12 @@ Importar - + Delete Borrar - + Paste expressions Pegar expresiones @@ -188,9 +188,9 @@ Ubicación + - Transform Transformar @@ -220,7 +220,7 @@ Conmutar selectividad - + Edit image Editar imagen @@ -615,14 +615,6 @@ mientras hace clic con el botón izquierdo o derecho y mueve el ratón hacia arr &Cancelar - - Gui::ControlSingleton - - - Task panel - Panel de tareas - - Gui::DAG::Model @@ -1824,72 +1816,92 @@ same time. The one with the highest priority will be triggered. Nombre de la macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macros del usuario - + System macros Macros del sistema - + Execute Ejecutar - + Close Cerrar - + Create Crear - + Delete Borrar - + Edit Editar - + Rename Renombrar - + Duplicate Duplicar - + Launch a guide on how to set up a macro in a custom global toolbar. Inicie una guía sobre cómo configurar una macro en una barra de herramientas global personalizada. - + Toolbar Barra de herramientas - + Open Addon Manager where macros created by the community and other addons can be downloaded. Abrir el gestor de complementos donde se pueden descargar macros creadas por la comunidad y otros complementos. - + Download Descarga - + User macros location: Ubicación de las macros del usuario: @@ -1897,72 +1909,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Solo lectura - + Macro file Archivo de macro - + Enter a file name, please: Introduzca un nombre de archivo, por favor: - - - + + + Existing file Archivo existente - + '%1'. This file already exists. '%1'. Este archivo ya existe. - + Cannot create file No se puede crear el archivo - + Creation of file '%1' failed. Error al crear el archivo '%1'. - + Delete macro Borrar macro - + Do you really want to delete the macro '%1'? ¿Realmente quiere borrar la macro '%1'? - + Do not show again No volver a mostrar - + Guided Walkthrough Tutorial guiado - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,78 +1985,78 @@ Nota: tus cambios se aplicarán cuando cambies de banco de trabajo - + Walkthrough, dialog 1 of 2 Tutorial, diálogo 1 de 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instrucciones de aprobación: Rellene los campos que faltan (opcional) y luego haga clic en Agregar, luego en Cerrar - + Walkthrough, dialog 1 of 1 Tutorial, diálogo 1 de 1 - + Walkthrough, dialog 2 of 2 Tutorial, diálogo 2 de 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instrucciones del tutorial: Haga clic en el botón derecho de la flecha (->), luego cierre. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instrucciones del tutorial: Haga clic en el botón derecho de la flecha (->), luego cierre. - + Renaming Macro File Renombrar el archivo de la Macro - - + + Enter new name: Introduce nuevo nombre: - - + + '%1' already exists. '%1' ya existe. - + Rename Failed Error al Re-nombrarlo - + Failed to rename to '%1'. Perhaps a file permission error? Error al cambiar el nombre a '%1'. ¿Tal vez un error de permiso de archivo? - + Duplicate Macro Duplicar Macro - + Duplicate Failed Error al Duplicar - + Failed to duplicate to '%1'. Perhaps a file permission error? Error al duplicar en '%1'. @@ -2957,7 +2969,7 @@ pero una respuesta más lenta a cualquier cambio de escena. Size of vertices in the Sketcher, TechDraw and other workbenches - Size of vertices in the Sketcher, TechDraw and other workbenches + Tamaño de los vértices en el croque, Sorteo Técnico y otros bancos de trabajo @@ -4310,6 +4322,16 @@ espacio horizontal disponible en la consola de Python Save history Guardar historial + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4424,16 +4446,41 @@ Un valor más grande facilita la selección de cosas, pero puede hacer que las c - + Top: Arriba: - + Middle: Medio: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4456,7 +4503,7 @@ Un valor más grande facilita la selección de cosas, pero puede hacer que las c - + Bottom: Abajo: @@ -4486,17 +4533,17 @@ Un valor más grande facilita la selección de cosas, pero puede hacer que las c Color de fondo para contenedores activos en la vista en árbol - + Central: Central: - + Midway: A medio camino: - + End: Fin: @@ -5204,7 +5251,7 @@ La columna 'Estado' muestra si el documento puede ser recuperado. Reset - Reiniciar + Restablecer @@ -5247,7 +5294,7 @@ La columna 'Estado' muestra si el documento puede ser recuperado. Command - Comando + Orden @@ -5473,22 +5520,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Vista combinada - - - - Model - Modelo - - - - - Tasks - Tareas - Gui::DockWnd::PropertyDockView @@ -5715,12 +5750,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Archivo modificado - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5729,54 +5764,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Documento sin guardar - + The document has been modified. Do you want to save your changes? El documento ha sido modificado. Desea guardar los cambios? - + FreeCAD macro Macro de FreeCAD - + Export PDF Exportar en PDF - + PDF file Archivo PDF - + untitled[*] sin título[*] - + - Editor - Editor - + %1 chars removed %1 caracteres eliminados - + %1 chars added %1 caracteres añadidos - + Formatted Formateado @@ -5927,39 +5962,46 @@ Desea guardar los cambios? No se pudo crear un archivo de imagen de Graphviz - + PNG format Formato PNG - + Bitmap format Formato de mapa de bits - + GIF format Formato GIF - + JPG format Formato JPG - + SVG format Formato SVG - - + + PDF format Formato PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportar gráfico @@ -6120,7 +6162,7 @@ Desea guardar los cambios? Gui::MainWindow - + Dimension Cota @@ -6130,62 +6172,62 @@ Desea guardar los cambios? Preparado - + Help addon needed! ¡Se necesita el complemento de ayuda! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager El sistema de ayuda de %1 ahora es manejado por el complemento "Ayuda". Se puede instalar fácilmente a través del Administrador de Complementos - + Open Addon Manager Abrir gestor de complementos - + Close All Cerrar todo - - - + + + Toggles this toolbar Muestra u oculta la barra de herramientas - - - + + + Toggles this dockable window Alterna esta ventana acoplable - + WARNING: This is a development version. ATENCIÓN: Esta es una versión en desarrollo. - + Please do not use it in a production environment. - Please do not use it in a production environment. + No se utilice en entornos de producción. - - + + Unsaved document Documento sin guardar - + The exported object contains external link. Please save the documentat least once before exporting. El objeto exportado contiene un vínculo externo. Por favor, guarde el documento al menos una vez antes de exportar. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Para vincular a objetos externos, el documento debe guardarse al menos una vez. @@ -6445,12 +6487,12 @@ How do you want to proceed? Aborting - Abortar + Interrupción Do you really want to abort the operation? - Realmente quieres abortar la operación? + ¿Confirma que quiere interrumpir la operación? @@ -6554,117 +6596,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Salida del sistema - + The application is still running. Do you want to exit without saving your data? La aplicación aún se está ejecutando. ¿Quieres salir sin guardar tus datos? - - - - + + + + Python console Consola de Python - + Unhandled PyCXX exception. Excepción de PyCXX no gestionada. - + Unhandled FreeCAD exception. Excepción de FreeCAD no gestionada. - + Unhandled std C++ exception. Excepción de std C++ no gestionada. - + Unhandled unknown C++ exception. Excepción desconocida de C++ no gestionada. - + &Copy &Copiar - + &Copy command &Comando copiar - + &Copy history &Copiar historia - + Save history as... Guardar historia como... - + Save history Guardar historial - + Saves Python history across %1 sessions Guarda el historial de Python en %1 sesiones - + &Paste &Pegar - + Select All Seleccionar todo - + Clear console Limpiar la consola - + Insert file name... Insertar nombre de archivo... - + Word wrap Ajuste de texto - + Save History Guardar historia - + Macro Files Archivos macro - + Insert file name Introducir nombre de archivo - + All Files Todos los Archivos @@ -6720,7 +6762,7 @@ Do you want to exit without saving your data? The file '%1' cannot be opened. - El archivo '%1' no se puede abrir. + No se puede abrir el archivo «%1». @@ -6749,22 +6791,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Anterior - + Next Siguiente - + Case sensitive Distingue mayúsculas y minúsculas - + Whole words Palabras completas @@ -6881,17 +6923,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Incrementos - + Translation Increment: Incremento de Traslación: - + Rotation Increment: Incremento de rotación: @@ -6970,7 +7012,7 @@ Do you want to specify another directory? Line width: - Ancho de línea: + Anchura de línea: @@ -7371,7 +7413,7 @@ Do you want to specify another directory? Labels & Attributes - Etiquetas & Atributos + Etiquetas y atributos @@ -7716,37 +7758,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Vista en árbol - + + Tasks + Tareas + + + Property view Vista de las propiedades - + Selection view Vista de selección - - Combo View - Vista combinada + + Model + Modelo - + DAG View Vista DAG - + Report view Vista de informe - + Python console Consola de Python @@ -7822,12 +7869,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Este sistema está ejecutando OpenGL %1.%2. FreeCAD requiere OpenGL 2.0 o superior. Por favor actualice su controlador gráfico y/o tarjeta de ser necesario. - + Invalid OpenGL Version Versión OpenGL inválida @@ -7868,71 +7915,71 @@ Do you want to specify another directory? Exportar archivo - + Printing... Imprimiendo... - + Exporting PDF... Exportando a PDF... - - + + Unsaved document Documento sin guardar - + The exported object contains external link. Please save the documentat least once before exporting. El objeto exportado contiene un vínculo externo. Por favor, guarde el documento al menos una vez antes de exportar. - - + + Delete failed Error al eliminar - + Dependency error Error de dependencia - + Copy selected Copiar seleccionado - + Copy active document Copiar documento activo - + Copy all documents Copiar todos los documentos - + Paste Pegar - + Expression error Error de Expresión - + Failed to parse some of the expressions. Please check the Report View for more details. Error al analizar alguna(s) de las expresiones. Por favor, compruebe la Vista de Informe para más detalles. - + Failed to paste expressions Error al pegar expresiones @@ -8347,7 +8394,7 @@ Elija 'No' para deshacer solo en el documento activo. Seleccione 'Abortar' para abortar - + Save Macro Guardar macro @@ -8416,7 +8463,7 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. Incapaz de abrir su navegador del sistema. - + Options... Opciones... @@ -8463,42 +8510,42 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. ¿Desea cerrar este diálogo? - + Do you want to save your changes to document '%1' before closing? ¿Desea guardar el documento '%1' antes de cerrar? - + Do you want to save your changes to document before closing? ¿Desea guardar los cambios en el documento antes de cerrar? - + If you don't save, your changes will be lost. De no guardar, se perderán los cambios. - + Apply answer to all Aplicar respuesta a todos - + %1 Document(s) not saved %1 Documento(s) no guardados - + Some documents could not be saved. Do you want to cancel closing? Algunos documentos no se han podido guardar. ¿Desea cancelar el cierre? - + Delete macro Borrar macro - + Not allowed to delete system-wide macros No se permite eliminar macros del sistema @@ -8518,12 +8565,17 @@ Por favor abra una ventana del navegador y escriba en ella: http://localhost:%1. La %1 no está vacía, ¿borrar su contenido? - + Translation: Traslación: - + + Translation XY: + Translation XY: + + + Rotation: Rotación: @@ -8732,7 +8784,7 @@ la copia actual se perderá. Cambiar imagen... - + Color Gradient Gradiente de color @@ -8838,13 +8890,13 @@ la copia actual se perderá. StdCmdAlignment - + Alignment... Alineación... - - + + Align the selected objects Alinea los objetos seleccionados @@ -8922,13 +8974,13 @@ la copia actual se perderá. StdCmdCopy - + C&opy C&opiar - - + + Copy operation Operación de copia @@ -8936,13 +8988,13 @@ la copia actual se perderá. StdCmdCut - + &Cut &Cortar - - + + Cut out Recortar @@ -8950,13 +9002,13 @@ la copia actual se perderá. StdCmdDelete - + &Delete &Borrar - - + + Deletes the selected objects Borra los elementos seleccionados @@ -9104,13 +9156,13 @@ la copia actual se perderá. StdCmdDuplicateSelection - + Duplicate selection Duplicar la selección - - + + Put duplicates of the selected objects to the active document Pone los duplicados de los objetos seleccionados en el documento activo @@ -9118,17 +9170,17 @@ la copia actual se perderá. StdCmdEdit - + Toggle &Edit mode Activar &Modo de edición - + Toggles the selected object's edit mode Activa o desactiva el modo de edición del objeto seleccionado - + Activates or Deactivates the selected object's edit mode Activa o desactiva el modo de edición del objeto seleccionado @@ -9160,13 +9212,13 @@ la copia actual se perderá. StdCmdExpression - + Expression actions Acciones de expresión - - + + Actions that apply to expressions Acciones que se aplican a las expresiones @@ -9658,19 +9710,19 @@ la copia actual se perderá. StdCmdNew - + &New &Nuevo - - + + Create a new empty document Crea un documento vacío nuevo - + Unnamed Sin nombre @@ -9753,13 +9805,13 @@ la copia actual se perderá. StdCmdPaste - + &Paste &Pegar - - + + Paste operation Operación de pegar @@ -9767,13 +9819,13 @@ la copia actual se perderá. StdCmdPlacement - + Placement... Ubicación... - - + + Place the selected objects Sitúe los objetos seleccionados @@ -9781,13 +9833,13 @@ la copia actual se perderá. StdCmdPrint - + &Print... &Imprimir... - - + + Print the document Imprime el documento @@ -9795,13 +9847,13 @@ la copia actual se perderá. StdCmdPrintPdf - + &Export PDF... &Exportar en PDF... - - + + Export the document as PDF Exporta el documento como PDF @@ -9809,17 +9861,17 @@ la copia actual se perderá. StdCmdPrintPreview - + &Print preview... Vista previa de impresión... - + Print the document Imprime el documento - + Print preview Vista previa de impresión @@ -9827,13 +9879,13 @@ la copia actual se perderá. StdCmdProjectInfo - + Project i&nformation... &Información del proyecto... - - + + Show details of the currently active project Muestra detalles del proyecto activo actual @@ -9841,13 +9893,13 @@ la copia actual se perderá. StdCmdProjectUtil - + Project utility... Utilidad del proyecto... - - + + Utility to extract or create project files Herramienta para extraer o crear archivos de proyectos @@ -9869,13 +9921,13 @@ la copia actual se perderá. StdCmdQuit - + E&xit S&alir - - + + Quits the application Sale de la aplicación @@ -9925,13 +9977,13 @@ la copia actual se perderá. StdCmdRedo - + &Redo &Rehacer - - + + Redoes a previously undone action Rehace una acción previa de deshacer @@ -9939,13 +9991,13 @@ la copia actual se perderá. StdCmdRefresh - + &Refresh &Actualizar pantalla - - + + Recomputes the current active document Recalcula el documento activo actual @@ -9967,13 +10019,13 @@ la copia actual se perderá. StdCmdRevert - + Revert Deshacer - - + + Reverts to the saved version of this file Vuelve a la versión guardada del archivo @@ -9981,13 +10033,13 @@ la copia actual se perderá. StdCmdSave - + &Save &Guardar - - + + Save the active document Guarda el documento activo @@ -9995,13 +10047,13 @@ la copia actual se perderá. StdCmdSaveAll - + Save All Guardar todo - - + + Save all opened document Guarda todos los documentos abiertos @@ -10009,13 +10061,13 @@ la copia actual se perderá. StdCmdSaveAs - + Save &As... Guardar &Como... - - + + Save the active document under a new file name Guarda el documento activo con un nombre de archivo nuevo @@ -10023,13 +10075,13 @@ la copia actual se perderá. StdCmdSaveCopy - + Save a &Copy... Guardar una &Copia... - - + + Save a copy of the active document under a new file name Guarda una copia del documento activo con un nuevo nombre de archivo @@ -10093,13 +10145,13 @@ la copia actual se perderá. StdCmdSelectAll - + Select &All Seleccionar &Todo - - + + Select all Selecciona todo @@ -10331,13 +10383,13 @@ la copia actual se perderá. StdCmdTransform - + Transform... Transformar... - - + + Transform the geometry of selected objects Transformar la geometría de los objetos seleccionados @@ -10345,13 +10397,13 @@ la copia actual se perderá. StdCmdTransformManip - + Transform Transformar - - + + Transform the selected object in the 3d view Transforma el objeto seleccionado en la vista 3d @@ -10415,13 +10467,13 @@ la copia actual se perderá. StdCmdUndo - + &Undo &Deshacer - - + + Undo exactly one action Deshace exactamente una acción @@ -11221,7 +11273,7 @@ la copia actual se perderá. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11232,7 +11284,7 @@ Are you sure you want to continue? - + Object dependencies Dependencias del objeto @@ -11321,12 +11373,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Dependencias del objeto - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Para vincular a objetos externos, el documento debe guardarse al menos una vez. @@ -11344,7 +11396,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11358,17 +11410,17 @@ Por favor, compruebe la Vista de Reportes para más detalles. Std_Revert - + Revert document Revertir documento - + This will discard all the changes since last file save. Esto descartará todos los cambios desde el último guardado. - + Do you want to continue? ¿Desea continuar? @@ -11751,7 +11803,7 @@ después de que FreeCAD inicie Choose orientation - Choose orientation + Elige la orientación @@ -12031,23 +12083,15 @@ después de que FreeCAD inicie Carga una imagen - - Gui::InteractiveScale - - - Enter desired distance between the points - Introduzca la distancia deseada entre los puntos - - NaviCubeDraggableCmd - + Movable navigation cube Cubo de navegación movible - + Drag and place NaviCube Arrastrar y colocar NaviCube @@ -12522,77 +12566,72 @@ la pantalla de bienvenida Administrar paquetes de preferencias - + Small (%1px) Pequeño (%1px) - + Medium (%1px) Medio (%1px) - + Large (%1px) Grande (%1px) - + Extra large (%1px) Extra grande (%1px) - + Custom (%1px) Personalizado (%1px) - + Combo View Vista combinada - + TreeView and PropertyView Vista del Árbol y Vista de Propiedades - - Both - Ambos - - - + Preference Pack Name Nombre del paquete de preferencias - + Tags Etiquetas - + Apply Aplicar - + Apply the %1 preference pack Aplicar el paquete de preferencias %1 - + Choose a FreeCAD config file to import Elija un archivo de configuración de FreeCAD para importar - + File exists El archivo ya existe - + A preference pack with that name already exists. Overwrite? Ya existe un paquete de preferencias con ese nombre. ¿Sobrescribir? @@ -12813,8 +12852,8 @@ from Python console to Report view panel Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. You can now use Theme to get a full customization of the interface. - Apply manually .qss Qt Stylesheets. This is the legacy way that was used to customize the interface. -You can now use Theme to get a full customization of the interface. + Aplicar manualmente hojas de estilo .qss Qt. Esta es la forma heredada que se utilizó para personalizar la interfaz. +Ahora puedes usar tema para obtener una personalización completa de la interfaz. @@ -12895,4 +12934,18 @@ You can now use Theme to get a full customization of the interface.Todos los filtros de selección eliminados + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_eu.ts b/src/Gui/Language/FreeCAD_eu.ts index 4602f0812b..85e9f8ccb5 100644 --- a/src/Gui/Language/FreeCAD_eu.ts +++ b/src/Gui/Language/FreeCAD_eu.ts @@ -122,12 +122,12 @@ Inportatu - + Delete Ezabatu - + Paste expressions Itsatsi adierazpenak @@ -188,9 +188,9 @@ Kokapena + - Transform Transformatu @@ -220,7 +220,7 @@ Txandakatu hautagarritasuna - + Edit image Editatu irudia @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Utzi - - Gui::ControlSingleton - - - Task panel - Ataza-panela - - Gui::DAG::Model @@ -1822,72 +1814,92 @@ same time. The one with the highest priority will be triggered. Makroaren izena: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Erabiltzailearen makroak - + System macros Sistemaren makroak - + Execute Exekutatu - + Close Itxi - + Create Sortu - + Delete Ezabatu - + Edit Editatu - + Rename Aldatu izena - + Duplicate Bikoiztu - + Launch a guide on how to set up a macro in a custom global toolbar. Abiarazi gida bat makroak tresna-barra global pertsonalizatu batean nola konfiguratu jakiteko. - + Toolbar Tresna-barra - + Open Addon Manager where macros created by the community and other addons can be downloaded. Ireki gehigarrien kudeatzailea, komunitateak sortutako makroak eta beste gehigarri batzuk deskargatzeko. - + Download Deskargatu - + User macros location: Erabiltzailearen makroen kokalekua: @@ -1895,72 +1907,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makroak - + Read-only Irakurtzeko soilik - + Macro file Makro-fitxategia - + Enter a file name, please: Sartu fitxategi-izena, mesedez: - - - + + + Existing file Lehendik dagoen fitxategia - + '%1'. This file already exists. '%1'. Fitxategi hau lehendik badago. - + Cannot create file Ezin da fitxategia sortu - + Creation of file '%1' failed. '%1' fitxategia ezin da sortu. - + Delete macro Ezabatu makroa - + Do you really want to delete the macro '%1'? Ziur zaude '%1' makroa ezabatu nahi duzula? - + Do not show again Ez erakutsi berriro - + Guided Walkthrough Bisita gidatua - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1971,78 +1983,78 @@ Oharra: Zure aldaketak aplikatzeko, lan-mahaiz aldatu behar duzu - + Walkthrough, dialog 1 of 2 Bisita gidatua, 2 esalditik 1. a - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Bisita gidatuaren jarraibideak: bete falta diren eremuak (aukerakoa), egin klik 'Gehitu' aukeran eta gero 'Itxi' aukeran - + Walkthrough, dialog 1 of 1 Bisita gidatua, 1 elkarrizketa-koadrotik 1. a - + Walkthrough, dialog 2 of 2 Bisita gidatua, 2 elkarrizketa-koadrotik 2. a - + Walkthrough instructions: Click right arrow button (->), then Close. Bisita gidatuaren jarraibideak: egin klik eskuin-gezian (->) eta Itxi. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Bisita gidatuaren jarraibideak: Egin klik 'Berria' aukeran, sakatu eskuin-gezia (->) eta Itxi. - + Renaming Macro File Makro-fitxategiaren izena aldatzen - - + + Enter new name: Sartu izen berria: - - + + '%1' already exists. '%1' badago lehendik. - + Rename Failed Izena aldatzeak huts egin du - + Failed to rename to '%1'. Perhaps a file permission error? Ezin izan da '%1' izenez aldatu. Fitxategi-baimenen arazo bat ote da? - + Duplicate Macro Bikoiztu makroa - + Duplicate Failed Bikoizketak huts egin du - + Failed to duplicate to '%1'. Perhaps a file permission error? Ezin izan da '%1' bikoiztu. @@ -4314,6 +4326,16 @@ espazioa baino gehiago behar dutenean Save history Gorde historia + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4428,16 +4450,41 @@ Balio handiagoak elementuak aukeratzea errazten du, baina elementu txikiak hauta - + Top: Goikoa: - + Middle: Erdikoa: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4460,7 +4507,7 @@ Balio handiagoak elementuak aukeratzea errazten du, baina elementu txikiak hauta - + Bottom: Behekoa: @@ -4490,17 +4537,17 @@ Balio handiagoak elementuak aukeratzea errazten du, baina elementu txikiak hauta Zuhaitz-bistako edukiontzi aktiboen atzeko planoaren kolorea - + Central: Zentrala: - + Midway: Erdibidekoa: - + End: Amaierakoa: @@ -5479,22 +5526,10 @@ hautatutako objektuekin Gui::DockWnd::ComboView - + Combo View Bista konbinatua - - - - Model - Eredua - - - - - Tasks - Atazak - Gui::DockWnd::PropertyDockView @@ -5721,12 +5756,12 @@ hautatutako objektuekin Gui::EditorView - + Modified file Aldatutako fitxategia - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5735,54 +5770,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Gorde gabeko dokumentua - + The document has been modified. Do you want to save your changes? Dokumentua aldatu egin da. Aldaketak gorde nahi dituzu? - + FreeCAD macro FreeCAD makroa - + Export PDF Esportatu PDFa - + PDF file PDF fitxategia - + untitled[*] titulurik gabea[*] - + - Editor - Editorea - + %1 chars removed %1 karaktere ezabatu dira - + %1 chars added %1 karaktere gehitu dira - + Formatted Formatuduna @@ -5933,39 +5968,46 @@ Aldaketak gorde nahi dituzu? Graphviz-ek ezin izan du irudi-fitxategi bat sortu - + PNG format PNG formatua - + Bitmap format Bit-mapa formatua - + GIF format GIF formatua - + JPG format JPG formatua - + SVG format SVG formatua - - + + PDF format PDF formatua - - + + + Graphviz format + Graphviz format + + + + + Export graph Esportatu grafikoa @@ -6126,7 +6168,7 @@ Aldaketak gorde nahi dituzu? Gui::MainWindow - + Dimension Kota @@ -6136,62 +6178,62 @@ Aldaketak gorde nahi dituzu? Prest - + Help addon needed! Laguntza-gehigarria behar da. - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager %1(e)n laguntza-sistema "Laguntza" gehigarriaren bidez kudeatzen da. Gehigarrien kudeatzailearen bidez instalatu daiteke. - + Open Addon Manager Ireki gehigarrien kudeatzailea - + Close All Itxi dena - - - + + + Toggles this toolbar Tresna-barra hau aktibatzen/desaktibatzen du - - - + + + Toggles this dockable window Aktibatu/desaktibatu leiho atrakagarri hau - + WARNING: This is a development version. ABISUA: Hau garapen-bertsioa da. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Ez erabili hau ekoizpen-ingurune batean. - - + + Unsaved document Gorde gabeko dokumentua - + The exported object contains external link. Please save the documentat least once before exporting. Esportatutako objektuak kanpoko estekak ditu. Gorde dokumentua gutxienez behin hura esportatu baino lehen. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Kanpoko objektuekin estekatzeko, dokumentua gutxienez behin gorde behar da. @@ -6563,117 +6605,117 @@ Nola jarraitu nahi duzu? Gui::PythonConsole - + System exit Sistemaren irteera - + The application is still running. Do you want to exit without saving your data? Aplikazioa oraindik exekutatzen ari da. Datuak gorde gabe irten nahi duzu? - - - - + + + + Python console Python kontsola - + Unhandled PyCXX exception. Kudeatu gabeko PyCXX salbuespena. - + Unhandled FreeCAD exception. Kudeatu gabeko FreeCAD salbuespena. - + Unhandled std C++ exception. Kudeatu gabeko std C++ salbuespena. - + Unhandled unknown C++ exception. Kudeatu gabeko C++ salbuespena. - + &Copy &Kopiatu - + &Copy command &Kopiatu komandoa - + &Copy history Kopiatu &historia - + Save history as... Gorde historia honela... - + Save history Gorde historia - + Saves Python history across %1 sessions Python historia gordetzen du %1 saio artean - + &Paste &Itsatsi - + Select All Hautatu dena - + Clear console Garbitu kontsola - + Insert file name... Txertatu fitxategi-izena... - + Word wrap Testuaren egokitzea - + Save History Gorde historia - + Macro Files Makro-fitxategiak - + Insert file name Txertatu fitxategi-izena - + All Files Fitxategi guztiak @@ -6758,22 +6800,22 @@ Datuak gorde gabe irten nahi duzu? Gui::SearchBar - + Previous Aurrekoa - + Next Hurrengoa - + Case sensitive Maiuskulak/minuskulak - + Whole words Hitz osoak @@ -6890,17 +6932,17 @@ Beste direktorio bat aukeratu nahi al duzu? Gui::TaskCSysDragger - + Increments Gehikuntzak - + Translation Increment: Translazioaren gehikuntza: - + Rotation Increment: Biraketaren gehikuntza: @@ -7598,7 +7640,7 @@ Beste direktorio bat aukeratu nahi al duzu? About %1 - %1(r)i buruz + %1 aplikazioari buruz @@ -7725,37 +7767,42 @@ Beste direktorio bat aukeratu nahi al duzu? QDockWidget - + Tree view Zuhaitz-bista - + + Tasks + Atazak + + + Property view Propietateen bista - + Selection view Hautapen-bista - - Combo View - Bista konbinatua + + Model + Eredua - + DAG View DAG bista - + Report view Txosten-bista - + Python console Python kontsola @@ -7831,12 +7878,12 @@ Beste direktorio bat aukeratu nahi al duzu? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Sistema honek OpenGL %1.%2 bertsioa du. FreeCADek OpenGL 2.0 edo berriagoa behar du. Eguneratu zure txartel grafikoa edo bere kontrolagailua. - + Invalid OpenGL Version OpenGL bertsio baliogabea @@ -7877,71 +7924,71 @@ Beste direktorio bat aukeratu nahi al duzu? Esportatu fitxategia - + Printing... Inprimatzen... - + Exporting PDF... PDFa esportatzen... - - + + Unsaved document Gorde gabeko dokumentua - + The exported object contains external link. Please save the documentat least once before exporting. Esportatutako objektuak kanpoko estekak ditu. Gorde dokumentua gutxienez behin hura esportatu baino lehen. - - + + Delete failed Ezabatzeak huts egin du - + Dependency error Mendekotasun-errorea - + Copy selected Kopiatu hautatua - + Copy active document Kopiatu dokumentu aktiboa - + Copy all documents Kopiatu dokumentu guztiak - + Paste Itsatsi - + Expression error Adierazpen-errorea - + Failed to parse some of the expressions. Please check the Report View for more details. Adierazpenetako batzuk ezin izan dira analizatu. Begiratu txosten-bista xehetasun gehiagorako. - + Failed to paste expressions Adierazpenak itsasteak huts egin du @@ -8358,7 +8405,7 @@ Aukeratu 'Ez' dokumentu aktibokoak soilik desegiteko. Aukeratu 'Abortatu' abortatzeko. - + Save Macro Gorde makroa @@ -8427,7 +8474,7 @@ Mesedez, ireki nabigatzaile-leiho bat eta idatzi: http://localhost:%1.Ezin izan da zure sistemaren nabigatzailea ireki. - + Options... Aukerak... @@ -8474,42 +8521,42 @@ Mesedez, ireki nabigatzaile-leiho bat eta idatzi: http://localhost:%1.Elkarrizketa-koadro hau itxi nahi duzu? - + Do you want to save your changes to document '%1' before closing? '%1' dokumentuko aldaketak gorde nahi dituzu aplikazioa itxi baino lehen? - + Do you want to save your changes to document before closing? Dokumentuko aldaketak gorde nahi dituzu aplikazioa itxi baino lehen? - + If you don't save, your changes will be lost. Gordetzen ez baduzu, zure aldaketak galdu egingo dira. - + Apply answer to all Aplikatu erantzuna denei - + %1 Document(s) not saved %1 dokumentu ez dira gorde - + Some documents could not be saved. Do you want to cancel closing? Zenbait dokumentu ezin izan dira gorde. Ixtea bertan behera utzi nahi duzu? - + Delete macro Ezabatu makroa - + Not allowed to delete system-wide macros Ezin dira ezabatu sistemako makroak @@ -8529,12 +8576,17 @@ Mesedez, ireki nabigatzaile-leiho bat eta idatzi: http://localhost:%1.%1 ez dago hutsik, bere edukiak ere ezabatu nahi dituzu? - + Translation: Translazioa: - + + Translation XY: + Translation XY: + + + Rotation: Biraketa: @@ -8742,7 +8794,7 @@ egindako aldaketak galdu egingo direla. Aldatu irudia... - + Color Gradient Kolore-gradientea @@ -8794,13 +8846,13 @@ egindako aldaketak galdu egingo direla. &About %1 - %1(r)i &buruz + %1 aplikazioari &buruz About %1 - %1(r)i buruz + %1 aplikazioari buruz @@ -8848,13 +8900,13 @@ egindako aldaketak galdu egingo direla. StdCmdAlignment - + Alignment... Lerrokatzea... - - + + Align the selected objects Lerrokatu hautatutako objektuak @@ -8932,13 +8984,13 @@ egindako aldaketak galdu egingo direla. StdCmdCopy - + C&opy K&opiatu - - + + Copy operation Kopiatu eragiketa @@ -8946,13 +8998,13 @@ egindako aldaketak galdu egingo direla. StdCmdCut - + &Cut Mo&ztu - - + + Cut out Inausi @@ -8960,13 +9012,13 @@ egindako aldaketak galdu egingo direla. StdCmdDelete - + &Delete E&zabatu - - + + Deletes the selected objects Hautatutako objektuak ezabatzen ditu @@ -9114,13 +9166,13 @@ egindako aldaketak galdu egingo direla. StdCmdDuplicateSelection - + Duplicate selection Bikoiztu hautapena - - + + Put duplicates of the selected objects to the active document Ipini hautatutako objektuen bikoiztuak dokumentu aktiboan @@ -9128,17 +9180,17 @@ egindako aldaketak galdu egingo direla. StdCmdEdit - + Toggle &Edit mode Txandakatu &edizio modua - + Toggles the selected object's edit mode Hautatutako objektuaren edizio modua txandakatzen du - + Activates or Deactivates the selected object's edit mode Hautatutako objektuaren edizio modua aktibatzen edo desaktibatzen du @@ -9170,13 +9222,13 @@ egindako aldaketak galdu egingo direla. StdCmdExpression - + Expression actions Adierazpen-ekintzak - - + + Actions that apply to expressions Adierazpenei aplikatzen zaizkien ekintzak @@ -9668,19 +9720,19 @@ egindako aldaketak galdu egingo direla. StdCmdNew - + &New &Berria - - + + Create a new empty document Sortu dokumentu huts berri bat - + Unnamed Izenik gabea @@ -9763,13 +9815,13 @@ egindako aldaketak galdu egingo direla. StdCmdPaste - + &Paste &Itsatsi - - + + Paste operation Itsaste-eragiketa @@ -9777,13 +9829,13 @@ egindako aldaketak galdu egingo direla. StdCmdPlacement - + Placement... Kokapena... - - + + Place the selected objects Kokatu hautatutako objektuak @@ -9791,13 +9843,13 @@ egindako aldaketak galdu egingo direla. StdCmdPrint - + &Print... &Inprimatu... - - + + Print the document Inprimatu dokumentua @@ -9805,13 +9857,13 @@ egindako aldaketak galdu egingo direla. StdCmdPrintPdf - + &Export PDF... &Esportatu PDFa... - - + + Export the document as PDF Esportatu dokumentua PDF gisa @@ -9819,17 +9871,17 @@ egindako aldaketak galdu egingo direla. StdCmdPrintPreview - + &Print preview... Inprimatze-&aurrebista... - + Print the document Inprimatu dokumentua - + Print preview Inprimatze-aurrebista @@ -9837,13 +9889,13 @@ egindako aldaketak galdu egingo direla. StdCmdProjectInfo - + Project i&nformation... Proiektuaren i&nformazioa... - - + + Show details of the currently active project Erakutsi uneko proiektu aktiboaren xehetasunak @@ -9851,13 +9903,13 @@ egindako aldaketak galdu egingo direla. StdCmdProjectUtil - + Project utility... Proiektuen kudeaketa... - - + + Utility to extract or create project files Proiektu-fitxategiak erauzi edo sortzeko tresna @@ -9879,13 +9931,13 @@ egindako aldaketak galdu egingo direla. StdCmdQuit - + E&xit Ir&ten - - + + Quits the application Aplikaziotik irteten da @@ -9935,13 +9987,13 @@ egindako aldaketak galdu egingo direla. StdCmdRedo - + &Redo Be&rregin - - + + Redoes a previously undone action Aurretik desegindako ekintza bat berregiten du @@ -9949,13 +10001,13 @@ egindako aldaketak galdu egingo direla. StdCmdRefresh - + &Refresh &Freskatu - - + + Recomputes the current active document Uneko dokumentu aktiboa birkalkulatzen du @@ -9977,13 +10029,13 @@ egindako aldaketak galdu egingo direla. StdCmdRevert - + Revert Leheneratu - - + + Reverts to the saved version of this file Fitxategi honen gordetako bertsiora itzultzen da @@ -9991,13 +10043,13 @@ egindako aldaketak galdu egingo direla. StdCmdSave - + &Save &Gorde - - + + Save the active document Gorde dokumentu aktiboa @@ -10005,13 +10057,13 @@ egindako aldaketak galdu egingo direla. StdCmdSaveAll - + Save All Gorde dena - - + + Save all opened document Gorde irekitako dokumentu guztiak @@ -10019,13 +10071,13 @@ egindako aldaketak galdu egingo direla. StdCmdSaveAs - + Save &As... Gorde &honela... - - + + Save the active document under a new file name Gorde dokumentu aktiboa beste fitxategi-izen batekin @@ -10033,13 +10085,13 @@ egindako aldaketak galdu egingo direla. StdCmdSaveCopy - + Save a &Copy... Gorde &kopia bat... - - + + Save a copy of the active document under a new file name Gorde dokumentu aktiboaren kopia bat beste fitxategi-izen batekin @@ -10103,13 +10155,13 @@ egindako aldaketak galdu egingo direla. StdCmdSelectAll - + Select &All Hautatu &dena - - + + Select all Hautatu dena @@ -10341,13 +10393,13 @@ egindako aldaketak galdu egingo direla. StdCmdTransform - + Transform... Transformatu... - - + + Transform the geometry of selected objects Transformatu hautatutako objektuen geometria @@ -10355,13 +10407,13 @@ egindako aldaketak galdu egingo direla. StdCmdTransformManip - + Transform Transformatu - - + + Transform the selected object in the 3d view Transformatu 3D bistan hautatutako objektua @@ -10425,13 +10477,13 @@ egindako aldaketak galdu egingo direla. StdCmdUndo - + &Undo &Desegin - - + + Undo exactly one action Desegin ekintza bakar bat @@ -11231,7 +11283,7 @@ egindako aldaketak galdu egingo direla. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11242,7 +11294,7 @@ Ziur zaude jarraitu nahi duzula? - + Object dependencies Objektuaren mendekotasunak @@ -11331,12 +11383,12 @@ Ziur zaude jarraitu nahi duzula? Std_DuplicateSelection - + Object dependencies Objektuaren mendekotasunak - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Kanpoko objektuekin estekatzeko, dokumentua gutxienez behin gorde behar da. @@ -11354,7 +11406,7 @@ Dokumentua gorde nahi al duzu? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11368,17 +11420,17 @@ Jarraitu nahi al duzu? Std_Revert - + Revert document Leheneratu dokumentua - + This will discard all the changes since last file save. Honek fitxategia azken aldiz gorde zenetik izandako aldaketa guztiak baztertuko ditu. - + Do you want to continue? Jarraitu nahi duzu? @@ -12041,23 +12093,15 @@ FreeCAD abiarazi ondoren Irudi bat kargatzen du - - Gui::InteractiveScale - - - Enter desired distance between the points - Sartu puntuen arteko distantzia - - NaviCubeDraggableCmd - + Movable navigation cube Nabigazio-kubo mugikorra - + Drag and place NaviCube Arrastatu eta kokatu nabigazio-kuboa @@ -12532,77 +12576,72 @@ abioko pantaila erakutsiko du. Kudeatu hobespen-paketeak - + Small (%1px) Txikia (%1px) - + Medium (%1px) Ertaina (%1px) - + Large (%1px) Handia (%1px) - + Extra large (%1px) Oso handia (%1px) - + Custom (%1px) Pertsonalizatua (%1px) - + Combo View Bista konbinatua - + TreeView and PropertyView Zuhaitz-bista eta propietate-bista - - Both - Biak - - - + Preference Pack Name Hobespen-paketearen izena - + Tags Etiketak - + Apply Aplikatu - + Apply the %1 preference pack Aplikatu %1 hobespen-paketea - + Choose a FreeCAD config file to import Aukeratu inportatuko den FreeCAD konfigurazio-fitxategia - + File exists Fitxategi hori badago - + A preference pack with that name already exists. Overwrite? Badago izen hori duen hobespen-pakete bat. Gainidatzi? @@ -12910,4 +12949,18 @@ Orain gaiak erabili daitezke interfazea osorik pertsonalizatzeko. Hautapen-iragazki guztiak garbitu dira + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_fi.ts b/src/Gui/Language/FreeCAD_fi.ts index 052048ea9f..1aa481c75f 100644 --- a/src/Gui/Language/FreeCAD_fi.ts +++ b/src/Gui/Language/FreeCAD_fi.ts @@ -122,12 +122,12 @@ Tuonti - + Delete Poista - + Paste expressions Liitä lausekkeet @@ -188,9 +188,9 @@ Sijainti + - Transform Muunna @@ -220,7 +220,7 @@ Kytke valintakyvykkyys pois/päälle - + Edit image Edit image @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Peruuta - - Gui::ControlSingleton - - - Task panel - Tehtävä paneeli - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. Makron nimi: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Käyttäjän makrot - + System macros Järjestelmän makrot - + Execute Suorita - + Close Sulje - + Create Luo - + Delete Poista - + Edit Muokkaa - + Rename Nimeä uudelleen - + Duplicate Monista - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Työkalupalkki - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download Lataa ohjelma - + User macros location: Käyttäjän makrojen sijainti: @@ -1898,72 +1910,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makrot - + Read-only Vain luku - + Macro file Makro-tiedosto - + Enter a file name, please: Anna tiedostolle nimi: - - - + + + Existing file Olemassa oleva tiedosto - + '%1'. This file already exists. "%1". Tämä tiedosto on jo olemassa. - + Cannot create file Tiedostoa ei voi luoda - + Creation of file '%1' failed. Tiedoston '%1' luonti epäonnistui. - + Delete macro Poista makro - + Do you really want to delete the macro '%1'? Haluatko varmasti poistaa makron '%1'? - + Do not show again Älä näytä uudestaan - + Guided Walkthrough Opastettu kävelykierros - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Huomautus: muutokset otetaan käyttöön, kun seuraavan kerran vaihdat työpöyt - + Walkthrough, dialog 1 of 2 kävelykierros, valintaikkuna 1 (2:sta) - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Kävelykierros: Täytä puuttuvat kentät (valinnainen) ja napsauta Lisää ja sulje - + Walkthrough, dialog 1 of 1 kävelykierros, valintaikkuna 1 (1:stä) - + Walkthrough, dialog 2 of 2 kävelykierros, valintaikkuna 2 (2:sta) - + Walkthrough instructions: Click right arrow button (->), then Close. Kävelyohjeet: Napsauta oikeaa nuolinäppäintä (->), ja sulje se. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Kävelyohjeet: Klikkaa uusi, napsauta oikeaa nuolinäppäintä (->), ja sulje se. - + Renaming Macro File Uudelleennimetään Makrotiedosto - - + + Enter new name: Syötä uusi nimi: - - + + '%1' already exists. '%1' on jo olemassa. - + Rename Failed Uudelleennimeäminen epäonnistui - + Failed to rename to '%1'. Perhaps a file permission error? Ei voitu nimetä uudelleen '%1'. Ehkä tiedoston käyttöoikeusvirhe? - + Duplicate Macro Monista makro - + Duplicate Failed Monistaminen epäonnistui - + Failed to duplicate to '%1'. Perhaps a file permission error? Ei voitu monistaa '%1':ksi. @@ -4314,6 +4326,16 @@ vaakatilan Python-konsolissa Save history Tallenna historia + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4428,16 +4450,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4460,7 +4507,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4490,17 +4537,17 @@ Larger value eases to pick things, but can make small features impossible to sel Aktiivisten säiliöiden taustaväri puunäkymässä - + Central: Central: - + Midway: Midway: - + End: End: @@ -5478,22 +5525,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Yhdistelmänäkymä - - - - Model - Malli - - - - - Tasks - Tehtävät - Gui::DockWnd::PropertyDockView @@ -5720,12 +5755,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Muokattu tiedosto - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5734,53 +5769,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Tallentamaton asiakirja - + The document has been modified. Do you want to save your changes? Asiakirjaa on muokattu. Haluatko tallentaa muutokset? - + FreeCAD macro FreeCAD-makro - + Export PDF Vie PDF - + PDF file PDF-tiedosto - + untitled[*] Nimetön[*] - + - Editor -Muokkain - + %1 chars removed %1 merkit poistettu - + %1 chars added %1 merkkiä lisätty - + Formatted Alustettu @@ -5931,39 +5966,46 @@ Do you want to save your changes? Graphviz ei pystynyt luomaan kuvatiedostoa - + PNG format PNG-muoto - + Bitmap format Bitmap-muoto - + GIF format GIF-muoto - + JPG format JPG-muoto - + SVG format SVG-muoto - - + + PDF format PDF-muoto - - + + + Graphviz format + Graphviz format + + + + + Export graph Vie kaavio @@ -6124,7 +6166,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Mitta @@ -6134,62 +6176,62 @@ Do you want to save your changes? Valmis - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Avaa lisäosien hallinta - + Close All Sulje kaikki - - - + + + Toggles this toolbar Näyttä tai piilota tämä työkalurivi - - - + + + Toggles this dockable window Näytä tai piilota telakointiasema ikkunasta - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Tallentamaton asiakirja - + The exported object contains external link. Please save the documentat least once before exporting. Viety objekti sisältää ulkoisen linkin. Tallenna asiakirja vähintään kerran ennen vientiä. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Linkittääksesi ulkoisiin objekteihin, asiakirja on tallennettava vähintään kerran. @@ -6560,116 +6602,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit Poistu järjestelmästä - + The application is still running. Do you want to exit without saving your data? Sovellus on edelleen käynnissä. Haluatko lopettaa tallentamatta tietoja? - - - - + + + + Python console Python-konsoli - + Unhandled PyCXX exception. Käsittelemätön PyCXX poikkeus. - + Unhandled FreeCAD exception. Käsittelemätön FreeCAD poikkeus. - + Unhandled std C++ exception. Käsittelemätön std C++-poikkeus. - + Unhandled unknown C++ exception. Käsittelemätön tuntematon C++-poikkeus. - + &Copy &Kopioi - + &Copy command &Kopioi komento - + &Copy history &Kopiointi historia - + Save history as... Tallenna historia nimellä... - + Save history Tallenna historia - + Saves Python history across %1 sessions Tallentaa Pythonin historian %1 istunnon aikana - + &Paste &Liitä - + Select All Valitse kaikki - + Clear console Tyhjennä konsoli - + Insert file name... Lisää tiedostonimi... - + Word wrap Rivitys - + Save History Tallenna historia - + Macro Files Makrotiedostot - + Insert file name Lisää tiedostonimi - + All Files Kaikki tiedostot @@ -6754,22 +6796,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Edellinen - + Next Seuraava - + Case sensitive Case sensitive - + Whole words Whole words @@ -6886,17 +6928,17 @@ Haluatko valita toisen hakemiston? Gui::TaskCSysDragger - + Increments Lisäykset - + Translation Increment: Käännöksen lisäys: - + Rotation Increment: Käännöksen lisäys: @@ -7721,37 +7763,42 @@ Haluatko valita toisen hakemiston? QDockWidget - + Tree view Puunäkymä - + + Tasks + Tehtävät + + + Property view Ominaisuusnäkymä - + Selection view Valintanäkymä - - Combo View - Yhdistelmänäkymä + + Model + Malli - + DAG View DAG-näkymä - + Report view Raporttinäkymä - + Python console Python-konsoli @@ -7827,12 +7874,12 @@ Haluatko valita toisen hakemiston? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7873,71 +7920,71 @@ Haluatko valita toisen hakemiston? Vie tiedosto - + Printing... Tulostaminen... - + Exporting PDF... Viedään PDF... - - + + Unsaved document Tallentamaton asiakirja - + The exported object contains external link. Please save the documentat least once before exporting. Viety objekti sisältää ulkoisen linkin. Tallenna asiakirja vähintään kerran ennen vientiä. - - + + Delete failed Poistaminen epäonnistui - + Dependency error Riippuvuusvirhe - + Copy selected Kopioi valitut - + Copy active document Kopioi aktiivinen asiakirja - + Copy all documents Kopioi kaikki asiakirjat - + Paste Liitä - + Expression error Lausekevirhe - + Failed to parse some of the expressions. Please check the Report View for more details. Joitakin lausekkeita ei voitu jäsentää. Ole hyvä ja tarkista raporttinäkymä saadaksesi lisätietoja. - + Failed to paste expressions Lausekkeiden liittäminen epäonnistui @@ -8354,7 +8401,7 @@ Valitse 'Ei' palataksesi vain aktiiviseen asiakirjaan. Valitse 'Abort' keskeyttääksesi - + Save Macro Tallenna makro @@ -8421,7 +8468,7 @@ Please open a browser window and type in: http://localhost:%1. Järjestelmän selaimen avaaminen ei onnistu. - + Options... Asetukset... @@ -8468,42 +8515,42 @@ Please open a browser window and type in: http://localhost:%1. Haluatko sulkea tämän valintaikkunan? - + Do you want to save your changes to document '%1' before closing? Haluatko tallentaa asiakirjan "%1" muutokset ennen sulkemista? - + Do you want to save your changes to document before closing? Haluatko tallentaa asiakirjan muutokset ennen sulkemista? - + If you don't save, your changes will be lost. Jos et tallenna, niin tekemäsi muutokset menetetään. - + Apply answer to all Käytä samaa vastausta kaikkiin - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Some documents could not be saved. Do you want to cancel closing? - + Delete macro Poista makro - + Not allowed to delete system-wide macros Järjestelmän laajuisten makrojen poistaminen ei ole sallittua @@ -8523,12 +8570,17 @@ Please open a browser window and type in: http://localhost:%1. The %1 ei ole tyhjä, poista myös sen sisältö? - + Translation: Sijainti: - + + Translation XY: + Translation XY: + + + Rotation: Kierto: @@ -8738,7 +8790,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8844,13 +8896,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Tasaus... - - + + Align the selected objects Tasaa valitut objektit @@ -8928,13 +8980,13 @@ the current copy will be lost. StdCmdCopy - + C&opy K&opioi - - + + Copy operation Kopiointitoiminto @@ -8942,13 +8994,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Leikkaa - - + + Cut out Leikkaa pois @@ -8956,13 +9008,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Poista - - + + Deletes the selected objects Poistaa valitut objektit @@ -9110,13 +9162,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Moninkertainen valinta - - + + Put duplicates of the selected objects to the active document Laita valittujen objektien kaksoiskappaleet aktiiviseen asiakirjaan @@ -9124,17 +9176,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Vaihda &muokkaustila - + Toggles the selected object's edit mode Vaihtaa valitun objektin muokkaustilan - + Activates or Deactivates the selected object's edit mode Aktivoi tai deaktivoi valitun objektin muokkaustila @@ -9166,13 +9218,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Lausekkeen toiminnot - - + + Actions that apply to expressions Actions that apply to expressions @@ -9664,19 +9716,19 @@ the current copy will be lost. StdCmdNew - + &New &Uusi - - + + Create a new empty document Luo uusi tyhjä asiakirja - + Unnamed Nimetön @@ -9759,13 +9811,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Liitä - - + + Paste operation Liittämistoiminto @@ -9773,13 +9825,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Sijainti... - - + + Place the selected objects Siirrä valitut objektit @@ -9787,13 +9839,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Tulosta... - - + + Print the document Tulosta asiakirja @@ -9801,13 +9853,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Vie PDF-asiakirjaan... - - + + Export the document as PDF Vie asiakirja PDF-tiedostona @@ -9815,17 +9867,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Esikatselu... - + Print the document Tulosta asiakirja - + Print preview Tulostuksen esikatselu @@ -9833,13 +9885,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Projektin t&iedot... - - + + Show details of the currently active project Näytä aktiivisen projektin tiedot @@ -9847,13 +9899,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Projektin apuvälineet... - - + + Utility to extract or create project files Apuohjelma jolla purkaa tai luoda projektitiedostoja @@ -9875,13 +9927,13 @@ the current copy will be lost. StdCmdQuit - + E&xit L&opeta - - + + Quits the application Lopeta sovellus @@ -9931,13 +9983,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Tee uudelleen - - + + Redoes a previously undone action Tekee uudelleen viimeksi kumotun toiminnon @@ -9945,13 +9997,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Päivitä - - + + Recomputes the current active document Laskee uudelleen aktiivisen dokumentin tiedot @@ -9973,13 +10025,13 @@ the current copy will be lost. StdCmdRevert - + Revert Palauta - - + + Reverts to the saved version of this file Palauttaa tämän tiedoston tallennettuun versioon @@ -9987,13 +10039,13 @@ the current copy will be lost. StdCmdSave - + &Save &Tallenna - - + + Save the active document Tallenna aktiivinen asiakirja @@ -10001,13 +10053,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Tallenna kaikki - - + + Save all opened document Tallenna kaikki avatut asiakirjat @@ -10015,13 +10067,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Tallenna &nimellä... - - + + Save the active document under a new file name Tallentaa aktiivisen asiakirjan uudella tiedostonimellä @@ -10029,13 +10081,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Tallenna &kopio... - - + + Save a copy of the active document under a new file name Tallenna kopio asiakirjasta uudelle tiedostonimelle @@ -10099,13 +10151,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Valitse &kaikki - - + + Select all Valitse kaikki @@ -10337,13 +10389,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Muunna... - - + + Transform the geometry of selected objects Muuta valittujen objektien geometriaa @@ -10351,13 +10403,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Muunna - - + + Transform the selected object in the 3d view Muunna valittuja objekteja 3D-näkymässä @@ -10421,13 +10473,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Kumoa - - + + Undo exactly one action Kumoa täsmälleen yksi teko @@ -11227,7 +11279,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11238,7 +11290,7 @@ Oletko varma, että haluat jatkaa? - + Object dependencies Objektin riippuvuudet @@ -11327,12 +11379,12 @@ Oletko varma, että haluat jatkaa? Std_DuplicateSelection - + Object dependencies Objektin riippuvuudet - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Linkittääksesi ulkoisiin objekteihin, asiakirja on tallennettava vähintään kerran. @@ -11350,7 +11402,7 @@ Haluatko tallentaa asiakirjan nyt? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11364,17 +11416,17 @@ Haluatko silti jatkaa? Std_Revert - + Revert document Palauta asiakirja - + This will discard all the changes since last file save. Tämä hylkää kaikki muutokset viimeisimmän tiedostotallennuksen jälkeen. - + Do you want to continue? Haluatko jatkaa? @@ -12037,23 +12089,15 @@ FreeCAD käynnistyksen jälkeen Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12528,77 +12572,72 @@ väläysikkunan. Manage preference packs - + Small (%1px) Pieni (%1px) - + Medium (%1px) Keskitaso (%1px) - + Large (%1px) Suuri (%1px) - + Extra large (%1px) Erittäin suuri (%1px) - + Custom (%1px) Mukautettu (%1px) - + Combo View Yhdistelmänäkymä - + TreeView and PropertyView Puunäkymä ja ominaisuusnäkymä - - Both - Molemmat - - - + Preference Pack Name Preference Pack Name - + Tags Tags - + Apply Käytä - + Apply the %1 preference pack Apply the %1 preference pack - + Choose a FreeCAD config file to import Valitse tuotava FreeCAD-asetustiedosto - + File exists Tiedosto on olemassa - + A preference pack with that name already exists. Overwrite? A preference pack with that name already exists. Overwrite? @@ -12906,4 +12945,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_fr.ts b/src/Gui/Language/FreeCAD_fr.ts index f8338aef71..84420218aa 100644 --- a/src/Gui/Language/FreeCAD_fr.ts +++ b/src/Gui/Language/FreeCAD_fr.ts @@ -122,12 +122,12 @@ Importer - + Delete Supprimer - + Paste expressions Coller les expressions @@ -188,9 +188,9 @@ Positionnement + - Transform Transformer @@ -220,7 +220,7 @@ Basculer la sélectivité - + Edit image Modifier l'image @@ -413,7 +413,7 @@ Default - Par défaut + Défaut @@ -587,7 +587,7 @@ Press middle mouse button - Appuyer sur la roulette de la souris + Appuyez sur la roulette de la souris @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Annuler - - Gui::ControlSingleton - - - Task panel - Panneau de Tâches - - Gui::DAG::Model @@ -1390,7 +1382,7 @@ same time. The one with the highest priority will be triggered. none - rien + aucun @@ -1823,72 +1815,92 @@ same time. The one with the highest priority will be triggered. Nom de la macro : - - User macros - Macros utilisateur + + Find file: + Find file: - + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + + User macros + Macros de l'utilisateur + + + System macros Macros du système - + Execute Lancer - + Close Fermer - + Create Créer - + Delete Supprimer - + Edit Éditer - + Rename Renommer - + Duplicate Doublon - + Launch a guide on how to set up a macro in a custom global toolbar. Lance un guide sur la façon de configurer une macro dans une barre d'outils globale personnalisée. - + Toolbar Barre d'outils - + Open Addon Manager where macros created by the community and other addons can be downloaded. Ouvrir le gestionnaire des extensions où sont les macros créées par la communauté et d'autres extensions peuvent être téléchargées. - + Download Télécharger - + User macros location: Emplacement des macros de l'utilisateur : @@ -1896,71 +1908,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Lecture seule - + Macro file Fichier de la macro - + Enter a file name, please: Veuillez saisir un nom de fichier : - - - + + + Existing file Fichier existant - + '%1'. This file already exists. '%1'. Ce fichier existe déjà. - + Cannot create file Impossible de créer le fichier - + Creation of file '%1' failed. Échec de la création du fichier « %1 ». - + Delete macro Supprimer la macro - + Do you really want to delete the macro '%1'? Voulez-vous vraiment supprimer la macro "% 1" ? - + Do not show again Ne plus afficher ce message - + Guided Walkthrough Visite guidée - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1971,77 +1983,77 @@ Remarque : vos modifications seront appliquées lorsque vous changerez d'atelier - + Walkthrough, dialog 1 of 2 Parcourir, boîte de dialogue 1 sur 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instructions pour la marche à suivre : remplissez les champs manquants (facultatif) puis cliquez sur Ajouter, puis sur Fermer - + Walkthrough, dialog 1 of 1 Parcourir, boîte de dialogue 1 sur 1 - + Walkthrough, dialog 2 of 2 Parcourir, boîte de dialogue 2 sur 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instructions de passage : Cliquez sur la flèche droite (->), puis Fermez. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instructions de passage : Cliquez sur le bouton Nouveau, puis sur la flèche droite (->), puis sur Fermer. - + Renaming Macro File Renommer le fichier de macro - - + + Enter new name: Indiquer un nouveau nom : - - + + '%1' already exists. '%1' existe déjà. - + Rename Failed Échec du renommage - + Failed to rename to '%1'. Perhaps a file permission error? Impossible de renommer en "%1". Peut-être une erreur de permission des fichiers ? - + Duplicate Macro Dupliquer la macro - + Duplicate Failed Échec de la duplication - + Failed to duplicate to '%1'. Perhaps a file permission error? Impossible de dupliquer "%1". @@ -2689,7 +2701,7 @@ Veuillez spécifier un autre répertoire. WARNING: this process will undo any preference changes made since the specified date, and will also reset your Recent files and Macros to their state on that date. - AVERTISSEMENT : ce processus annulera tous les changements de préférences effectués depuis la date spécifiée, et réinitialisera également vos fichiers récents et vos macros à leur état à cette date. + ATTENTION : ce processus annulera tous les changements de préférences effectués depuis la date spécifiée, et réinitialisera également vos fichiers récents et vos macros à leur état à cette date. @@ -3127,7 +3139,7 @@ la taille de la boîte englobante de l'objet 3D affichée. Unknown - Inconnu + inconnu @@ -3343,7 +3355,7 @@ en plus de la barre de couleur Using Undo/Redo on documents - Utiliser Annuler / Rétablir sur les documents + Utiliser Annuler/Rétablir sur les documents @@ -3450,8 +3462,8 @@ Les tailles communes sont 128, 256 et 512 Backup files will get extension '.FCbak' and file names get date suffix according to the specified format - Les fichiers de sauvegarde recevront l'extension '.FCbak' et les noms de fichiers -récupèrent le suffixe de date selon le format spécifié + Les fichiers de sauvegarde recevront l'extension ".FCbak" et les noms de fichiers +auront le suffixe de date selon le format spécifié @@ -3466,7 +3478,7 @@ récupèrent le suffixe de date selon le format spécifié Document objects - Objets documents + Objets dans les documents @@ -3499,7 +3511,7 @@ dans la vue arborescence pour le recharger complètement. Authoring and License - Création et Licence + Création et licence @@ -4015,7 +4027,7 @@ Vous pouvez également utiliser la forme : John Doe <john@doe.com> Default - Défaut + Par défaut @@ -4303,6 +4315,16 @@ dans la console Python Save history Enregistrer l'historique + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4417,16 +4439,41 @@ Une valeur plus grande facilite la sélection, mais peut rendre les petites fonc - + Top: En haut : - + Middle: Milieu : + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4449,7 +4496,7 @@ Une valeur plus grande facilite la sélection, mais peut rendre les petites fonc - + Bottom: En bas : @@ -4479,17 +4526,17 @@ Une valeur plus grande facilite la sélection, mais peut rendre les petites fonc Couleur de fond pour les conteneurs actifs dans la vue en arborescence - + Central: Au centre : - + Midway: Au milieu : - + End: Au bord : @@ -5217,7 +5264,7 @@ La colonne "État" indique si le document a pu être récupéré. Please select 1, 2, or 3 points before clicking this button. A point may be on a vertex, face, or edge. If on a face or edge the point used will be the point at the mouse position along face or edge. If 1 point is selected it will be used as the center of rotation. If 2 points are selected the midpoint between them will be the center of rotation and a new custom axis will be created, if needed. If 3 points are selected the first point becomes the center of rotation and lies on the vector that is normal to the plane defined by the 3 points. Some distance and angle information is provided in the report view, which can be useful when aligning objects. For your convenience when Shift + click is used the appropriate distance or angle is copied to the clipboard. - Veuillez sélectionner 1, 2 ou 3 points avant de cliquer sur ce bouton. Un point peut être sur un sommet, une face ou une arête. S'il est sur une face ou une arête, le point utilisé sera le point à la position de la souris le long de la face ou de l'arête. Si 1 point est sélectionné, il sera utilisé comme centre de rotation. Si 2 points sont choisis, le point médian sera le centre de rotation et un nouvel axe personnalisé sera créé, si nécessaire. Si 3 points sont choisis, le premier point devient le centre de rotation et se trouve sur le vecteur qui est perpendiculaire au plan défini par les 3 points. Des informations de distance et d’angle sont fournies dans la vue rapport, ce qui peut être utile pour aligner des objets. Pour plus de commodité, lorsque vous utilisez Maj + clic, la distance ou l'angle approprié est copié dans le presse-papiers. + Sélectionner 1, 2 ou 3 points avant de cliquer sur ce bouton. Un point peut être sur un sommet, une face ou une arête. S'il est sur une face ou une arête, le point utilisé sera le point à la position de la souris le long de la face ou de l'arête. Si 1 point est sélectionné, il sera utilisé comme centre de rotation. Si 2 points sont sélectionnés, le point médian sera le centre de rotation et un nouvel axe personnalisé sera créé, si nécessaire. Si 3 points sont sélectionnés, le premier point devient le centre de rotation et se trouve sur le vecteur qui est perpendiculaire au plan défini par les 3 points. Des informations de distance et d’angle sont fournies dans la Vue rapport, ce qui peut être utile pour aligner des objets. Pour plus de commodité, lorsque vous utilisez Maj + clic, la distance ou l'angle approprié est copié dans le presse-papiers. @@ -5467,22 +5514,10 @@ initialement sélectionnés avant d'ouvrir ce dialogue Gui::DockWnd::ComboView - + Combo View Vue combinée - - - - Model - Modèle - - - - - Tasks - Tâches - Gui::DockWnd::PropertyDockView @@ -5514,7 +5549,7 @@ initialement sélectionnés avant d'ouvrir ce dialogue Log messages - Journal des messages + Logs @@ -5537,7 +5572,7 @@ initialement sélectionnés avant d'ouvrir ce dialogue Show Report view on - Afficher la vue du rapport sur + Afficher la Vue du rapport sur @@ -5709,12 +5744,12 @@ initialement sélectionnés avant d'ouvrir ce dialogue Gui::EditorView - + Modified file Fichier modifié - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5723,54 +5758,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Document non sauvegardé - + The document has been modified. Do you want to save your changes? Le document a été modifié. Voulez enregistrer les modifications ? - + FreeCAD macro Macro de FreeCAD - + Export PDF Exporter vers PDF - + PDF file Fichier PDF - + untitled[*] sansnom[*] - + - Editor - Éditeur - + %1 chars removed %1 caractères supprimés - + %1 chars added %1 caractères ajoutés - + Formatted Formaté @@ -5921,39 +5956,46 @@ Voulez enregistrer les modifications ? Graphviz n'a pas pu créer un fichier d'image - + PNG format Format PNG - + Bitmap format Format bitmap - + GIF format Format GIF - + JPG format Format JPG - + SVG format Format SVG - - + + PDF format Format PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Export graphique @@ -5991,7 +6033,7 @@ Voulez enregistrer les modifications ? Scroll middle mouse button - Faites rouler la roulette de la souris + Faites défiler le bouton milieu de la souris @@ -6114,7 +6156,7 @@ Voulez enregistrer les modifications ? Gui::MainWindow - + Dimension Dimension @@ -6124,62 +6166,62 @@ Voulez enregistrer les modifications ? Prêt - + Help addon needed! Extension d'aide nécessaire ! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Le système d'aide de %1 est maintenant géré par l'extension "Help". Il peut facilement être installé via le gestionnaire des extensions - + Open Addon Manager Ouvrir le gestionnaire des extensions - + Close All Fermer tout - - - + + + Toggles this toolbar Bascule cette barre d'outils - - - + + + Toggles this dockable window Bascule cette fenêtre dockable - + WARNING: This is a development version. ATTENTION : ceci est une version de développement. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Merci de ne pas l'utiliser dans un environnement de production. - - + + Unsaved document Document non enregistré - + The exported object contains external link. Please save the documentat least once before exporting. L'objet exporté contient un lien externe. Veuillez enregistrer le document au moins une fois avant l'exportation. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Pour créer un lien vers des objets externes, le document doit être enregistré au moins une fois. @@ -6548,117 +6590,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Sortie système - + The application is still running. Do you want to exit without saving your data? L'application est en cours d'exécution. Voulez vous quitter sans sauvegarder vos données? - - - - + + + + Python console Console Python - + Unhandled PyCXX exception. Exception PyCXX non gérée. - + Unhandled FreeCAD exception. Exception FreeCad non gérée. - + Unhandled std C++ exception. Exception non gérée de std C++. - + Unhandled unknown C++ exception. Exception C++ non gérée et/ou inconnue. - + &Copy &Copier - + &Copy command &Copier la commande - + &Copy history &Copier l'historique - + Save history as... Sauvegarder l'historique sous... - + Save history Enregistrer l'historique - + Saves Python history across %1 sessions Enregistre l'historique Python sur %1 sessions - + &Paste &Coller - + Select All Tout sélectionner - + Clear console Vider la console - + Insert file name... Insérez un nom de fichier... - + Word wrap Retour à la ligne - + Save History Sauvegarder l'historique - + Macro Files Fichiers de macros - + Insert file name Insérez un nom de fichier - + All Files Tous les fichiers @@ -6699,7 +6741,7 @@ Voulez vous quitter sans sauvegarder vos données? none - aucun + rien @@ -6743,22 +6785,22 @@ Voulez vous quitter sans sauvegarder vos données? Gui::SearchBar - + Previous Précédent - + Next Suivant - + Case sensitive Sensible à la casse - + Whole words Mots entiers @@ -6873,17 +6915,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Incréments - + Translation Increment: Incrément de translation : - + Rotation Increment: Incrément de rotation : @@ -7048,7 +7090,7 @@ Do you want to specify another directory? Press middle mouse button - Appuyez sur la roulette de la souris + Appuyer sur la roulette de la souris @@ -7058,7 +7100,7 @@ Do you want to specify another directory? Scroll middle mouse button - Faites défiler le bouton milieu de la souris + Faites rouler la roulette de la souris @@ -7708,37 +7750,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Vue arborescente - + + Tasks + Tâches + + + Property view Affichage des propriétés - + Selection view Vue de la sélection - - Combo View - Vue combinée + + Model + Modèle - + DAG View Vue du DAG - + Report view Vue rapport - + Python console Console Python @@ -7814,12 +7861,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Ce système utilise OpenGL %1.%2. FreeCAD nécessite OpenGL 2.0 ou supérieur. Veuillez mettre à jour votre pilote graphique et/ou votre carte si nécessaire. - + Invalid OpenGL Version Version d'OpenGL non valide @@ -7860,71 +7907,71 @@ Do you want to specify another directory? Exporter un fichier - + Printing... Impression... - + Exporting PDF... Exportation PDF ... - - + + Unsaved document Document non sauvegardé - + The exported object contains external link. Please save the documentat least once before exporting. L'objet exporté contient un lien externe. Veuillez enregistrer le document au moins une fois avant l'exportation. - - + + Delete failed La suppression a échoué - + Dependency error Erreur de dépendance - + Copy selected Copier la sélection - + Copy active document Copier le document actif - + Copy all documents Copier tous les documents - + Paste Coller - + Expression error Erreur d'expression - + Failed to parse some of the expressions. Please check the Report View for more details. Echec de l'analyse de certaines expressions. -Consultez la vue rapport pour plus de détails. +Consultez la Vue rapport pour plus de détails. - + Failed to paste expressions Echec du collage des expressions @@ -8192,7 +8239,7 @@ Do you want to continue? Please check report view for more... - Veuillez consulter la vue du rapport pour plus... + Veuillez consulter la Vue rapport pour plus... @@ -8339,7 +8386,7 @@ Choisissez "Non" pour revenir en arrière dans le document actif uniquement. Choisissez "Abandonner" pour annuler - + Save Macro Enregistrer la macro @@ -8408,7 +8455,7 @@ Veuillez ouvrir une fenêtre de navigateur et saisir : http://localhost:%1.Impossible d'ouvrir le navigateur système. - + Options... Options... @@ -8455,42 +8502,42 @@ Veuillez ouvrir une fenêtre de navigateur et saisir : http://localhost:%1.Voulez-vous fermer cette fenêtre de dialogue? - + Do you want to save your changes to document '%1' before closing? Voulez-vous enregistrer les modifications apportées au document "%1" avant sa fermeture ? - + Do you want to save your changes to document before closing? Voulez-vous enregistrer les modifications apportées au document avant sa fermeture ? - + If you don't save, your changes will be lost. Si vous n'enregistrez pas, vos modifications seront perdues. - + Apply answer to all Appliquez la réponse à tout - + %1 Document(s) not saved Document(s) %1 non enregistré(s) - + Some documents could not be saved. Do you want to cancel closing? Certains documents n'ont pas pu être enregistrés. Voulez-vous annuler la fermeture ? - + Delete macro Supprimer la macro - + Not allowed to delete system-wide macros Pas autorisé à supprimer les macros de l'ensemble du système @@ -8510,12 +8557,17 @@ Veuillez ouvrir une fenêtre de navigateur et saisir : http://localhost:%1.Le %1 n’est pas vide, supprimer son contenu quand même ? - + Translation: Translation : - + + Translation XY: + Translation XY: + + + Rotation: Rotation : @@ -8725,7 +8777,7 @@ apportée à la copie en cours sera perdue. Modifier l'image... - + Color Gradient Dégradé de couleur @@ -8831,13 +8883,13 @@ apportée à la copie en cours sera perdue. StdCmdAlignment - + Alignment... Aligner... - - + + Align the selected objects Aligner les objets sélectionnés @@ -8915,13 +8967,13 @@ apportée à la copie en cours sera perdue. StdCmdCopy - + C&opy C&opier - - + + Copy operation Opération de copie @@ -8929,13 +8981,13 @@ apportée à la copie en cours sera perdue. StdCmdCut - + &Cut &Couper - - + + Cut out Découpe @@ -8943,13 +8995,13 @@ apportée à la copie en cours sera perdue. StdCmdDelete - + &Delete &Supprimer - - + + Deletes the selected objects Supprimer les objets sélectionnés @@ -9097,13 +9149,13 @@ apportée à la copie en cours sera perdue. StdCmdDuplicateSelection - + Duplicate selection Dupliquer la sélection - - + + Put duplicates of the selected objects to the active document Mettre la duplication des objets sélectionnés dans le document actif @@ -9111,17 +9163,17 @@ apportée à la copie en cours sera perdue. StdCmdEdit - + Toggle &Edit mode Basculer le mode d'é&dition - + Toggles the selected object's edit mode Active ou désactive le mode d'édition de l'objet sélectionné - + Activates or Deactivates the selected object's edit mode Active ou désactive le mode d'édition de l'objet sélectionné @@ -9153,13 +9205,13 @@ apportée à la copie en cours sera perdue. StdCmdExpression - + Expression actions Actions sur les expressions - - + + Actions that apply to expressions Actions s’appliquant à des expressions @@ -9599,7 +9651,7 @@ apportée à la copie en cours sera perdue. Measure distance - Mesurer la distance + Mesurer une distance @@ -9613,7 +9665,7 @@ apportée à la copie en cours sera perdue. Measure distance - Mesurer une distance + Mesurer la distance @@ -9651,19 +9703,19 @@ apportée à la copie en cours sera perdue. StdCmdNew - + &New &Nouveau - - + + Create a new empty document Créer un nouveau document vide - + Unnamed Sans nom @@ -9746,13 +9798,13 @@ apportée à la copie en cours sera perdue. StdCmdPaste - + &Paste &Coller - - + + Paste operation Opération de collage @@ -9760,13 +9812,13 @@ apportée à la copie en cours sera perdue. StdCmdPlacement - + Placement... Positionnement... - - + + Place the selected objects Positionner les objets sélectionnés @@ -9774,13 +9826,13 @@ apportée à la copie en cours sera perdue. StdCmdPrint - + &Print... &Imprimer... - - + + Print the document Imprimer le document @@ -9788,13 +9840,13 @@ apportée à la copie en cours sera perdue. StdCmdPrintPdf - + &Export PDF... &Exporter au format PDF... - - + + Export the document as PDF Exporter le document au format PDF @@ -9802,17 +9854,17 @@ apportée à la copie en cours sera perdue. StdCmdPrintPreview - + &Print preview... &Aperçu avant impression... - + Print the document Imprimer le document - + Print preview Aperçu avant impression @@ -9820,13 +9872,13 @@ apportée à la copie en cours sera perdue. StdCmdProjectInfo - + Project i&nformation... I&nformations sur le projet ... - - + + Show details of the currently active project Afficher les détails du projet actif @@ -9834,13 +9886,13 @@ apportée à la copie en cours sera perdue. StdCmdProjectUtil - + Project utility... Utilitaire de projet... - - + + Utility to extract or create project files Utilitaire pour extraire ou créer des fichiers de projet @@ -9862,13 +9914,13 @@ apportée à la copie en cours sera perdue. StdCmdQuit - + E&xit &Quitter - - + + Quits the application Quitte l'application @@ -9918,13 +9970,13 @@ apportée à la copie en cours sera perdue. StdCmdRedo - + &Redo &Rétablir - - + + Redoes a previously undone action Rétablit une action précédemment annulée @@ -9932,13 +9984,13 @@ apportée à la copie en cours sera perdue. StdCmdRefresh - + &Refresh &Actualiser - - + + Recomputes the current active document Recalculer le document actif @@ -9960,13 +10012,13 @@ apportée à la copie en cours sera perdue. StdCmdRevert - + Revert Rétablir - - + + Reverts to the saved version of this file Revenir à la version enregistrée de ce fichier @@ -9974,13 +10026,13 @@ apportée à la copie en cours sera perdue. StdCmdSave - + &Save &Enregistrer - - + + Save the active document Enregistrer le document actif @@ -9988,13 +10040,13 @@ apportée à la copie en cours sera perdue. StdCmdSaveAll - + Save All Enregistrer tout - - + + Save all opened document Enregistrer tous les documents ouverts @@ -10002,13 +10054,13 @@ apportée à la copie en cours sera perdue. StdCmdSaveAs - + Save &As... Enregistrer &sous… - - + + Save the active document under a new file name Enregistrer le document actif sous un nouveau nom @@ -10016,13 +10068,13 @@ apportée à la copie en cours sera perdue. StdCmdSaveCopy - + Save a &Copy... Enregistrer une &copie... - - + + Save a copy of the active document under a new file name Enregistrer une copie du document actif sous un nouveau nom @@ -10086,13 +10138,13 @@ apportée à la copie en cours sera perdue. StdCmdSelectAll - + Select &All &Tout sélectionner - - + + Select all Tout sélectionner @@ -10324,13 +10376,13 @@ apportée à la copie en cours sera perdue. StdCmdTransform - + Transform... Transformer... - - + + Transform the geometry of selected objects Transformer la géométrie des objets sélectionnés @@ -10338,13 +10390,13 @@ apportée à la copie en cours sera perdue. StdCmdTransformManip - + Transform Transformer - - + + Transform the selected object in the 3d view Transformer l'objet sélectionné dans la vue 3D @@ -10408,13 +10460,13 @@ apportée à la copie en cours sera perdue. StdCmdUndo - + &Undo &Annuler - - + + Undo exactly one action Annuler exactement une action @@ -11216,7 +11268,7 @@ cette dernière fonction s'ouvre. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11227,7 +11279,7 @@ Are you sure you want to continue? - + Object dependencies Dépendances des objets @@ -11316,12 +11368,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Dépendances des objets - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Pour créer un lien vers des objets externes, le document doit être enregistré au moins une fois. @@ -11339,13 +11391,13 @@ Voulez-vous enregistrer le document maintenant ? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. Do you still want to proceed? Le document contient des dépendances cycliques. -Consulter la vue rapport pour plus de détails. +Consultez la Vue rapport pour plus de détails. Voulez-vous tout de même continuer ? @@ -11353,17 +11405,17 @@ Voulez-vous tout de même continuer ? Std_Revert - + Revert document Récupérer précédente version du document - + This will discard all the changes since last file save. Cela supprimera toutes les modifications apportées depuis la dernière sauvegarde du fichier. - + Do you want to continue? Voulez-vous continuer ? @@ -12026,23 +12078,15 @@ après le lancement de FreeCAD Charge une image - - Gui::InteractiveScale - - - Enter desired distance between the points - Entrez la distance souhaitée entre les points - - NaviCubeDraggableCmd - + Movable navigation cube Cube de navigation déplaçable - + Drag and place NaviCube Glisser et placer le NaviCube @@ -12086,7 +12130,7 @@ après le lancement de FreeCAD An error occurred -- see Report View for information - Une erreur est survenue -- voir la vue rapport pour plus d'informations + Une erreur est survenue -- voir la Vue rapport pour plus d'informations @@ -12517,77 +12561,72 @@ l'écran de démarrage Gérer les kits de préférences - + Small (%1px) Petit (%1px) - + Medium (%1px) Moyen (%1px) - + Large (%1px) Grand (%1px) - + Extra large (%1px) Très grand (%1px) - + Custom (%1px) Personnalisé (%1px) - + Combo View Vue combinée - + TreeView and PropertyView Arborescence et Propriétés - - Both - Les deux - - - + Preference Pack Name Nom du kit de préférences - + Tags Mots-clés - + Apply Appliquer - + Apply the %1 preference pack Appliquer le kit de préférences %1 - + Choose a FreeCAD config file to import Choisir un fichier de configuration de FreeCAD à importer - + File exists Le fichier existe - + A preference pack with that name already exists. Overwrite? Un kit de préférences portant ce nom existe déjà. Voulez-vous l'écraser ? @@ -12617,12 +12656,12 @@ l'écran de démarrage Log messages will be recorded - Les messages de log seront enregistrés + Les logs seront enregistrés Record log messages - Enregistrer les messages du journal + Enregistrer les logs @@ -12648,49 +12687,45 @@ l'écran de démarrage When an error has occurred, the Report View dialog becomes visible on-screen while displaying the error - Lorsqu'une erreur est survenue, la fenêtre de visualisation des rapports s'affiche -à l'écran et indique l'erreur + Lorsqu'une erreur survient, la fenêtre de la Vue rapport s'affiche à l'écran et indique l'erreur Show report view on error - Afficher la vue rapport en cas d'erreur + Afficher la Vue rapport en cas d'erreur When a warning has occurred, the Report View dialog becomes visible on-screen while displaying the warning - Lorsqu'un avertissement survient, la fenêtre de visualisation des rapports s'affiche -à l'écran et indique l'erreur + Lorsqu'un avertissement survient, la fenêtre Vue rapport s'affiche à l'écran et indique l'erreur Show report view on warning - Afficher la vue rapport en cas d'avertissement + Afficher la Vue rapport en cas d'avertissement When a normal message has occurred, the Report View dialog becomes visible on-screen while displaying the message - Lorsqu'un message survient, la fenêtre de visualisation des rapports s'affiche -à l'écran et indique l'erreur + Lorsqu'un message survient, la fenêtre de la Vue rapport s'affiche à l'écran et indique l'erreur Show report view on normal message - Afficher la vue rapport sur les messages + Afficher la Vue rapport sur les messages When a log message has occurred, the Report View dialog becomes visible on-screen while displaying the log message - Lorsqu'un message du journal survient, la fenêtre de visualisation des rapports s'affiche -à l'écran et indique le message + Lorsqu'un log survient, la boîte de dialogue de la vue rapport s'affiche à l'écran tout en affichant le message de journal Show report view on log message - Afficher la vue rapport sur les messages du journal + Afficher la Vue rapport sur les logs @@ -12715,17 +12750,17 @@ on-screen while displaying the log message Font color for normal messages in Report view panel - Couleur de police pour les messages normaux dans la vue Rapport + Couleur de police pour les messages normaux dans la Vue rapport Log messages: - Journal des messages : + Log : Font color for log messages in Report view panel - Couleur de police pour les messages de log dans la fenêtre de rapport + Couleur de police des logs dans la Vue rapport @@ -12735,7 +12770,7 @@ on-screen while displaying the log message Font color for warning messages in Report view panel - Couleur de police pour les messages d'avertissement dans la fenêtre Rapport + Couleur de police des messages d'avertissement dans la Vue rapport @@ -12745,7 +12780,7 @@ on-screen while displaying the log message Font color for error messages in Report view panel - Couleur de police pour les messages d'erreur dans la fenêtre rapport + Couleur de police des messages d'erreur dans la Vue rapport @@ -12756,20 +12791,18 @@ on-screen while displaying the log message Internal Python output will be redirected from Python console to Report view panel - La sortie interne de Python sera redirigée -depuis la console Python vers la fenêtre Rapport + La sortie interne de Python sera redirigée depuis la console Python vers la Vue rapport Redirect internal Python output to report view - Rediriger les messages internes de Python vers la vue rapport + Rediriger les messages internes de Python vers la Vue rapport Internal Python error messages will be redirected from Python console to Report view panel - Les messages d'erreur internes de Python seront redirigés -de la console Python vers la Vue rapport + Les messages d'erreur internes de Python seront redirigés de la console Python vers la Vue rapport @@ -12895,4 +12928,18 @@ Vous pouvez désormais utiliser Theme pour une personnalisation complète de l'i Tous les filtres de sélection ont été effacés + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_gl.ts b/src/Gui/Language/FreeCAD_gl.ts index 8b39a010a7..a5d948be90 100644 --- a/src/Gui/Language/FreeCAD_gl.ts +++ b/src/Gui/Language/FreeCAD_gl.ts @@ -122,12 +122,12 @@ Importar - + Delete Desbotar - + Paste expressions Colar expresións @@ -188,9 +188,9 @@ Emprazamento + - Transform Transformar @@ -220,7 +220,7 @@ Alternar selectividade - + Edit image Edit image @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Cancelar - - Gui::ControlSingleton - - - Task panel - Panel de Tarefas - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. Nome da macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macros de usuario - + System macros Macros do sistema - + Execute Executar - + Close Pechar - + Create Facer - + Delete Desbotar - + Edit Editar - + Rename Renomear - + Duplicate Duplicar - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Barra de ferramentas - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download Descargar - + User macros location: Cartafol das macros de usuario: @@ -1898,72 +1910,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Só lectura - + Macro file Ficheiro de macros - + Enter a file name, please: Por favor, insira un nome de ficheiro: - - - + + + Existing file Ficheiro existente - + '%1'. This file already exists. '%1'. Este ficheiro xa existe. - + Cannot create file Non se pode crear o ficheiro - + Creation of file '%1' failed. Fallou a creación do ficheiro '%1'. - + Delete macro Desbotar macro - + Do you really want to delete the macro '%1'? Quere de verdade desbotar a macro '%1'? - + Do not show again Non volver amosar - + Guided Walkthrough Guided Walkthrough - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Walkthrough, dialog 1 of 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close - + Walkthrough, dialog 1 of 1 Walkthrough, dialog 1 of 1 - + Walkthrough, dialog 2 of 2 Walkthrough, dialog 2 of 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Walkthrough instructions: Click right arrow button (->), then Close. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Walkthrough instructions: Click New, then right arrow (->) button, then Close. - + Renaming Macro File Renomear Arquivo Macro - - + + Enter new name: Inserir novo nome: - - + + '%1' already exists. '%1' xa existe. - + Rename Failed Fallou o renomeado - + Failed to rename to '%1'. Perhaps a file permission error? Fallo ao renomear o '%1'. Pode ser un erro do permiso do ficheiro? - + Duplicate Macro Duplicar Macro - + Duplicate Failed Duplicado Errado - + Failed to duplicate to '%1'. Perhaps a file permission error? Erro ao duplicar a '%1'. @@ -4315,6 +4327,16 @@ horizontal space in Python console Save history Gardar historial + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4429,16 +4451,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4461,7 +4508,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4491,17 +4538,17 @@ Larger value eases to pick things, but can make small features impossible to sel Background color for active containers in tree view - + Central: Central: - + Midway: Midway: - + End: End: @@ -5479,22 +5526,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Vista combinada - - - - Model - Modelo - - - - - Tasks - Tarefas - Gui::DockWnd::PropertyDockView @@ -5721,12 +5756,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Ficheiro modificado - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5735,54 +5770,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Documento non gardado - + The document has been modified. Do you want to save your changes? O documento foi modificado. Quere gardar os cambios? - + FreeCAD macro Macro de FreeCAD - + Export PDF Exportar en PDF - + PDF file Ficheiro PDF - + untitled[*] sen título[*] - + - Editor - Editor - + %1 chars removed %1 caracteres desbotados - + %1 chars added %1 caracteres engadidos - + Formatted Formatado @@ -5933,39 +5968,46 @@ Quere gardar os cambios? Graphviz fallou ó crear un ficheiro de imaxe - + PNG format Formato PNG - + Bitmap format Formato Bitmap - + GIF format Formato GIF - + JPG format Formato JPG - + SVG format Formato SVG - - + + PDF format Formato PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportar gráfico @@ -6126,7 +6168,7 @@ Quere gardar os cambios? Gui::MainWindow - + Dimension Acoutamento @@ -6136,62 +6178,62 @@ Quere gardar os cambios? Pronto - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Open Addon Manager - + Close All Pechar todo - - - + + + Toggles this toolbar Amosa/agocha esta barra de ferramentas - - - + + + Toggles this dockable window Alterna esta xanela acoplable - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Documento non gardado - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -6565,117 +6607,117 @@ No lado dereito escolléronse %2. Gui::PythonConsole - + System exit Sair do Sistema - + The application is still running. Do you want to exit without saving your data? A aplicación aínda está en execución. Quere saír sen gardar os seus datos? - - - - + + + + Python console Consola Python - + Unhandled PyCXX exception. Excepción de PyCXX non xestionada. - + Unhandled FreeCAD exception. Excepción de FreeCAD non xestionada. - + Unhandled std C++ exception. Excepción std de C++ non xestionada. - + Unhandled unknown C++ exception. Excepción estraña de C++ non xestionada. - + &Copy &Copiar - + &Copy command &Copiar comando - + &Copy history &Copiar historial - + Save history as... Gardar historial como... - + Save history Gardar historial - + Saves Python history across %1 sessions Saves Python history across %1 sessions - + &Paste &Colar - + Select All Escolmar todo - + Clear console Limpar a consola - + Insert file name... Inserir nome do ficheiro... - + Word wrap Quebra de palabra - + Save History Gardar historial - + Macro Files Ficheiros de macro - + Insert file name Insire o nome do ficheiro - + All Files Tódolos ficheiros @@ -6760,22 +6802,22 @@ Quere saír sen gardar os seus datos? Gui::SearchBar - + Previous Anterior - + Next Next - + Case sensitive Case sensitive - + Whole words Whole words @@ -6892,17 +6934,17 @@ Quere especificar outro directorio? Gui::TaskCSysDragger - + Increments Incrementos - + Translation Increment: Incremento de tradución: - + Rotation Increment: Incremento de rotación: @@ -7727,37 +7769,42 @@ Quere especificar outro directorio? QDockWidget - + Tree view Vista en árbore - + + Tasks + Tarefas + + + Property view Vista de propiedades - + Selection view Vista de selección - - Combo View - Vista combinada + + Model + Modelo - + DAG View Vista DAG - + Report view Vista de informe - + Python console Consola Python @@ -7833,12 +7880,12 @@ Quere especificar outro directorio? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7879,71 +7926,71 @@ Quere especificar outro directorio? Exportar ficheiro - + Printing... Imprimindo... - + Exporting PDF... Exportando en PDF... - - + + Unsaved document Documento non gardado - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - - + + Delete failed Erro ao eliminar - + Dependency error Erro de dependencia - + Copy selected Copiar o seleccionado - + Copy active document Copiar o documento activo - + Copy all documents Copiar todos os documentos - + Paste Pegar - + Expression error Erro de expresión - + Failed to parse some of the expressions. Please check the Report View for more details. Failed to parse some of the expressions. Please check the Report View for more details. - + Failed to paste expressions Failed to paste expressions @@ -8357,7 +8404,7 @@ Choose 'No' to roll back in the active document only. Choose 'Abort' to abort - + Save Macro Gardar Macro @@ -8426,7 +8473,7 @@ Por favor, abra un buscador e escriba: http://localhost:%1. Non é posíbel abrir o buscador do seu sistema. - + Options... Opcións... @@ -8473,42 +8520,42 @@ Por favor, abra un buscador e escriba: http://localhost:%1. Do you want to close this dialog? - + Do you want to save your changes to document '%1' before closing? Quere gardar os cambios no documento '%1' antes de pechalo? - + Do you want to save your changes to document before closing? Do you want to save your changes to document before closing? - + If you don't save, your changes will be lost. Se non garda os cambios, hanse perder. - + Apply answer to all Apply answer to all - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Some documents could not be saved. Do you want to cancel closing? - + Delete macro Desbotar macro - + Not allowed to delete system-wide macros Non se admite desbotar macros de todo o sistema @@ -8528,12 +8575,17 @@ Por favor, abra un buscador e escriba: http://localhost:%1. A %1 non está baleira, eliminar o seu contido, así a todo? - + Translation: Tradución: - + + Translation XY: + Translation XY: + + + Rotation: Rotación: @@ -8743,7 +8795,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8849,13 +8901,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Aliñamento... - - + + Align the selected objects Aliñar os obxectos escollidos @@ -8933,13 +8985,13 @@ the current copy will be lost. StdCmdCopy - + C&opy C&opiar - - + + Copy operation Operación de copia @@ -8947,13 +8999,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Tallar - - + + Cut out Recorta @@ -8961,13 +9013,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Desbotar - - + + Deletes the selected objects Desbota os elementos escolmados @@ -9115,13 +9167,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Duplicar a selección - - + + Put duplicates of the selected objects to the active document Pon os duplicados dos obxectos escolmados no documento activo @@ -9129,17 +9181,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Alternar modo de &edición - + Toggles the selected object's edit mode Alterna o modo de edición do obxecto escolmado - + Activates or Deactivates the selected object's edit mode Entra ou sae do modo de edición do obxecto escolmado @@ -9171,13 +9223,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Expression actions - - + + Actions that apply to expressions Actions that apply to expressions @@ -9669,19 +9721,19 @@ the current copy will be lost. StdCmdNew - + &New &Novo - - + + Create a new empty document Abrir un documento novo baleiro - + Unnamed Sen nome @@ -9764,13 +9816,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Colar - - + + Paste operation Operación de colar @@ -9778,13 +9830,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Situación... - - + + Place the selected objects Sitúa os obxectos escolmados @@ -9792,13 +9844,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Imprimir... - - + + Print the document Imprime o documento @@ -9806,13 +9858,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Exportar como PDF... - - + + Export the document as PDF Exporta o documento como ficheiro PDF @@ -9820,17 +9872,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Vista previa de impresión... - + Print the document Imprime o documento - + Print preview Vista previa para impresión @@ -9838,13 +9890,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... &Información do proxecto... - - + + Show details of the currently active project Amosar detalles do proxecto activo actual @@ -9852,13 +9904,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Utilidade do proxecto... - - + + Utility to extract or create project files Utilidade para extraer ou facer ficheiros de proxectos @@ -9880,13 +9932,13 @@ the current copy will be lost. StdCmdQuit - + E&xit &Saír - - + + Quits the application Saír da aplicación @@ -9936,13 +9988,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Refacer - - + + Redoes a previously undone action Volve facer o que se desfixo nunha acción previa @@ -9950,13 +10002,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Refrescar - - + + Recomputes the current active document Recalcula o documento activo actual @@ -9978,13 +10030,13 @@ the current copy will be lost. StdCmdRevert - + Revert Reverter - - + + Reverts to the saved version of this file Volta a versión gardada do ficheiro @@ -9992,13 +10044,13 @@ the current copy will be lost. StdCmdSave - + &Save &Gardar - - + + Save the active document Garda documento activo @@ -10006,13 +10058,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Gardar todo - - + + Save all opened document Garda todos os documentos abertos @@ -10020,13 +10072,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Gar&dar coma... - - + + Save the active document under a new file name Garda o documento activo cun nome de ficheiro novo @@ -10034,13 +10086,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Gardar unha &copia... - - + + Save a copy of the active document under a new file name Garda unha copia do documento activo cun nome de ficheiro novo @@ -10104,13 +10156,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Escolmar &todo - - + + Select all Escolmar todo @@ -10342,13 +10394,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Transformar... - - + + Transform the geometry of selected objects Transforma a xeometria dos obxectos escolmados @@ -10356,13 +10408,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Transformar - - + + Transform the selected object in the 3d view Transforma o obxecto escolmado na vista 3D @@ -10426,13 +10478,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Desfacer - - + + Undo exactly one action Desfai só unha acción @@ -11232,7 +11284,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11243,7 +11295,7 @@ De verdade quere seguir? - + Object dependencies Dependencias do obxecto @@ -11332,12 +11384,12 @@ De verdade quere seguir? Std_DuplicateSelection - + Object dependencies Dependencias do obxecto - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -11355,7 +11407,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11369,17 +11421,17 @@ Do you still want to proceed? Std_Revert - + Revert document Reverter o documento - + This will discard all the changes since last file save. Isto desbotará tódolos cambios dende que gardou por última vez. - + Do you want to continue? Quere seguir? @@ -12042,23 +12094,15 @@ after FreeCAD launches Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12533,77 +12577,72 @@ display the splash screen Manage preference packs - + Small (%1px) Pequeno (%1px) - + Medium (%1px) Medio (%1px) - + Large (%1px) Grande (%1px) - + Extra large (%1px) Moi grande (%1px) - + Custom (%1px) Personalizado (%1px) - + Combo View Vista combinada - + TreeView and PropertyView TreeView and PropertyView - - Both - Ambos - - - + Preference Pack Name Preference Pack Name - + Tags Etiquetas - + Apply Aplicar - + Apply the %1 preference pack Apply the %1 preference pack - + Choose a FreeCAD config file to import Choose a FreeCAD config file to import - + File exists File exists - + A preference pack with that name already exists. Overwrite? A preference pack with that name already exists. Overwrite? @@ -12911,4 +12950,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_hr.ts b/src/Gui/Language/FreeCAD_hr.ts index 31cf8e1ab9..b5f607fe85 100644 --- a/src/Gui/Language/FreeCAD_hr.ts +++ b/src/Gui/Language/FreeCAD_hr.ts @@ -122,12 +122,12 @@ Uvoz - + Delete Izbriši - + Paste expressions Umetni izraz @@ -188,9 +188,9 @@ Položaj + - Transform Transformiraj @@ -220,7 +220,7 @@ Uklj/isklj mogućnost odabira - + Edit image Uredi sliku @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Otkaži - - Gui::ControlSingleton - - - Task panel - Ploča zadataka - - Gui::DAG::Model @@ -1827,72 +1819,92 @@ isto vrijeme, pokrenut će se onaj s najvećim prioritetom. Makro ime: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Makronaredbe korisnika - + System macros Sustavne makronaredbe - + Execute Izvršiti - + Close Zatvori - + Create Stvoriti - + Delete Izbriši - + Edit Uredi - + Rename Preimenuj - + Duplicate Dupliciraj - + Launch a guide on how to set up a macro in a custom global toolbar. Pokrenite vodič o tome kako postaviti makronaredbu u prilagođenu globalnu alatnu traku. - + Toolbar Alatna traka - + Open Addon Manager where macros created by the community and other addons can be downloaded. Otvorite Upravitelj dodataka gdje se mogu preuzeti makronaredbe koje je izradila zajednica i drugi dodaci. - + Download Preuzmi - + User macros location: Lokacija korisnika makronaredbe: @@ -1900,72 +1912,72 @@ isto vrijeme, pokrenut će se onaj s najvećim prioritetom. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makronaredbe - + Read-only Samo za čitanje - + Macro file Makro datoteke - + Enter a file name, please: Unesite naziv datoteke, molimo Vas da: - - - + + + Existing file Postojeće datoteke - + '%1'. This file already exists. '%1'. Ova datoteka već postoji. - + Cannot create file Ne mogu stvoriti datoteku - + Creation of file '%1' failed. Kreiranje datoteke '%1' nije uspjelo. - + Delete macro Brisanje makro - + Do you really want to delete the macro '%1'? Želite li zaista obrisati makro '%1'? - + Do not show again Ne prikazuj ponovno - + Guided Walkthrough Vodič kroz upute - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1976,77 +1988,77 @@ Napomena: vaše promjene primijenit će se prilikom sljedećeg prebacivanja radn - + Walkthrough, dialog 1 of 2 Priručnik, dijalog 1 od 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Upute za uporabu: Popunite polja koja nedostaju (izborno), zatim kliknite Dodaj, a zatim Zatvori - + Walkthrough, dialog 1 of 1 Priručnik, dijalog 1 od 1 - + Walkthrough, dialog 2 of 2 Priručnik, dijalog 2 od 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Uputa za uporabu: kliknite strelicu desno (->), a zatim Zatvori. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Uputa za uporabu: kliknite Novo, zatim strelicu desno (->), a zatim Zatvori. - + Renaming Macro File Preimenovanje makronaredbi datoteka - - + + Enter new name: Unesite novi naziv: - - + + '%1' already exists. '%1' već postoji. - + Rename Failed Preimenovanje nije uspjelo - + Failed to rename to '%1'. Perhaps a file permission error? Nije moguće preimenovati u '%1'. Možda je greška dopuštenja datoteke? - + Duplicate Macro Dupliciraj makronaredbu - + Duplicate Failed Dupliciranje neuspješno - + Failed to duplicate to '%1'. Perhaps a file permission error? Nije uspjelo dupliciranje u '%1'. @@ -4343,6 +4355,16 @@ vodoravni prostor u Python konzoli Save history Spremi povijest + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4457,16 +4479,41 @@ Veća vrijednost olakšava odabir stvari, ali može onemogućiti odabir malih zn - + Top: Vrh: - + Middle: Srednji: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4490,7 +4537,7 @@ Veća vrijednost olakšava odabir stvari, ali može onemogućiti odabir malih zn - + Bottom: Dno: @@ -4520,17 +4567,17 @@ Veća vrijednost olakšava odabir stvari, ali može onemogućiti odabir malih zn Boja pozadine za aktivne spremnike u prikazu stabla - + Central: Središnje: - + Midway: Na pola puta: - + End: Kraj: @@ -5511,22 +5558,10 @@ izvorno odabranim prije otvaranja ovog dijaloškog okvira Gui::DockWnd::ComboView - + Combo View Kombinirani pregled - - - - Model - Model - - - - - Tasks - Zadaci - Gui::DockWnd::PropertyDockView @@ -5753,12 +5788,12 @@ izvorno odabranim prije otvaranja ovog dijaloškog okvira Gui::EditorView - + Modified file Promjena datoteke - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5766,53 +5801,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Nespremljeni dokument - + The document has been modified. Do you want to save your changes? Dokument je promijenjen. Želite li spremiti promjene? - + FreeCAD macro FreeCAD makronaredbe - + Export PDF Izvoz PDF - + PDF file PDF Datoteka - + untitled[*] Bez imena[*] - + - Editor - Urednik - + %1 chars removed %1 znakova uklonjeno - + %1 chars added %1 znakova dodano - + Formatted Oblikovano @@ -5963,39 +5998,46 @@ Do you want to save your changes? Graphviz nije uspio pronaći datoteku slike - + PNG format PNG format - + Bitmap format Bitmap format - + GIF format GIF format - + JPG format JPG format - + SVG format SVG format - - + + PDF format PDF format - - + + + Graphviz format + Graphviz format + + + + + Export graph Izvoz grafikona @@ -6156,7 +6198,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Dimenzija @@ -6166,65 +6208,65 @@ Do you want to save your changes? Spreman - + Help addon needed! Potreban je dodatak za pomoć! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Sustavom pomoći %1 sada upravlja dodatak "Pomoć". Jednostavno se može instalirati putem Upravitelj dodataka - + Open Addon Manager Otvori Upravitelj dodataka - + Close All Zatvori sve - - - + + + Toggles this toolbar Uključuje ove alatne trake - - - + + + Toggles this dockable window Uključuje ovaj usidrivi prozor - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Nespremljeni dokument - + The exported object contains external link. Please save the documentat least once before exporting. Izvezeni objekt sadrži vanjsku poveznicu. Prije izvoza spremite dokument barem jednom. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Za povezivanje s vanjskim objektima dokument se mora barem jednom spremiti. @@ -6599,116 +6641,116 @@ Kako želite nastaviti? Gui::PythonConsole - + System exit Izlaz iz sustava - + The application is still running. Do you want to exit without saving your data? Primjena se još uvijek izvršava. Želite li izaći bez snimanja podataka? - - - - + + + + Python console Python konzola - + Unhandled PyCXX exception. Neobrađena PyCXX iznimka. - + Unhandled FreeCAD exception. Neobrađena FreeCAD iznimka. - + Unhandled std C++ exception. Neobrađena STD C++ iznimka. - + Unhandled unknown C++ exception. Neobrađena nepoznata C++ iznimka. - + &Copy &Kopiraj - + &Copy command &Kopiraj naredba - + &Copy history &Kopiraj povijest - + Save history as... Spremi povijest kao ... - + Save history Spremi povijest - + Saves Python history across %1 sessions Spremi povijest Pythona u %1 sesiji - + &Paste &Zalijepi - + Select All Označi sve - + Clear console Makni konsolu - + Insert file name... Umetni ime datoteke ... - + Word wrap Automatsko dovršavanje - + Save History Spremi povijest - + Macro Files Makro Datoteke - + Insert file name Umetni ime datoteke - + All Files Sve datoteke @@ -6793,22 +6835,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Prethodno - + Next Sljedeći - + Case sensitive Razlikuj VELIKA/mala slova - + Whole words Cijele riječi @@ -6925,17 +6967,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Koracima - + Translation Increment: Korak pomicanja: - + Rotation Increment: Korak rotacije: @@ -7762,37 +7804,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Pogled hijerarhije - + + Tasks + Zadaci + + + Property view Prikaz svojstava - + Selection view Pregled selekcije - - Combo View - Kombinirani pregled + + Model + Model - + DAG View DAG pogled - + Report view Pregled izvještaja - + Python console Python konzola @@ -7868,12 +7915,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7914,65 +7961,65 @@ Do you want to specify another directory? Izvoz datoteke - + Printing... Ispis ... - + Exporting PDF... Izvoz PDF ... - - + + Unsaved document Nespremljeni dokument - + The exported object contains external link. Please save the documentat least once before exporting. Izvezeni objekt sadrži vanjsku poveznicu. Prije izvoza spremite dokument barem jednom. - - + + Delete failed Brisanje nije uspjelo - + Dependency error Pogreška ovisnosti - + Copy selected Kopira odabrano - + Copy active document Kopira aktivni dokument - + Copy all documents Kopira sve dokumente - + Paste Umetni - + Expression error Pogreška izraza - + Failed to parse some of the expressions. Please check the Report View for more details. Analiza nekih izraza nije uspjela. @@ -7980,7 +8027,7 @@ Molimo provjerite Pregled izvještaja za više pojedinosti. - + Failed to paste expressions Umetanje izraza nije uspjelo @@ -8402,7 +8449,7 @@ Odaberite "Prekini" za prekid - + Save Macro Spremi Makro @@ -8469,7 +8516,7 @@ Please open a browser window and type in: http://localhost:%1. Ne mogu otvoriti vaš preglednik sustava. - + Options... Opcije ... @@ -8516,42 +8563,42 @@ Please open a browser window and type in: http://localhost:%1. Želite li zatvoriti ovaj dijalog? - + Do you want to save your changes to document '%1' before closing? Želite li spremiti promjene u dokumentu '%1' prije zatvaranja? - + Do you want to save your changes to document before closing? Želite li spremiti promjene u dokumentu prije zatvaranja? - + If you don't save, your changes will be lost. Ako ne spremite, vaše promjene bit će izgubljene. - + Apply answer to all Primijenite odgovor na sve - + %1 Document(s) not saved %1 dokument(a) nije spremljeno - + Some documents could not be saved. Do you want to cancel closing? Neke dokumente nije bilo moguće spremiti. Želite li otkazati zatvaranje? - + Delete macro Brisanje makro - + Not allowed to delete system-wide macros Ne možete izbrisati cijeli sustav makronaredbe @@ -8571,12 +8618,17 @@ Please open a browser window and type in: http://localhost:%1. %1 nije prazan, izbrisati njegov sadržaj? - + Translation: Translacija: - + + Translation XY: + Translation XY: + + + Rotation: Rotacija: @@ -8784,7 +8836,7 @@ trenutnu kopiju će biti izgubljene. Promijeni sliku... - + Color Gradient Nijanse boje @@ -8890,13 +8942,13 @@ trenutnu kopiju će biti izgubljene. StdCmdAlignment - + Alignment... Poravnavanje... - - + + Align the selected objects Poravnaj odabrane objekte @@ -8974,13 +9026,13 @@ trenutnu kopiju će biti izgubljene. StdCmdCopy - + C&opy K&opiraj - - + + Copy operation Kopirati @@ -8988,13 +9040,13 @@ trenutnu kopiju će biti izgubljene. StdCmdCut - + &Cut &Izreži - - + + Cut out Izrezati @@ -9002,13 +9054,13 @@ trenutnu kopiju će biti izgubljene. StdCmdDelete - + &Delete &Izbriši - - + + Deletes the selected objects Briše odabrane objekte @@ -9158,13 +9210,13 @@ trenutnu kopiju će biti izgubljene. StdCmdDuplicateSelection - + Duplicate selection Udvostruči odabir - - + + Put duplicates of the selected objects to the active document Stavilja kopije odabranih objekata na aktivni dokument @@ -9172,17 +9224,17 @@ trenutnu kopiju će biti izgubljene. StdCmdEdit - + Toggle &Edit mode Uklj/isklj Način ur&eđivanja - + Toggles the selected object's edit mode Uključuje ili isključuje mod rada na odabranom objektu - + Activates or Deactivates the selected object's edit mode Aktivira ili deaktivira mod uređivanja odabranih objekata @@ -9214,13 +9266,13 @@ trenutnu kopiju će biti izgubljene. StdCmdExpression - + Expression actions Radnje izražavanja - - + + Actions that apply to expressions Radnje koje se primjenjuju na izraze @@ -9717,19 +9769,19 @@ trenutnu kopiju će biti izgubljene. StdCmdNew - + &New &Novi - - + + Create a new empty document Kreira novi prazni dokument - + Unnamed Neimenovano @@ -9812,13 +9864,13 @@ trenutnu kopiju će biti izgubljene. StdCmdPaste - + &Paste &Zalijepi - - + + Paste operation Zalijepi @@ -9826,13 +9878,13 @@ trenutnu kopiju će biti izgubljene. StdCmdPlacement - + Placement... Postavljanje... - - + + Place the selected objects Postavlja odabrane objekte @@ -9840,13 +9892,13 @@ trenutnu kopiju će biti izgubljene. StdCmdPrint - + &Print... Is&pis ... - - + + Print the document Ispis dokumenta @@ -9854,13 +9906,13 @@ trenutnu kopiju će biti izgubljene. StdCmdPrintPdf - + &Export PDF... PDF I&zvoz... - - + + Export the document as PDF Izvoz kao PDF dokument @@ -9868,17 +9920,17 @@ trenutnu kopiju će biti izgubljene. StdCmdPrintPreview - + &Print preview... &Pregled ispisa ... - + Print the document Ispis dokumenta - + Print preview Pregled ispisa @@ -9886,13 +9938,13 @@ trenutnu kopiju će biti izgubljene. StdCmdProjectInfo - + Project i&nformation... I&nformacije o projektu ... - - + + Show details of the currently active project Pokaži detalje o trenutno aktivnom projektu @@ -9900,13 +9952,13 @@ trenutnu kopiju će biti izgubljene. StdCmdProjectUtil - + Project utility... Korisne opcije projekta... - - + + Utility to extract or create project files Pomoć prilikom dohvata ili stvaranja projektnih datoteka @@ -9928,13 +9980,13 @@ trenutnu kopiju će biti izgubljene. StdCmdQuit - + E&xit Iz&laz - - + + Quits the application Zatvara aplikaciju @@ -9988,13 +10040,13 @@ trenutnu kopiju će biti izgubljene. StdCmdRedo - + &Redo &Ponovi - - + + Redoes a previously undone action Vraća prethodno poništenu radnju @@ -10002,13 +10054,13 @@ trenutnu kopiju će biti izgubljene. StdCmdRefresh - + &Refresh &Osvježi - - + + Recomputes the current active document Ponovno proračunava trenutni aktivni dokument @@ -10030,13 +10082,13 @@ trenutnu kopiju će biti izgubljene. StdCmdRevert - + Revert Vrati se - - + + Reverts to the saved version of this file Vraća se u spremljenu verziju ove datoteke @@ -10044,13 +10096,13 @@ trenutnu kopiju će biti izgubljene. StdCmdSave - + &Save &Spremi - - + + Save the active document Spremi aktivni dokument @@ -10058,13 +10110,13 @@ trenutnu kopiju će biti izgubljene. StdCmdSaveAll - + Save All Spremi sve - - + + Save all opened document Spremite sve otvorene dokumente @@ -10072,13 +10124,13 @@ trenutnu kopiju će biti izgubljene. StdCmdSaveAs - + Save &As... Spremi k&ao... - - + + Save the active document under a new file name Spremi aktivni dokument pod novim imenom @@ -10086,13 +10138,13 @@ trenutnu kopiju će biti izgubljene. StdCmdSaveCopy - + Save a &Copy... Spremi kopiju &Copy... - - + + Save a copy of the active document under a new file name Spremi kopiju aktivnog dokumenta pod novim nazivom @@ -10156,13 +10208,13 @@ trenutnu kopiju će biti izgubljene. StdCmdSelectAll - + Select &All Ozn&ači sve - - + + Select all Označi sve @@ -10394,13 +10446,13 @@ trenutnu kopiju će biti izgubljene. StdCmdTransform - + Transform... Transformacija ... - - + + Transform the geometry of selected objects Preobraziti geometriju odabranih objekata @@ -10408,13 +10460,13 @@ trenutnu kopiju će biti izgubljene. StdCmdTransformManip - + Transform Transformiraj - - + + Transform the selected object in the 3d view Transformiraj selektirani objekt u 3D pogledu @@ -10478,13 +10530,13 @@ trenutnu kopiju će biti izgubljene. StdCmdUndo - + &Undo &Poništi - - + + Undo exactly one action Poništi točno jednu radnju @@ -11288,7 +11340,7 @@ trenutnu kopiju će biti izgubljene. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11299,7 +11351,7 @@ Jeste li sigurni da želite nastaviti? - + Object dependencies Zavisnosti objekta @@ -11388,12 +11440,12 @@ Jeste li sigurni da želite nastaviti? Std_DuplicateSelection - + Object dependencies Zavisnosti objekta - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Za povezivanje s vanjskim objektima dokument se mora barem jednom spremiti. @@ -11412,7 +11464,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11427,17 +11479,17 @@ Molimo provjerite Pregled izvještaja za više pojedinosti. Std_Revert - + Revert document Vratiti dokument - + This will discard all the changes since last file save. Ovo će odbaciti sve promjene nakon posljednjeg spremanja datoteke. - + Do you want to continue? Želite li nastaviti? @@ -12103,23 +12155,15 @@ nakon pokretanja FreeCAD-a Učitava jednu sliku - - Gui::InteractiveScale - - - Enter desired distance between the points - Unesi željenu udaljenost između tačaka - - NaviCubeDraggableCmd - + Movable navigation cube Pokretna navigacijska kocka - + Drag and place NaviCube Prevuci i postavi Navigacijsku kocku @@ -12595,77 +12639,72 @@ prikazivati splash ekran Upravljaj sa paketima postavki - + Small (%1px) Malo (%1px) - + Medium (%1px) Srednje (%1px) - + Large (%1px) Veliki (%1px) - + Extra large (%1px) Jako veliko (%1px) - + Custom (%1px) Prilagođeno (%1px) - + Combo View Kombinirani pregled - + TreeView and PropertyView Stablasti pregled i Pregled svojstva - - Both - Oboje - - - + Preference Pack Name Ime paketa postavki - + Tags Oznake - + Apply Primijeni - + Apply the %1 preference pack Primjeni %1 paket postavki - + Choose a FreeCAD config file to import Odaberite FreeCAD konfiguracijsku datoteku za uvoz - + File exists Datoteka postoji - + A preference pack with that name already exists. Overwrite? Postavka s ovim nazivom paketa već postoji! Prepisati? @@ -12985,4 +13024,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_hu.ts b/src/Gui/Language/FreeCAD_hu.ts index 9c6e1cd949..8e33819b71 100644 --- a/src/Gui/Language/FreeCAD_hu.ts +++ b/src/Gui/Language/FreeCAD_hu.ts @@ -122,12 +122,12 @@ Importálás - + Delete Törlés - + Paste expressions Kifejezések beszúrása @@ -188,9 +188,9 @@ Elhelyezés + - Transform Átalakítás @@ -220,7 +220,7 @@ Kiválaszthatóság ki-/bekapcsolása - + Edit image Kép szerkesztése @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down Mégse (&0) - - Gui::ControlSingleton - - - Task panel - Feladat panel - - Gui::DAG::Model @@ -1823,72 +1815,92 @@ same time. The one with the highest priority will be triggered. Makrónév: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Felhasználói makrók - + System macros Rendszer makrók - + Execute Végrehajtás - + Close Bezárás - + Create Létrehozás - + Delete Törlés - + Edit Szerkesztés - + Rename Átnevezés - + Duplicate Másolás - + Launch a guide on how to set up a macro in a custom global toolbar. Futtassa az oktatóanyagot arról, hogyan konfigurálhat makrót egy egyéni globális eszköztáron. - + Toolbar Eszköztár - + Open Addon Manager where macros created by the community and other addons can be downloaded. Nyissa meg a Bővítmények kezelőjét, ahol letöltheti a közösség által létrehozott makrókat és egyéb bővítményeket. - + Download Letöltés - + User macros location: Felhasználói makrók helye: @@ -1896,72 +1908,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makrók - + Read-only Csak olvasható - + Macro file Makró fájl - + Enter a file name, please: Kérem, adja meg a fájl nevét: - - - + + + Existing file Létező fájl - + '%1'. This file already exists. '%1'. Ez a fájl már létezik. - + Cannot create file Nem lehet létrehozni a fájlt - + Creation of file '%1' failed. Nem sikerült létrehozni a '%1' fájlt. - + Delete macro Makró törlése - + Do you really want to delete the macro '%1'? Valóban törölni szeretné a '%1' nevű makrót? - + Do not show again Többé ne jelenjen meg - + Guided Walkthrough Interaktív útmutató - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1972,76 +1984,76 @@ Megjegyzés: a módosítások csak a következő munkaasztal váltásakor érvé - + Walkthrough, dialog 1 of 2 Útmutató, 1. dialógus a 2-ből - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Útmutató utasítások: Töltse ki a hiányzó mezőket (nem kötelező), majd kattintson a Hozzáadás, majd a Bezárás gombra - + Walkthrough, dialog 1 of 1 Útmutató, 1. dialógus az 1-ből - + Walkthrough, dialog 2 of 2 Útmutató, 2. dialógus a 2-ből - + Walkthrough instructions: Click right arrow button (->), then Close. Útmutató utasítások: Kattintson a jobbra nyílra (->), majd a majd a Bezárás gombra. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Útmutató utasítások: Kattintson az Új, majd a jobbra nyíl (->) gombra, majd a Bezárás gombra. - + Renaming Macro File Makró fájl átnevezése - - + + Enter new name: Adja meg az új nevet: - - + + '%1' already exists. '%1' már létezik. - + Rename Failed Átnevezés sikertelen - + Failed to rename to '%1'. Perhaps a file permission error? Sikertelen átnevezés: '%1'. Talán fájl jogosultság hiba? - + Duplicate Macro Makró másolat - + Duplicate Failed Másolás meghiúsult - + Failed to duplicate to '%1'. Perhaps a file permission error? '%1' másolása meghiúsult. @@ -4309,6 +4321,16 @@ horizontal space in Python console Save history Előzmények mentése + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4422,16 +4444,41 @@ Nagyobb érték megkönnyíti a kiválasztást, de lehetetlenné teheti a kis el - + Top: Felső: - + Middle: Középső: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4454,7 +4501,7 @@ Nagyobb érték megkönnyíti a kiválasztást, de lehetetlenné teheti a kis el - + Bottom: Alsó: @@ -4484,17 +4531,17 @@ Nagyobb érték megkönnyíti a kiválasztást, de lehetetlenné teheti a kis el Az aktív tárolók háttérszíne fanézetben - + Central: Központ: - + Midway: Közepén: - + End: Vége: @@ -5472,22 +5519,10 @@ párbeszédpanel megnyitása előtt kiválasztott tárgyak folytatása Gui::DockWnd::ComboView - + Combo View Összetett nézet - - - - Model - Modell - - - - - Tasks - Feladatok - Gui::DockWnd::PropertyDockView @@ -5714,12 +5749,12 @@ párbeszédpanel megnyitása előtt kiválasztott tárgyak folytatása Gui::EditorView - + Modified file Módosított fájl - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5728,54 +5763,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Nem mentett dokumentum - + The document has been modified. Do you want to save your changes? A dokumentum módosítva lett. El akarja menteni a változásokat? - + FreeCAD macro FreeCAD makró - + Export PDF Exportálás PDF-be - + PDF file PDF-fájl - + untitled[*] névtelen[*] - + - Editor - Szerkesztő - + %1 chars removed %1 karakter eltávolítása - + %1 chars added %1 karakter hozzáadása - + Formatted Formázott @@ -5926,39 +5961,46 @@ El akarja menteni a változásokat? Nem sikerült létrehozni egy kép fájl Grafikonszerkesztőhöz - + PNG format PNG formátum - + Bitmap format Bittérkép-formátum - + GIF format GIF formátum - + JPG format JPG formátum - + SVG format SVG formátum - - + + PDF format PDF formátum - - + + + Graphviz format + Graphviz format + + + + + Export graph Export grafikon @@ -6119,7 +6161,7 @@ El akarja menteni a változásokat? Gui::MainWindow - + Dimension Dimenzió @@ -6129,62 +6171,62 @@ El akarja menteni a változásokat? Kész - + Help addon needed! Segítség kiegészítő szükséges! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager A(z) %1 támogatási rendszerét most a "Súgó" bővítmény támogatja. Könnyen telepíthető a Bővítmények kezelőjével - + Open Addon Manager Bővítmények kezelő megnyitása - + Close All Minden bezárása - - - + + + Toggles this toolbar Eszköztár megjelenítése - - - + + + Toggles this dockable window Dokkolható ablak megjelenítése - + WARNING: This is a development version. FIGYELMEZTETÉS: Ez egy fejlesztői változat. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Nem mentett dokumentum - + The exported object contains external link. Please save the documentat least once before exporting. Az exportált tárgy külső hivatkozást tartalmaz. Exportálás előtt legalább egyszer mentse a dokumentumot. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Külső tárgyakra hivatkozáshoz a dokumentumot legalább egyszer menteni kell. @@ -6558,117 +6600,117 @@ a jobboldali nézetben %2 pont lett jelölve. Gui::PythonConsole - + System exit Kilépés a rendszerből - + The application is still running. Do you want to exit without saving your data? Az alkalmazás még mindig fut. Ki szeretne lépni az adatok mentése nélkül? - - - - + + + + Python console Python konzol - + Unhandled PyCXX exception. Nem kezelt PyCXX kivétel. - + Unhandled FreeCAD exception. Nem kezelt FreeCAD kivétel. - + Unhandled std C++ exception. Kezeletlen C++ kivétel. - + Unhandled unknown C++ exception. Nem kezelt ismeretlen C++ kivétel. - + &Copy &Másolás - + &Copy command Parancs másolása - + &Copy history Előzmények másolása - + Save history as... Előzmények mentése mint ... - + Save history Előzmények mentése - + Saves Python history across %1 sessions Python-előzmények mentése %1 munkamenetben - + &Paste Beillesztés - + Select All Mindent kijelöl - + Clear console Konzol törlése - + Insert file name... Fájlnév beszúrása... - + Word wrap Sortörés - + Save History Előzmények mentése - + Macro Files Makró Fájlok - + Insert file name Fájlnév beszúrása - + All Files Összes fájl @@ -6753,22 +6795,22 @@ Ki szeretne lépni az adatok mentése nélkül? Gui::SearchBar - + Previous Előző - + Next Következő - + Case sensitive Kis- és nagybetűk megkülönböztetése - + Whole words Egész szavak @@ -6883,17 +6925,17 @@ Meg szeretne adni egy másik könyvtárat? Gui::TaskCSysDragger - + Increments Növekmény - + Translation Increment: Eltolás növelése: - + Rotation Increment: Elforgatás növelése: @@ -7718,37 +7760,42 @@ Meg szeretne adni egy másik könyvtárat? QDockWidget - + Tree view Fanézet - + + Tasks + Feladatok + + + Property view Tulajdonságok nézet - + Selection view Részlet nézet - - Combo View - Összetett nézet + + Model + Modell - + DAG View DAG nézet - + Report view Jelentés nézet - + Python console Python konzol @@ -7824,12 +7871,12 @@ Meg szeretne adni egy másik könyvtárat? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7870,71 +7917,71 @@ Meg szeretne adni egy másik könyvtárat? Fájl exportálása - + Printing... Nyomtatás... - + Exporting PDF... PDF exportálása... - - + + Unsaved document Nem mentett dokumentum - + The exported object contains external link. Please save the documentat least once before exporting. Az exportált tárgy külső hivatkozást tartalmaz. Exportálás előtt legalább egyszer mentse a dokumentumot. - - + + Delete failed Törlés sikertelen - + Dependency error Függőség hiba - + Copy selected Kijelöltek másolása - + Copy active document Aktív dokumentum másolása - + Copy all documents Összes dokumentum másolása - + Paste Beillesztés - + Expression error Kifejezés hiba - + Failed to parse some of the expressions. Please check the Report View for more details. Nem sikerült elemezni néhány kifejezést. További részletekért tekintse meg a Jelentés nézetet. - + Failed to paste expressions Nem sikerült beilleszteni a kifejezéseket @@ -8351,7 +8398,7 @@ A 'Nem' lehetőséggel az aktív dokumentumot állítja vissza. A 'Megszakítás' választásával megszakít - + Save Macro Mentse a makrót @@ -8419,7 +8466,7 @@ Nyisson meg egy böngészőt, és írja be: http://localhost:%1. Nem lehet megnyitni a rendszer böngészőt. - + Options... Beállítások... @@ -8466,42 +8513,42 @@ Nyisson meg egy böngészőt, és írja be: http://localhost:%1. Szeretné bezárni a párbeszédpanelt? - + Do you want to save your changes to document '%1' before closing? Szeretné menteni a módosításait bezárás előtt az '%1' dokumentumba? - + Do you want to save your changes to document before closing? Menti a dokumentum módosításait bezárás előtt? - + If you don't save, your changes will be lost. Ha nem menti, a módosítások elvesznek. - + Apply answer to all Válasz alkalmazása az összesre - + %1 Document(s) not saved %1 Dokumentum(ok) nincsen(ek) mentve - + Some documents could not be saved. Do you want to cancel closing? Egyes dokumentumok nem menthetők. Nem szeretné bezárni? - + Delete macro Makró törlése - + Not allowed to delete system-wide macros Nem szabad törölni a rendszer-területi makrókat @@ -8521,12 +8568,17 @@ Nyisson meg egy böngészőt, és írja be: http://localhost:%1. A %1 nem üres, törölheti annak tartalmát is? - + Translation: Fordítás: - + + Translation XY: + Translation XY: + + + Rotation: Elforgatás: @@ -8736,7 +8788,7 @@ az aktuális példány elveszik. Kép módosítása... - + Color Gradient Színátmenet @@ -8842,13 +8894,13 @@ az aktuális példány elveszik. StdCmdAlignment - + Alignment... Igazítás... - - + + Align the selected objects Kiválasztott tárgyak igazítása @@ -8926,13 +8978,13 @@ az aktuális példány elveszik. StdCmdCopy - + C&opy Másolás - - + + Copy operation Másolási művelet @@ -8940,13 +8992,13 @@ az aktuális példány elveszik. StdCmdCut - + &Cut Kivágás - - + + Cut out Kimetszés @@ -8954,13 +9006,13 @@ az aktuális példány elveszik. StdCmdDelete - + &Delete Törlés - - + + Deletes the selected objects Kiválasztott elem törlése @@ -9108,13 +9160,13 @@ az aktuális példány elveszik. StdCmdDuplicateSelection - + Duplicate selection Többszörös kijelölés - - + + Put duplicates of the selected objects to the active document A kijelölt objektumokat másolja az aktuális dokumentumba @@ -9122,17 +9174,17 @@ az aktuális példány elveszik. StdCmdEdit - + Toggle &Edit mode Szerkesztési módra váltás - + Toggles the selected object's edit mode A kiválasztott tárgy szerkesztés módjának kapcsolása - + Activates or Deactivates the selected object's edit mode Be- vagy kikapcsolja a kijelölt tárgy szerkesztés módját @@ -9164,13 +9216,13 @@ az aktuális példány elveszik. StdCmdExpression - + Expression actions Kifejezési műveletek - - + + Actions that apply to expressions Kifejezésekre vonatkozó műveletek @@ -9662,19 +9714,19 @@ az aktuális példány elveszik. StdCmdNew - + &New Új - - + + Create a new empty document Új üres munkalap létrehozása - + Unnamed Névtelen @@ -9757,13 +9809,13 @@ az aktuális példány elveszik. StdCmdPaste - + &Paste Beillesztés - - + + Paste operation Beillesztési művelet @@ -9771,13 +9823,13 @@ az aktuális példány elveszik. StdCmdPlacement - + Placement... Elhelyezés ... - - + + Place the selected objects A kijelölt objektumok helye @@ -9785,13 +9837,13 @@ az aktuális példány elveszik. StdCmdPrint - + &Print... Nyomtatás... - - + + Print the document A dokumentum nyomtatása @@ -9799,13 +9851,13 @@ az aktuális példány elveszik. StdCmdPrintPdf - + &Export PDF... PDF &Exportálása... - - + + Export the document as PDF Dokumentum exportálása PDF fájlba @@ -9813,17 +9865,17 @@ az aktuális példány elveszik. StdCmdPrintPreview - + &Print preview... Nyomtatási kép... - + Print the document A dokumentum nyomtatása - + Print preview Nyomtatási kép @@ -9831,13 +9883,13 @@ az aktuális példány elveszik. StdCmdProjectInfo - + Project i&nformation... Projekt i&nformáció... - - + + Show details of the currently active project Részletek megjelenítése az aktuális projektről @@ -9845,13 +9897,13 @@ az aktuális példány elveszik. StdCmdProjectUtil - + Project utility... Project segédprogram... - - + + Utility to extract or create project files Felhasználót kivon, vagy hozzon létre a projekt fájlokat @@ -9873,13 +9925,13 @@ az aktuális példány elveszik. StdCmdQuit - + E&xit Kilépés - - + + Quits the application Kilépés az alkalmazásból @@ -9929,13 +9981,13 @@ az aktuális példány elveszik. StdCmdRedo - + &Redo Ismét - - + + Redoes a previously undone action Egy előzőleg visszavont művelet megismétlése @@ -9943,13 +9995,13 @@ az aktuális példány elveszik. StdCmdRefresh - + &Refresh Frissítés - - + + Recomputes the current active document Újraszámítja a jelenlegi aktív dokumentumot @@ -9971,13 +10023,13 @@ az aktuális példány elveszik. StdCmdRevert - + Revert Visszaállítás - - + + Reverts to the saved version of this file Visszatérés a fájl mentett változatára @@ -9985,13 +10037,13 @@ az aktuális példány elveszik. StdCmdSave - + &Save Mentés - - + + Save the active document Az aktív dokumentum mentése @@ -9999,13 +10051,13 @@ az aktuális példány elveszik. StdCmdSaveAll - + Save All Mindet menti - - + + Save all opened document Az összes megnyitott dokumentum mentése @@ -10013,13 +10065,13 @@ az aktuális példány elveszik. StdCmdSaveAs - + Save &As... Mentés másként... - - + + Save the active document under a new file name Az aktuális dokumentum mentése új néven @@ -10027,13 +10079,13 @@ az aktuális példány elveszik. StdCmdSaveCopy - + Save a &Copy... Másolat mentése... - - + + Save a copy of the active document under a new file name Az aktív dokumentum másolatának mentése egy új fájl alatt @@ -10097,13 +10149,13 @@ az aktuális példány elveszik. StdCmdSelectAll - + Select &All Összes kijelölése - - + + Select all Összes kijelölése @@ -10335,13 +10387,13 @@ az aktuális példány elveszik. StdCmdTransform - + Transform... Átalakítás... - - + + Transform the geometry of selected objects A kijelölt objektum geometriájának átalakítása @@ -10349,13 +10401,13 @@ az aktuális példány elveszik. StdCmdTransformManip - + Transform Átalakítás - - + + Transform the selected object in the 3d view Átalakítja a 3d-s nézetben lévő kijelölt objektumot @@ -10419,13 +10471,13 @@ az aktuális példány elveszik. StdCmdUndo - + &Undo Visszavonás - - + + Undo exactly one action Egyetlen művelet visszavonása @@ -11225,7 +11277,7 @@ az aktuális példány elveszik. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11236,7 +11288,7 @@ Biztosan folytatja? - + Object dependencies Objektumfüggőségek @@ -11325,12 +11377,12 @@ Biztosan folytatja? Std_DuplicateSelection - + Object dependencies Objektumfüggőségek - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Külső tárgyakra hivatkozáshoz a dokumentumot legalább egyszer menteni kell. @@ -11348,7 +11400,7 @@ Menti most a dokumentumot? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11362,17 +11414,17 @@ Még mindig fojtatni szeretné? Std_Revert - + Revert document Dokumentum visszaállítás - + This will discard all the changes since last file save. Ez elveti az utolsó fájl mentéstől létrehozott összes módosítást. - + Do you want to continue? Folytatni szeretné? @@ -12035,23 +12087,15 @@ a FreeCAD elindítása után Egy képet tölt - - Gui::InteractiveScale - - - Enter desired distance between the points - Adja meg a pontok közötti kívánt távolságot - - NaviCubeDraggableCmd - + Movable navigation cube Mozgatható navigációs kocka - + Drag and place NaviCube Húzd és helyezd NaviCube @@ -12525,77 +12569,72 @@ megjeleníti a kezdő képet Beállításcsomagok kezelése - + Small (%1px) Kicsi (%1px) - + Medium (%1px) Közepes (%1px) - + Large (%1px) Nagy (%1px) - + Extra large (%1px) Extra nagy (%1px) - + Custom (%1px) Egyéni (%1px) - + Combo View Összetett nézet - + TreeView and PropertyView FaNézet és TulajdonságNézet - - Both - Mindkettő - - - + Preference Pack Name Preferencia csomag név - + Tags Címkék - + Apply Alkalmaz - + Apply the %1 preference pack Preferenciacsomag alkalmazása: %1 - + Choose a FreeCAD config file to import Válassza ki az importálni kívánt FreeCAD konfigurációs fájlt - + File exists A fájl létezik - + A preference pack with that name already exists. Overwrite? Már létezik ilyen nevű preferenciacsomag. Felülírja? @@ -12903,4 +12942,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_id.ts b/src/Gui/Language/FreeCAD_id.ts index 22bda1ce24..675ffd181d 100644 --- a/src/Gui/Language/FreeCAD_id.ts +++ b/src/Gui/Language/FreeCAD_id.ts @@ -122,12 +122,12 @@ Impor - + Delete Menghapus - + Paste expressions Paste expressions @@ -188,9 +188,9 @@ Penempatan + - Transform Transform @@ -220,7 +220,7 @@ Toggle selectability - + Edit image Edit image @@ -615,14 +615,6 @@ while doing a left or right click and move the mouse up or down &Membatalkan - - Gui::ControlSingleton - - - Task panel - Panel tugas - - Gui::DAG::Model @@ -1826,72 +1818,92 @@ same time. The one with the highest priority will be triggered. Nama Makro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Makro pengguna - + System macros Makro sistem - + Execute Menjalankan - + Close Dekat - + Create Membuat - + Delete Menghapus - + Edit Edit - + Rename Ganti nama - + Duplicate Duplicate - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Bilah alat - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download Unduh - + User macros location: Lokasi macros pengguna: @@ -1899,71 +1911,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makro - + Read-only Baca saja - + Macro file File makro - + Enter a file name, please: Masukkan nama file, silahkan: - - - + + + Existing file File yang ada - + '%1'. This file already exists. ' % 1 '. File ini sudah ada. - + Cannot create file Tidak bisa membuat file - + Creation of file '%1' failed. Pembuatan file ' % 1 ' gagal. - + Delete macro Hapus makro - + Do you really want to delete the macro '%1'? Apakah Anda benar-benar ingin menghapus makro ' % 1 '? - + Do not show again Jangan tunjukkan lagi - + Guided Walkthrough Guided Walkthrough - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,77 +1986,77 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Walkthrough, dialog 1 of 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close - + Walkthrough, dialog 1 of 1 Walkthrough, dialog 1 of 1 - + Walkthrough, dialog 2 of 2 Walkthrough, dialog 2 of 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Walkthrough instructions: Click right arrow button (->), then Close. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Walkthrough instructions: Click New, then right arrow (->) button, then Close. - + Renaming Macro File Mengganti nama file makro - - + + Enter new name: Masukkan nama baru: - - + + '%1' already exists. ' %1 ' sudah ada. - + Rename Failed Ganti nama Gagal - + Failed to rename to '%1'. Perhaps a file permission error? Gagal mengganti nama menjadi ' % 1 '. Mungkin file permission error? - + Duplicate Macro Duplicate Macro - + Duplicate Failed Duplicate Failed - + Failed to duplicate to '%1'. Perhaps a file permission error? Failed to duplicate to '%1'. @@ -4310,6 +4322,16 @@ horizontal space in Python console Save history Simpan riwayat + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4424,16 +4446,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4456,7 +4503,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4486,17 +4533,17 @@ Larger value eases to pick things, but can make small features impossible to sel Background color for active containers in tree view - + Central: Central: - + Midway: Midway: - + End: End: @@ -5472,22 +5519,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Tampilan Kombo - - - - Model - Model - - - - - Tasks - Tugas - Gui::DockWnd::PropertyDockView @@ -5714,65 +5749,65 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file File yang dimodifikasi - + %1. This has been modified outside of the source editor. Do you want to reload it? % 1. Ini telah dimodifikasi di luar editor sumber. Apakah Anda ingin memuat ulang? - + Unsaved document Dokumen yang belum disimpan - + The document has been modified. Do you want to save your changes? The dokumen telah dimodifikasi. Apakah Anda ingin menyimpan perubahan Anda? - + FreeCAD macro Makro FreeCAD - + Export PDF Ekspor PDF - + PDF file File PDF - + untitled[*] untitled [*] - + - Editor - Editor - + %1 chars removed % 1 karakter dihapus - + %1 chars added % 1 karakter ditambahkan - + Formatted Terformat @@ -5923,39 +5958,46 @@ Do you want to save your changes? Graphviz gagal membuat file gambar - + PNG format Format PNG - + Bitmap format Format bitmap - + GIF format Format GIF - + JPG format Format JPG - + SVG format Format SVG - - + + PDF format Format PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Grafik ekspor @@ -6116,7 +6158,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Dimensi @@ -6126,62 +6168,62 @@ Do you want to save your changes? Siap - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Open Addon Manager - + Close All Tutup semua - - - + + + Toggles this toolbar Toggles toolbar ini - - - + + + Toggles this dockable window Matikan jendela dockable ini - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Dokumen yang belum disimpan - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -6550,116 +6592,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit Keluar sistem - + The application is still running. Do you want to exit without saving your data? Aplikasi masih berjalan. Apakah Anda ingin keluar tanpa menyimpan data Anda? - - - - + + + + Python console Konsol Python - + Unhandled PyCXX exception. Pengecualian PyCXX yang tidak tertangani. - + Unhandled FreeCAD exception. Pengecualian FreeCAD yang tidak tertangani. - + Unhandled std C++ exception. Unhandled std C + + pengecualian. - + Unhandled unknown C++ exception. Unhandled tidak diketahui C ++ exception. - + &Copy &Salinan - + &Copy command & Perintah Salin - + &Copy history & Salin riwayat - + Save history as... Simpan sejarah sebagai... - + Save history Simpan riwayat - + Saves Python history across %1 sessions Saves Python history across %1 sessions - + &Paste &Pasta - + Select All Pilih Semua - + Clear console Hapus konsol - + Insert file name... Sisipkan nama file... - + Word wrap Bungkus kata - + Save History Simpan Riwayat - + Macro Files Makro File - + Insert file name Masukkan nama file - + All Files Semua data @@ -6744,22 +6786,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Sebelumnya - + Next Next - + Case sensitive Case sensitive - + Whole words Whole words @@ -6872,17 +6914,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Increment - + Translation Increment: Translation Increment: - + Rotation Increment: Rotation Increment: @@ -7707,37 +7749,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Tampilan pohon - + + Tasks + Tugas + + + Property view Tampilan properti - + Selection view Tampilan pilihan - - Combo View - Tampilan Kombo + + Model + Model - + DAG View DAG View - + Report view Tampilan laporan - + Python console Konsol Python @@ -7813,12 +7860,12 @@ Do you want to specify another directory? % 1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7859,71 +7906,71 @@ Do you want to specify another directory? Ekspor file - + Printing... Pencetakan... - + Exporting PDF... Mengekspor PDF... - - + + Unsaved document Dokumen yang belum disimpan - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - - + + Delete failed Gagal menghapus - + Dependency error Dependency error - + Copy selected Copy selected - + Copy active document Salin dokumen aktif - + Copy all documents Salin semua dokumen - + Paste Tempel - + Expression error Galat ekspresi - + Failed to parse some of the expressions. Please check the Report View for more details. Failed to parse some of the expressions. Please check the Report View for more details. - + Failed to paste expressions Failed to paste expressions @@ -8337,7 +8384,7 @@ Choose 'No' to roll back in the active document only. Choose 'Abort' to abort - + Save Macro Simpan Makro @@ -8404,7 +8451,7 @@ Please open a browser window and type in: http://localhost:%1. Tidak dapat membuka peramban sistem Anda. - + Options... Pilihan... @@ -8451,42 +8498,42 @@ Please open a browser window and type in: http://localhost:%1. Do you want to close this dialog? - + Do you want to save your changes to document '%1' before closing? Apakah Anda ingin menyimpan perubahan Anda ke dokumen ' % 1 ' sebelum menutup? - + Do you want to save your changes to document before closing? Do you want to save your changes to document before closing? - + If you don't save, your changes will be lost. Jika Anda tidak menyimpan, perubahan Anda akan hilang. - + Apply answer to all Apply answer to all - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Some documents could not be saved. Do you want to cancel closing? - + Delete macro Hapus makro - + Not allowed to delete system-wide macros Tidak diizinkan untuk menghapus makro sistem secara keseluruhan @@ -8506,12 +8553,17 @@ Please open a browser window and type in: http://localhost:%1. The % 1 tidak kosong, menghapus isinya juga? - + Translation: Terjemahan: - + + Translation XY: + Translation XY: + + + Rotation: Rotasi: @@ -8721,7 +8773,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8827,13 +8879,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Penjajaran... - - + + Align the selected objects Sejajarkan objek yang dipilih @@ -8911,13 +8963,13 @@ the current copy will be lost. StdCmdCopy - + C&opy Salinan - - + + Copy operation Copy operasi @@ -8925,13 +8977,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Memotong - - + + Cut out Memotong @@ -8939,13 +8991,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Menghapus - - + + Deletes the selected objects Menghapus objek yang dipilih @@ -9093,13 +9145,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Pilihan duplikat - - + + Put duplicates of the selected objects to the active document Letakkan duplikat dari objek yang dipilih ke dokumen yang aktif @@ -9107,17 +9159,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Toggle & Edit mode - + Toggles the selected object's edit mode Mengaktifkan mode edit objek yang dipilih - + Activates or Deactivates the selected object's edit mode Activates or Deactivates the selected object's edit mode @@ -9149,13 +9201,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Expression actions - - + + Actions that apply to expressions Actions that apply to expressions @@ -9647,19 +9699,19 @@ the current copy will be lost. StdCmdNew - + &New &Baru - - + + Create a new empty document Buat dokumen kosong baru - + Unnamed Tanpa nama @@ -9742,13 +9794,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Pasta - - + + Paste operation Tempel operasi @@ -9756,13 +9808,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Penempatan... - - + + Place the selected objects Tempatkan objek yang dipilih @@ -9770,13 +9822,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Mencetak... - - + + Print the document Cetak dokumen @@ -9784,13 +9836,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... & Ekspor PDF... - - + + Export the document as PDF Ekspor dokumen sebagai PDF @@ -9798,17 +9850,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Pratinjau Print... - + Print the document Cetak dokumen - + Print preview Pratinjau Print @@ -9816,13 +9868,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Informasi Proyek... - - + + Show details of the currently active project Tampilkan rincian proyek yang sedang aktif @@ -9830,13 +9882,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Utilitas proyek... - - + + Utility to extract or create project files Utilitas untuk mengekstrak atau membuat file proyek @@ -9858,13 +9910,13 @@ the current copy will be lost. StdCmdQuit - + E&xit Keluar - - + + Quits the application Keluar dari aplikasi @@ -9914,13 +9966,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Mengulangi - - + + Redoes a previously undone action Mengalahkan tindakan yang sebelumnya dibatalkan @@ -9928,13 +9980,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Menyegarkan - - + + Recomputes the current active document Menghitung ulang dokumen aktif saat ini @@ -9956,13 +10008,13 @@ the current copy will be lost. StdCmdRevert - + Revert Kembali - - + + Reverts to the saved version of this file Kembali ke versi tersimpan dari file ini @@ -9970,13 +10022,13 @@ the current copy will be lost. StdCmdSave - + &Save &Menyimpan - - + + Save the active document Simpan dokumen aktif @@ -9984,13 +10036,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Save All - - + + Save all opened document Save all opened document @@ -9998,13 +10050,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Simpan & Sebagai... - - + + Save the active document under a new file name Simpan dokumen aktif dengan nama file baru @@ -10012,13 +10064,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Simpan salinan... - - + + Save a copy of the active document under a new file name Simpan salinan dokumen aktif dengan nama file baru @@ -10082,13 +10134,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Pilih Semua - - + + Select all Pilih Semua @@ -10320,13 +10372,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Mengubah... - - + + Transform the geometry of selected objects Transform geometri dari objek yang dipilih @@ -10334,13 +10386,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Transform - - + + Transform the selected object in the 3d view Mengubah dipilih objek di 3d tampilan @@ -10404,13 +10456,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Membuka - - + + Undo exactly one action Urungkan tepat satu tindakan @@ -11210,7 +11262,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11221,7 +11273,7 @@ Are you sure you want to continue? - + Object dependencies Objek dependensi @@ -11310,12 +11362,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Objek dependensi - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -11333,7 +11385,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11347,17 +11399,17 @@ Do you still want to proceed? Std_Revert - + Revert document Kembalikan dokumen - + This will discard all the changes since last file save. Ini akan membuang semua perubahan sejak penyimpanan file terakhir. - + Do you want to continue? Apakah Anda ingin melanjutkan? @@ -12020,23 +12072,15 @@ after FreeCAD launches Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12511,77 +12555,72 @@ display the splash screen Manage preference packs - + Small (%1px) Kecil ( % 1p x) - + Medium (%1px) Sedang ( % 1p x) - + Large (%1px) Besar ( % 1p x) - + Extra large (%1px) Ekstra besar (%1px) - + Custom (%1px) Custom (%1px) - + Combo View Tampilan Kombo - + TreeView and PropertyView TreeView and PropertyView - - Both - Both - - - + Preference Pack Name Preference Pack Name - + Tags Tags - + Apply Apply - + Apply the %1 preference pack Apply the %1 preference pack - + Choose a FreeCAD config file to import Choose a FreeCAD config file to import - + File exists File exists - + A preference pack with that name already exists. Overwrite? A preference pack with that name already exists. Overwrite? @@ -12889,4 +12928,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_it.ts b/src/Gui/Language/FreeCAD_it.ts index 1aecec580e..251700b3c1 100644 --- a/src/Gui/Language/FreeCAD_it.ts +++ b/src/Gui/Language/FreeCAD_it.ts @@ -122,12 +122,12 @@ Importa - + Delete Elimina - + Paste expressions Incolla espressioni @@ -188,9 +188,9 @@ Posizionamento + - Transform Trasforma @@ -220,7 +220,7 @@ Commuta la selezionabilità - + Edit image Modifica immagine @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Annulla - - Gui::ControlSingleton - - - Task panel - Riquadro delle azioni - - Gui::DAG::Model @@ -1823,72 +1815,92 @@ con la stessa scorciatoia sono attivi contemporaneamente sarà usato il comando Nome macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macro utente - + System macros Macro di sistema - + Execute Esegui - + Close Chiudi - + Create Crea - + Delete Elimina - + Edit Modifica - + Rename Rinomina - + Duplicate Duplica - + Launch a guide on how to set up a macro in a custom global toolbar. Avvia una guida su come configurare una macro in una barra degli strumenti globale personalizzata. - + Toolbar Barra degli strumenti - + Open Addon Manager where macros created by the community and other addons can be downloaded. Apri Addon Manager dove possono essere scaricate le macro create dalla community e da altri addon. - + Download Download - + User macros location: Posizione delle macro utente: @@ -1896,72 +1908,72 @@ con la stessa scorciatoia sono attivi contemporaneamente sarà usato il comando Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macro - + Read-only Sola lettura - + Macro file File macro - + Enter a file name, please: Inserisci un nome file: - - - + + + Existing file File esistente - + '%1'. This file already exists. '%1'. Il file esiste già. - + Cannot create file Impossibile creare il file - + Creation of file '%1' failed. Creazione del file '%1' fallita. - + Delete macro Cancella macro - + Do you really want to delete the macro '%1'? Vuoi veramente cancellare la macro '%1'? - + Do not show again Non mostrare più - + Guided Walkthrough Procedura guidata - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1972,78 +1984,78 @@ Nota: le modifiche verranno applicate al successivo cambio di ambiente di lavoro - + Walkthrough, dialog 1 of 2 Procedura guidata, finestra di dialogo 1 di 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Istruzioni della procedura guidata: riempire i campi mancanti (opzionale) quindi fare clic su Aggiungi, quindi chiudere - + Walkthrough, dialog 1 of 1 Procedura guidata, finestra di dialogo 1 di 1 - + Walkthrough, dialog 2 of 2 Procedura guidata, finestra di dialogo 2 di 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Istruzioni della procedura guidata: fare clic sulla freccia destra (->), quindi chiudere. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Istruzioni della procedura guidata: fare clic sul pulsante Nuovo e quindi sulla freccia destra (->), quindi chiudere. - + Renaming Macro File Rinomina file Macro - - + + Enter new name: Inserire un nuovo nome: - - + + '%1' already exists. '%1' esiste già. - + Rename Failed Impossibile rinominare - + Failed to rename to '%1'. Perhaps a file permission error? Impossibile rinominare in '%1'. Forse un errore di autorizzazione del file? - + Duplicate Macro Duplica la macro - + Duplicate Failed Duplicazione fallita - + Failed to duplicate to '%1'. Perhaps a file permission error? Impossibile duplicare '%1'. @@ -4311,6 +4323,16 @@ orizzontale nella console di Python Save history Salva la cronologia + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4425,16 +4447,41 @@ Un valore maggiore facilita la selezione delle cose, ma può rendere impossibile - + Top: Sopra: - + Middle: Al centro: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4457,7 +4504,7 @@ Un valore maggiore facilita la selezione delle cose, ma può rendere impossibile - + Bottom: Sotto: @@ -4487,17 +4534,17 @@ Un valore maggiore facilita la selezione delle cose, ma può rendere impossibile Colore di sfondo nella vista ad albero per i contenitori attivi - + Central: Centrale: - + Midway: Medio: - + End: Fine: @@ -5473,22 +5520,10 @@ originariamente selezionati prima di aprire questa finestra Gui::DockWnd::ComboView - + Combo View Vista combinata - - - - Model - Modello - - - - - Tasks - Azioni - Gui::DockWnd::PropertyDockView @@ -5715,12 +5750,12 @@ originariamente selezionati prima di aprire questa finestra Gui::EditorView - + Modified file File modificato - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5729,54 +5764,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Documento non salvato - + The document has been modified. Do you want to save your changes? Il documento è stato modificato. Si desidera salvare le modifiche? - + FreeCAD macro Macro di FreeCAD - + Export PDF Esporta in formato PDF - + PDF file File PDF - + untitled[*] senza titolo[*] - + - Editor - Editor - + %1 chars removed %1 caratteri rimossi - + %1 chars added %1 caratteri aggiunti - + Formatted Formattato @@ -5927,39 +5962,46 @@ Si desidera salvare le modifiche? Graphviz non è riuscito a creare un file immagine - + PNG format Formato PNG - + Bitmap format Formato bitmap - + GIF format Formato GIF - + JPG format Formato JPG - + SVG format Formato SVG - - + + PDF format Formato PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Esporta grafico @@ -6120,7 +6162,7 @@ Si desidera salvare le modifiche? Gui::MainWindow - + Dimension Dimensione @@ -6130,62 +6172,62 @@ Si desidera salvare le modifiche? Pronto - + Help addon needed! Aiuto aggiuntivo necessario! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Il sistema di aiuto di %1 è ora gestito dall'addon "Help". Può essere facilmente installato tramite Addons Manager - + Open Addon Manager Apri Addon Manager - + Close All Chiudi tutto - - - + + + Toggles this toolbar Nascondi questa barra degli strumenti - - - + + + Toggles this dockable window Nascondi questa finestra - + WARNING: This is a development version. ATTENZIONE: Questa è una versione di sviluppo. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Non utilizzare in un ambiente di produzione. - - + + Unsaved document Documento non salvato - + The exported object contains external link. Please save the documentat least once before exporting. L'oggetto esportato contiene un link esterno. Salvare il documento almeno una volta prima di esportarlo. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Per collegare oggetti esterni, il documento deve essere salvato almeno una volta. @@ -6556,117 +6598,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Uscita dal sistema - + The application is still running. Do you want to exit without saving your data? L'applicazione è ancora in esecuzione. Vuoi uscire senza salvare i tuoi dati? - - - - + + + + Python console Console Python - + Unhandled PyCXX exception. Eccezione PyCXX non gestibile. - + Unhandled FreeCAD exception. Eccezione FreeCad non gestibile. - + Unhandled std C++ exception. Eccezione std C++ non gestibile. - + Unhandled unknown C++ exception. Eccezione sconosciuta C++ non gestibile. - + &Copy &Copia - + &Copy command &Copia il comando - + &Copy history &Copia la cronologia - + Save history as... Salva cronologia come... - + Save history Salva la cronologia - + Saves Python history across %1 sessions Salva la cronologia Python in %1 sessioni - + &Paste &Incolla - + Select All Seleziona tutto - + Clear console Pulisci la console - + Insert file name... Inserisci il nome del file... - + Word wrap A capo automatico - + Save History Salva cronologia - + Macro Files File di macro - + Insert file name Inserisci il nome del file - + All Files Tutti i file @@ -6751,22 +6793,22 @@ Vuoi uscire senza salvare i tuoi dati? Gui::SearchBar - + Previous Precedente - + Next Successivo - + Case sensitive Distingue maiuscole e minuscole - + Whole words Parole intere @@ -6883,17 +6925,17 @@ Vuoi specificare un'altra cartella? Gui::TaskCSysDragger - + Increments Incrementi - + Translation Increment: Incremento di traslazione: - + Rotation Increment: Incremento di rotazione: @@ -7718,37 +7760,42 @@ Vuoi specificare un'altra cartella? QDockWidget - + Tree view Struttura - + + Tasks + Azioni + + + Property view Proprietà - + Selection view Selezione - - Combo View - Vista combinata + + Model + Modello - + DAG View Vista DAG - + Report view Report - + Python console Console Python @@ -7824,12 +7871,12 @@ Vuoi specificare un'altra cartella? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7870,71 +7917,71 @@ Vuoi specificare un'altra cartella? Esporta file - + Printing... Stampa... - + Exporting PDF... Esportazione PDF... - - + + Unsaved document Documento non salvato - + The exported object contains external link. Please save the documentat least once before exporting. L'oggetto esportato contiene un link esterno. Salvare il documento almeno una volta prima di esportarlo. - - + + Delete failed Eliminazione non riuscita - + Dependency error Errore di dipendenza - + Copy selected Copia la selezione - + Copy active document Copia il documento attivo - + Copy all documents Copia tutti i documenti - + Paste Incolla - + Expression error Errore di espressione - + Failed to parse some of the expressions. Please check the Report View for more details. Impossibile analizzare alcune delle espressioni. Si prega di controllare la Vista Report per maggiori dettagli. - + Failed to paste expressions Impossibile incollare le espressioni @@ -8351,7 +8398,7 @@ Scegli 'No' per annullare le transazioni solo nel documento attivo. Scegli 'Annulla' per interrompere - + Save Macro Salva macro @@ -8420,7 +8467,7 @@ Aprire una finestra browser e scrivere http://localhost:%1. Impossibile aprire il browser di sistema. - + Options... Opzioni... @@ -8467,42 +8514,42 @@ Aprire una finestra browser e scrivere http://localhost:%1. Vuoi chiudere questa finestra di dialogo? - + Do you want to save your changes to document '%1' before closing? Si desidera salvare le modifiche apportate al documento '%1' prima di chiuderlo? - + Do you want to save your changes to document before closing? Salvare le modifiche apportate al documento prima di chiuderlo? - + If you don't save, your changes will be lost. Se non vengono salvate, le modifiche andranno perse. - + Apply answer to all Applica la risposta a tutti - + %1 Document(s) not saved %1 Documento(i) non salvato - + Some documents could not be saved. Do you want to cancel closing? Alcuni documenti non possono essere salvati. Vuoi annullare la chiusura? - + Delete macro Cancella macro - + Not allowed to delete system-wide macros Non è consentito eliminare le macro di sistema @@ -8522,12 +8569,17 @@ Aprire una finestra browser e scrivere http://localhost:%1. Il %1 non è vuoto, eliminare anche il suo contenuto? - + Translation: Traslazione: - + + Translation XY: + Translation XY: + + + Rotation: Rotazione: @@ -8737,7 +8789,7 @@ la copia corrente andranno perse. Cambia immagine... - + Color Gradient Sfumatura Colore @@ -8843,13 +8895,13 @@ la copia corrente andranno perse. StdCmdAlignment - + Alignment... Allineamento... - - + + Align the selected objects Allinea gli oggetti selezionati @@ -8927,13 +8979,13 @@ la copia corrente andranno perse. StdCmdCopy - + C&opy C&opia - - + + Copy operation Copia @@ -8941,13 +8993,13 @@ la copia corrente andranno perse. StdCmdCut - + &Cut &Taglia - - + + Cut out Taglia @@ -8955,13 +9007,13 @@ la copia corrente andranno perse. StdCmdDelete - + &Delete &Elimina - - + + Deletes the selected objects Elimina gli oggetti selezionati @@ -9109,13 +9161,13 @@ la copia corrente andranno perse. StdCmdDuplicateSelection - + Duplicate selection Duplica la selezione - - + + Put duplicates of the selected objects to the active document Inserisce i duplicati degli oggetti selezionati nel documento attivo @@ -9123,17 +9175,17 @@ la copia corrente andranno perse. StdCmdEdit - + Toggle &Edit mode Attiva/disattiva Modalità &modifica - + Toggles the selected object's edit mode Attiva/disattiva la modalità modifica per l'oggetto selezionato - + Activates or Deactivates the selected object's edit mode Attiva o disattiva la modalità di modifica dell'oggetto selezionato @@ -9165,13 +9217,13 @@ la copia corrente andranno perse. StdCmdExpression - + Expression actions Azioni rapide - - + + Actions that apply to expressions Azioni che si applicano alle espressioni @@ -9663,19 +9715,19 @@ la copia corrente andranno perse. StdCmdNew - + &New &Nuovo - - + + Create a new empty document Crea un documento vuoto - + Unnamed Senza nome @@ -9758,13 +9810,13 @@ la copia corrente andranno perse. StdCmdPaste - + &Paste &Incolla - - + + Paste operation Incolla @@ -9772,13 +9824,13 @@ la copia corrente andranno perse. StdCmdPlacement - + Placement... Posizionamento... - - + + Place the selected objects Posiziona gli oggetti selezionati @@ -9786,13 +9838,13 @@ la copia corrente andranno perse. StdCmdPrint - + &Print... &Stampa... - - + + Print the document Stampa il documento @@ -9800,13 +9852,13 @@ la copia corrente andranno perse. StdCmdPrintPdf - + &Export PDF... &Esporta PDF... - - + + Export the document as PDF Esporta il documento come PDF @@ -9814,17 +9866,17 @@ la copia corrente andranno perse. StdCmdPrintPreview - + &Print preview... Anteprima &di stampa... - + Print the document Stampa il documento - + Print preview Anteprima di stampa @@ -9832,13 +9884,13 @@ la copia corrente andranno perse. StdCmdProjectInfo - + Project i&nformation... I&nformazioni del progetto... - - + + Show details of the currently active project Mostra i dettagli del progetto attualmente attivo @@ -9846,13 +9898,13 @@ la copia corrente andranno perse. StdCmdProjectUtil - + Project utility... Utilità di progetto... - - + + Utility to extract or create project files Utilità per estrarre o creare file di progetto @@ -9874,13 +9926,13 @@ la copia corrente andranno perse. StdCmdQuit - + E&xit E&sci - - + + Quits the application Esce dall'applicazione @@ -9930,13 +9982,13 @@ la copia corrente andranno perse. StdCmdRedo - + &Redo &Ripristina - - + + Redoes a previously undone action Ripete un'operazione precedentemente annullata @@ -9944,13 +9996,13 @@ la copia corrente andranno perse. StdCmdRefresh - + &Refresh &Aggiorna - - + + Recomputes the current active document Ricalcola il documento attivo @@ -9972,13 +10024,13 @@ la copia corrente andranno perse. StdCmdRevert - + Revert Ripristina - - + + Reverts to the saved version of this file Viene ripristinata la versione salvata di questo file @@ -9986,13 +10038,13 @@ la copia corrente andranno perse. StdCmdSave - + &Save &Salva - - + + Save the active document Salva il documento attivo @@ -10000,13 +10052,13 @@ la copia corrente andranno perse. StdCmdSaveAll - + Save All Salva tutto - - + + Save all opened document Salva tutti i documenti aperti @@ -10014,13 +10066,13 @@ la copia corrente andranno perse. StdCmdSaveAs - + Save &As... S&alva con nome... - - + + Save the active document under a new file name Salva il documento attivo in un nuovo file @@ -10028,13 +10080,13 @@ la copia corrente andranno perse. StdCmdSaveCopy - + Save a &Copy... Salva una &copia... - - + + Save a copy of the active document under a new file name Salva una copia del documento attivo con un nuovo nome di file @@ -10098,13 +10150,13 @@ la copia corrente andranno perse. StdCmdSelectAll - + Select &All Seleziona &tutto - - + + Select all Seleziona tutto @@ -10336,13 +10388,13 @@ la copia corrente andranno perse. StdCmdTransform - + Transform... Trasforma... - - + + Transform the geometry of selected objects Trasforma la geometria degli oggetti selezionati @@ -10350,13 +10402,13 @@ la copia corrente andranno perse. StdCmdTransformManip - + Transform Trasforma - - + + Transform the selected object in the 3d view Trasforma l'oggetto selezionato nella vista 3D @@ -10420,13 +10472,13 @@ la copia corrente andranno perse. StdCmdUndo - + &Undo &Annulla - - + + Undo exactly one action Annulla l'ultima azione eseguita @@ -11226,7 +11278,7 @@ la copia corrente andranno perse. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11237,7 +11289,7 @@ Sicuro di voler continuare? - + Object dependencies Dipendenze dell'oggetto @@ -11326,12 +11378,12 @@ Sicuro di voler continuare? Std_DuplicateSelection - + Object dependencies Dipendenze dell'oggetto - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Per collegare oggetti esterni, il documento deve essere salvato almeno una volta. @@ -11349,7 +11401,7 @@ Vuoi salvare il documento ora? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11363,17 +11415,17 @@ Si desidera ancora procedere? Std_Revert - + Revert document Ripristino del documento - + This will discard all the changes since last file save. Questo elimina tutte le modifiche fatte dopo l'ultimo salvataggio del file. - + Do you want to continue? Si desidera continuare? @@ -12036,23 +12088,15 @@ dopo l'avvio di FreeCAD Carica un'immagine - - Gui::InteractiveScale - - - Enter desired distance between the points - Inserisci la distanza desiderata tra i punti - - NaviCubeDraggableCmd - + Movable navigation cube Cubo di navigazione mobile - + Drag and place NaviCube Trascina e posiziona il Cubo di navigazione @@ -12527,77 +12571,72 @@ la schermata di avvio Gestisci pacchetti di preferenze - + Small (%1px) Piccolo (%1px) - + Medium (%1px) Medio (%1px) - + Large (%1px) Grande (%1px) - + Extra large (%1px) Grandissimo (%1px) - + Custom (%1px) Personalizzato (%1px) - + Combo View Vista combinata - + TreeView and PropertyView Vista ad albero e proprietà - - Both - Entrambe - - - + Preference Pack Name Nome Pacchetto Preferenze - + Tags Etichette - + Apply Applica - + Apply the %1 preference pack Applica il pacchetto preferenze %1 - + Choose a FreeCAD config file to import Scegli un file di configurazione FreeCAD da importare - + File exists Il file esiste - + A preference pack with that name already exists. Overwrite? Esiste già un pacchetto di preferenze con quel nome. Vuoi sovrascriverlo? @@ -12905,4 +12944,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_ja.ts b/src/Gui/Language/FreeCAD_ja.ts index bee959d532..c5855048b9 100644 --- a/src/Gui/Language/FreeCAD_ja.ts +++ b/src/Gui/Language/FreeCAD_ja.ts @@ -122,12 +122,12 @@ インポート - + Delete 削除 - + Paste expressions 式を貼り付け @@ -188,9 +188,9 @@ 配置 + - Transform 変換 @@ -220,7 +220,7 @@ 選択方法の切り替え - + Edit image 画像の編集 @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down キャンセル(&C) - - Gui::ControlSingleton - - - Task panel - タスクパネル - - Gui::DAG::Model @@ -1824,72 +1816,92 @@ same time. The one with the highest priority will be triggered. マクロ名: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros ユーザーマクロ - + System macros システムマクロ - + Execute 実行 - + Close 閉じる - + Create 作成 - + Delete 削除 - + Edit 編集 - + Rename 名前の変更 - + Duplicate 複製する - + Launch a guide on how to set up a macro in a custom global toolbar. カスタムツールバーでのマクロ設定方法のガイドを表示 - + Toolbar ツールバー - + Open Addon Manager where macros created by the community and other addons can be downloaded. コミュニティーで作成されたマクロやその他のアドオンをダウンロードできるアドオンマネージャーを開く - + Download ダウンロード - + User macros location: ユーザーマクロの場所: @@ -1897,71 +1909,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros マクロ - + Read-only 読み取り専用 - + Macro file マクロファイル - + Enter a file name, please: ファイル名を入力してください: - - - + + + Existing file 既存ファイル - + '%1'. This file already exists. '%1'.このファイルは既に存在します。 - + Cannot create file ファイルを作成できません。 - + Creation of file '%1' failed. ファイル '%1' の作成に失敗しました。 - + Delete macro マクロの削除 - + Do you really want to delete the macro '%1'? マクロ '%1' を削除しますか? - + Do not show again 今後表示しない - + Guided Walkthrough ガイド・ウォークスルー - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1972,76 +1984,76 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 ウォークスルー・ダイアログ1/2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close ウォークスルーの手順: 不足しているフィールドを入力(省略可能)して、追加をクリックし、閉じます。 - + Walkthrough, dialog 1 of 1 ウォークスルー・ダイアログ1/1 - + Walkthrough, dialog 2 of 2 ウォークスルー・ダイアログ2/2 - + Walkthrough instructions: Click right arrow button (->), then Close. ウォークスルーの手順: 右矢印ボタン(→)をクリックし、閉じます。 - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. ウォークスルーの手順: 新規をクリックし、さらに右矢印ボタン(→)をクリックし、閉じます。 - + Renaming Macro File マクロファイルの名前を変更 - - + + Enter new name: 新しい名前を入力: - - + + '%1' already exists. '%1' は既に存在します - + Rename Failed 名前の変更に失敗 - + Failed to rename to '%1'. Perhaps a file permission error? 名前を '%1' に変更できませんでした。ファイルのアクセス許可でのエラーの可能性があります。 - + Duplicate Macro マクロの複製 - + Duplicate Failed 複製に失敗しました - + Failed to duplicate to '%1'. Perhaps a file permission error? '%1' を複製に失敗しました。 @@ -4286,6 +4298,16 @@ horizontal space in Python console Save history 履歴の保存 + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4399,16 +4421,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: 上: - + Middle: 中間: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4431,7 +4478,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: 下: @@ -4461,17 +4508,17 @@ Larger value eases to pick things, but can make small features impossible to sel ツリービューでのアクティブなコンテナーの背景色 - + Central: 中央: - + Midway: 中間: - + End: 終端: @@ -5449,22 +5496,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View コンボビュー - - - - Model - モデル - - - - - Tasks - タスク - Gui::DockWnd::PropertyDockView @@ -5691,12 +5726,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file 変更されたファイル - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5704,54 +5739,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document 未保存のドキュメント - + The document has been modified. Do you want to save your changes? ドキュメントが変更されています。 変更を保存しますか? - + FreeCAD macro FreeCADマクロ - + Export PDF PDFファイル形式でエクスポート - + PDF file PDFファイル - + untitled[*] untitled[*] - + - Editor - エディター - + %1 chars removed %1文字を削除 - + %1 chars added %1文字を追加 - + Formatted フォーマット済み @@ -5902,39 +5937,46 @@ Do you want to save your changes? Graphvizはイメージファイルを作成できませんでした - + PNG format PNG形式 - + Bitmap format ビットマップ形式 - + GIF format GIF形式 - + JPG format JPG形式 - + SVG format SVG形式 - - + + PDF format PDF形式 - - + + + Graphviz format + Graphviz format + + + + + Export graph グラフをエクスポート @@ -6095,7 +6137,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension 寸法 @@ -6105,62 +6147,62 @@ Do you want to save your changes? 準備完了 - + Help addon needed! ヘルプ用アドオンが必要です! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager %1 のヘルプシステムは「Help」アドオンによって制御されるようになりました。アドオンマネージャーから簡単にインストールできます。 - + Open Addon Manager アドオンマネージャーを開く - + Close All すべて閉じる - - - + + + Toggles this toolbar このツールバーを切り替えます - - - + + + Toggles this dockable window このドッキング可能なウィンドウを切り替える - + WARNING: This is a development version. 警告: これは開発版です。 - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document 未保存のドキュメント - + The exported object contains external link. Please save the documentat least once before exporting. エクスポートされたオブジェクトには外部リンクがふくまれています。エクスポートの前に少なくとも一度ドキュメントを保存してください。 - + To link to external objects, the document must be saved at least once. Do you want to save the document now? 外部オブジェクトにリンクするにはドキュメントを少なくとも一度保存する必要があります。 @@ -6529,116 +6571,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit システム終了 - + The application is still running. Do you want to exit without saving your data? アプリケーションがまだ実行されています。あなたのデータを保存せずに終了しますか。 - - - - + + + + Python console Python コンソール - + Unhandled PyCXX exception. 未処理のPyCXX例外。 - + Unhandled FreeCAD exception. 未処理のFreeCAD例外。 - + Unhandled std C++ exception. 未処理の std C++ 例外 - + Unhandled unknown C++ exception. 処理されていない不明な C++ 例外。 - + &Copy コピー(&C) - + &Copy command コピー コマンド(&C) - + &Copy history コピー履歴(&C) - + Save history as... 名前を付けて履歴を保存... - + Save history 履歴の保存 - + Saves Python history across %1 sessions %1 セッションでPythonの履歴を保存します - + &Paste 貼り付け(&P) - + Select All 全て選択 - + Clear console コンソールをクリア - + Insert file name... ファイル名を挿入... - + Word wrap 右端で折り返す - + Save History 履歴の保存。 - + Macro Files マクロファイル - + Insert file name ファイル名を挿入します。 - + All Files すべてのファイル @@ -6723,22 +6765,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous 前へ - + Next 次へ - + Case sensitive 大文字と小文字を区別 - + Whole words 単語単位 @@ -6849,23 +6891,23 @@ Do you want to specify another directory? Position - Position + 位置 Gui::TaskCSysDragger - + Increments 増分 - + Translation Increment: 平行移動の増分: - + Rotation Increment: 回転の増分: @@ -7690,37 +7732,42 @@ Do you want to specify another directory? QDockWidget - + Tree view ツリービュー - + + Tasks + タスク + + + Property view プロパティビュー - + Selection view 選択ビュー - - Combo View - コンボビュー + + Model + モデル - + DAG View DAGビュー - + Report view レポートビュー - + Python console Python コンソール @@ -7796,12 +7843,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7842,71 +7889,71 @@ Do you want to specify another directory? ファイルのエクスポート - + Printing... 印刷... - + Exporting PDF... PDF ファイルをエクスポートしています - - + + Unsaved document 未保存のドキュメント - + The exported object contains external link. Please save the documentat least once before exporting. エクスポートされたオブジェクトには外部リンクがふくまれています。エクスポートの前に少なくとも一度ドキュメントを保存してください。 - - + + Delete failed 削除に失敗しました - + Dependency error 依存関係エラー - + Copy selected 選択内容のコピー - + Copy active document アクティブなドキュメントをコピー - + Copy all documents 全てのドキュメントをコピー - + Paste 貼り付け - + Expression error 式にエラーがあります - + Failed to parse some of the expressions. Please check the Report View for more details. 幾つか式の構文解析に失敗しました。 詳細に就いては、レポートビューを確認してください。 - + Failed to paste expressions 式の貼り付けに失敗しました @@ -8322,7 +8369,7 @@ Choose 'Abort' to abort 中止するには「中止」を選択してください - + Save Macro マクロを保存します。 @@ -8390,7 +8437,7 @@ Please open a browser window and type in: http://localhost:%1. お使いのシステムのブラウザーを開くことができません。 - + Options... オプション... @@ -8437,42 +8484,42 @@ Please open a browser window and type in: http://localhost:%1. このダイアログを閉じますか? - + Do you want to save your changes to document '%1' before closing? 閉じる前にドキュメント '%1' に変更を保存しますか? - + Do you want to save your changes to document before closing? 閉じる前にドキュメントに変更を保存しますか? - + If you don't save, your changes will be lost. 保存しない場合、変更内容は失われます。 - + Apply answer to all すべてに適用 - + %1 Document(s) not saved %1 ドキュメントは保存されていません - + Some documents could not be saved. Do you want to cancel closing? 一部のドキュメントを保存できませんでした。閉じることをキャンセルしますか? - + Delete macro マクロの削除 - + Not allowed to delete system-wide macros システム全体のマクロを削除することはできません @@ -8492,12 +8539,17 @@ Please open a browser window and type in: http://localhost:%1. %1は空ではありません。コンテンツごと削除しますか? - + Translation: 平行移動量: - + + Translation XY: + Translation XY: + + + Rotation: 回転: @@ -8702,7 +8754,7 @@ the current copy will be lost. 画像を変更... - + Color Gradient カラーグラデーション @@ -8808,13 +8860,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... 整列… - - + + Align the selected objects 選択されたオブジェクトを整列 @@ -8892,13 +8944,13 @@ the current copy will be lost. StdCmdCopy - + C&opy コピー(&O) - - + + Copy operation コピー操作 @@ -8906,13 +8958,13 @@ the current copy will be lost. StdCmdCut - + &Cut 切り取り(&C) - - + + Cut out 切り取り @@ -8920,13 +8972,13 @@ the current copy will be lost. StdCmdDelete - + &Delete 削除(&D) - - + + Deletes the selected objects 選択したオブジェクトを削除 @@ -9074,13 +9126,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection 選択を複製する - - + + Put duplicates of the selected objects to the active document 選択されたオブジェクトの複製をアクティブなドキュメントに挿入 @@ -9088,17 +9140,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode 編集モードの切り替え(&E) - + Toggles the selected object's edit mode 選択したオブジェクトの編集モードを切り替える - + Activates or Deactivates the selected object's edit mode 選択したオブジェクトの編集モードをアクティブ化・非アクティブ化 @@ -9130,13 +9182,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions 式アクション - - + + Actions that apply to expressions 式に適用するアクション @@ -9628,19 +9680,19 @@ the current copy will be lost. StdCmdNew - + &New 新規(&N) - - + + Create a new empty document 新しい空のドキュメントを作成 - + Unnamed Unnamed @@ -9723,13 +9775,13 @@ the current copy will be lost. StdCmdPaste - + &Paste 貼り付け(&P) - - + + Paste operation 貼り付け操作 @@ -9737,13 +9789,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... 配置... - - + + Place the selected objects 選択したオブジェクトを配置 @@ -9751,13 +9803,13 @@ the current copy will be lost. StdCmdPrint - + &Print... 印刷(&P)... - - + + Print the document ドキュメントを印刷 @@ -9765,13 +9817,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... PDFファイル形式でエクスポート(&E)... - - + + Export the document as PDF ドキュメントを PDF ファイル形式でエクスポート @@ -9779,17 +9831,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... 印刷プレビュー(&P)... - + Print the document ドキュメントを印刷 - + Print preview 印刷プレビュー @@ -9797,13 +9849,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... プロジェクト情報(&N) - - + + Show details of the currently active project 現在アクティブなプロジェクトの詳細を表示します。 @@ -9811,13 +9863,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... プロジェクトユーティリティ... - - + + Utility to extract or create project files プロジェクトファイルの抽出・作成ユーティリティ @@ -9839,13 +9891,13 @@ the current copy will be lost. StdCmdQuit - + E&xit 終了(&X) - - + + Quits the application アプリケーションを終了します。 @@ -9895,13 +9947,13 @@ the current copy will be lost. StdCmdRedo - + &Redo やり直し(&R) - - + + Redoes a previously undone action 取り消した操作をやり直し @@ -9909,13 +9961,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh 更新(&R) - - + + Recomputes the current active document 現在アクティブなドキュメントを再計算 @@ -9937,13 +9989,13 @@ the current copy will be lost. StdCmdRevert - + Revert 元に戻す - - + + Reverts to the saved version of this file このファイルの保存したバージョンに戻ります @@ -9951,13 +10003,13 @@ the current copy will be lost. StdCmdSave - + &Save 保存(&S) - - + + Save the active document 作業中のドキュメントを保存 @@ -9965,13 +10017,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All 全て保存 - - + + Save all opened document 開かれている全てのドキュメントを保存 @@ -9979,13 +10031,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... 名前を付けて保存(&A) - - + + Save the active document under a new file name 新しいファイル名で作業中のドキュメントを保存 @@ -9993,13 +10045,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... コピーを保存(&C)... - - + + Save a copy of the active document under a new file name 作業中のドキュメントのコピーを新しいファイル名で保存します @@ -10063,13 +10115,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All すべて選択(&A) - - + + Select all すべて選択 @@ -10301,13 +10353,13 @@ the current copy will be lost. StdCmdTransform - + Transform... 変形... - - + + Transform the geometry of selected objects 選択されたオブジェクトの形状を変形 @@ -10315,13 +10367,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform 変換 - - + + Transform the selected object in the 3d view 3Dビューで選択されたオブジェクトを変形 @@ -10385,13 +10437,13 @@ the current copy will be lost. StdCmdUndo - + &Undo 元に戻す(&U) - - + + Undo exactly one action 1つ前の状態に戻す @@ -11191,7 +11243,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11202,7 +11254,7 @@ Are you sure you want to continue? - + Object dependencies オブジェクトの依存関係 @@ -11291,12 +11343,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies オブジェクトの依存関係 - + To link to external objects, the document must be saved at least once. Do you want to save the document now? 外部オブジェクトにリンクするにはドキュメントを少なくとも一度保存する必要があります。 @@ -11314,7 +11366,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11328,17 +11380,17 @@ Do you still want to proceed? Std_Revert - + Revert document ドキュメントを元に戻す - + This will discard all the changes since last file save. 最後にファイルを保存してから以降のすべての変更が破棄されます。 - + Do you want to continue? 続行しますか? @@ -12000,23 +12052,15 @@ after FreeCAD launches 画像を読み込み - - Gui::InteractiveScale - - - Enter desired distance between the points - 点間の望ましい距離を入力 - - NaviCubeDraggableCmd - + Movable navigation cube 移動可能なナビゲーションキューブ - + Drag and place NaviCube ナビゲーションキューブをドラッグして配置 @@ -12487,77 +12531,72 @@ display the splash screen ユーザー設定パックを管理 - + Small (%1px) 小(%1px) - + Medium (%1px) 中(%1px) - + Large (%1px) 大(%1px) - + Extra large (%1px) 特大(%1px) - + Custom (%1px) カスタム(%1px) - + Combo View コンボビュー - + TreeView and PropertyView ツリービューとプロパティービュー - - Both - 両方 - - - + Preference Pack Name ユーザー設定パック名 - + Tags タグ - + Apply 適用する - + Apply the %1 preference pack ユーザー設定パック %1 を適用 - + Choose a FreeCAD config file to import インポートするFreeCAD設定ファイルを選択してください。 - + File exists ファイルが存在します。 - + A preference pack with that name already exists. Overwrite? 同じ名前のユーザー設定パックが既に存在します。上書きしますか? @@ -12859,4 +12898,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_ka.ts b/src/Gui/Language/FreeCAD_ka.ts index 9df51042ca..1d026a8c68 100644 --- a/src/Gui/Language/FreeCAD_ka.ts +++ b/src/Gui/Language/FreeCAD_ka.ts @@ -122,12 +122,12 @@ შემოტანა - + Delete წაშლა - + Paste expressions გამოთქმის ჩასმა @@ -188,9 +188,9 @@ მდებარეობა + - Transform გარდაქმნა @@ -220,7 +220,7 @@ მონიშვნადობის ჩართ/გამორთ - + Edit image გამოსახულების ჩასწორება @@ -582,12 +582,12 @@ Press left mouse button - დააწექით მარცხენა თაგუნას ღილაკს + დააჭირეთ თაგუნის მარცხენა ღილაკს Press middle mouse button - დააწექით შუა თაგუნას ღილაკს + დააჭირეთ თაგუნის შუა ღილაკს @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &გაუქმება - - Gui::ControlSingleton - - - Task panel - ამოცანების ზოლი - - Gui::DAG::Model @@ -1171,7 +1163,7 @@ If this is not ticked, then the property must be uniquely named, and it is acces Remove - წაშლა + მოცილება @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. მაკროს სახელი: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros მომხმარებლის მაკროები - + System macros სისტემური მაკროები - + Execute გაშვება - + Close დახურვა - + Create შექმნა - + Delete წაშლა - + Edit ჩასწორება - + Rename გადარქმევა - + Duplicate დუბლირება - + Launch a guide on how to set up a macro in a custom global toolbar. გიდის გაშვება იმის შესახებ, როგორ მოვირგოთ მაკრო ხელსაწყოების გლობალურ ზოლში. - + Toolbar ხელსაწყოთა ზოლი - + Open Addon Manager where macros created by the community and other addons can be downloaded. გახსენით დამატებების მმართველი, სადაც საზოგადოების მიერ შექმნილი მაკროებისა და სხვა დამატებების გადმოწერა შეგიძლიათ. - + Download გადმოწერა - + User macros location: მომხმარებლის მაკროების მდებარეობა: @@ -1898,72 +1910,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros მაკროები - + Read-only მხოლოდ კითხვის რეჟიმი - + Macro file მაკროს ფაილი - + Enter a file name, please: შეიყვანეთ ფაილის სახელი, გეთაყვა: - - - + + + Existing file არსებული ფაილი - + '%1'. This file already exists. '%1' ეს ფაილი უკვე არსებობს. - + Cannot create file ფაილის შექმნა შეუძლებელია - + Creation of file '%1' failed. ფაილ '%1'-ის შექმნის შეცდომა. - + Delete macro მაკროს წაშლა - + Do you really want to delete the macro '%1'? მართლა გნებავთ მაკრო '%1'-ის წაშლა? - + Do not show again აღარ მაჩვენო განმეორებით - + Guided Walkthrough ინტერაქტიული ტური - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 ტური, ფანჯარა 1 2-დან - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close ინსტრუქციები: შეავსეთ გამოტოვებული ველები (არასავალდებულო) შემდეგ დააჭირეთ დამატებას, შემდეგ კი დახურვას - + Walkthrough, dialog 1 of 1 ტური, ფანჯარა 1 1-დან - + Walkthrough, dialog 2 of 2 ტური, ფანჯარა 2 2-დან - + Walkthrough instructions: Click right arrow button (->), then Close. გავლის ინსტრუქციები: დააწკაპუნეთ მარჯვნივ ისარზე (->), შემდეგ კი დახურვაზე. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. გავლის ინსტრუქციები: დააწკაპუნეთ ახალი, შემდეგ მარჯვნივ ისარზე (->), შემდეგ კი დახურვაზე. - + Renaming Macro File მაკროს ფაილის სახელის გადარქმევა - - + + Enter new name: შეიყვანეთ ახალი სახელი: - - + + '%1' already exists. %1 უკვე არსებობს. - + Rename Failed სახელის გადარქმევის შეცდომა - + Failed to rename to '%1'. Perhaps a file permission error? %1-სთვის სახელის გადარქმევის შეცდომა. ფაილებზე წვდომები ნამდვილად გაქვთ? - + Duplicate Macro მაკროს ასლი - + Duplicate Failed ასლის შექმნის შეცდომა - + Failed to duplicate to '%1'. Perhaps a file permission error? %1-ის დუბლირების შეცდომა. @@ -4307,6 +4319,16 @@ horizontal space in Python console Save history ისტორიის შენახვა + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4421,16 +4443,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: თავზე: - + Middle: შუა: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4453,7 +4500,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: ძირზე: @@ -4483,17 +4530,17 @@ Larger value eases to pick things, but can make small features impossible to sel ხის ხედში აქტიური კონტეინერების ფონის ფერი - + Central: ცენტრალური: - + Midway: შუაში: - + End: ბოლო: @@ -4620,7 +4667,7 @@ The preference system is the one set in the general preferences. Placement - განლაგება + მდებარეობა @@ -5083,7 +5130,7 @@ The 'Status' column shows whether the document could be recovered. Placement - მდებარეობა + განლაგება @@ -5471,22 +5518,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View კომბო ხედი - - - - Model - მოდელი - - - - - Tasks - დავალებები - Gui::DockWnd::PropertyDockView @@ -5713,12 +5748,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file შეცვლილი ფაილი - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5727,54 +5762,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document შეუნახავი დოკუმენტი - + The document has been modified. Do you want to save your changes? დოკუმენტში შეტანილია ცვლილებები. გნებავთ თქვენი ცვლილებების შენახვა? - + FreeCAD macro FreeCAD-ის მაკრო - + Export PDF PDF-ად გატანა - + PDF file PDF ფაილი - + untitled[*] უსახელო[*] - + - Editor - რედაქტორი - + %1 chars removed წაიშალა %1 სიმბოლო - + %1 chars added დაემატა %1 სიმბოლო - + Formatted ფორმატირებულია @@ -5925,39 +5960,46 @@ Do you want to save your changes? Graphviz-მა ვერ შეძლო გამოსახულების შექმნა - + PNG format PNG ფორმატი - + Bitmap format Bitmap ფორმატი - + GIF format GIF ფორმატი - + JPG format JPG ფორმატი - + SVG format SVG ფორმატი - - + + PDF format PDF ფორმატი - - + + + Graphviz format + Graphviz format + + + + + Export graph გრაფიკის გატანა @@ -5995,7 +6037,7 @@ Do you want to save your changes? Scroll middle mouse button - დაატრიალეთ შუა თაგუნას ღილაკი + დაატრიალეთ თაგუნის ბორბალი @@ -6118,7 +6160,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension ზომა @@ -6128,62 +6170,62 @@ Do you want to save your changes? მზადაა - + Help addon needed! საჭიროა დამატების დახმარება! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager %1-ის დახმარების სისტემა ახლა "Help" დამატების მიერაა მხარდაჭერილი. მისი დაყენება ადვილად შეგიძლიათ დამატების მმართველიდან - + Open Addon Manager დამატებების მმართველის გახსნა - + Close All ყველას დახურვა - - - + + + Toggles this toolbar ამ ზოლის ჩართ/გამორთ - - - + + + Toggles this dockable window მიმაგრებადი ფანჯრის ჩვენების ჩართ/გამორთ - + WARNING: This is a development version. გაფრთხილება: ეს სატესტო ვერსიაა. - + Please do not use it in a production environment. - Please do not use it in a production environment. + არ გამოიყენოთ ის საწარმოო გარემოში. - - + + Unsaved document შეუნახავი დოკუმენტი - + The exported object contains external link. Please save the documentat least once before exporting. გატანილი ობიექტი შეიცავს გარე ბმულს. გთხოვთ გატანამდე დოკუმენტი ერთხელ მაინც შეინახოთ. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? გარე ობიექტებთან დასაკავშირებლად, დოკუმენტი უნდა იყოს შენახული ერთხელ მაინც. @@ -6555,117 +6597,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit სისტემაში გასვლა - + The application is still running. Do you want to exit without saving your data? აპლიკაცია ჯერ კიდევ გაშვებულია. გნებავთ გამოსვლა ცვლილებების შენახვის გარეშე? - - - - + + + + Python console Python-ის კონსოლი - + Unhandled PyCXX exception. PyCXX-ის დაუმუშავებელი შეცდომა. - + Unhandled FreeCAD exception. FreeCAD-ის დაუმუშავებელი შეცდომა. - + Unhandled std C++ exception. Std C++-ის დაუმუშავებელი შეცდომა. - + Unhandled unknown C++ exception. C++-ის დაუმუშავებელი უცნობი შეცდომა. - + &Copy &კოპირება - + &Copy command &კოპირების ბრძანება - + &Copy history &კოპირების ისტორია - + Save history as... ისტორიის შენახვა როგორც... - + Save history ისტორიის შენახვა - + Saves Python history across %1 sessions Python-ის ისტორიის შენახვა %1 სესიის განმავლობაში - + &Paste &ჩასმა - + Select All ყველაფრის მონიშვნა - + Clear console კონსოლის გასუფთავება - + Insert file name... ჩასვით ფაილის სახელი... - + Word wrap სიტყვების გადატანა - + Save History ისტორიის შენახვა - + Macro Files მაკროს ფაილები - + Insert file name ჩასვით ფაილის სახელი - + All Files ყველა ფაილი @@ -6750,22 +6792,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous წინა - + Next შემდეგი - + Case sensitive რეგისტრის გათვალისწინებით - + Whole words მხოლოდ სრული სიტყვები @@ -6876,23 +6918,23 @@ Do you want to specify another directory? Position - Position + მდებარეობა Gui::TaskCSysDragger - + Increments ნამატები - + Translation Increment: მოძრაობითი გადატანის ბიჯი: - + Rotation Increment: შებრუნების ზრდადობა: @@ -6922,7 +6964,7 @@ Do you want to specify another directory? Remove - მოცილება + წაშლა @@ -7057,7 +7099,7 @@ Do you want to specify another directory? Press middle mouse button - დააჭირეთ თაგუნის შუა ღილაკს + დააწექით შუა თაგუნას ღილაკს @@ -7067,7 +7109,7 @@ Do you want to specify another directory? Scroll middle mouse button - დაატრიალეთ თაგუნის ბორბალი + დაატრიალეთ შუა თაგუნას ღილაკი @@ -7075,7 +7117,7 @@ Do you want to specify another directory? Press left mouse button - დააჭირეთ თაგუნის მარცხენა ღილაკს + დააწექით მარცხენა თაგუნას ღილაკს @@ -7717,37 +7759,42 @@ Do you want to specify another directory? QDockWidget - + Tree view ელემენტების ხე - + + Tasks + დავალებები + + + Property view თვისებაზე გადახედვა - + Selection view მონიშნულის ხედი - - Combo View - ჩამოშლადი სია + + Model + მოდელი - + DAG View DAG ხედი - + Report view ანგარიში - + Python console Python-ის კონსოლი @@ -7823,12 +7870,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. თქვენს სისტემაზე გაშვებული OpenGL-ის ვერსიაა %1.%2. FreeCAD-ს სამუშაოდ OpenGL 2.0 ან უფრო მაღალი სჭირდება. განაახლეთ საჭიროებისამებრ თქვენი ვიდეობარათის დრაივერი ან/და თვითონ ბარათი. - + Invalid OpenGL Version არასწორი OpenGL-ის ვერსია @@ -7869,71 +7916,71 @@ Do you want to specify another directory? ფაილის გატანა - + Printing... დაბეჭდვა... - + Exporting PDF... PDF-ად გატანა... - - + + Unsaved document შეუნახავი დოკუმენტი - + The exported object contains external link. Please save the documentat least once before exporting. გატანილი ობიექტი შეიცავს გარე ბმულს. გთხოვთ გატანამდე დოკუმენტი ერთხელ მაინც შეინახოთ. - - + + Delete failed წაშლის შეცდომა - + Dependency error დამოკიდებულების შეცდომა - + Copy selected მონიშნულის კოპირება - + Copy active document აქტიური დოკუმენტის კოპირება - + Copy all documents ყველა დოკუმენტის კოპირება - + Paste ჩასმა - + Expression error გამოხატვის შეცდომა - + Failed to parse some of the expressions. Please check the Report View for more details. შეცდომა ზოგიერთი გამოთქმის გავლილსას. მეტი დეტალებისთვის იხილეთ ჟურნალი. - + Failed to paste expressions გამოთქმების ჩასმის შეცდომა @@ -8350,7 +8397,7 @@ Choose 'Abort' to abort აირჩიეთ „შეწყვეტა“ შესაწყვეტად - + Save Macro მაკროს შენახვა @@ -8419,7 +8466,7 @@ Please open a browser window and type in: http://localhost:%1. სისტემური ბრაუზერის გაშვების შეცდომა. - + Options... პარამეტრები... @@ -8466,42 +8513,42 @@ Please open a browser window and type in: http://localhost:%1. ნამდვილად გსურთ ამ ფანჯრის დახურვა? - + Do you want to save your changes to document '%1' before closing? გსურთ შეინახოთ ცვლილებები %1 -ში მის დახურვამდე? - + Do you want to save your changes to document before closing? გსურთ შეინახოთ დოკუმენტის ცვლილებები მის დახურვამდე? - + If you don't save, your changes will be lost. თუ არ შეინახავთ, ყველა თქვენი ცვლილება დაიკარგება. - + Apply answer to all პასუხის ყველაზე გადატარება - + %1 Document(s) not saved %1 დოკუმენტი არ იქნა შენახული - + Some documents could not be saved. Do you want to cancel closing? ზოგიერთი დოკუმენტის შენახვა შეუძლებელია. გნებავთ დახურვის გაუქმება? - + Delete macro მაკროს წაშლა - + Not allowed to delete system-wide macros სისტემური მაკროების წაშლა აკრძალულია @@ -8521,12 +8568,17 @@ Please open a browser window and type in: http://localhost:%1. %1 ცარიელი არაა. წავშალო მისი შემცველობაც? - + Translation: მოძრაობითი გადატანა: - + + Translation XY: + Translation XY: + + + Rotation: ბრუნვა: @@ -8735,7 +8787,7 @@ the current copy will be lost. გამოსახულების შეცვლა... - + Color Gradient ფერადი გრადიენტი @@ -8841,13 +8893,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... სწორება... - - + + Align the selected objects მონიშნული ობიექტების სწორება @@ -8925,13 +8977,13 @@ the current copy will be lost. StdCmdCopy - + C&opy კოპირება - - + + Copy operation კოპირება @@ -8939,13 +8991,13 @@ the current copy will be lost. StdCmdCut - + &Cut ამოჭრა - - + + Cut out ამოჭრა @@ -8953,13 +9005,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &წაშლა - - + + Deletes the selected objects მონიშნული ობიექტების წაშლა @@ -9107,13 +9159,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection მონიშნულის დუბლიკატი - - + + Put duplicates of the selected objects to the active document მონიშნული ობიექტების აქტიურ დოკუმენტში კოპირება @@ -9121,17 +9173,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode &ჩასწორების რეჟიმის გამორთვა - + Toggles the selected object's edit mode მონიშნული ობიექტის ჩასწორების რეჟიმის ჩართ/გამორთ - + Activates or Deactivates the selected object's edit mode მონიშნული ობიექტის ჩასწორების რეჟიმის ჩართ/გამორთ @@ -9163,13 +9215,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions მოქმედებები გამოთქმით - - + + Actions that apply to expressions გამოსახულებებზე გადასატარებელი ქმედებები @@ -9661,19 +9713,19 @@ the current copy will be lost. StdCmdNew - + &New &ახალი - - + + Create a new empty document ახალი ცარიელი პროექტის შექმნა - + Unnamed უსახელო @@ -9756,13 +9808,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &ჩასმა - - + + Paste operation ჩასმის ოპერაცია @@ -9770,13 +9822,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... მდებარეობა... - - + + Place the selected objects მონიშნული ობიექტების მოთავსება @@ -9784,13 +9836,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &ბეჭდვა... - - + + Print the document დოკუმენტს დაბეჭდვა @@ -9798,13 +9850,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &PDF-ად გატანა... - - + + Export the document as PDF დოკუმენტის PDF-ად გატანა @@ -9812,17 +9864,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &ნახვა ამობეჭდვამდე... - + Print the document დოკუმენტს დაბეჭდვა - + Print preview ნახვა ამობეჭდვამდე @@ -9830,13 +9882,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... ინფორმაცია &პროექტზე... - - + + Show details of the currently active project მიმდინარედ აქტიური პროექტის დეტალების ჩვენება @@ -9844,13 +9896,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... პროექტის ფაილების განშლის პროგრამა... - - + + Utility to extract or create project files პროექტის ფაილების შექმნის ან დაშლის ხელსაწყო @@ -9872,13 +9924,13 @@ the current copy will be lost. StdCmdQuit - + E&xit გამოსვლა (&X) - - + + Quits the application აპლიკაციიდან გასვლა @@ -9928,13 +9980,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &გამეორება - - + + Redoes a previously undone action გაუქმებული მოქმედების გამეორება @@ -9942,13 +9994,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &განახლება - - + + Recomputes the current active document აქტიური დოკუმენტის გადათვლა @@ -9970,13 +10022,13 @@ the current copy will be lost. StdCmdRevert - + Revert დაბრუნება - - + + Reverts to the saved version of this file შენახულ ფაილზე დაბრუნება @@ -9984,13 +10036,13 @@ the current copy will be lost. StdCmdSave - + &Save &შენახვა - - + + Save the active document აქტიური დოკუმენტის შენახვა @@ -9998,13 +10050,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All ყველაფრის შენახვა - - + + Save all opened document ყველა ღია დოკუმენტის შენახვა @@ -10012,13 +10064,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... შენახვა &როგორც... - - + + Save the active document under a new file name აქტიური დოკუმენტის ახალი სახელით შენახვა @@ -10026,13 +10078,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... &ასლის შენახვა... - - + + Save a copy of the active document under a new file name აქტიური დოკუმენტის ასლის ახალი სახელით შენახვა @@ -10096,13 +10148,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All ყველას &მონიშვნა - - + + Select all ყველას მონიშვნა @@ -10334,13 +10386,13 @@ the current copy will be lost. StdCmdTransform - + Transform... გარდაქმნა... - - + + Transform the geometry of selected objects გეომეტრიის ან მონიშნული ობიექტების გარდაქმნა @@ -10348,13 +10400,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform გარდაქმნა - - + + Transform the selected object in the 3d view მონიშნული ობიექტის გარდაქმნა 3D ხედში @@ -10418,13 +10470,13 @@ the current copy will be lost. StdCmdUndo - + &Undo დაბრუნება (&U) - - + + Undo exactly one action ზუსტად ერთი ქმედების დაბრუნება @@ -11224,7 +11276,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11235,7 +11287,7 @@ Are you sure you want to continue? - + Object dependencies ობიექტის დამოკიდებულებები @@ -11324,12 +11376,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies ობიექტის დამოკიდებულებები - + To link to external objects, the document must be saved at least once. Do you want to save the document now? გარე ობიექტებთან დასაკავშირებლად, დოკუმენტი უნდა იყოს შენახული ერთხელ მაინც. @@ -11347,7 +11399,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11361,17 +11413,17 @@ Do you still want to proceed? Std_Revert - + Revert document დოკუმენტის მდგომარეობის დაბრუნება - + This will discard all the changes since last file save. ფაილის ბოლო შენახვის შემდეგ ყველა ცვლილების გაუქმება. - + Do you want to continue? გსურთ, განაგრძოთ? @@ -11802,17 +11854,17 @@ FreeCAD-ის გაშვების შემდეგ XY-Plane - XY-Plane + XY-სიბრტყე XZ-Plane - XZ-Plane + XZ-სიბრტყე YZ-Plane - YZ-Plane + YZ-სიბრტყე @@ -11822,7 +11874,7 @@ FreeCAD-ის გაშვების შემდეგ Offset: - Offset: + წანაცვლება: @@ -12034,23 +12086,15 @@ FreeCAD-ის გაშვების შემდეგ ტვირთავს გამოსახულებას - - Gui::InteractiveScale - - - Enter desired distance between the points - შეიყვანეთ წერტილებს შორის სასურველი დაშორება - - NaviCubeDraggableCmd - + Movable navigation cube მოძრავი ნავიგაციის კუბი - + Drag and place NaviCube გადაათრიეთ და მოათავსეთ ნავიგაციის კუბი @@ -12523,77 +12567,72 @@ display the splash screen პარამეტრების ნაკრებების მართვა - + Small (%1px) პატარა (%1px) - + Medium (%1px) საშუალო(%1px) - + Large (%1px) დიდი(%1px) - + Extra large (%1px) ძალიან დიდი(%1px) - + Custom (%1px) მომხმარებლის(%1px) - + Combo View - კომბო ხედი + ჩამოშლადი სია - + TreeView and PropertyView TreeView და PropertyView - - Both - ორივე - - - + Preference Pack Name პარამეტრების პაკეტის სახელი - + Tags ჭდეები - + Apply დადება - + Apply the %1 preference pack პარამეტრების ნაკრების გადატარება: %1 - + Choose a FreeCAD config file to import აირჩიეთ შემოსატანი FreeCAD-ის კონფიგურაციის ფაილი - + File exists ფაილი არსებობს - + A preference pack with that name already exists. Overwrite? პარამეტრების ნაკრები ამ სახელით უკვე არსებობს. გნებავთ, თავზე გადააწეროთ? @@ -12897,4 +12936,18 @@ You can now use Theme to get a full customization of the interface. ყველა მონიშნულის ფილტრი გასუფთავდა + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_ko.ts b/src/Gui/Language/FreeCAD_ko.ts index 22b0f06c41..d978ed302e 100644 --- a/src/Gui/Language/FreeCAD_ko.ts +++ b/src/Gui/Language/FreeCAD_ko.ts @@ -123,12 +123,12 @@ 가져오기 - + Delete 삭제 - + Paste expressions 식 복사하기 @@ -189,9 +189,9 @@ 위치 설정 + - Transform 변환하기 @@ -221,7 +221,7 @@ 선택 가능성 전환하기 - + Edit image 이미지 편집 @@ -616,14 +616,6 @@ while doing a left or right click and move the mouse up or down 취소하기(&C) - - Gui::ControlSingleton - - - Task panel - 작업 패널 - - Gui::DAG::Model @@ -1827,72 +1819,92 @@ same time. The one with the highest priority will be triggered. 매크로 이름: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros 사용자 매크로 - + System macros 시스템 매크로 - + Execute 실행 - + Close 닫기 - + Create 만들기 - + Delete 삭제 - + Edit 편집 - + Rename 이름 바꾸기 - + Duplicate 복제하기 - + Launch a guide on how to set up a macro in a custom global toolbar. 사용자 지정 전역 도구 모음에서 매크로를 설정하는 방법에 대한 가이드를 시작합니다. - + Toolbar 도구 모음 - + Open Addon Manager where macros created by the community and other addons can be downloaded. 커뮤니티 및 기타 애드온에서 만든 매크로를 다운로드할 수 있는 애드온 관리자를 엽니다. - + Download 다운로드 - + User macros location: 사용자 매크로 위치: @@ -1900,71 +1912,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros 매크로 - + Read-only 읽기 전용 - + Macro file 매크로 파일 - + Enter a file name, please: 파일 이름을 입력하세요: - - - + + + Existing file 존재하는 파일 - + '%1'. This file already exists. '%1 '입니다. 파일이 이미 존재함. - + Cannot create file 파일을 만들 수 없습니다. - + Creation of file '%1' failed. 파일 '%1'을 생성하지 못했습니다. - + Delete macro 매크로 삭제 - + Do you really want to delete the macro '%1'? '%1' 매크로를 삭제하시겠습니까? - + Do not show again 다시 표시 안함 - + Guided Walkthrough 가이드된 워크스루 - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Note: your changes will be applied when you next switch workbenches 참고: 다음에 워크벤치를 전환할 때 변경사항이 적용됩니다. - + Walkthrough, dialog 1 of 2 워크스루, 대화상자 1/2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close 워크스루 지침: 누락된 필드를 채우고(옵션) 추가를 클릭한 다음 닫기를 클릭합니다 - + Walkthrough, dialog 1 of 1 워크스루, 대화상자 1/1 - + Walkthrough, dialog 2 of 2 워크스루, 대화상자 2/2 - + Walkthrough instructions: Click right arrow button (->), then Close. 워크스루 지침: 새로 만들기를 클릭한 다음, 오른쪽 화살표(->) 버튼을 클릭하고 닫기를 클릭합니다. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. 워크스루 지침: 새로 만들기를 클릭한 다음, 오른쪽 화살표(->) 버튼을 클릭하고 닫기를 클릭합니다. - + Renaming Macro File 매크로 파일 이름 바꾸기 - - + + Enter new name: 새 이름 입력하기: - - + + '%1' already exists. '%1' 이미 존재합니다. - + Rename Failed 이름 바꾸기 실패함 - + Failed to rename to '%1'. Perhaps a file permission error? '%1'(으)로 이름을 바꾸지 못했습니다. 어쩌면 파일권한 오류일까요? - + Duplicate Macro 매크로 복제하기 - + Duplicate Failed 복제 실패함 - + Failed to duplicate to '%1'. Perhaps a file permission error? '%1'(으)로 복제하지 못했습니다. @@ -4310,6 +4322,16 @@ horizontal space in Python console Save history 내역 저장하기 + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4423,16 +4445,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: 상단: - + Middle: 중앙: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4455,7 +4502,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: 하단: @@ -4485,17 +4532,17 @@ Larger value eases to pick things, but can make small features impossible to sel 트리 뷰에서 활성 컨테이너의 배경색 - + Central: 중앙: - + Midway: 중간: - + End: 끝: @@ -5473,22 +5520,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View 콤보 보기 - - - - Model - 모델 - - - - - Tasks - 작업 - Gui::DockWnd::PropertyDockView @@ -5715,12 +5750,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file 수정된 파일 - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5729,54 +5764,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document 저장하지 않은 문서 - + The document has been modified. Do you want to save your changes? 문서가 수정되었습니다. 변경 내용을 저장하시겠습니까? - + FreeCAD macro FreeCAD 매크로 - + Export PDF PDF로 내보내기 - + PDF file PDF 파일 - + untitled[*] 제목없음[*] - + - Editor - 편집기 - + %1 chars removed %1자 제거됨 - + %1 chars added %1 문자 추가됨 - + Formatted 형식화됨 @@ -5927,39 +5962,46 @@ Do you want to save your changes? Graphviz가 이미지 파일을 만들지 못했습니다 - + PNG format PNG형식 - + Bitmap format Bitmap형식 - + GIF format Gif형식 - + JPG format JPG형식 - + SVG format SVG형식 - - + + PDF format PDF형식 - - + + + Graphviz format + Graphviz format + + + + + Export graph 그래프 내보내기 @@ -6120,7 +6162,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension 치수 @@ -6130,62 +6172,62 @@ Do you want to save your changes? 준비 - + Help addon needed! 도움말 추가 기능 필요! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager %1의 도움말 시스템은 이제 "도움말" 추가 기능에 의해 처리됩니다. Addons Manager를 통해 쉽게 설치할 수 있습니다. - + Open Addon Manager 애드온 관리자 열기 - + Close All 모두 닫기 - - - + + + Toggles this toolbar 이 도구 모음 전환하기 - - - + + + Toggles this dockable window 이 도킹 가능 창 전환하기 - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document 저장하지 않은 문서 - + The exported object contains external link. Please save the documentat least once before exporting. 내보낸 객체에 외부 링크가 포함되어 있습니다. 내보내기 전에 문서를 한 번 이상 저장하십시오. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? 외부 객체에 링크하려면, 문서를 한 번 이상 저장해야 합니다. @@ -6557,116 +6599,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit 시스템 종료 - + The application is still running. Do you want to exit without saving your data? 응데이터를 저장 하지 않고 종료 하 시겠습니까? - - - - + + + + Python console Python 콘솔 - + Unhandled PyCXX exception. 처리되지 않은 PyCXX 예외입니다. - + Unhandled FreeCAD exception. 처리되지 않은 FreeCAD 예외입니다. - + Unhandled std C++ exception. 처리되지 않은 표준 C++ 예외입니다. - + Unhandled unknown C++ exception. 처리되지 않은 알 수 없는 C++ 예외입니다. - + &Copy 복사하기(&C) - + &Copy command 명령어 복사하기(&C) - + &Copy history 내역 복사하기(&C) - + Save history as... 다른 이름으로 내역 저장하기... - + Save history 내역 저장하기 - + Saves Python history across %1 sessions %1 세션 전반에 걸쳐 Python 내역 저장하기 - + &Paste 붙여넣기(&P) - + Select All 모두 선택 - + Clear console 콘솔 지우기 - + Insert file name... 파일 이름 삽입... - + Word wrap 줄 바꿈 - + Save History 내역 저장하기 - + Macro Files 매크로 파일 - + Insert file name 파일 이름 삽입 - + All Files 모든 파일 @@ -6751,22 +6793,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous 이전 - + Next 다음 - + Case sensitive 대/소문자 구분 - + Whole words 전체 단어 @@ -6883,17 +6925,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments 증분 - + Translation Increment: 평행 이동 증분: - + Rotation Increment: 회전 증분: @@ -7718,37 +7760,42 @@ Do you want to specify another directory? QDockWidget - + Tree view 트리 보기 - + + Tasks + 작업 + + + Property view 속성 보기 - + Selection view 선택항목 보기 - - Combo View - 콤보 보기 + + Model + 모델 - + DAG View DAG 보기 - + Report view 보고서 보기 - + Python console Python 콘솔 @@ -7824,12 +7871,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7870,71 +7917,71 @@ Do you want to specify another directory? 파일로 내보내기 - + Printing... 인쇄중... - + Exporting PDF... PDF로 내보내기... - - + + Unsaved document 저장하지 않은 문서 - + The exported object contains external link. Please save the documentat least once before exporting. 내보낸 객체에 외부 링크가 포함되어 있습니다. 내보내기 전에 문서를 한 번 이상 저장하십시오. - - + + Delete failed 삭제 실패 - + Dependency error 종속성 오류 - + Copy selected 사본 선택됨 - + Copy active document 활성 문서 복사하기 - + Copy all documents 모든 문서 복사하기 - + Paste Paste - + Expression error 표현식 오류 - + Failed to parse some of the expressions. Please check the Report View for more details. 일부 식을 구문 분석하지 못했습니다. 자세한 내용은 보고서 뷰를 확인하십시오. - + Failed to paste expressions 식을 붙여넣지 못했습니다. @@ -8349,7 +8396,7 @@ Choose 'Abort' to abort 중단하려면 '중단하기'를 고르십시오 - + Save Macro 매크로 저장하기 @@ -8418,7 +8465,7 @@ Please open a browser window and type in: http://localhost:%1. 시스템 브라우저를 열 수 없습니다. - + Options... 옵션... @@ -8465,42 +8512,42 @@ Please open a browser window and type in: http://localhost:%1. 다이얼로그를 닫으시겠습니까? - + Do you want to save your changes to document '%1' before closing? 문서를 닫기 전에 변경 내용을 '%1'에 저장하시겠습니까? - + Do you want to save your changes to document before closing? 닫기 전에 변경사항을 문서에 저장하시겠습니까? - + If you don't save, your changes will be lost. 저장하지 않으면 변경 내용이 손실됩니다. - + Apply answer to all 모든 것에 답변 적용 - + %1 Document(s) not saved %1문서가 저장되지 않았습니다. - + Some documents could not be saved. Do you want to cancel closing? 일부 문서를 저장할 수 없습니다. 닫는 것을 취소하시겠습니까? - + Delete macro 매크로 삭제 - + Not allowed to delete system-wide macros 시스템 전체 매크로 삭제가 허용되지 않음 @@ -8520,12 +8567,17 @@ Please open a browser window and type in: http://localhost:%1. %1이 비어 있지 않습니다. 내용도 삭제하시겠습니까? - + Translation: 이동: - + + Translation XY: + Translation XY: + + + Rotation: 회전: @@ -8731,7 +8783,7 @@ the current copy will be lost. 이미지 변경... - + Color Gradient Color Gradient @@ -8837,13 +8889,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... 정렬... - - + + Align the selected objects 선택한 객체를 정렬합니다 @@ -8921,13 +8973,13 @@ the current copy will be lost. StdCmdCopy - + C&opy 복사하기(&O) - - + + Copy operation 복사 작업 @@ -8935,13 +8987,13 @@ the current copy will be lost. StdCmdCut - + &Cut 잘라내기(&C) - - + + Cut out 자르기 @@ -8949,13 +9001,13 @@ the current copy will be lost. StdCmdDelete - + &Delete 삭제하기(&D) - - + + Deletes the selected objects 선택한 객체 삭제하기 @@ -9103,13 +9155,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection 선택항목 복제하기 - - + + Put duplicates of the selected objects to the active document 선택한 객체의 복제본을 활성 문서에 넣습니다 @@ -9117,17 +9169,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode 편집 모드 전환하기(&E) - + Toggles the selected object's edit mode 선택한 객체의 편집 모드를 전환합니다 - + Activates or Deactivates the selected object's edit mode 선택한 객체의 편집 모드를 활성화 또는 비활성화합니다 @@ -9159,13 +9211,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Expression actions - - + + Actions that apply to expressions Actions that apply to expressions @@ -9657,19 +9709,19 @@ the current copy will be lost. StdCmdNew - + &New 새로 만들기(&N) - - + + Create a new empty document 비어 있는 새 문서 만들기 - + Unnamed 이름없음 @@ -9752,13 +9804,13 @@ the current copy will be lost. StdCmdPaste - + &Paste 붙여넣기(&P) - - + + Paste operation 붙여넣기 작업 @@ -9766,13 +9818,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... 위치 설정... - - + + Place the selected objects 선택한 객체를 배치합니다 @@ -9780,13 +9832,13 @@ the current copy will be lost. StdCmdPrint - + &Print... 인쇄하기(&P)... - - + + Print the document 문서 인쇄하기 @@ -9794,13 +9846,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... PDF 내보내기(&E)... - - + + Export the document as PDF 문서를 PDF로 내보내기 @@ -9808,17 +9860,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... 인쇄 미리보기(&P)... - + Print the document 문서 인쇄하기 - + Print preview 인쇄 미리보기 @@ -9826,13 +9878,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... 프로젝트 정보(&N)... - - + + Show details of the currently active project 현재 활성 프로젝트의 세부 정보 표시하기 @@ -9840,13 +9892,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... 프로젝트 도구... - - + + Utility to extract or create project files 프로젝트 파일을 생성하거나 추출하는 유틸리티 @@ -9868,13 +9920,13 @@ the current copy will be lost. StdCmdQuit - + E&xit 종료(&X) - - + + Quits the application 프로그램 종료 @@ -9924,13 +9976,13 @@ the current copy will be lost. StdCmdRedo - + &Redo 다시 실행(&R) - - + + Redoes a previously undone action 실행 취소한 작업을 다시 실행합니다 @@ -9938,13 +9990,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh 새로 고침(&R) - - + + Recomputes the current active document 현재 문서를 다시 계산합니다 @@ -9966,13 +10018,13 @@ the current copy will be lost. StdCmdRevert - + Revert 되돌리기 - - + + Reverts to the saved version of this file 저장된 버전의 파일로 되돌리기 @@ -9980,13 +10032,13 @@ the current copy will be lost. StdCmdSave - + &Save 저장하기(&S) - - + + Save the active document 활성 문서 저장하기 @@ -9994,13 +10046,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All 모두 저장 - - + + Save all opened document 열린 문서 모두 저장하기 @@ -10008,13 +10060,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... 다른 이름으로 저장(&A)... - - + + Save the active document under a new file name 활성 문서를 새 파일 이름으로 저장하기 @@ -10022,13 +10074,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... 사본 저장하기(&C)... - - + + Save a copy of the active document under a new file name 활성 문서의 사본을 새 파일 이름으로 저장하기 @@ -10092,13 +10144,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All 모두 선택하기(&A) - - + + Select all 모두 선택 @@ -10330,13 +10382,13 @@ the current copy will be lost. StdCmdTransform - + Transform... 전환 - - + + Transform the geometry of selected objects 선택한 오브젝트의 기하학적 구조 변환 @@ -10344,13 +10396,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform 변환하기 - - + + Transform the selected object in the 3d view 3D 뷰에서 선택한 오브젝트 변환 @@ -10414,13 +10466,13 @@ the current copy will be lost. StdCmdUndo - + &Undo 실행 취소(&U) - - + + Undo exactly one action 작업 하나를 실행 취소합니다 @@ -11220,7 +11272,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11230,7 +11282,7 @@ Are you sure you want to continue? 계속하시겠습니까? - + Object dependencies 객체 종속성 @@ -11319,12 +11371,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies 객체 종속성 - + To link to external objects, the document must be saved at least once. Do you want to save the document now? 외부 객체에 링크하려면, 문서를 한 번 이상 저장해야 합니다. @@ -11342,7 +11394,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11354,17 +11406,17 @@ Do you still want to proceed? Std_Revert - + Revert document 문서 되돌리기 - + This will discard all the changes since last file save. 마지막 저장 이후에 변경된 모든 것들은 저장되지 않습니다. - + Do you want to continue? 계속하시겠습니까? @@ -12027,23 +12079,15 @@ after FreeCAD launches Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - 포인트 사이의 원하는 거리를 입력합니다 - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12514,77 +12558,72 @@ display the splash screen 환경설정 팩 관리하기 - + Small (%1px) 작게(%1px) - + Medium (%1px) 중간(%1px) - + Large (%1px) 크게(%1px) - + Extra large (%1px) 아주크게(%1px) - + Custom (%1px) 커스텀(%1px) - + Combo View 콤보 보기 - + TreeView and PropertyView 트리보기 및 속성보기 - - Both - 둘다 - - - + Preference Pack Name 환경설정 팩 이름 - + Tags 태그 - + Apply 적용 - + Apply the %1 preference pack %1 환경설정 팩 적용하기 - + Choose a FreeCAD config file to import 가져올 FreeCAD 구성 파일 고르기 - + File exists 파일이 존재합니다 - + A preference pack with that name already exists. Overwrite? 해당 이름의 환경설정 팩이 이미 있습니다. 덮어쓰시겠습니까? @@ -12889,4 +12928,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_nl.ts b/src/Gui/Language/FreeCAD_nl.ts index a8c6956ac5..07cc4da955 100644 --- a/src/Gui/Language/FreeCAD_nl.ts +++ b/src/Gui/Language/FreeCAD_nl.ts @@ -122,12 +122,12 @@ Importeren - + Delete Verwijderen - + Paste expressions Paste expressions @@ -188,9 +188,9 @@ Plaatsing + - Transform Transformeren @@ -220,7 +220,7 @@ Schakel selecteerbaarheid aan/uit - + Edit image Afbeelding bewerken @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Annuleren - - Gui::ControlSingleton - - - Task panel - Taken-deelvenster - - Gui::DAG::Model @@ -865,7 +857,7 @@ while doing a left or right click and move the mouse up or down View - Weergave + Aanzicht @@ -1823,72 +1815,92 @@ same time. The one with the highest priority will be triggered. Macro-naam: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Gebruikers macro's - + System macros Systeem macro's - + Execute Uitvoeren - + Close Sluiten - + Create Aanmaken - + Delete Verwijderen - + Edit Bewerken - + Rename Hernoemen - + Duplicate Dupliceer - + Launch a guide on how to set up a macro in a custom global toolbar. Start een instructie over het opzetten van een macro in een aangepaste globale toolbar. - + Toolbar Werkbalk - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager waarin macro's gemaakt door de gemeenschap, en andere addons, kunnen worden gedownload. - + Download Downloaden - + User macros location: Locatie gebruikers macro's: @@ -1896,71 +1908,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macro's - + Read-only Alleen-lezen - + Macro file Macro-bestand - + Enter a file name, please: Gelieve een bestandsnaam in te voeren: - - - + + + Existing file Bestaand bestand - + '%1'. This file already exists. '%1'. Dit bestand bestaat reeds. - + Cannot create file Kan bestand niet aanmaken - + Creation of file '%1' failed. Creëren van bestand '%1' mislukt. - + Delete macro Verwijder macro - + Do you really want to delete the macro '%1'? Weet u zeker dat u macro '%1' wilt verwijderen? - + Do not show again Niet opnieuw tonen - + Guided Walkthrough Stap voor Stap begeleiding - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1971,78 +1983,78 @@ Opmerking: uw wijzigingen worden toegepast wanneer u de volgende keer van werkba - + Walkthrough, dialog 1 of 2 Stappenplan, dialoog 1 van 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Stappeninstructies: Vul de ontbrekende velden in (optioneel) en klik op Toevoegen en vervolgens op Sluiten - + Walkthrough, dialog 1 of 1 Stappenplan, dialoog 1 van 1 - + Walkthrough, dialog 2 of 2 Stappenplan, dialoog 2 van 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Stappeninstructies: Klik op de rechter pijltjestoets (->) en vervolgens op Sluiten. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Stappeninstructies: Klik op de knop Nieuw, vervolgens op de rechter pijltjestoets (->) en dan op Sluiten. - + Renaming Macro File Hernoemen van macrobestand - - + + Enter new name: Nieuwe naam invoeren: - - + + '%1' already exists. '%1' bestaat al. - + Rename Failed Hernoemen is mislukt - + Failed to rename to '%1'. Perhaps a file permission error? Kan de naam '%1' niet wijzigen. Misschien een fout met bestandsrechten? - + Duplicate Macro Macro dupliceren - + Duplicate Failed Dupliceren mislukt - + Failed to duplicate to '%1'. Perhaps a file permission error? Kan niet naar '%1' dupliceren. @@ -4299,6 +4311,16 @@ horizontale ruimte in de Python-console overschrijden Save history Geschiedenis opslaan + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4411,16 +4433,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Boven: - + Middle: Midden: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4443,7 +4490,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Onder: @@ -4473,17 +4520,17 @@ Larger value eases to pick things, but can make small features impossible to sel Achtergrondkleur voor actieve containers in de boomstructuurweergave - + Central: Centraal: - + Midway: Halverwege: - + End: Einde: @@ -5458,29 +5505,17 @@ oorspronkelijk geselecteerd voorafgaand aan het openen van dit dialoogvenster Gui::DockWnd::ComboView - + Combo View Combi-weergave - - - - Model - Model - - - - - Tasks - Taken - Gui::DockWnd::PropertyDockView Property View - Eigenschappen-aanzicht + Eigenschap weergave @@ -5700,66 +5735,66 @@ oorspronkelijk geselecteerd voorafgaand aan het openen van dit dialoogvenster Gui::EditorView - + Modified file Gewijzigd bestand - + %1. This has been modified outside of the source editor. Do you want to reload it? %1. Dit is gewijzigd buiten de source-editor om. Wilt u het herladen? - + Unsaved document Niet-opgeslagen document - + The document has been modified. Do you want to save your changes? Het document is gewijzigd. Wilt u uw wijzigingen opslaan? - + FreeCAD macro FreeCAD macro - + Export PDF Exporteren als PDF - + PDF file PDF-bestand - + untitled[*] naamloos[*] - + - Editor - Editor - + %1 chars removed %1 karakters verwijderd - + %1 chars added %1 karakters toegevoegd - + Formatted Geformatteerd @@ -5910,39 +5945,46 @@ Wilt u uw wijzigingen opslaan? Graphviz kon geen afbeeldingsbestand creëren - + PNG format PNG formaat - + Bitmap format Bitmap formaat - + GIF format GIF formaat - + JPG format JPG formaat - + SVG format SVG formaat - - + + PDF format PDF formaat - - + + + Graphviz format + Graphviz format + + + + + Export graph Grafiek exporteren @@ -6103,7 +6145,7 @@ Wilt u uw wijzigingen opslaan? Gui::MainWindow - + Dimension Afmeting @@ -6113,62 +6155,62 @@ Wilt u uw wijzigingen opslaan? Gereed - + Help addon needed! Help add-on nodig! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Het helpsysteem van %1 wordt nu afgehandeld door de "Help" addon. Het kan gemakkelijk worden geïnstalleerd via de Addons Manager - + Open Addon Manager Addon Manager openen - + Close All Alles sluiten - - - + + + Toggles this toolbar Schakelt deze werkbalk in/uit - - - + + + Toggles this dockable window Schakelt dit dokbare venster in/uit - + WARNING: This is a development version. WAARSCHUWING: Dit is een ontwikkelversie. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Gebruik het alstublieft niet in een productieomgeving. - - + + Unsaved document Niet-opgeslagen document - + The exported object contains external link. Please save the documentat least once before exporting. Het geëxporteerde object bevat een externe link. Sla het document minstens één keer op voordat u het exporteert. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Om een link naar externe objecten te kunnen maken, moet het document minstens één keer worden opgeslagen. @@ -6479,7 +6521,7 @@ How do you want to proceed? Show all - Alles tonen + Alles weergeven @@ -6527,7 +6569,7 @@ How do you want to proceed? View - Aanzicht + Weergave @@ -6539,116 +6581,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit Systeem afsluiten - + The application is still running. Do you want to exit without saving your data? Het programma draait nog. Wil je afsluiten zonder je gegevens op te slaan? - - - - + + + + Python console Python Console - + Unhandled PyCXX exception. Niet-verwerkte uitzondering voor PyCXX. - + Unhandled FreeCAD exception. Niet-verwerkte uitzondering voor FreeCAD. - + Unhandled std C++ exception. Onverwerkte std C++ uitzondering. - + Unhandled unknown C++ exception. Niet-verwerkte uitzondering voor onbekende C++. - + &Copy &Kopiëren - + &Copy command Kopieer commando - + &Copy history Kopieer geschiedenis - + Save history as... Geschiedenis opslaan als... - + Save history Geschiedenis opslaan - + Saves Python history across %1 sessions Bewaart Pythongeschiedenis over %1 sessies - + &Paste &Plakken - + Select All Alles selecteren - + Clear console Maak console leeg - + Insert file name... Bestandsnaam invoeren... - + Word wrap Tekstterugloop - + Save History Geschiedenis opslaan - + Macro Files Macro Bestanden - + Insert file name Bestandsnaam invoeren - + All Files Alle bestanden @@ -6733,22 +6775,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Vorige - + Next Volgende - + Case sensitive Hoofdlettergevoelig - + Whole words Hele woorden @@ -6863,17 +6905,17 @@ Wilt u een andere map opgeven? Gui::TaskCSysDragger - + Increments Stappen - + Translation Increment: Translatietoename: - + Rotation Increment: Rotatietoename: @@ -7698,37 +7740,42 @@ Wilt u een andere map opgeven? QDockWidget - + Tree view Boomstructuurweergave - + + Tasks + Taken + + + Property view Eigenschappen-aanzicht - + Selection view Selectieweergave - - Combo View - Combi-weergave + + Model + Model - + DAG View DAG weergave - + Report view Rapportweergave - + Python console Python Console @@ -7804,12 +7851,12 @@ Wilt u een andere map opgeven? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Dit systeem draait OpenGL %1.%2. FreeCAD vereist OpenGL 2.0 of hoger. Upgrade uw grafische stuurprogramma en/of grafische kaart indien nodig. - + Invalid OpenGL Version Verkeerde OpenGL versie @@ -7850,71 +7897,71 @@ Wilt u een andere map opgeven? Bestand exporteren - + Printing... Afdrukken... - + Exporting PDF... Exporteren van PDF ... - - + + Unsaved document Niet-opgeslagen document - + The exported object contains external link. Please save the documentat least once before exporting. Het geëxporteerde object bevat een externe link. Sla het document minstens één keer op voordat u het exporteert. - - + + Delete failed Verwijderen mislukt - + Dependency error Afhankelijkheidsfout - + Copy selected Kopieer geselecteerde - + Copy active document Kopieer actief document - + Copy all documents Kopieer alle documenten - + Paste Plakken - + Expression error Expressiefout - + Failed to parse some of the expressions. Please check the Report View for more details. Het ontleden van sommige uitdrukkingen is mislukt. Gelieve de rapportweergave te raadplegen voor meer details. - + Failed to paste expressions Fout bij het plakken van expressie @@ -8330,7 +8377,7 @@ Kies 'Nee' om alleen in het actieve document terug te draaien. Kies 'Afbreken' om af te breken - + Save Macro Macro opslaan @@ -8398,7 +8445,7 @@ Open een browservenster en typ: http://localhost:%1. Kan uw standaard browser niet starten. - + Options... Opties... @@ -8445,42 +8492,42 @@ Open een browservenster en typ: http://localhost:%1. Wilt u dit dialoogvenster sluiten? - + Do you want to save your changes to document '%1' before closing? Wil je de wijzigingen in het document '%1' opslaan alvorens te sluiten? - + Do you want to save your changes to document before closing? Wilt u de wijzigingen aan het document opslaan voordat u afsluit? - + If you don't save, your changes will be lost. Als u niet opslaat, zullen uw wijzigingen verloren gaan. - + Apply answer to all Antwoord op alles toepassen - + %1 Document(s) not saved %1 Document(en) niet opgeslagen - + Some documents could not be saved. Do you want to cancel closing? Sommige documenten konden niet worden opgeslagen. Wilt u het sluiten annuleren? - + Delete macro Verwijder macro - + Not allowed to delete system-wide macros Niet toegestaan om systeem macro's te verwijderen @@ -8500,12 +8547,17 @@ Open een browservenster en typ: http://localhost:%1. De %1 is niet leeg. Mag de inhoud worden verwijderd? - + Translation: Verplaatsing: - + + Translation XY: + Translation XY: + + + Rotation: Rotatie: @@ -8711,7 +8763,7 @@ de huidige kopie verloren gaat. Afbeelding wijzigen... - + Color Gradient Kleur verloop @@ -8817,13 +8869,13 @@ de huidige kopie verloren gaat. StdCmdAlignment - + Alignment... Uitlijning... - - + + Align the selected objects Lijn de geselecteerde objecten uit @@ -8901,13 +8953,13 @@ de huidige kopie verloren gaat. StdCmdCopy - + C&opy K&opiëren - - + + Copy operation Kopieerbewerking @@ -8915,13 +8967,13 @@ de huidige kopie verloren gaat. StdCmdCut - + &Cut &Knippen - - + + Cut out Uitsnijden @@ -8929,13 +8981,13 @@ de huidige kopie verloren gaat. StdCmdDelete - + &Delete &Verwijderen - - + + Deletes the selected objects Wist de geselecteerde objecten @@ -9083,13 +9135,13 @@ de huidige kopie verloren gaat. StdCmdDuplicateSelection - + Duplicate selection Dupliceer selectie - - + + Put duplicates of the selected objects to the active document Duplicaten van de geselecteerde objecten aan het actieve document toevoegen @@ -9097,17 +9149,17 @@ de huidige kopie verloren gaat. StdCmdEdit - + Toggle &Edit mode Bewerkingsmode - + Toggles the selected object's edit mode Verander de bewerkingsmode van het geselecteerde object - + Activates or Deactivates the selected object's edit mode Activeert of deactiveert de bewerkingsmodus van het geselecteerde object @@ -9139,13 +9191,13 @@ de huidige kopie verloren gaat. StdCmdExpression - + Expression actions Expressieacties - - + + Actions that apply to expressions Acties die van toepassing zijn op expressies @@ -9637,19 +9689,19 @@ de huidige kopie verloren gaat. StdCmdNew - + &New &Nieuw - - + + Create a new empty document Maak een nieuw leeg document - + Unnamed Naamloos @@ -9732,13 +9784,13 @@ de huidige kopie verloren gaat. StdCmdPaste - + &Paste &Plakken - - + + Paste operation Plakbewerking @@ -9746,13 +9798,13 @@ de huidige kopie verloren gaat. StdCmdPlacement - + Placement... Plaatsing... - - + + Place the selected objects Plaats de geselecteerde objecten @@ -9760,13 +9812,13 @@ de huidige kopie verloren gaat. StdCmdPrint - + &Print... Afdru&kken... - - + + Print the document Het document afdrukken @@ -9774,13 +9826,13 @@ de huidige kopie verloren gaat. StdCmdPrintPdf - + &Export PDF... &Exporteren als PDF... - - + + Export the document as PDF Exporteer het document als PDF @@ -9788,17 +9840,17 @@ de huidige kopie verloren gaat. StdCmdPrintPreview - + &Print preview... &Afdrukvoorbeeld... - + Print the document Het document afdrukken - + Print preview Afdrukvoorbeeld @@ -9806,13 +9858,13 @@ de huidige kopie verloren gaat. StdCmdProjectInfo - + Project i&nformation... Project&informatie... - - + + Show details of the currently active project Toon details van het huidige actieve project @@ -9820,13 +9872,13 @@ de huidige kopie verloren gaat. StdCmdProjectUtil - + Project utility... Project hulpprogramma... - - + + Utility to extract or create project files Gereedschap om project bestanden uit te trekken of te maken @@ -9848,13 +9900,13 @@ de huidige kopie verloren gaat. StdCmdQuit - + E&xit Afsl&uiten - - + + Quits the application Sluit de applicatie @@ -9904,13 +9956,13 @@ de huidige kopie verloren gaat. StdCmdRedo - + &Redo &Opnieuw - - + + Redoes a previously undone action Opnieuw uitvoeren van een eerder ongedane actie @@ -9918,13 +9970,13 @@ de huidige kopie verloren gaat. StdCmdRefresh - + &Refresh &Verversen - - + + Recomputes the current active document Het huidige actieve document herberekenen @@ -9946,13 +9998,13 @@ de huidige kopie verloren gaat. StdCmdRevert - + Revert Ongedaan maken - - + + Reverts to the saved version of this file Keer terug naar de bewaarde versie van dit bestand @@ -9960,13 +10012,13 @@ de huidige kopie verloren gaat. StdCmdSave - + &Save O&pslaan - - + + Save the active document Sla het actieve document op @@ -9974,13 +10026,13 @@ de huidige kopie verloren gaat. StdCmdSaveAll - + Save All Alles opslaan - - + + Save all opened document Sla alle geopende documenten op @@ -9988,13 +10040,13 @@ de huidige kopie verloren gaat. StdCmdSaveAs - + Save &As... Opslaan &als... - - + + Save the active document under a new file name Sla het actieve document onder een nieuwe bestandsnaam op @@ -10002,13 +10054,13 @@ de huidige kopie verloren gaat. StdCmdSaveCopy - + Save a &Copy... &Kopie opslaan... - - + + Save a copy of the active document under a new file name Bewaar een kopie van het actieve document onder een nieuwe naam @@ -10072,13 +10124,13 @@ de huidige kopie verloren gaat. StdCmdSelectAll - + Select &All &Alles selecteren - - + + Select all Alles selecteren @@ -10310,13 +10362,13 @@ de huidige kopie verloren gaat. StdCmdTransform - + Transform... Verander... - - + + Transform the geometry of selected objects Verander de geometrie van de geselecteerde objecten @@ -10324,13 +10376,13 @@ de huidige kopie verloren gaat. StdCmdTransformManip - + Transform Transformeren - - + + Transform the selected object in the 3d view Transformeren van het geselecteerde object in de 3D-weergave @@ -10394,13 +10446,13 @@ de huidige kopie verloren gaat. StdCmdUndo - + &Undo &Ongedaan maken - - + + Undo exactly one action Precies één actie ongedaan maken @@ -11200,7 +11252,7 @@ de huidige kopie verloren gaat. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11211,7 +11263,7 @@ Weet u zeker dat u wilt doorgaan? - + Object dependencies Object afhankelijkheden @@ -11300,12 +11352,12 @@ Weet u zeker dat u wilt doorgaan? Std_DuplicateSelection - + Object dependencies Object afhankelijkheden - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Om een link naar externe objecten te kunnen maken, moet het document minstens één keer worden opgeslagen. @@ -11323,7 +11375,7 @@ Wilt u het document nu opslaan? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11337,17 +11389,17 @@ Wilt u toch doorgaan? Std_Revert - + Revert document Document herstellen - + This will discard all the changes since last file save. Dit zal alle wijzigingen annuleren sinds de laatste keer dat het bestand werd bewaard. - + Do you want to continue? Wilt u doorgaan? @@ -11490,7 +11542,7 @@ Wilt u toch doorgaan? View - Aanzicht + Weergave @@ -12009,23 +12061,15 @@ nadat FreeCAD opgestart is Laad een afbeelding - - Gui::InteractiveScale - - - Enter desired distance between the points - Vul de gewenste afstand tussen de punten in - - NaviCubeDraggableCmd - + Movable navigation cube Verplaatsbare navigatie kubus - + Drag and place NaviCube Sleep en plaats NaviCube @@ -12497,77 +12541,72 @@ het splashscherm weergeven Beheer voorkeurspakketten - + Small (%1px) Kleine (%1px) - + Medium (%1px) Medium (%1px) - + Large (%1px) Grote (%1px) - + Extra large (%1px) Extra groot (%1px) - + Custom (%1px) Aangepaste (%1px) - + Combo View Combi-weergave - + TreeView and PropertyView Structuur- en Eigenschapsweergave - - Both - Beide - - - + Preference Pack Name Naam van het voorkeuren pakket - + Tags Labels - + Apply Toepassen - + Apply the %1 preference pack %1 voorkeurspakket toepassen - + Choose a FreeCAD config file to import Kies een FreeCAD configuratiebestand om te importeren - + File exists Bestand bestaat - + A preference pack with that name already exists. Overwrite? Een voorkeurspakket met deze naam bestaat al. Overschrijven? @@ -12875,4 +12914,18 @@ Je kunt nu Thema gebruiken om de interface volledig aan te passen. Alle selectie filters uit + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_pl.ts b/src/Gui/Language/FreeCAD_pl.ts index fd42ad490a..63b838a077 100644 --- a/src/Gui/Language/FreeCAD_pl.ts +++ b/src/Gui/Language/FreeCAD_pl.ts @@ -122,12 +122,12 @@ Importuj - + Delete Usuń - + Paste expressions Wklej wyrażenia @@ -188,9 +188,9 @@ Umiejscowienie + - Transform Przemieszczenie @@ -220,7 +220,7 @@ Przełącz możliwość zaznaczenia - + Edit image Edytuj obraz @@ -413,7 +413,7 @@ Default - Domyślnie + Domyślny @@ -428,7 +428,7 @@ The object will have its placement editable with the Std TransformManip command - Obiekt będzie miał umiejscowienie edytowalne za pomocą polecenia Std TransformManip + Obiekt będzie miał umiejscowienie edytowalne za pomocą polecenia Przemieszczenie @@ -582,7 +582,7 @@ Press left mouse button - Naciśnij lewy przycisk myszki + Wciśnij lewy przycisk myszki @@ -615,14 +615,6 @@ podczas kliknięcia lewym lub prawym przyciskiem myszki i przesuwaj kursor w gó &Anuluj - - Gui::ControlSingleton - - - Task panel - Panel zadań - - Gui::DAG::Model @@ -1122,7 +1114,7 @@ Jeśli ta opcja nie jest zaznaczona, właściwość musi być jednoznacznie nazw Macros - Makropolecenie + Makrodefinicje @@ -1392,7 +1384,7 @@ wyzwolone zostanie to, które ma najwyższy priorytet. none - żaden + brak @@ -1825,72 +1817,92 @@ wyzwolone zostanie to, które ma najwyższy priorytet. Nazwa makrodefinicji: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Makrodefinicje użytkownika - + System macros Makrodefinicje systemowe - + Execute Wykonaj - + Close Zamknij - + Create Utwórz - + Delete Usuń - + Edit Edycja - + Rename Zmień nazwę - + Duplicate Duplikuj - + Launch a guide on how to set up a macro in a custom global toolbar. Uruchom poradnik jak skonfigurować makro w niestandardowym globalnym pasku narzędzi. - + Toolbar Pasek narzędzi - + Open Addon Manager where macros created by the community and other addons can be downloaded. Otwórz Menedżera dodatków, gdzie można pobrać makrodefinicje utworzone przez społeczność oraz inne dodatki. - + Download Pobierz - + User macros location: Lokalizacja makrodefinicji użytkownika: @@ -1898,71 +1910,71 @@ wyzwolone zostanie to, które ma najwyższy priorytet. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makropolecenie - + Read-only Tylko do odczytu - + Macro file Plik makrodefinicji - + Enter a file name, please: Proszę wprowadzić nazwę pliku: - - - + + + Existing file Plik już istnieje - + '%1'. This file already exists. '%1'. Ten plik już istnieje. - + Cannot create file Nie można utworzyć pliku - + Creation of file '%1' failed. Tworzenie pliku %1 nie powiodło się. - + Delete macro Usuń makrodefinicję - + Do you really want to delete the macro '%1'? Czy na pewno chcesz usunąć makro '%1'? - + Do not show again Nie pokazuj ponownie - + Guided Walkthrough Poradnik - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,78 +1985,78 @@ Uwaga: Twoje zmiany zostaną zastosowane przy następnym przełączeniu środowi - + Walkthrough, dialog 1 of 2 Przewodnik, okno 1 z 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instrukcje przewodnika: Wypełnij brakujące pola (opcjonalnie), a następnie kliknij dodaj, a następnie zamknij - + Walkthrough, dialog 1 of 1 Przewodnik, okno 1 z 1 - + Walkthrough, dialog 2 of 2 Przewodnik, okno 2 z 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instrukcje przewodnika: Kliknij strzałkę w prawo (->), a następnie Zamknij. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instrukcje przewodnika: Kliknij Nowy, następnie strzałkę w prawo (->), a następnie Zamknij. - + Renaming Macro File Zmiana nazwy pliku makrodefinicji - - + + Enter new name: Wprowadź nową nazwę: - - + + '%1' already exists. '%1' już istnieje. - + Rename Failed Zmiana nazwy nie powiodła się - + Failed to rename to '%1'. Perhaps a file permission error? Nie udało się zmienić nazwy na '%1'. Być może odmowa dostępu do pliku? - + Duplicate Macro Duplikuj Makroinstrukcje - + Duplicate Failed Błąd duplikowania - + Failed to duplicate to '%1'. Perhaps a file permission error? Nie można powielić do '%1'. @@ -3829,7 +3841,7 @@ Możesz również skorzystać z formatki: John Doe <john@doe.com> Macro - Makropolecenia + Makrodefinicje @@ -4023,7 +4035,7 @@ Możesz również skorzystać z formatki: John Doe <john@doe.com> Default - Domyślny + Domyślnie @@ -4311,6 +4323,16 @@ długość wiersza w konsoli Python Save history Zapisz dziennik działań + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4425,16 +4447,41 @@ Większa wartość ułatwia wybieranie, ale może uniemożliwić wybór małych - + Top: U góry: - + Middle: Pośrodku: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4457,7 +4504,7 @@ Większa wartość ułatwia wybieranie, ale może uniemożliwić wybór małych - + Bottom: U dołu: @@ -4487,17 +4534,17 @@ Większa wartość ułatwia wybieranie, ale może uniemożliwić wybór małych Kolor tła dla aktywnej zawartości w widoku drzewa - + Central: Centralny: - + Midway: W połowie: - + End: Na końcu: @@ -5475,22 +5522,10 @@ wstępnie wybranymi przed otwarciem tego okna Gui::DockWnd::ComboView - + Combo View Widok połączony - - - - Model - Model - - - - - Tasks - Zadania - Gui::DockWnd::PropertyDockView @@ -5717,12 +5752,12 @@ wstępnie wybranymi przed otwarciem tego okna Gui::EditorView - + Modified file Zmodyfikowany plik - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5731,53 +5766,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Niezapisany dokument - + The document has been modified. Do you want to save your changes? Dokument został zmieniony. Czy chcesz zapisać zmiany? - + FreeCAD macro Makroinstrukcja FreeCAD - + Export PDF Eksportuj do PDF - + PDF file Plik PDF - + untitled[*] bez nazwy [*] - + - Editor - Edytor - + %1 chars removed Usunięto %1 znaków - + %1 chars added Dodano %1 znaków - + Formatted Sformatowany @@ -5928,39 +5963,46 @@ Do you want to save your changes? Graphviz - nie można utworzyć pliku obrazu - + PNG format Format PNG - + Bitmap format Format mapy bitowej - + GIF format Format GIF - + JPG format Format JPG - + SVG format Format SVG - - + + PDF format Format PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Eksport wykresu @@ -5988,7 +6030,7 @@ Do you want to save your changes? Press middle mouse button - Naciśnij środkowy przycisk myszki + Wciśnij środkowy przycisk myszki @@ -6104,7 +6146,7 @@ Do you want to save your changes? Macros - Makrodefinicje + Makropolecenie @@ -6121,7 +6163,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Wymiar @@ -6131,62 +6173,62 @@ Do you want to save your changes? Gotowe - + Help addon needed! Potrzebny dodatek pomocy! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager System pomocy dla %1 jest teraz obsługiwany przez dodatek "Pomoc". Można go łatwo zainstalować przy pomocy Menadżera dodatków - + Open Addon Manager Otwórz Menedżer dodatków - + Close All Zamknij wszystkie - - - + + + Toggles this toolbar Włącza/wyłącza ten pasek narzędzi - - - + + + Toggles this dockable window Włącza/wyłącza to okno dokujące - + WARNING: This is a development version. UWAGA: To jest wersja deweloperska. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Proszę nie używać tej wersji w środowisku produkcyjnym. - - + + Unsaved document Dokument niezapisany - + The exported object contains external link. Please save the documentat least once before exporting. Wyeksportowany obiekt zawiera zewnętrzny odnośnik. Proszę zapisać dokument przynajmniej raz przed wyeksportowaniem. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Aby powiązać z obiektami zewnętrznymi, dokument musi być zapisany co najmniej raz. @@ -6558,116 +6600,116 @@ Jak chcesz kontynuować? Gui::PythonConsole - + System exit Wyjście z systemu - + The application is still running. Do you want to exit without saving your data? Aplikacja jest wciąż uruchomiona. Czy chcesz zakończyć bez zapisywania danych? - - - - + + + + Python console Konsola Python - + Unhandled PyCXX exception. Nieobsługiwany wyjątek PyCXX. - + Unhandled FreeCAD exception. Nieobsługiwany wyjątek FreeCAD. - + Unhandled std C++ exception. Nieobsługiwany wyjątek std C++. - + Unhandled unknown C++ exception. Nieobsługiwany nieznany wyjątek C++. - + &Copy &Kopiuj - + &Copy command &Kopiuj polecenie - + &Copy history &Kopiuj historię - + Save history as... Zapisz historię jako ... - + Save history Zapisz dziennik działań - + Saves Python history across %1 sessions Zapisuje historię z konsoli Pyton w %1 sesji - + &Paste &Wklej - + Select All Zaznacz wszystko - + Clear console Wyczyść okienko konsoli - + Insert file name... Wstaw nazwę pliku... - + Word wrap Zawijanie wyrazów - + Save History Zapisz historię - + Macro Files Plik makrodefinicji - + Insert file name Wstaw nazwę pliku - + All Files Wszystkie pliki @@ -6708,7 +6750,7 @@ Do you want to exit without saving your data? none - brak + żaden @@ -6752,22 +6794,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Poprzedni - + Next Następny - + Case sensitive Rozróżniaj wielkość liter - + Whole words Całe słowa @@ -6880,17 +6922,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Przyrosty - + Translation Increment: Przyrost przesunięcia: - + Rotation Increment: Przyrost obrotu: @@ -7055,7 +7097,7 @@ Do you want to specify another directory? Press middle mouse button - Wciśnij środkowy przycisk myszki + Naciśnij środkowy przycisk myszki @@ -7073,7 +7115,7 @@ Do you want to specify another directory? Press left mouse button - Wciśnij lewy przycisk myszki + Naciśnij lewy przycisk myszki @@ -7715,37 +7757,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Widok drzewa - + + Tasks + Zadania + + + Property view Widok właściwości - + Selection view Wybór widoku - - Combo View - Widok połączony + + Model + Model - + DAG View Widok DAG - + Report view Widok raportu - + Python console Konsola Python @@ -7822,12 +7869,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. W tym systemie działa OpenGL w wersji %1.%2. FreeCAD wymaga OpenGL 2.0 lub nowszego. W razie potrzeby zaktualizuj sterownik i/lub kartę graficzną. - + Invalid OpenGL Version Nieprawidłowa wersja OpenGL @@ -7868,71 +7915,71 @@ Do you want to specify another directory? Eksportuj plik - + Printing... Drukowanie... - + Exporting PDF... Eksportuj do PDF... - - + + Unsaved document Niezapisany dokument - + The exported object contains external link. Please save the documentat least once before exporting. Wyeksportowany obiekt zawiera zewnętrzny odnośnik. Proszę zapisać dokument przynajmniej raz przed wyeksportowaniem. - - + + Delete failed Usunięcie nie powiodło się - + Dependency error Błąd zależności - + Copy selected Kopiuj zaznaczone - + Copy active document Kopiuj aktywny dokument - + Copy all documents Kopiuj wszystkie dokumenty - + Paste Wklej - + Expression error Błąd wyrażenia - + Failed to parse some of the expressions. Please check the Report View for more details. Nie udało się przetworzyć niektórych wyrażeń. Sprawdź widok raportu, aby uzyskać więcej informacji. - + Failed to paste expressions Nie udało się wkleić wyrażeń @@ -8347,7 +8394,7 @@ Wybierz "Nie", aby cofnąć się tylko do aktywnego dokumentu. Wybierz "Przerwij", aby zrezygnować - + Save Macro Zapisz makrodefinicję @@ -8416,7 +8463,7 @@ Proszę otworzyć okno przeglądarki i wpisać: http://localhost:%1.Nie można otworzyć przeglądarki systemowej. - + Options... Opcje ... @@ -8463,42 +8510,42 @@ Proszę otworzyć okno przeglądarki i wpisać: http://localhost:%1.Czy chcesz zamknąć to okno? - + Do you want to save your changes to document '%1' before closing? Czy chcesz zapisać zmiany do dokumentu "%1" przed zamknięciem? - + Do you want to save your changes to document before closing? Czy chcesz zapisać zmiany przed zamknięciem? - + If you don't save, your changes will be lost. Jeśli nie zapiszesz dokumentu, zmiany zostaną utracone. - + Apply answer to all Zastosuj odpowiedź dla wszystkich - + %1 Document(s) not saved Dokument %1 nie został zapisany - + Some documents could not be saved. Do you want to cancel closing? Niektóre dokumenty nie mogły zostać zapisane. Czy chcesz przerwać zamykanie dokumentów? - + Delete macro Usuń makrodefinicję - + Not allowed to delete system-wide macros Nie wolno usuwać makrodefinicji systemowych @@ -8518,12 +8565,17 @@ Proszę otworzyć okno przeglądarki i wpisać: http://localhost:%1.%1 nie jest pusty, czy usunąć również jego zawartość? - + Translation: Przesunięcie: - + + Translation XY: + Translation XY: + + + Rotation: Obrót: @@ -8733,7 +8785,7 @@ bieżącej kopii zostaną utracone. Modyfikuj obraz ... - + Color Gradient Gradient kolorów @@ -8839,13 +8891,13 @@ bieżącej kopii zostaną utracone. StdCmdAlignment - + Alignment... Wyrównanie ... - - + + Align the selected objects Wyrównaj zaznaczone obiekty @@ -8923,13 +8975,13 @@ bieżącej kopii zostaną utracone. StdCmdCopy - + C&opy K&opiuj - - + + Copy operation Skopiuj operację @@ -8937,13 +8989,13 @@ bieżącej kopii zostaną utracone. StdCmdCut - + &Cut &Wytnij - - + + Cut out Wytnij @@ -8951,13 +9003,13 @@ bieżącej kopii zostaną utracone. StdCmdDelete - + &Delete &Usuń - - + + Deletes the selected objects Usuwa zaznaczone obiekty @@ -9105,13 +9157,13 @@ bieżącej kopii zostaną utracone. StdCmdDuplicateSelection - + Duplicate selection Powiel zaznaczone - - + + Put duplicates of the selected objects to the active document Umieść kopie wybranych obiektów w aktywnym dokumencie @@ -9119,17 +9171,17 @@ bieżącej kopii zostaną utracone. StdCmdEdit - + Toggle &Edit mode Przełącz tryb &Edycji - + Toggles the selected object's edit mode Przełącza tryb edycji wybranego obiektu - + Activates or Deactivates the selected object's edit mode Aktywuje lub wyłącza tryb edycji dla zaznaczonych obiektów @@ -9161,13 +9213,13 @@ bieżącej kopii zostaną utracone. StdCmdExpression - + Expression actions Akcje z wyrażeniami - - + + Actions that apply to expressions Akcje z wyrażeniami @@ -9659,19 +9711,19 @@ bieżącej kopii zostaną utracone. StdCmdNew - + &New &Nowy - - + + Create a new empty document Utwórz nowy pusty dokument - + Unnamed Nienazwany @@ -9754,13 +9806,13 @@ bieżącej kopii zostaną utracone. StdCmdPaste - + &Paste &Wklej - - + + Paste operation Wklej operację @@ -9768,13 +9820,13 @@ bieżącej kopii zostaną utracone. StdCmdPlacement - + Placement... Umiejscowienie ... - - + + Place the selected objects Umieść wybrany obiekt @@ -9782,13 +9834,13 @@ bieżącej kopii zostaną utracone. StdCmdPrint - + &Print... &Drukuj ... - - + + Print the document Wydrukuj dokument @@ -9796,13 +9848,13 @@ bieżącej kopii zostaną utracone. StdCmdPrintPdf - + &Export PDF... Eksportuj do PD&F ... - - + + Export the document as PDF Wyeksportuj dokument do PDF @@ -9810,17 +9862,17 @@ bieżącej kopii zostaną utracone. StdCmdPrintPreview - + &Print preview... &Podgląd wydruku ... - + Print the document Wydrukuj dokument - + Print preview Podgląd wydruku @@ -9828,13 +9880,13 @@ bieżącej kopii zostaną utracone. StdCmdProjectInfo - + Project i&nformation... I&nformacja o projekcie ... - - + + Show details of the currently active project Pokaż szczegóły obecnie aktywnego projektu @@ -9842,13 +9894,13 @@ bieżącej kopii zostaną utracone. StdCmdProjectUtil - + Project utility... Narzędzia projektu ... - - + + Utility to extract or create project files Narzędzie do rozpakowywania lub tworzenia plików projektu @@ -9870,13 +9922,13 @@ bieżącej kopii zostaną utracone. StdCmdQuit - + E&xit &Zakończ - - + + Quits the application Zamyka program @@ -9926,13 +9978,13 @@ bieżącej kopii zostaną utracone. StdCmdRedo - + &Redo &Ponów - - + + Redoes a previously undone action Wykonuje ponownie poprzednio cofniętą czynność @@ -9940,13 +9992,13 @@ bieżącej kopii zostaną utracone. StdCmdRefresh - + &Refresh &Odśwież - - + + Recomputes the current active document Przelicza aktywny dokument @@ -9968,13 +10020,13 @@ bieżącej kopii zostaną utracone. StdCmdRevert - + Revert Przywróć - - + + Reverts to the saved version of this file Przywraca zapisaną wersję tego pliku @@ -9982,13 +10034,13 @@ bieżącej kopii zostaną utracone. StdCmdSave - + &Save Zapi&sz - - + + Save the active document Zapisz aktywny dokument @@ -9996,13 +10048,13 @@ bieżącej kopii zostaną utracone. StdCmdSaveAll - + Save All Zapisz wszystkie - - + + Save all opened document Zapisz wszystkie otwarte dokumenty @@ -10010,13 +10062,13 @@ bieżącej kopii zostaną utracone. StdCmdSaveAs - + Save &As... Zapisz &jako ... - - + + Save the active document under a new file name Zapisuje aktywny dokument pod nową nazwą @@ -10024,13 +10076,13 @@ bieżącej kopii zostaną utracone. StdCmdSaveCopy - + Save a &Copy... Zapisz jako &kopię ... - - + + Save a copy of the active document under a new file name Zapisz kopię aktywnego dokumentu pod nową nazwą pliku @@ -10094,13 +10146,13 @@ bieżącej kopii zostaną utracone. StdCmdSelectAll - + Select &All Zaznacz &wszystko - - + + Select all Zaznacz wszystko @@ -10332,13 +10384,13 @@ bieżącej kopii zostaną utracone. StdCmdTransform - + Transform... Przemieszczenie ... - - + + Transform the geometry of selected objects Przekształć geometrię wybranych obiektów @@ -10346,13 +10398,13 @@ bieżącej kopii zostaną utracone. StdCmdTransformManip - + Transform Przemieszczenie - - + + Transform the selected object in the 3d view Przekształć wybrany obiekt w widoku 3D @@ -10416,13 +10468,13 @@ bieżącej kopii zostaną utracone. StdCmdUndo - + &Undo &Cofnij - - + + Undo exactly one action Cofnij dokładnie jedną czynność @@ -11222,7 +11274,7 @@ bieżącej kopii zostaną utracone. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11233,7 +11285,7 @@ Czy na pewno kontynuować? - + Object dependencies Zależności obiektu @@ -11322,12 +11374,12 @@ Czy na pewno kontynuować? Std_DuplicateSelection - + Object dependencies Zależności obiektu - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Aby powiązać z obiektami zewnętrznymi, dokument musi być zapisany co najmniej raz. @@ -11345,7 +11397,7 @@ Czy chcesz zapisać dokument teraz? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11359,17 +11411,17 @@ Czy nadal chcesz kontynuować? Std_Revert - + Revert document Przywrócić dokument - + This will discard all the changes since last file save. Spowoduje to odrzucenie wszystkich zmian od ostatniego zapisu pliku. - + Do you want to continue? Czy chcesz kontynuować? @@ -11507,7 +11559,7 @@ Czy nadal chcesz kontynuować? Macro - Makrodefinicje + Makropolecenia @@ -12032,23 +12084,15 @@ po uruchomieniu FreeCAD Ładuje obraz - - Gui::InteractiveScale - - - Enter desired distance between the points - Wprowadź pożądaną odległość między punktami - - NaviCubeDraggableCmd - + Movable navigation cube Ruchoma kostka nawigacyjna - + Drag and place NaviCube Przeciągnij i umieść Kostkę nawigacyjną @@ -12399,7 +12443,7 @@ gdzie zawsze będzie wpisywana kropka. Customize how user interface will look like - Dostosuj jak będzie wyglądał interfejs użytkownika + Dostosuj wygląd interfejsu użytkownika @@ -12523,77 +12567,72 @@ wyświetli ekran powitalny Zarządzaj pakietami preferencji - + Small (%1px) Małe (%1px) - + Medium (%1px) Średnie (%1px) - + Large (%1px) Duże (%1px) - + Extra large (%1px) Bardzo duże (%1px) - + Custom (%1px) Niestandardowy (%1px) - + Combo View Widok połączony - + TreeView and PropertyView Widok drzewa i widok właściwości - - Both - Obydwa - - - + Preference Pack Name Nazwa Pakietu preferencji - + Tags Znaczniki - + Apply Zastosuj - + Apply the %1 preference pack Zastosuj pakiet preferencji: %1 - + Choose a FreeCAD config file to import Wybierz plik konfiguracyjny FreeCAD do importu - + File exists Plik już Istnieje - + A preference pack with that name already exists. Overwrite? Pakiet ustawień o tej nazwie już istnieje! Czy chcesz go zastąpić? @@ -12901,4 +12940,18 @@ Teraz można użyć motywu, aby uzyskać pełną personalizację interfejsu.Wszystkie filtry zostały wyczyszczone + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_pt-BR.ts b/src/Gui/Language/FreeCAD_pt-BR.ts index 5378f46b36..8f7b005a31 100644 --- a/src/Gui/Language/FreeCAD_pt-BR.ts +++ b/src/Gui/Language/FreeCAD_pt-BR.ts @@ -122,12 +122,12 @@ Importar - + Delete Excluir - + Paste expressions Colar expressões @@ -188,9 +188,9 @@ Posicionamento + - Transform Transformar @@ -220,7 +220,7 @@ Alternar seletibilidade - + Edit image Editar imagem @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Cancelar - - Gui::ControlSingleton - - - Task panel - Painel de tarefas - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ simultaneamente. Aquele com a maior prioridade será acionado. Nome da macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macros do usuário - + System macros Macros do sistema - + Execute Executar - + Close Fechar - + Create Criar - + Delete Excluir - + Edit Editar - + Rename Renomear - + Duplicate Duplicado - + Launch a guide on how to set up a macro in a custom global toolbar. Lança um guia sobre como configurar uma macro na barra de ferramentas personalizada global. - + Toolbar Barra de ferramentas - + Open Addon Manager where macros created by the community and other addons can be downloaded. Abra o gerenciador de extensões onde macros criadas pela comunidade e outros complementos podem ser baixados. - + Download Baixar - + User macros location: Localização das macros do usuário: @@ -1898,72 +1910,72 @@ simultaneamente. Aquele com a maior prioridade será acionado. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Somente leitura - + Macro file Arquivo de macro - + Enter a file name, please: Digite um nome de arquivo, por favor: - - - + + + Existing file Arquivo existente - + '%1'. This file already exists. '%1'. Este arquivo já existe. - + Cannot create file Não é possível criar o arquivo - + Creation of file '%1' failed. Falha na criação do arquivo '%1'. - + Delete macro Excluir macro - + Do you really want to delete the macro '%1'? Você realmente deseja excluir a macro '%1'? - + Do not show again Não mostrar novamente - + Guided Walkthrough Passo a passo - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,76 +1986,76 @@ Obs: as mudanças serão aplicadas na próxima troca de bancada - + Walkthrough, dialog 1 of 2 Passo a passo, diálogo 1 de 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instruções: complete os campos vazios (opcional) então clique em Adicionar e, por fim, Fechar - + Walkthrough, dialog 1 of 1 Passo a passo, diálogo 1 de 1 - + Walkthrough, dialog 2 of 2 Passo a passo, diálogo 2 de 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instruções: Clique na tecla seta para a direita (->), e depois Fechar. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instrução: Clique Novo, então clique no botão seta para a direita (->), e depois Fechar. - + Renaming Macro File Renomear um arquivo de Macro - - + + Enter new name: Digite o novo nome: - - + + '%1' already exists. '%1' já existe. - + Rename Failed Falha ao renomear - + Failed to rename to '%1'. Perhaps a file permission error? Falha ao renomear para '%1'. Talvez um erro de permissão de arquivo? - + Duplicate Macro Duplicar Macro - + Duplicate Failed Não foi possível duplicar - + Failed to duplicate to '%1'. Perhaps a file permission error? Não foi possível duplicar para '%1'. @@ -4309,6 +4321,16 @@ horizontal space in Python console Save history Salvar o histórico + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4422,16 +4444,41 @@ Valores maiores facilitam a seleção, mas podem impedir a seleção de objetos - + Top: Topo: - + Middle: Meio: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4454,7 +4501,7 @@ Valores maiores facilitam a seleção, mas podem impedir a seleção de objetos - + Bottom: Embaixo: @@ -4484,17 +4531,17 @@ Valores maiores facilitam a seleção, mas podem impedir a seleção de objetos Cor de fundo para contêineres ativos na árvore - + Central: Centro: - + Midway: Metade: - + End: Fim: @@ -5470,22 +5517,10 @@ originalmente selecionados antes de abrir esta caixa de diálogo Gui::DockWnd::ComboView - + Combo View Tela combinada - - - - Model - Modelo - - - - - Tasks - Tarefas - Gui::DockWnd::PropertyDockView @@ -5712,12 +5747,12 @@ originalmente selecionados antes de abrir esta caixa de diálogo Gui::EditorView - + Modified file Arquivo modificado - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5725,54 +5760,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Documento não salvo - + The document has been modified. Do you want to save your changes? O documento foi modificado. Deseja salvar as alterações? - + FreeCAD macro FreeCAD macro - + Export PDF Exportar PDF - + PDF file Arquivo PDF - + untitled[*] sem título[*] - + - Editor - Editor - + %1 chars removed %1 caracteres removidos - + %1 chars added %1 caracteres adicionados - + Formatted Formatado @@ -5923,39 +5958,46 @@ Deseja salvar as alterações? O Graphviz falhou ao criar um arquivo de imagem - + PNG format Formato PNG - + Bitmap format Formato de bitmap - + GIF format Formato GIF - + JPG format Formato JPG - + SVG format Formato SVG - - + + PDF format Formato PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportar gráfico @@ -6116,7 +6158,7 @@ Deseja salvar as alterações? Gui::MainWindow - + Dimension Dimensão @@ -6126,62 +6168,62 @@ Deseja salvar as alterações? Pronto - + Help addon needed! Add-on de ajuda é necessário! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager O sistema de ajuda do %1 agora é tratado pela extensão "Ajuda". Ele pode ser facilmente instalado através do Gerenciador de Complementos - + Open Addon Manager Abrir o Gestor de Add-ons - + Close All Fechar tudo - - - + + + Toggles this toolbar Alterna esta barra de ferramentas - - - + + + Toggles this dockable window Alterna esta janela acoplável - + WARNING: This is a development version. AVISO: esta é uma versão em desenvolvimento. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Documento não salvo - + The exported object contains external link. Please save the documentat least once before exporting. O objeto exportado contém links externos. Salve o documento pelo menos uma vez antes de exportar. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Para vincular a objetos externos, o documento deve ser salvo pelo menos uma vez. @@ -6553,116 +6595,116 @@ Deseja prosseguir? Gui::PythonConsole - + System exit Saída do sistema - + The application is still running. Do you want to exit without saving your data? O aplicativo ainda está em execução. Deseja sair sem salvar os seus dados? - - - - + + + + Python console Console Python - + Unhandled PyCXX exception. Exceção PyCXX não tratada. - + Unhandled FreeCAD exception. Exceção FreeCAD não tratada. - + Unhandled std C++ exception. Exceção std C++ não tratada. - + Unhandled unknown C++ exception. Exceção desconhecida C++ não tratada. - + &Copy &Copiar - + &Copy command &Copiar comando - + &Copy history &Copiar histórico - + Save history as... Salvar histórico como... - + Save history Salvar o histórico - + Saves Python history across %1 sessions Salvar histórico do Python em %1 sessões - + &Paste Co&lar - + Select All Selecionar tudo - + Clear console Limpar console - + Insert file name... Insira o nome do arquivo... - + Word wrap Quebra de linha - + Save History Salvar histórico - + Macro Files Arquivos de macro - + Insert file name Insira o nome do arquivo - + All Files Todos os Arquivos @@ -6747,22 +6789,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Anterior - + Next Próximo - + Case sensitive Sensível à maiúsculas e minúsculas - + Whole words Palavras inteiras @@ -6875,17 +6917,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Incrementos - + Translation Increment: Incremento de translação: - + Rotation Increment: Incremento de rotação: @@ -7710,37 +7752,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Exibição em árvore - + + Tasks + Tarefas + + + Property view Tela de propriedades - + Selection view Tela de seleção - - Combo View - Tela combinada + + Model + Modelo - + DAG View Vista DAG - + Report view Ver Relatório - + Python console Console Python @@ -7816,12 +7863,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Versão OpenGL inválida @@ -7862,71 +7909,71 @@ Do you want to specify another directory? Exportar um arquivo - + Printing... Imprimindo... - + Exporting PDF... Exportar PDF... - - + + Unsaved document Documento não salvo - + The exported object contains external link. Please save the documentat least once before exporting. O objeto exportado contém links externos. Salve o documento pelo menos uma vez antes de exportar. - - + + Delete failed Falha ao apagar - + Dependency error Erro de dependência - + Copy selected Copiar a seleção - + Copy active document Copiar documento ativo - + Copy all documents Copiar todos os documentos - + Paste Colar - + Expression error Erro de expressão - + Failed to parse some of the expressions. Please check the Report View for more details. Falha ao analisar algumas das expressões. Veja o painel de relatório para mais detalhes. - + Failed to paste expressions Falha ao colar expressões @@ -8340,7 +8387,7 @@ Escolha 'Não' para reverter apenas no documento ativo. Escolha 'Abortar' para cancelar - + Save Macro Salvar macro @@ -8407,7 +8454,7 @@ Please open a browser window and type in: http://localhost:%1. Não é possível abrir o navegador do sistema. - + Options... Opções... @@ -8454,42 +8501,42 @@ Please open a browser window and type in: http://localhost:%1. Deseja fechar este diálogo? - + Do you want to save your changes to document '%1' before closing? Deseja salvar as alterações no documento '%1' antes de fechar? - + Do you want to save your changes to document before closing? Deseja salvar suas alterações no documento antes de fechar? - + If you don't save, your changes will be lost. Se você não for salvar, suas alterações serão perdidas. - + Apply answer to all Aplicar esta resposta a todos - + %1 Document(s) not saved %1 Documento(s) não foram salvos - + Some documents could not be saved. Do you want to cancel closing? Alguns documentos não puderam ser salvos. Cancelar o fechamento? - + Delete macro Excluir macro - + Not allowed to delete system-wide macros Não é permitido excluir macros do sistema @@ -8509,12 +8556,17 @@ Please open a browser window and type in: http://localhost:%1. %1 não está vazio. Excluir seu conteúdo também? - + Translation: Translação: - + + Translation XY: + Translation XY: + + + Rotation: Rotação: @@ -8724,7 +8776,7 @@ cópia atual será perdida. Alterar imagem... - + Color Gradient Gradiente de cor @@ -8830,13 +8882,13 @@ cópia atual será perdida. StdCmdAlignment - + Alignment... Alinhamento... - - + + Align the selected objects Alinha os objetos selecionados @@ -8914,13 +8966,13 @@ cópia atual será perdida. StdCmdCopy - + C&opy C&opiar - - + + Copy operation Copiar @@ -8928,13 +8980,13 @@ cópia atual será perdida. StdCmdCut - + &Cut Co&rtar - - + + Cut out Recortar @@ -8942,13 +8994,13 @@ cópia atual será perdida. StdCmdDelete - + &Delete &Excluir - - + + Deletes the selected objects Exclui os objetos selecionados @@ -9096,13 +9148,13 @@ cópia atual será perdida. StdCmdDuplicateSelection - + Duplicate selection Duplicar seleção - - + + Put duplicates of the selected objects to the active document Coloca duplicatas dos objetos selecionados no documento ativo @@ -9110,17 +9162,17 @@ cópia atual será perdida. StdCmdEdit - + Toggle &Edit mode Alterar o modo de &edição - + Toggles the selected object's edit mode Alterna o modo de edição do objeto selecionado - + Activates or Deactivates the selected object's edit mode Ativa ou desativa o modo de edição do objeto selecionado @@ -9152,13 +9204,13 @@ cópia atual será perdida. StdCmdExpression - + Expression actions Ações de expressão - - + + Actions that apply to expressions Ações que se aplicam às expressões @@ -9650,19 +9702,19 @@ cópia atual será perdida. StdCmdNew - + &New &Novo - - + + Create a new empty document Criar um novo documento vazio - + Unnamed Sem nome @@ -9745,13 +9797,13 @@ cópia atual será perdida. StdCmdPaste - + &Paste Co&lar - - + + Paste operation Colar @@ -9759,13 +9811,13 @@ cópia atual será perdida. StdCmdPlacement - + Placement... Posicionamento... - - + + Place the selected objects Colocar os objetos selecionados @@ -9773,13 +9825,13 @@ cópia atual será perdida. StdCmdPrint - + &Print... &Imprimir... - - + + Print the document Imprime o documento @@ -9787,13 +9839,13 @@ cópia atual será perdida. StdCmdPrintPdf - + &Export PDF... &Exportar PDF... - - + + Export the document as PDF Exportar o documento como PDF @@ -9801,17 +9853,17 @@ cópia atual será perdida. StdCmdPrintPreview - + &Print preview... &Visualização de impressão... - + Print the document Imprime o documento - + Print preview Visualização de impressão @@ -9819,13 +9871,13 @@ cópia atual será perdida. StdCmdProjectInfo - + Project i&nformation... I&nformação do projeto... - - + + Show details of the currently active project Mostrar os detalhes do projeto ativo @@ -9833,13 +9885,13 @@ cópia atual será perdida. StdCmdProjectUtil - + Project utility... Utilitário de projeto... - - + + Utility to extract or create project files Utilitário para extrair ou criar arquivos de projeto @@ -9861,13 +9913,13 @@ cópia atual será perdida. StdCmdQuit - + E&xit &Sair - - + + Quits the application Finaliza o aplicativo @@ -9917,13 +9969,13 @@ cópia atual será perdida. StdCmdRedo - + &Redo &Refazer - - + + Redoes a previously undone action Refazer uma ação desfeita anteriormente @@ -9931,13 +9983,13 @@ cópia atual será perdida. StdCmdRefresh - + &Refresh &Atualizar - - + + Recomputes the current active document Recalcula o documento ativo atual @@ -9959,13 +10011,13 @@ cópia atual será perdida. StdCmdRevert - + Revert Desfazer - - + + Reverts to the saved version of this file Reverte para a versão salva deste arquivo @@ -9973,13 +10025,13 @@ cópia atual será perdida. StdCmdSave - + &Save &Salvar - - + + Save the active document Salvar o documento ativo @@ -9987,13 +10039,13 @@ cópia atual será perdida. StdCmdSaveAll - + Save All Salvar Tudo - - + + Save all opened document Salvar todos documentos abertos @@ -10001,13 +10053,13 @@ cópia atual será perdida. StdCmdSaveAs - + Save &As... Salvar como... - - + + Save the active document under a new file name Salvar o documento ativo com um novo nome de arquivo @@ -10015,13 +10067,13 @@ cópia atual será perdida. StdCmdSaveCopy - + Save a &Copy... Salvar uma &Cópia... - - + + Save a copy of the active document under a new file name Salvar uma cópia do documento ativo com um novo nome de arquivo @@ -10085,13 +10137,13 @@ cópia atual será perdida. StdCmdSelectAll - + Select &All Selecionar &tudo - - + + Select all Selecionar tudo @@ -10323,13 +10375,13 @@ cópia atual será perdida. StdCmdTransform - + Transform... Transformar... - - + + Transform the geometry of selected objects Transformar a geometria dos objetos selecionados @@ -10337,13 +10389,13 @@ cópia atual será perdida. StdCmdTransformManip - + Transform Transformar - - + + Transform the selected object in the 3d view Transformar o objeto selecionado na vista 3D @@ -10407,13 +10459,13 @@ cópia atual será perdida. StdCmdUndo - + &Undo &Desfazer - - + + Undo exactly one action Desfazer uma ação @@ -11213,7 +11265,7 @@ cópia atual será perdida. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11224,7 +11276,7 @@ Tem certeza que deseja continuar? - + Object dependencies Dependências do objeto @@ -11313,12 +11365,12 @@ Tem certeza que deseja continuar? Std_DuplicateSelection - + Object dependencies Dependências do objeto - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Para vincular a objetos externos, o documento deve ser salvo pelo menos uma vez. @@ -11336,7 +11388,7 @@ Deseja salvar o documento agora? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11350,17 +11402,17 @@ Deseja prosseguir mesmo assim? Std_Revert - + Revert document Reverter o documento - + This will discard all the changes since last file save. Isto irá descartar todas as mudanças desde o último salvamento de arquivo. - + Do you want to continue? Deseja continuar? @@ -12022,23 +12074,15 @@ after FreeCAD launches Carrega uma imagem - - Gui::InteractiveScale - - - Enter desired distance between the points - Digite a distância desejada entre os pontos - - NaviCubeDraggableCmd - + Movable navigation cube Cubo de navegação móvel - + Drag and place NaviCube Arraste e posicione o NaviCube @@ -12512,77 +12556,72 @@ a tela de abertura será exibida Gerenciar pacotes de preferências - + Small (%1px) Pequeno (%1px) - + Medium (%1px) Médio (%1px) - + Large (%1px) Grande (%1px) - + Extra large (%1px) Extra grande (%1px) - + Custom (%1px) Personalizado (%1px) - + Combo View Tela combinada - + TreeView and PropertyView TreeView e Propriedades - - Both - Ambos - - - + Preference Pack Name Nome do pacote de preferências - + Tags Etiquetas - + Apply Aplicar - + Apply the %1 preference pack Aplicar o pacote de preferências %1 - + Choose a FreeCAD config file to import Escolha um arquivo de configuração do FreeCAD para importar - + File exists Arquivo existe - + A preference pack with that name already exists. Overwrite? Já existe um pacote de preferências com esse nome. Deseja substituí-lo? @@ -12888,4 +12927,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_pt-PT.ts b/src/Gui/Language/FreeCAD_pt-PT.ts index eb0ca0e027..116e667838 100644 --- a/src/Gui/Language/FreeCAD_pt-PT.ts +++ b/src/Gui/Language/FreeCAD_pt-PT.ts @@ -122,12 +122,12 @@ Importar - + Delete Apagar - + Paste expressions Colar expressões @@ -188,9 +188,9 @@ Colocação + - Transform Transformar @@ -220,7 +220,7 @@ Alternar seletibilidade - + Edit image Edit image @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Cancelar - - Gui::ControlSingleton - - - Task panel - Painel de Tarefas - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. Nome da Macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macros do utilizador - + System macros Macros do sistema - + Execute Executar - + Close Fechar - + Create Criar - + Delete Apagar - + Edit Editar - + Rename Renomear - + Duplicate Duplicar - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Barras de ferramentas - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download Transferir - + User macros location: Localização de macros do utilizador: @@ -1898,71 +1910,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Só-de-leitura - + Macro file Ficheiro de macros - + Enter a file name, please: Por favor, insira um nome de ficheiro: - - - + + + Existing file Ficheiro Existente - + '%1'. This file already exists. '%1'. Este ficheiro já existe. - + Cannot create file Não é possível criar o ficheiro - + Creation of file '%1' failed. Não foi possível criar o ficheiro '%1'. - + Delete macro Apagar macro - + Do you really want to delete the macro '%1'? Deseja apagar a macro '%1'? - + Do not show again Não mostrar novamente - + Guided Walkthrough Guia passo-a-passo - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,76 +1985,76 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Guia passo-a-passo, diálogo 1 de 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close - + Walkthrough, dialog 1 of 1 Guia passo-a-passo, diálogo 1 de 1 - + Walkthrough, dialog 2 of 2 Guia passo-a-passo, diálogo 2 de 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instruções passo-a-passo: Clique na seta para a direita (->), e depois Fechar. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instruções passo-a-passo: Clique Novo, de seguida na seta para a direita (->), e depois Fechar. - + Renaming Macro File Renomear o Ficheiro Macro - - + + Enter new name: Digite o novo nome: - - + + '%1' already exists. '%1' já existe. - + Rename Failed Falha ao Renomear - + Failed to rename to '%1'. Perhaps a file permission error? Falha ao renomear para '%1'. Talvez um erro de permissão de ficheiro? - + Duplicate Macro Duplicar Macro - + Duplicate Failed Duplicação falhada - + Failed to duplicate to '%1'. Perhaps a file permission error? Falha ao duplicar para '%1'. @@ -4311,6 +4323,16 @@ horizontal space in Python console Save history Save history + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4425,16 +4447,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4457,7 +4504,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4487,17 +4534,17 @@ Larger value eases to pick things, but can make small features impossible to sel Background color for active containers in tree view - + Central: Central: - + Midway: Midway: - + End: End: @@ -5473,22 +5520,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Visualização Combinada - - - - Model - Modelo - - - - - Tasks - Tarefas - Gui::DockWnd::PropertyDockView @@ -5715,12 +5750,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Ficheiro Modificado - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5729,54 +5764,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Documento não guardado - + The document has been modified. Do you want to save your changes? O documento foi modificado. Deseja guardar as suas alterações? - + FreeCAD macro FreeCAD macro - + Export PDF Exportar PDF - + PDF file Ficheiro PDF - + untitled[*] sem título[*] - + - Editor - Editor - + %1 chars removed %1 carateres removidos - + %1 chars added %1 carateres adicionados - + Formatted Formatado @@ -5927,39 +5962,46 @@ Deseja guardar as suas alterações? O Graphviz falhou ao criar um ficheiro de imagem - + PNG format Formato PNG - + Bitmap format Formato de bitmap - + GIF format Formato GIF - + JPG format Formato JPG - + SVG format Formato SVG - - + + PDF format Formato PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportar gráfico @@ -6120,7 +6162,7 @@ Deseja guardar as suas alterações? Gui::MainWindow - + Dimension Dimensão @@ -6130,62 +6172,62 @@ Deseja guardar as suas alterações? Pronto - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Open Addon Manager - + Close All Fechar Tudo - - - + + + Toggles this toolbar Altera esta Barra de Ferramentas - - - + + + Toggles this dockable window Ativa/desativa esta janela encaixável - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Documento não guardado - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -6557,117 +6599,117 @@ Como pretende continuar? Gui::PythonConsole - + System exit Sair do Sistema - + The application is still running. Do you want to exit without saving your data? A aplicação ainda está em execução. Deseja sair sem guardar os seus dados? - - - - + + + + Python console Consola Python - + Unhandled PyCXX exception. Exceção PyCXX não tratada. - + Unhandled FreeCAD exception. Exceção FreeCAD não resolvida. - + Unhandled std C++ exception. Exceção std C++ não resolvida. - + Unhandled unknown C++ exception. Exceção de C++ desconhecida não resolvida. - + &Copy &Copiar - + &Copy command &Copiar Comando - + &Copy history &Copiar Histórico - + Save history as... Guardar histórico como... - + Save history Save history - + Saves Python history across %1 sessions Salva histórico do Python em %1 sessões - + &Paste &Colar - + Select All Selecionar Tudo - + Clear console Limpar consola - + Insert file name... Inserir Nome do Ficheiro ... - + Word wrap Continuar Palavra - + Save History Guardar Histórico - + Macro Files Ficheiros de macro - + Insert file name Inserir Nome do Ficheiro - + All Files Todos os Ficheiros @@ -6752,22 +6794,22 @@ Deseja sair sem guardar os seus dados? Gui::SearchBar - + Previous Anterior - + Next Next - + Case sensitive Case sensitive - + Whole words Whole words @@ -6882,17 +6924,17 @@ Quer especificar outro diretório? Gui::TaskCSysDragger - + Increments Incrementos - + Translation Increment: Incremento de translação: - + Rotation Increment: Incremento de rotação: @@ -7717,37 +7759,42 @@ Quer especificar outro diretório? QDockWidget - + Tree view Visualizar em Árvore - + + Tasks + Tarefas + + + Property view Visualizar Propriedades - + Selection view Visualizar Seleção - - Combo View - Visualização Combinada + + Model + Modelo - + DAG View Vista DAG - + Report view Visualizar Relatório - + Python console Consola Python @@ -7823,12 +7870,12 @@ Quer especificar outro diretório? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7869,71 +7916,71 @@ Quer especificar outro diretório? Exportar ficheiro - + Printing... A imprimir ... - + Exporting PDF... A exportar PDF ... - - + + Unsaved document Documento não guardado - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - - + + Delete failed Falha ao Eliminar - + Dependency error Erro de dependência - + Copy selected Copiar selecionados - + Copy active document Copiar documento ativo - + Copy all documents Copiar todos os documentos - + Paste Colar - + Expression error Erro de expressão - + Failed to parse some of the expressions. Please check the Report View for more details. Failed to parse some of the expressions. Please check the Report View for more details. - + Failed to paste expressions Falha ao colar expressões @@ -8347,7 +8394,7 @@ Choose 'No' to roll back in the active document only. Choose 'Abort' to abort - + Save Macro Guardar Macro @@ -8416,7 +8463,7 @@ Por favor, abra um navegador e digite: http://localhost:%1. Não é possível abrir o navegador do seu sistema. - + Options... Opções ... @@ -8463,42 +8510,42 @@ Por favor, abra um navegador e digite: http://localhost:%1. Deseja fechar esta janela? - + Do you want to save your changes to document '%1' before closing? Deseja guardar as alterações no documento '%1' antes de fechar? - + Do you want to save your changes to document before closing? Do you want to save your changes to document before closing? - + If you don't save, your changes will be lost. Se não guardar, as alterações serão perdidas. - + Apply answer to all Aplicar resposta a todos - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Some documents could not be saved. Do you want to cancel closing? - + Delete macro Apagar macro - + Not allowed to delete system-wide macros Não é permitido apagar macros do sistema @@ -8518,12 +8565,17 @@ Por favor, abra um navegador e digite: http://localhost:%1. O %1 não está vazio, Apagar o seu conteúdo também? - + Translation: Tradução: - + + Translation XY: + Translation XY: + + + Rotation: Rotação: @@ -8733,7 +8785,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8839,13 +8891,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Alinhamento ... - - + + Align the selected objects Alinhar os objetos selecionados @@ -8923,13 +8975,13 @@ the current copy will be lost. StdCmdCopy - + C&opy C&opiar - - + + Copy operation Operação de cópia @@ -8937,13 +8989,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Cortar - - + + Cut out Cortar @@ -8951,13 +9003,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Apagar - - + + Deletes the selected objects Apaga os objetos selecionados @@ -9105,13 +9157,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Duplicar seleção - - + + Put duplicates of the selected objects to the active document Colocar os duplicados dos objetos selecionados no documento ativo @@ -9119,17 +9171,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Alternar Modo de &Edição - + Toggles the selected object's edit mode Alterna o modo de edição do objeto selecionado - + Activates or Deactivates the selected object's edit mode Ativa ou desativa o modo de edição do objeto selecionado @@ -9161,13 +9213,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Expression actions - - + + Actions that apply to expressions Actions that apply to expressions @@ -9659,19 +9711,19 @@ the current copy will be lost. StdCmdNew - + &New &Novo - - + + Create a new empty document Criar um Novo Documento vazio - + Unnamed Sem nome @@ -9754,13 +9806,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Colar - - + + Paste operation Colar Operação @@ -9768,13 +9820,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Posição... - - + + Place the selected objects Colocar os objetos selecionados @@ -9782,13 +9834,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Imprimir ... - - + + Print the document Imprimir o Documento @@ -9796,13 +9848,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Exportar PDF ... - - + + Export the document as PDF Exportar o Documento Como PDF @@ -9810,17 +9862,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... & Pré-visualizar impressão... - + Print the document Imprimir o Documento - + Print preview Pré-Visualizar Impressão @@ -9828,13 +9880,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... I&nformação do Projeto ... - - + + Show details of the currently active project Mostrar Detalhes do Projeto Ativo Atual @@ -9842,13 +9894,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Utilitário de projeto... - - + + Utility to extract or create project files Utilitário para extrair ou criar ficheiros de projeto @@ -9870,13 +9922,13 @@ the current copy will be lost. StdCmdQuit - + E&xit S&air - - + + Quits the application Fecha a aplicação @@ -9926,13 +9978,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Refazer - - + + Redoes a previously undone action Refaz uma ação desfeita anteriormente @@ -9940,13 +9992,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Atualizar - - + + Recomputes the current active document Recalcula o documento ativo atual @@ -9968,13 +10020,13 @@ the current copy will be lost. StdCmdRevert - + Revert Reverter - - + + Reverts to the saved version of this file Reverterá para a versão salva do ficheiro @@ -9982,13 +10034,13 @@ the current copy will be lost. StdCmdSave - + &Save &Guardar - - + + Save the active document Guardar o Documento Ativo @@ -9996,13 +10048,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Guardar Todos - - + + Save all opened document Save all opened document @@ -10010,13 +10062,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Guardar &Como ... - - + + Save the active document under a new file name Guardar o Documento Ativo sob um Novo Nome de Ficheiro @@ -10024,13 +10076,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Guardar uma &Cópia... - - + + Save a copy of the active document under a new file name Guarda uma cópia do documento ativo com um novo nome @@ -10094,13 +10146,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Selecionar &Tudo - - + + Select all Selecionar Tudo @@ -10332,13 +10384,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Transformar... - - + + Transform the geometry of selected objects Transformar a geometria dos objetos selecionados @@ -10346,13 +10398,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Transformar - - + + Transform the selected object in the 3d view Transformar o objeto selecionado na vista 3D @@ -10416,13 +10468,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Anular - - + + Undo exactly one action Desfazer só uma ação @@ -11222,7 +11274,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11233,7 +11285,7 @@ Are you sure you want to continue? - + Object dependencies Dependências do objeto @@ -11322,12 +11374,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Dependências do objeto - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -11345,7 +11397,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11359,17 +11411,17 @@ Ainda deseja prosseguir? Std_Revert - + Revert document Reverter o documento - + This will discard all the changes since last file save. Todas as alterações desde a última gravação do ficheiro serão descartadas. - + Do you want to continue? Deseja continuar? @@ -12032,23 +12084,15 @@ after FreeCAD launches Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12522,77 +12566,72 @@ exibirá a janela de abertura Manage preference packs - + Small (%1px) Pequeno (%1px) - + Medium (%1px) Médio (%1px) - + Large (%1px) Grande (%1px) - + Extra large (%1px) Extra grande (%1px) - + Custom (%1px) Personalizado (%1px) - + Combo View Visualização Combinada - + TreeView and PropertyView TreeView and PropertyView - - Both - Ambos - - - + Preference Pack Name Preference Pack Name - + Tags Tags - + Apply Aplicar - + Apply the %1 preference pack Apply the %1 preference pack - + Choose a FreeCAD config file to import Choose a FreeCAD config file to import - + File exists File exists - + A preference pack with that name already exists. Overwrite? A preference pack with that name already exists. Overwrite? @@ -12900,4 +12939,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_ro.ts b/src/Gui/Language/FreeCAD_ro.ts index b3c4d0b7eb..eb7918820b 100644 --- a/src/Gui/Language/FreeCAD_ro.ts +++ b/src/Gui/Language/FreeCAD_ro.ts @@ -122,12 +122,12 @@ Import - + Delete Ştergeţi - + Paste expressions Lipește expresii @@ -188,9 +188,9 @@ Amplasare + - Transform Transformare @@ -220,7 +220,7 @@ Activează/dezactivează selectabilitatea - + Edit image Editare imagine @@ -615,14 +615,6 @@ while doing a left or right click and move the mouse up or down &Revocare - - Gui::ControlSingleton - - - Task panel - Panoul de activitate - - Gui::DAG::Model @@ -1826,72 +1818,92 @@ acelasi timp. Va fi declanșat cel cu cea mai mare prioritate. Nume macrocomandă: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macrocomenzi ale utilizatorului - + System macros Macrocomenzi ale sistemului - + Execute Execută - + Close Închide - + Create Creează - + Delete Ştergeţi - + Edit Editare - + Rename Redenumire - + Duplicate Duplicat - + Launch a guide on how to set up a macro in a custom global toolbar. Lansați un ghid despre cum să configurați un macro într-o bară de instrumente globală personalizată. - + Toolbar Bară de instrumente - + Open Addon Manager where macros created by the community and other addons can be downloaded. Deschide Managerul de Suplimente, de unde macrourile create de comunitate și alte suplimente pot fi descărcate. - + Download Descarca - + User macros location: Locaţia macro-urilor utilizatorului: @@ -1899,72 +1911,72 @@ acelasi timp. Va fi declanșat cel cu cea mai mare prioritate. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macro-uri - + Read-only Numai în citire - + Macro file Fişier macro - + Enter a file name, please: Vă rugăm să introduceți un nume de fişier: - - - + + + Existing file Fișier existent - + '%1'. This file already exists. '%1'. Acest fişier există deja. - + Cannot create file Imposibil de creat fisierul - + Creation of file '%1' failed. Crearea fisierului '%1' nu a reusit. - + Delete macro Ştergeţi macrocomanda - + Do you really want to delete the macro '%1'? Într-adevăr doriţi să ştergeţi macrocomanda '%1'? - + Do not show again Nu mai arăta din nou - + Guided Walkthrough Walkthrough ghidat - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1975,76 +1987,76 @@ Notă: modificările dvs. vor fi aplicate la schimbarea următoare a bancului de - + Walkthrough, dialog 1 of 2 Walkthrough, dialog 1 din 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instrucțiuni walkthrough: Completați câmpurile lipsă (opțional) apoi apăsați „Adăugați”, apoi Închide - + Walkthrough, dialog 1 of 1 Walkthrough, dialog 1 din 1 - + Walkthrough, dialog 2 of 2 Walkthrough, dialog 2 din 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instrucțiuni walkthrough: Apasă butonul săgeată dreapta (->), apoi Închide. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instrucțiuni walkthrough: Apasă butonul Nou, apoi săgeată dreapta (->), apoi Închide. - + Renaming Macro File Redenumirea fişierului Macro - - + + Enter new name: Introduceţi numele nou: - - + + '%1' already exists. '%1' există deja. - + Rename Failed Redenumirea a eșuat - + Failed to rename to '%1'. Perhaps a file permission error? Nu a reușit să redenumească ca '%1'. Probabil că este o eroare de permisiuni atașate fișierului? - + Duplicate Macro Fațete duplicate - + Duplicate Failed Dublare eșuată - + Failed to duplicate to '%1'. Perhaps a file permission error? Nu a reușit să redenumească ca '%1'. Probabil că este o eroare de permisiuni atașate fișierului? @@ -4311,6 +4323,16 @@ spațiul orizontal disponibil în consola Python Save history Salvează istoric + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4425,16 +4447,41 @@ Valoare mai mare se ușurează să aleagă lucruri, dar poate face imposibilă s - + Top: Partea de sus: - + Middle: Mijloc: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4457,7 +4504,7 @@ Valoare mai mare se ușurează să aleagă lucruri, dar poate face imposibilă s - + Bottom: Partea de jos: @@ -4487,17 +4534,17 @@ Valoare mai mare se ușurează să aleagă lucruri, dar poate face imposibilă s Culoarea de fundal pentru containerele active în vizualizarea arborescentă - + Central: Central: - + Midway: La mijloc: - + End: Sfârșit: @@ -5473,22 +5520,10 @@ selectate inițial, înainte de a deschide acest dialog Gui::DockWnd::ComboView - + Combo View Vizualizare combo - - - - Model - Model - - - - - Tasks - Sarcini - Gui::DockWnd::PropertyDockView @@ -5715,12 +5750,12 @@ selectate inițial, înainte de a deschide acest dialog Gui::EditorView - + Modified file Fişier modificat - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5728,54 +5763,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Document nesalvat - + The document has been modified. Do you want to save your changes? Documentul a fost modificat. Doriți să salvați modificările? - + FreeCAD macro FreeCAD macro - + Export PDF Exportă PDF - + PDF file Fişier PDF - + untitled[*] fără titlu [*] - + - Editor - Editor - + %1 chars removed %1 caractere eliminate - + %1 chars added %1 caractere adăugate - + Formatted Formatat @@ -5926,39 +5961,46 @@ Doriți să salvați modificările? Graphviz nu a reusit sa creeze un fisier de imagine - + PNG format Formatul PNG - + Bitmap format Bitmap format - + GIF format Formatul GIF - + JPG format JPG format - + SVG format Formatul SVG - - + + PDF format PDF format - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportă graficul @@ -6119,7 +6161,7 @@ Doriți să salvați modificările? Gui::MainWindow - + Dimension Dimensiune @@ -6129,62 +6171,62 @@ Doriți să salvați modificările? Gata - + Help addon needed! Ajutor supliment necesar! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Sistemul de ajutor al %1 este acum gestionat de suplimentul "Ajutor". Acesta poate fi instalat cu uşurinţă prin Addons Manager - + Open Addon Manager Deschide Addon Manager - + Close All Inchide toate - - - + + + Toggles this toolbar Activează/dezactivează această bară de instrumente - - - + + + Toggles this dockable window Activează/dezactivează această fereastră fixabilă - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Document nesalvat - + The exported object contains external link. Please save the documentat least once before exporting. Obiectul exportat conține o legătură externă. Vă rugăm să salvați documentul cel puțin o dată înainte de al exporta. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Pentru face legăturile la obiecte externe, documentul trebuie salvat cel puțin o dată. @@ -6556,117 +6598,117 @@ Cum doresti sa continuam? Gui::PythonConsole - + System exit Ieşire din sistem - + The application is still running. Do you want to exit without saving your data? Aplicaţia încă rulează. Doriți să ieşiți fără a salva datele dumneavoastră? - - - - + + + + Python console Consola Python - + Unhandled PyCXX exception. Excepție netratată PyCXX. - + Unhandled FreeCAD exception. Excepție netratată FreeCAD. - + Unhandled std C++ exception. Exceptie std C++ netratata. - + Unhandled unknown C++ exception. Excepție netratată necunoscută C++. - + &Copy &Copie - + &Copy command &Copiaţi comanda - + &Copy history &Copiaţi istoria - + Save history as... Salvaţi istoria ca... - + Save history Salvează istoric - + Saves Python history across %1 sessions Salvează istoricul Python de-a lungul a %1 sesiuni - + &Paste &Lipire - + Select All Selectaţi tot - + Clear console Curata consola - + Insert file name... Introduceţi nume fişier... - + Word wrap Distribuie cuvintele - + Save History Salvează Istoria - + Macro Files Fişier macro - + Insert file name Inserați nume fişier - + All Files Toate fișierele @@ -6751,22 +6793,22 @@ Doriți să ieşiți fără a salva datele dumneavoastră? Gui::SearchBar - + Previous Anterior - + Next Următoarea - + Case sensitive Sensibil la majuscule - + Whole words Cuvinte întregi @@ -6881,17 +6923,17 @@ Doriţi să specificaţi un alt director? Gui::TaskCSysDragger - + Increments Increments - + Translation Increment: Increment la translație: - + Rotation Increment: Increment la rotație: @@ -7716,37 +7758,42 @@ Doriţi să specificaţi un alt director? QDockWidget - + Tree view Vizualizare arborescentă - + + Tasks + Sarcini + + + Property view Vizualizare proprietăţi - + Selection view Vizualizare selecție - - Combo View - Vizualizare combo + + Model + Model - + DAG View Vizualizare DAG - + Report view Vezualizare raport - + Python console Consola Python @@ -7822,12 +7869,12 @@ Doriţi să specificaţi un alt director? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7868,71 +7915,71 @@ Doriţi să specificaţi un alt director? Exportă fişier - + Printing... Imprimare... - + Exporting PDF... Export PDF... - - + + Unsaved document Document nesalvat - + The exported object contains external link. Please save the documentat least once before exporting. Obiectul exportat conține o legătură externă. Vă rugăm să salvați documentul cel puțin o dată înainte de al exporta. - - + + Delete failed Ștergerea a eșuat - + Dependency error Eroare de dependență - + Copy selected Copiază selecția - + Copy active document Copiază documentul activ - + Copy all documents Copiază toate documentele - + Paste Paste - + Expression error Eroare de expresie - + Failed to parse some of the expressions. Please check the Report View for more details. Eșec în analiza unora dintre expresii. Verificați fereastra Raport pentru mai multe detalii. - + Failed to paste expressions Nu s-a reușit lipirea expresiilor @@ -8348,7 +8395,7 @@ Alege 'Nu' pentru a derula doar în documentul activ. Alege 'Abandonează' pentru a abandona - + Save Macro Salvaţi macrocomanda @@ -8415,7 +8462,7 @@ Please open a browser window and type in: http://localhost:%1. Imposibil de deschis browser-ul de sistem. - + Options... Opţiuni... @@ -8462,42 +8509,42 @@ Please open a browser window and type in: http://localhost:%1. Doriţi să închideţi această fereastră de dialog? - + Do you want to save your changes to document '%1' before closing? Vreți să salvați modificările dvs înainte de a închide? - + Do you want to save your changes to document before closing? Doriți să salvați modificările documentului înainte de închidere? - + If you don't save, your changes will be lost. Dacă nu salvați, schimbările vor fi pierdute. - + Apply answer to all Aplică răspunsul tuturor - + %1 Document(s) not saved %1 Document(e) nu au fost salvate - + Some documents could not be saved. Do you want to cancel closing? Unele documente nu au putut fi salvate. Doriți să renunțați la închiderea documentelor? - + Delete macro Ştergeţi macrocomanda - + Not allowed to delete system-wide macros Nu sunteți autorizat să ștergeți macro comenzile sistèmului @@ -8517,12 +8564,17 @@ Please open a browser window and type in: http://localhost:%1. %1 nu este vid, suprimați totuși conținutul ? - + Translation: Traducere: - + + Translation XY: + Translation XY: + + + Rotation: Rotaţie: @@ -8732,7 +8784,7 @@ copia curentă va fi pierdută. Schimbă imaginea... - + Color Gradient Gradient de culoare @@ -8838,13 +8890,13 @@ copia curentă va fi pierdută. StdCmdAlignment - + Alignment... Aliniament... - - + + Align the selected objects Aliniati obiectele selectate @@ -8922,13 +8974,13 @@ copia curentă va fi pierdută. StdCmdCopy - + C&opy C&opiază - - + + Copy operation Operația de copiere @@ -8936,13 +8988,13 @@ copia curentă va fi pierdută. StdCmdCut - + &Cut &Taiere - - + + Cut out Decupare @@ -8950,13 +9002,13 @@ copia curentă va fi pierdută. StdCmdDelete - + &Delete Ş&tergeţi - - + + Deletes the selected objects Ştergeţi obiectele selectate @@ -9104,13 +9156,13 @@ copia curentă va fi pierdută. StdCmdDuplicateSelection - + Duplicate selection Cloneaza selectia - - + + Put duplicates of the selected objects to the active document Cloneaza obiectele selectate in documentul curent @@ -9118,17 +9170,17 @@ copia curentă va fi pierdută. StdCmdEdit - + Toggle &Edit mode Activează/dezactivează modul de &editare - + Toggles the selected object's edit mode Activează/dezactivează modul de editare pentru obiectul selectat - + Activates or Deactivates the selected object's edit mode Activează sau Dezactivează modul Editare al obiectelor selectate @@ -9160,13 +9212,13 @@ copia curentă va fi pierdută. StdCmdExpression - + Expression actions Acțiunile expresiei - - + + Actions that apply to expressions Acțiuni care se aplică expresiilor @@ -9658,19 +9710,19 @@ copia curentă va fi pierdută. StdCmdNew - + &New &Nou - - + + Create a new empty document Creaţi un nou document gol - + Unnamed Nedenumit @@ -9753,13 +9805,13 @@ copia curentă va fi pierdută. StdCmdPaste - + &Paste &Lipire - - + + Paste operation Operația de lipire @@ -9767,13 +9819,13 @@ copia curentă va fi pierdută. StdCmdPlacement - + Placement... Amplasare... - - + + Place the selected objects Poziționați obiectele selectate @@ -9781,13 +9833,13 @@ copia curentă va fi pierdută. StdCmdPrint - + &Print... Im&primare... - - + + Print the document Imprimaţi documentul @@ -9795,13 +9847,13 @@ copia curentă va fi pierdută. StdCmdPrintPdf - + &Export PDF... &Exportaţi PDF... - - + + Export the document as PDF Exportaţi documentul ca PDF @@ -9809,17 +9861,17 @@ copia curentă va fi pierdută. StdCmdPrintPreview - + &Print preview... Examinare înaintea im&primarii... - + Print the document Imprimaţi documentul - + Print preview Examinare înaintea imprimarii @@ -9827,13 +9879,13 @@ copia curentă va fi pierdută. StdCmdProjectInfo - + Project i&nformation... &Informații de proiect... - - + + Show details of the currently active project Afişează detaliile proiectului activ @@ -9841,13 +9893,13 @@ copia curentă va fi pierdută. StdCmdProjectUtil - + Project utility... Utilitar pentru proiect... - - + + Utility to extract or create project files Utilitar pentru extragerea sau crearea fisierelor din proiect @@ -9869,13 +9921,13 @@ copia curentă va fi pierdută. StdCmdQuit - + E&xit &Ieşire - - + + Quits the application Închide aplicaţia @@ -9925,13 +9977,13 @@ copia curentă va fi pierdută. StdCmdRedo - + &Redo &Refacere - - + + Redoes a previously undone action Reface o acţiune anulată anterior @@ -9939,13 +9991,13 @@ copia curentă va fi pierdută. StdCmdRefresh - + &Refresh &Reîmprospătare - - + + Recomputes the current active document Recalculează documentul activ @@ -9967,13 +10019,13 @@ copia curentă va fi pierdută. StdCmdRevert - + Revert Revenire/restabilire - - + + Reverts to the saved version of this file Revine la versiunea salvat acest fişier @@ -9981,13 +10033,13 @@ copia curentă va fi pierdută. StdCmdSave - + &Save &Salvaţi - - + + Save the active document Salvaţi documentul activ @@ -9995,13 +10047,13 @@ copia curentă va fi pierdută. StdCmdSaveAll - + Save All Salvează tot - - + + Save all opened document Salvează toate documentele deschise @@ -10009,13 +10061,13 @@ copia curentă va fi pierdută. StdCmdSaveAs - + Save &As... S&alvaţi ca... - - + + Save the active document under a new file name Salvare documentul activ sub un nou nume de fişier @@ -10023,13 +10075,13 @@ copia curentă va fi pierdută. StdCmdSaveCopy - + Save a &Copy... Salvaţi o & copie... - - + + Save a copy of the active document under a new file name Salvați o copie a documentului activ sub un nou nume de fişier @@ -10093,13 +10145,13 @@ copia curentă va fi pierdută. StdCmdSelectAll - + Select &All Select&aţi tot - - + + Select all Selectează tot @@ -10331,13 +10383,13 @@ copia curentă va fi pierdută. StdCmdTransform - + Transform... Transformare... - - + + Transform the geometry of selected objects Transforma geometria obiectelor selectate @@ -10345,13 +10397,13 @@ copia curentă va fi pierdută. StdCmdTransformManip - + Transform Transformare - - + + Transform the selected object in the 3d view Transforma obiectul selectat în vizualizarea 3D @@ -10415,13 +10467,13 @@ copia curentă va fi pierdută. StdCmdUndo - + &Undo &Anulare - - + + Undo exactly one action Anuleaza o actiune @@ -11221,7 +11273,7 @@ copia curentă va fi pierdută. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11232,7 +11284,7 @@ Sunteți sigur că doriți să continuați? - + Object dependencies Dependențe obiect @@ -11321,12 +11373,12 @@ Sunteți sigur că doriți să continuați? Std_DuplicateSelection - + Object dependencies Dependențe obiect - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Pentru face legăturile la obiecte externe, documentul trebuie salvat cel puțin o dată. @@ -11344,7 +11396,7 @@ Doriți să salvați documentul acum? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11358,17 +11410,17 @@ Doriți în continuare să continuați? Std_Revert - + Revert document Recuperează versiunea documentului - + This will discard all the changes since last file save. Această operațiune distruge toate modificările de la ultima salvare. - + Do you want to continue? Doriţi să continuaţi? @@ -12031,23 +12083,15 @@ după lansarea FreeCAD Încarcă o imagine - - Gui::InteractiveScale - - - Enter desired distance between the points - Introduceți distanța dorită între puncte - - NaviCubeDraggableCmd - + Movable navigation cube Cub de navigare mobil - + Drag and place NaviCube Trage și plasează NaviCube @@ -12522,77 +12566,72 @@ ecranul de pornire Gestionează pachetele de preferințe - + Small (%1px) Mic (%1px) - + Medium (%1px) Mediu (%1px) - + Large (%1px) Mare (%1px) - + Extra large (%1px) Foarte mare (%1px) - + Custom (%1px) Personalizat (%1px) - + Combo View Vizualizare combo - + TreeView and PropertyView VedereArbore și VedereProprietăți - - Both - Ambele - - - + Preference Pack Name Numele pachetului de preferințe - + Tags Etichete - + Apply Aplică - + Apply the %1 preference pack Aplică pachetul de preferințe %1 - + Choose a FreeCAD config file to import Alegeți un fișier de configurare FreeCAD pentru import - + File exists Fișier existent - + A preference pack with that name already exists. Overwrite? Un pachet de preferințe cu același nume există deja. Doriți sa îl suprascrieți? @@ -12900,4 +12939,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_ru.ts b/src/Gui/Language/FreeCAD_ru.ts index 7715ac9d60..5aa8c21aa6 100644 --- a/src/Gui/Language/FreeCAD_ru.ts +++ b/src/Gui/Language/FreeCAD_ru.ts @@ -122,12 +122,12 @@ Импорт - + Delete Удалить - + Paste expressions Вставить выражения @@ -188,9 +188,9 @@ Расположение + - Transform Переместить @@ -220,7 +220,7 @@ Откл/вкл выделяемость - + Edit image Редактировать изображение @@ -423,7 +423,7 @@ Transform - Преобразовать + Переместить @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down Отмена - - Gui::ControlSingleton - - - Task panel - Панель задач - - Gui::DAG::Model @@ -1390,7 +1382,7 @@ same time. The one with the highest priority will be triggered. none - отсутствует + Отсутствует @@ -1823,72 +1815,92 @@ same time. The one with the highest priority will be triggered. Имя макроса: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Пользовательские макросы - + System macros Системные макросы - + Execute Выполнить - + Close Закрыть - + Create Создать - + Delete Удалить - + Edit Редактировать - + Rename Переименовать - + Duplicate Дублировать - + Launch a guide on how to set up a macro in a custom global toolbar. Запустите руководство по настройке макроса на главной панели инструментов. - + Toolbar Панель инструментов - + Open Addon Manager where macros created by the community and other addons can be downloaded. Откройте Менеджер Дополнений, где можно загрузить созданные сообществом и другие макросы. - + Download Скачать - + User macros location: Расположение пользовательских макросов: @@ -1896,72 +1908,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Макрос - + Read-only Только для чтения - + Macro file Файл макроса - + Enter a file name, please: Введите имя файла, пожалуйста: - - - + + + Existing file Существующий файл - + '%1'. This file already exists. '%1'. Этот файл уже существует. - + Cannot create file Не удается создать файл - + Creation of file '%1' failed. Не удалось создать файл '%1'. - + Delete macro Удалить макрос - + Do you really want to delete the macro '%1'? Вы действительно хотите удалить макрос '%1' ? - + Do not show again Не показывать снова - + Guided Walkthrough Интерактивный тур - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1972,77 +1984,77 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Пошаговое руководство, диалоговое окно 1 из 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Пошаговые инструкции: заполните пропущенные поля (необязательно), затем нажмите «Добавить», затем «Закрыть» - + Walkthrough, dialog 1 of 1 Пошаговое руководство, диалоговое окно 1 из 1 - + Walkthrough, dialog 2 of 2 Пошаговое руководство, диалоговое окно 2 из 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Пошаговые инструкции: Нажмите на кнопку со стрелкой вправо (->), затем закройте. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Пошаговые инструкции: Нажмите новый, затем на кнопку со стрелкой вправо (->), затем закройте. - + Renaming Macro File Переименование файла макроса - - + + Enter new name: Введите новое имя: - - + + '%1' already exists. '%1' уже существует. - + Rename Failed Не удалось переименовать - + Failed to rename to '%1'. Perhaps a file permission error? Не удалось переименовать в '%1'. Возможно ошибка прав доступа к файлу? - + Duplicate Macro Дублировать макрос - + Duplicate Failed Не удалось дублировать - + Failed to duplicate to '%1'. Perhaps a file permission error? Не удалось дублировать в '%1'. @@ -2741,7 +2753,7 @@ Specify another directory, please. Help - Помощь + Справка @@ -3822,7 +3834,7 @@ You can also use the form: John Doe <john@doe.com> Macro - Макрокоманда + Макрос @@ -4304,6 +4316,16 @@ horizontal space in Python console Save history Сохранить историю + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4418,16 +4440,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Верх: - + Middle: В центре: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4450,7 +4497,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Снизу: @@ -4480,17 +4527,17 @@ Larger value eases to pick things, but can make small features impossible to sel Цвет фона для активных контейнеров в виде дерева - + Central: Центральное: - + Midway: Полпути (Середина): - + End: Конец: @@ -5468,22 +5515,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Комбо панель - - - - Model - Модель - - - - - Tasks - Задачи - Gui::DockWnd::PropertyDockView @@ -5710,12 +5745,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Измененный файл - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5724,53 +5759,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Документ не сохранён - + The document has been modified. Do you want to save your changes? Этот документ был изменен. Вы хотите сохранить изменения? - + FreeCAD macro FreeCAD макрос - + Export PDF Экспортировать в PDF - + PDF file Файл PDF - + untitled[*] безымянный[*] - + - Editor -Редактор - + %1 chars removed Удалено символов: %1 - + %1 chars added %1 символов добавлено - + Formatted Форматировано @@ -5921,39 +5956,46 @@ Do you want to save your changes? GraphViz не удалось создать файл изображения - + PNG format Формат PNG - + Bitmap format Формат bitmap - + GIF format Формат GIF - + JPG format Формат JPG - + SVG format Формат SVG - - + + PDF format Формат PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Экспорт графа @@ -6114,7 +6156,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Размер @@ -6124,62 +6166,62 @@ Do you want to save your changes? Готово - + Help addon needed! Необходимо дополнение помощи! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Справочная система %1 теперь управляется дополнением «Справка». Его можно легко установить через Менеджер дополнений - + Open Addon Manager Открыть менеджер дополнений - + Close All Закрыть все - - - + + + Toggles this toolbar Переключение этой панели инструментов - - - + + + Toggles this dockable window Спрятать/показать это встраиваемое окно - + WARNING: This is a development version. ПРЕДУПРЕЖДЕНИЕ: Это версия для разработчиков. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Пожалуйста, не применяйте это в рабочей среде. - - + + Unsaved document Документ не сохранён - + The exported object contains external link. Please save the documentat least once before exporting. Экспортированный объект содержит внешнюю ссылку. Пожалуйста, сохраните документ хотя бы один раз перед экспортом. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Для ссылки на внешние объекты документ необходимо сохранить хотя бы один раз. @@ -6550,116 +6592,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit Выход из системы - + The application is still running. Do you want to exit without saving your data? Приложение по-прежнему выполняется. Вы хотите выйти без сохранения ваших данных? - - - - + + + + Python console Консоль Python - + Unhandled PyCXX exception. Необработанное исключение PyCXX. - + Unhandled FreeCAD exception. Необработанное исключение FreeCAD. - + Unhandled std C++ exception. Необработанное исключение, std C++. - + Unhandled unknown C++ exception. Необработанное неизвестное исключение C++. - + &Copy Копировать - + &Copy command Скопировать команду - + &Copy history Скопировать историю - + Save history as... Сохранить историю как... - + Save history Сохранить историю - + Saves Python history across %1 sessions Сохраняет историю Python в %1 сеансах - + &Paste Вставить - + Select All Выделить всё - + Clear console Очистить консоль - + Insert file name... Вставить путь к файлу... - + Word wrap Переносить строки - + Save History Сохранить историю - + Macro Files Файлы макросов - + Insert file name Вставить путь к файлу в консоль Python - + All Files Все файлы @@ -6700,7 +6742,7 @@ Do you want to exit without saving your data? none - Отсутствует + отсутствует @@ -6744,22 +6786,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Предыдущий - + Next Следующий - + Case sensitive Учитывать регистр - + Whole words Слова целиком @@ -6875,17 +6917,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Приращения - + Translation Increment: Приращение перемещения: - + Rotation Increment: Приращение поворота: @@ -7711,37 +7753,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Иерархия документа - + + Tasks + Задачи + + + Property view Окно свойств - + Selection view Просмотр выделения - - Combo View - Комбо панель + + Model + Модель - + DAG View DAG Вид - + Report view Просмотр отчёта - + Python console Консоль Python @@ -7817,12 +7864,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. В вашей системе используется OpenGL %1.%2. FreeCAD требует OpenGL 2.0 или выше. Пожалуйста, обновите ваш графический драйвер и/или карту при необходимости. - + Invalid OpenGL Version Недопустимая версия OpenGL @@ -7863,71 +7910,71 @@ Do you want to specify another directory? Экспорт файла - + Printing... Печать... - + Exporting PDF... Экспорт PDF... - - + + Unsaved document Документ не сохранён - + The exported object contains external link. Please save the documentat least once before exporting. Экспортированный объект содержит внешнюю ссылку. Пожалуйста, сохраните документ хотя бы один раз перед экспортом. - - + + Delete failed Удаление не удалось - + Dependency error Ошибка зависимости - + Copy selected Копировать выбранное - + Copy active document Копировать активный документ - + Copy all documents Копировать все документы - + Paste Вставить - + Expression error Ошибка выражения - + Failed to parse some of the expressions. Please check the Report View for more details. Не удалось проанализировать некоторые выражения. Дополнительные сведения смотрите в журнале. - + Failed to paste expressions Не удалось вставить выражения @@ -8342,7 +8389,7 @@ Choose 'Abort' to abort Выберите 'Отмена' для отмены - + Save Macro Сохранить Макрос @@ -8409,7 +8456,7 @@ Please open a browser window and type in: http://localhost:%1. Не удается открыть ваш системный браузере. - + Options... Параметры... @@ -8456,42 +8503,42 @@ Please open a browser window and type in: http://localhost:%1. Вы хотите закрыть этот диалог? - + Do you want to save your changes to document '%1' before closing? Сохранить изменения перед закрытием документа '%1'? - + Do you want to save your changes to document before closing? Сохранить изменения перед закрытием документа ''? - + If you don't save, your changes will be lost. Если вы не сохраните, ваши изменения будут потеряны. - + Apply answer to all Применить ответ ко всем - + %1 Document(s) not saved %1 Документ(ы) не сохранены - + Some documents could not be saved. Do you want to cancel closing? Некоторые документы не удалось сохранить. Вы хотите отменить закрытие? - + Delete macro Удалить макрос - + Not allowed to delete system-wide macros Не разрешается удалять системные макросы @@ -8511,12 +8558,17 @@ Please open a browser window and type in: http://localhost:%1. %1 не пуст, удалить его содержимое тоже? - + Translation: Перемещение: - + + Translation XY: + Translation XY: + + + Rotation: Вращение: @@ -8726,7 +8778,7 @@ the current copy will be lost. Изменить изображение... - + Color Gradient Цветной градиент @@ -8832,13 +8884,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Выравнивание... - - + + Align the selected objects Утилита выравнивания объектов @@ -8916,13 +8968,13 @@ the current copy will be lost. StdCmdCopy - + C&opy Копировать - - + + Copy operation Операция копирования @@ -8930,13 +8982,13 @@ the current copy will be lost. StdCmdCut - + &Cut Вырезать - - + + Cut out Вырезать @@ -8944,13 +8996,13 @@ the current copy will be lost. StdCmdDelete - + &Delete Удалить - - + + Deletes the selected objects Удаляет выбранные объекты @@ -9098,13 +9150,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Дублировать выбранное - - + + Put duplicates of the selected objects to the active document Вложить дубликаты выбранных объектов в активный документ @@ -9112,17 +9164,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Редактировать / закончить редактирование - + Toggles the selected object's edit mode Редактировать выделенные объекты / закончить редактирование - + Activates or Deactivates the selected object's edit mode Активирует или деактивирует режим редактирования выбранного объекта @@ -9154,13 +9206,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Действия с выражением - - + + Actions that apply to expressions Действия, применимые к выражениям @@ -9652,19 +9704,19 @@ the current copy will be lost. StdCmdNew - + &New &Создать - - + + Create a new empty document Создать новый пустой документ - + Unnamed Безымянный @@ -9747,13 +9799,13 @@ the current copy will be lost. StdCmdPaste - + &Paste Вставить - - + + Paste operation Операция вставки @@ -9761,13 +9813,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Расположение... - - + + Place the selected objects Расположить выбранные объекты @@ -9775,13 +9827,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Печать... - - + + Print the document Печать документа @@ -9789,13 +9841,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... Экспортировать в PDF... - - + + Export the document as PDF Экспорт документа в формат PDF @@ -9803,17 +9855,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Предварительный просмотр... - + Print the document Печать документа - + Print preview Предварительный просмотр @@ -9821,13 +9873,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Информация о про&екте... - - + + Show details of the currently active project Показать детали текущего активного проекта @@ -9835,13 +9887,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Утилита распаковки файла проекта... - - + + Utility to extract or create project files Утилита для разборки и сборки файлов .FCStd @@ -9863,13 +9915,13 @@ the current copy will be lost. StdCmdQuit - + E&xit В&ыход - - + + Quits the application Выйти из приложения @@ -9919,13 +9971,13 @@ the current copy will be lost. StdCmdRedo - + &Redo Вернуть - - + + Redoes a previously undone action Повторить последнее отмененное действие @@ -9933,13 +9985,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh Обновить - - + + Recomputes the current active document Пересчитывает активный документ @@ -9961,13 +10013,13 @@ the current copy will be lost. StdCmdRevert - + Revert Вернуться - - + + Reverts to the saved version of this file Возвращает к сохраненной версии этого файла @@ -9975,13 +10027,13 @@ the current copy will be lost. StdCmdSave - + &Save Сохранить - - + + Save the active document Сохранить активный документ @@ -9989,13 +10041,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Сохранить все - - + + Save all opened document Сохранить все открытые документы @@ -10003,13 +10055,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Сохранить как... - - + + Save the active document under a new file name Сохранить текущий документ под новым именем @@ -10017,13 +10069,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Сохранить &копию... - - + + Save a copy of the active document under a new file name Сохранить копию активного документа под новым именем файла @@ -10087,13 +10139,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Выбрать всё - - + + Select all Выделить всё @@ -10325,13 +10377,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Преобразовать... - - + + Transform the geometry of selected objects Преобразование геометрии выделенных объектов @@ -10339,13 +10391,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform - Переместить + Преобразовать - - + + Transform the selected object in the 3d view Преобразование выделенного объекта в трёхмерном виде @@ -10409,13 +10461,13 @@ the current copy will be lost. StdCmdUndo - + &Undo Отменить - - + + Undo exactly one action Отменить только одно действие @@ -11215,7 +11267,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11226,7 +11278,7 @@ Are you sure you want to continue? - + Object dependencies Зависимости объектов @@ -11315,12 +11367,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Зависимости объектов - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Для ссылки на внешние объекты документ необходимо сохранить хотя бы один раз. @@ -11338,7 +11390,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11352,17 +11404,17 @@ Do you still want to proceed? Std_Revert - + Revert document Возврат состояния документа - + This will discard all the changes since last file save. Это отменит все изменения, внесенные с момента последнего сохранения фала. - + Do you want to continue? Хотите ли вы продолжить? @@ -11490,7 +11542,7 @@ Do you still want to proceed? Help - Справка + Помощь @@ -11500,7 +11552,7 @@ Do you still want to proceed? Macro - Макрос + Макрокоманда @@ -12024,23 +12076,15 @@ after FreeCAD launches Загружает изображение - - Gui::InteractiveScale - - - Enter desired distance between the points - Введите желаемое расстояние между точками - - NaviCubeDraggableCmd - + Movable navigation cube Подвижный навигационный куб - + Drag and place NaviCube Перетащить и поместить в NaviCube @@ -12514,77 +12558,72 @@ display the splash screen Управление наборами настроек - + Small (%1px) Малый (%1px) - + Medium (%1px) Средний (%1пикс.) - + Large (%1px) Крупный (%1пикс.) - + Extra large (%1px) Очень крупный (%1пикс.) - + Custom (%1px) Пользовательский (%1пикс.) - + Combo View Комбо панель - + TreeView and PropertyView Иерархия документа и свойства разделено (две панели) - - Both - Оба варианта одновременно (три панели) - - - + Preference Pack Name Название пакета настроек - + Tags Метки - + Apply Применить - + Apply the %1 preference pack Применить %1 набор настроек - + Choose a FreeCAD config file to import Выберите файл конфигурации FreeCAD для импорта - + File exists Файл существует - + A preference pack with that name already exists. Overwrite? Пакет настроек с таким именем уже существует. Перезаписать? @@ -12891,4 +12930,18 @@ You can now use Theme to get a full customization of the interface. Все фильтры выбора очищены + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_sl.ts b/src/Gui/Language/FreeCAD_sl.ts index a32e0cc61c..27630d2562 100644 --- a/src/Gui/Language/FreeCAD_sl.ts +++ b/src/Gui/Language/FreeCAD_sl.ts @@ -122,12 +122,12 @@ Uvozi - + Delete Izbriši - + Paste expressions Prilepi izraze @@ -188,9 +188,9 @@ Postavitev + - Transform Preoblikuj @@ -220,7 +220,7 @@ Preklopi izbirnost - + Edit image Uredi sliko @@ -413,7 +413,7 @@ Default - Privzeto + Privzeti @@ -582,7 +582,7 @@ Press left mouse button - Pritisnite levi miškin gumb + Pritisnite levo miškino tipko @@ -615,14 +615,6 @@ kliknete na levo oz. desno tipko in premikate miško gor oz. dol &Prekliči - - Gui::ControlSingleton - - - Task panel - Podokno nalog - - Gui::DAG::Model @@ -897,7 +889,7 @@ kliknete na levo oz. desno tipko in premikate miško gor oz. dol Angle - Kót + Kot @@ -1393,7 +1385,7 @@ tisti z višjo prednostjo. none - brez + nobeden @@ -1826,72 +1818,92 @@ tisti z višjo prednostjo. Ime makra: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Uporabniški makri - + System macros Sistemski makri - + Execute Izvedi - + Close Zapri - + Create Ustvari - + Delete Izbriši - + Edit Uredi - + Rename Preimenuj - + Duplicate Podvoji - + Launch a guide on how to set up a macro in a custom global toolbar. Zaženi vodnik nastavljanje makra v obči orodni vrstici po meri. - + Toolbar Orodna vrstica - + Open Addon Manager where macros created by the community and other addons can be downloaded. Odpri Upravljalnik dodatkov, ko je mogoče prenesti s spleta makre in dodatke, ki so jih ustvarili uporabniki. - + Download Prenesi - + User macros location: Mesto uporabniških makrov: @@ -1899,71 +1911,71 @@ tisti z višjo prednostjo. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makri - + Read-only Samo za branje - + Macro file Datoteka z makrom - + Enter a file name, please: Vnesite ime datoteke: - - - + + + Existing file Obstoječa datoteka - + '%1'. This file already exists. '%1'. Ta datoteka že obstaja. - + Cannot create file Datoteke ni mogoče ustvariti - + Creation of file '%1' failed. Ustvarjanje datoteke '%1' ni uspelo. - + Delete macro Izbriši makro - + Do you really want to delete the macro '%1'? Ali res želite izbrisati makro '%1'? - + Do not show again Ne prikaži več - + Guided Walkthrough Vodič - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Opomba: spremembe bodo uveljavljene pri naslednjem preklopu med delovnimi okolji - + Walkthrough, dialog 1 of 2 Vodič, 1. pogovorno okno od 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Navodila vodiča: Izpolnite manjkajoča polja (po izbiri), kliknite Dodaj in nato Zapri - + Walkthrough, dialog 1 of 1 Vodič, 1. pogovorno okno od 1 - + Walkthrough, dialog 2 of 2 Vodič, 2. pogovorno okno od 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Navodila vodiča: Kliknite gumb s puščico v desno (->), nato Zapri. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Navodila vodiča: Kliknite Nov, nato gumb s puščico v desno (->) in na koncu Zapri. - + Renaming Macro File Preimenovanje datoteke Macro - - + + Enter new name: Vnesite novo ime: - - + + '%1' already exists. '%1' že obstaja. - + Rename Failed Preimenovanje ni uspelo - + Failed to rename to '%1'. Perhaps a file permission error? Preimenovanje v '%1' ni uspelo. Mogoče je napaka pri dostopu do datoteke? - + Duplicate Macro Podvoji Makro - + Duplicate Failed Podvajanje spodletelo - + Failed to duplicate to '%1'. Perhaps a file permission error? Podvajanje v '%1' ni uspelo. @@ -4027,7 +4039,7 @@ Lahko uporabite tudi obliko: Neznanec <ne@znanec.com> Default - Privzeti + Privzeto @@ -4315,6 +4327,16 @@ ukazni mizi, se prelomijo Save history Shrani zgodovino + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4429,16 +4451,41 @@ Pri večjih vrednostih je izbiranje lažje, vendar pa je lahko zaradi tega izbir - + Top: Zgoraj: - + Middle: Sredina: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4461,7 +4508,7 @@ Pri večjih vrednostih je izbiranje lažje, vendar pa je lahko zaradi tega izbir - + Bottom: Spodaj: @@ -4491,17 +4538,17 @@ Pri večjih vrednostih je izbiranje lažje, vendar pa je lahko zaradi tega izbir Barva ozadja pri dejavnih vsebnikih v drevesnem prikazu - + Central: Središčno: - + Midway: Na polovici: - + End: Konec: @@ -5477,22 +5524,10 @@ izbrani pred odprtjem tega pogovrnega okna Gui::DockWnd::ComboView - + Combo View Sestavljen pogled - - - - Model - Model - - - - - Tasks - Opravila - Gui::DockWnd::PropertyDockView @@ -5719,12 +5754,12 @@ izbrani pred odprtjem tega pogovrnega okna Gui::EditorView - + Modified file Spremenjena datoteka - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5733,54 +5768,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Neshranjen dokument - + The document has been modified. Do you want to save your changes? Dokument je bil spremenjen. Ali želite shraniti spremembe? - + FreeCAD macro FreeCADov makro - + Export PDF Izvoz PDF - + PDF file Datoteka PDF - + untitled[*] nepoimenovan [*] - + - Editor - Urejevalnik - + %1 chars removed %1 znakov odstranjenih - + %1 chars added %1 znakov dodanih - + Formatted Oblikovano @@ -5931,39 +5966,46 @@ Ali želite shraniti spremembe? Graphvizu ni uspelo ustvariti slikovne datoteke - + PNG format PNG zapis - + Bitmap format Zapis točkovne slike - + GIF format GIF zapis - + JPG format JPG zapis - + SVG format SVG zapis - - + + PDF format PDF zapis - - + + + Graphviz format + Graphviz format + + + + + Export graph Izvozi graf @@ -6124,7 +6166,7 @@ Ali želite shraniti spremembe? Gui::MainWindow - + Dimension Mera @@ -6134,62 +6176,62 @@ Ali želite shraniti spremembe? Pripravljen - + Help addon needed! Potreben je dodatek za pomoč! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager %1 sistem pomoči sedaj upravlja dodatek "Pomoč". Zlahka ga lahko namestite z upravljalnikom dodatkov - + Open Addon Manager Odpri upravljalnik dodatkov - + Close All Zapri vse - - - + + + Toggles this toolbar Preklopi to orodno vrstico - - - + + + Toggles this dockable window Preklopi to usidrivo okno - + WARNING: This is a development version. OPOZORILO: To je razvojna različica. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Neshranjen dokument - + The exported object contains external link. Please save the documentat least once before exporting. Izvoženi predmet vsebuje zunanje povezave. Pred izvažanjem shranite dokument vsaj enkrat. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Za povezovanje na zunanje predmete mora biti dokument shranjen vsaj enkrat. @@ -6561,117 +6603,117 @@ Kako želite nadaljevati? Gui::PythonConsole - + System exit Izhod iz sistema - + The application is still running. Do you want to exit without saving your data? Program se še vedno izvaja. Ali želite končati ne da bi shranili podatke? - - - - + + + + Python console Pythonova ukazna miza - + Unhandled PyCXX exception. Neobravnavana izjema PyCXX. - + Unhandled FreeCAD exception. Neobravnavana izjema FreeCAD. - + Unhandled std C++ exception. Neobravnavana izjema std C++. - + Unhandled unknown C++ exception. Neobravnavana izjema C++. - + &Copy &Kopiraj - + &Copy command &Kopiraj ukaz - + &Copy history &Kopiraj zgodovino - + Save history as... Shrani zgodovino kot... - + Save history Shrani zgodovino - + Saves Python history across %1 sessions Shrani %1 sej Pythonove zgodovine - + &Paste &Prilepi - + Select All Izberi vse - + Clear console Počisti ukazno mizo - + Insert file name... Vstavite ime datoteke ... - + Word wrap Prelom besed - + Save History Shrani zgodovino - + Macro Files Datoteke makra - + Insert file name Vstavite ime datoteke - + All Files Vse datoteke @@ -6712,7 +6754,7 @@ Ali želite končati ne da bi shranili podatke? none - nobeden + brez @@ -6756,22 +6798,22 @@ Ali želite končati ne da bi shranili podatke? Gui::SearchBar - + Previous Predhodno - + Next Naprej - + Case sensitive Razlikovanje velikosti črk - + Whole words Cele besede @@ -6874,7 +6916,7 @@ Ali želite navesti drugo mapo? Angle - Kot + Kót @@ -6882,23 +6924,23 @@ Ali želite navesti drugo mapo? Position - Position + Položaj Gui::TaskCSysDragger - + Increments Koraki - + Translation Increment: Korak vzporednega premikanja: - + Rotation Increment: Korak sukanja: @@ -7081,7 +7123,7 @@ Ali želite navesti drugo mapo? Press left mouse button - Pritisnite levo miškino tipko + Pritisnite levi miškin gumb @@ -7723,37 +7765,42 @@ Ali želite navesti drugo mapo? QDockWidget - + Tree view Drevesni prikaz - + + Tasks + Opravila + + + Property view Pogled z lastnostmi - + Selection view Pogled na izbor - - Combo View - Sestavljen pogled + + Model + Model - + DAG View DAG pogled - + Report view Poročevalni pogled - + Python console Pythonova ukazna miza @@ -7829,12 +7876,12 @@ Ali želite navesti drugo mapo? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7875,71 +7922,71 @@ Ali želite navesti drugo mapo? Izvozi datoteko - + Printing... Tiskanje ... - + Exporting PDF... Izvažanje PDF... - - + + Unsaved document Neshranjen dokument - + The exported object contains external link. Please save the documentat least once before exporting. Izvoženi predmet vsebuje zunanje povezave. Pred izvažanjem shranite dokument vsaj enkrat. - - + + Delete failed Brisanje spodletelo - + Dependency error Napaka odvisnosti - + Copy selected Kopiraj izbrano - + Copy active document Kopiraj dejavni dokument - + Copy all documents Kopiraj vse dokumente - + Paste Prilepi - + Expression error Napaka izraza - + Failed to parse some of the expressions. Please check the Report View for more details. Nekaterh izrazov ni bilo mogoče razčleniti. Za več podrobnosti poglejte Poročevalni pogled. - + Failed to paste expressions Izraza ni bilo mogoče prilepiti @@ -8356,7 +8403,7 @@ Izberite "Ne" za povrnitev le v dejavnem dokumentu. Izberite "Prekini" za prekinitev - + Save Macro Shrani makro @@ -8425,7 +8472,7 @@ Odprite brskalnik in vtipkajte: http://localhost:%1. Sistemskega brskalnika ni mogoče odpreti. - + Options... Možnosti ... @@ -8472,42 +8519,42 @@ Odprite brskalnik in vtipkajte: http://localhost:%1. Ali želite zapreti to pogovorno okno? - + Do you want to save your changes to document '%1' before closing? Ali želite pred zapiranjem shraniti spremembe dokumenta '%1'? - + Do you want to save your changes to document before closing? Ali želite pred zapiranjem shraniti spremembe dokumenta? - + If you don't save, your changes will be lost. Če ne shranite, bodo spremembe izgubljene. - + Apply answer to all Uporabi odgovor za vse - + %1 Document(s) not saved %1 Dokumenti niso shranjeni - + Some documents could not be saved. Do you want to cancel closing? Določenih dokumentov se ni dalo zapreti. Ali želite preklicati zapiranje? - + Delete macro Izbriši makro - + Not allowed to delete system-wide macros Sistemskih makrov ni dovoljeno izbrisati @@ -8527,12 +8574,17 @@ Odprite brskalnik in vtipkajte: http://localhost:%1. %1 ni prazna, brisanje tudi njene vsebine? - + Translation: Vzporedni premik: - + + Translation XY: + Translation XY: + + + Rotation: Sukanje: @@ -8742,7 +8794,7 @@ bodo izgubljene. Zamenjaj sliko ... - + Color Gradient Barvni preliv @@ -8848,13 +8900,13 @@ bodo izgubljene. StdCmdAlignment - + Alignment... Poravnava … - - + + Align the selected objects Poravnaj izbrane predmete @@ -8932,13 +8984,13 @@ bodo izgubljene. StdCmdCopy - + C&opy K&opiraj - - + + Copy operation Kopiranje @@ -8946,13 +8998,13 @@ bodo izgubljene. StdCmdCut - + &Cut I&zreži - - + + Cut out Izreži @@ -8960,13 +9012,13 @@ bodo izgubljene. StdCmdDelete - + &Delete Iz&briši - - + + Deletes the selected objects Izbriše izbrane predmete @@ -9114,13 +9166,13 @@ bodo izgubljene. StdCmdDuplicateSelection - + Duplicate selection Podvoji izbor - - + + Put duplicates of the selected objects to the active document Vstavi dvojnike izbranih predmetov v dejavni dokument @@ -9128,17 +9180,17 @@ bodo izgubljene. StdCmdEdit - + Toggle &Edit mode Pr&eklopi način urejanja - + Toggles the selected object's edit mode Preklopi način urejanja izbranih predmetov - + Activates or Deactivates the selected object's edit mode Omogoči ali onemogoči urejevalni način izbranih predmetov @@ -9170,13 +9222,13 @@ bodo izgubljene. StdCmdExpression - + Expression actions Dejanja izrazov - - + + Actions that apply to expressions Dejanja, ki veljajo za izraze @@ -9668,19 +9720,19 @@ bodo izgubljene. StdCmdNew - + &New &Nov - - + + Create a new empty document Ustvari nov, prazen dokument - + Unnamed Neimenovan @@ -9763,13 +9815,13 @@ bodo izgubljene. StdCmdPaste - + &Paste &Prilepi - - + + Paste operation Lepljenje @@ -9777,13 +9829,13 @@ bodo izgubljene. StdCmdPlacement - + Placement... Postavitev … - - + + Place the selected objects Postavi izbrane predmete @@ -9791,13 +9843,13 @@ bodo izgubljene. StdCmdPrint - + &Print... &Natisni ... - - + + Print the document Natisni dokument @@ -9805,13 +9857,13 @@ bodo izgubljene. StdCmdPrintPdf - + &Export PDF... Izvozi &PDF … - - + + Export the document as PDF Izvozi dokument kot PDF @@ -9819,17 +9871,17 @@ bodo izgubljene. StdCmdPrintPreview - + &Print preview... P&redogled tiskanja … - + Print the document Natisni dokument - + Print preview Predogled tiskanja @@ -9837,13 +9889,13 @@ bodo izgubljene. StdCmdProjectInfo - + Project i&nformation... Po&datki o projektu … - - + + Show details of the currently active project Prikaži podrobnosti trenutno dejavnega projekta @@ -9851,13 +9903,13 @@ bodo izgubljene. StdCmdProjectUtil - + Project utility... Pripomočki za projekte … - - + + Utility to extract or create project files Orodje za izvlečenje ali ustvarjanje datotek projektov @@ -9879,13 +9931,13 @@ bodo izgubljene. StdCmdQuit - + E&xit Iz&hod - - + + Quits the application Zapre program @@ -9935,13 +9987,13 @@ bodo izgubljene. StdCmdRedo - + &Redo &Uveljavi - - + + Redoes a previously undone action Uveljavi prej razveljavljeno dejanje @@ -9949,13 +10001,13 @@ bodo izgubljene. StdCmdRefresh - + &Refresh &Osveži - - + + Recomputes the current active document Ponovno izračuna trenutno dejavni dokument @@ -9977,13 +10029,13 @@ bodo izgubljene. StdCmdRevert - + Revert Povrni - - + + Reverts to the saved version of this file Povrnitev na shranjeno različico te datoteke @@ -9991,13 +10043,13 @@ bodo izgubljene. StdCmdSave - + &Save &Shrani - - + + Save the active document Shrani dejavni dokument @@ -10005,13 +10057,13 @@ bodo izgubljene. StdCmdSaveAll - + Save All Shrani vse - - + + Save all opened document Shrani vse odprte dokumente @@ -10019,13 +10071,13 @@ bodo izgubljene. StdCmdSaveAs - + Save &As... Shr&ani kot … - - + + Save the active document under a new file name Shrani dejavni dokument z novim imenom @@ -10033,13 +10085,13 @@ bodo izgubljene. StdCmdSaveCopy - + Save a &Copy... Shrani &kopijo … - - + + Save a copy of the active document under a new file name Shrani kopijo dejavnega dokumenta z novim imenom datoteke @@ -10103,13 +10155,13 @@ bodo izgubljene. StdCmdSelectAll - + Select &All Izberi &vse - - + + Select all Izberi vse @@ -10341,13 +10393,13 @@ bodo izgubljene. StdCmdTransform - + Transform... Preoblikuj … - - + + Transform the geometry of selected objects Preoblikuj geometrijo izbranih predmetov @@ -10355,13 +10407,13 @@ bodo izgubljene. StdCmdTransformManip - + Transform Preoblikuj - - + + Transform the selected object in the 3d view Preoblikuj izbrani predmet v prostorskem pogledu @@ -10425,13 +10477,13 @@ bodo izgubljene. StdCmdUndo - + &Undo &Razveljavi - - + + Undo exactly one action Razveljavi natanko eno dejanje @@ -11231,7 +11283,7 @@ bodo izgubljene. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11242,7 +11294,7 @@ Ali želite vseeno nadaljevati? - + Object dependencies Odvisnosti predmetov @@ -11331,12 +11383,12 @@ Ali želite vseeno nadaljevati? Std_DuplicateSelection - + Object dependencies Odvisnosti predmetov - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Za povezovanje na zunanje predmete mora biti dokument shranjen vsaj enkrat. @@ -11354,7 +11406,7 @@ Ali želite shraniti dokument zdaj? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11368,17 +11420,17 @@ Ali želite vseeno nadaljevati? Std_Revert - + Revert document Povrni dokument - + This will discard all the changes since last file save. To bo zavrglo vse spremembe od zadnjega shranjevanja datoteke. - + Do you want to continue? Ali želite nadaljevati? @@ -12041,23 +12093,15 @@ ob zagodu FreeCAD-a Naloži sliko - - Gui::InteractiveScale - - - Enter desired distance between the points - Vnesite željen odmik med točkama - - NaviCubeDraggableCmd - + Movable navigation cube Premična krmilna kocka - + Drag and place NaviCube Povleci in umesti krmilno kocko @@ -12532,77 +12576,72 @@ bo pozdravno okno prikazano Upravljanje s prenastavitvenimi svežnji - + Small (%1px) Majhno (%1px) - + Medium (%1px) Srednje (%1px) - + Large (%1px) Veliko (%1px) - + Extra large (%1px) Zelo velike (%1px) - + Custom (%1px) Po meri (%1px) - + Combo View Sestavljen pogled - + TreeView and PropertyView Drevesni prikaz in Lastnostni prikaz - - Both - Oboje - - - + Preference Pack Name Ime prednastavitvenega svežnja - + Tags Značke - + Apply Uveljavi - + Apply the %1 preference pack Uveljavi prednastavitveni sveženj %1 - + Choose a FreeCAD config file to import Za uvažanje izberite FreeCADovo nastavitveno datoteko - + File exists Datoteka obtsaja - + A preference pack with that name already exists. Overwrite? Prednastavitveni sveženj s tem imenom že obstaja. Ali ga želite pripisati? @@ -12910,4 +12949,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_sr-CS.ts b/src/Gui/Language/FreeCAD_sr-CS.ts index b392627080..c772b5a63b 100644 --- a/src/Gui/Language/FreeCAD_sr-CS.ts +++ b/src/Gui/Language/FreeCAD_sr-CS.ts @@ -122,12 +122,12 @@ Uvezi - + Delete Obriši - + Paste expressions Nalepi izraz @@ -188,9 +188,9 @@ Položaj + - Transform Pomeri @@ -220,7 +220,7 @@ Uključi/isklljuči mogućnost izbora - + Edit image Uredi sliku @@ -615,14 +615,6 @@ dok pritiskš levim ili desnim tasterom i pomeraš miša gore ili dole&Otkaži - - Gui::ControlSingleton - - - Task panel - Panel zadataka - - Gui::DAG::Model @@ -1826,72 +1818,92 @@ same time. The one with the highest priority will be triggered. Ime makro-a: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Korisnički Makro-i - + System macros Sistemski makro-i - + Execute Izvrši - + Close Zatvori - + Create Napravi - + Delete Obriši - + Edit Uredi - + Rename Preimenuj - + Duplicate Dupliraj - + Launch a guide on how to set up a macro in a custom global toolbar. Pokrenite vodič o tome kako da podesite makro na glavnoj paleti sa alatkama. - + Toolbar Paleta sa alatima - + Open Addon Manager where macros created by the community and other addons can be downloaded. Otvori Menadžer dodataka gde se pored makro-a koje je kreirala zajednica mogu preuzeti i drugi dodaci. - + Download Preuzmi - + User macros location: Lokacija korisničkih makroa: @@ -1899,71 +1911,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makro-i - + Read-only Samo za čitanje - + Macro file Makro datoteka - + Enter a file name, please: Unesi naziv datoteke: - - - + + + Existing file Postojeća datoteka - + '%1'. This file already exists. '%1' Ova datoteka već postoji. - + Cannot create file Ne mogu napraviti datoteku - + Creation of file '%1' failed. Pravljenje datoteke '%1' neuspešno. - + Delete macro Obriši makro - + Do you really want to delete the macro '%1'? Da li stvarno želiš obrisati makro '%1'? - + Do not show again Ne pokazuj ponovo - + Guided Walkthrough Interaktivna tura - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Napomena: Promene će biti primenjene kada sledeći put promeniš radno okružen - + Walkthrough, dialog 1 of 2 Interaktivni vodič, dijalog 1 od 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Interaktivni vodič: Popuni polja koja nedostaju (neobavezno), zatim klikni na Dodaj, a zatim na Zatvori - + Walkthrough, dialog 1 of 1 Interaktivni vodič, dijalog 1 od 1 - + Walkthrough, dialog 2 of 2 Interaktivni vodič, dijalog 2 od 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Uputstva: Kliknite na dugme sa strelicom nadesno (->), a zatim Zatvori. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Uputstva: Kliknite na Novi, zatim na dugme sa strelicom nadesno (->), a zatim na Zatvori. - + Renaming Macro File Preimenovanje datoteke makro-a - - + + Enter new name: Unesi novo ime: - - + + '%1' already exists. '%1' već postoji. - + Rename Failed Preimenovanje nije uspelo - + Failed to rename to '%1'. Perhaps a file permission error? Nije uspelo preimenovanje u „%1“. Možda je greška u nivou pristupu datoteki? - + Duplicate Macro Dupliraj makro - + Duplicate Failed Dupliranje nije uspelo - + Failed to duplicate to '%1'. Perhaps a file permission error? Nije uspelo dupliranje u „%1“. @@ -4313,6 +4325,16 @@ horizontalni prostor u Python konzoli Save history Sačuvaj istoriju + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4427,16 +4449,41 @@ Veća vrednost olakšava odabir stvari, ali može onemogućiti odabir malih stva - + Top: Gornja: - + Middle: Srednja: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4459,7 +4506,7 @@ Veća vrednost olakšava odabir stvari, ali može onemogućiti odabir malih stva - + Bottom: Donja: @@ -4489,17 +4536,17 @@ Veća vrednost olakšava odabir stvari, ali može onemogućiti odabir malih stva Boja pozadine za aktivne kontejnere u stablu dokumenta - + Central: Central: - + Midway: Midway: - + End: End: @@ -5477,22 +5524,10 @@ izabranim objektima pre otvaranja ovog dijaloga Gui::DockWnd::ComboView - + Combo View Kombinovani panel - - - - Model - Model - - - - - Tasks - Zadaci - Gui::DockWnd::PropertyDockView @@ -5719,12 +5754,12 @@ izabranim objektima pre otvaranja ovog dijaloga Gui::EditorView - + Modified file Izmenjena datoteka - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5733,54 +5768,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Nesačuvan dokument - + The document has been modified. Do you want to save your changes? Dokument je izmenjen. Da li želiš da sačuvaš promene? - + FreeCAD macro FreeCAD makro - + Export PDF Izvezi PDF - + PDF file PDF datoteka - + untitled[*] bez naslova[*] - + - Editor -Uređivač - + %1 chars removed %1 znakova uklonjeno - + %1 chars added %1 znakova dodano - + Formatted Formatirano @@ -5931,39 +5966,46 @@ Da li želiš da sačuvaš promene? Graphviz nije uspeo da napravi datoteku slike - + PNG format PNG format - + Bitmap format Bitmap format - + GIF format GIF format - + JPG format JPG format - + SVG format SVG format - - + + PDF format PDF format - - + + + Graphviz format + Graphviz format + + + + + Export graph Izvezi grafikon @@ -6124,7 +6166,7 @@ Da li želiš da sačuvaš promene? Gui::MainWindow - + Dimension Kota @@ -6134,62 +6176,62 @@ Da li želiš da sačuvaš promene? Spreman - + Help addon needed! Potreban je dodatak Pomoć! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Sistemom pomoći %1 sada upravlja dodatak „Pomoć“. Može se lako instalirati preko Menadžera dodataka - + Open Addon Manager Otvori menadžer dodataka - + Close All Zatvori sve - - - + + + Toggles this toolbar Uključuje/isključuje ovu paletu alata - - - + + + Toggles this dockable window Toggles this dockable window - + WARNING: This is a development version. UPOZORENJE: Ovo je razvojna verzija. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Ovo je razvojna verzija i nemojte je koristiti za profesionalnu upotrebu. - - + + Unsaved document Nesačuvan dokument - + The exported object contains external link. Please save the documentat least once before exporting. Izvezeni objekat sadrži spoljnu vezu. Sačuvaj dokument bar jednom pre nego što ga izvezeš. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Da bi se povezali sa spoljnim objektima, dokument mora biti sačuvan najmanje jednom. @@ -6561,117 +6603,117 @@ Kako želiš da nastaviš? Gui::PythonConsole - + System exit Izlaz iz sistema - + The application is still running. Do you want to exit without saving your data? Aplikacija još uvek radi. Da li želiš izaći bez čuvanja podataka? - - - - + + + + Python console Python konzola - + Unhandled PyCXX exception. Neobrađeni PyCXX izuzetak. - + Unhandled FreeCAD exception. Neobrađeni FreeCAD izuzetak. - + Unhandled std C++ exception. Neobrađeni C++ izuzetak. - + Unhandled unknown C++ exception. Neobrađeni nepoznati C++ izuzetak. - + &Copy &Kopiraj - + &Copy command &Kopiraj komanda - + &Copy history &Kopiraj istoriju - + Save history as... Sačuvaj istoriju kao... - + Save history Sačuvaj istoriju - + Saves Python history across %1 sessions Saves Python history across %1 sessions - + &Paste &Nalepi - + Select All Izaberi sve - + Clear console Očisti konzolu - + Insert file name... Unesi ime datoteke... - + Word wrap Prelom reda - + Save History Sačuvaj Istoriju - + Macro Files Makro datoteke - + Insert file name Unesi ime datoteke - + All Files Sve datoteke @@ -6756,22 +6798,22 @@ Da li želiš izaći bez čuvanja podataka? Gui::SearchBar - + Previous Prethodni - + Next Sledeće - + Case sensitive Razlikovanje malih i velikih slova - + Whole words Cele reči @@ -6888,17 +6930,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Korak - + Translation Increment: Korak translacije: - + Rotation Increment: Korak rotacije: @@ -7723,37 +7765,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Stablo dokumenta - + + Tasks + Zadaci + + + Property view Osobine prikaza - + Selection view Pregledač izbora - - Combo View - Kombinovani panel + + Model + Model - + DAG View DAG View - + Report view Pregledač objava - + Python console Python konzola @@ -7829,12 +7876,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Ovaj sistem koristi OpenGL %1.%2. FreeCAD zahteva OpenGL 2.0 ili noviji. Nadogradite svoj grafički drajver i/ili karticu po potrebi. - + Invalid OpenGL Version Pogrešna OpenGL verzija @@ -7875,71 +7922,71 @@ Do you want to specify another directory? Izvezi datoteku - + Printing... Štampanje... - + Exporting PDF... Izvozim PDF... - - + + Unsaved document Nesačuvan dokument - + The exported object contains external link. Please save the documentat least once before exporting. Izvezeni objekat sadrži spoljnu vezu. Sačuvaj dokument bar jednom pre nego što ga izvezeš. - - + + Delete failed Brisanje nije uspelo - + Dependency error Greška međuzavisnosti - + Copy selected Kopiraj izabrano - + Copy active document Kopiraj aktivni dokument - + Copy all documents Kopiraj sve dokumente - + Paste Nalepi - + Expression error Greška izraza - + Failed to parse some of the expressions. Please check the Report View for more details. Raščlanjivanje nekih izraza nije uspelo. Pogledaj izveštaj za više detalja. - + Failed to paste expressions Nalepljivanje izraza nije uspelo @@ -8085,7 +8132,7 @@ Da li želiš da nastaviš? New integer item - New integer item + Nova brojčana stavka @@ -8101,13 +8148,13 @@ Da li želiš da nastaviš? New unsigned item - New unsigned item + Nova neoznačena stavka New float item - New float item + Nova stavka sa pokretnim zarezom @@ -8356,7 +8403,7 @@ Izaberi „Ne“ da bi vratio samo u aktivnom dokumentu. Izaberi „Prekini“ da bi prekinuo - + Save Macro Sačuvaj Makro @@ -8425,7 +8472,7 @@ Otvori pregledač i ukucaj: http://localhost:%1. Ne mogu otvoriti vaš sistemski pregledač. - + Options... Opcije... @@ -8472,42 +8519,42 @@ Otvori pregledač i ukucaj: http://localhost:%1. Do you want to close this dialog? - + Do you want to save your changes to document '%1' before closing? Da li želiš da sačuvaš promene u dokument '%1' pre zatvaranja? - + Do you want to save your changes to document before closing? Da li želiš da snimiš promene u dokumentu pre zatvaranja? - + If you don't save, your changes will be lost. Ako ne sačuvaš, promene će biti izgubljene. - + Apply answer to all Primeni odgovor na sve - + %1 Document(s) not saved %1 Dokument(i) nisu snimljeni - + Some documents could not be saved. Do you want to cancel closing? Neki dokumenti nisu mogli biti snimljeni. Da li želiš da otkažeš zatvaranje? - + Delete macro Obriši makro - + Not allowed to delete system-wide macros Nije dozvoljeno brisanje sistemskih makro-a @@ -8527,12 +8574,17 @@ Otvori pregledač i ukucaj: http://localhost:%1. %1 nije prazan, želiš li izbrisati i njegov sadržaj? - + Translation: Translacija: - + + Translation XY: + Translation XY: + + + Rotation: Rotacija: @@ -8742,7 +8794,7 @@ the current copy will be lost. Promeni sliku... - + Color Gradient Prelivanje boja @@ -8848,13 +8900,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Poravnaj... - - + + Align the selected objects Poravnaj odabrane objekte @@ -8932,13 +8984,13 @@ the current copy will be lost. StdCmdCopy - + C&opy Kopiraj - - + + Copy operation Operacija kopiranja @@ -8946,13 +8998,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Iseci - - + + Cut out Izreži @@ -8960,13 +9012,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Obriši - - + + Deletes the selected objects Obriše izabrane objekte @@ -9114,13 +9166,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Dupliraj izbor - - + + Put duplicates of the selected objects to the active document Stavi duplikate izabranih objekata u aktivni dokument @@ -9128,17 +9180,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Uključi/isključi režim uređivanja - + Toggles the selected object's edit mode Uključuje/isključuje režim uređivanja izabranog objekta - + Activates or Deactivates the selected object's edit mode Aktivira ili deaktivira režim uređivanja izabranog objekta @@ -9170,13 +9222,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Radnje sa izrazima - - + + Actions that apply to expressions Radnje koje se primenjuju na izraze @@ -9668,19 +9720,19 @@ the current copy will be lost. StdCmdNew - + &New &Novi - - + + Create a new empty document Napravi novi prazan dokument - + Unnamed Bez imena @@ -9763,13 +9815,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Nalepi - - + + Paste operation Nalepi operaciju @@ -9777,13 +9829,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Položaj... - - + + Place the selected objects Postavi odabrane objekte @@ -9791,13 +9843,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Štampa... - - + + Print the document Štampaj dokument @@ -9805,13 +9857,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Izvezi PDF... - - + + Export the document as PDF Izvezi dokument kao PDF @@ -9819,17 +9871,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Prikaz štampe... - + Print the document Štampaj dokument - + Print preview Prikaz štampe @@ -9837,13 +9889,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Informacije o projektu... - - + + Show details of the currently active project Prikaži detalje trenutno aktivnog projekta @@ -9851,13 +9903,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Korisne opcije projekta... - - + + Utility to extract or create project files Alatka za izdvajanje ili kreiranje projektnih datoteka @@ -9879,13 +9931,13 @@ the current copy will be lost. StdCmdQuit - + E&xit Izađi - - + + Quits the application Zatvara aplikaciju @@ -9935,13 +9987,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Uradi ponovo - - + + Redoes a previously undone action Ponavlja radnju koja je prethodno poništena @@ -9949,13 +10001,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Osveži - - + + Recomputes the current active document Ponovo izračunava trenutno aktivni dokument @@ -9977,13 +10029,13 @@ the current copy will be lost. StdCmdRevert - + Revert Vrati se - - + + Reverts to the saved version of this file Vraća se na sačuvanu verziju ove datoteke @@ -9991,13 +10043,13 @@ the current copy will be lost. StdCmdSave - + &Save &Sačuvaj - - + + Save the active document Sačuvaj aktivni dokument @@ -10005,13 +10057,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Sačuvaj sve - - + + Save all opened document Sačuvaj sve otvorene dokumente @@ -10019,13 +10071,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Sačuvaj kao... - - + + Save the active document under a new file name Sačuvaj aktivni dokument pod novim imenom datoteke @@ -10033,13 +10085,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Sačuvaj kopiju... - - + + Save a copy of the active document under a new file name Sačuvaj kopiju aktivnog dokumenta pod novim imenom datoteke @@ -10103,13 +10155,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Izaberi sve - - + + Select all Izaberi sve @@ -10341,13 +10393,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Pomeri... - - + + Transform the geometry of selected objects Pomeri geometriju izabranih objekata @@ -10355,13 +10407,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Pomeri - - + + Transform the selected object in the 3d view Pomeri izabrani objekat u 3D pogledu @@ -10425,13 +10477,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Poništi - - + + Undo exactly one action Poništi tačno za jedan korak @@ -11231,7 +11283,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11242,7 +11294,7 @@ Da li si siguran da želiš da nastaviš? - + Object dependencies Međuzavisnosti objekata @@ -11331,12 +11383,12 @@ Da li si siguran da želiš da nastaviš? Std_DuplicateSelection - + Object dependencies Međuzavisnosti objekata - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Da bi se povezali sa spoljnim objektima, dokument mora biti sačuvan najmanje jednom. @@ -11354,7 +11406,7 @@ Da li želiš sada da sačuvaš dokument? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11368,17 +11420,17 @@ Da li i dalje želiš da nastaviš? Std_Revert - + Revert document Vrati dokument - + This will discard all the changes since last file save. Ovo će odbaciti sve promene od poslednjeg snimanja datoteke. - + Do you want to continue? Da li želiš da nastaviš? @@ -11809,17 +11861,17 @@ nakon pokretanja FreeCAD-a XY-Plane - XY-Plane + XY ravan XZ-Plane - XZ-Plane + XZ ravan YZ-Plane - YZ-Plane + YZ ravan @@ -11829,7 +11881,7 @@ nakon pokretanja FreeCAD-a Offset: - Offset: + Odmak: @@ -12041,23 +12093,15 @@ nakon pokretanja FreeCAD-a Učitavanje slike - - Gui::InteractiveScale - - - Enter desired distance between the points - Unesi željeno rastojanje između tačaka - - NaviCubeDraggableCmd - + Movable navigation cube Pokretna navigaciona kocka - + Drag and place NaviCube Prevuci i postavi navigacionu kocku @@ -12532,77 +12576,72 @@ prikazati početni ekran Upravljanje paketima podešavanja - + Small (%1px) Mali (%1px) - + Medium (%1px) Srednji (%1px) - + Large (%1px) Veliki (%1px) - + Extra large (%1px) Ekstra veliki (%1px) - + Custom (%1px) Sopstveni (%1px) - + Combo View Kombinovani panel - + TreeView and PropertyView Stablo dokumenta i Osobine prikaza - - Both - Oba - - - + Preference Pack Name Ime paketa podešavanja - + Tags Oznake - + Apply Primeni - + Apply the %1 preference pack Primeniti %1 paket podešavanja - + Choose a FreeCAD config file to import Izaberi FreeCAD konfiguracionu datoteku koju hoćeš uvesti - + File exists Datoteka postoji - + A preference pack with that name already exists. Overwrite? Paket podešavanja sa tim imenom već postoji. Zameni? @@ -12906,4 +12945,18 @@ Sada možete da koristite i Temu za potpuno prilagođavanje interfejsa.Svi filteri izbora su obrisani + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_sr.ts b/src/Gui/Language/FreeCAD_sr.ts index 7a54147c02..b18438f5ce 100644 --- a/src/Gui/Language/FreeCAD_sr.ts +++ b/src/Gui/Language/FreeCAD_sr.ts @@ -122,12 +122,12 @@ Увези - + Delete Обриши - + Paste expressions Налепи израз @@ -188,9 +188,9 @@ Положај + - Transform Помери @@ -220,7 +220,7 @@ Укључи/искључи могућност избора - + Edit image Уреди слику @@ -615,14 +615,6 @@ while doing a left or right click and move the mouse up or down &Откажи - - Gui::ControlSingleton - - - Task panel - Панел задатака - - Gui::DAG::Model @@ -1826,72 +1818,92 @@ same time. The one with the highest priority will be triggered. Име макро-а: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Кориснички макро-и - + System macros Системски макро-и - + Execute Изврши - + Close Затвори - + Create Направи - + Delete Обриши - + Edit Уреди - + Rename Преименуј - + Duplicate Дуплирај - + Launch a guide on how to set up a macro in a custom global toolbar. Покрени водич о томе како да подесите макро на главној палети са алаткама. - + Toolbar Палета са алатима - + Open Addon Manager where macros created by the community and other addons can be downloaded. Отвори Менаџер додатака где се поред макро-а које је креирала заједница могу преузети и други додаци. - + Download Преузми - + User macros location: Локација корисничких макро-а: @@ -1899,71 +1911,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Макро-и - + Read-only Само за читање - + Macro file Макро датотека - + Enter a file name, please: Унеси назив датотеке: - - - + + + Existing file Постојећа датотека - + '%1'. This file already exists. '%1' Ова датотека већ постоји. - + Cannot create file Не могу направити датотеку - + Creation of file '%1' failed. Прављење датотеке '%1' неуcпешно. - + Delete macro Обриши макро - + Do you really want to delete the macro '%1'? Да ли стварно желиш обрисати макро '%1'? - + Do not show again Не показуј поново - + Guided Walkthrough Интерактивна тура - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Интерактивни водич, дијалог 1 од 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Интерактивни водич: Попуни поља која недостају (необавезно), затим кликни на Додај, а затим на Затвори - + Walkthrough, dialog 1 of 1 Интерактивни водич, дијалог 1 од 1 - + Walkthrough, dialog 2 of 2 Интерактивни водич, дијалог 2 од 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Упутства: Кликни на дугме са стрелицом надесно (->), а затим Затвори. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Упутства: Кликни на Нови, затим на дугме са стрелицом надесно (->), а затим на Затвори. - + Renaming Macro File Преименовање датотеке макро-а - - + + Enter new name: Унеси ново име: - - + + '%1' already exists. '%1' већ постоји. - + Rename Failed Преименовање није успело - + Failed to rename to '%1'. Perhaps a file permission error? Није успело преименовање у „%1“. Можда је грешка у нивоу приступу датотеки? - + Duplicate Macro Дуплирај макро - + Duplicate Failed Дуплирање није успело - + Failed to duplicate to '%1'. Perhaps a file permission error? Није успело дуплирање у „%1“. @@ -4313,6 +4325,16 @@ horizontal space in Python console Save history Сачувај историју + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4427,16 +4449,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Горња: - + Middle: Средња: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4459,7 +4506,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Доња: @@ -4489,17 +4536,17 @@ Larger value eases to pick things, but can make small features impossible to sel Боја позадине за активне контејнере у стаблу документа - + Central: Central: - + Midway: Midway: - + End: End: @@ -5477,22 +5524,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Комбиновани панел - - - - Model - Модел - - - - - Tasks - Задаци - Gui::DockWnd::PropertyDockView @@ -5719,12 +5754,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Измењена датотека - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5733,54 +5768,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Несачуван документ - + The document has been modified. Do you want to save your changes? Документ је измењен. Да ли желиш да сачуваш промене? - + FreeCAD macro FreeCAD макро - + Export PDF Извези PDF - + PDF file PDF датотека - + untitled[*] без наслова[*] - + - Editor -Уређивач - + %1 chars removed %1 знакова уклоњено - + %1 chars added %1 знакова додано - + Formatted Форматирано @@ -5931,39 +5966,46 @@ Do you want to save your changes? Graphviz није успео да направи датотеку слике - + PNG format PNG формат - + Bitmap format Bitmap формат - + GIF format GIF формат - + JPG format JPG формат - + SVG format SVG формат - - + + PDF format PDF формат - - + + + Graphviz format + Graphviz format + + + + + Export graph Извези графикон @@ -6124,7 +6166,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Кота @@ -6134,62 +6176,62 @@ Do you want to save your changes? Спреман - + Help addon needed! Потребан је додатак Помоћ! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Системом помоћи %1 сада управља додатак „Помоћ“. Може се лако инсталирати преко Менаџера додатака - + Open Addon Manager Отвори менаџер додатака - + Close All Затвори све - - - + + + Toggles this toolbar Укључује/иcкључује ову палету алатки - - - + + + Toggles this dockable window Toggles this dockable window - + WARNING: This is a development version. УПОЗОРЕЊЕ: Ово је развојна верзија. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Ово је развојна верзија и немојте је користити за професионалну употребу. - - + + Unsaved document Несачуван документ - + The exported object contains external link. Please save the documentat least once before exporting. Извезени објекат садржи спољну везу. Сачувај документ бар једном пре него што га извезеш. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Да би се повезао са спољним објектима, документ мора бити сачуван најмање једном. @@ -6561,117 +6603,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Излаз из cиcтема - + The application is still running. Do you want to exit without saving your data? Апликација још увек ради. Да ли желиш изаћи без чувања података? - - - - + + + + Python console Python конзола - + Unhandled PyCXX exception. Необрађени PyCXX изузетак. - + Unhandled FreeCAD exception. Необрађени FreeCAD изузетак. - + Unhandled std C++ exception. Необрађени C++ изузетак. - + Unhandled unknown C++ exception. Необрађени непознати C++ изузетак. - + &Copy &Копирај - + &Copy command &Kopiraj команда - + &Copy history &Kopiraj историју - + Save history as... Сачувај историју као... - + Save history Сачувај историју - + Saves Python history across %1 sessions Saves Python history across %1 sessions - + &Paste &Налепи - + Select All Изабери све - + Clear console Очисти конзолу - + Insert file name... Унеси име датотеке... - + Word wrap Прелом реда - + Save History Сачувај Историју - + Macro Files Макро датотеке - + Insert file name Унеси име датотеке - + All Files Све датотеке @@ -6756,22 +6798,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Претходни - + Next Следеће - + Case sensitive Разликовање малих и великих слова - + Whole words Целе речи @@ -6888,17 +6930,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Корак - + Translation Increment: Корак транслације: - + Rotation Increment: Корак ротације: @@ -7723,37 +7765,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Стабло документа - + + Tasks + Задаци + + + Property view Особине приказа - + Selection view Прегледач избора - - Combo View - Комбиновани панел + + Model + Модел - + DAG View DAG View - + Report view Прегледач објава - + Python console Python конзола @@ -7829,12 +7876,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. Овај систем користи OpenGL %1.%2. FreeCAD захтева OpenGL 2.0 или новији. Надоградите свој графички драјвер и/или картицу по потреби. - + Invalid OpenGL Version Погрешна OpenGL верзија @@ -7875,71 +7922,71 @@ Do you want to specify another directory? Извези датотеку - + Printing... Штампање... - + Exporting PDF... Извозим PDF... - - + + Unsaved document Несачуван документ - + The exported object contains external link. Please save the documentat least once before exporting. Извезени објекат садржи спољну везу. Сачувај документ бар једном пре него што га извезеш. - - + + Delete failed Брисање није успело - + Dependency error Грешка међузависности - + Copy selected Копирај изабрано - + Copy active document Копирај активни документ - + Copy all documents Копирај све документе - + Paste Налепи - + Expression error Грешка израза - + Failed to parse some of the expressions. Please check the Report View for more details. Рашчлањивање неких израза није успело. Погледај извештај за више детаља. - + Failed to paste expressions Налепљивање израза није успело @@ -8085,7 +8132,7 @@ Do you want to continue? New integer item - New integer item + Нова бројчана ставка @@ -8101,13 +8148,13 @@ Do you want to continue? New unsigned item - New unsigned item + Нова неозначена ставка New float item - New float item + Нова ставка са покретним зарезом @@ -8356,7 +8403,7 @@ Choose 'Abort' to abort Изабери „Прекини“ да би прекинуо - + Save Macro Cачувај Макро @@ -8425,7 +8472,7 @@ Please open a browser window and type in: http://localhost:%1. Не могу отворити ваш системски прегледач. - + Options... Опције... @@ -8472,42 +8519,42 @@ Please open a browser window and type in: http://localhost:%1. Да ли желите да затворите овај дијалог? - + Do you want to save your changes to document '%1' before closing? Да ли желиш да сачуваш промене у документу '%1' пре затварања? - + Do you want to save your changes to document before closing? Да ли желиш да снимиш промене у документу пре затварања? - + If you don't save, your changes will be lost. Ако не сачуваш, промене ће бити изгубљене. - + Apply answer to all Примени одговор на све - + %1 Document(s) not saved %1 Документ(и) нису снимљени - + Some documents could not be saved. Do you want to cancel closing? Неки документи нису могли бити снимљени. Да ли желиш да откажеш затварање? - + Delete macro Обриши макро - + Not allowed to delete system-wide macros Није дозвољено брисање системских макро-а @@ -8527,12 +8574,17 @@ Please open a browser window and type in: http://localhost:%1. %1 није празан, желиш ли избрисати и његов садржај? - + Translation: Транслација: - + + Translation XY: + Translation XY: + + + Rotation: Ротација: @@ -8742,7 +8794,7 @@ the current copy will be lost. Промени слику... - + Color Gradient Преливање боја @@ -8848,13 +8900,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Поравнај... - - + + Align the selected objects Поравнај одабране објекте @@ -8932,13 +8984,13 @@ the current copy will be lost. StdCmdCopy - + C&opy Копирај - - + + Copy operation Операција копирања @@ -8946,13 +8998,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Исеци - - + + Cut out Изрежи @@ -8960,13 +9012,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Обриши - - + + Deletes the selected objects Брише изабране објекте @@ -9114,13 +9166,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Дуплирани избор - - + + Put duplicates of the selected objects to the active document Cтави дупликате одабраних објеката у активни документ @@ -9128,17 +9180,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Укључи/искључи режим уређивања - + Toggles the selected object's edit mode Укључује/искључује режим уређивања изабраног објекта - + Activates or Deactivates the selected object's edit mode Активира или деактивира режим уређивања изабраног објекта @@ -9170,13 +9222,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Радње са изразима - - + + Actions that apply to expressions Радње које се примењују на изразе @@ -9668,19 +9720,19 @@ the current copy will be lost. StdCmdNew - + &New &Нови - - + + Create a new empty document Направи нови празан документ - + Unnamed Без имена @@ -9763,13 +9815,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Налепи - - + + Paste operation Налепи операцију @@ -9777,13 +9829,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Положај... - - + + Place the selected objects Постави изабране објекте @@ -9791,13 +9843,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Штампа... - - + + Print the document Штампај документ @@ -9805,13 +9857,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Извези PDF... - - + + Export the document as PDF Извези документ као PDF @@ -9819,17 +9871,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Приказ штампе... - + Print the document Штампај документ - + Print preview Приказ штампе @@ -9837,13 +9889,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Информације о пројекту... - - + + Show details of the currently active project Прикажи детаље тренутно активног пројекта @@ -9851,13 +9903,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Корисне опције пројекта... - - + + Utility to extract or create project files Алатка за издвајање или креирање пројектних датотека @@ -9879,13 +9931,13 @@ the current copy will be lost. StdCmdQuit - + E&xit Изађи - - + + Quits the application Затвара апликацију @@ -9935,13 +9987,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Уради поново - - + + Redoes a previously undone action Понавља радњу која је претходно поништена @@ -9949,13 +10001,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Освежи - - + + Recomputes the current active document Поново израчунава тренутно активни документ @@ -9977,13 +10029,13 @@ the current copy will be lost. StdCmdRevert - + Revert Врати се - - + + Reverts to the saved version of this file Враћа се на сачувану верзију ове датотеке @@ -9991,13 +10043,13 @@ the current copy will be lost. StdCmdSave - + &Save &Сачувај - - + + Save the active document Сачувај активни документ @@ -10005,13 +10057,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Сачувај све - - + + Save all opened document Сачувај све отворене документе @@ -10019,13 +10071,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Сачувај &као... - - + + Save the active document under a new file name Сачувај активни документ под новим именом датотеке @@ -10033,13 +10085,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Сачувај копију... - - + + Save a copy of the active document under a new file name Сачувај копију активног документа под новим именом датотеке @@ -10103,13 +10155,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Изабери све - - + + Select all Изабери све @@ -10341,13 +10393,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Помери... - - + + Transform the geometry of selected objects Помери геометрију изабраних објеката @@ -10355,13 +10407,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Помери - - + + Transform the selected object in the 3d view Помери изабрани објекат у 3Д погледу @@ -10425,13 +10477,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Поништи - - + + Undo exactly one action Поништи тачно за један корак @@ -11231,7 +11283,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11242,7 +11294,7 @@ Are you sure you want to continue? - + Object dependencies Међузависности објеката @@ -11331,12 +11383,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Међузависности објеката - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Да би се повезао са спољним објектима, документ мора бити сачуван најмање једном. @@ -11354,7 +11406,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11368,17 +11420,17 @@ Do you still want to proceed? Std_Revert - + Revert document Врати документ - + This will discard all the changes since last file save. Ово ће одбацити све промене од последњег снимања датотеке. - + Do you want to continue? Да ли желиш да наставиш? @@ -11809,17 +11861,17 @@ after FreeCAD launches XY-Plane - XY-Plane + XY раван XZ-Plane - XZ-Plane + XZ раван YZ-Plane - YZ-Plane + YZ раван @@ -11829,7 +11881,7 @@ after FreeCAD launches Offset: - Offset: + Одмак: @@ -12041,23 +12093,15 @@ after FreeCAD launches Учитавање слике - - Gui::InteractiveScale - - - Enter desired distance between the points - Унеси жељено растојање између тачака - - NaviCubeDraggableCmd - + Movable navigation cube Покретна навигациона коцка - + Drag and place NaviCube Превуци и постави навигациону коцку @@ -12532,77 +12576,72 @@ display the splash screen Управљање пакетима подешавања - + Small (%1px) Мали (%1px) - + Medium (%1px) Средњи (%1px) - + Large (%1px) Велики (%1px) - + Extra large (%1px) Екстра велики (%1px) - + Custom (%1px) Сопствени (%1px) - + Combo View Комбиновани панел - + TreeView and PropertyView Стабло документа и Особине приказа - - Both - Оба - - - + Preference Pack Name Име пакета подешавања - + Tags Ознаке - + Apply Примени - + Apply the %1 preference pack Применити %1 пакет подешавања - + Choose a FreeCAD config file to import Изабери FreeCAD конфигурациону датотеку коју хоћеш увести - + File exists Датотека постоји - + A preference pack with that name already exists. Overwrite? Пакет подешавања са тим именом већ постоји. Замени? @@ -12906,4 +12945,18 @@ You can now use Theme to get a full customization of the interface. Сви филтери избора су обрисани + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_sv-SE.ts b/src/Gui/Language/FreeCAD_sv-SE.ts index 1fc437703e..238fff7e98 100644 --- a/src/Gui/Language/FreeCAD_sv-SE.ts +++ b/src/Gui/Language/FreeCAD_sv-SE.ts @@ -122,12 +122,12 @@ Importera - + Delete Radera - + Paste expressions Klistra in uttryck @@ -188,9 +188,9 @@ Placering + - Transform Omvandla @@ -220,7 +220,7 @@ Växla valbarhet - + Edit image Redigera bild @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Avbryt - - Gui::ControlSingleton - - - Task panel - Uppgiftspanel - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ samma gång. Den med högsta prioritet kommer att utlösas. Makronamn: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Användarmakron - + System macros Systemmakron - + Execute Utför - + Close Stäng - + Create Skapa - + Delete Radera - + Edit Redigera - + Rename Döp om - + Duplicate Duplicera - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Verktygsfält - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download Hämta - + User macros location: Plats för användarmakron: @@ -1898,72 +1910,72 @@ samma gång. Den med högsta prioritet kommer att utlösas. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makron - + Read-only Skrivskyddad - + Macro file Makro fil - + Enter a file name, please: Skriv in ett filnamn: - - - + + + Existing file Filen finns - + '%1'. This file already exists. '%1'. Denna fil finns redan. - + Cannot create file Kan inte skapa fil - + Creation of file '%1' failed. Skapandet av filen %1' misslyckades. - + Delete macro Radera makro - + Do you really want to delete the macro '%1'? Vill du verkligen radera makrot '%1'? - + Do not show again Visa inte igen - + Guided Walkthrough Guidad genomgång - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Obs: dina ändringar kommer att tillämpas när du byter arbetsbänkar nästa g - + Walkthrough, dialog 1 of 2 Genomgång, dialogruta 1 av 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Genomgångsinstruktioner: Fyll i saknade fält (valfritt) klicka sedan på Lägg till och stäng - + Walkthrough, dialog 1 of 1 Genomgång, dialogruta 1 av 1 - + Walkthrough, dialog 2 of 2 Genomgång, dialogruta 2 av 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Genomgångsinstruktioner: Klicka på höger pilknapp (->), sedan Stäng. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Genomgångsinstruktioner: Klicka på Ny, sedan höger pilknapp (->), sedan Stäng. - + Renaming Macro File Döper om makrofil - - + + Enter new name: Ange nytt namn: - - + + '%1' already exists. '%1' finns redan. - + Rename Failed Omdöpning misslyckades - + Failed to rename to '%1'. Perhaps a file permission error? Misslyckades med att döpa om till '%1'. Kanske saknas filrättigheter? - + Duplicate Macro Duplicera makro - + Duplicate Failed Duplicering misslyckades - + Failed to duplicate to '%1'. Perhaps a file permission error? Misslyckades med att duplicera till '%1'. @@ -4313,6 +4325,16 @@ horisontellt utrymmet överskrids i Python-konsolen Save history Spara historik + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4427,16 +4449,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Topp: - + Middle: Mitt: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4459,7 +4506,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Nederst: @@ -4489,17 +4536,17 @@ Larger value eases to pick things, but can make small features impossible to sel Bakgrundsfärg för aktiva behållare i trädvyn - + Central: Central: - + Midway: Halvvägs: - + End: Slut: @@ -5475,22 +5522,10 @@ som ursprungligen valts innan du öppnar denna dialogruta Gui::DockWnd::ComboView - + Combo View Kombinerad vy - - - - Model - Modell - - - - - Tasks - Uppgifter - Gui::DockWnd::PropertyDockView @@ -5717,12 +5752,12 @@ som ursprungligen valts innan du öppnar denna dialogruta Gui::EditorView - + Modified file Ändrad fil - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5731,54 +5766,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Osparat dokument - + The document has been modified. Do you want to save your changes? Dokumentet har ändrats. Vill du spara ändringarna? - + FreeCAD macro FreeCAD-makro - + Export PDF Exportera PDF - + PDF file PDF-fil - + untitled[*] utan namn[*] - + - Editor - Redigerare - + %1 chars removed %1 tecken borttagna - + %1 chars added %1 tecken tillagda - + Formatted Formatterad @@ -5929,39 +5964,46 @@ Vill du spara ändringarna? Graphviz lyckades inte skapa en avbildningsfil - + PNG format PNG-format - + Bitmap format Bitmap-format - + GIF format GIF-format - + JPG format JPG-format - + SVG format SVG-format - - + + PDF format PDF-format - - + + + Graphviz format + Graphviz format + + + + + Export graph Exportera graf @@ -6122,7 +6164,7 @@ Vill du spara ändringarna? Gui::MainWindow - + Dimension Dimension @@ -6132,62 +6174,62 @@ Vill du spara ändringarna? Klar - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Open Addon Manager - + Close All Stäng alla - - - + + + Toggles this toolbar Växlar denna verktygsrad - - - + + + Toggles this dockable window Växlar detta dockningsbara fönster - + WARNING: This is a development version. VARNING: Detta är en utvecklingsversion. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Osparat dokument - + The exported object contains external link. Please save the documentat least once before exporting. Det exporterade objektet innehåller extern länk. Spara dokumentet minst en gång innan du exporterar. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? För att länka till externa objekt måste dokumentet sparas minst en gång. @@ -6559,117 +6601,117 @@ Hur vill du fortsätta? Gui::PythonConsole - + System exit Avsluta systemet - + The application is still running. Do you want to exit without saving your data? Applikationen körs fortfarande. Vill du avsluta utan att spara din data? - - - - + + + + Python console Python konsoll - + Unhandled PyCXX exception. Ohanterat PyCXX undantag. - + Unhandled FreeCAD exception. Ohanterat FreeCAD undantag. - + Unhandled std C++ exception. Std C++ undantag utan hantering. - + Unhandled unknown C++ exception. Ohanterat okänt C++ undantag. - + &Copy K&opiera - + &Copy command &Kopiera kommando - + &Copy history &Kopieringshistorik - + Save history as... Spara historik som... - + Save history Spara historik - + Saves Python history across %1 sessions Sparar Python-historik över %1 sessioner - + &Paste Klistra &in - + Select All Markera allt - + Clear console Rensa konsolen - + Insert file name... Mata in filnamn... - + Word wrap Radbrytning - + Save History Spara historik - + Macro Files Makrofiler - + Insert file name Mata in filnamn - + All Files Alla filer @@ -6754,22 +6796,22 @@ Vill du avsluta utan att spara din data? Gui::SearchBar - + Previous Föregående - + Next Nästa - + Case sensitive Case sensitive - + Whole words Whole words @@ -6886,17 +6928,17 @@ Vill du ange en annan katalog? Gui::TaskCSysDragger - + Increments Steglängd - + Translation Increment: Steglängd vid förflyttning: - + Rotation Increment: Steglängd vid rotation: @@ -7721,37 +7763,42 @@ Vill du ange en annan katalog? QDockWidget - + Tree view Trädvy - + + Tasks + Uppgifter + + + Property view Egenskapsvy - + Selection view Markeringsvy - - Combo View - Kombinerad vy + + Model + Modell - + DAG View DAG-vy - + Report view Rapportvy - + Python console Python konsoll @@ -7827,12 +7874,12 @@ Vill du ange en annan katalog? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7873,71 +7920,71 @@ Vill du ange en annan katalog? Exportera fil - + Printing... Skriver ut... - + Exporting PDF... Exporterar PDF ... - - + + Unsaved document Osparat dokument - + The exported object contains external link. Please save the documentat least once before exporting. Det exporterade objektet innehåller extern länk. Spara dokumentet minst en gång innan du exporterar. - - + + Delete failed Borttagning misslyckades - + Dependency error Beroendefel - + Copy selected Kopiera markerade - + Copy active document Kopiera aktivt dokument - + Copy all documents Kopiera alla dokument - + Paste Klistra in - + Expression error Fel på uttryck - + Failed to parse some of the expressions. Please check the Report View for more details. Det gick inte att tolka några av uttrycken. Vänligen kontrollera rapportvyn för mer information. - + Failed to paste expressions Misslyckas att klistra in uttryck @@ -8354,7 +8401,7 @@ Välj "Nej" att rulla tillbaka endast i det aktiva dokumentet. Välj "Avbryt" för att avbryta - + Save Macro Spara Makro @@ -8423,7 +8470,7 @@ Please open a browser window and type in: http://localhost:%1. Kan inte öppna din systemwebbläsare. - + Options... Alternativ... @@ -8470,42 +8517,42 @@ Please open a browser window and type in: http://localhost:%1. Vill du stänga denna dialogruta? - + Do you want to save your changes to document '%1' before closing? Vill du spara dina ändringar i dokument "%1" innan du stänger? - + Do you want to save your changes to document before closing? Vill du spara dina ändringar i dokument innan du stänger? - + If you don't save, your changes will be lost. Om du inte sparar går dina ändringar förlorade. - + Apply answer to all Tillämpa svar på alla - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Some documents could not be saved. Do you want to cancel closing? - + Delete macro Radera makro - + Not allowed to delete system-wide macros Inte tillåtet att ta bort systemmakron @@ -8525,12 +8572,17 @@ Please open a browser window and type in: http://localhost:%1. %1 är inte tom, vill du även ta bort innehållet? - + Translation: Förflyttning: - + + Translation XY: + Translation XY: + + + Rotation: Rotation: @@ -8740,7 +8792,7 @@ the current copy will be lost. Ändra bild... - + Color Gradient Färggradient @@ -8846,13 +8898,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Justering... - - + + Align the selected objects Justera de markerade objekten @@ -8930,13 +8982,13 @@ the current copy will be lost. StdCmdCopy - + C&opy K&opiera - - + + Copy operation Kopiera operation @@ -8944,13 +8996,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Klipp ut - - + + Cut out Klipp ut @@ -8958,13 +9010,13 @@ the current copy will be lost. StdCmdDelete - + &Delete Ra&dera - - + + Deletes the selected objects Raderar de valda objekten @@ -9112,13 +9164,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Dubblerad markering - - + + Put duplicates of the selected objects to the active document Lägg kopior av de markerade objekten till det aktiva dokumentet @@ -9126,17 +9178,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Växla R&edigera läge - + Toggles the selected object's edit mode Växlar det markerade objektets redigeringsläge - + Activates or Deactivates the selected object's edit mode Går in i eller lämnar det markerade objektets redigeringsläge @@ -9168,13 +9220,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Åtgärder för uttryck - - + + Actions that apply to expressions Actions that apply to expressions @@ -9666,19 +9718,19 @@ the current copy will be lost. StdCmdNew - + &New &Ny - - + + Create a new empty document Skapa ett nytt tomt dokument - + Unnamed Namnlös @@ -9761,13 +9813,13 @@ the current copy will be lost. StdCmdPaste - + &Paste Klistra &in - - + + Paste operation Klistra in operation @@ -9775,13 +9827,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Placering... - - + + Place the selected objects Placera de markerade objekten @@ -9789,13 +9841,13 @@ the current copy will be lost. StdCmdPrint - + &Print... S&kriv ut... - - + + Print the document Skriv ut dokumentet @@ -9803,13 +9855,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... Exportera &PDF... - - + + Export the document as PDF Exportera dokumentet som PDF @@ -9817,17 +9869,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Förhandsgranska ... - + Print the document Skriv ut dokumentet - + Print preview Förhandsgranska @@ -9835,13 +9887,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Projekti&nformation... - - + + Show details of the currently active project Visar detaljer om det aktiva projektet @@ -9849,13 +9901,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Projekt verktyg... - - + + Utility to extract or create project files Verktyg för att extrahera eller skapa projektfiler @@ -9877,13 +9929,13 @@ the current copy will be lost. StdCmdQuit - + E&xit A&vsluta - - + + Quits the application Avslutar applikationen @@ -9933,13 +9985,13 @@ the current copy will be lost. StdCmdRedo - + &Redo Gö&r om - - + + Redoes a previously undone action Gör om en tidigare ångrad aktion @@ -9947,13 +9999,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Uppdatera - - + + Recomputes the current active document Beräknar om det aktiva dokumentet @@ -9975,13 +10027,13 @@ the current copy will be lost. StdCmdRevert - + Revert Återgå - - + + Reverts to the saved version of this file Återgå till den sparade versionen av den här filen @@ -9989,13 +10041,13 @@ the current copy will be lost. StdCmdSave - + &Save &Spara - - + + Save the active document Spara det aktiva dokumentet @@ -10003,13 +10055,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Spara alla - - + + Save all opened document Spara alla öppnade dokument @@ -10017,13 +10069,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Spara s&om... - - + + Save the active document under a new file name Sparar det aktiva dokumentet med ett nytt filnamn @@ -10031,13 +10083,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Spara &kopia... - - + + Save a copy of the active document under a new file name Spara en kopia av det aktiva dokumentet med ett nytt filnamn @@ -10101,13 +10153,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Markera &allt - - + + Select all Markera allt @@ -10339,13 +10391,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Omvandla... - - + + Transform the geometry of selected objects Omvandla geometrin för markerade objekt @@ -10353,13 +10405,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Omvandla - - + + Transform the selected object in the 3d view Omvandla det markerade objektet i 3d-vyn @@ -10423,13 +10475,13 @@ the current copy will be lost. StdCmdUndo - + &Undo Ån&gra - - + + Undo exactly one action Ångra exakt en aktion @@ -11229,7 +11281,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11238,7 +11290,7 @@ Are you sure you want to continue? - + Object dependencies Objektberoenden @@ -11327,12 +11379,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Objektberoenden - + To link to external objects, the document must be saved at least once. Do you want to save the document now? För att länka till externa objekt måste dokumentet sparas minst en gång. @@ -11350,7 +11402,7 @@ Vill du spara dokumentet nu? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11364,17 +11416,17 @@ Vill du fortfarande fortsätta? Std_Revert - + Revert document Återgå dokument - + This will discard all the changes since last file save. Detta förkastar alla ändringar sedan filen senast sparades. - + Do you want to continue? Vill du fortsätta? @@ -12037,23 +12089,15 @@ vid start av FreeCAD Läser in bild - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12528,77 +12572,72 @@ visa startskärm Manage preference packs - + Small (%1px) Liten (%1px) - + Medium (%1px) Medel (%1px) - + Large (%1px) Stor (%1px) - + Extra large (%1px) Extra stor (%1px) - + Custom (%1px) Anpassad (%1px) - + Combo View Kombinerad vy - + TreeView and PropertyView TrädVy och EgenskapsVy - - Both - Båda - - - + Preference Pack Name Preference Pack Name - + Tags Taggar - + Apply Verkställ - + Apply the %1 preference pack Apply the %1 preference pack - + Choose a FreeCAD config file to import Choose a FreeCAD config file to import - + File exists File exists - + A preference pack with that name already exists. Overwrite? A preference pack with that name already exists. Overwrite? @@ -12906,4 +12945,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_tr.ts b/src/Gui/Language/FreeCAD_tr.ts index 0e38a48984..206888ac52 100644 --- a/src/Gui/Language/FreeCAD_tr.ts +++ b/src/Gui/Language/FreeCAD_tr.ts @@ -122,12 +122,12 @@ İçe aktar - + Delete Sil - + Paste expressions Formülleri yapıştır @@ -188,9 +188,9 @@ Yerleşim + - Transform Dönüştür @@ -220,7 +220,7 @@ Seçilebilirliği değiştir - + Edit image Edit image @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down İptal - - Gui::ControlSingleton - - - Task panel - Görev paneli - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. Makro adı: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Kullanıcı makroları - + System macros Sistem makroları - + Execute Çalıştır - + Close Kapat - + Create Oluştur - + Delete Sil - + Edit Düzenle - + Rename Yeniden Adlandır - + Duplicate Çoğalt - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Araç çubuğu - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download İndir - + User macros location: Kullanıcı Makro yeri: @@ -1898,72 +1910,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Makrolar - + Read-only Salt okunur - + Macro file Makro dosyası - + Enter a file name, please: Lütfen bir dosya adı yazın: - - - + + + Existing file Varolan dosya - + '%1'. This file already exists. '%1'. Bu dosya zaten var. - + Cannot create file Dosya oluşturulamadı - + Creation of file '%1' failed. '%1' dosyası oluşturulamadı. - + Delete macro Makroyu sil - + Do you really want to delete the macro '%1'? Gerçekten '%1' makrosunu silmek istiyor musunuz? - + Do not show again Tekrar gösterme - + Guided Walkthrough Kılavuzlu Çözüm Yolu - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Not: Değişiklikleriniz, sonraki tezgah geçişinizde uygulanacak - + Walkthrough, dialog 1 of 2 Gidişat, 2 ileti penceresinden 1. si - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Gidişat talimatları: Eksik alanları doldurun (isteğe bağlı), sonra Ekle' ye, ardından Kapat' a tıklayın - + Walkthrough, dialog 1 of 1 Gidişat, 1 ileti penceresinden 1. si - + Walkthrough, dialog 2 of 2 Gidişat, 2 ileti penceresinden 2. si - + Walkthrough instructions: Click right arrow button (->), then Close. Gidişat talimatları: Sağ ok düğmesine (->) ardından Kapat' a tıklayın. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Gidişat Talimatları: Yeni' ye, sonra sağ oka (->), ardından Kapat' a tıklayın. - + Renaming Macro File Makro dosya yeniden adlandırma - - + + Enter new name: Yeni adı gir: - - + + '%1' already exists. '%1' zaten mevcut. - + Rename Failed Yeniden adlandırma başarısız oldu - + Failed to rename to '%1'. Perhaps a file permission error? '%1' yeniden adlandıramadı. Belki de bir dosya yetki hatası? - + Duplicate Macro Makroyu Kopyala - + Duplicate Failed Kopyalama Başarısız - + Failed to duplicate to '%1'. Perhaps a file permission error? '%1'olarak çoğaltılamadı. @@ -4314,6 +4326,16 @@ boşluğu aştığında kaydırılacak Save history Geçmişi kaydet + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4428,16 +4450,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4460,7 +4507,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4490,17 +4537,17 @@ Larger value eases to pick things, but can make small features impossible to sel Ağaç görünümündeki etkin kutular için arkaplan rengi - + Central: Central: - + Midway: Midway: - + End: End: @@ -5478,22 +5525,10 @@ kutusunu açmadan önce seçilen nesnelerle devam et Gui::DockWnd::ComboView - + Combo View Birleşik görünüm - - - - Model - Model - - - - - Tasks - Görevler - Gui::DockWnd::PropertyDockView @@ -5720,12 +5755,12 @@ kutusunu açmadan önce seçilen nesnelerle devam et Gui::EditorView - + Modified file Değiştirilmiş dosya - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5734,53 +5769,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Kaydedilmemiş belge - + The document has been modified. Do you want to save your changes? Belge değiştirildi. Yaptığınız değişiklikleri kaydetmek istiyor musunuz? - + FreeCAD macro FreeCAD makro - + Export PDF PDF olarak dışa aktar - + PDF file PDF dosyası - + untitled[*] Adsız [*] - + - Editor -Editör(Düzenleyici) - + %1 chars removed %1 karakter kaldırıldı - + %1 chars added %1 karakter eklendi - + Formatted Biçimlendirilmiş @@ -5931,39 +5966,46 @@ Do you want to save your changes? Graphviz görüntü dosyası oluşturulamadı - + PNG format PNG biçimi - + Bitmap format Bit eşlem biçimi - + GIF format PNG biçimi - + JPG format PNG biçimi - + SVG format PNG biçimi - - + + PDF format PNG biçimi - - + + + Graphviz format + Graphviz format + + + + + Export graph Grafiği dışa aktar @@ -6124,7 +6166,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Boyut @@ -6134,62 +6176,62 @@ Do you want to save your changes? Hazır - + Help addon needed! Yardım eklentisi gerekli! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Eklenti Yöneticisini Aç - + Close All Tümünü Kapat - - - + + + Toggles this toolbar Bu araç çubuğunu değiştirir - - - + + + Toggles this dockable window Bu yapışabilir pencere arasında geçiş yapar - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. - Please do not use it in a production environment. + Lütfen, gerçek üretim işleminde kullanmayınız. - - + + Unsaved document Kaydedilmemiş belge - + The exported object contains external link. Please save the documentat least once before exporting. Dışa aktarılan nesne dış bağlantı içeriyor. Lüften dışa aktarmadan önce belgeyi en az bir defa kaydedin. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Harici nesneleri bağlamak için belge, en az bir defa kaydedilmelidir. Belgeyi şimdi kaydetmek istiyor musunuz? @@ -6561,116 +6603,116 @@ sağ görünümde %2 nokta seçili. Gui::PythonConsole - + System exit Sistem çıkış - + The application is still running. Do you want to exit without saving your data? Uygulama hala çalışıyor. Verileri kaydetmeden çıkmak istiyor musunuz? - - - - + + + + Python console Python konsolu - + Unhandled PyCXX exception. İşlenmeyen Özel durum PyCXX. - + Unhandled FreeCAD exception. İşlenmeyen Özel durum FreeCAD. - + Unhandled std C++ exception. İşlenmemiş std c++ özel durum. - + Unhandled unknown C++ exception. İşlenmemiş bilinmeyen c++ özel durum. - + &Copy &amp; Kopyala - + &Copy command &Kopyala komutu - + &Copy history &Kopyalama tarihi - + Save history as... Geçmişi olarak kaydet... - + Save history Geçmişi kaydet - + Saves Python history across %1 sessions Python geçmişini %1 oturum boyunca kaydeder - + &Paste & Yapıştır - + Select All Tümünü Seç - + Clear console Konsolü temizle - + Insert file name... Dosya adı Ekle... - + Word wrap Sözcük kaydırma - + Save History Geçmişi Kaydet - + Macro Files Makro dosyaları - + Insert file name Dosya adı Ekle - + All Files Tüm Dosyalar @@ -6755,22 +6797,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Önceki - + Next Next - + Case sensitive Case sensitive - + Whole words Tüm kelimeler @@ -6887,17 +6929,17 @@ Başka bir dizin belirlemek ister misiniz? Gui::TaskCSysDragger - + Increments Artım - + Translation Increment: Öteleme artımı: - + Rotation Increment: Dönme Artışı: @@ -7722,37 +7764,42 @@ Başka bir dizin belirlemek ister misiniz? QDockWidget - + Tree view Unsur Ağacı - + + Tasks + Görevler + + + Property view Özellik görünümü - + Selection view Seçim görünümü - - Combo View - Birleşik görünüm + + Model + Model - + DAG View DAG görünümü - + Report view Rapor Görünümü - + Python console Python konsolu @@ -7828,12 +7875,12 @@ Başka bir dizin belirlemek ister misiniz? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7874,71 +7921,71 @@ Başka bir dizin belirlemek ister misiniz? Dosyayı Dışarı Aktar - + Printing... Baskıda... - + Exporting PDF... PDF dışa aktarılıyor... - - + + Unsaved document Kaydedilmemiş belge - + The exported object contains external link. Please save the documentat least once before exporting. Dışa aktarılan nesne dış bağlantı içeriyor. Lüften dışa aktarmadan önce belgeyi en az bir defa kaydedin. - - + + Delete failed Silme başarısız - + Dependency error Bağımlılık hatası - + Copy selected Seçileni kopyala - + Copy active document Etkin belgeyi kopyala - + Copy all documents Tüm belgeleri kopyala - + Paste Yapıştır - + Expression error İfade hatası - + Failed to parse some of the expressions. Please check the Report View for more details. Bazı ifadelerin ayrıştırılması başarısız. Daha fazla ayrıntı için lütfen Rapor Görünümünü kontrol edin. - + Failed to paste expressions İfadeleri yapıştırma başarısız @@ -8352,7 +8399,7 @@ Sadece etkin belgeyi geri almak için 'Hayır' ı seçin. Vazgeçmek için 'Vazgeç' i seçin - + Save Macro Makroyu kaydet @@ -8419,7 +8466,7 @@ Please open a browser window and type in: http://localhost:%1. Sistem tarayıcı açılamıyor. - + Options... Seçenekler... @@ -8466,42 +8513,42 @@ Please open a browser window and type in: http://localhost:%1. Bu pencereyi kapatmak ister misiniz? - + Do you want to save your changes to document '%1' before closing? Kapatmadan önce değişiklikleri kaydetmek istiyor musunuz? - + Do you want to save your changes to document before closing? Kapatmadan önce değişikliklerinizi belgeye kaydetmek istiyor musunuz? - + If you don't save, your changes will be lost. Kaydetmezseniz, yaptığınız değişiklikler kaybolacak. - + Apply answer to all Cevabı tümüne uygula - + %1 Document(s) not saved %1 belge kaydedilmedi - + Some documents could not be saved. Do you want to cancel closing? Bazı belgeler kaydedilemedi. Kapatmaktan vazgeçmek ister misiniz? - + Delete macro Makroyu sil - + Not allowed to delete system-wide macros Sistemde makrolar silmek için izin verilmez @@ -8521,12 +8568,17 @@ Please open a browser window and type in: http://localhost:%1. %1 boş değil, içerik de silinsin mi? - + Translation: Ötele: - + + Translation XY: + Translation XY: + + + Rotation: Döndürme: @@ -8736,7 +8788,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8842,13 +8894,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Hizalama... - - + + Align the selected objects Seçili nesneleri hizala @@ -8926,13 +8978,13 @@ the current copy will be lost. StdCmdCopy - + C&opy K&opyala - - + + Copy operation İşlemi kopyala @@ -8940,13 +8992,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Kes - - + + Cut out Çıkart @@ -8954,13 +9006,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Sil - - + + Deletes the selected objects Seçili nesneyi siler @@ -9108,13 +9160,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Seçimi çoğalt - - + + Put duplicates of the selected objects to the active document Seçili nesneleri kopyalarını etkin belgeye koy @@ -9122,17 +9174,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode &Düzenleme moduna geç - + Toggles the selected object's edit mode Seçilen nesnenin düzenleme moduna geçiş yapar - + Activates or Deactivates the selected object's edit mode Seçilen nesnenin düzenleme modunu etkinleştirir veya devre dışı bırakır @@ -9164,13 +9216,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions İfade eylemleri - - + + Actions that apply to expressions Actions that apply to expressions @@ -9662,19 +9714,19 @@ the current copy will be lost. StdCmdNew - + &New & Yeni - - + + Create a new empty document Yeni, boş bir belge oluştur - + Unnamed Adsız @@ -9757,13 +9809,13 @@ the current copy will be lost. StdCmdPaste - + &Paste & Yapıştır - - + + Paste operation Yapıştırma işlemi @@ -9771,13 +9823,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Yerleşim... - - + + Place the selected objects Seçili nesneleri yerleştirin @@ -9785,13 +9837,13 @@ the current copy will be lost. StdCmdPrint - + &Print... & Yazdır... - - + + Print the document Belgeyi Yazdır @@ -9799,13 +9851,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &PDF olarak dışa aktar... - - + + Export the document as PDF dökümanı PDF Olarak dışa aktarın @@ -9813,17 +9865,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... Baskı Önizleme... - + Print the document Belgeyi Yazdır - + Print preview Baskı Önizleme @@ -9831,13 +9883,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Proje & özellikler... - - + + Show details of the currently active project Etkin projenin ayrıntılarını göster @@ -9845,13 +9897,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Proje yardımcısı... - - + + Utility to extract or create project files Proje dosyaları oluşturmak ya da çıkartmak için yardımcı @@ -9873,13 +9925,13 @@ the current copy will be lost. StdCmdQuit - + E&xit Çı&kış - - + + Quits the application Uygulamadan çıkar @@ -9929,13 +9981,13 @@ the current copy will be lost. StdCmdRedo - + &Redo & Yinele - - + + Redoes a previously undone action Önceden geri alınan eylemi yineler @@ -9943,13 +9995,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh & Yenile - - + + Recomputes the current active document Geçerli etkin belgeyi yeniden hesaplar @@ -9971,13 +10023,13 @@ the current copy will be lost. StdCmdRevert - + Revert Geri al - - + + Reverts to the saved version of this file Bu dosya kaydedilmiş sürümüne geri döner @@ -9985,13 +10037,13 @@ the current copy will be lost. StdCmdSave - + &Save & Kaydet - - + + Save the active document Etkin belgeyi Kaydet @@ -9999,13 +10051,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Tümünü Kaydet - - + + Save all opened document Tüm açık belgeleri kaydet @@ -10013,13 +10065,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Farklı Kaydet... - - + + Save the active document under a new file name Etkin belgeyi yeni bir dosya adıyla kaydet @@ -10027,13 +10079,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Kaydet & Kopyala... - - + + Save a copy of the active document under a new file name Etkin belgeyi yeni bir dosya adıyla kaydet @@ -10097,13 +10149,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Seç & Tümü - - + + Select all Tümünü Seç @@ -10335,13 +10387,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Dönüştür... - - + + Transform the geometry of selected objects Seçili nesnelerin geometrisini dönüştür @@ -10349,13 +10401,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Dönüştür - - + + Transform the selected object in the 3d view Seçili nesneyi 3d görünümde dönüştürme @@ -10419,13 +10471,13 @@ the current copy will be lost. StdCmdUndo - + &Undo Gerial - - + + Undo exactly one action Sadece bir eylemi geri al @@ -11225,7 +11277,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11236,7 +11288,7 @@ Devam etmek istediğinize emin misiniz? - + Object dependencies Nesne bağımlılıkları @@ -11325,12 +11377,12 @@ Devam etmek istediğinize emin misiniz? Std_DuplicateSelection - + Object dependencies Nesne bağımlılıkları - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Harici nesneleri bağlamak için belge, en az bir defa kaydedilmelidir. Belgeyi şimdi kaydetmek istiyor musunuz? @@ -11347,7 +11399,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11361,17 +11413,17 @@ Hala ilerlemek istiyor musunuz? Std_Revert - + Revert document Belgeyi geri al - + This will discard all the changes since last file save. Bu son dosya kaydettikten sonra yapılan tüm değişiklikleri iptal edecektir. - + Do you want to continue? Devam etmek istiyor musunuz? @@ -11797,32 +11849,32 @@ etkinleştirilip gösterileceğini seçin Planes - Planes + Düzlemler XY-Plane - XY-Plane + XY Düzlemi XZ-Plane - XZ-Plane + XZ Düzlemi YZ-Plane - YZ-Plane + YZ-Düzlemi Reverse direction - Reverse direction + Ters yön Offset: - Offset: + Ötele: @@ -11984,12 +12036,12 @@ etkinleştirilip gösterileceğini seçin Delete user notifications - Delete user notifications + Kullanıcı bildirimlerini sil Delete All - Delete All + Tümünü sil @@ -12034,23 +12086,15 @@ etkinleştirilip gösterileceğini seçin Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12525,77 +12569,72 @@ karşılama ekranını gösterecektir Tercih paketlerini yönet - + Small (%1px) Küçük (%1px) - + Medium (%1px) Orta (%1px) - + Large (%1px) Büyük (%1px) - + Extra large (%1px) Çok büyük (%1px) - + Custom (%1px) Özel (%1px) - + Combo View Birleşik görünüm - + TreeView and PropertyView AğaçGörünümü ve ÖzellikGörünümü - - Both - İkisi - - - + Preference Pack Name Tercih Paketi Adı - + Tags Etiketler - + Apply Uygula - + Apply the %1 preference pack %1 tercih paketini uygula - + Choose a FreeCAD config file to import Choose a FreeCAD config file to import - + File exists Dosya mevcut - + A preference pack with that name already exists. Overwrite? Aynı adlı bir tercih paketi zaten bulunuyor. Üzerine yazılsın mı? @@ -12899,4 +12938,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_uk.ts b/src/Gui/Language/FreeCAD_uk.ts index 88bd2e139d..7146601992 100644 --- a/src/Gui/Language/FreeCAD_uk.ts +++ b/src/Gui/Language/FreeCAD_uk.ts @@ -122,12 +122,12 @@ Імпортувати - + Delete Видалити - + Paste expressions Вставити вирази @@ -188,9 +188,9 @@ Розташувати + - Transform Перетворити @@ -220,7 +220,7 @@ Перемикач можливостей вибору - + Edit image Редагувати зображення @@ -615,14 +615,6 @@ while doing a left or right click and move the mouse up or down &Скасувати - - Gui::ControlSingleton - - - Task panel - Панель завдань - - Gui::DAG::Model @@ -1823,72 +1815,92 @@ same time. The one with the highest priority will be triggered. Назва макросу: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Користувацькі макроси - + System macros Системні макроси - + Execute Виконати - + Close Закрити - + Create Створити - + Delete Видалити - + Edit Правка - + Rename Перейменувати - + Duplicate Створити копію - + Launch a guide on how to set up a macro in a custom global toolbar. Запускає помічника з налаштування макросу в користувацькій глобальній панелі інструментів. - + Toolbar Панель інструментів - + Open Addon Manager where macros created by the community and other addons can be downloaded. Відкриває Менеджер Додатків, де можна завантажити макроси створені спільнотою та інші додатки. - + Download Завантажити - + User macros location: Розташування користувацьких макросів: @@ -1896,72 +1908,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Макроси - + Read-only Тільки для читання - + Macro file Файл макросу - + Enter a file name, please: Будь ласка, введіть імʼя файлу: - - - + + + Existing file Існуючий файл - + '%1'. This file already exists. '%1'. Цей файл вже існує. - + Cannot create file Не вдається створити файл - + Creation of file '%1' failed. Помилка створення файлу '%1'. - + Delete macro Видалити макрос - + Do you really want to delete the macro '%1'? Ви дійсно бажаєте видалити макрос '%1'? - + Do not show again Не показувати знову - + Guided Walkthrough Інтерактивний тур - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1972,78 +1984,78 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 Покрокова Інструкція. Діалог 1 із 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Покрокова Інструкція: Заповніть відсутні поля (опціонально) потім натисніть кнопку Додати, потім Закрити - + Walkthrough, dialog 1 of 1 Покрокова Інструкція. Діалог 1 із 1 - + Walkthrough, dialog 2 of 2 Покрокова Інструкція. Діалог 2 із 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Покрокова Інструкція: натисніть праву кнопку зі стрілкою (->), потім Закрити. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Покрокова Інструкція; Натисніть Новий, потім праву кнопку зі стрілкою (>), потім Закрити. - + Renaming Macro File Перейменування файлу макросу - - + + Enter new name: Введіть нове імʼя: - - + + '%1' already exists. '%1' вже існує. - + Rename Failed Не вдалося перейменувати - + Failed to rename to '%1'. Perhaps a file permission error? Помилка перейменування '%1'. Можливо помилка доступу до файлу? - + Duplicate Macro Створити копію макроса - + Duplicate Failed Не вдалося створити копію - + Failed to duplicate to '%1'. Perhaps a file permission error? Помилка дублювання '%1'. @@ -4309,6 +4321,16 @@ horizontal space in Python console Save history Зберегти історію + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4423,16 +4445,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4455,7 +4502,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4485,17 +4532,17 @@ Larger value eases to pick things, but can make small features impossible to sel Колір тла для активних контейнерів ієрархії документа - + Central: Central: - + Midway: Midway: - + End: End: @@ -5473,22 +5520,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Комбінований вид - - - - Model - Модель - - - - - Tasks - Завдання - Gui::DockWnd::PropertyDockView @@ -5715,12 +5750,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file Змінений файл - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5729,54 +5764,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document Незбережений документ - + The document has been modified. Do you want to save your changes? Документ було змінено. Бажаєте зберегти внесені зміни? - + FreeCAD macro Макрос FreeCAD - + Export PDF Експорт в PDF - + PDF file PDF-файл - + untitled[*] без імені [*] - + - Editor - Редактор - + %1 chars removed %1 символів видалено - + %1 chars added %1 символів додано - + Formatted Форматований @@ -5927,39 +5962,46 @@ Do you want to save your changes? Помилка Graphviz при створенні файла зображення - + PNG format Формат PNG - + Bitmap format Формат Bitmap - + GIF format Формат GIF - + JPG format Формат JPG - + SVG format Формат SVG - - + + PDF format Формат PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Експортувати діаграму @@ -6120,7 +6162,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Розмірність @@ -6130,62 +6172,62 @@ Do you want to save your changes? Готово - + Help addon needed! Потрібен Додаток Допомога! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager Система Допомоги %1 тепер обробляється додатком "Допомога". Її можна легко встановити через Менеджер доповнень - + Open Addon Manager Відкрити менеджер додатків - + Close All Закрити все - - - + + + Toggles this toolbar Переключення цієї панелі - - - + + + Toggles this dockable window Переключення цього закріплюваного вікна - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document Незбережений документ - + The exported object contains external link. Please save the documentat least once before exporting. Експортований обʼєкт містить зовнішні посилання. Збережіть документ хоча б раз перед експортом. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Щоб привʼязати зовнішні обʼєкти, документ повинен бути збережений хоча б один раз. @@ -6554,117 +6596,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit Вихід із системи - + The application is still running. Do you want to exit without saving your data? Програма, досі працює. Бажаєте вийти без збереження даних? - - - - + + + + Python console Консоль Python - + Unhandled PyCXX exception. Необроблене виключення PyCXX. - + Unhandled FreeCAD exception. Необроблене виключення FreeCAD. - + Unhandled std C++ exception. Необроблений виняток C++. - + Unhandled unknown C++ exception. Необроблений невідомий виняток C++. - + &Copy &Копіювати - + &Copy command &Копіювати команду - + &Copy history &Копіювати історію - + Save history as... Зберегти історію як... - + Save history Зберегти історію - + Saves Python history across %1 sessions Зберігає історію Python з %1 сесій - + &Paste &Вставити - + Select All Вибрати все - + Clear console Очистити консоль - + Insert file name... Введіть імʼя файлу... - + Word wrap Перенесення слів - + Save History Зберегти історію - + Macro Files Файли макросів - + Insert file name Введіть імʼя файлу - + All Files Всі файли @@ -6749,22 +6791,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Попередня - + Next Наступний - + Case sensitive З урахуванням регістру - + Whole words Слова повністю @@ -6881,17 +6923,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Приріст - + Translation Increment: Крок переміщення: - + Rotation Increment: Приріст обертання: @@ -7716,37 +7758,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Ієрархія документа - + + Tasks + Завдання + + + Property view Вид Властивості - + Selection view Вид Виділення - - Combo View - Комбінований вид + + Model + Модель - + DAG View Вид DAG - + Report view Вид Звіту - + Python console Консоль Python @@ -7822,12 +7869,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7868,71 +7915,71 @@ Do you want to specify another directory? Експорт файлу - + Printing... Друк... - + Exporting PDF... Експорт в PDF ... - - + + Unsaved document Незбережений документ - + The exported object contains external link. Please save the documentat least once before exporting. Експортований обʼєкт містить зовнішні посилання. Збережіть документ хоча б раз перед експортом. - - + + Delete failed Не вдалося видалити - + Dependency error Помилка залежності - + Copy selected Копіювати вибране - + Copy active document Копіювати активний документ - + Copy all documents Копіювати всі документи - + Paste Paste - + Expression error Помилка виразу - + Failed to parse some of the expressions. Please check the Report View for more details. Не вдалося обробити деякі з виразів. Будь ласка перевірте Звіт для отримання більш докладної інформації. - + Failed to paste expressions Не вдалося вставити вирази @@ -8349,7 +8396,7 @@ Choose 'Abort' to abort Виберіть 'Скасувати' для скасування - + Save Macro Зберегти макрос @@ -8418,7 +8465,7 @@ Please open a browser window and type in: http://localhost:%1. Не вдається відкрити Ваш системний браузер. - + Options... Параметри... @@ -8465,42 +8512,42 @@ Please open a browser window and type in: http://localhost:%1. Ви бажаєте закрити це діалогове вікно? - + Do you want to save your changes to document '%1' before closing? Бажаєте зберегти внесені зміни в документ '%1' перед його закриттям? - + Do you want to save your changes to document before closing? Бажаєте зберегти зміни, які були внесені до документа перед його закриттям? - + If you don't save, your changes will be lost. Якщо ви не збережете, зміни будуть втрачено. - + Apply answer to all Застосувати відповідь до наступних питань - + %1 Document(s) not saved %1 Документ(и/ів) не збережено - + Some documents could not be saved. Do you want to cancel closing? Деякі документи не вдалося зберегти. Бажаєте скасувати закриття? - + Delete macro Видалити макрос - + Not allowed to delete system-wide macros Не дозволено видаляти системні макроси @@ -8520,12 +8567,17 @@ Please open a browser window and type in: http://localhost:%1. %1 не порожній, також видалити його вміст? - + Translation: Переміщення: - + + Translation XY: + Translation XY: + + + Rotation: Обертання: @@ -8736,7 +8788,7 @@ the current copy will be lost. Змінити зображення... - + Color Gradient Градієнт кольору @@ -8842,13 +8894,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Вирівнювання... - - + + Align the selected objects Вирівняти виділені обʼєкти @@ -8926,13 +8978,13 @@ the current copy will be lost. StdCmdCopy - + C&opy Копіювати - - + + Copy operation Копіює виділений обʼєкт до буфера обміну @@ -8940,13 +8992,13 @@ the current copy will be lost. StdCmdCut - + &Cut Вирізати - - + + Cut out Вирізає виділений обʼєкт @@ -8954,13 +9006,13 @@ the current copy will be lost. StdCmdDelete - + &Delete Видалити - - + + Deletes the selected objects Видаляє вибрані обʼєкти @@ -9108,13 +9160,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Дублювати виділене - - + + Put duplicates of the selected objects to the active document Вставляє дублікати виділених обʼєктів у активний документ @@ -9122,17 +9174,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Перемкнути режим &Редагування - + Toggles the selected object's edit mode Змінити режим редагування виділеного обʼєкта - + Activates or Deactivates the selected object's edit mode Активує або деактивує для виділених обʼєктів режим редагування @@ -9164,13 +9216,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Дії з виразом - - + + Actions that apply to expressions Actions that apply to expressions @@ -9662,19 +9714,19 @@ the current copy will be lost. StdCmdNew - + &New Новий - - + + Create a new empty document Створює новий порожній документ - + Unnamed Без назви @@ -9757,13 +9809,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &Вставити - - + + Paste operation Вставляє вміст буферу обміну @@ -9771,13 +9823,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Розташування... - - + + Place the selected objects Задає розташування виділених обʼєктів @@ -9785,13 +9837,13 @@ the current copy will be lost. StdCmdPrint - + &Print... &Друк... - - + + Print the document Друкує документ @@ -9799,13 +9851,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Експорт до PDF... - - + + Export the document as PDF Експортує документ в PDF @@ -9813,17 +9865,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Попередній перегляд... - + Print the document Друкує документ - + Print preview Дозволяє попередньо переглянути результат перед друком @@ -9831,13 +9883,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... Інформація про проєкт... - - + + Show details of the currently active project Показує подробиці про активний проєкт @@ -9845,13 +9897,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Утиліта проєкту... - - + + Utility to extract or create project files Утиліта для видобування або створення файлів проєкту @@ -9873,13 +9925,13 @@ the current copy will be lost. StdCmdQuit - + E&xit Вихід - - + + Quits the application Завершує роботу з програмою @@ -9929,13 +9981,13 @@ the current copy will be lost. StdCmdRedo - + &Redo Повторити - - + + Redoes a previously undone action Повторює останню скасовану дію @@ -9943,13 +9995,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh Оновити - - + + Recomputes the current active document Переобчислює активний документ @@ -9971,13 +10023,13 @@ the current copy will be lost. StdCmdRevert - + Revert Скасувати зміни - - + + Reverts to the saved version of this file Повертається до збереженої версії цього файлу @@ -9985,13 +10037,13 @@ the current copy will be lost. StdCmdSave - + &Save &Зберегти - - + + Save the active document Зберігає активний документ @@ -9999,13 +10051,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Зберегти Все - - + + Save all opened document Зберігає всі відкриті документи @@ -10013,13 +10065,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... Зберегти як... - - + + Save the active document under a new file name Зберігає активний документ під новим імʼям @@ -10027,13 +10079,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Зберегти &Копію... - - + + Save a copy of the active document under a new file name Зберігає копію активного документа з новим іменем файлу @@ -10097,13 +10149,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Виділити все - - + + Select all Виділяє всі обʼєкти @@ -10335,13 +10387,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Перетворення... - - + + Transform the geometry of selected objects Перетворення геометрії вибраних обʼєктів @@ -10349,13 +10401,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Перетворити - - + + Transform the selected object in the 3d view Перетворює виділений обʼєкт у 3D виді @@ -10419,13 +10471,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Скасувати - - + + Undo exactly one action Скасовує рівно одну дію @@ -11225,7 +11277,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11236,7 +11288,7 @@ Are you sure you want to continue? - + Object dependencies Залежності обʼєктів @@ -11325,12 +11377,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies Залежності обʼєктів - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Щоб привʼязати зовнішні обʼєкти, документ повинен бути збережений хоча б один раз. @@ -11348,7 +11400,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11362,17 +11414,17 @@ Do you still want to proceed? Std_Revert - + Revert document Відновити документ - + This will discard all the changes since last file save. Це скасує всі зміни від часу останнього збереження файла. - + Do you want to continue? Бажаєте продовжити? @@ -12035,23 +12087,15 @@ after FreeCAD launches Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12525,77 +12569,72 @@ display the splash screen Керування наборами налаштувань - + Small (%1px) Малий (%1пікс) - + Medium (%1px) Середній (%1пікс) - + Large (%1px) Великий (%1пікс) - + Extra large (%1px) Дуже великий (%1пікс) - + Custom (%1px) Власний (%1пікс) - + Combo View Комбінований вид - + TreeView and PropertyView Вид Ієрархії та Властивостей - - Both - Обидві - - - + Preference Pack Name Імʼя Набору Налаштувань - + Tags Мітки - + Apply Застосувати - + Apply the %1 preference pack Застосувати набір налаштувань %1 - + Choose a FreeCAD config file to import Choose a FreeCAD config file to import - + File exists Файл вже існує - + A preference pack with that name already exists. Overwrite? A preference pack with that name already exists. Overwrite? @@ -12903,4 +12942,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_val-ES.ts b/src/Gui/Language/FreeCAD_val-ES.ts index 5e8e22004b..a480888da9 100644 --- a/src/Gui/Language/FreeCAD_val-ES.ts +++ b/src/Gui/Language/FreeCAD_val-ES.ts @@ -122,12 +122,12 @@ Importa - + Delete Elimina - + Paste expressions Paste expressions @@ -188,9 +188,9 @@ Posició + - Transform Transforma @@ -220,7 +220,7 @@ Commuta la selectivitat - + Edit image Edit image @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down &Cancel·la - - Gui::ControlSingleton - - - Task panel - Tauler de tasques - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. Nom de la macro: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros Macros de l'usuari - + System macros Macros del sistema - + Execute Executa - + Close Tanca - + Create Crea - + Delete Elimina - + Edit Edita - + Rename Reanomena - + Duplicate Duplica - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar Barra d'eines - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download Baixades - + User macros location: Ubicació de les macros de l'usuari: @@ -1898,71 +1910,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros Macros - + Read-only Només de lectura - + Macro file Fitxer de la macro - + Enter a file name, please: Introduïu un nom de fitxer: - - - + + + Existing file Fitxer existent - + '%1'. This file already exists. '%1'. Aquest fitxer ja existeix. - + Cannot create file No es pot crear el fitxer. - + Creation of file '%1' failed. La creació del fitxer '%1' ha fallat. - + Delete macro Suprimeix la macro - + Do you really want to delete the macro '%1'? Esteu segur que voleu suprimir la macro '%1'? - + Do not show again No ho tornes a mostrar - + Guided Walkthrough Procediment guiat - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,78 +1985,78 @@ Nota: els vostres canvis s'aplicaran quan canvieu de banc de treball - + Walkthrough, dialog 1 of 2 Procediment guiat, diàleg 1 de 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close Instruccions del procediment guiat: empleneu els camps que falten (opcional), feu clic a Afig i després a Tanca - + Walkthrough, dialog 1 of 1 Procediment guiat, diàleg 1 de 1 - + Walkthrough, dialog 2 of 2 Procediment guiat, diàleg 2 de 2 - + Walkthrough instructions: Click right arrow button (->), then Close. Instruccions del procediment guiat: feu clic en el botó de fletxa dreta (->) i després en Tanca. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. Instruccions del procediment guiat: feu clic en Nou, després en el botó de fletxa dreta (->) i després en Tanca. - + Renaming Macro File S'està canviant el nom del fitxer de Macro - - + + Enter new name: Introduïu el nom nou: - - + + '%1' already exists. '%1' ja existeix. - + Rename Failed Error en canviar el nom - + Failed to rename to '%1'. Perhaps a file permission error? No ha pogut canviar el nom per '%1'. Pot ser un problema de permisos d'arxiu? - + Duplicate Macro Duplica la macro - + Duplicate Failed Ha fallat el duplicat - + Failed to duplicate to '%1'. Perhaps a file permission error? No s'ha pogut duplicar «%1». @@ -4306,6 +4318,16 @@ horizontal space in Python console Save history Guarda l'historial + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4420,16 +4442,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4452,7 +4499,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4482,17 +4529,17 @@ Larger value eases to pick things, but can make small features impossible to sel Color de fons per a contenidors actius en la vista d’arbre - + Central: Central: - + Midway: Midway: - + End: End: @@ -5469,22 +5516,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View Visualització combinada - - - - Model - Model - - - - - Tasks - Tasques - Gui::DockWnd::PropertyDockView @@ -5711,12 +5746,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file S'ha modificat el fitxer - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5725,53 +5760,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document El document no s'ha guardat. - + The document has been modified. Do you want to save your changes? El document s'ha modificat. Voleu guardar els canvis? - + FreeCAD macro Macro de FreeCAD - + Export PDF Exporta a PDF - + PDF file Fitxer PDF - + untitled[*] sense títol[*] - + - Editor - Editor - + %1 chars removed S'han eliminat %1 caràcters - + %1 chars added S'han afegit %1 caràcters - + Formatted Formatat @@ -5922,39 +5957,46 @@ Do you want to save your changes? El Graphviz no ha pogut crear un fitxer d'imatge. - + PNG format Format PNG - + Bitmap format Format de mapa de bits - + GIF format Format GIF - + JPG format Format JPG - + SVG format Format SVG - - + + PDF format Format PDF - - + + + Graphviz format + Graphviz format + + + + + Export graph Exporta el gràfic @@ -6115,7 +6157,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension Dimensió @@ -6125,62 +6167,62 @@ Do you want to save your changes? Preparat - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Open Addon Manager - + Close All Tanca-ho tot - - - + + + Toggles this toolbar Commuta la barra d'eines - - - + + + Toggles this dockable window Commuta la finestra flotant - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document El document no s'ha guardat. - + The exported object contains external link. Please save the documentat least once before exporting. L’objecte exportat conté un enllaç extern. Guardeu el documenta almenys una vegada abans d’exportar-lo. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Per a enllaçar amb objectes externs, el document s’ha de guardar almenys una vegada. @@ -6549,116 +6591,116 @@ How do you want to proceed? Gui::PythonConsole - + System exit Eixida del sistema - + The application is still running. Do you want to exit without saving your data? L'aplicació està encara en funcionament. Esteu segur que voleu eixir sense guardar les dades? - - - - + + + + Python console Consola de Python - + Unhandled PyCXX exception. S'ha produït una excepció no gestionada de PyCXX. - + Unhandled FreeCAD exception. S'ha produït una excepció no gestionada de FreeCAD - + Unhandled std C++ exception. S'ha produït una excepció no gestionada de C++ estàndard. - + Unhandled unknown C++ exception. S'ha produït una excepció de C++ no gestionada desconeguda. - + &Copy &Copia - + &Copy command &Copia l'ordre - + &Copy history &Copia l'historial - + Save history as... Anomena i guarda l'historial... - + Save history Guarda l'historial - + Saves Python history across %1 sessions Guarda l'historial de Python entre %1 sessions - + &Paste A&pega - + Select All Selecciona-ho tot - + Clear console Neteja la consola - + Insert file name... Inseriu un nom de fitxer... - + Word wrap Ajust de paraules - + Save History Guarda l'historial - + Macro Files Fitxers de macro - + Insert file name Inseriu un nom de fitxer - + All Files Tots els fitxers @@ -6743,22 +6785,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous Anterior - + Next Next - + Case sensitive Case sensitive - + Whole words Whole words @@ -6871,17 +6913,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments Increments - + Translation Increment: Increment de translació: - + Rotation Increment: Increment de rotació: @@ -7706,37 +7748,42 @@ Do you want to specify another directory? QDockWidget - + Tree view Vista d'arbre - + + Tasks + Tasques + + + Property view Visualització de les propietats - + Selection view Visualització de la selecció - - Combo View - Visualització combinada + + Model + Model - + DAG View Vista DAG - + Report view Visualització de l'informe - + Python console Consola de Python @@ -7812,12 +7859,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7858,71 +7905,71 @@ Do you want to specify another directory? Exporta el fitxer - + Printing... S'està imprimint... - + Exporting PDF... S'està exportant a PDF... - - + + Unsaved document El document no s'ha guardat. - + The exported object contains external link. Please save the documentat least once before exporting. L’objecte exportat conté un enllaç extern. Guardeu el documenta almenys una vegada abans d’exportar-lo. - - + + Delete failed No s'ha pogut eliminar - + Dependency error Error de dependència - + Copy selected Copia la selecció - + Copy active document Copia el document actiu - + Copy all documents Copia tots el documents - + Paste Apega - + Expression error S'ha produït un error d'expressió - + Failed to parse some of the expressions. Please check the Report View for more details. No s'han pogut analitzar algunes de les expressions. Per a obtindre més detalls, consulteu la vista de l'informe. - + Failed to paste expressions No s'han pogut apegar les expressions @@ -8336,7 +8383,7 @@ Trieu «No» per a desfer només en el document actiu. Trieu «Interromp» per a interrompre - + Save Macro Guarda la macro @@ -8403,7 +8450,7 @@ Please open a browser window and type in: http://localhost:%1. No es pot obrir el navegador del sistema. - + Options... Opcions... @@ -8450,42 +8497,42 @@ Please open a browser window and type in: http://localhost:%1. Do you want to close this dialog? - + Do you want to save your changes to document '%1' before closing? Voleu guardar els vostres canvis en el document '%1' abans de tancar? - + Do you want to save your changes to document before closing? Voleu guardar els vostres canvis en el document abans de tancar? - + If you don't save, your changes will be lost. Si no guardeu els canvis, es perdran. - + Apply answer to all Envia la resposta a tots - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Some documents could not be saved. Do you want to cancel closing? - + Delete macro Suprimeix la macro - + Not allowed to delete system-wide macros No es permet eliminar les macros del sistema @@ -8505,12 +8552,17 @@ Please open a browser window and type in: http://localhost:%1. L'%1 no és buit, voleu esborrar-ne le contingut? - + Translation: Translació: - + + Translation XY: + Translation XY: + + + Rotation: Rotació: @@ -8720,7 +8772,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8826,13 +8878,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... Alineació... - - + + Align the selected objects Alinea els objectes seleccionats @@ -8910,13 +8962,13 @@ the current copy will be lost. StdCmdCopy - + C&opy C&opia - - + + Copy operation Copia l'operació @@ -8924,13 +8976,13 @@ the current copy will be lost. StdCmdCut - + &Cut &Retalla - - + + Cut out Retalla @@ -8938,13 +8990,13 @@ the current copy will be lost. StdCmdDelete - + &Delete &Elimina - - + + Deletes the selected objects Elimina els objectes seleccionats @@ -9092,13 +9144,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection Duplica la selecció - - + + Put duplicates of the selected objects to the active document Posa els duplicats dels objectes seleccionats en el document actiu @@ -9106,17 +9158,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode Commuta el mode d'&edició - + Toggles the selected object's edit mode Commuta el mode d'edició de l'objecte seleccionat - + Activates or Deactivates the selected object's edit mode Activa o desactiva el mode d'edició de l'objecte seleccionat @@ -9148,13 +9200,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions Accions d’expressió - - + + Actions that apply to expressions Actions that apply to expressions @@ -9646,19 +9698,19 @@ the current copy will be lost. StdCmdNew - + &New &Nou - - + + Create a new empty document Crea un document buit nou - + Unnamed Sense nom @@ -9741,13 +9793,13 @@ the current copy will be lost. StdCmdPaste - + &Paste A&pega - - + + Paste operation Apega l'operació @@ -9755,13 +9807,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... Posició... - - + + Place the selected objects Col·loca els objectes seleccionats @@ -9769,13 +9821,13 @@ the current copy will be lost. StdCmdPrint - + &Print... Im&primeix... - - + + Print the document Imprimeix el document @@ -9783,13 +9835,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... &Exporta a PDF... - - + + Export the document as PDF Exporta el document com a PDF @@ -9797,17 +9849,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &Previsualització de la impressió... - + Print the document Imprimeix el document - + Print preview Previsualització de la impressió @@ -9815,13 +9867,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... I&nformació del projecte... - - + + Show details of the currently active project Mostra els detalls del projecte actiu actual @@ -9829,13 +9881,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... Utilitat del projecte... - - + + Utility to extract or create project files Utilitat per a extraure o crear fitxers de projecte @@ -9857,13 +9909,13 @@ the current copy will be lost. StdCmdQuit - + E&xit I&x - - + + Quits the application Ix de l'aplicació @@ -9913,13 +9965,13 @@ the current copy will be lost. StdCmdRedo - + &Redo &Refés - - + + Redoes a previously undone action Refà l'acció prèviament desfeta @@ -9927,13 +9979,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh &Actualitza - - + + Recomputes the current active document Recalcula el document actiu actualment @@ -9955,13 +10007,13 @@ the current copy will be lost. StdCmdRevert - + Revert Torna a una versió anterior - - + + Reverts to the saved version of this file Torna a la versió guardada d'aquest fitxer @@ -9969,13 +10021,13 @@ the current copy will be lost. StdCmdSave - + &Save &Guarda - - + + Save the active document Guarda el document actiu @@ -9983,13 +10035,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All Guarda-ho tot - - + + Save all opened document Guarda tots els documents oberts @@ -9997,13 +10049,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... &Anomena i guarda... - - + + Save the active document under a new file name Guarda el document actiu amb un altre nom... @@ -10011,13 +10063,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... Guarda una &còpia... - - + + Save a copy of the active document under a new file name Guarda una còpia del document actiu amb un altre nom... @@ -10081,13 +10133,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All Seleccion&a-ho tot - - + + Select all Selecciona-ho tot @@ -10319,13 +10371,13 @@ the current copy will be lost. StdCmdTransform - + Transform... Transforma... - - + + Transform the geometry of selected objects Transforma la geometria dels objectes seleccionats @@ -10333,13 +10385,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform Transforma - - + + Transform the selected object in the 3d view Transforma l'objecte seleccionat en la vista 3D @@ -10403,13 +10455,13 @@ the current copy will be lost. StdCmdUndo - + &Undo &Desfés - - + + Undo exactly one action Desfés exactament una acció @@ -11209,7 +11261,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11220,7 +11272,7 @@ Segur que voleu continuar? - + Object dependencies Dependències de l'objecte @@ -11309,12 +11361,12 @@ Segur que voleu continuar? Std_DuplicateSelection - + Object dependencies Dependències de l'objecte - + To link to external objects, the document must be saved at least once. Do you want to save the document now? Per a enllaçar amb objectes externs, el document s’ha de guardar almenys una vegada. @@ -11332,7 +11384,7 @@ Voleu guardar el document ara? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11346,17 +11398,17 @@ Encara voleu continuar? Std_Revert - + Revert document Torneu a la versió anterior del document - + This will discard all the changes since last file save. Això descartarà tots els canvis des de l'última acció de guardar el fitxer. - + Do you want to continue? Voleu continuar? @@ -12019,23 +12071,15 @@ després que s'execute FreeCAD Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12509,77 +12553,72 @@ quan FreeCAD s'executa. Si aquesta opció està marcada, FreeCAD en mostrarà un Manage preference packs - + Small (%1px) Xicotet (%1px) - + Medium (%1px) Mitjà (%1px) - + Large (%1px) Gran (%1px) - + Extra large (%1px) Molt gran (%1px) - + Custom (%1px) Personalitzat (%1px) - + Combo View Visualització combinada - + TreeView and PropertyView Vista d'arbre i vista de les propietats - - Both - Ambdós - - - + Preference Pack Name Preference Pack Name - + Tags Tags - + Apply Aplica - + Apply the %1 preference pack Apply the %1 preference pack - + Choose a FreeCAD config file to import Choose a FreeCAD config file to import - + File exists File exists - + A preference pack with that name already exists. Overwrite? A preference pack with that name already exists. Overwrite? @@ -12886,4 +12925,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_zh-CN.ts b/src/Gui/Language/FreeCAD_zh-CN.ts index e83f71684b..1328b87c01 100644 --- a/src/Gui/Language/FreeCAD_zh-CN.ts +++ b/src/Gui/Language/FreeCAD_zh-CN.ts @@ -122,12 +122,12 @@ 导入 - + Delete 删除 - + Paste expressions 粘贴表达式 @@ -188,9 +188,9 @@ 定位 + - Transform 变换 @@ -220,7 +220,7 @@ 切换可选择性 - + Edit image 编辑图像 @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down 取消(&C) - - Gui::ControlSingleton - - - Task panel - 任务面板 - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. 宏名称: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros 用户宏 - + System macros 系统宏 - + Execute 执行 - + Close 关闭 - + Create 创建 - + Delete 删除 - + Edit 编辑 - + Rename 重命名 - + Duplicate 复制 - + Launch a guide on how to set up a macro in a custom global toolbar. 启动如何在自定义全局工具栏中设置宏的指南。 - + Toolbar 工具栏 - + Open Addon Manager where macros created by the community and other addons can be downloaded. 打开插件管理器,社区创建的宏和其他插件可以被下载。 - + Download 下载 - + User macros location: 用户宏路径: @@ -1898,72 +1910,72 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros - + Read-only 只读 - + Macro file 宏文件 - + Enter a file name, please: 请输入文件名称: - - - + + + Existing file 已存在文件 - + '%1'. This file already exists. '%1'. 此文件已经存在. - + Cannot create file 无法创建文件 - + Creation of file '%1' failed. 文件 '%1' 创建失败. - + Delete macro 删除宏 - + Do you really want to delete the macro '%1'? 是否确实要删除宏 '%1'? - + Do not show again 不再显示 - + Guided Walkthrough 指导式演练 - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1974,78 +1986,78 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 遍历,对话框1 / 2 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close 顺序执行以下指令:填充缺失的字段 (可选) 然后单击添加,然后关闭 - + Walkthrough, dialog 1 of 1 遍历,对话框1 / 1 - + Walkthrough, dialog 2 of 2 遍历,对话框2 / 2 - + Walkthrough instructions: Click right arrow button (->), then Close. 顺序执行以下指令:点击右箭头按钮 (->),然后关闭。 - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. 顺序执行以下指令:点击新建,然后右箭头按钮 (->),然后关闭。 - + Renaming Macro File 重命名宏文件 - - + + Enter new name: 输入新的名称: - - + + '%1' already exists. '%1' 已存在。 - + Rename Failed 重命名失败 - + Failed to rename to '%1'. Perhaps a file permission error? 无法重命名为 "%1"。 可能是文件权限错误? - + Duplicate Macro 复制宏 - + Duplicate Failed 复制失败 - + Failed to duplicate to '%1'. Perhaps a file permission error? 无法复制到"%1"。 @@ -4296,6 +4308,16 @@ horizontal space in Python console Save history 保存历史记录 + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4410,16 +4432,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: 顶部: - + Middle: 中间: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4442,7 +4489,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: 底部: @@ -4472,17 +4519,17 @@ Larger value eases to pick things, but can make small features impossible to sel 树状图活动元素背景色 - + Central: 中心: - + Midway: Midway: - + End: End: @@ -5459,22 +5506,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View 组合浏览器 - - - - Model - 模型 - - - - - Tasks - 任务 - Gui::DockWnd::PropertyDockView @@ -5701,12 +5736,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file 修改后的文件 - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5714,54 +5749,54 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document 未保存的文件 - + The document has been modified. Do you want to save your changes? 该文件已被修改. 是否要保存更改? - + FreeCAD macro FreeCAD 宏 - + Export PDF 导出PDF - + PDF file PDF 文件 - + untitled[*] 无标题[*] - + - Editor - Editor - + %1 chars removed 删除了 %1 个字符 - + %1 chars added 增加了 %1 个字符 - + Formatted 已格式化 @@ -5912,39 +5947,46 @@ Do you want to save your changes? Graphviz 创建图像失败 - + PNG format PNG 格式 - + Bitmap format Bitmap格式 - + GIF format GIF 格式 - + JPG format JPG 格式 - + SVG format SVG 格式 - - + + PDF format PDF 格式 - - + + + Graphviz format + Graphviz format + + + + + Export graph 导出图形 @@ -6105,7 +6147,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension 尺寸标注 @@ -6115,62 +6157,62 @@ Do you want to save your changes? 就绪 - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager 打开插件管理器 - + Close All 全部关闭 - - - + + + Toggles this toolbar 切换此工具栏 - - - + + + Toggles this dockable window 切换此可停靠的窗口 - + WARNING: This is a development version. 警告:这是一个开发版本。 - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document 未保存的文件 - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -6539,117 +6581,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit 系统退出 - + The application is still running. Do you want to exit without saving your data? 应用程序仍在运行. 是否要退出而不保存数据? - - - - + + + + Python console Python控制台 - + Unhandled PyCXX exception. 未处理的PyCXX异常. - + Unhandled FreeCAD exception. 未处理的FreeCAD异常. - + Unhandled std C++ exception. 未处理的标准c++异常. - + Unhandled unknown C++ exception. 未处理的未知c++异常. - + &Copy 复制(&C) - + &Copy command 复制命令(&C) - + &Copy history 复制历史(&C) - + Save history as... 历史记录另存为... - + Save history 保存历史记录 - + Saves Python history across %1 sessions Saves Python history across %1 sessions - + &Paste 粘贴(&P) - + Select All 全选 - + Clear console 清空控制台 - + Insert file name... 插入文件名... - + Word wrap 自动换行 - + Save History 保存历史记录 - + Macro Files 宏文件 - + Insert file name 插入文件名 - + All Files 所有文件 @@ -6734,22 +6776,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous 上一个 - + Next 下一个 - + Case sensitive 大小写敏感 - + Whole words 全字匹配 @@ -6864,17 +6906,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments 增加量 - + Translation Increment: 平移变化量: - + Rotation Increment: 旋转变化量: @@ -7699,37 +7741,42 @@ Do you want to specify another directory? QDockWidget - + Tree view 结构树浏览器 - + + Tasks + 任务 + + + Property view 属性浏览器 - + Selection view 选择浏览器 - - Combo View - 组合浏览器 + + Model + 模型 - + DAG View DAG视图 - + Report view 报告浏览器 - + Python console Python控制台 @@ -7805,12 +7852,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7851,71 +7898,71 @@ Do you want to specify another directory? 导出文件 - + Printing... 打印... - + Exporting PDF... 导出 PDF... - - + + Unsaved document 未保存的文件 - + The exported object contains external link. Please save the documentat least once before exporting. The exported object contains external link. Please save the documentat least once before exporting. - - + + Delete failed 删除失败 - + Dependency error 依赖关系错误 - + Copy selected 复制所选项 - + Copy active document 复制活动文档 - + Copy all documents 复制所有文档 - + Paste 粘贴 - + Expression error 表达式错误 - + Failed to parse some of the expressions. Please check the Report View for more details. Failed to parse some of the expressions. Please check the Report View for more details. - + Failed to paste expressions Failed to paste expressions @@ -8331,7 +8378,7 @@ Choose 'Abort' to abort 选择“中止”中止操作 - + Save Macro 保存宏 @@ -8398,7 +8445,7 @@ Please open a browser window and type in: http://localhost:%1. 无法打开您的系统浏览器. - + Options... 选项... @@ -8445,42 +8492,42 @@ Please open a browser window and type in: http://localhost:%1. 您要关闭此对话框吗? - + Do you want to save your changes to document '%1' before closing? 在关闭前要储存「%1」文档嘛? - + Do you want to save your changes to document before closing? Do you want to save your changes to document before closing? - + If you don't save, your changes will be lost. 如果您现在退出的话,您的更改将会丢失。 - + Apply answer to all 将选择应用于所有 - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? Some documents could not be saved. Do you want to cancel closing? - + Delete macro 删除宏 - + Not allowed to delete system-wide macros 不允取删除系统自有宏 @@ -8500,12 +8547,17 @@ Please open a browser window and type in: http://localhost:%1. %1 不是空的,一并删除其相关内容吗? - + Translation: 变换: - + + Translation XY: + Translation XY: + + + Rotation: 旋转: @@ -8714,7 +8766,7 @@ the current copy will be lost. Change image... - + Color Gradient Color Gradient @@ -8820,13 +8872,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... 对齐... - - + + Align the selected objects 对齐选定的对象 @@ -8904,13 +8956,13 @@ the current copy will be lost. StdCmdCopy - + C&opy 复制(&C) - - + + Copy operation 复制 @@ -8918,13 +8970,13 @@ the current copy will be lost. StdCmdCut - + &Cut 剪切(&C) - - + + Cut out 剪切 @@ -8932,13 +8984,13 @@ the current copy will be lost. StdCmdDelete - + &Delete 删除(&D) - - + + Deletes the selected objects 删除选中的对象 @@ -9086,13 +9138,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection 复制选择 - - + + Put duplicates of the selected objects to the active document 把选中对象的复制副本放到当前文档 @@ -9100,17 +9152,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode 切换编辑(&E)模式 - + Toggles the selected object's edit mode 切换所选对象的编辑模式 - + Activates or Deactivates the selected object's edit mode 激活或停用所选对象的编辑模式 @@ -9142,13 +9194,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions 表达式动作 - - + + Actions that apply to expressions Actions that apply to expressions @@ -9640,19 +9692,19 @@ the current copy will be lost. StdCmdNew - + &New 新建(&N) - - + + Create a new empty document 创建一个新空白文档 - + Unnamed 未命名 @@ -9735,13 +9787,13 @@ the current copy will be lost. StdCmdPaste - + &Paste 粘贴(&P) - - + + Paste operation 粘贴 @@ -9749,13 +9801,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... 定位... - - + + Place the selected objects 放置所选对象 @@ -9763,13 +9815,13 @@ the current copy will be lost. StdCmdPrint - + &Print... 打印(&P)... - - + + Print the document 打印文档 @@ -9777,13 +9829,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... 导出PDF(&E)... - - + + Export the document as PDF 将文档导出为 PDF @@ -9791,17 +9843,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... 打印预览(&P)... - + Print the document 打印文档 - + Print preview 打印预览 @@ -9809,13 +9861,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... 项目信息(&N)... - - + + Show details of the currently active project 显示当前项目详情 @@ -9823,13 +9875,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... 项目工具... - - + + Utility to extract or create project files 提取或创建项目文件的工具 @@ -9851,13 +9903,13 @@ the current copy will be lost. StdCmdQuit - + E&xit 退出(&X) - - + + Quits the application 退出程序 @@ -9907,13 +9959,13 @@ the current copy will be lost. StdCmdRedo - + &Redo 重做(&R) - - + + Redoes a previously undone action 重做上次撤消的操作 @@ -9921,13 +9973,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh 刷新(&R) - - + + Recomputes the current active document 重新计算当前文档 @@ -9949,13 +10001,13 @@ the current copy will be lost. StdCmdRevert - + Revert 还原 - - + + Reverts to the saved version of this file 还原至此文档保存的版本 @@ -9963,13 +10015,13 @@ the current copy will be lost. StdCmdSave - + &Save 保存(&S) - - + + Save the active document 保存当前文档 @@ -9977,13 +10029,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All 全部保存 - - + + Save all opened document 保存所有打开的文档 @@ -9991,13 +10043,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... 另存为(&A)... - - + + Save the active document under a new file name 使用新文件名保存当前文档 @@ -10005,13 +10057,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... 保存副本(&C)... - - + + Save a copy of the active document under a new file name 以新的文件名称保存目前活动文档的副本 @@ -10075,13 +10127,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All 全选(&A) - - + + Select all 全选 @@ -10313,13 +10365,13 @@ the current copy will be lost. StdCmdTransform - + Transform... 变换... - - + + Transform the geometry of selected objects 变换选中对象的图形 @@ -10327,13 +10379,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform 变换 - - + + Transform the selected object in the 3d view 变换三维视图中选定的对象 @@ -10397,13 +10449,13 @@ the current copy will be lost. StdCmdUndo - + &Undo 撤消(&U) - - + + Undo exactly one action 仅撤消一个操作 @@ -11203,7 +11255,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11214,7 +11266,7 @@ Are you sure you want to continue? - + Object dependencies 对象依赖关系 @@ -11303,12 +11355,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies 对象依赖关系 - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -11326,7 +11378,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11340,17 +11392,17 @@ Do you still want to proceed? Std_Revert - + Revert document 还原文件 - + This will discard all the changes since last file save. 这将放弃自上次文件保存以来的所有更改。 - + Do you want to continue? 是否继续? @@ -12012,23 +12064,15 @@ after FreeCAD launches Loads an image - - Gui::InteractiveScale - - - Enter desired distance between the points - Enter desired distance between the points - - NaviCubeDraggableCmd - + Movable navigation cube Movable navigation cube - + Drag and place NaviCube Drag and place NaviCube @@ -12498,77 +12542,72 @@ display the splash screen 管理首选项配置包 - + Small (%1px) 小 (%1px) - + Medium (%1px) 中(%1px) - + Large (%1px) 大 (%1px) - + Extra large (%1px) 特大 (%1px) - + Custom (%1px) 自定义 (%1px) - + Combo View 组合浏览器 - + TreeView and PropertyView 树状视图和属性视图 - - Both - 两者都是 - - - + Preference Pack Name 首选项配置包名称 - + Tags 标签 - + Apply 应用 - + Apply the %1 preference pack 应用 %1 首选项配置包 - + Choose a FreeCAD config file to import 选择要导入的 FreeCAD 配置文件 - + File exists 文件已存在 - + A preference pack with that name already exists. Overwrite? 已存在该名称的首选项配置包。是否覆盖? @@ -12870,4 +12909,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/Language/FreeCAD_zh-TW.ts b/src/Gui/Language/FreeCAD_zh-TW.ts index 816affbc4c..d1c741e564 100644 --- a/src/Gui/Language/FreeCAD_zh-TW.ts +++ b/src/Gui/Language/FreeCAD_zh-TW.ts @@ -122,12 +122,12 @@ 匯入 - + Delete 刪除 - + Paste expressions 貼上表示式 @@ -188,9 +188,9 @@ 佈置 + - Transform 轉換 @@ -220,7 +220,7 @@ 切換可能選項 - + Edit image 編輯影像 @@ -614,14 +614,6 @@ while doing a left or right click and move the mouse up or down 取消(&C) - - Gui::ControlSingleton - - - Task panel - 工作面板 - - Gui::DAG::Model @@ -1825,72 +1817,92 @@ same time. The one with the highest priority will be triggered. 巨集名稱: - + + Find file: + Find file: + + + + Case-insensitive search for filenames, regular expressions supported + Case-insensitive search for filenames, regular expressions supported + + + + Find in files: + Find in files: + + + + Filter by case-insensitive file content, regular expressions supported + Filter by case-insensitive file content, regular expressions supported + + + User macros 使用者自訂巨集 - + System macros 系統自有巨集 - + Execute 執行 - + Close 關閉 - + Create 建立 - + Delete 刪除 - + Edit 編輯 - + Rename 重新命名 - + Duplicate 複製 - + Launch a guide on how to set up a macro in a custom global toolbar. Launch a guide on how to set up a macro in a custom global toolbar. - + Toolbar 工具列 - + Open Addon Manager where macros created by the community and other addons can be downloaded. Open Addon Manager where macros created by the community and other addons can be downloaded. - + Download 下載 - + User macros location: 使用者自訂巨集之位置: @@ -1898,71 +1910,71 @@ same time. The one with the highest priority will be triggered. Gui::Dialog::DlgMacroExecuteImp - - + + Macros 巨集 - + Read-only 唯讀 - + Macro file 巨集檔案 - + Enter a file name, please: 請輸入檔案名稱: - - - + + + Existing file 現有檔案 - + '%1'. This file already exists. '%1'.該檔案已存在。 - + Cannot create file 無法建立檔案 - + Creation of file '%1' failed. 檔案「%1」建立失敗。 - + Delete macro 刪除巨集 - + Do you really want to delete the macro '%1'? 您確定要刪除 '%1' 的巨集嗎? - + Do not show again 不再顯示 - + Guided Walkthrough 指導式演練 - + This will guide you in setting up this macro in a custom global toolbar. Instructions will be in red text inside the dialog. Note: your changes will be applied when you next switch workbenches @@ -1973,77 +1985,77 @@ Note: your changes will be applied when you next switch workbenches - + Walkthrough, dialog 1 of 2 演練, 對話方塊2之1 - + Walkthrough instructions: Fill in missing fields (optional) then click Add, then Close 演練指令: 填入遺失的欄位(選擇性) 然後點選新增, 然後關閉 - + Walkthrough, dialog 1 of 1 演練, 對話方塊1之1 - + Walkthrough, dialog 2 of 2 演練, 對話方塊2之2 - + Walkthrough instructions: Click right arrow button (->), then Close. 演練指令: 點選右邊的箭頭按鈕 (->), 然後關閉. - + Walkthrough instructions: Click New, then right arrow (->) button, then Close. 演練指令: 點選新增, 然後右邊的箭頭 (->) 按鈕, 然後關閉. - + Renaming Macro File 重新命名巨集 - - + + Enter new name: 輸入新名稱: - - + + '%1' already exists. '%1' 已存在 - + Rename Failed 無法重新命名 - + Failed to rename to '%1'. Perhaps a file permission error? 無法重新命名為'%1'。可能是檔案許可設定錯誤? - + Duplicate Macro 複製巨集 - + Duplicate Failed 複製失敗 - + Failed to duplicate to '%1'. Perhaps a file permission error? 複製到 '%1' 失敗。 @@ -4307,6 +4319,16 @@ horizontal space in Python console Save history 儲存歷史紀錄 + + + Python profiler interval (milliseconds): + Python profiler interval (milliseconds): + + + + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + The interval at which the profiler runs when there's Python code running (to keep the GUI responding). Set to 0 to disable. + Gui::Dialog::DlgSettingsSelection @@ -4421,16 +4443,41 @@ Larger value eases to pick things, but can make small features impossible to sel - + Top: Top: - + Middle: Middle: + + + Color Bar + Color Bar + + + + Label text color + Label text color + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + Label text size + Label text size + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Color Bar (used in Mesh and FEM Wbs) Label Text Size + Switches the colors of the gradient @@ -4453,7 +4500,7 @@ Larger value eases to pick things, but can make small features impossible to sel - + Bottom: Bottom: @@ -4483,17 +4530,17 @@ Larger value eases to pick things, but can make small features impossible to sel 樹狀圖裡選定中容器的背景色彩 - + Central: 中央: - + Midway: 中途: - + End: 終點: @@ -5470,22 +5517,10 @@ originally selected prior to opening this dialog Gui::DockWnd::ComboView - + Combo View 複合檢視 - - - - Model - 模型 - - - - - Tasks - 任務 - Gui::DockWnd::PropertyDockView @@ -5712,12 +5747,12 @@ originally selected prior to opening this dialog Gui::EditorView - + Modified file 已修改檔案 - + %1. This has been modified outside of the source editor. Do you want to reload it? @@ -5726,53 +5761,53 @@ This has been modified outside of the source editor. Do you want to reload it? - + Unsaved document 未儲存文件 - + The document has been modified. Do you want to save your changes? 該文件已被修改。您想儲存您的變更嗎? - + FreeCAD macro FreeCAD巨集 - + Export PDF 匯出 PDF - + PDF file PDF 檔 - + untitled[*] 未命名[*] - + - Editor -編輯器 - + %1 chars removed 移除 %1 字元 - + %1 chars added 添加 %1 字元 - + Formatted 格式化了的 @@ -5923,39 +5958,46 @@ Do you want to save your changes? Graphviz建立影像失敗 - + PNG format PNG 格式 - + Bitmap format 點陣圖格式 - + GIF format GIF 格式 - + JPG format JPG 格式 - + SVG format SVG 格式 - - + + PDF format PDF 格式 - - + + + Graphviz format + Graphviz format + + + + + Export graph 匯出圖形 @@ -6116,7 +6158,7 @@ Do you want to save your changes? Gui::MainWindow - + Dimension 標註 @@ -6126,62 +6168,62 @@ Do you want to save your changes? 就緒 - + Help addon needed! Help addon needed! - + The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager The Help system of %1 is now handled by the "Help" addon. It can easily be installed via the Addons Manager - + Open Addon Manager Open Addon Manager - + Close All 全部關閉 - - - + + + Toggles this toolbar 切換此工具列 - - - + + + Toggles this dockable window 切換此可停靠的視窗 - + WARNING: This is a development version. WARNING: This is a development version. - + Please do not use it in a production environment. Please do not use it in a production environment. - - + + Unsaved document 未儲存文件 - + The exported object contains external link. Please save the documentat least once before exporting. 匯出的物件包含外部連結。請在匯出前至少儲存一次文件。 - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -6550,117 +6592,117 @@ How do you want to proceed? Gui::PythonConsole - + System exit 離開系統 - + The application is still running. Do you want to exit without saving your data? 該程式仍在執行, 您要離開而不儲存資料嗎? - - - - + + + + Python console Python 主控台 - + Unhandled PyCXX exception. 未處理 PyCXX例外。 - + Unhandled FreeCAD exception. 未處理FreeCAD例外。 - + Unhandled std C++ exception. 未處理的標準 c + + 異常。 - + Unhandled unknown C++ exception. 未處理未知的C++例外。 - + &Copy 複製(&C) - + &Copy command 複製指令(&C) - + &Copy history 複製歷史(&C) - + Save history as... 另存歷史為新檔... - + Save history 儲存歷史紀錄 - + Saves Python history across %1 sessions Saves Python history across %1 sessions - + &Paste &貼上 - + Select All 全選 - + Clear console 清除主控台 - + Insert file name... 插入檔案名稱... - + Word wrap 自動換行 - + Save History 儲存歷史記錄 - + Macro Files 巨集檔 - + Insert file name 插入檔案名稱 - + All Files 所有檔案 @@ -6745,22 +6787,22 @@ Do you want to exit without saving your data? Gui::SearchBar - + Previous 上一個 - + Next Next - + Case sensitive Case sensitive - + Whole words Whole words @@ -6873,17 +6915,17 @@ Do you want to specify another directory? Gui::TaskCSysDragger - + Increments 增加量 - + Translation Increment: Translation Increment: - + Rotation Increment: Rotation Increment: @@ -7708,37 +7750,42 @@ Do you want to specify another directory? QDockWidget - + Tree view 樹狀檢視 - + + Tasks + 任務 + + + Property view 屬性檢視 - + Selection view 選擇視圖 - - Combo View - 複合檢視 + + Model + 模型 - + DAG View DAG視圖 - + Report view 報告檢視 - + Python console Python 主控台 @@ -7814,12 +7861,12 @@ Do you want to specify another directory? %1 - + This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. This system is running OpenGL %1.%2. FreeCAD requires OpenGL 2.0 or above. Please upgrade your graphics driver and/or card as required. - + Invalid OpenGL Version Invalid OpenGL Version @@ -7860,71 +7907,71 @@ Do you want to specify another directory? 匯出檔案 - + Printing... 列印... - + Exporting PDF... 匯出 PDF... - - + + Unsaved document 未儲存文件 - + The exported object contains external link. Please save the documentat least once before exporting. 匯出的物件包含外部連結。請在匯出前至少儲存一次文件。 - - + + Delete failed Delete failed - + Dependency error Dependency error - + Copy selected Copy selected - + Copy active document 複製作業中文件 - + Copy all documents Copy all documents - + Paste 貼上 - + Expression error 表示式錯誤 - + Failed to parse some of the expressions. Please check the Report View for more details. 無法解析某些表示式。 請檢視報告視窗以獲得更多細節。 - + Failed to paste expressions 無法貼上表示式 @@ -8334,7 +8381,7 @@ Choose 'Abort' to abort 選擇「中止」以中止操作。 - + Save Macro 儲存巨集 @@ -8401,7 +8448,7 @@ Please open a browser window and type in: http://localhost:%1. 無法打開您的系統瀏覽器。 - + Options... 選項 ... @@ -8448,42 +8495,42 @@ Please open a browser window and type in: http://localhost:%1. 您確定要關閉此對話窗嗎? - + Do you want to save your changes to document '%1' before closing? 於關閉前要儲存「%1」檔嘛? - + Do you want to save your changes to document before closing? 您是否在關閉前要儲存改變至此文件? - + If you don't save, your changes will be lost. 若不儲存將會失去所有修改 - + Apply answer to all Apply answer to all - + %1 Document(s) not saved %1 Document(s) not saved - + Some documents could not be saved. Do you want to cancel closing? 某些文件無法被儲存。請問您是否要關閉它? - + Delete macro 刪除巨集 - + Not allowed to delete system-wide macros 不允取刪除系統自有之巨集 @@ -8503,12 +8550,17 @@ Please open a browser window and type in: http://localhost:%1. %1內尚有內容,確定要刪除嗎? - + Translation: 轉移: - + + Translation XY: + Translation XY: + + + Rotation: 旋轉: @@ -8714,7 +8766,7 @@ the current copy will be lost. 變更影像... - + Color Gradient 顏色漸層 @@ -8820,13 +8872,13 @@ the current copy will be lost. StdCmdAlignment - + Alignment... 對齊... - - + + Align the selected objects 對齊選定物件 @@ -8904,13 +8956,13 @@ the current copy will be lost. StdCmdCopy - + C&opy 複製(&C) - - + + Copy operation 複製 @@ -8918,13 +8970,13 @@ the current copy will be lost. StdCmdCut - + &Cut 剪下(&C) - - + + Cut out 剪下 @@ -8932,13 +8984,13 @@ the current copy will be lost. StdCmdDelete - + &Delete 刪除(&D) - - + + Deletes the selected objects 刪除所選的物件 @@ -9086,13 +9138,13 @@ the current copy will be lost. StdCmdDuplicateSelection - + Duplicate selection 複製選定物件 - - + + Put duplicates of the selected objects to the active document 將所選物件的副本放置到作業中文件 @@ -9100,17 +9152,17 @@ the current copy will be lost. StdCmdEdit - + Toggle &Edit mode 切換&編輯模式 - + Toggles the selected object's edit mode 切換所選的物件的編輯模式 - + Activates or Deactivates the selected object's edit mode Activates or Deactivates the selected object's edit mode @@ -9142,13 +9194,13 @@ the current copy will be lost. StdCmdExpression - + Expression actions 表示式動作 - - + + Actions that apply to expressions 套用在表示式的動作 @@ -9640,19 +9692,19 @@ the current copy will be lost. StdCmdNew - + &New 新增(&N) - - + + Create a new empty document 建立一個新的空白檔案 - + Unnamed 未命名 @@ -9735,13 +9787,13 @@ the current copy will be lost. StdCmdPaste - + &Paste &貼上 - - + + Paste operation 貼上 @@ -9749,13 +9801,13 @@ the current copy will be lost. StdCmdPlacement - + Placement... 放置... - - + + Place the selected objects 放置所選物件 @@ -9763,13 +9815,13 @@ the current copy will be lost. StdCmdPrint - + &Print... 列印(&P)... - - + + Print the document 列印文件 @@ -9777,13 +9829,13 @@ the current copy will be lost. StdCmdPrintPdf - + &Export PDF... 匯出PDF(&E)... - - + + Export the document as PDF 將文件匯出為 PDF @@ -9791,17 +9843,17 @@ the current copy will be lost. StdCmdPrintPreview - + &Print preview... &預覽列印 - + Print the document 列印文件 - + Print preview 預覽列印 @@ -9809,13 +9861,13 @@ the current copy will be lost. StdCmdProjectInfo - + Project i&nformation... 專案訊息(&N)... - - + + Show details of the currently active project 顯示目前作業中專案的詳細資訊 @@ -9823,13 +9875,13 @@ the current copy will be lost. StdCmdProjectUtil - + Project utility... 專案工具... - - + + Utility to extract or create project files 提取或建立專案檔之工具 @@ -9851,13 +9903,13 @@ the current copy will be lost. StdCmdQuit - + E&xit 退出(&E) - - + + Quits the application 退出應用程式 @@ -9907,13 +9959,13 @@ the current copy will be lost. StdCmdRedo - + &Redo 重作(&R) - - + + Redoes a previously undone action 重做上次撤銷的操作 @@ -9921,13 +9973,13 @@ the current copy will be lost. StdCmdRefresh - + &Refresh 重新運算(&R) - - + + Recomputes the current active document 重新計算目前作業中文件 @@ -9949,13 +10001,13 @@ the current copy will be lost. StdCmdRevert - + Revert 還原 - - + + Reverts to the saved version of this file 還原至此檔儲存之版本 @@ -9963,13 +10015,13 @@ the current copy will be lost. StdCmdSave - + &Save 儲存(&S) - - + + Save the active document 儲存作業中文件 @@ -9977,13 +10029,13 @@ the current copy will be lost. StdCmdSaveAll - + Save All 全部儲存 - - + + Save all opened document 儲存所有開啟的文件 @@ -9991,13 +10043,13 @@ the current copy will be lost. StdCmdSaveAs - + Save &As... 另存新檔(&A)... - - + + Save the active document under a new file name 將作業中文件以新的檔名儲存 @@ -10005,13 +10057,13 @@ the current copy will be lost. StdCmdSaveCopy - + Save a &Copy... 儲存副本(&C)... - - + + Save a copy of the active document under a new file name 以新的檔案名稱儲存作業中文件的副本 @@ -10075,13 +10127,13 @@ the current copy will be lost. StdCmdSelectAll - + Select &All 全選(&A) - - + + Select all 全選 @@ -10313,13 +10365,13 @@ the current copy will be lost. StdCmdTransform - + Transform... 變換... - - + + Transform the geometry of selected objects 所選物件的幾何變換 @@ -10327,13 +10379,13 @@ the current copy will be lost. StdCmdTransformManip - + Transform 轉換 - - + + Transform the selected object in the 3d view 轉換3D視圖中所選物件 @@ -10397,13 +10449,13 @@ the current copy will be lost. StdCmdUndo - + &Undo 復原(&U) - - + + Undo exactly one action 完全撤消一個動作 @@ -11203,7 +11255,7 @@ the current copy will be lost. Std_Delete - + The following referencing objects might break. Are you sure you want to continue? @@ -11214,7 +11266,7 @@ Are you sure you want to continue? - + Object dependencies 物件相依 @@ -11303,12 +11355,12 @@ Are you sure you want to continue? Std_DuplicateSelection - + Object dependencies 物件相依 - + To link to external objects, the document must be saved at least once. Do you want to save the document now? To link to external objects, the document must be saved at least once. @@ -11326,7 +11378,7 @@ Do you want to save the document now? Std_Refresh - + The document contains dependency cycles. Please check the Report View for more details. @@ -11340,17 +11392,17 @@ Do you still want to proceed? Std_Revert - + Revert document 還原檔案 - + This will discard all the changes since last file save. 這將會放棄自前次儲存檔案後所有的變更 - + Do you want to continue? 您要繼續嗎? @@ -12012,23 +12064,15 @@ after FreeCAD launches 載入一張影像 - - Gui::InteractiveScale - - - Enter desired distance between the points - 輸入兩個點間的所需距離 - - NaviCubeDraggableCmd - + Movable navigation cube 可移動的導航方塊 - + Drag and place NaviCube 拖放導航方塊 @@ -12497,77 +12541,72 @@ display the splash screen 管理偏好設定包 - + Small (%1px) 小 (%1px) - + Medium (%1px) 中 (%1px) - + Large (%1px) 大 (%1px) - + Extra large (%1px) 超大 (%1px) - + Custom (%1px) 自訂 (%1px) - + Combo View 複合檢視 - + TreeView and PropertyView 樹狀圖檢視及屬性檢視 - - Both - 兩者 - - - + Preference Pack Name 偏好設定包名稱 - + Tags 標籤 - + Apply 應用 - + Apply the %1 preference pack 套用 %1 之偏好設定包 - + Choose a FreeCAD config file to import 還擇一個 FreeCAD 設定檔以匯入 - + File exists 檔案已存在 - + A preference pack with that name already exists. Overwrite? 有此名稱之偏好設定包已存在。是否覆寫? @@ -12875,4 +12914,18 @@ You can now use Theme to get a full customization of the interface.All selection filters cleared + + StdCmdExportDependencyGraph + + + Export dependency graph... + Export dependency graph... + + + + + Export the dependency graph to a file + Export the dependency graph to a file + + diff --git a/src/Gui/NaviCube.cpp b/src/Gui/NaviCube.cpp index a9ac7fed92..92389f736e 100644 --- a/src/Gui/NaviCube.cpp +++ b/src/Gui/NaviCube.cpp @@ -948,6 +948,12 @@ SbRotation NaviCubeImplementation::getNearestOrientation(PickId pickId) { SbVec3f standardZ; standardOrientation.multVec(SbVec3f(0, 0, 1), standardZ); + // Cleanup near zero values + for (int i = 0; i < 3; i++) { + if (abs(standardZ[i]) < 1e-6) standardZ[i] = 0.0F; + } + standardZ.normalize(); + // Rotate the camera to the selected face by the smallest angle to align the z-axis SbRotation intermediateOrientation = cameraOrientation * SbRotation(cameraZ, standardZ); @@ -957,26 +963,77 @@ SbRotation NaviCubeImplementation::getNearestOrientation(PickId pickId) { SbRotation rotation = intermediateOrientation.inverse() * standardOrientation; rotation.getValue(axis, angle); + // Make sure the found axis aligns with the standardZ axis + if (standardZ.dot(axis) < 0) { + axis.negate(); + angle *= -1; + } + + static const float pi = boost::math::constants::pi(); + static const float pi2 = boost::math::constants::two_pi(); + static const float pi1_2 = boost::math::constants::half_pi(); + static const float pi1_3 = boost::math::constants::third_pi(); + static const float pi2_3 = boost::math::constants::two_thirds_pi(); + + // Make angle positive + if (angle < 0) { + angle += pi2; + } + // f is a small value used to control orientation priority when the camera is almost exactly between two // orientations (e.g. +45 and -45 degrees). The standard orientation is preferred compared to // +90 and -90 degree orientations and the +90 and -90 degree orientations are preferred compared to an // upside down standard orientation - float f = angle > M_PI ? 0.00001 : -0.00001; + float f = 0.00001F; // Find the angle to rotate to the nearest orientation if (m_Faces[pickId].type == ShapeId::Corner) { // 6 possible orientations for the corners - angle = angle - floor((angle + f + M_PI / 6.0) / (M_PI / 3.0)) * (M_PI / 3.0); + if (angle <= (M_PI / 6 + f)) { + angle = 0; + } + else if (angle <= (M_PI_2 + f)) { + angle = pi1_3; + } + else if (angle < (5 * M_PI / 6 - f)) { + angle = pi2_3; + } + else if (angle <= (M_PI + M_PI / 6 + f)) { + angle = pi; + } + else if (angle < (M_PI + M_PI_2 - f)) { + angle = pi + pi1_3; + } + else if (angle < (M_PI + 5 * M_PI / 6 - f)) { + angle = pi + pi2_3; + } + else { + angle = 0; + } } else { // 4 possible orientations for the main and edge faces - angle = angle - floor((angle + f + M_PI_4) / M_PI_2) * M_PI_2; + if (angle <= (M_PI_4 + f)) { + angle = 0; + } + else if (angle <= (3 * M_PI_4 + f)) { + angle = pi1_2; + } + else if (angle < (M_PI + M_PI_4 - f)) { + angle = pi; + } + else if (angle < (M_PI + 3 * M_PI_4 - f)) { + angle = pi + pi1_2; + } + else { + angle = 0; + } } - // Set the rotation to go from the intermediateOrientation to the nearest orientation - rotation.setValue(axis, angle); + // Set the rotation to go from the standard orientation to the nearest orientation + rotation.setValue(standardZ, angle); - return intermediateOrientation * rotation; + return standardOrientation * rotation.inverse(); } bool NaviCubeImplementation::mouseReleased(short x, short y) diff --git a/src/Gui/NavigationAnimation.cpp b/src/Gui/NavigationAnimation.cpp new file mode 100644 index 0000000000..5f62366054 --- /dev/null +++ b/src/Gui/NavigationAnimation.cpp @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/**************************************************************************** + * * + * Copyright (c) 2023 Bas Ruigrok (Rexbas) * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + ***************************************************************************/ + +#include "PreCompiled.h" +#include "NavigationAnimation.h" +#include + +using namespace Gui; + +NavigationAnimation::NavigationAnimation(NavigationStyle* navigation) + : navigation(navigation), started(false) +{} + +void NavigationAnimation::startAnimation(QAbstractAnimation::DeletionPolicy policy) +{ + started = true; + QAbstractAnimation::start(policy); +} + +void NavigationAnimation::updateCurrentValue(const QVariant& value) +{ + if (!started) { + return; + } + update(value); +} + +void NavigationAnimation::stopAnimation() +{ + QAbstractAnimation::stop(); +} + +FixedTimeAnimation::FixedTimeAnimation(NavigationStyle* navigation, const SbRotation& orientation, + const SbVec3f& rotationCenter, const SbVec3f& translation, + int duration) + : NavigationAnimation(navigation) + , targetOrientation(orientation) + , targetTranslation(translation) + , rotationCenter(rotationCenter) +{ + setDuration(duration); + setStartValue(0.0); + setEndValue(duration * 1.0); +} + +void FixedTimeAnimation::initialize() +{ + prevAngle = 0; + prevTranslation = SbVec3f(0, 0, 0); + + // Find an axis and angle to rotate from the camera orientation to the target orientation using post-multiplication + SbVec3f rotationAxisPost; + float angle; + SbRotation(navigation->getCamera()->orientation.getValue().inverse() * targetOrientation).getValue(rotationAxisPost, angle); + if (angle > M_PI) { + angle -= 2 * M_PI; + } + + // Convert post-multiplication axis to a pre-multiplication axis + navigation->getCamera()->orientation.getValue().inverse().multVec(rotationAxisPost, rotationAxis); + + angularVelocity = angle / duration(); + linearVelocity = targetTranslation / duration(); +} + +/** + * @param value The elapsed time + */ +void FixedTimeAnimation::update(const QVariant& value) +{ + float angle = value.toFloat() * angularVelocity; + SbVec3f translation = value.toFloat() * linearVelocity; + + SbRotation rotation(rotationAxis, angle - prevAngle); + + navigation->reorientCamera(navigation->getCamera(), rotation, rotationCenter); + navigation->getCamera()->position = navigation->getCamera()->position.getValue() + translation - prevTranslation; + + prevAngle = angle; + prevTranslation = translation; +} + +/** + * @param navigation The navigation style + * @param axis The rotation axis in screen coordinates + * @param velocity The angular velocity in radians per second + */ +SpinningAnimation::SpinningAnimation(NavigationStyle* navigation, const SbVec3f& axis, + float velocity) + : NavigationAnimation(navigation) + , rotationAxis(axis) +{ + setDuration((2 * M_PI / velocity) * 1000.0); + setStartValue(0.0); + setEndValue(2 * M_PI); + setLoopCount(-1); +} + +void SpinningAnimation::initialize() +{ + prevAngle = 0; + + navigation->setViewing(true); + navigation->setViewingMode(NavigationStyle::SPINNING); +} + +/** + * @param value The angle in radians + */ +void SpinningAnimation::update(const QVariant& value) +{ + SbRotation deltaRotation = SbRotation(rotationAxis, value.toFloat() - prevAngle); + navigation->reorientCamera(navigation->getCamera(), deltaRotation); + + prevAngle = value.toFloat(); +} + +void SpinningAnimation::stopAnimation() +{ + NavigationAnimation::stopAnimation(); + if (navigation->getViewingMode() != NavigationStyle::SPINNING) { + return; + } + navigation->setViewingMode(navigation->isViewing() ? NavigationStyle::IDLE : NavigationStyle::INTERACT); +} diff --git a/src/Gui/NavigationAnimation.h b/src/Gui/NavigationAnimation.h new file mode 100644 index 0000000000..0488db5ed6 --- /dev/null +++ b/src/Gui/NavigationAnimation.h @@ -0,0 +1,96 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/**************************************************************************** + * * + * Copyright (c) 2023 Bas Ruigrok (Rexbas) * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + ***************************************************************************/ + +#ifndef GUI_NAVIGATIONANIMATION_H +#define GUI_NAVIGATIONANIMATION_H + +#include "NavigationStyle.h" +#include +#include +#include + +namespace Gui +{ + +class GuiExport NavigationAnimation : protected QVariantAnimation +{ +public: + explicit NavigationAnimation(NavigationStyle* navigation); + +protected: + NavigationStyle* navigation; + + virtual void initialize() = 0; + virtual void update(const QVariant& value) = 0; + virtual void stopAnimation(); + +private: + bool started; + + void startAnimation(QAbstractAnimation::DeletionPolicy policy = KeepWhenStopped); + void updateCurrentValue(const QVariant& value) override; + + friend class NavigationAnimator; +}; + +class GuiExport FixedTimeAnimation : public NavigationAnimation +{ +public: + explicit FixedTimeAnimation(NavigationStyle* navigation, const SbRotation& orientation, + const SbVec3f& rotationCenter, const SbVec3f& translation, + int duration); + +private: + float angularVelocity; // [rad/ms] + SbVec3f linearVelocity; // [/ms] + + SbRotation targetOrientation; + SbVec3f targetTranslation; + + float prevAngle; + SbVec3f prevTranslation; + + SbVec3f rotationCenter; + SbVec3f rotationAxis; + + void initialize() override; + void update(const QVariant& value) override; +}; + +class GuiExport SpinningAnimation : public NavigationAnimation +{ +public: + explicit SpinningAnimation(NavigationStyle* navigation, const SbVec3f& axis, float velocity); + +private: + SbVec3f rotationAxis; + float prevAngle; + + void initialize() override; + void update(const QVariant& value) override; + void stopAnimation() override; +}; + +} // namespace Gui + +#endif // GUI_NAVIGATIONANIMATION_H diff --git a/src/Gui/NavigationAnimator.cpp b/src/Gui/NavigationAnimator.cpp new file mode 100644 index 0000000000..0060952746 --- /dev/null +++ b/src/Gui/NavigationAnimator.cpp @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/**************************************************************************** + * * + * Copyright (c) 2023 Bas Ruigrok (Rexbas) * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + ***************************************************************************/ + +#include "PreCompiled.h" +#include "NavigationAnimator.h" +#include "NavigationAnimation.h" +#include + +using namespace Gui; + +NavigationAnimator::NavigationAnimator() + : activeAnimation(nullptr) +{} + +NavigationAnimator::~NavigationAnimator() +{ + stop(); +} + +/** + * @brief Start an animation + * + * @param animation The animation to start + */ +void NavigationAnimator::start(const std::shared_ptr& animation) +{ + stop(); + activeAnimation = animation; + activeAnimation->initialize(); + + connect(activeAnimation.get(), &NavigationAnimation::finished, this, &NavigationAnimator::reset); + activeAnimation->startAnimation(); +} + +/** + * @brief Start an animation and wait for it to finish + * + * @param animation The animation to start + * @return True if the animation finished, false if interrupted + */ +bool NavigationAnimator::startAndWait(const std::shared_ptr& animation) +{ + stop(); + bool finished = true; + QEventLoop loop; + loop.connect(animation.get(), &NavigationAnimation::finished, + [&loop, &finished, &animation]() { // clazy:exclude=lambda-in-connect + if (animation->state() == QAbstractAnimation::State::Running) { + finished = false; + } + + loop.quit(); + }); + start(animation); + loop.exec(); + return finished; +} + +/** + * @brief Stops an active animation + */ +void NavigationAnimator::stop() +{ + if (activeAnimation != nullptr && activeAnimation->state() != QAbstractAnimation::State::Stopped) { + Q_EMIT activeAnimation->finished(); + } +} + +/** + * @brief Stops the animation and releases ownership of the animation + * + * Is called when the animation finished() signal is received which is triggered when the animation + * is finished or when the animation is interrupted by NavigationAnimator::stop() + */ +void NavigationAnimator::reset() { + activeAnimation->started = false; + activeAnimation->stopAnimation(); + activeAnimation.reset(); +} diff --git a/src/Gui/NavigationAnimator.h b/src/Gui/NavigationAnimator.h new file mode 100644 index 0000000000..d3d654560f --- /dev/null +++ b/src/Gui/NavigationAnimator.h @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later +/**************************************************************************** + * * + * Copyright (c) 2023 Bas Ruigrok (Rexbas) * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + ***************************************************************************/ + +#ifndef GUI_NAVIGATIONANIMATOR_H +#define GUI_NAVIGATIONANIMATOR_H + +#include "NavigationStyle.h" +#include +#include + +namespace Gui +{ + +class NavigationAnimation; + +class GuiExport NavigationAnimator : public QObject +{ + Q_OBJECT +public: + NavigationAnimator(); + ~NavigationAnimator(); + void start(const std::shared_ptr& animation); + bool startAndWait(const std::shared_ptr& animation); + void stop(); + +private Q_SLOTS: + void reset(); + +private: + std::shared_ptr activeAnimation; +}; + +} // namespace Gui + +#endif // GUI_NAVIGATIONANIMATOR_H diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index e3490ead43..54e799ae0b 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -45,40 +45,13 @@ #include "Application.h" #include "MenuManager.h" #include "MouseSelection.h" +#include "NavigationAnimator.h" +#include "NavigationAnimation.h" #include "SoMouseWheelEvent.h" #include "View3DInventorViewer.h" - using namespace Gui; -namespace Gui { -struct NavigationStyleP { - int animationsteps; - int animationdelta; - SbVec3f focal1, focal2; - SbVec3f rotationCenter; - SbBool rotationCenterFound; - NavigationStyle::RotationCenterModes rotationCenterMode; - SbRotation endRotation; - SoTimerSensor * animsensor; - float sensitivity; - SbBool resetcursorpos; - - NavigationStyleP() - { - this->animationsteps = 0; - this->animationdelta = 0; - this->animsensor = nullptr; - this->sensitivity = 2.0f; - this->resetcursorpos = false; - this->rotationCenterFound = false; - this->rotationCenterMode = NavigationStyle::RotationCenterMode::ScenePointAtCursor | - NavigationStyle::RotationCenterMode::FocalPointAtCursor; - } - static void viewAnimationCB(void * data, SoSensor * sensor); -}; -} - class FCSphereSheetProjector : public SbSphereSheetProjector { using inherited = SbSphereSheetProjector; @@ -184,25 +157,19 @@ const Base::Type& NavigationStyleEvent::style() const return t; } -#define PRIVATE(ptr) (ptr->pimpl) -#define PUBLIC(ptr) (ptr->pub) - TYPESYSTEM_SOURCE_ABSTRACT(Gui::NavigationStyle,Base::BaseClass) NavigationStyle::NavigationStyle() : viewer(nullptr), mouseSelection(nullptr) { - PRIVATE(this) = new NavigationStyleP(); - PRIVATE(this)->animsensor = new SoTimerSensor(NavigationStyleP::viewAnimationCB, this); + this->rotationCenterMode = NavigationStyle::RotationCenterMode::ScenePointAtCursor + | NavigationStyle::RotationCenterMode::FocalPointAtCursor; initialize(); } NavigationStyle::~NavigationStyle() { finalize(); - if (PRIVATE(this)->animsensor->isScheduled()) - PRIVATE(this)->animsensor->unschedule(); - delete PRIVATE(this)->animsensor; - delete PRIVATE(this); + delete this->animator; } NavigationStyle& NavigationStyle::operator = (const NavigationStyle& ns) @@ -222,12 +189,15 @@ void NavigationStyle::setViewer(View3DInventorViewer* view) void NavigationStyle::initialize() { + this->animator = new NavigationAnimator(); + + this->sensitivity = 2.0f; + this->resetcursorpos = false; this->currentmode = NavigationStyle::IDLE; - this->prevRedrawTime = SbTime::getTimeOfDay(); this->spinanimatingallowed = true; this->spinsamplecounter = 0; this->spinincrement = SbRotation::identity(); - this->spinRotation.setValue(SbVec3f(0, 0, -1), 0); + this->rotationCenterFound = false; // FIXME: use a smaller sphere than the default one to have a larger // area close to the borders that gives us "z-axis rotation"? @@ -353,171 +323,71 @@ SbBool NavigationStyle::lookAtPoint(const SbVec2s screenpos) SbVec3f hitpoint; hitpoint = picked->getPoint(); - lookAtPoint(hitpoint); + this->rotationCenterFound = false; + translateCamera(hitpoint - getFocalPoint()); return true; } -void NavigationStyle::lookAtPoint(const SbVec3f& pos) +SoCamera* NavigationStyle::getCamera() const { - SoCamera* cam = viewer->getSoRenderManager()->getCamera(); - if (!cam) - return; - PRIVATE(this)->rotationCenterFound = false; - - // Find global coordinates of focal point. - SbVec3f direction; - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - PRIVATE(this)->focal1 = cam->position.getValue() + - cam->focalDistance.getValue() * direction; - PRIVATE(this)->focal2 = pos; - - // avoid to interfere with spinning (fixes #3101462) - if (this->isAnimating()) - this->stopAnimating(); - - if (PRIVATE(this)->animsensor->isScheduled()) { - PRIVATE(this)->animsensor->unschedule(); - this->interactiveCountDec(); - } - - if (isAnimationEnabled()) { - SbRotation cam_rot = cam->orientation.getValue(); - // get the amount of movement - SbVec3f dir1 = direction, dir2; - dir2 = pos - cam->position.getValue(); - dir2.normalize(); - SbRotation rot(dir1, dir2); - float val = 0.5f*(1.0f + dir1.dot(dir2)); // value in range [0,1] - int div = (int)(val * 20.0f); - int steps = 20-div; // do it with max. 20 steps - - // check whether a movement is required - if (steps > 0) { - PRIVATE(this)->endRotation = cam_rot; - this->spinRotation = cam_rot; - PRIVATE(this)->animationsteps = 5; - PRIVATE(this)->animationdelta = std::max(100/steps, 5); - PRIVATE(this)->animsensor->setBaseTime(SbTime::getTimeOfDay()); - PRIVATE(this)->animsensor->schedule(); - this->interactiveCountInc(); - } - else { - // set to the given position - SbVec3f direction; - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - cam->position = pos - cam->focalDistance.getValue() * direction; - } - } - else { - // set to the given position - SbVec3f direction; - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - cam->position = pos - cam->focalDistance.getValue() * direction; - } + return this->viewer->getCamera(); } -void NavigationStyle::setCameraOrientation(const SbRotation& rot, SbBool moveToCenter) +void NavigationStyle::setCameraOrientation(const SbRotation& orientation, SbBool moveToCenter) { - SoCamera* cam = viewer->getSoRenderManager()->getCamera(); - if (!cam) + SoCamera* camera = getCamera(); + if (!camera) return; - // Find global coordinates of focal point. - SbVec3f direction; - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - PRIVATE(this)->focal1 = cam->position.getValue() + - cam->focalDistance.getValue() * direction; - PRIVATE(this)->focal2 = PRIVATE(this)->focal1; + animator->stop(); + + SbVec3f focalPoint = getFocalPoint(); + SbVec3f translation(0, 0, 0); + if (moveToCenter) { SoGetBoundingBoxAction action(viewer->getSoRenderManager()->getViewportRegion()); action.apply(viewer->getSceneGraph()); SbBox3f box = action.getBoundingBox(); if (!box.isEmpty()) { - rot.multVec(SbVec3f(0, 0, -1), direction); - //float s = (this->focal1 - box.getCenter()).dot(direction); - //this->focal2 = box.getCenter() + s * direction; - // setting the center of the overall bounding box as the future focal point - // seems to be a satisfactory solution - PRIVATE(this)->focal2 = box.getCenter(); + translation = box.getCenter() - focalPoint; } } - // avoid to interfere with spinning (fixes #3101462) - if (this->isAnimating()) - this->stopAnimating(); - - if (PRIVATE(this)->animsensor->isScheduled()) { - PRIVATE(this)->animsensor->unschedule(); - this->interactiveCountDec(); - } - + // Start an animation or set the pose directly if (isAnimationEnabled()) { - // get the amount of movement - SbVec3f dir1, dir2; - SbRotation cam_rot = cam->orientation.getValue(); - cam_rot.multVec(SbVec3f(0, 0, -1), dir1); - rot.multVec(SbVec3f(0, 0, -1), dir2); - float val = 0.5f*(1.0f + dir1.dot(dir2)); // value in range [0,1] - int div = (int)(val * 20.0f); - int steps = 20-div; // do it with max. 20 steps - - // check whether a movement is required - if (steps > 0) { - PRIVATE(this)->endRotation = rot; // this is the final camera orientation - this->spinRotation = cam_rot; - PRIVATE(this)->animationsteps = 5; - PRIVATE(this)->animationdelta = std::max(100/steps, 5); - PRIVATE(this)->animsensor->setBaseTime(SbTime::getTimeOfDay()); - PRIVATE(this)->animsensor->schedule(); - this->interactiveCountInc(); - } - else { - // due to possible round-off errors make sure that the - // exact orientation is set - cam->orientation.setValue(rot); - cam->position = PRIVATE(this)->focal2 - cam->focalDistance.getValue() * direction; - } + viewer->startAnimation(orientation, focalPoint, translation); } else { - // set to the given rotation - cam->orientation.setValue(rot); - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - cam->position = PRIVATE(this)->focal2 - cam->focalDistance.getValue() * direction; + // Distance from rotation center to camera position in camera coordinate system + SbVec3f rotationCenterDistanceCam = camera->focalDistance.getValue() * SbVec3f(0, 0, 1); + + // Set to the given orientation + camera->orientation = orientation; + + // Distance from rotation center to new camera position in global coordinate system + SbVec3f newRotationCenterDistance; + camera->orientation.getValue().multVec(rotationCenterDistanceCam, newRotationCenterDistance); + + // Reposition camera so the rotation center stays in the same place + // Optionally add translation to move to center + camera->position = focalPoint + newRotationCenterDistance + translation; } } -void NavigationStyleP::viewAnimationCB(void * data, SoSensor * sensor) +void NavigationStyle::translateCamera(const SbVec3f& translation) { - Q_UNUSED(sensor); - auto that = static_cast(data); - if (PRIVATE(that)->animationsteps > 0) { - // here the camera rotates from the current rotation to a given - // rotation (e.g. the standard views). To get this movement animated - // we calculate an interpolated rotation and update the view after - // each step - float step = std::min((float)PRIVATE(that)->animationsteps/100.0f, 1.0f); - SbRotation slerp = SbRotation::slerp(that->spinRotation, PRIVATE(that)->endRotation, step); - SbVec3f focalpoint = (1.0f-step)*PRIVATE(that)->focal1 + step*PRIVATE(that)->focal2; - SoCamera* cam = that->viewer->getSoRenderManager()->getCamera(); - if (!cam) // no camera - return; + SoCamera* camera = getCamera(); + if (!camera) + return; - SbVec3f direction; - cam->orientation.setValue(slerp); - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - cam->position = focalpoint - cam->focalDistance.getValue() * direction; + animator->stop(); - PRIVATE(that)->animationsteps += PRIVATE(that)->animationdelta; - if (PRIVATE(that)->animationsteps > 100) { - // now we have reached the end of the movement - PRIVATE(that)->animationsteps=0; - PRIVATE(that)->animsensor->unschedule(); - that->interactiveCountDec(); - // set to the actual given rotation - cam->orientation.setValue(PRIVATE(that)->endRotation); - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - cam->position = PRIVATE(that)->focal2 - cam->focalDistance.getValue() * direction; - } + // Start an animation or set the pose directly + if (isAnimationEnabled()) { + viewer->startAnimation(camera->orientation.getValue(), SbVec3f(0, 0, 0), translation); + } + else { + camera->position = camera->position.getValue() + translation; } } @@ -604,29 +474,41 @@ void NavigationStyle::viewAll() } } -/** Rotate the camera by the given amount, then reposition it so we're - * still pointing at the same focal point. +/** Rotate the camera by the given amount, then reposition it so we're still pointing at the same + * focal point */ -void NavigationStyle::reorientCamera(SoCamera * cam, const SbRotation & rot) +void NavigationStyle::reorientCamera(SoCamera* camera, const SbRotation& rotation) { - if (!cam) + reorientCamera(camera, rotation, getFocalPoint()); +} + +/** Rotate the camera by the given amount, then reposition it so the rotation center stays in the + * same place + */ +void NavigationStyle::reorientCamera(SoCamera* camera, const SbRotation& rotation, const SbVec3f& rotationCenter) +{ + if (!camera) { return; - - // Find global coordinates of focal point. - SbVec3f direction; - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - SbVec3f focalpoint = cam->position.getValue() + - cam->focalDistance.getValue() * direction; - - // Set new orientation value by accumulating the new rotation. - cam->orientation = rot * cam->orientation.getValue(); - // Fix issue with near clipping in orthogonal view - if (cam->getTypeId().isDerivedFrom(SoOrthographicCamera::getClassTypeId())) { - cam->focalDistance = static_cast(cam)->height; } - // Reposition camera so we are still pointing at the same old focal point. - cam->orientation.getValue().multVec(SbVec3f(0, 0, -1), direction); - cam->position = focalpoint - cam->focalDistance.getValue() * direction; + + // Distance from rotation center to camera position in camera coordinate system + SbVec3f rotationCenterDistanceCam; + camera->orientation.getValue().inverse().multVec(camera->position.getValue() - rotationCenter, rotationCenterDistanceCam); + + // Set new orientation value by accumulating the new rotation + camera->orientation = rotation * camera->orientation.getValue(); + + // Fix issue with near clipping in orthogonal view + if (camera->getTypeId().isDerivedFrom(SoOrthographicCamera::getClassTypeId())) { + camera->focalDistance = static_cast(camera)->height; + } + + // Distance from rotation center to new camera position in global coordinate system + SbVec3f newRotationCenterDistance; + camera->orientation.getValue().multVec(rotationCenterDistanceCam, newRotationCenterDistance); + + // Reposition camera so the rotation center stays in the same place + camera->position = rotationCenter + newRotationCenterDistance; } void NavigationStyle::panCamera(SoCamera * cam, float aspectratio, const SbPlane & panplane, @@ -684,7 +566,7 @@ void NavigationStyle::panToCenter(const SbPlane & pplane, const SbVec2f & currpo const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion(); float ratio = vp.getViewportAspectRatio(); panCamera(viewer->getSoRenderManager()->getCamera(), ratio, pplane, SbVec2f(0.5,0.5), currpos); - PRIVATE(this)->rotationCenterFound = false; + this->rotationCenterFound = false; } /** Dependent on the camera type this will either shrink or expand the @@ -695,6 +577,9 @@ void NavigationStyle::zoom(SoCamera * cam, float diffvalue) { if (!cam) // can happen for empty scenegraph return; + + animator->stop(); + SoType t = cam->getTypeId(); SbName tname = t.getName(); @@ -862,14 +747,14 @@ void NavigationStyle::doRotate(SoCamera * camera, float angle, const SbVec2f& po SbVec3f NavigationStyle::getRotationCenter(SbBool& found) const { - found = PRIVATE(this)->rotationCenterFound; - return PRIVATE(this)->rotationCenter; + found = this->rotationCenterFound; + return this->rotationCenter; } void NavigationStyle::setRotationCenter(const SbVec3f& cnt) { - PRIVATE(this)->rotationCenter = cnt; - PRIVATE(this)->rotationCenterFound = true; + this->rotationCenter = cnt; + this->rotationCenterFound = true; } SbVec3f NavigationStyle::getFocalPoint() const @@ -901,8 +786,8 @@ void NavigationStyle::spin(const SbVec2f & pointerpos) lastpos[0] = float(this->log.position[1][0]) / float(std::max((int)(glsize[0]-1), 1)); lastpos[1] = float(this->log.position[1][1]) / float(std::max((int)(glsize[1]-1), 1)); - if (PRIVATE(this)->rotationCenterMode && PRIVATE(this)->rotationCenterFound) { - SbVec3f hitpoint = PRIVATE(this)->rotationCenter; + if (this->rotationCenterMode && this->rotationCenterFound) { + SbVec3f hitpoint = this->rotationCenter; // set to the given position SbVec3f direction; @@ -929,7 +814,7 @@ void NavigationStyle::spin(const SbVec2f & pointerpos) r.invert(); this->reorientCamera(viewer->getSoRenderManager()->getCamera(), r); - if (PRIVATE(this)->rotationCenterMode && PRIVATE(this)->rotationCenterFound) { + if (this->rotationCenterMode && this->rotationCenterFound) { float ratio = vp.getViewportAspectRatio(); SbViewVolume vv = viewer->getSoRenderManager()->getCamera()->getViewVolume(vp.getViewportAspectRatio()); SbPlane panplane = vv.getPlane(viewer->getSoRenderManager()->getCamera()->focalDistance.getValue()); @@ -1015,7 +900,7 @@ SbBool NavigationStyle::doSpin() float radians; rot.getValue(axis, radians); if ((radians > 0.01f) && (deltatime < 0.300)) { - this->spinRotation = rot; + viewer->startSpinningAnimation(axis, radians * 5); return true; } } @@ -1030,14 +915,14 @@ void NavigationStyle::saveCursorPosition(const SoEvent * const ev) this->localPos = ev->getPosition(); // mode is WindowCenter - if (!PRIVATE(this)->rotationCenterMode) { + if (!this->rotationCenterMode) { setRotationCenter(getFocalPoint()); } //Option to get point on model (slow) or always on focal plane (fast) // // mode is ScenePointAtCursor to get exact point if possible - if (PRIVATE(this)->rotationCenterMode & NavigationStyle::RotationCenterMode::ScenePointAtCursor) { + if (this->rotationCenterMode & NavigationStyle::RotationCenterMode::ScenePointAtCursor) { SoRayPickAction rpaction(viewer->getSoRenderManager()->getViewportRegion()); rpaction.setPoint(this->localPos); rpaction.setRadius(viewer->getPickRadius()); @@ -1051,7 +936,7 @@ void NavigationStyle::saveCursorPosition(const SoEvent * const ev) } // mode is FocalPointAtCursor or a ScenePointAtCursor failed - if (PRIVATE(this)->rotationCenterMode & NavigationStyle::RotationCenterMode::FocalPointAtCursor) { + if (this->rotationCenterMode & NavigationStyle::RotationCenterMode::FocalPointAtCursor) { // get the intersection point of the ray and the focal plane const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion(); float ratio = vp.getViewportAspectRatio(); @@ -1072,7 +957,7 @@ void NavigationStyle::saveCursorPosition(const SoEvent * const ev) } // mode is BoundingBoxCenter or a ScenePointAtCursor failed - if (PRIVATE(this)->rotationCenterMode & NavigationStyle::RotationCenterMode::BoundingBoxCenter) { + if (this->rotationCenterMode & NavigationStyle::RotationCenterMode::BoundingBoxCenter) { const SbViewportRegion & vp = viewer->getSoRenderManager()->getViewportRegion(); float ratio = vp.getViewportAspectRatio(); @@ -1128,20 +1013,6 @@ void NavigationStyle::moveCursorPosition() } } -void NavigationStyle::updateAnimation() -{ - SbTime now = SbTime::getTimeOfDay(); - double secs = now.getValue() - prevRedrawTime.getValue(); - this->prevRedrawTime = now; - - if (this->isAnimating()) { - // here the camera rotates around a fix axis - SbRotation deltaRotation = this->spinRotation; - deltaRotation.scaleAngle(secs * 5.0); - this->reorientCamera(viewer->getSoRenderManager()->getCamera(), deltaRotation); - } -} - void NavigationStyle::redraw() { if (mouseSelection) @@ -1168,7 +1039,7 @@ void NavigationStyle::setAnimationEnabled(const SbBool enable) { this->spinanimatingallowed = enable; - if (!enable && this->isAnimating()) { this->stopAnimating(); } + if (!enable && this->isAnimating()) { animator->stop(); } } /*! @@ -1191,52 +1062,29 @@ SbBool NavigationStyle::isAnimating() const return this->currentmode == NavigationStyle::SPINNING; } -/*! - * Starts programmatically the viewer in animation mode. The given axis direction - * is always in screen coordinates, not in world coordinates. - */ -void NavigationStyle::startAnimating(const SbVec3f& axis, float velocity) +NavigationAnimator* NavigationStyle::getAnimator() const { - if (!isAnimationEnabled()) - return; - - this->prevRedrawTime = SbTime::getTimeOfDay(); - this->spinincrement = SbRotation::identity(); - SbRotation rot; - rot.setValue(axis, velocity); - - this->setViewing(true); - this->setViewingMode(NavigationStyle::SPINNING); - this->spinRotation = rot; -} - -void NavigationStyle::stopAnimating() -{ - if (this->currentmode != NavigationStyle::SPINNING) { - return; - } - this->setViewingMode(this->isViewing() ? - NavigationStyle::IDLE : NavigationStyle::INTERACT); + return this->animator; } void NavigationStyle::setSensitivity(float val) { - PRIVATE(this)->sensitivity = val; + this->sensitivity = val; } float NavigationStyle::getSensitivity() const { - return PRIVATE(this)->sensitivity; + return this->sensitivity; } void NavigationStyle::setResetCursorPosition(SbBool on) { - PRIVATE(this)->resetcursorpos = on; + this->resetcursorpos = on; } SbBool NavigationStyle::isResetCursorPosition() const { - return PRIVATE(this)->resetcursorpos; + return this->resetcursorpos; } void NavigationStyle::setZoomInverted(SbBool on) @@ -1266,12 +1114,12 @@ SbBool NavigationStyle::isZoomAtCursor() const void NavigationStyle::setRotationCenterMode(NavigationStyle::RotationCenterModes mode) { - PRIVATE(this)->rotationCenterMode = mode; + this->rotationCenterMode = mode; } NavigationStyle::RotationCenterModes NavigationStyle::getRotationCenterMode() const { - return PRIVATE(this)->rotationCenterMode; + return this->rotationCenterMode; } void NavigationStyle::startSelection(AbstractMouseSelection* mouse) @@ -1415,6 +1263,7 @@ void NavigationStyle::setViewingMode(const ViewerMode newmode) case DRAGGING: // Set up initial projection point for the projector object when // first starting a drag operation. + animator->stop(); viewer->showRotationCenter(true); this->spinprojector->project(this->lastmouseposition); this->interactiveCountInc(); @@ -1428,15 +1277,18 @@ void NavigationStyle::setViewingMode(const ViewerMode newmode) break; case PANNING: + animator->stop(); pan(viewer->getSoRenderManager()->getCamera()); this->interactiveCountInc(); break; case ZOOMING: + animator->stop(); this->interactiveCountInc(); break; case BOXZOOM: + animator->stop(); this->interactiveCountInc(); break; diff --git a/src/Gui/NavigationStyle.h b/src/Gui/NavigationStyle.h index cbc6204a9a..1bcdef2854 100644 --- a/src/Gui/NavigationStyle.h +++ b/src/Gui/NavigationStyle.h @@ -52,6 +52,7 @@ class SbSphereSheetProjector; namespace Gui { class View3DInventorViewer; +class NavigationAnimator; class AbstractMouseSelection; /** @@ -122,9 +123,8 @@ public: void setAnimationEnabled(const SbBool enable); SbBool isAnimationEnabled() const; - void startAnimating(const SbVec3f& axis, float velocity); - void stopAnimating(); SbBool isAnimating() const; + NavigationAnimator* getAnimator() const; void setSensitivity(float); float getSensitivity() const; @@ -144,11 +144,14 @@ public: void setRotationCenter(const SbVec3f& cnt); SbVec3f getFocalPoint() const; - void updateAnimation(); void redraw(); - void setCameraOrientation(const SbRotation& rot, SbBool moveTocenter=false); - void lookAtPoint(const SbVec3f&); + SoCamera* getCamera() const; + void setCameraOrientation(const SbRotation& orientation, SbBool moveToCenter = false); + void translateCamera(const SbVec3f& translation); + void reorientCamera(SoCamera* camera, const SbRotation& rotation); + void reorientCamera(SoCamera* camera, const SbRotation& rotation, const SbVec3f& rotationCenter); + void boxZoom(const SbBox2s& box); virtual void viewAll(); @@ -173,6 +176,9 @@ public: void setOrbitStyle(OrbitStyle style); OrbitStyle getOrbitStyle() const; + SbBool isViewing() const; + void setViewing(SbBool); + SbVec3f getRotationCenter(SbBool&) const; protected: @@ -183,15 +189,12 @@ protected: void interactiveCountDec(); int getInteractiveCount() const; - SbBool isViewing() const; - void setViewing(SbBool); SbBool isSeekMode() const; void setSeekMode(SbBool enable); SbBool seekToPoint(const SbVec2s screenpos); void seekToPoint(const SbVec3f& scenepos); SbBool lookAtPoint(const SbVec2s screenpos); - void reorientCamera(SoCamera * camera, const SbRotation & rot); void panCamera(SoCamera * camera, float vpaspect, const SbPlane & panplane, @@ -233,13 +236,13 @@ protected: } log; View3DInventorViewer* viewer{nullptr}; + NavigationAnimator* animator; ViewerMode currentmode; SoMouseButtonEvent mouseDownConsumedEvent; SbVec2f lastmouseposition; SbVec2s globalPos; SbVec2s localPos; SbPlane panningplane; - SbTime prevRedrawTime; SbTime centerTime; SbBool lockrecenter; SbBool menuenabled; @@ -261,13 +264,17 @@ protected: SbBool spinanimatingallowed; int spinsamplecounter; SbRotation spinincrement; - SbRotation spinRotation; SbSphereSheetProjector * spinprojector; //@} private: - struct NavigationStyleP* pimpl; - friend struct NavigationStyleP; + friend class NavigationAnimator; + + SbVec3f rotationCenter; + SbBool rotationCenterFound; + NavigationStyle::RotationCenterModes rotationCenterMode; + float sensitivity; + SbBool resetcursorpos; }; /** Sub-classes of this class appear in the preference dialog where users can diff --git a/src/Gui/PreferencePackTemplates/View.cfg b/src/Gui/PreferencePackTemplates/View.cfg index 6ad815c14c..708b9b9498 100644 --- a/src/Gui/PreferencePackTemplates/View.cfg +++ b/src/Gui/PreferencePackTemplates/View.cfg @@ -32,7 +32,8 @@ - + + diff --git a/src/Gui/PreferencePages/DlgSettingsEditor.cpp b/src/Gui/PreferencePages/DlgSettingsEditor.cpp index 4dd9734c49..170ba8fc0c 100644 --- a/src/Gui/PreferencePages/DlgSettingsEditor.cpp +++ b/src/Gui/PreferencePages/DlgSettingsEditor.cpp @@ -301,7 +301,9 @@ void DlgSettingsEditor::loadSettings() QStringList fixedFamilyNames; for (const auto &name : familyNames) { if (QFontDatabase().isFixedPitch(name)) { - fixedFamilyNames.append(name); + if (name.compare(QLatin1String("8514oem"), Qt::CaseInsensitive) != 0) { + fixedFamilyNames.append(name); + } } } #else @@ -309,7 +311,9 @@ void DlgSettingsEditor::loadSettings() QStringList fixedFamilyNames; for (const auto &name : familyNames) { if (QFontDatabase::isFixedPitch(name)) { - fixedFamilyNames.append(name); + if (name.compare(QLatin1String("8514oem"), Qt::CaseInsensitive) != 0) { + fixedFamilyNames.append(name); + } } } #endif diff --git a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp index 7312137176..f10725e787 100644 --- a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp +++ b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp @@ -87,7 +87,8 @@ void DlgSettingsNavigation::saveSettings() ui->checkBoxDisableTilt->onSave(); ui->checkBoxShowRotationCenter->onSave(); ui->spinBoxZoomStep->onSave(); - ui->checkBoxUseAutoRotation->onSave(); + ui->checkBoxNavigationAnimations->onSave(); + ui->spinBoxAnimationDuration->onSave(); ui->qspinNewDocScale->onSave(); ui->prefStepByTurn->onSave(); ui->naviCubeCorner->onSave(); @@ -111,7 +112,7 @@ void DlgSettingsNavigation::saveSettings() hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/NaviCube"); if (ui->naviCubeFontName->currentIndex()) { - hGrp->SetASCII("FontString", ui->naviCubeFontName->currentText().toLatin1()); + hGrp->SetASCII("FontString", ui->naviCubeFontName->currentText().toLatin1()); } else { hGrp->RemoveASCII("FontString"); } @@ -124,7 +125,8 @@ void DlgSettingsNavigation::loadSettings() ui->checkBoxDisableTilt->onRestore(); ui->checkBoxShowRotationCenter->onRestore(); ui->spinBoxZoomStep->onRestore(); - ui->checkBoxUseAutoRotation->onRestore(); + ui->checkBoxNavigationAnimations->onRestore(); + ui->spinBoxAnimationDuration->onRestore(); ui->qspinNewDocScale->onRestore(); ui->prefStepByTurn->onRestore(); ui->naviCubeCorner->onRestore(); @@ -183,7 +185,7 @@ void DlgSettingsNavigation::loadSettings() QStringList familyNames = QFontDatabase::families(QFontDatabase::Any); #endif ui->naviCubeFontName->addItems(familyNames); - + hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/NaviCube"); int indexFamilyNames = familyNames.indexOf( diff --git a/src/Gui/PreferencePages/DlgSettingsNavigation.ui b/src/Gui/PreferencePages/DlgSettingsNavigation.ui index c2c33a3370..c107e57cf2 100644 --- a/src/Gui/PreferencePages/DlgSettingsNavigation.ui +++ b/src/Gui/PreferencePages/DlgSettingsNavigation.ui @@ -473,27 +473,91 @@ The value is the diameter of the sphere to fit on the screen. - + true - Enable animated rotations + Enable navigation animations - Enable animation + Enable navigation animations - false + true - UseAutoRotation + UseNavigationAnimations View + + + + Duration of navigation animations that have a fixed duration + + + Animation duration + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + 60 + 16777215 + + + + The duration of navigation animations in milliseconds + + + 100 + + + 10000 + + + 50 + + + 250 + + + AnimationDuration + + + View + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 10 + 20 + + + + + + @@ -516,7 +580,7 @@ The value is the diameter of the sphere to fit on the screen. - Zoom step + Zoom step Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/src/Gui/PreferencePages/DlgSettingsViewColor.cpp b/src/Gui/PreferencePages/DlgSettingsViewColor.cpp index 2d42e4f48b..4f3c7d2209 100644 --- a/src/Gui/PreferencePages/DlgSettingsViewColor.cpp +++ b/src/Gui/PreferencePages/DlgSettingsViewColor.cpp @@ -75,6 +75,8 @@ void DlgSettingsViewColor::saveSettings() ui->checkMidColor->onSave(); ui->TreeEditColor->onSave(); ui->TreeActiveColor->onSave(); + ui->CbLabelColor->onSave(); + ui->CbLabelTextSize->onSave(); } void DlgSettingsViewColor::loadSettings() @@ -89,7 +91,9 @@ void DlgSettingsViewColor::loadSettings() ui->checkMidColor->onRestore(); ui->TreeEditColor->onRestore(); ui->TreeActiveColor->onRestore(); - + ui->CbLabelColor->onRestore(); + ui->CbLabelTextSize->onRestore(); + if (ui->radioButtonSimple->isChecked()) onRadioButtonSimpleToggled(true); else if(ui->radioButtonGradient->isChecked()) diff --git a/src/Gui/PreferencePages/DlgSettingsViewColor.ui b/src/Gui/PreferencePages/DlgSettingsViewColor.ui index b0dbf033f5..61abe9714f 100644 --- a/src/Gui/PreferencePages/DlgSettingsViewColor.ui +++ b/src/Gui/PreferencePages/DlgSettingsViewColor.ui @@ -407,7 +407,140 @@ - + + + Color Bar + + + + 9 + + + 9 + + + 9 + + + 9 + + + 6 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 6 + + + + + + 240 + 0 + + + + + + + Label text color + + + + + + + true + + + + 0 + 0 + + + + Color Bar (used in Mesh and FEM Wbs) Label text color + + + + 255 + 255 + 255 + + + + CbLabelColor + + + View + + + + + + + Label text size + + + + + + + Color Bar (used in Mesh and FEM Wbs) Label Text Size + + + Qt::AlignLeft|Qt::AlignVCenter + + + 4 + + + 36 + + + 13 + + + CbLabelTextSize + + + View + + + + + + + + + Qt::Horizontal + + + + 20 + 20 + + + + + + + + + Qt::Vertical @@ -442,6 +575,11 @@ QCheckBox
Gui/PrefWidgets.h
+ + Gui::PrefSpinBox + QSpinBox +
Gui/PrefWidgets.h
+
SelectionColor_Background diff --git a/src/Gui/SoFCCSysDragger.cpp b/src/Gui/SoFCCSysDragger.cpp index a248e26455..e78fbc11a6 100644 --- a/src/Gui/SoFCCSysDragger.cpp +++ b/src/Gui/SoFCCSysDragger.cpp @@ -49,8 +49,6 @@ #endif #include -#include "Gui/ViewParams.h" -#include "App/Color.h" #include "SoFCCSysDragger.h" #include "MainWindow.h" @@ -188,7 +186,7 @@ SoGroup* TDragger::buildGeometry() cylinderSeparator->addChild(cylinder); //cone - float coneBottomRadius = 0.8; + float coneBottomRadius = 0.8F; float coneHeight = 2.5; auto coneSeparator = new SoSeparator(); root->addChild(coneSeparator); @@ -287,6 +285,7 @@ void TDragger::dragStart() translationIncrementCount.setValue(0); } + void TDragger::drag() { projector.setViewVolume(this->getViewVolume()); @@ -553,6 +552,7 @@ void TPlanarDragger::dragStart() translationIncrementXCount.setValue(0); translationIncrementYCount.setValue(0); } + void TPlanarDragger::drag() { projector.setViewVolume(this->getViewVolume()); @@ -779,7 +779,7 @@ SoGroup* RDragger::buildGeometry() root->addChild(sphereTranslation); auto sphere = new SoSphere(); - sphere->radius.setValue(0.8); + sphere->radius.setValue(0.8F); root->addChild(sphere); return root; @@ -952,6 +952,7 @@ int RDragger::roundIncrement(const float &radiansIn) return rCount; } + SO_KIT_SOURCE(SoFCCSysDragger) void SoFCCSysDragger::initClass() @@ -1056,40 +1057,11 @@ SoFCCSysDragger::SoFCCSysDragger() SO_KIT_INIT_INSTANCE(); // Colors - - SoBaseColor *color; - App::Color stdColor; - auto viewParams = Gui::ViewParams::instance(); - // Translator - color = SO_GET_ANY_PART(this, "xTranslatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisXColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - color = SO_GET_ANY_PART(this, "yTranslatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisYColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - color = SO_GET_ANY_PART(this, "zTranslatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisZColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - // Planar Translator - color = SO_GET_ANY_PART(this, "xyPlanarTranslatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisZColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - color = SO_GET_ANY_PART(this, "yzPlanarTranslatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisXColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - color = SO_GET_ANY_PART(this, "zxPlanarTranslatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisYColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - // Rotator - color = SO_GET_ANY_PART(this, "xRotatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisXAltColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - color = SO_GET_ANY_PART(this, "yRotatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisYAltColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); - color = SO_GET_ANY_PART(this, "zRotatorColor", SoBaseColor); - stdColor.setPackedValue(viewParams->getAxisZAltColor()); - color->rgb.setValue(stdColor.r, stdColor.g, stdColor.b); + setAxisColors( + SbColor(1.0, 0, 0).getPackedValue(0.0f), + SbColor(0, 1.0, 0).getPackedValue(0.0f), + SbColor(0, 0, 1.0).getPackedValue(0.0f) + ); // Increments @@ -1468,7 +1440,42 @@ void SoFCCSysDragger::clearIncrementCounts() rotationIncrementCountZ.setValue(0); } -// Visiblity API Functions +void SoFCCSysDragger::setAxisColors(unsigned long x, unsigned long y, unsigned long z) { + SbColor colorX; + SbColor colorY; + SbColor colorZ; + + float t = 0.0f; + colorX.setPackedValue(x, t); + colorY.setPackedValue(y, t); + colorZ.setPackedValue(z, t); + + SoBaseColor* color; + + // Translator + color = SO_GET_ANY_PART(this, "xTranslatorColor", SoBaseColor); + color->rgb.setValue(colorX[0], colorX[1], colorX[2]); + color = SO_GET_ANY_PART(this, "yTranslatorColor", SoBaseColor); + color->rgb.setValue(colorY[0], colorY[1], colorY[2]); + color = SO_GET_ANY_PART(this, "zTranslatorColor", SoBaseColor); + color->rgb.setValue(colorZ[0], colorZ[1], colorZ[2]); + // Planar Translator + color = SO_GET_ANY_PART(this, "xyPlanarTranslatorColor", SoBaseColor); + color->rgb.setValue(colorZ[0], colorZ[1], colorZ[2]); + color = SO_GET_ANY_PART(this, "yzPlanarTranslatorColor", SoBaseColor); + color->rgb.setValue(colorX[0], colorX[1], colorX[2]); + color = SO_GET_ANY_PART(this, "zxPlanarTranslatorColor", SoBaseColor); + color->rgb.setValue(colorY[0], colorY[1], colorY[2]); + // Rotator + color = SO_GET_ANY_PART(this, "xRotatorColor", SoBaseColor); + color->rgb.setValue(colorX[0], colorX[1], colorX[2]); + color = SO_GET_ANY_PART(this, "yRotatorColor", SoBaseColor); + color->rgb.setValue(colorY[0], colorY[1], colorY[2]); + color = SO_GET_ANY_PART(this, "zRotatorColor", SoBaseColor); + color->rgb.setValue(colorZ[0], colorZ[1], colorZ[2]); +} + +// Visibility API Functions // Translator void SoFCCSysDragger::showTranslationX() diff --git a/src/Gui/SoFCCSysDragger.h b/src/Gui/SoFCCSysDragger.h index 9f76a68929..6779907e30 100644 --- a/src/Gui/SoFCCSysDragger.h +++ b/src/Gui/SoFCCSysDragger.h @@ -94,7 +94,7 @@ private: * 'translationIncrementYCount' multiplied with * 'translationIncrement' for a full double * precision vector scalar. - * + * * @author qewer33 */ class TPlanarDragger : public SoDragger @@ -278,6 +278,8 @@ public: SoIdleSensor idleSensor; //!< might be overkill, but want to make sure of performance. void setUpAutoScale(SoCamera *cameraIn); //!< used to setup the auto scaling of dragger. + void setAxisColors(unsigned long x, unsigned long y, unsigned long z); //!< set the axis colors. + //! @name Visibility Functions //@{ void showTranslationX(); //!< show the x translation dragger. diff --git a/src/Gui/SoFCColorBar.cpp b/src/Gui/SoFCColorBar.cpp index 64a12ae90a..ff36dabf2d 100644 --- a/src/Gui/SoFCColorBar.cpp +++ b/src/Gui/SoFCColorBar.cpp @@ -123,15 +123,23 @@ float SoFCColorBarBase::getBounds(const SbVec2s& size, float& fMinX, float&fMinY // The cam height is set in SoFCColorBarBase::getBoundingWidth to 10. // Therefore the normalized coordinates are in the range [-5, +5] x [-5ratio, +5ratio] if ratio > 1 // and [-5ratio, +5ratio] x [-5, +5] if ratio < 1. - // We don't want the whole height covered by the color bar (to have e.g space to the axis cross) - // thus we take as base 4. - float baseYValue = 4.0f; + // We don't want the whole height covered by the color bar (to have e.g space to the axis cross + // and the Navigation Cube) thus we take as base 3 or if the height reduces significantly it is 2.5. + + float baseYValue; + if (fRatio > 3.0f) { + baseYValue = 2.5f; + } + else { + baseYValue = 3.0f; + } float barWidth = 0.5f; - // we want the color bar at the rightmost position, therefore we take 5 as base - fMinX = 5.0f * fRatio; // must be scaled with the ratio to assure it stays at the right + // we want the color bar at the rightmost position, therefore we take 4.95 as base + fMinX = 4.95f * fRatio; // must be scaled with the ratio to assure it stays at the right + fMaxX = fMinX + barWidth; - fMinY = -baseYValue; + fMinY = -baseYValue - 0.6f; // Extend shortened bar towards axis cross fMaxY = baseYValue; // bar has the height of almost whole window height if (fRatio < 1.0f) { diff --git a/src/Gui/SoFCColorGradient.cpp b/src/Gui/SoFCColorGradient.cpp index ae36f585b4..f6aef42012 100644 --- a/src/Gui/SoFCColorGradient.cpp +++ b/src/Gui/SoFCColorGradient.cpp @@ -28,6 +28,7 @@ # include # include # include +# include # include # include # include @@ -35,6 +36,7 @@ # include #endif +#include #include "SoFCColorGradient.h" #include "SoTextLabel.h" #include "DlgSettingsColorGradientImp.h" @@ -99,19 +101,27 @@ void SoFCColorGradient::setMarkerLabel(const SoMFString& label) SbVec2f minPt = _bbox.getMin(); float fStep = (maxPt[1] - minPt[1]) / ((float)num - 1); auto trans = new SoTransform; + + ParameterGrp::handle hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("View"); + auto LabelTextSize = hGrp->GetInt("CbLabelTextSize", 13); + auto LabelTextColor = + App::Color((uint32_t)hGrp->GetUnsigned("CbLabelColor", 0xffffffff)); + auto textFont = new SoFont; + auto color = new SoBaseColor; + textFont->name.setValue("Helvetica,Arial,Times New Roman"); + textFont->size.setValue(LabelTextSize); trans->translation.setValue(maxPt[0] + 0.1f, maxPt[1] - 0.05f + fStep, 0.0f); + color->rgb.setValue(LabelTextColor.r,LabelTextColor.g,LabelTextColor.b); labels->addChild(trans); + labels->addChild(color); + labels->addChild(textFont); for (int i = 0; i < num; i++) { auto trans = new SoTransform; - auto color = new SoBaseColor; auto text2 = new SoColorBarLabel; - trans->translation.setValue(0, -fStep, 0); - color->rgb.setValue(0, 0, 0); text2->string.setValue(label[i]); labels->addChild(trans); - labels->addChild(color); labels->addChild(text2); } } diff --git a/src/Gui/Stylesheets/ProDark.qss b/src/Gui/Stylesheets/ProDark.qss index 919cf814ba..41a6558ebb 100644 --- a/src/Gui/Stylesheets/ProDark.qss +++ b/src/Gui/Stylesheets/ProDark.qss @@ -1544,7 +1544,7 @@ QPushButton:disabled:checked { QPushButton:pressed { color: #ffffff; - background-color: #@ThemeAccentColor2; + background-color: @ThemeAccentColor2; border: 1px solid #3c3c3c; } @@ -1635,7 +1635,7 @@ QDialog#Dialog QPushButton { QDialog#Dialog QPushButton:hover { color: #ffffff; border: 1px solid #3c3c3c; - background-color: #@ThemeAccentColor2; + background-color: @ThemeAccentColor2; } QPushButton#buttonUninstall { @@ -1762,7 +1762,7 @@ QDialog QToolButton:disabled:checked { QDialog QToolButton:pressed { color: #ffffff; - background-color: #@ThemeAccentColor2; + background-color: @ThemeAccentColor2; border: 1px solid #3c3c3c; } diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index bb14149e8e..712df39ee2 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -407,6 +407,30 @@ void TaskView::keyPressEvent(QKeyEvent* ke) } } +void TaskView::triggerMinimumSizeHint() +{ + // NOLINTNEXTLINE + QTimer::singleShot(100, this, &TaskView::adjustMinimumSizeHint); +} + +void TaskView::adjustMinimumSizeHint() +{ + QSize ms = minimumSizeHint(); + setMinimumWidth(ms.width()); +} + +QSize TaskView::minimumSizeHint() const +{ + QSize ms = QScrollArea::minimumSizeHint(); + int spacing = 0; + if (QLayout* layout = taskPanel->layout()) { + spacing = 2 * layout->spacing(); + } + + ms.setWidth(taskPanel->minimumSizeHint().width() + spacing); + return ms; +} + void TaskView::slotActiveDocument(const App::Document& doc) { Q_UNUSED(doc); @@ -477,6 +501,7 @@ void TaskView::showDialog(TaskDialog *dlg) ActiveCtrl->buttonBox->setStandardButtons(dlg->getStandardButtons()); TaskDialogAttorney::setButtonBox(dlg, ActiveCtrl->buttonBox); + // clang-format off // make connection to the needed signals connect(ActiveCtrl->buttonBox, &QDialogButtonBox::accepted, this, &TaskView::accept); @@ -486,6 +511,7 @@ void TaskView::showDialog(TaskDialog *dlg) this, &TaskView::helpRequested); connect(ActiveCtrl->buttonBox, &QDialogButtonBox::clicked, this, &TaskView::clicked); + // clang-format on const std::vector& cont = dlg->getDialogContent(); @@ -516,6 +542,7 @@ void TaskView::showDialog(TaskDialog *dlg) ActiveDialog->open(); getMainWindow()->updateActions(); + triggerMinimumSizeHint(); } void TaskView::removeDialog() @@ -554,6 +581,8 @@ void TaskView::removeDialog() remove->emitDestructionSignal(); delete remove; } + + triggerMinimumSizeHint(); } void TaskView::updateWatcher() @@ -591,6 +620,8 @@ void TaskView::updateWatcher() // give it the focus back. if (fwp && fwp->isVisible()) fwp->setFocus(); + + triggerMinimumSizeHint(); } void TaskView::addTaskWatcher(const std::vector &Watcher) diff --git a/src/Gui/TaskView/TaskView.h b/src/Gui/TaskView/TaskView.h index f73a5485d7..c199b3ea4e 100644 --- a/src/Gui/TaskView/TaskView.h +++ b/src/Gui/TaskView/TaskView.h @@ -158,15 +158,21 @@ public: void clearActionStyle(); void restoreActionStyle(); + QSize minimumSizeHint() const override; + protected Q_SLOTS: void accept(); void reject(); void helpRequested(); void clicked (QAbstractButton * button); +private: + void triggerMinimumSizeHint(); + void adjustMinimumSizeHint(); + protected: - void keyPressEvent(QKeyEvent*) override; - bool event(QEvent*) override; + void keyPressEvent(QKeyEvent* event) override; + bool event(QEvent* event) override; void addTaskWatcher(); void removeTaskWatcher(); diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 54736ed640..d5636d75f5 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -118,6 +118,8 @@ #include "ViewProvider.h" #include "ViewProviderDocumentObject.h" #include "ViewProviderLink.h" +#include "NavigationAnimator.h" +#include "NavigationAnimation.h" FC_LOG_LEVEL_INIT("3DViewer",true,true) @@ -202,8 +204,8 @@ while the progress bar is running. class Gui::ViewerEventFilter : public QObject { public: - ViewerEventFilter() = default; - ~ViewerEventFilter() override = default; + ViewerEventFilter() {} + ~ViewerEventFilter() override {} bool eventFilter(QObject* obj, QEvent* event) override { // Bug #0000607: Some mice also support horizontal scrolling which however might @@ -245,8 +247,8 @@ public: class SpaceNavigatorDevice : public Quarter::InputDevice { public: - SpaceNavigatorDevice() = default; - ~SpaceNavigatorDevice() override = default; + SpaceNavigatorDevice() {} + ~SpaceNavigatorDevice() override {} const SoEvent* translateEvent(QEvent* event) override { if (event->type() == Spaceball::MotionEvent::MotionEventType) { @@ -2235,8 +2237,6 @@ void View3DInventorViewer::renderScene() drawSingleBackground(col); glra->apply(this->backgroundroot); - navigation->updateAnimation(); - if (!this->shading) { state->push(); SoLightModelElement::set(state, selectionRoot, SoLightModelElement::BASE_COLOR); @@ -2754,9 +2754,9 @@ void View3DInventorViewer::pubSeekToPoint(const SbVec3f& pos) this->seekToPoint(pos); } -void View3DInventorViewer::setCameraOrientation(const SbRotation& rot, SbBool moveTocenter) +void View3DInventorViewer::setCameraOrientation(const SbRotation& orientation, SbBool moveToCenter) { - navigation->setCameraOrientation(rot, moveTocenter); + navigation->setCameraOrientation(orientation, moveToCenter); } void View3DInventorViewer::setCameraType(SoType t) @@ -2777,54 +2777,19 @@ void View3DInventorViewer::setCameraType(SoType t) } } -namespace Gui { - class CameraAnimation : public QVariantAnimation - { - SoCamera* camera; - SbRotation startRot, endRot; - SbVec3f startPos, endPos; - - public: - CameraAnimation(SoCamera* camera, const SbRotation& rot, const SbVec3f& pos) - : camera(camera), endRot(rot), endPos(pos) - { - startPos = camera->position.getValue(); - startRot = camera->orientation.getValue(); - } - ~CameraAnimation() override = default; - protected: - void updateCurrentValue(const QVariant & value) override - { - int steps = endValue().toInt(); - int curr = value.toInt(); - - float s = static_cast(curr)/static_cast(steps); - SbVec3f curpos = startPos * (1.0f-s) + endPos * s; - SbRotation currot = SbRotation::slerp(startRot, endRot, s); - camera->orientation.setValue(currot); - camera->position.setValue(curpos); - } - }; -} - -void View3DInventorViewer::moveCameraTo(const SbRotation& rot, const SbVec3f& pos, int steps, int ms) +void View3DInventorViewer::moveCameraTo(const SbRotation& orientation, const SbVec3f& position) { - SoCamera* cam = this->getSoRenderManager()->getCamera(); - if (!cam) + SoCamera* camera = getCamera(); + if (!camera) return; - CameraAnimation anim(cam, rot, pos); - anim.setDuration(Base::clamp(ms,0,5000)); - anim.setStartValue(static_cast(0)); - anim.setEndValue(steps); + if (isAnimationEnabled()) { + startAnimation( + orientation, camera->position.getValue(), position - camera->position.getValue(), true); + } - QEventLoop loop; - QObject::connect(&anim, &CameraAnimation::finished, &loop, &QEventLoop::quit); - anim.start(); - loop.exec(QEventLoop::ExcludeUserInputEvents); - - cam->orientation.setValue(rot); - cam->position.setValue(pos); + camera->orientation.setValue(orientation); + camera->position.setValue(position); } void View3DInventorViewer::animatedViewAll(int steps, int ms) @@ -3106,18 +3071,49 @@ SbBool View3DInventorViewer::isAnimating() const return navigation->isAnimating(); } -/*! - * Starts programmatically the viewer in animation mode. The given axis direction - * is always in screen coordinates, not in world coordinates. +/** + * @brief Change the camera pose with an animation + * + * @param orientation The new orientation + * @param rotationCenter The rotation center + * @param translation An additional translation on top of the translation caused by the rotation around the rotation center */ -void View3DInventorViewer::startAnimating(const SbVec3f& axis, float velocity) +void View3DInventorViewer::startAnimation(const SbRotation& orientation, + const SbVec3f& rotationCenter, const SbVec3f& translation, bool wait) { - navigation->startAnimating(axis, velocity); + // Currently starts a FixedTimeAnimation. If there is going to be an additional animation like + // FixedVelocityAnimation, check the animation type from a parameter and start the right animation + + int duration = App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("AnimationDuration", 250); + + auto animation = std::make_shared( + navigation, orientation, rotationCenter, translation, duration); + + if (wait) { + navigation->getAnimator()->startAndWait(animation); + } + else { + navigation->getAnimator()->start(animation); + } +} + +/** + * @brief Start an infinite spin animation + * + * @param axis The rotation axis in screen coordinates + * @param velocity The angular velocity in radians per second + */ +void View3DInventorViewer::startSpinningAnimation(const SbVec3f& axis, float velocity) +{ + auto animation = std::make_shared(navigation, axis, velocity); + navigation->getAnimator()->start(animation); } void View3DInventorViewer::stopAnimating() { - navigation->stopAnimating(); + navigation->getAnimator()->stop(); } void View3DInventorViewer::setPopupMenuEnabled(const SbBool on) diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h index 0f0edfb429..85441f11b8 100644 --- a/src/Gui/View3DInventorViewer.h +++ b/src/Gui/View3DInventorViewer.h @@ -164,7 +164,9 @@ public: void setPopupMenuEnabled(const SbBool on); SbBool isPopupMenuEnabled() const; - void startAnimating(const SbVec3f& axis, float velocity); + void startAnimation(const SbRotation& orientation, const SbVec3f& rotationCenter, + const SbVec3f& translation, bool wait = false); + void startSpinningAnimation(const SbVec3f& axis, float velocity); void stopAnimating(); SbBool isAnimating() const; @@ -373,9 +375,9 @@ public: * \a true the reorientation is animated, otherwise its directly * set. */ - void setCameraOrientation(const SbRotation& rot, SbBool moveTocenter=false); + void setCameraOrientation(const SbRotation& orientation, SbBool moveToCenter = false); void setCameraType(SoType t) override; - void moveCameraTo(const SbRotation& rot, const SbVec3f& pos, int steps, int ms); + void moveCameraTo(const SbRotation& orientation, const SbVec3f& position); /** * Zooms the viewport to the size of the bounding box. */ diff --git a/src/Gui/View3DPy.cpp b/src/Gui/View3DPy.cpp index 92f407bbab..7e36f8b4a3 100644 --- a/src/Gui/View3DPy.cpp +++ b/src/Gui/View3DPy.cpp @@ -777,10 +777,8 @@ Py::Object View3DInventorPy::getCameraOrientation() Py::Object View3DInventorPy::viewPosition(const Py::Tuple& args) { - PyObject* p=nullptr; - int steps = 20; - int ms = 30; - if (!PyArg_ParseTuple(args.ptr(), "|O!ii",&Base::PlacementPy::Type,&p,&steps,&ms)) + PyObject* p = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "|O!", &Base::PlacementPy::Type, &p)) throw Py::Exception(); if (p) { @@ -791,7 +789,7 @@ Py::Object View3DInventorPy::viewPosition(const Py::Tuple& args) rot.getValue(q0,q1,q2,q3); getView3DIventorPtr()->getViewer()->moveCameraTo( SbRotation((float)q0, (float)q1, (float)q2, (float)q3), - SbVec3f((float)pos.x, (float)pos.y, (float)pos.z), steps, ms); + SbVec3f((float)pos.x, (float)pos.y, (float)pos.z)); } SoCamera* cam = getView3DIventorPtr()->getViewer()->getSoRenderManager()->getCamera(); @@ -810,11 +808,11 @@ Py::Object View3DInventorPy::viewPosition(const Py::Tuple& args) Py::Object View3DInventorPy::startAnimating(const Py::Tuple& args) { - float x,y,z; + float x, y, z; float velocity; - if (!PyArg_ParseTuple(args.ptr(), "ffff", &x,&y,&z,&velocity)) + if (!PyArg_ParseTuple(args.ptr(), "ffff", &x, &y, &z, &velocity)) throw Py::Exception(); - getView3DIventorPtr()->getViewer()->startAnimating(SbVec3f(x,y,z),velocity); + getView3DIventorPtr()->getViewer()->startSpinningAnimation(SbVec3f(x, y, z), velocity); return Py::None(); } diff --git a/src/Gui/View3DSettings.cpp b/src/Gui/View3DSettings.cpp index f16e5e5acb..449302fffb 100644 --- a/src/Gui/View3DSettings.cpp +++ b/src/Gui/View3DSettings.cpp @@ -74,7 +74,7 @@ void View3DSettings::applySettings() OnChange(*hGrp,"CornerCoordSystem"); OnChange(*hGrp,"CornerCoordSystemSize"); OnChange(*hGrp,"ShowAxisCross"); - OnChange(*hGrp,"UseAutoRotation"); + OnChange(*hGrp,"UseNavigationAnimations"); OnChange(*hGrp,"Gradient"); OnChange(*hGrp,"RadialGradient"); OnChange(*hGrp,"BackgroundColor"); @@ -287,9 +287,9 @@ void View3DSettings::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M _viewer->setAxisCross(rGrp.GetBool("ShowAxisCross", false)); } } - else if (strcmp(Reason,"UseAutoRotation") == 0) { + else if (strcmp(Reason,"UseNavigationAnimations") == 0) { for (auto _viewer : _viewers) { - _viewer->setAnimationEnabled(rGrp.GetBool("UseAutoRotation", false)); + _viewer->setAnimationEnabled(rGrp.GetBool("UseNavigationAnimations", true)); } } else if (strcmp(Reason,"Gradient") == 0 || strcmp(Reason,"RadialGradient") == 0) { diff --git a/src/Gui/ViewParams.h b/src/Gui/ViewParams.h index 91d8a2ceec..2d2087bd3a 100644 --- a/src/Gui/ViewParams.h +++ b/src/Gui/ViewParams.h @@ -64,11 +64,8 @@ public: FC_VIEW_PARAM(ShowSelectionBoundingBox,bool,Bool,false) \ FC_VIEW_PARAM(PropertyViewTimer, unsigned long, Unsigned, 100) \ FC_VIEW_PARAM(AxisXColor,unsigned long,Unsigned,0xCC333300) \ - FC_VIEW_PARAM(AxisXAltColor,unsigned long,Unsigned,0xCC4C4C00) \ FC_VIEW_PARAM(AxisYColor,unsigned long,Unsigned,0x33CC3300) \ - FC_VIEW_PARAM(AxisYAltColor,unsigned long,Unsigned,0x4CCC4C00) \ FC_VIEW_PARAM(AxisZColor,unsigned long,Unsigned,0x3333CC00) \ - FC_VIEW_PARAM(AxisZAltColor,unsigned long,Unsigned,0x4C4CCC00) \ #undef FC_VIEW_PARAM diff --git a/src/Gui/ViewProviderDragger.cpp b/src/Gui/ViewProviderDragger.cpp index 42171bcd04..89b2ddb9cb 100644 --- a/src/Gui/ViewProviderDragger.cpp +++ b/src/Gui/ViewProviderDragger.cpp @@ -33,6 +33,7 @@ #include #include +#include "Gui/ViewParams.h" #include "Application.h" #include "BitmapFactory.h" @@ -137,6 +138,11 @@ bool ViewProviderDragger::setEdit(int ModNum) assert(!csysDragger); csysDragger = new SoFCCSysDragger(); + csysDragger->setAxisColors( + Gui::ViewParams::instance()->getAxisXColor(), + Gui::ViewParams::instance()->getAxisYColor(), + Gui::ViewParams::instance()->getAxisZColor() + ); csysDragger->draggerSize.setValue(0.05f); csysDragger->translation.setValue(tempTransform->translation.getValue()); csysDragger->rotation.setValue(tempTransform->rotation.getValue()); diff --git a/src/Gui/Workbench.cpp b/src/Gui/Workbench.cpp index b1230a6101..01a4ebeb15 100644 --- a/src/Gui/Workbench.cpp +++ b/src/Gui/Workbench.cpp @@ -690,6 +690,7 @@ MenuItem* StdWorkbench::setupMenuBar() const << "Std_ToggleNavigation" << "Std_SetAppearance" << "Std_RandomColor" << "Separator" << "Std_Workbench" << "Std_ToolBarMenu" << "Std_DockViewMenu" << "Separator" + << "Std_LinkSelectActions" << "Std_TreeViewActions" << "Std_ViewStatusBar"; @@ -791,16 +792,16 @@ ToolBarItem* StdWorkbench::setupToolBars() const // View auto view = new ToolBarItem( root ); view->setCommand("View"); - *view << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_DrawStyle" << "Std_SelBoundingBox" - << "Separator" << "Std_SelectFilter" << "Std_SelBack" << "Std_SelForward" - << "Std_LinkSelectActions"<< "Separator" << "Std_TreeViewActions" << "Std_ViewIsometric" - << "Std_ViewFront"<< "Std_ViewTop" << "Std_ViewRight" << "Separator" << "Std_ViewRear" - << "Separator" << "Std_ViewBottom"<< "Std_ViewLeft" << "Separator" << "Std_MeasureDistance"; + *view << "Std_ViewFitAll" << "Std_ViewFitSelection" << "Std_ViewIsometric" + << "Std_ViewFront"<< "Std_ViewTop" << "Std_ViewRight" + << "Std_ViewRear" << "Std_ViewBottom"<< "Std_ViewLeft" + << "Separator" << "Std_DrawStyle" << "Std_SelectFilter" << "Std_TreeViewActions" + << "Separator" << "Std_MeasureDistance"; // Structure auto structure = new ToolBarItem( root ); structure->setCommand("Structure"); - *structure << "Std_Part" << "Std_Group" << "Std_LinkMake" << "Std_LinkActions"; + *structure << "Std_Part" << "Std_Group" << "Std_LinkActions"; // Help auto help = new ToolBarItem( root ); diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm index b0f03ffd83..0643df50ad 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts index dd44861e5c..a908abbac8 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_fr.ts @@ -1762,7 +1762,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées See Report View for detailed failure log. - Reportez-vous à la vue rapport pour plus de détails sur les échecs. + Voir la Vue rapport pour pour les logs détaillés des défaillances. @@ -1915,7 +1915,7 @@ les mises à jour disponibles seront vérifiées pour les extensions installées Failed to install Vermin -- check Report View for details. 'Vermin' is the name of a Python package, do not translate - L'installation de Vermin a échoué - consultez la vue rapport pour plus de détails. + L'installation de Vermin a échoué - voir la Vue rapport pour plus de détails. diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm index d66198745d..7cfdf0825e 100644 Binary files a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm and b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.qm differ diff --git a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts index edbf7f2c2c..f388791336 100644 --- a/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts +++ b/src/Mod/AddonManager/Resources/translations/AddonManager_pl.ts @@ -198,7 +198,7 @@ Czy chcesz, aby Menadżer dodatków zainstalował je automatycznie? Wybierz "Zig TIP: Since this is displayed within FreeCAD, in the Addon Manager, it is not necessary to take up space saying things like "This is a FreeCAD Addon..." -- just say what it does. - Wskazówka: ponieważ jest to wyświetlane w programie FreeCAD, w Menedżerze Dodatków, nie jest konieczne zajmowanie miejsca informacjami takimi jak "To jest dodatek do programu FreeCAD..." -- po prostu powiedz co on robi. + Wskazówka: ponieważ jest to wyświetlane w programie FreeCAD, w Menedżerze Dodatków, nie jest konieczne zajmowanie miejsca informacjami takimi jak "To jest dodatek do programu FreeCAD..." -- po prostu powiedz, co on robi. diff --git a/src/Mod/Arch/ArchAxis.py b/src/Mod/Arch/ArchAxis.py index 5c09daf58b..ecda27a768 100644 --- a/src/Mod/Arch/ArchAxis.py +++ b/src/Mod/Arch/ArchAxis.py @@ -180,11 +180,11 @@ class _Axis: if prop in ["Angles","Distances","Placement"]: obj.touch() - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -658,11 +658,11 @@ class _ViewProviderAxis: def transform(self): FreeCADGui.ActiveDocument.setEdit(self.Object, 1) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchAxisSystem.py b/src/Mod/Arch/ArchAxisSystem.py index 5373988e6b..a896a98a54 100644 --- a/src/Mod/Arch/ArchAxisSystem.py +++ b/src/Mod/Arch/ArchAxisSystem.py @@ -136,11 +136,11 @@ class _AxisSystem: for o in obj.Axes: o.Placement = delta.multiply(o.Placement) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -259,11 +259,11 @@ class _ViewProviderAxisSystem: def edit(self): FreeCADGui.ActiveDocument.setEdit(self.Object, 0) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchBuildingPart.py b/src/Mod/Arch/ArchBuildingPart.py index cfe611c931..51407a1c72 100644 --- a/src/Mod/Arch/ArchBuildingPart.py +++ b/src/Mod/Arch/ArchBuildingPart.py @@ -356,11 +356,11 @@ class BuildingPart(ArchIFC.IfcProduct): self.setProperties(obj) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -1054,10 +1054,10 @@ class ViewProviderBuildingPart: no.LongName = no.CloneOf.LongName FreeCAD.ActiveDocument.recompute() - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def writeInventor(self,obj): diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index fc2d4c6a3f..d6d4e06379 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -267,13 +267,13 @@ class Component(ArchIFC.IfcProduct): shape = self.processSubShapes(obj,shape) obj.Shape = shape - def __getstate__(self): + def dumps(self): # for compatibility with 0.17 if hasattr(self,"Type"): return self.Type return "Component" - def __setstate__(self,state): + def loads(self,state): return None def onBeforeChange(self,obj,prop): @@ -1408,11 +1408,11 @@ class ViewProviderComponent: return "Flat Lines" return mode - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchFence.py b/src/Mod/Arch/ArchFence.py index 3e8ae34741..aa6394cd81 100644 --- a/src/Mod/Arch/ArchFence.py +++ b/src/Mod/Arch/ArchFence.py @@ -81,13 +81,13 @@ class _Fence(ArchComponent.Component): self.Type = "Fence" - def __getstate__(self): + def dumps(self): if hasattr(self, 'sectionFaceNumbers'): return self.sectionFaceNumbers return None - def __setstate__(self, state): + def loads(self, state): if state is not None and isinstance(state, tuple): self.sectionFaceNumbers = state[0] diff --git a/src/Mod/Arch/ArchFloor.py b/src/Mod/Arch/ArchFloor.py index 2de8a1afa9..601abd661b 100644 --- a/src/Mod/Arch/ArchFloor.py +++ b/src/Mod/Arch/ArchFloor.py @@ -218,11 +218,11 @@ class _Floor(ArchIFC.IfcProduct): _Floor.setProperties(self,obj) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -372,11 +372,11 @@ class _ViewProviderFloor: return self.Object.Group return [] - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchGrid.py b/src/Mod/Arch/ArchGrid.py index c38f1473ad..a141029ad4 100644 --- a/src/Mod/Arch/ArchGrid.py +++ b/src/Mod/Arch/ArchGrid.py @@ -279,11 +279,11 @@ class ArchGrid: else: return [f.CenterOfMass for f in obj.Shape.Faces] - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -330,11 +330,11 @@ class ViewProviderArchGrid: def edit(self): FreeCADGui.ActiveDocument.setEdit(self.Object, 0) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchIFCView.py b/src/Mod/Arch/ArchIFCView.py index c4d4617ce9..b873f4423b 100644 --- a/src/Mod/Arch/ArchIFCView.py +++ b/src/Mod/Arch/ArchIFCView.py @@ -80,10 +80,10 @@ class IfcContextView: def transform(self): FreeCADGui.ActiveDocument.setEdit(self.Object, 1) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchMaterial.py b/src/Mod/Arch/ArchMaterial.py index a4f7f08f44..e9637aef84 100644 --- a/src/Mod/Arch/ArchMaterial.py +++ b/src/Mod/Arch/ArchMaterial.py @@ -186,11 +186,11 @@ class _ArchMaterialContainer: def execute(self,obj): return - def __getstate__(self): + def dumps(self): if hasattr(self,"Type"): return self.Type - def __setstate__(self,state): + def loads(self,state): if state: self.Type = state @@ -266,10 +266,10 @@ class _ViewProviderArchMaterialContainer: self.Object.Group = g FreeCAD.ActiveDocument.recompute() - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -410,11 +410,11 @@ class _ArchMaterial: p.ViewObject.ShapeColor = c return - def __getstate__(self): + def dumps(self): if hasattr(self,"Type"): return self.Type - def __setstate__(self,state): + def loads(self,state): if state: self.Type = state @@ -510,10 +510,10 @@ class _ViewProviderArchMaterial: elif hasattr(widget,"setValue"): widget.setText(value) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def claimChildren(self): @@ -744,11 +744,11 @@ class _ArchMultiMaterial: obj.addProperty("App::PropertyLinkList","Materials","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer materials")) obj.addProperty("App::PropertyFloatList","Thicknesses","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer thicknesses")) - def __getstate__(self): + def dumps(self): if hasattr(self,"Type"): return self.Type - def __setstate__(self,state): + def loads(self,state): if state: self.Type = state @@ -794,10 +794,10 @@ class _ViewProviderArchMultiMaterial: def edit(self): FreeCADGui.ActiveDocument.setEdit(self.Object, 0) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def isShow(self): diff --git a/src/Mod/Arch/ArchProfile.py b/src/Mod/Arch/ArchProfile.py index 063e6646c0..923a7c78d2 100644 --- a/src/Mod/Arch/ArchProfile.py +++ b/src/Mod/Arch/ArchProfile.py @@ -238,11 +238,11 @@ class _Profile(Draft._DraftObject): self.Profile = profile Draft._DraftObject.__init__(self,obj,"Profile") - def __getstate__(self): + def dumps(self): if hasattr(self,"Profile"): return self.Profile - def __setstate__(self,state): + def loads(self,state): if isinstance(state,list): self.Profile = state self.Type = "Profile" diff --git a/src/Mod/Arch/ArchReference.py b/src/Mod/Arch/ArchReference.py index b07c562baa..968fce78dd 100644 --- a/src/Mod/Arch/ArchReference.py +++ b/src/Mod/Arch/ArchReference.py @@ -113,11 +113,11 @@ class ArchReference: if obj.ViewObject and obj.ViewObject.Proxy: obj.ViewObject.Proxy.loadInventor(obj) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -395,11 +395,11 @@ class ViewProviderArchReference: s = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetInt("ReferenceCheckInterval",60) self.timer.start(1000*s) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchSchedule.py b/src/Mod/Arch/ArchSchedule.py index 3aa6e9bb68..6bba11f566 100644 --- a/src/Mod/Arch/ArchSchedule.py +++ b/src/Mod/Arch/ArchSchedule.py @@ -401,11 +401,11 @@ class _ArchSchedule: print("TOTAL:"+34*" "+v) self.setSpreadsheetData(obj) - def __getstate__(self): + def dumps(self): return self.Type - def __setstate__(self,state): + def loads(self,state): if state: self.Type = state @@ -477,10 +477,10 @@ class _ViewProviderArchSchedule: if hasattr(self,"Object"): return [self.Object.Proxy.getSpreadSheet(self.Object)] - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def getDisplayModes(self,vobj): diff --git a/src/Mod/Arch/ArchSectionPlane.py b/src/Mod/Arch/ArchSectionPlane.py index eea473f2f7..8e6177dfc1 100644 --- a/src/Mod/Arch/ArchSectionPlane.py +++ b/src/Mod/Arch/ArchSectionPlane.py @@ -902,11 +902,11 @@ class _SectionPlane: return obj.Shape.Faces[0].normalAt(0,0) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -1152,11 +1152,11 @@ class _ViewProviderSectionPlane: self.txtfont.size = vobj.FontSize.Value return - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchSite.py b/src/Mod/Arch/ArchSite.py index 9c60538242..faaf440772 100644 --- a/src/Mod/Arch/ArchSite.py +++ b/src/Mod/Arch/ArchSite.py @@ -818,11 +818,11 @@ class _Site(ArchIFC.IfcProduct): g.append(child) obj.Group = g - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None @@ -1223,11 +1223,11 @@ class _ViewProviderSite: return self.compass.scale(vobj.Object.ProjectedArea) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Arch/ArchWindow.py b/src/Mod/Arch/ArchWindow.py index f2d4ee908a..580c24b20b 100644 --- a/src/Mod/Arch/ArchWindow.py +++ b/src/Mod/Arch/ArchWindow.py @@ -821,6 +821,8 @@ class _Window(ArchComponent.Component): pass elif omode == 10: # -sliding pass + exv = FreeCAD.Vector() + zov = FreeCAD.Vector() V = 0 thk = obj.WindowParts[(i*5)+3] if "+V" in thk: @@ -844,12 +846,19 @@ class _Window(ArchComponent.Component): if zof: zov = DraftVecUtils.scaleTo(norm,zof) shape.translate(zov) - for symb in ssymbols: - symb.translate(zov) - for symb in vsymbols: - symb.translate(zov) - if rotdata and hinge and omode: - rotdata[0] = rotdata[0].add(zov) + if hinge and omode and 0 < omode < 9: + if DraftVecUtils.angle(chord, norm, enorm) < 0: + if omode%2 == 0: + zov = zov.add(exv) + else: + if omode%2 == 1: + zov = zov.add(exv) + for symb in ssymbols: + symb.translate(zov) + for symb in vsymbols: + symb.translate(zov) + if rotdata: + rotdata[0] = rotdata[0].add(zov) if obj.WindowParts[(i*5)+1] == "Louvre": if hasattr(obj,"LouvreWidth"): if obj.LouvreWidth and obj.LouvreSpacing: diff --git a/src/Mod/Arch/CMakeLists.txt b/src/Mod/Arch/CMakeLists.txt index 1590047d71..875dea60ec 100644 --- a/src/Mod/Arch/CMakeLists.txt +++ b/src/Mod/Arch/CMakeLists.txt @@ -61,6 +61,7 @@ SET(Arch_SRCS exportIFCStructuralTools.py ifc_objects.py ifc_viewproviders.py + ArchSketchObject.py ) SET(Dice3DS_SRCS diff --git a/src/Mod/Arch/OfflineRenderingUtils.py b/src/Mod/Arch/OfflineRenderingUtils.py index 920ffab64e..f270637b8f 100755 --- a/src/Mod/Arch/OfflineRenderingUtils.py +++ b/src/Mod/Arch/OfflineRenderingUtils.py @@ -471,11 +471,15 @@ def viewer(scene=None,background=(1.0,1.0,1.0),lightdir=None): # Initialize Coin. This returns a main window to use from pivy import coin - from pivy import sogui + from pivy import quarter + from PySide2 import QtWidgets + + app = QtWidgets.QApplication([]) + # Create a Qt widget, which will be our window. + win = quarter.QuarterWidget() - win = sogui.SoGui.init() if win is None: - print("Unable to create a SoGui window") + print("Unable to create a Quarter window") return win.setBackgroundColor(coin.SbColor(background[0],background[1],background[2])) @@ -495,17 +499,14 @@ def viewer(scene=None,background=(1.0,1.0,1.0),lightdir=None): # ref the scene so it doesn't get garbage-collected scene.ref() - # Create a viewer in which to see our scene graph - viewer = sogui.SoGuiExaminerViewer(win) - # Put our scene into viewer, change the title - viewer.setSceneGraph(scene) - viewer.setTitle("Coin viewer") - viewer.show() - - sogui.SoGui.show(win) # Display main window - sogui.SoGui.mainLoop() # Main Coin event loop + win.setSceneGraph(scene) + win.setWindowTitle("Coin viewer") + # IMPORTANT!!!!! Windows are hidden by default. + win.show() + # Start the event loop. + app.exec_() def embedLight(scene,lightdir): diff --git a/src/Mod/Arch/Resources/translations/Arch.ts b/src/Mod/Arch/Resources/translations/Arch.ts index 2983e76091..814351a9e8 100644 --- a/src/Mod/Arch/Resources/translations/Arch.ts +++ b/src/Mod/Arch/Resources/translations/Arch.ts @@ -4831,7 +4831,7 @@ Building creation aborted. - + When true, the fence will be colored like the original post and section. @@ -6212,12 +6212,12 @@ Building creation aborted. Arch_Fence - + Fence - + Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_be.ts b/src/Mod/Arch/Resources/translations/Arch_be.ts index 003d2fa57b..ff56f17b35 100644 --- a/src/Mod/Arch/Resources/translations/Arch_be.ts +++ b/src/Mod/Arch/Resources/translations/Arch_be.ts @@ -4930,7 +4930,7 @@ Building creation aborted. Колькасць слупоў, якія ўжытыя для ўзвядзення агароджы - + When true, the fence will be colored like the original post and section. Калі true, агароджа будзе афарбавана аднолькава з зыходным слупам і секцыяй. @@ -6311,12 +6311,12 @@ Building creation aborted. Arch_Fence - + Fence Агароджа - + Creates a fence object from a selected section, post and path Стварае аб'ект агароджы з абранага ўчастка, слупа і траекторыі diff --git a/src/Mod/Arch/Resources/translations/Arch_ca.ts b/src/Mod/Arch/Resources/translations/Arch_ca.ts index 8b50254c88..4782564f70 100644 --- a/src/Mod/Arch/Resources/translations/Arch_ca.ts +++ b/src/Mod/Arch/Resources/translations/Arch_ca.ts @@ -4889,7 +4889,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6270,12 +6270,12 @@ Building creation aborted. Arch_Fence - + Fence Tanca - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_cs.qm b/src/Mod/Arch/Resources/translations/Arch_cs.qm index 52961956f8..8ca8c20e17 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_cs.qm and b/src/Mod/Arch/Resources/translations/Arch_cs.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_cs.ts b/src/Mod/Arch/Resources/translations/Arch_cs.ts index aa95221880..1639bd7ead 100644 --- a/src/Mod/Arch/Resources/translations/Arch_cs.ts +++ b/src/Mod/Arch/Resources/translations/Arch_cs.ts @@ -2078,7 +2078,7 @@ bude pracovat při otevírání souboru. Write camera position - Zapsat pozici kamery + Zapsat polohu kamery @@ -2577,7 +2577,7 @@ Je-li Run = 0, pak se běh vypočítá tak, aby výška byla stejná jako relati Invert hinge position - Otočit pozici závěsů + Otočit polohu závěsů @@ -3025,7 +3025,7 @@ Je-li Run = 0, pak se běh vypočítá tak, aby výška byla stejná jako relati Edit views positions - Edit views positions + Upravit polohy pohledů @@ -3237,7 +3237,7 @@ Floor creation aborted. Create Axis - Create Axis + Vytvořit osu @@ -3560,7 +3560,7 @@ Building creation aborted. Set text position - Set text position + Nastavit polohu textu @@ -4134,7 +4134,7 @@ Building creation aborted. Camera position data associated with this object - Camera position data associated with this object + Údaje o poloze kamery přiřazené k tomuto objektu @@ -4411,7 +4411,7 @@ Building creation aborted. The position of the solar diagram - The position of the solar diagram + Poloha solárního diagramu @@ -4436,7 +4436,7 @@ Building creation aborted. The position of the Compass relative to the Site placement - The position of the Compass relative to the Site placement + Poloha kompasu vzhledem k umístění stavby @@ -4681,12 +4681,12 @@ Building creation aborted. The height of the truss at the start position - The height of the truss at the start position + Výška vazníku v počáteční poloze The height of the truss at the end position - The height of the truss at the end position + Výška vazníku v koncové poloze @@ -4921,7 +4921,7 @@ Building creation aborted. Počet sloupků použitých pro vytvoření plotu - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -5182,7 +5182,7 @@ Building creation aborted. The position of the tag text. Keep (0,0,0) for center position - The position of the tag text. Keep (0,0,0) for center position + Poloha textu štítku. Použij (0,0,0) pro vystředění @@ -5865,7 +5865,7 @@ Building creation aborted. The position of the text. Leave (0,0,0) for automatic position - The position of the text. Leave (0,0,0) for automatic position + Poloha textu. Použij (0,0,0) pro automatickou polohu @@ -6021,7 +6021,7 @@ Building creation aborted. Writing camera position - Writing camera position + Zápis polohy kamery @@ -6069,7 +6069,7 @@ Building creation aborted. Draft annotation tools - Nástroje pro anotaci návrhů + Nástroje pro poznámky k návrhu @@ -6079,7 +6079,7 @@ Building creation aborted. Draft snap - Snímek konceptu + Snímek návrhu @@ -6099,7 +6099,7 @@ Building creation aborted. &Draft - &Draft + &Návrh @@ -6109,7 +6109,7 @@ Building creation aborted. Annotation - Vysvětlivka + Poznámka @@ -6302,12 +6302,12 @@ Building creation aborted. Arch_Fence - + Fence Plot - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path @@ -6848,7 +6848,7 @@ Building creation aborted. Draft - Ponor + Návrh diff --git a/src/Mod/Arch/Resources/translations/Arch_de.ts b/src/Mod/Arch/Resources/translations/Arch_de.ts index 72da07b35f..05bf9f95c9 100644 --- a/src/Mod/Arch/Resources/translations/Arch_de.ts +++ b/src/Mod/Arch/Resources/translations/Arch_de.ts @@ -4887,7 +4887,7 @@ Gebäudeerstellung abgebrochen. Die Anzahl der Pfosten für den Bau des Zaunes - + When true, the fence will be colored like the original post and section. Wenn wahr, wird der Zaun wie der ursprüngliche Pfosten und Abschnitt gefärbt. @@ -6268,12 +6268,12 @@ Gebäudeerstellung abgebrochen. Arch_Fence - + Fence Zaun - + Creates a fence object from a selected section, post and path Erstellt ein Zaun-Objekt aus einem ausgewählten Abschnitt, Pfosten und Pfad diff --git a/src/Mod/Arch/Resources/translations/Arch_el.ts b/src/Mod/Arch/Resources/translations/Arch_el.ts index 3db7274d1c..54ea4bab98 100644 --- a/src/Mod/Arch/Resources/translations/Arch_el.ts +++ b/src/Mod/Arch/Resources/translations/Arch_el.ts @@ -4918,7 +4918,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6299,12 +6299,12 @@ Building creation aborted. Arch_Fence - + Fence Φράκτης - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_es-AR.ts b/src/Mod/Arch/Resources/translations/Arch_es-AR.ts index b5b0175526..5b22fbb6c0 100644 --- a/src/Mod/Arch/Resources/translations/Arch_es-AR.ts +++ b/src/Mod/Arch/Resources/translations/Arch_es-AR.ts @@ -4914,7 +4914,7 @@ Creación de construcción cancelada. El número de postes usados para construir la valla - + When true, the fence will be colored like the original post and section. Cuando es verdadero, la valla se coloreará como el poste original y la sección. @@ -6295,12 +6295,12 @@ Creación de construcción cancelada. Arch_Fence - + Fence Cerco - + Creates a fence object from a selected section, post and path Crea un objeto de valla de una sección seleccionada, poste y ruta diff --git a/src/Mod/Arch/Resources/translations/Arch_es-ES.ts b/src/Mod/Arch/Resources/translations/Arch_es-ES.ts index 6e8ca9e759..b1b6a561df 100644 --- a/src/Mod/Arch/Resources/translations/Arch_es-ES.ts +++ b/src/Mod/Arch/Resources/translations/Arch_es-ES.ts @@ -4914,7 +4914,7 @@ Creación de construcción cancelada. El número de postes usados para construir la valla - + When true, the fence will be colored like the original post and section. Cuando es verdadero, la valla se coloreará como el poste original y la sección. @@ -6295,12 +6295,12 @@ Creación de construcción cancelada. Arch_Fence - + Fence Valla - + Creates a fence object from a selected section, post and path Crea un objeto de valla de una sección seleccionada, poste y ruta diff --git a/src/Mod/Arch/Resources/translations/Arch_eu.ts b/src/Mod/Arch/Resources/translations/Arch_eu.ts index 524b2266f4..519380fb69 100644 --- a/src/Mod/Arch/Resources/translations/Arch_eu.ts +++ b/src/Mod/Arch/Resources/translations/Arch_eu.ts @@ -4920,7 +4920,7 @@ Eraikinaren sorrera utzi egin da. Hesia eraikitzeko erabilitako zutoin kopurua - + When true, the fence will be colored like the original post and section. Egia denean, hesia jatorrizko zutoina eta sekzioa bezala koloreztatuko da. @@ -6301,12 +6301,12 @@ Eraikinaren sorrera utzi egin da. Arch_Fence - + Fence Hesia - + Creates a fence object from a selected section, post and path Hesi-objektu bat sortzen du hautatutako sekzio, zutoin eta bide bat erabilita diff --git a/src/Mod/Arch/Resources/translations/Arch_fi.ts b/src/Mod/Arch/Resources/translations/Arch_fi.ts index 0e55a32838..f1f063ef07 100644 --- a/src/Mod/Arch/Resources/translations/Arch_fi.ts +++ b/src/Mod/Arch/Resources/translations/Arch_fi.ts @@ -4922,7 +4922,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6303,12 +6303,12 @@ Building creation aborted. Arch_Fence - + Fence Aita - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_fr.qm b/src/Mod/Arch/Resources/translations/Arch_fr.qm index 9be110a28c..06541144b2 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_fr.qm and b/src/Mod/Arch/Resources/translations/Arch_fr.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_fr.ts b/src/Mod/Arch/Resources/translations/Arch_fr.ts index 903cf8dfa0..8884b2b449 100644 --- a/src/Mod/Arch/Resources/translations/Arch_fr.ts +++ b/src/Mod/Arch/Resources/translations/Arch_fr.ts @@ -1107,8 +1107,7 @@ instead of the FreeCAD web workbench Shows verbose debug messages during import and export of IFC files in the Report view panel - Afficher les messages de débogage pendant l'import et l'export -des fichiers IFC dans la vue rapport + Afficher les messages de débogage pendant l'import et l'export des fichiers IFC dans la Vue rapport @@ -4889,7 +4888,7 @@ La création du bâtiment est abandonnée. Le nombre de poteaux utilisés pour construire la clôture - + When true, the fence will be colored like the original post and section. Si mis à vrai, la clôture sera colorée comme le poteau et la section d'origine. @@ -6270,12 +6269,12 @@ La création du bâtiment est abandonnée. Arch_Fence - + Fence Clôture - + Creates a fence object from a selected section, post and path Créer une clôture à partir de la section sélectionnée, du poteau et du chemin diff --git a/src/Mod/Arch/Resources/translations/Arch_gl.ts b/src/Mod/Arch/Resources/translations/Arch_gl.ts index 6ea75a64f9..0e11c045ac 100644 --- a/src/Mod/Arch/Resources/translations/Arch_gl.ts +++ b/src/Mod/Arch/Resources/translations/Arch_gl.ts @@ -4922,7 +4922,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6303,12 +6303,12 @@ Building creation aborted. Arch_Fence - + Fence Valado - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_hr.ts b/src/Mod/Arch/Resources/translations/Arch_hr.ts index 3cae14a77c..24d08e5c80 100644 --- a/src/Mod/Arch/Resources/translations/Arch_hr.ts +++ b/src/Mod/Arch/Resources/translations/Arch_hr.ts @@ -4982,7 +4982,7 @@ Stvaranje zgrade prekinuto. Broj stupova korištenih u gradnji ograde - + When true, the fence will be colored like the original post and section. Kad je istina, ograda će biti obojena poput originalnog stupa i odjeljka. @@ -6373,12 +6373,12 @@ Stvaranje zgrade prekinuto. Arch_Fence - + Fence Ograda - + Creates a fence object from a selected section, post and path Stvara objekt ograde iz odabranog odjeljka, stupa i putanje diff --git a/src/Mod/Arch/Resources/translations/Arch_hu.ts b/src/Mod/Arch/Resources/translations/Arch_hu.ts index 82da048dda..899ec72b30 100644 --- a/src/Mod/Arch/Resources/translations/Arch_hu.ts +++ b/src/Mod/Arch/Resources/translations/Arch_hu.ts @@ -4922,7 +4922,7 @@ Building creation aborted. A kerítés építésére használt oszlopok száma - + When true, the fence will be colored like the original post and section. Ha igaz, a kerítés olyan színű lesz, mint az eredeti oszlop és a szakasz. @@ -6303,12 +6303,12 @@ Building creation aborted. Arch_Fence - + Fence Kerítés - + Creates a fence object from a selected section, post and path Kerítés tárgy létrehozása a kijelölt szakaszból, oszlopból és útvonalból diff --git a/src/Mod/Arch/Resources/translations/Arch_id.ts b/src/Mod/Arch/Resources/translations/Arch_id.ts index cd3aad1f49..d274dd71fe 100644 --- a/src/Mod/Arch/Resources/translations/Arch_id.ts +++ b/src/Mod/Arch/Resources/translations/Arch_id.ts @@ -4916,7 +4916,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6297,12 +6297,12 @@ Building creation aborted. Arch_Fence - + Fence Fence - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_it.ts b/src/Mod/Arch/Resources/translations/Arch_it.ts index cc78d3fc63..efd5b04836 100644 --- a/src/Mod/Arch/Resources/translations/Arch_it.ts +++ b/src/Mod/Arch/Resources/translations/Arch_it.ts @@ -4908,7 +4908,7 @@ Creazione Edificio interrotta. Il numero di piantoni usati per costruire la recinzione - + When true, the fence will be colored like the original post and section. Quando è vero, la recinzione è colorata come il piantone e la sezione originali. @@ -6289,12 +6289,12 @@ Creazione Edificio interrotta. Arch_Fence - + Fence Recinzione - + Creates a fence object from a selected section, post and path Crea un oggetto recinzione da una sezione, un piantone e un percorso selezionati diff --git a/src/Mod/Arch/Resources/translations/Arch_ja.ts b/src/Mod/Arch/Resources/translations/Arch_ja.ts index 34e6740fb7..40a7711cab 100644 --- a/src/Mod/Arch/Resources/translations/Arch_ja.ts +++ b/src/Mod/Arch/Resources/translations/Arch_ja.ts @@ -4907,7 +4907,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6288,12 +6288,12 @@ Building creation aborted. Arch_Fence - + Fence フェンス - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_ka.ts b/src/Mod/Arch/Resources/translations/Arch_ka.ts index 64db5be151..8a1ddd9b9d 100644 --- a/src/Mod/Arch/Resources/translations/Arch_ka.ts +++ b/src/Mod/Arch/Resources/translations/Arch_ka.ts @@ -4911,7 +4911,7 @@ Building creation aborted. ღობის ასაგებად გამოყენებული ბოძების რაოდენობა - + When true, the fence will be colored like the original post and section. თუ ჩართულია, ღობე შეიღებება საწყისი ბოძებისა და სექციების ფერად. @@ -6292,12 +6292,12 @@ Building creation aborted. Arch_Fence - + Fence მესერი - + Creates a fence object from a selected section, post and path ქმნის ღობის ობიექტს მონიშნული სექციების, ბოძებისა და ბილის მიხედვით diff --git a/src/Mod/Arch/Resources/translations/Arch_ko.ts b/src/Mod/Arch/Resources/translations/Arch_ko.ts index 0c8feee371..bec959d7a9 100644 --- a/src/Mod/Arch/Resources/translations/Arch_ko.ts +++ b/src/Mod/Arch/Resources/translations/Arch_ko.ts @@ -4922,7 +4922,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6303,12 +6303,12 @@ Building creation aborted. Arch_Fence - + Fence Fence - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_nl.ts b/src/Mod/Arch/Resources/translations/Arch_nl.ts index a5f52578bd..1149320759 100644 --- a/src/Mod/Arch/Resources/translations/Arch_nl.ts +++ b/src/Mod/Arch/Resources/translations/Arch_nl.ts @@ -4915,7 +4915,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6296,12 +6296,12 @@ Building creation aborted. Arch_Fence - + Fence Hek - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_pl.ts b/src/Mod/Arch/Resources/translations/Arch_pl.ts index 8c8a883ac7..06883c2367 100644 --- a/src/Mod/Arch/Resources/translations/Arch_pl.ts +++ b/src/Mod/Arch/Resources/translations/Arch_pl.ts @@ -4932,7 +4932,7 @@ Tworzenie budynku zostało przerwane. Liczba słupków użytych do budowy ogrodzenia - + When true, the fence will be colored like the original post and section. Jeśli to prawda, ogrodzenie będzie pokolorowane jak oryginalny słupek i przekrój. @@ -6313,12 +6313,12 @@ Tworzenie budynku zostało przerwane. Arch_Fence - + Fence Ogrodzenie - + Creates a fence object from a selected section, post and path Tworzy obiekt ogrodzenia z wybranego przekroju, słupka i ścieżki diff --git a/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm b/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm index 5c734f395b..d5f6d3763f 100644 Binary files a/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm and b/src/Mod/Arch/Resources/translations/Arch_pt-BR.qm differ diff --git a/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts b/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts index bc1e10cb5e..787d77eb06 100644 --- a/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts +++ b/src/Mod/Arch/Resources/translations/Arch_pt-BR.ts @@ -3817,243 +3817,243 @@ Criação de edifício abortada. Start offset distance along the extrusion path (positive: extend, negative: trim) - Start offset distance along the extrusion path (positive: extend, negative: trim) + Distância inicial do offset no caminho de extrusão (valor positivo: extensão, negativo: redução) End offset distance along the extrusion path (positive: extend, negative: trim) - End offset distance along the extrusion path (positive: extend, negative: trim) + Distância final do offset no caminho de extrusão (valor positivo: extensão, negativo: redução) Automatically align the Base of the Structure perpendicular to the Tool axis - Automatically align the Base of the Structure perpendicular to the Tool axis + Alinha automaticamente a Base da Estrutura perpendicular ao eixo da ferramenta X offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True) - X offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True) + Offset do eixo X entre a origem da base e o eixo da ferramenta (usar apenas se BasePerpendicularToTool for verdade) Y offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True) - Y offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True) + Offset do eixo Y entre a origem da base e o eixo da ferramenta (usado apenas se BasePerpendicularToTool for Verdadeiro) Mirror the Base along its Y axis (only used if BasePerpendicularToTool is True) - Mirror the Base along its Y axis (only used if BasePerpendicularToTool is True) + Espelha a Base ao longo do seu eixo Y (usado apenas se BasePerpendicularToTool for verdadeiro) Base rotation around the Tool axis (only used if BasePerpendicularToTool is True) - Base rotation around the Tool axis (only used if BasePerpendicularToTool is True) + Rotação da Base em torno do eixo da ferramenta (usado somente se BasePerpendicularToTool for Verdadeiro) The length of this element, if not based on a profile - The length of this element, if not based on a profile + O comprimento deste elemento, se não for baseado em um perfil The width of this element, if not based on a profile - The width of this element, if not based on a profile + A largura deste elemento, se não for baseado em um perfil The height or extrusion depth of this element. Keep 0 for automatic - The height or extrusion depth of this element. Keep 0 for automatic + A profundidade ou altura de extrusão deste elemento. Mantenha 0 para automático The normal extrusion direction of this object (keep (0,0,0) for automatic normal) - The normal extrusion direction of this object (keep (0,0,0) for automatic normal) + A direção normal de extrusão deste objeto (mantenha (0,0,0) para normal automática) The structural nodes of this element - The structural nodes of this element + Os nós estruturais deste elemento A description of the standard profile this element is based upon - A description of the standard profile this element is based upon + Uma descrição do perfil padrão no qual este elemento é baseado Offset distance between the centerline and the nodes line - Offset distance between the centerline and the nodes line + A distância o eixo central e a linha de nós The facemaker type to use to build the profile of this object - The facemaker type to use to build the profile of this object + O tipo de gerador de faces a ser usado para construir o perfil deste objeto Selected edges (or group of edges) of the base ArchSketch, to use in creating the shape of this Arch Structure (instead of using all the Base shape's edges by default). Input are index numbers of edges or groups. - Selected edges (or group of edges) of the base ArchSketch, to use in creating the shape of this Arch Structure (instead of using all the Base shape's edges by default). Input are index numbers of edges or groups. + Bordas selecionadas (ou grupo de bordas) do ArchSketch, para usar na criação da forma desta Estrutura Arquitetura (em vez de usar todas as arestas da Base por padrão). A entrada é um número de índice de arestas ou grupos. If the nodes are visible or not - If the nodes are visible or not + Se os nós estão visíveis ou não The width of the nodes line - The width of the nodes line + A largura da linha de nós The size of the node points - The size of the node points + O tamanho dos pontos de nó The color of the nodes line - The color of the nodes line + A cor da linha de nós The type of structural node - The type of structural node + O tipo de nó estrutural Axes systems this structure is built on - Axes systems this structure is built on + Sistemas de eixos sobre os quais esta estrutura é construída The element numbers to exclude when this structure is based on axes - The element numbers to exclude when this structure is based on axes + Os números dos elementos a excluir quando essa estrutura for baseada em eixos If true the element are aligned with axes - If true the element are aligned with axes + Se verdadeiro, os elementos estarão alinhados com os eixos The model description of this equipment - The model description of this equipment + A descrição do modelo deste equipamento The URL of the product page of this equipment - The URL of the product page of this equipment + A URL da página do produto deste equipamento A standard code (MasterFormat, OmniClass,...) - A standard code (MasterFormat, OmniClass,...) + Um código de classificação (MasterFormat, OmniClass,...) Additional snap points for this equipment - Additional snap points for this equipment + Pontos de snap adicionais para este equipamento The electric power needed by this equipment in Watts - The electric power needed by this equipment in Watts + A energia elétrica necessária para este equipamento em Watts The type of this building - The type of this building + O tipo desta construção The height of this object - The height of this object + A altura deste objeto If true, the height value propagates to contained objects - If true, the height value propagates to contained objects + Se verdadeiro, o valor da altura se propaga para objetos contidos The level of the (0,0,0) point of this level - The level of the (0,0,0) point of this level + O nível do ponto (0,0,0) deste nível The computed floor area of this floor - The computed floor area of this floor + A área deste piso calculada An optional description for this component - An optional description for this component + Uma descrição opcional para este componente An optional tag for this component - An optional tag for this component + Uma etiqueta opcional para este componente The shape of this object - The shape of this object + A forma deste objeto This property stores an inventor representation for this object - This property stores an inventor representation for this object + Esta propriedade armazena uma representação de inventário para este objeto If true, only solids will be collected by this object when referenced from other files - If true, only solids will be collected by this object when referenced from other files + Se verdadeiro, apenas os sólidos serão coletados por este objeto quando referenciado a partir de outros arquivos A MaterialName:SolidIndexesList map that relates material names with solid indexes to be used when referencing this object from other files - A MaterialName:SolidIndexesList map that relates material names with solid indexes to be used when referencing this object from other files + Um mapa MaterialName:SolidIndexesList que relaciona nomes de materiais com índices sólidos a serem usados ao referenciar este objeto de outros arquivos The line width of this object - The line width of this object + A largura da linha deste objeto An optional unit to express levels - An optional unit to express levels + Uma unidade opcional para níveis A transformation to apply to the level mark - A transformation to apply to the level mark + Uma transformação a ser aplicada à marca de nível If true, show the level - If true, show the level + Se verdadeiro, mostra o nível If true, show the unit on the level tag - If true, show the unit on the level tag + Se verdadeiro, mostra a unidade na marca de nível @@ -4324,98 +4324,98 @@ Criação de edifício abortada. An extrusion vector to use when performing boolean operations - An extrusion vector to use when performing boolean operations + Um vetor de extrusão usado para operações booleanas Remove splitters from the resulting shape - Remove splitters from the resulting shape + Retira as arestas divisoras da forma resultante An optional offset between the model (0,0,0) origin and the point indicated by the geocoordinates - An optional offset between the model (0,0,0) origin and the point indicated by the geocoordinates + Um deslocamento opcional entre a origem do modelo (0,0,0) e o ponto indicado pelas coordenadas geográficas The type of this object - The type of this object + O tipo deste objeto The time zone where this site is located - The time zone where this site is located + O fuso horário onde este local está localizado An optional EPW File for the location of this site. Refer to the Site documentation to know how to obtain one - An optional EPW File for the location of this site. Refer to the Site documentation to know how to obtain one + Um arquivo EPW opcional para a localização deste site. Consulte a documentação do Site para saber como obter um Show wind rose diagram or not. Uses solar diagram scale. Needs Ladybug module - Show wind rose diagram or not. Uses solar diagram scale. Needs Ladybug module + Mostra um diagrama de rosa de ventos ou não. Usa a escala do diagrama solar. Precisa do módulo Ladybug Show solar diagram or not - Show solar diagram or not + Mostrar o diagrama solar ou não The scale of the solar diagram - The scale of the solar diagram + A escala do diagrama solar The position of the solar diagram - The position of the solar diagram + A posição do diagrama solar The color of the solar diagram - The color of the solar diagram + A cor do diagrama solar When set to 'True North' the whole geometry will be rotated to match the true north of this site - When set to 'True North' the whole geometry will be rotated to match the true north of this site + Quando definido como 'Norte Verdadeiro', toda a geometria será girada para coincidir com o verdadeiro norte deste local Show compass or not - Show compass or not + Mostra bússola ou não The rotation of the Compass relative to the Site - The rotation of the Compass relative to the Site + A rotação da Bússola relativa ao Local The position of the Compass relative to the Site placement - The position of the Compass relative to the Site placement + A posição da Bússola relativa ao posicionamento do local Update the Declination value based on the compass rotation - Update the Declination value based on the compass rotation + Atualizar o valor Declinação baseado na rotação do compasso The list of angles of the roof segments - The list of angles of the roof segments + A lista de ângulos dos segmentos do telhado The list of horizontal length projections of the roof segments - The list of horizontal length projections of the roof segments + A lista das projeções de comprimento horizontal dos segmentos do telhado The list of IDs of the relative profiles of the roof segments - The list of IDs of the relative profiles of the roof segments + A lista de IDs dos perfis relativos dos segmentos de telhado @@ -4880,7 +4880,7 @@ Criação de edifício abortada. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6261,12 +6261,12 @@ Criação de edifício abortada. Arch_Fence - + Fence Cerca - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_pt-PT.ts b/src/Mod/Arch/Resources/translations/Arch_pt-PT.ts index 56dbed206a..6d2a51a934 100644 --- a/src/Mod/Arch/Resources/translations/Arch_pt-PT.ts +++ b/src/Mod/Arch/Resources/translations/Arch_pt-PT.ts @@ -4914,7 +4914,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6295,12 +6295,12 @@ Building creation aborted. Arch_Fence - + Fence Cerca - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_ro.ts b/src/Mod/Arch/Resources/translations/Arch_ro.ts index 725632b16e..c902386970 100644 --- a/src/Mod/Arch/Resources/translations/Arch_ro.ts +++ b/src/Mod/Arch/Resources/translations/Arch_ro.ts @@ -4921,7 +4921,7 @@ Crearea de construcții a fost întreruptă. Numărul de postări utilizate pentru a construi gardul - + When true, the fence will be colored like the original post and section. Când este adevărat, gardul va fi colorat ca postul şi secţiunea originale. @@ -6302,12 +6302,12 @@ Crearea de construcții a fost întreruptă. Arch_Fence - + Fence Gard - + Creates a fence object from a selected section, post and path Creează un obiect de gard din secțiunea, postarea și calea selectate diff --git a/src/Mod/Arch/Resources/translations/Arch_ru.ts b/src/Mod/Arch/Resources/translations/Arch_ru.ts index c36b827a45..36f043a0dd 100644 --- a/src/Mod/Arch/Resources/translations/Arch_ru.ts +++ b/src/Mod/Arch/Resources/translations/Arch_ru.ts @@ -4900,7 +4900,7 @@ Building creation aborted. Количество столбов, используемых для возведения забора - + When true, the fence will be colored like the original post and section. Когда значение истинно, ограждение будет окрашено как первоначальная деталь и секция. @@ -6281,12 +6281,12 @@ Building creation aborted. Arch_Fence - + Fence Ограда - + Creates a fence object from a selected section, post and path Создать объект ограждения из выбранной секции, детали и траектории diff --git a/src/Mod/Arch/Resources/translations/Arch_sl.ts b/src/Mod/Arch/Resources/translations/Arch_sl.ts index fc08840b81..701f6ec2a0 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sl.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sl.ts @@ -4919,7 +4919,7 @@ Ustvarjanj stavbe prekinjeno. Število stojk, uporabljenih v ograji - + When true, the fence will be colored like the original post and section. Če drži, bo ograja pobarvana kot izhodiščni steber in odsek. @@ -6300,12 +6300,12 @@ Ustvarjanj stavbe prekinjeno. Arch_Fence - + Fence Ograja - + Creates a fence object from a selected section, post and path Iz izbranega preseka, stojke in poti ustvari ograjo diff --git a/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts b/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts index 08be8e4cae..ddc358a0d0 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sr-CS.ts @@ -4922,7 +4922,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6303,12 +6303,12 @@ Building creation aborted. Arch_Fence - + Fence Fence - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_sr.ts b/src/Mod/Arch/Resources/translations/Arch_sr.ts index ced7f3b893..6e58744009 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sr.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sr.ts @@ -4922,7 +4922,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6303,12 +6303,12 @@ Building creation aborted. Arch_Fence - + Fence Fence - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts b/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts index 76f26bb9b0..f9af4073c8 100644 --- a/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts +++ b/src/Mod/Arch/Resources/translations/Arch_sv-SE.ts @@ -4920,7 +4920,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6301,12 +6301,12 @@ Building creation aborted. Arch_Fence - + Fence Staket - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_tr.ts b/src/Mod/Arch/Resources/translations/Arch_tr.ts index 7ff878f913..e4d4b781a2 100644 --- a/src/Mod/Arch/Resources/translations/Arch_tr.ts +++ b/src/Mod/Arch/Resources/translations/Arch_tr.ts @@ -4918,7 +4918,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6299,12 +6299,12 @@ Building creation aborted. Arch_Fence - + Fence Çit - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_uk.ts b/src/Mod/Arch/Resources/translations/Arch_uk.ts index 3a49e02667..709bc4f63f 100644 --- a/src/Mod/Arch/Resources/translations/Arch_uk.ts +++ b/src/Mod/Arch/Resources/translations/Arch_uk.ts @@ -4923,7 +4923,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6304,12 +6304,12 @@ Building creation aborted. Arch_Fence - + Fence Паркан - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_val-ES.ts b/src/Mod/Arch/Resources/translations/Arch_val-ES.ts index d6d6aa8cba..67e839ae99 100644 --- a/src/Mod/Arch/Resources/translations/Arch_val-ES.ts +++ b/src/Mod/Arch/Resources/translations/Arch_val-ES.ts @@ -4891,7 +4891,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6272,12 +6272,12 @@ Building creation aborted. Arch_Fence - + Fence Tanca - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_zh-CN.ts b/src/Mod/Arch/Resources/translations/Arch_zh-CN.ts index 14a6ff8197..35902c9383 100644 --- a/src/Mod/Arch/Resources/translations/Arch_zh-CN.ts +++ b/src/Mod/Arch/Resources/translations/Arch_zh-CN.ts @@ -4903,7 +4903,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6284,12 +6284,12 @@ Building creation aborted. Arch_Fence - + Fence 栅栏 - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/Resources/translations/Arch_zh-TW.ts b/src/Mod/Arch/Resources/translations/Arch_zh-TW.ts index 5cc74ac3b0..740412e209 100644 --- a/src/Mod/Arch/Resources/translations/Arch_zh-TW.ts +++ b/src/Mod/Arch/Resources/translations/Arch_zh-TW.ts @@ -4909,7 +4909,7 @@ Building creation aborted. The number of posts used to build the fence - + When true, the fence will be colored like the original post and section. When true, the fence will be colored like the original post and section. @@ -6290,12 +6290,12 @@ Building creation aborted. Arch_Fence - + Fence 欄柵 - + Creates a fence object from a selected section, post and path Creates a fence object from a selected section, post and path diff --git a/src/Mod/Arch/ifc_objects.py b/src/Mod/Arch/ifc_objects.py index e83c601726..0d8ffa5532 100644 --- a/src/Mod/Arch/ifc_objects.py +++ b/src/Mod/Arch/ifc_objects.py @@ -27,7 +27,7 @@ class ifc_object: def onDocumentRestored(self, obj): obj.Type = [obj.IfcType] obj.Type = obj.IfcType - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None diff --git a/src/Mod/Assembly/CMakeLists.txt b/src/Mod/Assembly/CMakeLists.txt index 26c1245418..a6a9262fd0 100644 --- a/src/Mod/Assembly/CMakeLists.txt +++ b/src/Mod/Assembly/CMakeLists.txt @@ -6,10 +6,14 @@ endif(BUILD_GUI) set(Assembly_Scripts Init.py - Commands.py + CommandCreateAssembly.py + CommandInsertLink.py + CommandCreateJoint.py TestAssemblyWorkbench.py + JointObject.py Preferences.py AssemblyImport.py + UtilsAssembly.py ) if(BUILD_GUI) diff --git a/src/Mod/Assembly/CommandCreateAssembly.py b/src/Mod/Assembly/CommandCreateAssembly.py new file mode 100644 index 0000000000..980199d43a --- /dev/null +++ b/src/Mod/Assembly/CommandCreateAssembly.py @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import FreeCAD as App + +from PySide.QtCore import QT_TRANSLATE_NOOP + +if App.GuiUp: + import FreeCADGui as Gui + +# translate = App.Qt.translate + +__title__ = "Assembly Command Create Assembly" +__author__ = "Ondsel" +__url__ = "https://www.freecad.org" + + +class CommandCreateAssembly: + def __init__(self): + pass + + def GetResources(self): + return { + "Pixmap": "Geoassembly", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateAssembly", "Create Assembly"), + "Accel": "A", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateAssembly", + "Create an assembly object in the current document.", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return App.ActiveDocument is not None + + def Activated(self): + App.setActiveTransaction("Create assembly") + assembly = App.ActiveDocument.addObject("App::Part", "Assembly") + assembly.Type = "Assembly" + Gui.ActiveDocument.ActiveView.setActiveObject("part", assembly) + assembly.newObject("App::DocumentObjectGroup", "Joints") + App.closeActiveTransaction() + + +if App.GuiUp: + Gui.addCommand("Assembly_CreateAssembly", CommandCreateAssembly()) diff --git a/src/Mod/Assembly/CommandCreateJoint.py b/src/Mod/Assembly/CommandCreateJoint.py new file mode 100644 index 0000000000..cdac1611cb --- /dev/null +++ b/src/Mod/Assembly/CommandCreateJoint.py @@ -0,0 +1,505 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import os +import FreeCAD as App + +from PySide.QtCore import QT_TRANSLATE_NOOP + +if App.GuiUp: + import FreeCADGui as Gui + from PySide import QtCore, QtGui, QtWidgets + +import JointObject +import UtilsAssembly +import Assembly_rc + +# translate = App.Qt.translate + +__title__ = "Assembly Commands to Create Joints" +__author__ = "Ondsel" +__url__ = "https://www.freecad.org" + + +class CommandCreateJointFixed: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointFixed", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateJointFixed", "Create Fixed Joint"), + "Accel": "F", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointFixed", + "

Create a Fixed Joint: Permanently locks two parts together, preventing any movement or rotation.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 0) + Gui.Control.showDialog(self.panel) + + +class CommandCreateJointRevolute: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointRevolute", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateJointRevolute", "Create Revolute Joint"), + "Accel": "R", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointRevolute", + "

Create a Revolute Joint: Allows rotation around a single axis between selected parts.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 1) + Gui.Control.showDialog(self.panel) + + +class CommandCreateJointCylindrical: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointCylindrical", + "MenuText": QT_TRANSLATE_NOOP( + "Assembly_CreateJointCylindrical", "Create Cylindrical Joint" + ), + "Accel": "C", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointCylindrical", + "

Create a Cylindrical Joint: Enables rotation along one axis while permitting movement along the same axis between assembled parts.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 2) + Gui.Control.showDialog(self.panel) + + +class CommandCreateJointSlider: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointSlider", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateJointSlider", "Create Slider Joint"), + "Accel": "S", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointSlider", + "

Create a Slider Joint: Allows linear movement along a single axis but restricts rotation between selected parts.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 3) + Gui.Control.showDialog(self.panel) + + +class CommandCreateJointBall: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointBall", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateJointBall", "Create Ball Joint"), + "Accel": "B", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointBall", + "

Create a Ball Joint: Connects parts at a point, allowing unrestricted movement as long as the connection points remain in contact.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 4) + Gui.Control.showDialog(self.panel) + + +class CommandCreateJointPlanar: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointPlanar", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateJointPlanar", "Create Planar Joint"), + "Accel": "P", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointPlanar", + "

Create a Planar Joint: Ensures two selected features are in the same plane, restricting movement to that plane.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 5) + Gui.Control.showDialog(self.panel) + + +class CommandCreateJointParallel: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointParallel", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateJointParallel", "Create Parallel Joint"), + "Accel": "L", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointParallel", + "

Create a Parallel Joint: Aligns two features to be parallel, constraining relative movement to parallel translations.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 6) + Gui.Control.showDialog(self.panel) + + +class CommandCreateJointTangent: + def __init__(self): + pass + + def GetResources(self): + + return { + "Pixmap": "Assembly_CreateJointTangent", + "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateJointTangent", "Create Tangent Joint"), + "Accel": "T", + "ToolTip": QT_TRANSLATE_NOOP( + "Assembly_CreateJointTangent", + "

Create a Tangent Joint: Forces two features to be tangent, restricting movement to smooth transitions along their contact surface.

", + ), + "CmdType": "ForEdit", + } + + def IsActive(self): + return UtilsAssembly.activeAssembly() is not None + + def Activated(self): + assembly = UtilsAssembly.activeAssembly() + if not assembly: + return + view = Gui.activeDocument().activeView() + + self.panel = TaskAssemblyCreateJoint(assembly, view, 7) + Gui.Control.showDialog(self.panel) + + +class MakeJointSelGate: + def __init__(self, taskbox, assembly): + self.taskbox = taskbox + self.assembly = assembly + + def allow(self, doc, obj, sub): + if not sub: + return False + + objs_names, element_name = UtilsAssembly.getObjsNamesAndElement(obj.Name, sub) + + if self.assembly.Name not in objs_names or element_name == "": + # Only objects within the assembly. And not whole objects, only elements. + return False + + if Gui.Selection.isSelected(obj, sub, Gui.Selection.ResolveMode.NoResolve): + # If it's to deselect then it's ok + return True + + if len(self.taskbox.current_selection) >= 2: + # No more than 2 elements can be selected for basic joints. + return False + + full_obj_name = ".".join(objs_names) + for selection_dict in self.taskbox.current_selection: + if selection_dict["full_obj_name"] == full_obj_name: + # Can't join a solid to itself. So the user need to select 2 different parts. + return False + + return True + + +class TaskAssemblyCreateJoint(QtCore.QObject): + def __init__(self, assembly, view, jointTypeIndex): + super().__init__() + + self.assembly = assembly + self.view = view + self.doc = App.ActiveDocument + + self.form = Gui.PySideUic.loadUi(":/panels/TaskAssemblyCreateJoint.ui") + + self.form.jointType.addItems(JointObject.JointTypes) + self.form.jointType.setCurrentIndex(jointTypeIndex) + + Gui.Selection.clearSelection() + Gui.Selection.addSelectionGate( + MakeJointSelGate(self, self.assembly), Gui.Selection.ResolveMode.NoResolve + ) + Gui.Selection.addObserver(self, Gui.Selection.ResolveMode.NoResolve) + Gui.Selection.setSelectionStyle(Gui.Selection.SelectionStyle.GreedySelection) + self.current_selection = [] + self.preselection_dict = None + + self.callbackMove = self.view.addEventCallback("SoLocation2Event", self.moveMouse) + self.callbackKey = self.view.addEventCallback("SoKeyboardEvent", self.KeyboardEvent) + + App.setActiveTransaction("Create joint") + self.createJointObject() + + def accept(self): + if len(self.current_selection) != 2: + App.Console.PrintWarning("You need to select 2 elements from 2 separate parts.") + return False + self.deactivate() + App.closeActiveTransaction() + return True + + def reject(self): + self.deactivate() + App.closeActiveTransaction(True) + return True + + def deactivate(self): + Gui.Selection.removeSelectionGate() + Gui.Selection.removeObserver(self) + Gui.Selection.setSelectionStyle(Gui.Selection.SelectionStyle.NormalSelection) + Gui.Selection.clearSelection() + self.view.removeEventCallback("SoLocation2Event", self.callbackMove) + self.view.removeEventCallback("SoKeyboardEvent", self.callbackKey) + if Gui.Control.activeDialog(): + Gui.Control.closeDialog() + + def createJointObject(self): + type_index = self.form.jointType.currentIndex() + + joint_group = self.assembly.getObject("Joints") + + if not joint_group: + joint_group = self.assembly.newObject("App::DocumentObjectGroup", "Joints") + + self.joint = joint_group.newObject("App::FeaturePython", "Joint") + JointObject.Joint(self.joint, type_index) + JointObject.ViewProviderJoint(self.joint.ViewObject, self.joint) + + def updateJoint(self): + # First we build the listwidget + self.form.featureList.clear() + simplified_names = [] + for sel in self.current_selection: + # TODO: ideally we probably want to hide the feature name in case of PartDesign bodies. ie body.face12 and not body.pad2.face12 + sname = sel["full_element_name"].split(self.assembly.Name + ".", 1)[-1] + simplified_names.append(sname) + self.form.featureList.addItems(simplified_names) + + # Then we pass the new list to the join object + self.joint.Proxy.setJointConnectors(self.current_selection) + + def moveMouse(self, info): + if len(self.current_selection) >= 2 or ( + len(self.current_selection) == 1 + and self.current_selection[0]["full_element_name"] + == self.preselection_dict["full_element_name"] + ): + self.joint.ViewObject.Proxy.showPreviewJCS(False) + return + + cursor_pos = self.view.getCursorPos() + cursor_info = self.view.getObjectInfo(cursor_pos) + # cursor_info example {'x': 41.515, 'y': 7.449, 'z': 16.861, 'ParentObject': , 'SubName': 'Body002.Pad.Face5', 'Document': 'part3', 'Object': 'Pad', 'Component': 'Face5'} + + if ( + not cursor_info + or not self.preselection_dict + or cursor_info["SubName"] != self.preselection_dict["sub_name"] + ): + self.joint.ViewObject.Proxy.showPreviewJCS(False) + return + + # newPos = self.view.getPoint(*info["Position"]) # This is not what we want, it's not pos on the object but on the focal plane + + newPos = App.Vector(cursor_info["x"], cursor_info["y"], cursor_info["z"]) + self.preselection_dict["mouse_pos"] = newPos + + self.preselection_dict["vertex_name"] = UtilsAssembly.findElementClosestVertex( + self.preselection_dict + ) + + placement = self.joint.Proxy.findPlacement( + self.preselection_dict["object"], + self.preselection_dict["element_name"], + self.preselection_dict["vertex_name"], + ) + self.joint.ViewObject.Proxy.showPreviewJCS(True, placement) + self.previewJCSVisible = True + + # 3D view keyboard handler + def KeyboardEvent(self, info): + if info["State"] == "UP" and info["Key"] == "ESCAPE": + self.reject() + + if info["State"] == "UP" and info["Key"] == "RETURN": + self.accept() + + # selectionObserver stuff + def addSelection(self, doc_name, obj_name, sub_name, mousePos): + full_obj_name = UtilsAssembly.getFullObjName(obj_name, sub_name) + full_element_name = UtilsAssembly.getFullElementName(obj_name, sub_name) + selected_object = UtilsAssembly.getObject(full_element_name) + element_name = UtilsAssembly.getElementName(full_element_name) + + selection_dict = { + "object": selected_object, + "element_name": element_name, + "full_element_name": full_element_name, + "full_obj_name": full_obj_name, + "mouse_pos": App.Vector(mousePos[0], mousePos[1], mousePos[2]), + } + selection_dict["vertex_name"] = UtilsAssembly.findElementClosestVertex(selection_dict) + + self.current_selection.append(selection_dict) + self.updateJoint() + + def removeSelection(self, doc_name, obj_name, sub_name, mousePos=None): + full_element_name = UtilsAssembly.getFullElementName(obj_name, sub_name) + + # Find and remove the corresponding dictionary from the combined list + selection_dict_to_remove = None + for selection_dict in self.current_selection: + if selection_dict["full_element_name"] == full_element_name: + selection_dict_to_remove = selection_dict + break + + if selection_dict_to_remove is not None: + self.current_selection.remove(selection_dict_to_remove) + + self.updateJoint() + + def setPreselection(self, doc_name, obj_name, sub_name): + if not sub_name: + self.preselection_dict = None + return + + full_obj_name = UtilsAssembly.getFullObjName(obj_name, sub_name) + full_element_name = UtilsAssembly.getFullElementName(obj_name, sub_name) + selected_object = UtilsAssembly.getObject(full_element_name) + element_name = UtilsAssembly.getElementName(full_element_name) + + self.preselection_dict = { + "object": selected_object, + "sub_name": sub_name, + "element_name": element_name, + "full_element_name": full_element_name, + "full_obj_name": full_obj_name, + } + + def clearSelection(self, doc_name): + self.current_selection.clear() + self.updateJoint() + + +if App.GuiUp: + Gui.addCommand("Assembly_CreateJointFixed", CommandCreateJointFixed()) + Gui.addCommand("Assembly_CreateJointRevolute", CommandCreateJointRevolute()) + Gui.addCommand("Assembly_CreateJointCylindrical", CommandCreateJointCylindrical()) + Gui.addCommand("Assembly_CreateJointSlider", CommandCreateJointSlider()) + Gui.addCommand("Assembly_CreateJointBall", CommandCreateJointBall()) + Gui.addCommand("Assembly_CreateJointPlanar", CommandCreateJointPlanar()) + Gui.addCommand("Assembly_CreateJointParallel", CommandCreateJointParallel()) + Gui.addCommand("Assembly_CreateJointTangent", CommandCreateJointTangent()) diff --git a/src/Mod/Assembly/Commands.py b/src/Mod/Assembly/CommandInsertLink.py similarity index 85% rename from src/Mod/Assembly/Commands.py rename to src/Mod/Assembly/CommandInsertLink.py index 73e37a98dd..0c5dd143b9 100644 --- a/src/Mod/Assembly/Commands.py +++ b/src/Mod/Assembly/CommandInsertLink.py @@ -30,63 +30,15 @@ if App.GuiUp: import FreeCADGui as Gui from PySide import QtCore, QtGui, QtWidgets +import UtilsAssembly + # translate = App.Qt.translate -__title__ = "Assembly Commands" +__title__ = "Assembly Command Insert Link" __author__ = "Ondsel" __url__ = "https://www.freecad.org" -def activeAssembly(): - doc = Gui.ActiveDocument - - if doc is None or doc.ActiveView is None: - return None - - active_part = doc.ActiveView.getActiveObject("part") - - if active_part is not None and active_part.Type == "Assembly": - return active_part - - return None - - -def isDocTemporary(doc): - # Guard against older versions of FreeCad which don't have the Temporary attribute - try: - docTemporary = doc.Temporary - except AttributeError: - docTemporary = False - return docTemporary - - -class CommandCreateAssembly: - def __init__(self): - pass - - def GetResources(self): - return { - "Pixmap": "Geoassembly", - "MenuText": QT_TRANSLATE_NOOP("Assembly_CreateAssembly", "Create Assembly"), - "Accel": "A", - "ToolTip": QT_TRANSLATE_NOOP( - "Assembly_CreateAssembly", - "Create an assembly object in the current document.", - ), - "CmdType": "ForEdit", - } - - def IsActive(self): - return App.ActiveDocument is not None - - def Activated(self): - App.setActiveTransaction("Create assembly") - assembly = App.ActiveDocument.addObject("App::Part", "Assembly") - assembly.Type = "Assembly" - Gui.ActiveDocument.ActiveView.setActiveObject("part", assembly) - App.closeActiveTransaction() - - class CommandInsertLink: def __init__(self): pass @@ -107,10 +59,10 @@ class CommandInsertLink: } def IsActive(self): - return activeAssembly() is not None + return UtilsAssembly.activeAssembly() is not None def Activated(self): - assembly = activeAssembly() + assembly = UtilsAssembly.activeAssembly() if not assembly: return view = Gui.activeDocument().activeView() @@ -166,12 +118,20 @@ class TaskAssemblyInsertLink(QtCore.QObject): docList = App.listDocuments().values() for doc in docList: - if isDocTemporary(doc): + if UtilsAssembly.isDocTemporary(doc): continue + # Build list of current assembly's parents, including the current assembly itself + parents = self.assembly.Parents + if parents: + root_parent, sub = parents[0] + parents_names, _ = UtilsAssembly.getObjsNamesAndElement(root_parent.Name, sub) + else: + parents_names = [self.assembly.Name] + for obj in doc.findObjects("App::Part"): - # we don't want to link to itself - if obj != self.assembly: + # we don't want to link to itself or parents. + if obj.Name not in parents_names: self.allParts.append(obj) self.partsDoc.append(doc) @@ -308,5 +268,4 @@ class TaskAssemblyInsertLink(QtCore.QObject): if App.GuiUp: - Gui.addCommand("Assembly_CreateAssembly", CommandCreateAssembly()) Gui.addCommand("Assembly_InsertLink", CommandInsertLink()) diff --git a/src/Mod/Assembly/Gui/Resources/Assembly.qrc b/src/Mod/Assembly/Gui/Resources/Assembly.qrc index 16439b1016..8ec25f10ba 100644 --- a/src/Mod/Assembly/Gui/Resources/Assembly.qrc +++ b/src/Mod/Assembly/Gui/Resources/Assembly.qrc @@ -2,8 +2,6 @@ icons/Assembly_InsertLink.svg icons/preferences-assembly.svg - panels/TaskAssemblyInsertLink.ui - preferences/Assembly.ui icons/Assembly_CreateJointBall.svg icons/Assembly_CreateJointCylindrical.svg icons/Assembly_CreateJointFixed.svg @@ -12,5 +10,8 @@ icons/Assembly_CreateJointRevolute.svg icons/Assembly_CreateJointSlider.svg icons/Assembly_CreateJointTangent.svg + panels/TaskAssemblyCreateJoint.ui + panels/TaskAssemblyInsertLink.ui + preferences/Assembly.ui diff --git a/src/Mod/Assembly/Gui/Resources/panels/TaskAssemblyCreateJoint.ui b/src/Mod/Assembly/Gui/Resources/panels/TaskAssemblyCreateJoint.ui new file mode 100644 index 0000000000..ed194b75c5 --- /dev/null +++ b/src/Mod/Assembly/Gui/Resources/panels/TaskAssemblyCreateJoint.ui @@ -0,0 +1,27 @@ + + + TaskAssemblyCreateJoint + + + + 0 + 0 + 376 + 387 + + + + Create Joint + + + + + + + + + + + + + diff --git a/src/Mod/Assembly/InitGui.py b/src/Mod/Assembly/InitGui.py index 0e63a6d653..7df9fb15d4 100644 --- a/src/Mod/Assembly/InitGui.py +++ b/src/Mod/Assembly/InitGui.py @@ -65,7 +65,7 @@ class AssemblyWorkbench(Workbench): # load the builtin modules from PySide import QtCore, QtGui from PySide.QtCore import QT_TRANSLATE_NOOP - import Commands + import CommandCreateAssembly, CommandInsertLink, CommandCreateJoint from Preferences import PreferencesPage # from Preferences import preferences @@ -77,12 +77,23 @@ class AssemblyWorkbench(Workbench): # build commands list cmdlist = ["Assembly_CreateAssembly", "Assembly_InsertLink"] + cmdListJoints = [ + "Assembly_CreateJointFixed", + "Assembly_CreateJointRevolute", + "Assembly_CreateJointCylindrical", + "Assembly_CreateJointSlider", + "Assembly_CreateJointBall", + "Assembly_CreateJointPlanar", + "Assembly_CreateJointParallel", + "Assembly_CreateJointTangent", + ] self.appendToolbar(QT_TRANSLATE_NOOP("Workbench", "Assembly"), cmdlist) + self.appendToolbar(QT_TRANSLATE_NOOP("Workbench", "Assembly Joints"), cmdListJoints) self.appendMenu( [QT_TRANSLATE_NOOP("Workbench", "&Assembly")], - cmdlist + ["Separator"], + cmdlist + ["Separator"] + cmdListJoints, ) print("Assembly workbench loaded") diff --git a/src/Mod/Assembly/JointObject.py b/src/Mod/Assembly/JointObject.py new file mode 100644 index 0000000000..92aebfb10c --- /dev/null +++ b/src/Mod/Assembly/JointObject.py @@ -0,0 +1,455 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import math + +import FreeCAD as App +import Part + +from PySide.QtCore import QT_TRANSLATE_NOOP + +if App.GuiUp: + import FreeCADGui as Gui + +# translate = App.Qt.translate + +__title__ = "Assembly Joint object" +__author__ = "Ondsel" +__url__ = "https://www.freecad.org" + +from pivy import coin +import UtilsAssembly + +JointTypes = [ + QT_TRANSLATE_NOOP("AssemblyJoint", "Fixed"), + QT_TRANSLATE_NOOP("AssemblyJoint", "Revolute"), + QT_TRANSLATE_NOOP("AssemblyJoint", "Cylindrical"), + QT_TRANSLATE_NOOP("AssemblyJoint", "Slider"), + QT_TRANSLATE_NOOP("AssemblyJoint", "Ball"), + QT_TRANSLATE_NOOP("AssemblyJoint", "Planar"), + QT_TRANSLATE_NOOP("AssemblyJoint", "Parallel"), + QT_TRANSLATE_NOOP("AssemblyJoint", "Tangent"), +] + + +class Joint: + def __init__(self, joint, type_index): + joint.Proxy = self + self.joint = joint + + joint.addProperty( + "App::PropertyEnumeration", + "JointType", + "Joint", + QT_TRANSLATE_NOOP("App::Property", "The type of the joint"), + ) + joint.JointType = JointTypes # sets the list + joint.JointType = JointTypes[type_index] # set the initial value + + # First Joint Connector + joint.addProperty( + "App::PropertyLink", + "Object1", + "Joint Connector 1", + QT_TRANSLATE_NOOP("App::Property", "The first object of the joint"), + ) + + joint.addProperty( + "App::PropertyString", + "Element1", + "Joint Connector 1", + QT_TRANSLATE_NOOP("App::Property", "The selected element of the first object"), + ) + + joint.addProperty( + "App::PropertyString", + "Vertex1", + "Joint Connector 1", + QT_TRANSLATE_NOOP("App::Property", "The selected vertex of the first object"), + ) + + joint.addProperty( + "App::PropertyPlacement", + "Placement1", + "Joint Connector 1", + QT_TRANSLATE_NOOP( + "App::Property", + "This is the local coordinate system within the object1 that will be used to joint.", + ), + ) + + # Second Joint Connector + joint.addProperty( + "App::PropertyLink", + "Object2", + "Joint Connector 2", + QT_TRANSLATE_NOOP("App::Property", "The second object of the joint"), + ) + + joint.addProperty( + "App::PropertyString", + "Element2", + "Joint Connector 2", + QT_TRANSLATE_NOOP("App::Property", "The selected element of the second object"), + ) + + joint.addProperty( + "App::PropertyString", + "Vertex2", + "Joint Connector 2", + QT_TRANSLATE_NOOP("App::Property", "The selected vertex of the second object"), + ) + + joint.addProperty( + "App::PropertyPlacement", + "Placement2", + "Joint Connector 2", + QT_TRANSLATE_NOOP( + "App::Property", + "This is the local coordinate system within the object2 that will be used to joint.", + ), + ) + + self.setJointConnectors([]) + + def onChanged(self, fp, prop): + """Do something when a property has changed""" + # App.Console.PrintMessage("Change property: " + str(prop) + "\n") + pass + + def execute(self, fp): + """Do something when doing a recomputation, this method is mandatory""" + # App.Console.PrintMessage("Recompute Python Box feature\n") + pass + + def setJointConnectors(self, current_selection): + # current selection is a vector of strings like "Assembly.Assembly1.Assembly2.Body.Pad.Edge16" including both what selection return as obj_name and obj_sub + + if len(current_selection) >= 1: + self.joint.Object1 = current_selection[0]["object"] + self.joint.Element1 = current_selection[0]["element_name"] + self.joint.Vertex1 = current_selection[0]["vertex_name"] + self.joint.Placement1 = self.findPlacement( + self.joint.Object1, self.joint.Element1, self.joint.Vertex1 + ) + else: + self.joint.Object1 = None + self.joint.Element1 = "" + self.joint.Vertex1 = "" + self.joint.Placement1 = UtilsAssembly.activeAssembly().Placement + + if len(current_selection) >= 2: + self.joint.Object2 = current_selection[1]["object"] + self.joint.Element2 = current_selection[1]["element_name"] + self.joint.Vertex2 = current_selection[1]["vertex_name"] + self.joint.Placement2 = self.findPlacement( + self.joint.Object2, self.joint.Element2, self.joint.Vertex2 + ) + else: + self.joint.Object2 = None + self.joint.Element2 = "" + self.joint.Vertex2 = "" + self.joint.Placement2 = UtilsAssembly.activeAssembly().Placement + + """ + So here we want to find a placement that corresponds to a local coordinate system that would be placed at the selected vertex. + - obj is usually a App::Link to a PartDesign::Body, or primitive, fasteners. But can also be directly the object.1 + - elt can be a face, an edge or a vertex. + - If elt is a vertex, then vtx = elt And placement is vtx coordinates without rotation. + - if elt is an edge, then vtx = edge start/end vertex depending on which is closer. If elt is an arc or circle, vtx can also be the center. The rotation is the plane normal to the line positioned at vtx. Or for arcs/circle, the plane of the arc. + - if elt is a plane face, vtx is the face vertex (to the list of vertex we need to add arc/circle centers) the closer to the mouse. The placement is the plane rotation positioned at vtx + - if elt is a cylindrical face, vtx can also be the center of the arcs of the cylindrical face. + """ + + def findPlacement(self, obj, elt, vtx): + plc = App.Placement(obj.Placement) + elt_type, elt_index = UtilsAssembly.extract_type_and_number(elt) + vtx_type, vtx_index = UtilsAssembly.extract_type_and_number(vtx) + + if elt_type == "Vertex": + vertex = obj.Shape.Vertexes[elt_index - 1] + plc.Base = (vertex.X, vertex.Y, vertex.Z) + elif elt_type == "Edge": + edge = obj.Shape.Edges[elt_index - 1] + curve = edge.Curve + + # First we find the translation + if vtx_type == "Edge": + # In this case the edge is a circle/arc and the wanted vertex is its center. + if curve.TypeId == "Part::GeomCircle": + center_point = curve.Location + plc.Base = (center_point.x, center_point.y, center_point.z) + else: + vertex = obj.Shape.Vertexes[vtx_index - 1] + plc.Base = (vertex.X, vertex.Y, vertex.Z) + + # Then we find the Rotation + if curve.TypeId == "Part::GeomCircle": + plc.Rotation = App.Rotation(curve.Rotation) + + if curve.TypeId == "Part::GeomLine": + plane_normal = curve.Direction + plane_origin = App.Vector(0, 0, 0) + plane = Part.Plane(plane_origin, plane_normal) + plc.Rotation = App.Rotation(plane.Rotation) + + elif elt_type == "Face": + face = obj.Shape.Faces[elt_index - 1] + + # First we find the translation + if vtx_type == "Edge": + # In this case the edge is a circle/arc and the wanted vertex is its center. + circleOrArc = face.Edges[vtx_index - 1] + curve = circleOrArc.Curve + if curve.TypeId == "Part::GeomCircle": + center_point = curve.Location + plc.Base = (center_point.x, center_point.y, center_point.z) + + else: + vertex = obj.Shape.Vertexes[vtx_index - 1] + plc.Base = (vertex.X, vertex.Y, vertex.Z) + + # Then we find the Rotation + surface = face.Surface + if surface.TypeId == "Part::GeomPlane": + plc.Rotation = App.Rotation(surface.Rotation) + + return plc + + +class ViewProviderJoint: + def __init__(self, obj, app_obj): + """Set this object to the proxy object of the actual view provider""" + self.axis_thickness = 3 + + view_params = App.ParamGet("User parameter:BaseApp/Preferences/View") + param_x_axis_color = view_params.GetUnsigned("AxisXColor", 0xCC333300) + param_y_axis_color = view_params.GetUnsigned("AxisYColor", 0x33CC3300) + param_z_axis_color = view_params.GetUnsigned("AxisZColor", 0x3333CC00) + + self.x_axis_so_color = coin.SoBaseColor() + self.x_axis_so_color.rgb.setValue(UtilsAssembly.color_from_unsigned(param_x_axis_color)) + self.y_axis_so_color = coin.SoBaseColor() + self.y_axis_so_color.rgb.setValue(UtilsAssembly.color_from_unsigned(param_y_axis_color)) + self.z_axis_so_color = coin.SoBaseColor() + self.z_axis_so_color.rgb.setValue(UtilsAssembly.color_from_unsigned(param_z_axis_color)) + + camera = Gui.ActiveDocument.ActiveView.getCameraNode() + self.cameraSensor = coin.SoFieldSensor(self.camera_callback, camera) + self.cameraSensor.attach(camera.height) + + self.app_obj = app_obj + obj.Proxy = self + + def attach(self, obj): + """Setup the scene sub-graph of the view provider, this method is mandatory""" + self.transform1 = coin.SoTransform() + self.transform2 = coin.SoTransform() + self.transform3 = coin.SoTransform() + + scaleF = self.get_JCS_size() + self.axisScale = coin.SoScale() + self.axisScale.scaleFactor.setValue(scaleF, scaleF, scaleF) + + self.draw_style = coin.SoDrawStyle() + self.draw_style.style = coin.SoDrawStyle.LINES + self.draw_style.lineWidth = self.axis_thickness + + self.switch_JCS1 = self.JCS_sep(obj, self.transform1) + self.switch_JCS2 = self.JCS_sep(obj, self.transform2) + self.switch_JCS_preview = self.JCS_sep(obj, self.transform3) + + self.display_mode = coin.SoGroup() + self.display_mode.addChild(self.switch_JCS1) + self.display_mode.addChild(self.switch_JCS2) + self.display_mode.addChild(self.switch_JCS_preview) + obj.addDisplayMode(self.display_mode, "Wireframe") + + def camera_callback(self, *args): + scaleF = self.get_JCS_size() + self.axisScale.scaleFactor.setValue(scaleF, scaleF, scaleF) + + def JCS_sep(self, obj, soTransform): + pick = coin.SoPickStyle() + pick.style.setValue(coin.SoPickStyle.UNPICKABLE) + + JCS = coin.SoAnnotation() + JCS.addChild(soTransform) + JCS.addChild(pick) + + base_plane_sep = self.plane_sep(0.4, 15) + X_axis_sep = self.line_sep([0.5, 0, 0], [1, 0, 0], self.x_axis_so_color) + Y_axis_sep = self.line_sep([0, 0.5, 0], [0, 1, 0], self.y_axis_so_color) + Z_axis_sep = self.line_sep([0, 0, 0], [0, 0, 1], self.z_axis_so_color) + + JCS.addChild(base_plane_sep) + JCS.addChild(X_axis_sep) + JCS.addChild(Y_axis_sep) + JCS.addChild(Z_axis_sep) + + switch_JCS = coin.SoSwitch() + switch_JCS.addChild(JCS) + switch_JCS.whichChild = coin.SO_SWITCH_NONE + return switch_JCS + + def line_sep(self, startPoint, endPoint, soColor): + line = coin.SoLineSet() + line.numVertices.setValue(2) + coords = coin.SoCoordinate3() + coords.point.setValues(0, [startPoint, endPoint]) + + axis_sep = coin.SoAnnotation() + axis_sep.addChild(self.axisScale) + axis_sep.addChild(self.draw_style) + axis_sep.addChild(soColor) + axis_sep.addChild(coords) + axis_sep.addChild(line) + return axis_sep + + def plane_sep(self, size, num_vertices): + coords = coin.SoCoordinate3() + + for i in range(num_vertices): + angle = float(i) / num_vertices * 2.0 * math.pi + x = math.cos(angle) * size + y = math.sin(angle) * size + coords.point.set1Value(i, x, y, 0) + + face = coin.SoFaceSet() + face.numVertices.setValue(num_vertices) + + transform = coin.SoTransform() + transform.translation.setValue(0, 0, 0) + + draw_style = coin.SoDrawStyle() + draw_style.style = coin.SoDrawStyle.FILLED + + material = coin.SoMaterial() + material.diffuseColor.setValue([1, 1, 1]) + material.ambientColor.setValue([1, 1, 1]) + material.specularColor.setValue([1, 1, 1]) + material.emissiveColor.setValue([1, 1, 1]) + material.transparency.setValue(0.7) + + face_sep = coin.SoAnnotation() + face_sep.addChild(self.axisScale) + face_sep.addChild(transform) + face_sep.addChild(draw_style) + face_sep.addChild(material) + face_sep.addChild(coords) + face_sep.addChild(face) + return face_sep + + def get_JCS_size(self): + camera = Gui.ActiveDocument.ActiveView.getCameraNode() + if not camera: + return 10 + + return camera.height.getValue() / 20 + + def set_JCS_placement(self, soTransform, placement): + t = placement.Base + soTransform.translation.setValue(t.x, t.y, t.z) + + r = placement.Rotation.Q + soTransform.rotation.setValue(r[0], r[1], r[2], r[3]) + + def updateData(self, fp, prop): + """If a property of the handled feature has changed we have the chance to handle this here""" + # fp is the handled feature, prop is the name of the property that has changed + if prop == "Placement1": + plc = fp.getPropertyByName("Placement1") + if fp.getPropertyByName("Object1"): + self.switch_JCS1.whichChild = coin.SO_SWITCH_ALL + self.set_JCS_placement(self.transform1, plc) + else: + self.switch_JCS1.whichChild = coin.SO_SWITCH_NONE + + if prop == "Placement2": + plc = fp.getPropertyByName("Placement2") + if fp.getPropertyByName("Object2"): + self.switch_JCS2.whichChild = coin.SO_SWITCH_ALL + self.set_JCS_placement(self.transform2, plc) + else: + self.switch_JCS2.whichChild = coin.SO_SWITCH_NONE + + def showPreviewJCS(self, visible, placement=None): + if visible: + self.switch_JCS_preview.whichChild = coin.SO_SWITCH_ALL + self.set_JCS_placement(self.transform3, placement) + else: + self.switch_JCS_preview.whichChild = coin.SO_SWITCH_NONE + + def getDisplayModes(self, obj): + """Return a list of display modes.""" + modes = [] + modes.append("Wireframe") + return modes + + def getDefaultDisplayMode(self): + """Return the name of the default display mode. It must be defined in getDisplayModes.""" + return "Wireframe" + + def onChanged(self, vp, prop): + """Here we can do something when a single property got changed""" + # App.Console.PrintMessage("Change property: " + str(prop) + "\n") + if prop == "color_X_axis": + c = vp.getPropertyByName("color_X_axis") + self.x_axis_so_color.rgb.setValue(c[0], c[1], c[2]) + if prop == "color_Y_axis": + c = vp.getPropertyByName("color_Y_axis") + self.x_axis_so_color.rgb.setValue(c[0], c[1], c[2]) + if prop == "color_Z_axis": + c = vp.getPropertyByName("color_Z_axis") + self.x_axis_so_color.rgb.setValue(c[0], c[1], c[2]) + + def getIcon(self): + if self.app_obj.getPropertyByName("JointType") == "Fixed": + return ":/icons/Assembly_CreateJointFixed.svg" + elif self.app_obj.getPropertyByName("JointType") == "Revolute": + return ":/icons/Assembly_CreateJointRevolute.svg" + elif self.app_obj.getPropertyByName("JointType") == "Cylindrical": + return ":/icons/Assembly_CreateJointCylindrical.svg" + elif self.app_obj.getPropertyByName("JointType") == "Slider": + return ":/icons/Assembly_CreateJointSlider.svg" + elif self.app_obj.getPropertyByName("JointType") == "Ball": + return ":/icons/Assembly_CreateJointBall.svg" + elif self.app_obj.getPropertyByName("JointType") == "Planar": + return ":/icons/Assembly_CreateJointPlanar.svg" + elif self.app_obj.getPropertyByName("JointType") == "Parallel": + return ":/icons/Assembly_CreateJointParallel.svg" + elif self.app_obj.getPropertyByName("JointType") == "Tangent": + return ":/icons/Assembly_CreateJointTangent.svg" + + return ":/icons/Assembly_CreateJoint.svg" + + def dumps(self): + """When saving the document this object gets stored using Python's json module.\ + Since we have some un-serializable parts here -- the Coin stuff -- we must define this method\ + to return a tuple of all serializable objects or None.""" + return None + + def loads(self, state): + """When restoring the serialized object from document we have the chance to set some internals here.\ + Since no data were serialized nothing needs to be done here.""" + return None diff --git a/src/Mod/Assembly/UtilsAssembly.py b/src/Mod/Assembly/UtilsAssembly.py new file mode 100644 index 0000000000..c8bc90359e --- /dev/null +++ b/src/Mod/Assembly/UtilsAssembly.py @@ -0,0 +1,246 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# /**************************************************************************** +# * +# Copyright (c) 2023 Ondsel * +# * +# This file is part of FreeCAD. * +# * +# FreeCAD is free software: you can redistribute it and/or modify it * +# under the terms of the GNU Lesser General Public License as * +# published by the Free Software Foundation, either version 2.1 of the * +# License, or (at your option) any later version. * +# * +# FreeCAD is distributed in the hope that it will be useful, but * +# WITHOUT ANY WARRANTY; without even the implied warranty of * +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * +# Lesser General Public License for more details. * +# * +# You should have received a copy of the GNU Lesser General Public * +# License along with FreeCAD. If not, see * +# . * +# * +# ***************************************************************************/ + +import FreeCAD as App + +if App.GuiUp: + import FreeCADGui as Gui + +# translate = App.Qt.translate + +__title__ = "Assembly utilitary functions" +__author__ = "Ondsel" +__url__ = "https://www.freecad.org" + + +def activeAssembly(): + doc = Gui.ActiveDocument + + if doc is None or doc.ActiveView is None: + return None + + active_part = doc.ActiveView.getActiveObject("part") + + if active_part is not None and active_part.Type == "Assembly": + return active_part + + return None + + +def isDocTemporary(doc): + # Guard against older versions of FreeCad which don't have the Temporary attribute + try: + temp = doc.Temporary + except AttributeError: + temp = False + return temp + + +def getObject(full_name): + # full_name is "Assembly.Assembly1.Assembly2.Assembly3.Box.Edge16" + # or "Assembly.Assembly1.Assembly2.Assembly3.Body.pad.Edge16" + # We want either Body or Box. + parts = full_name.split(".") + doc = App.ActiveDocument + if len(parts) < 3: + App.Console.PrintError( + "getObject() in UtilsAssembly.py the object name is too short, at minimum it should be something like 'Assembly.Box.edge16'. It shouldn't be shorter" + ) + return None + + obj = doc.getObject(parts[-3]) # So either 'Body', or 'Assembly' + + if not obj: + return None + + if obj.TypeId == "PartDesign::Body": + return obj + elif obj.TypeId == "App::Link": + linked_obj = obj.getLinkedObject() + if linked_obj.TypeId == "PartDesign::Body": + return obj + + else: # primitive, fastener, gear ... or link to primitive, fastener, gear... + return doc.getObject(parts[-2]) + + +def getElementName(full_name): + # full_name is "Assembly.Assembly1.Assembly2.Assembly3.Box.Edge16" + # We want either Edge16. + parts = full_name.split(".") + + if len(parts) < 3: + # At minimum "Assembly.Box.edge16". It shouldn't be shorter + return "" + + return parts[-1] + + +def getObjsNamesAndElement(obj_name, sub_name): + # if obj_name = "Assembly" and sub_name = "Assembly1.Assembly2.Assembly3.Box.Edge16" + # this will return ["Assembly","Assembly1","Assembly2","Assembly3","Box"] and "Edge16" + + parts = sub_name.split(".") + + # The last part is always the element name even if empty + element_name = parts[-1] + + # The remaining parts are object names + obj_names = parts[:-1] + obj_names.insert(0, obj_name) + + return obj_names, element_name + + +def getFullObjName(obj_name, sub_name): + # if obj_name = "Assembly" and sub_name = "Assembly1.Assembly2.Assembly3.Box.Edge16" + # this will return "Assembly.Assembly1.Assembly2.Assembly3.Box" + objs_names, element_name = getObjsNamesAndElement(obj_name, sub_name) + return ".".join(objs_names) + + +def getFullElementName(obj_name, sub_name): + # if obj_name = "Assembly" and sub_name = "Assembly1.Assembly2.Assembly3.Box.Edge16" + # this will return "Assembly.Assembly1.Assembly2.Assembly3.Box.Edge16" + return obj_name + "." + sub_name + + +def extract_type_and_number(element_name): + element_type = "" + element_number = "" + + for char in element_name: + if char.isalpha(): + # If the character is a letter, it's part of the type + element_type += char + elif char.isdigit(): + # If the character is a digit, it's part of the number + element_number += char + else: + break + + if element_type and element_number: + element_number = int(element_number) + return element_type, element_number + else: + return None, None + + +def findElementClosestVertex(selection_dict): + elt_type, elt_index = extract_type_and_number(selection_dict["element_name"]) + + if elt_type == "Vertex": + return selection_dict["element_name"] + + elif elt_type == "Edge": + edge = selection_dict["object"].Shape.Edges[elt_index - 1] + + curve = edge.Curve + if curve.TypeId == "Part::GeomCircle": + # For centers, as they are not shape vertexes, we return the element name. + # For now we only allow selecting the center of arcs / circles. + return selection_dict["element_name"] + + edge_points = getPointsFromVertexes(edge.Vertexes) + closest_vertex_index, _ = findClosestPointToMousePos( + edge_points, selection_dict["mouse_pos"] + ) + vertex_name = findVertexNameInObject( + edge.Vertexes[closest_vertex_index], selection_dict["object"] + ) + + return vertex_name + + elif elt_type == "Face": + face = selection_dict["object"].Shape.Faces[elt_index - 1] + + # Handle the circle/arc edges for their centers + center_points = [] + center_points_edge_indexes = [] + edges = face.Edges + + for i, edge in enumerate(edges): + curve = edge.Curve + if curve.TypeId == "Part::GeomCircle": + center_points.append(curve.Location) + center_points_edge_indexes.append(i) + + if len(center_points) > 0: + closest_center_index, closest_center_distance = findClosestPointToMousePos( + center_points, selection_dict["mouse_pos"] + ) + + # Hendle the face vertexes + face_points = getPointsFromVertexes(face.Vertexes) + closest_vertex_index, closest_vertex_distance = findClosestPointToMousePos( + face_points, selection_dict["mouse_pos"] + ) + + if len(center_points) > 0: + if closest_center_distance < closest_vertex_distance: + # Note the index here is the index within the face! Not the object. + index = center_points_edge_indexes[closest_center_index] + 1 + return "Edge" + str(index) + + vertex_name = findVertexNameInObject( + face.Vertexes[closest_vertex_index], selection_dict["object"] + ) + + return vertex_name + + return "" + + +def getPointsFromVertexes(vertexes): + points = [] + for vtx in vertexes: + points.append(vtx.Point) + return points + + +def findClosestPointToMousePos(candidates_points, mousePos): + closest_point_index = None + point_min_length = None + + for i, point in enumerate(candidates_points): + length = (mousePos - point).Length + if closest_point_index is None or length < point_min_length: + closest_point_index = i + point_min_length = length + + return closest_point_index, point_min_length + + +def findVertexNameInObject(vertex, obj): + for i, vtx in enumerate(obj.Shape.Vertexes): + if vtx.Point == vertex.Point: + return "Vertex" + str(i + 1) + return "" + + +def color_from_unsigned(c): + return [ + float(int((c >> 24) & 0xFF) / 255), + float(int((c >> 16) & 0xFF) / 255), + float(int((c >> 8) & 0xFF) / 255), + ] diff --git a/src/Mod/Draft/DraftGeomUtils.py b/src/Mod/Draft/DraftGeomUtils.py index 4df2d73818..314ed82b95 100644 --- a/src/Mod/Draft/DraftGeomUtils.py +++ b/src/Mod/Draft/DraftGeomUtils.py @@ -81,7 +81,9 @@ from draftgeoutils.geometry import (findPerpendicular, mirror_matrix, uv_vectors_from_face, placement_from_face, - placement_from_points) + placement_from_points, + distance_to_plane, + project_point_on_plane) from draftgeoutils.edges import (findEdge, orientEdge, diff --git a/src/Mod/Draft/Resources/translations/Draft.ts b/src/Mod/Draft/Resources/translations/Draft.ts index e318eceda3..16222df385 100644 --- a/src/Mod/Draft/Resources/translations/Draft.ts +++ b/src/Mod/Draft/Resources/translations/Draft.ts @@ -1529,17 +1529,17 @@ Note that this is not fully supported, and many object will be not editable with - + Text settings - + Font family - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1547,184 +1547,194 @@ such as "Arial:Bold" - + Internal font - + Font size - + Default height for texts and dimensions - - - - - - + + + + + + mm - + Dimension settings - + Display mode - + World - + Screen - + Number of decimals - + Extension lines size - + The default size of dimensions extension lines - + Extension line overshoot - + The default length of extension line above dimension line - + Dimension line overshoot - + The default distance the dimension line is extended past extension lines - + Arrows style - + Dot - + Circle - + Arrow - + Tick - + Tick-2 - + Arrows size - + The default size of arrows - + Text orientation - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. - + Left (ISO standard) - + Right - + Text spacing - + The space between the dimension line and the dimension text - + Show the unit suffix in dimensions - + Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + + + + + Optional string to appear between the feet and inches values in dimensions + + + + ShapeString settings - + Default ShapeString font file - + Select a font file @@ -3192,7 +3202,7 @@ or try saving to a lower DWG version. - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5363,7 +5373,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5655,12 +5665,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_be.qm b/src/Mod/Draft/Resources/translations/Draft_be.qm index 24db5928a7..98674f85fb 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_be.qm and b/src/Mod/Draft/Resources/translations/Draft_be.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_be.ts b/src/Mod/Draft/Resources/translations/Draft_be.ts index 812febf1eb..97d8d86d46 100644 --- a/src/Mod/Draft/Resources/translations/Draft_be.ts +++ b/src/Mod/Draft/Resources/translations/Draft_be.ts @@ -1565,17 +1565,17 @@ Note that this is not fully supported, and many object will be not editable with Тэксты і вымярэнні - + Text settings Налады тэксту - + Font family Сямейства шрыфтоў - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1586,184 +1586,194 @@ such as "Arial:Bold" такім як "Arial:Bold" - + Internal font Убудаваны шрыфт - + Font size Памер шрыфту - + Default height for texts and dimensions Першапачатковая вышыня для тэкстаў і вымярэнняў - - - - - - + + + + + + mm мм - + Dimension settings Налады вымярэнне - + Display mode Рэжым адлюстравання - + World Свет - + Screen Экран - + Number of decimals Колькасць дзесятковых знакаў - + Extension lines size Памер вынасных ліній - + The default size of dimensions extension lines Першапачатковы памер вымярэнняў вынасных ліній - + Extension line overshoot Перакрыццё вынасной лініі - + The default length of extension line above dimension line Першапачатковая даўжыня вынасная лінія па-над ліняй вымярэння - + Dimension line overshoot Перакрыццё лініі вымярэння - + The default distance the dimension line is extended past extension lines Першапачатковая адлегласць, на якую лінія вымярэння праходзіць за вынаснымі лініямі - + Arrows style Стыль стрэлак - + Dot Кропка - + Circle Акружнасць - + Arrow Стрэлка - + Tick Зачэп - + Tick-2 Зачэп-2 - + Arrows size Памер стрэлак - + The default size of arrows Першапачатковы памер стрэлак - + Text orientation Арыентацыя тэксту - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Арыентацыя тэкстаў вымярэння, калі гэтыя надпісы вертыкальныя. Першапачатковае значэнне - злева, што адпавядае стандарту ISO. - + Left (ISO standard) Злева (стандарт ISO) - + Right Справа - + Text spacing Інтэрвал тэксту - + The space between the dimension line and the dimension text Прастора паміж лініяй вымярэння і тэкстам - + Show the unit suffix in dimensions Паказаць прыстаўку адзінкі вымярэння ў вымярэннях - + Override unit Перавызначыць адзінку вымярэння - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Калі пакінуць поле пустым, вымярэнні памераў будуць паказаныя ў бягучай адзінцы вымярэння, якая вызначаная ў FreeCAD. Калі паказаць тут адзінку вымярэння, такую як м ці см, вы можаце прымусова адлюстраваць новыя вымярэнні ў гэтай адзінцы вымярэння. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Налады Контуру радка - + Default ShapeString font file Першапачатковы файл шрыфту Контуру радка - + Select a font file Абраць файл шрыфту @@ -3251,7 +3261,7 @@ or try saving to a lower DWG version. Абраныя фігуры павінны вызначаць плоскасць - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5430,7 +5440,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5723,12 +5733,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Невядомы стыль экспартавання SVG, пераключэнне на перакладзены - + The export list contains no object with a valid bounding box Спіс экспартавання не ўтрымлівае аб'екта з дапушчальнымі габарытамі diff --git a/src/Mod/Draft/Resources/translations/Draft_ca.qm b/src/Mod/Draft/Resources/translations/Draft_ca.qm index 1b6be11d95..37b3b231d0 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ca.qm and b/src/Mod/Draft/Resources/translations/Draft_ca.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ca.ts b/src/Mod/Draft/Resources/translations/Draft_ca.ts index f5d45f49cb..16993429b2 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ca.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ca.ts @@ -1553,17 +1553,17 @@ Tingueu en compte que això no és totalment compatible i que molts objectes no Textos i dimensions - + Text settings Configuració de text - + Font family Tipus de Font - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1571,184 +1571,194 @@ such as "Arial:Bold" Aquest és el nom de tipus de lletra per defecte per a tots els textos d'Esbós i les cotes. Pot ser un nom de lletra com "Arial", un estil per defecte com "sans", "serif" o "mono" o una família com "Arial, Helvètica", una tipografia sans o un nom amb un estil com «Arial: negreta" - + Internal font Tipus de lletra interna - + Font size Mida del tipus de lletra - + Default height for texts and dimensions Alçada d'omissió per a textos i dimensions - - - - - - + + + + + + mm mm - + Dimension settings Paràmetres de la cota - + Display mode Mode de visualització - + World Món - + Screen Pantalla - + Number of decimals Nombre de decimals - + Extension lines size Tamany de les linies d’extensiò - + The default size of dimensions extension lines La mida per defecte de línies d'extensió de dimensions - + Extension line overshoot Superació de la línia d'extensió - + The default length of extension line above dimension line La llargària per defecte de l'extensió de la línia per sobre de la línia de dimensió - + Dimension line overshoot Superació de la línia de dimensió - + The default distance the dimension line is extended past extension lines La distància per defecte de la línia de dimensió s'estén més enllà de les línies d'extensió - + Arrows style Estil de fletxes - + Dot Punt - + Circle Cercle - + Arrow Fletxa - + Tick Tick - + Tick-2 Tick-2 - + Arrows size Mida de les fletxes - + The default size of arrows La mida per defecte de fletxes - + Text orientation Orientació de text - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Això és l'orientació dels textos dimensió quan aquestes dimensions són verticals. Es deixa per defecte, que és l'estàndard ISO. - + Left (ISO standard) Esquerra (norma ISO) - + Right Dreta - + Text spacing Espaiat de text - + The space between the dimension line and the dimension text L'espai entre la línia de la dimensió i el text de la dimensió - + Show the unit suffix in dimensions Mostra el sufix de la unitat a les cotes - + Override unit Sobreescriu la unitat - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Si el camp es deixa en blanc, les mesures de les cotes es mostraran en l'unitat actual definida a FreeCAD. Si s'indica una unitat aqui, com ara m o cm, podeu forçar a que es mostrin les cotes en aquesta unitat. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Configuració ShapeString - + Default ShapeString font file Fitxer de tipus de lletra per defecte ShapeString - + Select a font file Seleccioneu un fitxer de tipus de lletra @@ -3222,7 +3232,7 @@ or try saving to a lower DWG version. Les Formes seleccionades han de definir un pla - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5399,7 +5409,7 @@ L'angle final serà l'angle de base més aquesta quantitat. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5693,12 +5703,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_cs.qm b/src/Mod/Draft/Resources/translations/Draft_cs.qm index 8737f0d362..4a353637bc 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_cs.qm and b/src/Mod/Draft/Resources/translations/Draft_cs.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_cs.ts b/src/Mod/Draft/Resources/translations/Draft_cs.ts index 753962101d..0e4a30d427 100644 --- a/src/Mod/Draft/Resources/translations/Draft_cs.ts +++ b/src/Mod/Draft/Resources/translations/Draft_cs.ts @@ -914,7 +914,7 @@ value by using the [ and ] keys while drawing Resets the working plane to its previous position - Resetuje pracovní rovinu na její předchozí pozici + Resetuje pracovní rovinu na její předchozí polohu @@ -1065,7 +1065,7 @@ value by using the [ and ] keys while drawing Apply above style to all annotations (texts, dimensions and labels) - Použít výše uvedený styl na všechny anotace (texty, rozměry a štítky) + Použít výše uvedený styl na všechny poznámky (texty, rozměry a štítky) @@ -1563,17 +1563,17 @@ Všimněte si, že toto není plně podporováno a mnoho objektů nebude možno Texty a kóty - + Text settings Nastavení textu - + Font family Rodina fontů - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1581,184 +1581,194 @@ such as "Arial:Bold" Toto je výchozí název písma pro všechny pracovní verze textů a rozměry. Název písma, jako je například "Arial", výchozí styl, jako například "sans", "serif" nebo "mono" nebo rodina může být například "Arial, Helvetica, sans"nebo název s styl, jako například"Arial: Bold" - + Internal font Vnitřní písmo - + Font size Velikost písma - + Default height for texts and dimensions Výchozí výšku pro texty a rozměry - - - - - - + + + + + + mm mm - + Dimension settings Nastavení kót - + Display mode Styl zobrazení - + World Svět - + Screen Obrazovka - + Number of decimals Počet desetinných míst - + Extension lines size Velikost rozšiřovacích čar - + The default size of dimensions extension lines Výchozí velikost vynášecích čar kót - + Extension line overshoot Přesah vynášecí čáry - + The default length of extension line above dimension line Výchozí délka vynášecí čáry za kótovací čarou - + Dimension line overshoot Přesah kótovací čáry - + The default distance the dimension line is extended past extension lines Výchozí délka, o kterou kótovací čára přesahuje vynášecí čáry - + Arrows style Typ šipek - + Dot Tečka - + Circle Kruh - + Arrow Šipka - + Tick Fajfka - + Tick-2 Fajfka-2 - + Arrows size Velikost šipek - + The default size of arrows Výchozí velikost šipek - + Text orientation Orientace textu - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Toto je orientace textu kóty když je text vertikálně. Standartně je doleva což je ISO standard. - + Left (ISO standard) Vlevo (ISO standard) - + Right Vpravo - + Text spacing Odsazení textu - + The space between the dimension line and the dimension text Mezera mezi kótovací čárou a textem - + Show the unit suffix in dimensions Zobrazovat jednoteky v kótách - + Override unit Přepsat jednotku - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Pokud toto pole ponecháte prázdné, rozměry rozměrů se zobrazí v aktuálních jednotkách definovaných ve FreeCADu. Zadáním jednotky, jako je m nebo cm, můžete vynutit zobrazení nových rozměrů v této jednotce. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Nastavení Tvaru písma - + Default ShapeString font file Výchozí soubor fontu pro Tvar písma - + Select a font file Vyberte soubor písma @@ -3081,7 +3091,7 @@ Není k dispozici, pokud je povolena možnost předvolby návrhu „Použít zá Arc - oblouk + Oblouk @@ -3180,7 +3190,7 @@ Není k dispozici, pokud je povolena možnost předvolby návrhu „Použít zá Draft - Ponor + Návrh @@ -3251,7 +3261,7 @@ nebo zkuste uložit do nižší verze DWG. Vybrané tvary musí definovat rovinu - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -3291,12 +3301,12 @@ Chcete-li povolit FreeCAD stahování těchto knihoven, odpovězte Ano. Set custom annotation scale in format x:x, x=x - Nastavte vlastní měřítko anotace ve formátu x:x, x=x + Nastavte vlastní měřítko poznámek ve formátu x:x, x=x Set the scale used by draft annotation tools - Nastavte měřítko používané nástroji pro poznámky konceptu + Nastavte měřítko používané nástroji pro poznámky návrhu @@ -3511,7 +3521,7 @@ Chcete-li povolit FreeCAD stahování těchto knihoven, odpovězte Ano. Pick text position - Vyberte pozici textu + Vyberte polohu textu @@ -3743,7 +3753,7 @@ Chcete-li povolit FreeCAD stahování těchto knihoven, odpovězte Ano. Annotation style editor - Editor stylu anotace + Editor stylu poznámky @@ -3888,7 +3898,7 @@ Konečný úhel bude základní úhel plus tato hodnota. Sketch is too complex to edit: it is suggested to use sketcher default editor - Skica je příliš složitá na úpravu: doporučujeme použít výchozí editor skicáře + Náčrt je příliš složitý na úpravu: doporučujeme použít výchozí editor náčrtu @@ -5373,7 +5383,7 @@ Konečný úhel bude základní úhel plus tato hodnota. Draft annotation tools - Nástroje pro anotaci návrhů + Nástroje pro poznámky k návrhu @@ -5430,7 +5440,7 @@ Konečný úhel bude základní úhel plus tato hodnota. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5647,7 +5657,7 @@ z nabídky Nástroje -> Správce doplňků Position - Pozice + Poloha @@ -5677,7 +5687,7 @@ z nabídky Nástroje -> Správce doplňků Label + Position - Štítek + Pozice + Štítek + Poloha @@ -5724,12 +5734,12 @@ z nabídky Nástroje -> Správce doplňků ImportSVG - + Unknown SVG export style, switching to Translated Neznámý styl exportu SVG, přepnutí na Přeloženo - + The export list contains no object with a valid bounding box Exportovaný seznam neobsahuje žádný objekt s platným ohraničovacím rámečkem @@ -5745,7 +5755,7 @@ z nabídky Nástroje -> Správce doplňků Select the face of solid body to create a working plane on which to sketch Draft objects. You may also select a three vertices or a Working Plane Proxy. - Vyberte plochu objemového těla a vytvořte pracovní rovinu, na které se budou skicovat objekty výkresu. + Vyberte plochu pevného tělesa pro vytvoření pracovní roviny, na kterou můžete načrtnout objekty výkresu. Můžete také vybrat tři vrcholy nebo zástupce pracovní roviny. @@ -5874,7 +5884,7 @@ Aby byla operace úspěšná, musí čáry sdílet společný bod na začátku n Creates a multi-line annotation. CTRL to snap. - Vytvoří víceřádkovou anotaci. CTRL pro přichycení. + Vytvoří víceřádkovou poznámku. CTRL pro přichycení. @@ -6124,7 +6134,7 @@ CTRL pro přichycení, SHIFT pro omezení. Arc - oblouk + Oblouk @@ -7244,7 +7254,7 @@ If 'Straight Direction' is set to 'Custom', the 'Points' property can be set as a list of arbitrary points. Seznam bodů definujících odkazovou čáru; obvykle seznam tří bodů. -Prvním bodem by měla být pozice textu, tedy „Umístění“, +Prvním bodem by měla být poloha textu, tedy „Umístění“, a poslední bod by měl být špičkou úsečky, tedy „cílovým bodem“. Středový bod se vypočítá automaticky v závislosti na zvoleném Hodnota a znaménko 'Přímý směr' a 'Přímá vzdálenost'. @@ -7311,19 +7321,19 @@ For 'Position', 'Length', and 'Area' these properties will be extracted from the or from the subelement 'VertexN', 'EdgeN', or 'FaceN', respectively, if it is specified. Typ informací zobrazených tímto štítkem. -Pokud je vybrána možnost „Vlastní“, použije se obsah položky „Vlastní text“. -U ostatních typů bude řetězec vypočítán automaticky z objektu definovaného v 'Target'. -'Tag' a 'Material' fungují pouze pro objekty, které mají tyto vlastnosti, jako jsou objekty Arch. +Pokud je vybrána možnost 'Vlastní', použije se obsah položky 'Vlastní text'. +U ostatních typů bude řetězec vypočítán automaticky z objektu definovaného v 'Cíli'. +'Štítek' a 'Materiál' fungují pouze pro objekty, které mají tyto vlastnosti, jako jsou objekty Arch. -Pro 'Position', 'Length' a 'Area' budou tyto vlastnosti extrahovány z hlavního objektu v 'Target', -nebo z dílčího prvku 'VertexN', 'EdgeN' nebo 'FaceN', pokud je zadán. +Pro 'Polohu', 'Délku' a 'Oblast' budou tyto vlastnosti extrahovány z hlavního objektu v 'Cíli', +nebo z dílčího prvku 'VrcholN', 'HranaN' nebo 'PlochaN', pokud je zadán. General scaling factor that affects the annotation consistently because it scales the text, and the line decorations, if any, in the same proportion. - Obecný faktor měřítka, který konzistentně ovlivňuje anotaci + Obecný faktor měřítka, který konzistentně ovlivňuje poznámku protože mění měřítko textu a případně zdobení řádků, ve stejném poměru. @@ -7334,7 +7344,7 @@ When using a saved style some of the view properties will become read-only; they will only be editable by changing the style through the 'Annotation style editor' tool. Styl poznámky, který se má použít na tento objekt. Při použití uloženého stylu se některé vlastnosti pohledu stanou pouze pro čtení; -budou upravitelné pouze změnou stylu pomocí nástroje 'Editor stylu anotací'. +budou upravitelné pouze změnou stylu pomocí nástroje 'Editor stylu poznámky'. @@ -7473,9 +7483,9 @@ The 'Axis' passes through this point. The axis object that overrides the value of 'Axis' and 'Center', for example, a datum line. Its placement, position and rotation, will be used when creating polar and circular arrays. Leave this property empty to be able to set 'Axis' and 'Center' manually. - Objekt osy, který přepíše hodnotu 'Axis' a 'Center', například pomocnou čáru. + Objekt osy, který přepíše hodnoty 'Osa' a 'Střed', například pomocnou čáru. Jeho umístění, poloha a rotace budou použity při vytváření polárních a kruhových polí. -Nechte tuto vlastnost prázdnou, abyste mohli ručně nastavit 'Axis' a 'Center'. +Nechte tuto vlastnost prázdnou, abyste mohli osu a střed nastavit ručně. @@ -8111,7 +8121,7 @@ vlastnosti 'První úhel' a 'Poslední úhel'. Text Position. Leave '(0,0,0)' for automatic position - Pozice textu. + Poloha textu. Ponechejte '(0,0,0)' pro automatickou polohu @@ -8213,7 +8223,7 @@ za kótovací čárou Draft - Ponor + Návrh diff --git a/src/Mod/Draft/Resources/translations/Draft_de.qm b/src/Mod/Draft/Resources/translations/Draft_de.qm index c38cda3f58..98b76b8ede 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_de.qm and b/src/Mod/Draft/Resources/translations/Draft_de.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_de.ts b/src/Mod/Draft/Resources/translations/Draft_de.ts index 1d8c8c7811..6ba8d03ac0 100644 --- a/src/Mod/Draft/Resources/translations/Draft_de.ts +++ b/src/Mod/Draft/Resources/translations/Draft_de.ts @@ -1109,7 +1109,7 @@ value by using the [ and ] keys while drawing Dimensions - Abmessungen + Maße @@ -1564,17 +1564,17 @@ Beachten Sie, dass dies nicht vollständig unterstützt wird und viele Objekte m Texte und Bemaßungen - + Text settings Texteinstellungen - + Font family Schriftartfamilie - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1582,184 +1582,194 @@ such as "Arial:Bold" Dies ist die Standard-Schriftart für alle Textentwürfe und Dimensionen. Es kann eine Schriftart wie "Arial", ein Standard-Stil wie "sans", "serif" oder "mono", oder eine Familie wie "Arial, Helvetica, sans" oder einen Namen mit einem Stil wie " Arial: Bold " sein - + Internal font Interne Schriftart - + Font size Schriftgröße - + Default height for texts and dimensions Standardhöhe für Texte und Bemaßungen - - - - - - + + + + + + mm mm - + Dimension settings Bemaßungseinstellungen - + Display mode Anzeigemodus - + World Welt - + Screen Bildschirm - + Number of decimals Anzahl der Nachkommastellen - + Extension lines size Länge der Hilfslinien - + The default size of dimensions extension lines Die Standardgröße der Maßhilfslinien - + Extension line overshoot Maßhilfslinien Überstand - + The default length of extension line above dimension line Standardlänge, um die die Maßhilfslinien über die Maßlinie hinaus verlängert wird - + Dimension line overshoot Maßlinienüberstand - + The default distance the dimension line is extended past extension lines Länge, um die die Maßlinie über die Maßhilfslinien hinaus verlängert wird - + Arrows style Pfeil-Darstellung - + Dot Punkt - + Circle Kreis - + Arrow Pfeil - + Tick Schrägstrich - + Tick-2 Schrägstrich-2 - + Arrows size Pfeilgröße - + The default size of arrows Die Standardgröße der Pfeile - + Text orientation Textausrichtung - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Dies ist die Orientierung der Bemaßungstexte, wenn sie vertikal sind. Standard ist wie im ISO-Standard links. - + Left (ISO standard) Links (ISO-Standard) - + Right Rechts - + Text spacing Textabstand - + The space between the dimension line and the dimension text Der Abstand zwischen der Maßlinie und dem Bemaßungstext - + Show the unit suffix in dimensions - Zeige Maße mit Maßeinheiten an + Maßeinheiten in Maßeinträgen anzeigen - + Override unit Einheit überschreiben - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Wenn Sie dieses Feld leer lassen, wird die in FreeCAD voreingestellte Maßeinheit verwendet. Durch Eingabe einer Maßeinheit wie m oder cm, werden die Maße in dieser Einheit angezeigt. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Textform Einstellungen - + Default ShapeString font file Standardschriftart für Textformen - + Select a font file Wählen Sie eine Schriftartdatei aus @@ -2099,7 +2109,7 @@ instead of the size they have in the DXF document If this is checked, DXF layers will be imported as Draft Layers - Wenn aktiviert, werden Ebenen aus der DXF-Datei importiert als Entwurfs-Ebenen + Wenn dies aktiviert ist, werden DXF-Layer als Draft-Layer importiert @@ -3109,7 +3119,7 @@ Nicht verfügbar, wenn die Option "Primitive Teile verwenden" aktiviert ist Offset - Versatz + Versetzen @@ -3248,7 +3258,7 @@ Versuchen Sie, die DWG-Datei in einen Verzeichnispfad ohne Leerzeichen und nicht Ausgewählte Formen müssen eine Ebene definieren - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -4280,7 +4290,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Dimension - Abmessungen + Maß @@ -4460,7 +4470,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Polar array - Polare Reihe + Polare Anordnung @@ -4620,7 +4630,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Circular array - Kreisförmige Anordnung + Kreisförmige Reihe @@ -5426,7 +5436,7 @@ Der endgültige Winkel ist der Basiswinkel plus dieser Betrag. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5720,12 +5730,12 @@ aus dem Menü Extras -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unbekannter SVG-Export-Stil, wird auf Übersetzten umgestellt - + The export list contains no object with a valid bounding box Die Exportliste enthält kein Objekt mit gültigem Begrenzungsbereich @@ -6230,7 +6240,7 @@ Mit E oder Alt+Linksklick wird das Kontextmenü an unterstützten Knoten und Obj Circular array - Kreisförmige Reihe + Kreisförmige Anordnung @@ -6856,7 +6866,7 @@ Der resultierende Klon kann in jeder seiner drei Richtungen skaliert werden. Polar array - Polare Anordnung + Polare Reihe @@ -6914,7 +6924,7 @@ Beispielsweise können ausgewählte Objekte in eines zusammengefügt werden, ein Offset - Versetzen + Versatz @@ -7772,9 +7782,9 @@ Wenn es eine Durchmessers Bemassung ist, ist es ein Punkt, der auf dem Bogen lie If it is a radius or diameter dimension it will be a point that lies on the arc. - Endpunkt der Bemassungslinie. + Endpunkt der Maßlinie. -Wenn es sich um eine Radius- oder Durchmesserabmessung handelt +Wenn es sich um ein Radius- oder Durchmessermaß handelt, ist es ein Punkt, der auf dem Bogen liegt. diff --git a/src/Mod/Draft/Resources/translations/Draft_el.qm b/src/Mod/Draft/Resources/translations/Draft_el.qm index 3d21433ff5..456ddb23bb 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_el.qm and b/src/Mod/Draft/Resources/translations/Draft_el.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_el.ts b/src/Mod/Draft/Resources/translations/Draft_el.ts index 05cb651089..062dfd4dcf 100644 --- a/src/Mod/Draft/Resources/translations/Draft_el.ts +++ b/src/Mod/Draft/Resources/translations/Draft_el.ts @@ -1561,17 +1561,17 @@ Note that this is not fully supported, and many object will be not editable with Κείμενα και διαστάσεις - + Text settings Ρυθμίσεις κειμένου - + Font family Οικογένεια γραμματοσειράς - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1581,184 +1581,194 @@ such as "Arial:Bold" ή ένα όνομα ακολουθούμενο από έναν τύπο μορφοποίησης όπως ''Arial:Bold'' - + Internal font Εσωτερική γραμματοσειρά - + Font size Μέγεθος γραμματοσειράς - + Default height for texts and dimensions Προεπιλεγμένο ύψος για κείμενα και διαστάσεις - - - - - - + + + + + + mm χιλιοστά - + Dimension settings Ρυθμίσεις διάστασης - + Display mode Λειτουργία προβολής - + World Κόσμος - + Screen Screen - + Number of decimals Αριθμός δεκαδικών - + Extension lines size Μέγεθος γραμμών επέκτασης - + The default size of dimensions extension lines Το προεπιλεγμένο μέγεθος γραμμών επέκτασης των διαστάσεων - + Extension line overshoot Υπέρβαση γραμμής επέκτασης - + The default length of extension line above dimension line Το προεπιλεγμένο μήκος γραμμής επέκτασης πάνω από τη γραμμή διάστασης - + Dimension line overshoot Υπέρβαση γραμμής διάστασης - + The default distance the dimension line is extended past extension lines Η προεπιλεγμένη απόσταση κατά την οποία επεκτείνεται η γραμμή διάστασης πέρα από τις γραμμές επέκτασης - + Arrows style Τύπος μορφοποίησης βελών - + Dot Τελεία - + Circle Κύκλος - + Arrow Βέλος - + Tick Σημειώστε - + Tick-2 Σημειώστε-2 - + Arrows size Μέγεθος βελών - + The default size of arrows Το προεπιλεγμένο μέγεθος βελών - + Text orientation Προσανατολισμός κειμένου - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Αυτός είναι ο προσανατολισμός των κειμένων διαστάσεων όταν αυτές οι διαστάσεις είναι κάθετες. Η προεπιλογή είναι αριστερά, που είναι και το πρότυπο ISO. - + Left (ISO standard) Αριστερά (πρότυπο ISO) - + Right Δεξιά - + Text spacing Αποστάσεις κειμένου - + The space between the dimension line and the dimension text Το διάστημα μεταξύ της γραμμής διάστασης και του κειμένου διάστασης - + Show the unit suffix in dimensions Εμφάνιση την κατάληξη μονάδας στις διαστάσεις - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Αφήνοντας αυτό το πεδίο κενό, οι μετρήσεις διαστάσεων θα εμφανίζονται στην τρέχουσα μονάδα που ορίζεται στο FreeCAD. Υποδεικνύοντας μια μονάδα εδώ, όπως m ή cm, μπορείτε να επιβάλετε την εμφάνιση νέων διαστάσεων σε αυτήν τη μονάδα. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Ρυθμίσεις Πλαισίου Συμβολοσειράς Κειμένου - + Default ShapeString font file Προεπιλεγμένο αρχείο γραμματοσειράς Πλαισίου Συμβολοσειράς Κειμένου - + Select a font file Επιλέξτε ένα αρχείο γραμματοσειράς @@ -3251,7 +3261,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5430,7 +5440,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5724,12 +5734,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_es-AR.qm b/src/Mod/Draft/Resources/translations/Draft_es-AR.qm index 0212c1bfb4..a00bc18f6b 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_es-AR.qm and b/src/Mod/Draft/Resources/translations/Draft_es-AR.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_es-AR.ts b/src/Mod/Draft/Resources/translations/Draft_es-AR.ts index effced3e5b..a56cd9ba59 100644 --- a/src/Mod/Draft/Resources/translations/Draft_es-AR.ts +++ b/src/Mod/Draft/Resources/translations/Draft_es-AR.ts @@ -1562,17 +1562,17 @@ Tenga en cuenta que esto no es totalmente compatible, y muchos objetos no serán Textos y cotas - + Text settings Ajustes de texto - + Font family Tipo de fuente - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1583,184 +1583,194 @@ o "mono", o una familia como "Arial, Helvetica, sans" o un nombre con un estilo como "Arial: Negrita" - + Internal font Fuente interna - + Font size Tamaño de fuente - + Default height for texts and dimensions Altura predeterminada para textos y cotas - - - - - - + + + + + + mm mm - + Dimension settings Configuración de cotas - + Display mode Modo de visualización - + World Mundo - + Screen Pantalla - + Number of decimals Número de decimales - + Extension lines size Tamaño de líneas de extensión - + The default size of dimensions extension lines El tamaño predeterminado de las líneas de extensión de cotas - + Extension line overshoot Prolongación linea extensión - + The default length of extension line above dimension line La longitud predeterminada de la línea de extensión sobre la línea de cota - + Dimension line overshoot Prolongación línea de cota - + The default distance the dimension line is extended past extension lines La distancia predeterminada de la línea de cota se extiende más allá de las líneas de extensión - + Arrows style Estilo de flechas - + Dot Punto - + Circle Círculo - + Arrow Flecha - + Tick Marca - + Tick-2 Marca-2 - + Arrows size Tamaño de flechas - + The default size of arrows El tamaño predeterminado de las flechas - + Text orientation Orientación del texto - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Esta es la orientación de los textos de las cotas cuando estas son verticales. El valor por defecto es a la izquierda, según las normas ISO. - + Left (ISO standard) Izquierda (Norma ISO) - + Right Derecha - + Text spacing Espaciado de texto - + The space between the dimension line and the dimension text El espacio entre la línea de cota y el texto de cota - + Show the unit suffix in dimensions Mostrar la unidad en cotas - + Override unit Anular unidad - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Al dejar este campo en blanco, las medidas de cota se mostrarán en la unidad actual definida en FreeCAD. Al indicar aquí una unidad, como m o cm, puede forzar que se muestren nuevas cotas en esa unidad. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Configuración de FormaTexto - + Default ShapeString font file Archivo de fuente predeterminado de FormaTexto - + Select a font file Seleccione un archivo de fuente @@ -3249,7 +3259,7 @@ Intente mover el archivo DWG a un directorio cuyo camino no contenga espacios ni Las formas seleccionadas deben definir un plano - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -4675,7 +4685,7 @@ The final angle will be the base angle plus this amount. changed 'Tracking' property type - changed 'Tracking' property type + Se cambió el tipo de propiedad 'Seguimiento' @@ -5426,7 +5436,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5720,12 +5730,12 @@ por medio de la opción Herramientas ▸ Gestor de complementos ImportSVG - + Unknown SVG export style, switching to Translated Estilo de exportado SVG desconocido, conmutando a Traducido - + The export list contains no object with a valid bounding box La lista a exportar no contiene objetos con un cuadro delimitador (bounding box) válido @@ -7031,12 +7041,12 @@ Es un listado; donde cada elemento de la lista se mostrará en su propia línea. Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Mantener el margen izquierdo y el espacio en blanco cuando se deje la justificación Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Escala para asegurar que la altura del límite sea igual al tamaño @@ -7051,7 +7061,7 @@ Es un listado; donde cada elemento de la lista se mostrará en su propia línea. Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Fusionar caras si se superponen, normalmente no es necesario (puede ser muy lento) diff --git a/src/Mod/Draft/Resources/translations/Draft_es-ES.qm b/src/Mod/Draft/Resources/translations/Draft_es-ES.qm index b6d72ec8e5..eec1fc4945 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_es-ES.qm and b/src/Mod/Draft/Resources/translations/Draft_es-ES.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_es-ES.ts b/src/Mod/Draft/Resources/translations/Draft_es-ES.ts index 87f7bec89c..3bfb5e919f 100644 --- a/src/Mod/Draft/Resources/translations/Draft_es-ES.ts +++ b/src/Mod/Draft/Resources/translations/Draft_es-ES.ts @@ -1564,17 +1564,17 @@ Tenga en cuenta que esto no es totalmente compatible, y muchos objetos no serán textos y cotas - + Text settings Ajustes de texto - + Font family Tipo de fuente - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1582,184 +1582,194 @@ such as "Arial:Bold" Este es el nombre de la fuente por defecto para todos los textos y acotaciones del Croquizado. Puede ser un nombre de fuente como "Arial", un estilo predeterminado como "sans", "serif" o "mono", o una familia como "Arial, Helvetica, sans "o un nombre con un estilo como "Arial:Negrita" - + Internal font fuente interna - + Font size Tamaño de la fuente - + Default height for texts and dimensions Altura predeterminada para los textos y las cotas - - - - - - + + + + + + mm mm - + Dimension settings Configuración de cotas - + Display mode Modo de visualización - + World Mundo - + Screen Pantalla - + Number of decimals Número de decimales - + Extension lines size Tamaño de las líneas de extensión - + The default size of dimensions extension lines El tamaño predeterminado de las líneas de extensión de cotas - + Extension line overshoot Extensión línea overshoot - + The default length of extension line above dimension line La longitud por defecto de la extensión de la línea por encima de la línea de cota - + Dimension line overshoot Cota más allá de la línea de cota - + The default distance the dimension line is extended past extension lines La distancia por defecto la línea de cota se extiende más allá de las líneas de extensión - + Arrows style Estilo de flechas - + Dot Punto - + Circle Circunferencia - + Arrow Flecha - + Tick Marca - + Tick-2 Marca-2 - + Arrows size Tamaño de las flechas - + The default size of arrows El tamaño predeterminado de las flechas - + Text orientation Orientación del texto - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Esta es la orientación de los textos de las cotas cuando estas son verticales. El valor por defecto es a la izquierda, según las normas ISO. - + Left (ISO standard) Izquierda (norma ISO) - + Right Derecha - + Text spacing Espaciado de texto - + The space between the dimension line and the dimension text El espacio entre la línea de cota y el texto de cota - + Show the unit suffix in dimensions Mostrar la unidad en las cotas - + Override unit Ignorar unidad - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Al dejar este campo en blanco, las medidas de dimensión se mostrarán en la unidad actual definida en FreeCAD. Al indicar aquí una unidad como m o cm, puede forzar que se muestren nuevas dimensiones en esa unidad. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Configuración de la cadena de forma - + Default ShapeString font file Archivo de fuente predeterminado de la cadena de forma - + Select a font file Seleccione un archivo de fuente @@ -3249,7 +3259,7 @@ Intente mover el archivo DWG a un directorio cuyo camino no contenga espacios ni Las formas seleccionadas deben definir un plano - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -4675,7 +4685,7 @@ The final angle will be the base angle plus this amount. changed 'Tracking' property type - changed 'Tracking' property type + Se cambió el tipo de propiedad 'Seguimiento' @@ -5426,7 +5436,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5720,12 +5730,12 @@ por medio de la opción Herramientas ▸ Gestor de complementos ImportSVG - + Unknown SVG export style, switching to Translated Estilo de exportado SVG desconocido, conmutando a Traducido - + The export list contains no object with a valid bounding box La lista a exportar no contiene objetos con un cuadro delimitador (bounding box) válido @@ -7031,12 +7041,12 @@ Es un listado; donde cada elemento de la lista se mostrará en su propia línea. Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + Mantener el margen izquierdo y el espacio en blanco cuando se deje la justificación Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Escala para asegurar que la altura del límite sea igual al tamaño @@ -7051,7 +7061,7 @@ Es un listado; donde cada elemento de la lista se mostrará en su propia línea. Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Fusionar caras si se superponen, normalmente no es necesario (puede ser muy lento) diff --git a/src/Mod/Draft/Resources/translations/Draft_eu.qm b/src/Mod/Draft/Resources/translations/Draft_eu.qm index aec536da82..98afe7d967 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_eu.qm and b/src/Mod/Draft/Resources/translations/Draft_eu.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_eu.ts b/src/Mod/Draft/Resources/translations/Draft_eu.ts index eaba3e1af3..99c53c8254 100644 --- a/src/Mod/Draft/Resources/translations/Draft_eu.ts +++ b/src/Mod/Draft/Resources/translations/Draft_eu.ts @@ -1557,17 +1557,17 @@ Kontuan izan eragiketa horren euskarria ez dela osoa, eta zenbait objektu ez dir Testuak eta kotak - + Text settings Testu-ezarpenak - + Font family Letra-tipoa - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1575,184 +1575,194 @@ such as "Arial:Bold" Zirriborroen testu eta kota guztietarako letra-tipo lehenetsiaren izena da hau. Letra-tipo baten izena izan daiteke, esaterako "Arial"; estilo lehenetsi bat izan daiteke, esaterako "sans", "serif" edo "mono"; familia bat izan daiteke, esaterako "Arial,Helvetica,sans"; edo izen bat estilo batekin izan daiteke, esaterako "Arial:Bold" - + Internal font Barneko letra-tipoa - + Font size - Letra-tipoaren tamaina + Letra-tamaina - + Default height for texts and dimensions Altuera lehenetsia testuetarako eta kotetarako - - - - - - + + + + + + mm mm - + Dimension settings Kota-ezarpenak - + Display mode Bistaratze modua - + World Mundua - + Screen Pantaila - + Number of decimals Dezimal kopurua - + Extension lines size Luzapen-lerroen tamaina - + The default size of dimensions extension lines Koten luzapen-lerroen tamaina lehenetsia - + Extension line overshoot Luzapen-lerroaren soberakina - + The default length of extension line above dimension line Luzapen-lerroak kota-lerroaren gainetik duen luzera lehenetsia - + Dimension line overshoot Kota-lerroaren soberakina - + The default distance the dimension line is extended past extension lines Kota-lerroa luzapen-lerroez haratago luzatzen den distantzia lehenetsia - + Arrows style Gezi-estiloa - + Dot Puntua - + Circle Zirkulua - + Arrow Gezia - + Tick Tika - + Tick-2 Tika-2 - + Arrows size Gezi-tamaina - + The default size of arrows Gezien tamaina lehenetsia - + Text orientation Testu-orientazioa - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Kota-testuen orientazioa da, kotak bertikalak direnean. Lehenetsia ezkerra da, horixe baita ISO estandarra. - + Left (ISO standard) Ezkerra (ISO estandarra) - + Right Eskuinekoa - + Text spacing Testu-tartea - + The space between the dimension line and the dimension text Kota-lerroaren eta kota-testuaren arteko espazioa - + Show the unit suffix in dimensions Erakutsi unitate-atzizkia kotetan - + Override unit Gainidatzi unitatea - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Eremu hau hutsik uzten bada, koten neurketak FreeCADek definitutako uneko unitatean erakutsiko dira. Hemen unitate bat adierazten bada, adibidez m edo cm, kota berriak unitate horretan erakutsi daitezen behartu daiteke. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Testu-formen ezarpenak - + Default ShapeString font file Testu-formaren letra-tipo lehenetsiaren fitxategia - + Select a font file Hautatu letra-tipo fitxategi bat @@ -3242,7 +3252,7 @@ direktorio-bide batera, edo saiatu DGW bertsio zaharrago batean gordetzen.Hautatutako formek plano bat definitu behar dute - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5421,7 +5431,7 @@ Amaierako angelua oinarriko angelua gehi kantitate hau izango da. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5715,12 +5725,12 @@ Instalatu DXF liburutegiaren gehigarria eskuz ImportSVG - + Unknown SVG export style, switching to Translated SVGa esportatzeko estilo ezezaguna, 'Itzulia' aukerara aldatuko da - + The export list contains no object with a valid bounding box Esportazio-zerrenda ez du baliozko muga-koadroa duen objekturik diff --git a/src/Mod/Draft/Resources/translations/Draft_fi.qm b/src/Mod/Draft/Resources/translations/Draft_fi.qm index 4641d224ea..caa4f1cc82 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_fi.qm and b/src/Mod/Draft/Resources/translations/Draft_fi.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_fi.ts b/src/Mod/Draft/Resources/translations/Draft_fi.ts index 545e9dc557..75610db8f2 100644 --- a/src/Mod/Draft/Resources/translations/Draft_fi.ts +++ b/src/Mod/Draft/Resources/translations/Draft_fi.ts @@ -1567,17 +1567,17 @@ Note that this is not fully supported, and many object will be not editable with Tekstit ja mitat - + Text settings Tekstiasetukset - + Font family Fonttiperhe - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1585,184 +1585,194 @@ such as "Arial:Bold" Tämä on oletusfontin nimi kaikille vedoksen teksteille ja mitoille. Se voi olla fontin nimi kuten "Arial", oletustyyli kuten "sans", "serif" tai "mono", tai perhe kuten "Arial,Helvetica,sans" tai tyylin nimi kuten "Arial:Bold" - + Internal font Sisäinen fontti - + Font size Fonttikoko - + Default height for texts and dimensions Oletusarvon mukaiset korkeudet tekstille ja mitoille - - - - - - + + + + + + mm mm - + Dimension settings Dimension settings - + Display mode Display mode - + World Maailma - + Screen Screen - + Number of decimals Number of decimals - + Extension lines size Extension lines size - + The default size of dimensions extension lines Mittojen jatkoviivojen oletuskoko - + Extension line overshoot Extension line overshoot - + The default length of extension line above dimension line The default length of extension line above dimension line - + Dimension line overshoot Dimension line overshoot - + The default distance the dimension line is extended past extension lines The default distance the dimension line is extended past extension lines - + Arrows style Arrows style - + Dot Piste - + Circle Ympyrä - + Arrow Nuoli - + Tick Tick - + Tick-2 Tick-2 - + Arrows size Arrows size - + The default size of arrows Nuolien oletuskoko - + Text orientation Tekstin suunta - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Tämä on mittatekstien suunta, kun nämä mitat ovat pystysuunnassa. Oletusarvo on vasen, joka on ISO-standardi. - + Left (ISO standard) Vasen (ISO-standardi) - + Right Oikea - + Text spacing Text spacing - + The space between the dimension line and the dimension text Mittaviivan ja mittatekstin välitila - + Show the unit suffix in dimensions Näytä yksikön päätteet mitoissa - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings ShapeString settings - + Default ShapeString font file Default ShapeString font file - + Select a font file Valitse fonttitiedosto @@ -3255,7 +3265,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5434,7 +5444,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5728,12 +5738,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_fr.qm b/src/Mod/Draft/Resources/translations/Draft_fr.qm index d3a220498a..38f7dceef9 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_fr.qm and b/src/Mod/Draft/Resources/translations/Draft_fr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_fr.ts b/src/Mod/Draft/Resources/translations/Draft_fr.ts index 7d6e85d125..3c6d93404b 100644 --- a/src/Mod/Draft/Resources/translations/Draft_fr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_fr.ts @@ -568,7 +568,7 @@ Ceci ne fonctionne que si "Réseau lié" est désactivé. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Si coché, l'objet résultant sera un "Réseau lié" au lieu d'un réseau normal. -Un réseau lié est plus efficace lors de la création de plusieurs copies mais il ne peut pas être fusionné. +Un réseau lié est plus efficace lors de la création de plusieurs copies, mais il ne peut pas être fusionné. @@ -615,7 +615,7 @@ Il doit être au moins égal à 2. The coordinates of the point through which the axis of rotation passes. Change the direction of the axis itself in the property editor. - Coordonnées du point par lequel passe l’axe de rotation. + Coordonnées du point à travers lequel passe l’axe de rotation. Changer la direction de l’axe lui-même dans l’éditeur de propriété. @@ -665,12 +665,12 @@ Ceci ne fonctionne que si "Réseau lié" est désactivé. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Si coché, l'objet résultant sera un "Réseau lié" au lieu d'un réseau normal. -Un réseau lié est plus efficace lors de la création de plusieurs copies, mais il ne peut pas être fusionné. +Un réseau lié est plus efficace lors de la création de plusieurs copies mais il ne peut pas être fusionné. Link array - Réseau lié + Réseau de liens @@ -1142,7 +1142,7 @@ en utilisant les touches [ et ] lors du dessin Tick - Cocher + Oblique @@ -1566,17 +1566,17 @@ Notez que ce n'est pas entièrement supporté et que de nombreux objets ne seron Textes et dimensions - + Text settings Paramètres pour le texte - + Font family Famille de polices - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1587,184 +1587,194 @@ d'un nom de police comme "Arial", un style par défaut tel que "sans", "serif" o comme "Arial:Bold" - + Internal font Police interne - + Font size - Taille de police + Taille de la police - + Default height for texts and dimensions Hauteur par défaut pour les textes et les cotes - - - - - - + + + + + + mm mm - + Dimension settings Paramètres pour les dimensions - + Display mode Mode d'affichage - + World Monde - + Screen Écran - + Number of decimals Nombre de décimales - + Extension lines size Taille des lignes d'extension - + The default size of dimensions extension lines Taille par défaut des lignes d'extension des dimensions - + Extension line overshoot Dépassement des lignes d'extension - + The default length of extension line above dimension line La longueur par défaut de la ligne d'extension au-dessus de ligne de la dimension - + Dimension line overshoot Dépassement des lignes de dimension - + The default distance the dimension line is extended past extension lines La distance par défaut à laquelle la ligne de la dimension est prolongée au-delà des lignes d'extension - + Arrows style Style des flèches - + Dot Point - + Circle Cercle - + Arrow Flèche - + Tick - Oblique + Cocher - + Tick-2 Oblique 2 - + Arrows size Taille des flèches - + The default size of arrows Taille des flèches par défaut - + Text orientation Orientation du texte - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Il s'agit de l'orientation du texte des cotes verticales. Par défaut elle est à gauche, qui est la norme ISO. - + Left (ISO standard) Gauche (norme ISO) - + Right Droit - + Text spacing Espacement du texte - + The space between the dimension line and the dimension text L'espacement entre la ligne de la dimension et le texte de la dimension - + Show the unit suffix in dimensions Afficher le suffixe de l'unité aux dimensions - + Override unit Remplacer l'unité - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. En laissant ce champ vide, les mesures des dimensions seront affichées avec l'unité en cours définie dans FreeCAD. En indiquant ici une unité telle que m ou cm, vous pouvez forcer l'affichage des nouvelles dimensions avec cette unité. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Paramètres pour les Formes à partir de texte - + Default ShapeString font file Fichier de la police par défaut de Formes à partir de texte - + Select a font file Sélectionnez un fichier de police @@ -3252,7 +3262,7 @@ Essayez de déplacer le fichier DWG vers un chemin de répertoire sans espaces n Les formes sélectionnées doivent définir un plan - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -4553,7 +4563,7 @@ L'angle final sera l'angle de base plus cette quantité. Orthogonal array - Réseau orthogonal + Matrice orthogonale @@ -5428,7 +5438,7 @@ L'angle final sera l'angle de base plus cette quantité. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5604,12 +5614,12 @@ Installer l’extension de la bibliothèque dxf manuellement depuis le menu Outi Draw style - Style de représentation + Style de dessin Line color - Couleur des lignes + Couleur de la ligne @@ -5721,12 +5731,12 @@ Installer l’extension de la bibliothèque dxf manuellement depuis le menu Outi ImportSVG - + Unknown SVG export style, switching to Translated Style d'exportation SVG inconnu, changer de méthode - + The export list contains no object with a valid bounding box La liste d'exportation ne contient aucun objet avec une boite englobante valide @@ -8022,12 +8032,12 @@ des propriétés du "premier angle" et du "dernier angle". Line width - Épaisseur de trait + Largeur de ligne Line color - Couleur de ligne + Couleur des lignes @@ -8092,7 +8102,7 @@ des propriétés du "premier angle" et du "dernier angle". Font size - Taille de la police + Taille de police diff --git a/src/Mod/Draft/Resources/translations/Draft_gl.qm b/src/Mod/Draft/Resources/translations/Draft_gl.qm index 7577e58a47..2a0b3235c9 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_gl.qm and b/src/Mod/Draft/Resources/translations/Draft_gl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_gl.ts b/src/Mod/Draft/Resources/translations/Draft_gl.ts index afcd446bd0..8c89f1ae5b 100644 --- a/src/Mod/Draft/Resources/translations/Draft_gl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_gl.ts @@ -1567,17 +1567,17 @@ Note that this is not fully supported, and many object will be not editable with Textos e acoutamentos - + Text settings Preferencias de texto - + Font family Familia de fontes - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1585,184 +1585,194 @@ such as "Arial:Bold" Este é o nome da fonte por defecto para tódolos textos e dimensións en Bosquexo. Pode ser un nome de fonte, como "Arial", un estilo de fonte como "sans", "serif" ou "mono", unha familia de fontes como "Arial,Helvética,sans" ou un nome cun estilo asociado como "Arial:Bold" - + Internal font Fontes internas - + Font size Tamaño da fonte - + Default height for texts and dimensions Altura por defecto para os textos e mais as dimensións - - - - - - + + + + + + mm mm - + Dimension settings Preferencias de acoutamento - + Display mode Modo de visualización - + World Mundo - + Screen Screen - + Number of decimals Número de decimais - + Extension lines size Extensión do tamaño da liña - + The default size of dimensions extension lines O tamaño das liñas auxiliares por defecto - + Extension line overshoot Rebasamento de extensión da liña - + The default length of extension line above dimension line Lonxitude predeterminada da liña de extensión por riba da liña de acoutamento - + Dimension line overshoot Acoutamento de exceso de liña - + The default distance the dimension line is extended past extension lines A distancia á que se estende a liña de acoutamento máis alá das liñas de extensión - + Arrows style Estilo de frechas - + Dot Punto - + Circle Círculo - + Arrow Frecha - + Tick Tick - + Tick-2 Diagonal-2 - + Arrows size Tamaño das frechas - + The default size of arrows O tamaño das frechas por defecto - + Text orientation Orientación do texto - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Esta é a posición dos textos dos acoutamentos cando estes son verticais. O valor predeterminado é a esquerda da liña, que é o estándar ISO. - + Left (ISO standard) Esquerda (norma ISO) - + Right Dereita - + Text spacing Espazado de texto - + The space between the dimension line and the dimension text O espazo entre a liña e o texto do acoutamento - + Show the unit suffix in dimensions Amosar o sufixo das unidades nos acoutamentos - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Preferencias de TextoForma - + Default ShapeString font file Ficheiro de fonte por defecto para TextoForma - + Select a font file Escolme un ficheiro de fontes @@ -3255,7 +3265,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5434,7 +5444,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5728,12 +5738,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_hr.qm b/src/Mod/Draft/Resources/translations/Draft_hr.qm index 4faeac7eb2..9a679bada1 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_hr.qm and b/src/Mod/Draft/Resources/translations/Draft_hr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_hr.ts b/src/Mod/Draft/Resources/translations/Draft_hr.ts index f08d893b9d..2bb57ffd1e 100644 --- a/src/Mod/Draft/Resources/translations/Draft_hr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_hr.ts @@ -575,7 +575,8 @@ Negativne vrijednosti rezultirat će kopijom proizvedenom u negativnom smjeru. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. Ako je označeno, rezultirajući objekti u matrici bit će spojeni ako se dodiruju. -Ovo djeluje samo ako je "Povezana matrica" isključen. +Ovo djeluje samo ako je "Povezana matrica" isključen. + @@ -587,7 +588,8 @@ Ovo djeluje samo ako je "Povezana matrica" isključen. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Ako je označeno, rezultirajući objekt bit će "Povezana matrica" umjesto uobičajenog polja. -Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. +Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. + @@ -675,8 +677,7 @@ Promijenite smjer same osi u uređivaču svojstava. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. Ako je označeno, rezultirajući objekti u matrici bit će spojeni ako se dodiruju. -Ovo djeluje samo ako je "Povezana matrica" isključen. - +Ovo djeluje samo ako je "Povezana matrica" isključen. @@ -688,8 +689,7 @@ Ovo djeluje samo ako je "Povezana matrica" isključen. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. Ako je označeno, rezultirajući objekt bit će "Povezana matrica" umjesto uobičajenog polja. -Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. - +Povezana matrica efikasnija je pri stvaranju više kopija, ali ne može ih se spojiti zajedno. @@ -1611,17 +1611,17 @@ Imajte na umu da to nije u potpunosti podržano i mnogi objekti neće se moći u Tekstovi i dimenzije - + Text settings Postavke teksta - + Font family Obitelj Fontova - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1632,184 +1632,194 @@ ili "mono", ili skupina kao što su "Arial, Helvetica, sans" ili ime sa stilom, kao što su "Arial:Bold" - + Internal font Interno pismo - + Font size Veličina Pisma - + Default height for texts and dimensions Zadana visina teksta i dimenzije - - - - - - + + + + + + mm mm - + Dimension settings Postavke dimenzija - + Display mode Način prikaza - + World Svijet - + Screen Zaslon - + Number of decimals Broj decimala - + Extension lines size Veličina linije protezanja - + The default size of dimensions extension lines Zadana veličina dimenzije produljenih linija - + Extension line overshoot Produžetak linije protezanja - + The default length of extension line above dimension line Zadana dužina linije protezanja iznad linije dimenzije - + Dimension line overshoot Linija dimenzije prekoračenje - + The default distance the dimension line is extended past extension lines Zadana udaljenost linije dimenzije je proširena preko linije protezanja - + Arrows style Vrsta strelice - + Dot Točka - + Circle Krug - + Arrow Strelica - + Tick Okomita crtica - + Tick-2 Okomita crtica-2 - + Arrows size Veličina strelice - + The default size of arrows Zadane veličine strelice - + Text orientation Smjer teksta - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Ovo je orijentacija tekstova na dimenzijama kada su one okomite. Zadano je lijevo, što je ISO standard. - + Left (ISO standard) Lijevo (ISO standard) - + Right Desno - + Text spacing Razmak teksta - + The space between the dimension line and the dimension text Razmak između linije dimenzije i teksta dimenzije - + Show the unit suffix in dimensions Prikaži jedinice dodatka u dimenzijama - + Override unit Poništi mjernu jedinicu - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Ostavljanjem ovog polja praznim, mjerenja dimenzija bit će prikazana u trenutnoj jedinici definiranoj u FreeCAD-u. Označavanjem jedinice ovdje kao što je m ili cm, možete prisiliti prikazivanje novih dimenzija u toj mjernoj jedinici. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Postavke tekstualnog oblika - + Default ShapeString font file Zadani font datoteke tekstualnog oblika - + Select a font file Odaberite datoteku pisma @@ -3320,7 +3330,7 @@ ili pokušajte spremiti u nižu DWG verziju. Odabrani oblici moraju definirati ravninu - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5509,7 +5519,7 @@ Konačni kut bit će osnovni kut plus ovaj iznos. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5803,12 +5813,12 @@ iz izbornika Alati-> Upravitelj dodataka ImportSVG - + Unknown SVG export style, switching to Translated Nepoznati SVG stil izvoza, prebacivanje na Prevedeno - + The export list contains no object with a valid bounding box Popis izvoza ne sadrži objekt s važećim graničnim okvirom diff --git a/src/Mod/Draft/Resources/translations/Draft_hu.qm b/src/Mod/Draft/Resources/translations/Draft_hu.qm index d523d64fcc..85bd505737 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_hu.qm and b/src/Mod/Draft/Resources/translations/Draft_hu.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_hu.ts b/src/Mod/Draft/Resources/translations/Draft_hu.ts index eabd0a78a5..7644a6e6c3 100644 --- a/src/Mod/Draft/Resources/translations/Draft_hu.ts +++ b/src/Mod/Draft/Resources/translations/Draft_hu.ts @@ -1162,7 +1162,7 @@ módosíthatja rajzolás közben Arrow size - Nyíl méret + Nyíl mérete @@ -1568,17 +1568,17 @@ Ne feledje, hogy ez nem teljes mértékben támogatott, és sok tárgy nem szerk Szövegek és méretek - + Text settings Szöveg beállítások - + Font family Betűkészlet - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1589,184 +1589,194 @@ vagy "mono", vagy egy család, mint például "Arial, Helvetica, sans", vagy egy mint a " Arial: Dőlt " - + Internal font Belső betűtípus - + Font size Betűméret - + Default height for texts and dimensions Alapértelmezett szöveg és méretezés magasság - - - - - - + + + + + + mm mm - + Dimension settings Távolság beálítás - + Display mode Megjelenítési mód - + World Világ - + Screen Képernyő - + Number of decimals Tizedesjegyek száma - + Extension lines size Meghoszabbító vonalak méret - + The default size of dimensions extension lines A méret segédvonalak alapértelmezett mérete - + Extension line overshoot Meghoszabbító vonal túllépése - + The default length of extension line above dimension line A meghosszabbító vonal alapértelmezett mérete a méretsegédvonal felett - + Dimension line overshoot Méret segédvonal túllépése - + The default distance the dimension line is extended past extension lines A meghoszabbítás utáni méretsegédvonal meghosszabbításának alapértelmezett hossza - + Arrows style Nyilak-stílus - + Dot Pont - + Circle Kör - + Arrow Nyíl - + Tick Jelölők - + Tick-2 Jelölők-2 - + Arrows size Nyíl mérete - + The default size of arrows A nyilak alapértelmezett mérete - + Text orientation Szöveg tájolása - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Ez a méretezési szöveg irányultsága amikor ezek iránya függőleges. Alapértelmezett a bal, ami az ISO-szabvány. - + Left (ISO standard) Bal (ISO szabvány) - + Right Jobb - + Text spacing Szövegtérköz - + The space between the dimension line and the dimension text A méret segédvonalai és a méret szövegrész közti távolság - + Show the unit suffix in dimensions A dimenziók mértékegység utótagjainak megjelenítése - + Override unit Felülbírálási mértékegység - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Ha üresen hagyja ezt a mezőt, a méretmérések a FreeCAD-ben meghatározott aktuális egységben jelennek meg. Ha itt megjelöl egy egységet, például m-et vagy cm-t, erőltetheti az új méreteket, hogy megmutatkozzanak a mértékegységben. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings LáncMinta beállítások - + Default ShapeString font file Alapértelmezett a LáncMinta betű fájl - + Select a font file Válasszon ki egy betűtípus fájlt @@ -3259,7 +3269,7 @@ vagy próbáld meg alacsonyabb DWG verzióra menteni. A kijelölt alakzatoknak síkot kell meghatároznia - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -4682,7 +4692,7 @@ A végső szög lesz az alapszög plusz ennek összege. added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties - hozzáadott 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' és 'Fuse' tulajdonságok + az 'Igazolás', 'Referenciaigazolás', 'Balmargókmegtartása', 'Méretreigazítás' és a 'Igazítás' tulajdonságok kerültek hozzáadásra @@ -5438,7 +5448,7 @@ A végső szög lesz az alapszög plusz ennek összege. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5732,12 +5742,12 @@ kézzel az Eszközök -> Kiegészítő kezelő menüből ImportSVG - + Unknown SVG export style, switching to Translated Ismeretlen SVG exportálási stílus, lefordítottra vált - + The export list contains no object with a valid bounding box Az exportálási lista nem tartalmaz érvényes határolókerettel rendelkező tárgyat @@ -7052,12 +7062,12 @@ Ez egy karakter lista; a lista minden eleme a saját sorában jelenik meg. Keep left margin and leading white space when justification is left - Keep left margin and leading white space when justification is left + A bal oldali margó és a vezető fehér tér megtartása, ha az igazítás balra van állítva Scale to ensure cap height is equal to size - Scale to ensure cap height is equal to size + Méretezés annak biztosítására, hogy a kupak magassága megegyezzen a mérettel @@ -7072,7 +7082,7 @@ Ez egy karakter lista; a lista minden eleme a saját sorában jelenik meg. Fuse faces if faces overlap, usually not required (can be very slow) - Fuse faces if faces overlap, usually not required (can be very slow) + Átlapolt felületek egyesítése, általában nem szükségesek (nagyon lassú lehet) @@ -8148,7 +8158,7 @@ Használja az 'arch' kifejezést amerikai US arch jelölésének kikényszerít Arrow size - Nyíl mérete + Nyíl méret diff --git a/src/Mod/Draft/Resources/translations/Draft_id.qm b/src/Mod/Draft/Resources/translations/Draft_id.qm index 0050613b1a..aebd1e833a 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_id.qm and b/src/Mod/Draft/Resources/translations/Draft_id.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_id.ts b/src/Mod/Draft/Resources/translations/Draft_id.ts index ea1afbd61a..41c81a9234 100644 --- a/src/Mod/Draft/Resources/translations/Draft_id.ts +++ b/src/Mod/Draft/Resources/translations/Draft_id.ts @@ -951,12 +951,12 @@ value by using the [ and ] keys while drawing Line width - Tebal garis + Lebar garis px - piksel + px @@ -1557,17 +1557,17 @@ Note that this is not fully supported, and many object will be not editable with Teks dan dimensi - + Text settings Pengaturan teks - + Font family Keluarga font - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1575,184 +1575,194 @@ such as "Arial:Bold" Ini adalah nama font default untuk semua teks-teks rancangan dan dimensi. Itu bisa nama font seperti "Arial", gaya default seperti "sans", "serif" atau "mono", atau keluarga seperti "Arial, Helvatica, sans" atau nama dengan gaya seperti "Arial: Bold" - + Internal font Font internal - + Font size - Ukuran fonta + Ukuran huruf - + Default height for texts and dimensions Standar tinggi untuk teks dan dimensi - - - - - - + + + + + + mm mm - + Dimension settings Pengaturan dimensi - + Display mode Mode tampilan - + World World - + Screen Screen - + Number of decimals Jumlah desimal - + Extension lines size Extension lines size - + The default size of dimensions extension lines The standar ukuran dimensi garis ekstensi - + Extension line overshoot Extension line overshoot - + The default length of extension line above dimension line The default length of extension line above dimension line - + Dimension line overshoot Dimension line overshoot - + The default distance the dimension line is extended past extension lines The default distance the dimension line is extended past extension lines - + Arrows style Gaya tanda panah - + Dot Dot - + Circle Lingkaran - + Arrow Panah - + Tick Centang - + Tick-2 Centang-2 - + Arrows size Ukuran panah - + The default size of arrows Standar ukuran panah - + Text orientation Orientasi teks - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. - + Left (ISO standard) Kiri (standar ISO) - + Right Kanan - + Text spacing Jarak teks - + The space between the dimension line and the dimension text Ruang antara garis dimensi dan teks dimensi - + Show the unit suffix in dimensions Tampilkan akhiran unit dalam dimensi - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Pengaturan ShapeString - + Default ShapeString font file Default file font ShapeString - + Select a font file Pilih file font @@ -3245,7 +3255,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5424,7 +5434,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5718,12 +5728,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_it.qm b/src/Mod/Draft/Resources/translations/Draft_it.qm index 6ca014918b..df74aa0e33 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_it.qm and b/src/Mod/Draft/Resources/translations/Draft_it.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_it.ts b/src/Mod/Draft/Resources/translations/Draft_it.ts index 18da73cc6e..8711027d93 100644 --- a/src/Mod/Draft/Resources/translations/Draft_it.ts +++ b/src/Mod/Draft/Resources/translations/Draft_it.ts @@ -1567,17 +1567,17 @@ Notare che questo non è completamente supportato, e molti oggetti non saranno m Testi e quotature - + Text settings Impostazioni del testo - + Font family Tipo di carattere - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1586,184 +1586,194 @@ such as "Arial:Bold" Può essere un nome di carattere come "Arial", uno stile predefinito come "sans", "serif" o "mono", o una famiglia come "Arial,Helvetica,sans" o un nome con uno stile come "Arial:Bold" - + Internal font Tipo di carattere interno - + Font size Dimensione del carattere - + Default height for texts and dimensions Altezza predefinita per testi e quotature - - - - - - + + + + + + mm mm - + Dimension settings Impostazione delle quote - + Display mode Modalità di visualizzazione - + World Globale - + Screen Schermo - + Number of decimals Numero di cifre decimali - + Extension lines size Lunghezza di estensione delle linee - + The default size of dimensions extension lines La dimensione predefinita delle linee di riferimento delle quotature - + Extension line overshoot Estensione della linea di riferimento - + The default length of extension line above dimension line La lunghezza predefinita della linea di riferimento oltre la linea di quota - + Dimension line overshoot Estensione della linea di quota - + The default distance the dimension line is extended past extension lines La lunghezza predefinita a cui estendere la linea di quota oltre le linee di riferimento - + Arrows style Stile delle frecce - + Dot Punto - + Circle Cerchio - + Arrow Freccia - + Tick Tratto - + Tick-2 Tratto obliquo 2 - + Arrows size Dimensione delle frecce - + The default size of arrows La dimensione predefinita delle frecce - + Text orientation Orientamento del testo - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Questo è l'orientamento dei testi delle quotature, quando esse sono verticali. Predefinito è a sinistra, secondo lo standard ISO. - + Left (ISO standard) Sinistra (standard ISO) - + Right Destra - + Text spacing Spaziatura del testo - + The space between the dimension line and the dimension text Lo spazio tra la linea di quota e il suo testo - + Show the unit suffix in dimensions Visualizza il suffisso delle unità nelle quote - + Override unit Sovrascrivi unità - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Lasciando vuoto questo campo, le misure delle dimensioni saranno mostrate nell'unità corrente definita in FreeCAD. Indicando un'unità qui come m o cm, è possibile forzare la visualizzazione delle nuove dimensioni in quell'unità. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Impostazione di Forma da testo - + Default ShapeString font file Font predefinito per Forma da testo - + Select a font file Seleziona un file di font @@ -3253,7 +3263,7 @@ or try saving to a lower DWG version. Le Forme Selezionate devono definire un piano - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5429,7 +5439,7 @@ L'angolo finale sarà l'angolo base più questa quantità. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5723,12 +5733,12 @@ dal menu Strumenti -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Stile di esportazione SVG sconosciuto, verrà esportato come Tradotto - + The export list contains no object with a valid bounding box L'elenco di esportazione non contiene alcun oggetto con un contenitore di delimitazione valido diff --git a/src/Mod/Draft/Resources/translations/Draft_ja.qm b/src/Mod/Draft/Resources/translations/Draft_ja.qm index da71586e39..78f808188f 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ja.qm and b/src/Mod/Draft/Resources/translations/Draft_ja.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ja.ts b/src/Mod/Draft/Resources/translations/Draft_ja.ts index ed4d12f951..a26f7aaf9d 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ja.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ja.ts @@ -1558,17 +1558,17 @@ Note that this is not fully supported, and many object will be not editable with テキストと寸法線 - + Text settings テキスト設定 - + Font family フォントの種類 - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1576,185 +1576,195 @@ such as "Arial:Bold" これは、すべてのドラフト・テキストと寸法に用いるデフォルト(省略時の設定)フォント名です。「Arial」のようなフォント名、「sans」,「serif」や「mono」のようなデフォルトのスタイル名、「Arial,Helvetica,sans」のような系統名、 「Arial:Bold」のようなフォント名とスタイル名を組み合わせた形で指定することができます。 - + Internal font 内部フォント - + Font size フォントサイズ - + Default height for texts and dimensions テキストと寸法のデフォルトの高さ - - - - - - + + + + + + mm mm - + Dimension settings 寸法設定 - + Display mode 表示モード - + World World - + Screen スクリーン - + Number of decimals 小数点以下桁数 - + Extension lines size 寸法補助線のサイズ - + The default size of dimensions extension lines 寸法補助線のデフォルトサイズ - + Extension line overshoot 寸法補助線の超過量 - + The default length of extension line above dimension line 寸法線の上の寸法補助線のデフォルトの長さ - + Dimension line overshoot 寸法線の超過量 - + The default distance the dimension line is extended past extension lines 寸法線が寸法補助線を超えて伸びるデフォルトの距離 - + Arrows style 矢印のスタイル - + Dot - + Circle - + Arrow 矢印 - + Tick 目盛 - + Tick-2 目盛り-2 - + Arrows size 矢印のサイズ - + The default size of arrows 矢印のデフォルトサイズ - + Text orientation テキストの向き - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. 寸法が縦になったときの寸法テキストの向き。デフォルトは左(ISO標準) - + Left (ISO standard) 左 (ISO規格) - + Right 右面図 - + Text spacing テキストの間隔 - + The space between the dimension line and the dimension text 寸法線と寸法テキストの間隔 - + Show the unit suffix in dimensions 寸法の単位サフィックスを表示 - + Override unit 単位を上書き - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. この入力欄を空白のままにすると、FreeCADで定義されている現在の単位で寸法測定値が表示されます。 ここでmやcmなどの単位を指定すると、その単位で新しい寸法が表示されるようにできます。 - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings シェイプストリング設定 - + Default ShapeString font file デフォルトのシェイプストリング用フォントファイル - + Select a font file フォントファイルを選択 @@ -3242,7 +3252,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5421,7 +5431,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5715,12 +5725,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_ka.qm b/src/Mod/Draft/Resources/translations/Draft_ka.qm index a1d0ca04d9..72dcd82c39 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ka.qm and b/src/Mod/Draft/Resources/translations/Draft_ka.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ka.ts b/src/Mod/Draft/Resources/translations/Draft_ka.ts index 89cfafe97d..97be80d7f8 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ka.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ka.ts @@ -555,8 +555,8 @@ Negative values will result in copies produced in the negative direction. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - თუ ჩართულია, მიღებული ობიექტები მასივში შეერთდება, თუ ისინი ერთმანეთს ეხებიან. -ეს მხოლოდ მაშინ მუშაობს, თუ "მასივების მიბმა" გამორთულია. + თუ ჩართულია, მოხდება მასივში მიღებული ობიექტების შერწყმა, თუ ისინი ერთმანეთს ეხებიან. +მუშაობს მხოლოდ მაშინ, თუ "ბმულის მასივი" გამორთულია. @@ -573,7 +573,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Link array - მასივების მიბმა + ბმულების მასივი @@ -652,13 +652,13 @@ Change the direction of the axis itself in the property editor. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - თუ ჩართულია, მოხდება მასივში მიღებული ობიექტების შერწყმა, თუ ისინი ერთმანეთს ეხებიან. -მუშაობს მხოლოდ მაშინ, თუ "ბმულის მასივი" გამორთულია. + თუ ჩართულია, მიღებული ობიექტები მასივში შეერთდება, თუ ისინი ერთმანეთს ეხებიან. +ეს მხოლოდ მაშინ მუშაობს, თუ "მასივების მიბმა" გამორთულია. Fuse - შეერთება + შერწყმა @@ -670,7 +670,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Link array - ბმულების მასივი + მასივების მიბმა @@ -966,7 +966,7 @@ value by using the [ and ] keys while drawing px - პქს + px @@ -1082,7 +1082,7 @@ value by using the [ and ] keys while drawing Text spacing - ტექსტში დაშორებები + სიმბოლოებს შორის დაშორება @@ -1567,17 +1567,17 @@ Note that this is not fully supported, and many object will be not editable with ტექსტები და ზომები - + Text settings ტექსტის მორგება - + Font family ფონტის ოჯახი - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1586,184 +1586,194 @@ such as "Arial:Bold" შეიძლება იყოს ფონტის სახელი, მაგ: "Arian", ნაგულისხმევი სტილი, როგორებიცაა "sans" ან "serif", "mono", მთელი ოჯახი, მაგ "Arial, Helvetica, sans" ან სახელი, სტილის მითითებით, მაგ: "Arial:Bold" - + Internal font შიდა ფონტი - + Font size ფონტის ზომა - + Default height for texts and dimensions ტექსტებისა და ზომის ტექსტების ნაგულისხმევი სიმაღლე - - - - - - + + + + + + mm მმ - + Dimension settings ზომების მორგება - + Display mode ჩვენების რეჟიმი - + World მსოფლიო - + Screen ეკრანი - + Number of decimals ათეულების რიცხვი - + Extension lines size გაგრძელების ხაზის ზომა - + The default size of dimensions extension lines ზომის ხაზების გაგრძელებების ნაგულისხმევი ზომა - + Extension line overshoot გაგრძელების ხაზს გადახურვა - + The default length of extension line above dimension line ზომის ხაზის ზემოთ გაგრძელების ხაზის ნაგულისხმევი სიგრძე - + Dimension line overshoot ზომის ხაზის გადახურვა - + The default distance the dimension line is extended past extension lines ზომის ხაზების გაგრძელების ხაზებს მიღმა გაგრძელების ზომის ნაგულისხმევი მნიშვნელობა - + Arrows style ისრის სტილი - + Dot წერტილი - + Circle წრე - + Arrow ისარი - + Tick საკავი - + Tick-2 საკავი-2 - + Arrows size ისრის ზომა - + The default size of arrows ისრების ნაგულისხმევი ზომა - + Text orientation ტექსტის მიმართულება - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. ეს არის ზომის ტექსტების ორიენტაცია, როდესაც ეს ზომები ვერტიკალურია. ნაგულისხმევი მარცხენაა, რაც ISO სტანდარტს წარმოადგენს. - + Left (ISO standard) მარჯვნივ (ISO სტანდარტი) - + Right მარჯვენა - + Text spacing - სიმბოლოებს შორის დაშორება + ტექსტში დაშორებები - + The space between the dimension line and the dimension text ადგილი ზომის ხაზსა და ზომის ტექსტს შორის - + Show the unit suffix in dimensions ზომებზე საზომი ერთეულის მიწერა - + Override unit საზომი ერთეულის შეცვლა - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. ველის ცარიელი დატოვების შემთხვევაში განზომილების გაზომვები ნაჩვენები იქნება FreeCAD-ში განსაზღვრულ მიმდინარე ერთეულში. ისეთი ერთეულის მითითებით, როგორიცაა მ ან სმ, შეგიძლიათ აიძულოთ ზომების ჩვენება ამ ერთეულში. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings ShapeString-ის მორგება - + Default ShapeString font file ShapeString-ის ნაგულისხმევი ფონტის ფაილი - + Select a font file აირჩიეთ ფონტის ფაილი @@ -3250,7 +3260,7 @@ or try saving to a lower DWG version. მონიშნული მოხაზულობები სიბრტყეს უნდა აღწერდნენ - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5428,7 +5438,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5722,12 +5732,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated SVG გატანის უცნობი სტილი. გამოიყენება Translated - + The export list contains no object with a valid bounding box გასატანი სია არ შეიცავს ობიექტს სწორი შემომსაზღვრელი ჩარჩოთი diff --git a/src/Mod/Draft/Resources/translations/Draft_ko.qm b/src/Mod/Draft/Resources/translations/Draft_ko.qm index d7c03e40ab..b8319d4368 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ko.qm and b/src/Mod/Draft/Resources/translations/Draft_ko.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ko.ts b/src/Mod/Draft/Resources/translations/Draft_ko.ts index 1a6450281d..aabefe5331 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ko.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ko.ts @@ -1563,17 +1563,17 @@ Note that this is not fully supported, and many object will be not editable with 텍스트 및 치수 - + Text settings 텍스트 설정 - + Font family 글꼴 가족 - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1581,184 +1581,194 @@ such as "Arial:Bold" 모든 Draft 텍스트와 치수에 대 한 기본 글꼴 이름입니다. "Arial", "san"와 같은 폰트 이름이거나, "sans" 또는 "serif", 또는 "mono" 같은 스타일 이름이 될 수 있습니다. 또는 "Arial, Helvetica, sans" 와 같은 family가 될 수도 있고, "Arial: 굵게"와 같이 이름과 스타일이 함께있는 형태가 될 수도 있습니다. - + Internal font 내부 글꼴 - + Font size 폰트 크기 - + Default height for texts and dimensions 텍스트 및 치수에 대 한 기본 높이 - - - - - - + + + + + + mm mm - + Dimension settings 치수 설정 - + Display mode 디스플레이 모드 - + World World - + Screen Screen - + Number of decimals 소수점수 - + Extension lines size 연장선 크기 - + The default size of dimensions extension lines 치수 확장선의 기본 크기 - + Extension line overshoot Extension line overshoot - + The default length of extension line above dimension line 치수선 위의 확장선 기본 길이 - + Dimension line overshoot Dimension line overshoot - + The default distance the dimension line is extended past extension lines The default distance the dimension line is extended past extension lines - + Arrows style 화살표 스타일 - + Dot - + Circle - + Arrow 화살표 - + Tick 두꺼움 - + Tick-2 Tick-2 - + Arrows size 화살표 크기 - + The default size of arrows 화살표의 기본 크기 - + Text orientation 텍스트 방향 - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. 치수가 수직일 경우의 치수 텍스트의 방향입니다. 디폴트는 ISO표준인 왼쪽방향입니다. - + Left (ISO standard) 왼쪽(ISO 표준) - + Right 우측면 - + Text spacing 문자 간격 - + The space between the dimension line and the dimension text 치수 선과 치수 텍스트의 간격 - + Show the unit suffix in dimensions Show the unit suffix in dimensions - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. 이 필드를 비워두면, 치수 측정값이 FreeCAD에 정의된 현재 단위로 표시됩니다. 여기에 m 또는 cm와 같은 단위를 지정하면 새 치수가 해당 단위로 표시되도록 강제할 수 있습니다. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings ShapeString settings - + Default ShapeString font file Default ShapeString font file - + Select a font file 글꼴 파일을 선택 @@ -3251,7 +3261,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5430,7 +5440,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5724,12 +5734,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_nl.qm b/src/Mod/Draft/Resources/translations/Draft_nl.qm index 5e804dd021..ee4717fdfc 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_nl.qm and b/src/Mod/Draft/Resources/translations/Draft_nl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_nl.ts b/src/Mod/Draft/Resources/translations/Draft_nl.ts index 4282804b7e..9a02cbdbf0 100644 --- a/src/Mod/Draft/Resources/translations/Draft_nl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_nl.ts @@ -1566,17 +1566,17 @@ Let op dat dit niet volledig ondersteund wordt en veel objecten niet bewerkt kun Teksten en afmetingen - + Text settings Tekstinstellingen - + Font family Lettertypefamilie - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1584,184 +1584,194 @@ such as "Arial:Bold" Dit is de standaard naam van het lettertype voor alle Draft teksten en afmetingen. Het kan een font naam zijn, zoals "Arial", een standaard stijl, zoals "sans", "serif" of "mono", of een familie, zoals "Arial, Helvetica, sans" of een naam met een stijl zoals "Arial: Bold" - + Internal font Intern lettertype - + Font size Lettergrootte - + Default height for texts and dimensions Standaardhoogte voor teksten en afmetingen - - - - - - + + + + + + mm mm - + Dimension settings Afmetingsinstellingen - + Display mode Weergavemodus - + World Wereld - + Screen Scherm - + Number of decimals Aantal decimalen - + Extension lines size Verlengingslijngrootte - + The default size of dimensions extension lines De standaardgrootte van verlengingslijnen voor de afmetingen - + Extension line overshoot Extensielijnoverschrijding - + The default length of extension line above dimension line De standaardlengte van de verlengingslijn boven de afmetingslijn - + Dimension line overshoot Afmetingslijnoverschrijding - + The default distance the dimension line is extended past extension lines De standaardafstand waar de afmetingslijn voorbij de verlengingslijnen verlengd is - + Arrows style Pijltype - + Dot punt - + Circle Cirkel - + Arrow Pijl - + Tick Vink - + Tick-2 Schuine streep-2 - + Arrows size Pijlgrootte - + The default size of arrows De standaardgrootte van pijlen - + Text orientation Tekstoriëntatie - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Dit is de plaats van de dimensie-teksten wanneer deze dimensies verticaal staan. Standaard is links, dat is de ISO-norm. - + Left (ISO standard) Links (ISO-norm) - + Right Rechts - + Text spacing Tekstafstand - + The space between the dimension line and the dimension text De afstand tussen de afmetingslijn en de afmetingstekst - + Show the unit suffix in dimensions Toon het eenheidachtervoegsel in de afmetingen - + Override unit Eenheid overschrijven - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Door dit veld leeg te laten, worden de afmetingen weergegeven in de huidige eenheid die is gedefinieerd in FreeCAD. Door hier een eenheid zoals m of cm aan te geven, kun je de nieuwe afmetingen in die eenheid afdwingen. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings ShapeString-instellingen - + Default ShapeString font file Standaard ShapeString-lettertypebestand - + Select a font file Kies een lettertypebestand @@ -2296,7 +2306,8 @@ This might fail for post DXF R12 templates. <html><head/><body><p>If checked, the outline of a human figure is displayed at the bottom left corner of the grid. This option is only effective if the BIM workbench is installed and if &quot;Show grid border&quot; option is enabled.</p></body></html> - <html><head/><body><p>If checked, the outline of a human figure is displayed at the bottom left corner of the grid. This option is only effective if the BIM workbench is installed and if &quot;Show grid border&quot; option is enabled.</p></body></html> + Indien aangevinkt wordt de omtrek van een menselijke figuur weergegeven in de linker onderhoek van het raster. +Deze optie is alleen van toepassing als de BIM-werkbank is geïnstalleerd en als de &quot;Rasterrand weergeven&quot; optie is ingeschakeld. @@ -3252,7 +3263,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5431,7 +5442,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5725,12 +5736,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_pl.qm b/src/Mod/Draft/Resources/translations/Draft_pl.qm index 3d7d780771..cfb5cac5bf 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_pl.qm and b/src/Mod/Draft/Resources/translations/Draft_pl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_pl.ts b/src/Mod/Draft/Resources/translations/Draft_pl.ts index f16eedf9e0..b9333e6627 100644 --- a/src/Mod/Draft/Resources/translations/Draft_pl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_pl.ts @@ -448,7 +448,7 @@ A Link array is more efficient when creating multiple copies, but it cannot be f Orthogonal array - Szyk prostopadły + Szyk prostokątny @@ -656,7 +656,7 @@ Działa to tylko wtedy, gdy opcja "Szyk łączy" jest nieaktywna. Fuse - Scalenie + Scal @@ -958,7 +958,7 @@ używając klawisza [ i ] podczas rysowania Line width - Szerekość linii + Szerokość linii @@ -1079,7 +1079,7 @@ używając klawisza [ i ] podczas rysowania Text spacing - Odstęp od tekstu + Odstępy w tekście @@ -1571,17 +1571,17 @@ obiektu źródłowego i analogicznie podczas wykonywania operacji ulepsz / rozbi Teksty i wymiary - + Text settings Ustawienia dla tekstu - + Font family Rodzina czcionek - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1591,187 +1591,197 @@ Może to być np. nazwa czcionki "Arial", domyślny styl, tak jak "sans", "serif lub rodziny, jak np. "Arial, Helvetica, sans" lub nazwa w stylu np. "Arial: Bold" - + Internal font Wewnętrzna czcionka - + Font size - Wielkość czcionki + Rozmiar czcionki - + Default height for texts and dimensions Domyślna wysokość tekstów i wymiarów - - - - - - + + + + + + mm mm - + Dimension settings Ustawienia wymiaru - + Display mode Tryb wyświetlania - + World Świat - + Screen Ekran - + Number of decimals Liczba cyfr po przecinku - + Extension lines size Rozmiar linii pomocniczych - + The default size of dimensions extension lines Domyślny rozmiar pomocniczych linii wymiarów - + Extension line overshoot Przedłużenie linii pomocniczej - + The default length of extension line above dimension line Domyślna długość linii pomocniczej znajdującej się ponad linią wymiarową - + Dimension line overshoot Przedłużenie linii wymiaru - + The default distance the dimension line is extended past extension lines Domyślna odległość, na jaką linia wymiarowa jest wydłużona poza linie pomocnicze - + Arrows style Styl strzałki - + Dot Kropka - + Circle Okrąg - + Arrow Strzałka - + Tick Grot - + Tick-2 Grot-2 - + Arrows size Rozmiar strzałki - + The default size of arrows Domyślny rozmiar strzałek - + Text orientation Orientacja tekstu - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Jest to orientacja tekstów wymiarów, które znajdują się w pionie. Domyślnie ustawiona jest na lewo, co jest standardem ISO. - + Left (ISO standard) Z lewej (standard ISO) - + Right Z prawej - + Text spacing - Odstępy w tekście + Odstęp od tekstu - + The space between the dimension line and the dimension text Odstęp pomiędzy tekstem a linią wymiarową - + Show the unit suffix in dimensions Pokaż przyrostek jednostki w wymiarach - + Override unit Zastąp jednostkę - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Jeśli to pole pozostanie puste, wartości wymiarów będą pokazane w bieżącej jednostce zdefiniowanej w FreeCAD. Wyznaczając jednostkę, taką jak m lub cm, można wymusić pokazanie nowych wymiarów w tej jednostce. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Ustawienia dla kształtu z tekstu - + Default ShapeString font file Domyślny plik czcionki dla kształtu z tekstu - + Select a font file Wybierz plik czcionki @@ -2428,7 +2438,7 @@ Te linie są grubsze niż normalne linie siatki. Automatic - Automatyczna + Automatycznie @@ -3266,7 +3276,7 @@ lub spróbuj zapisać do niższej wersji DWG. Wybrane kształty muszą definiować płaszczyznę - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -4569,7 +4579,7 @@ Kąt końcowy będzie równy kątowi podstawowemu plus ta wartość. Orthogonal array - Szyk prostopadły + Szyk prostokątny @@ -5444,7 +5454,7 @@ Kąt końcowy będzie równy kątowi podstawowemu plus ta wartość. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5615,12 +5625,12 @@ Proszę zainstalować dodatek bibliotek dxf ręcznie z narzędzi Menu -> Mene Line width - Szerokość linii + Szerekość linii Draw style - Styl kreślenia + Styl rysowania @@ -5737,12 +5747,12 @@ Proszę zainstalować dodatek bibliotek dxf ręcznie z narzędzi Menu -> Mene ImportSVG - + Unknown SVG export style, switching to Translated Nieznany styl eksportu SVG, przełączanie na przetłumaczone - + The export list contains no object with a valid bounding box Lista eksportu nie zawiera żadnego obiektu z prawidłową granicą @@ -8040,7 +8050,7 @@ właściwości „Pierwszy kąt” i „Ostatni kąt”. Line width - Szerekość linii + Szerokość linii diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm b/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm index c206425f27..9258a63b08 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm and b/src/Mod/Draft/Resources/translations/Draft_pt-BR.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts b/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts index 81357bc913..1123a11cfd 100644 --- a/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts +++ b/src/Mod/Draft/Resources/translations/Draft_pt-BR.ts @@ -1560,17 +1560,17 @@ Note que isto não é suportado por todas as ferramentas, e muitos objetos não Textos e cotas - + Text settings Configurações de Texto - + Font family Família de fonte - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1578,184 +1578,194 @@ such as "Arial:Bold" Este é o nome da fonte padrão para todos os textos e cotas. Ele pode ser um nome de fonte, como "Arial", um estilo padrão como "sans", "serif" ou "mono", uma família como "Arial, Helvetica, sans" ou um nome com um estilo como"Arial: Bold" - + Internal font Fonte interna - + Font size Tamanho da fonte - + Default height for texts and dimensions Altura padrão para textos e cotas - - - - - - + + + + + + mm mm - + Dimension settings Configurações de dimensão - + Display mode Modo de visualização - + World Mundo - + Screen Tela - + Number of decimals Número de casas decimais - + Extension lines size Tamanho das linhas de extensão - + The default size of dimensions extension lines O tamanho padrão das linhas de extensão das cotas - + Extension line overshoot Extensão da linha de extensão - + The default length of extension line above dimension line O comprimento padrão da linha de extensão acima da linha de cota - + Dimension line overshoot Ultrapassagem da linha de dimensão - + The default distance the dimension line is extended past extension lines A distância padrão da linha de cota é estendida além das linhas de extensão - + Arrows style Estilo das setas - + Dot Ponto - + Circle Círculo - + Arrow Seta - + Tick Diagonal - + Tick-2 Tick-2 - + Arrows size Tamanho das setas - + The default size of arrows O tamanho padrão das setas - + Text orientation Orientação do Texto - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Esta é a orientação dos textos das cotas quando essas são verticais. O padrão é esquerdo, que é o padrão ISO. - + Left (ISO standard) Esquerda (padrão ISO) - + Right Direito - + Text spacing Espaçamento do texto - + The space between the dimension line and the dimension text O espaço entre a linha da cota e do texto da cota - + Show the unit suffix in dimensions Mostrar o sufixo das unidades nas dimensões - + Override unit Substituir unidade - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Ao deixar este campo em branco, as medidas de dimensões serão exibidas na unidade atual definida no FreeCAD. Indicando uma unidade aqui, como m ou cm, você pode forçar as novas dimensões a serem mostradas na unidade descrita. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Configurações de ShapeString - + Default ShapeString font file Arquivo de fonte ShapeString padrão - + Select a font file Selecione um arquivo de fonte @@ -3246,7 +3256,7 @@ Tente mover o arquivo DWG para um caminho de diretório sem espaços e caractere As formas selecionadas devem definir um plano - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5423,7 +5433,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5717,12 +5727,12 @@ no menu ferramentas -> Gerenciador de Extensões ImportSVG - + Unknown SVG export style, switching to Translated Estilo de exportação SVG desconhecido, mudando para Traduzido - + The export list contains no object with a valid bounding box A lista de exportação não contém nenhum objeto com uma caixa delimitadora válida diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm b/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm index d8bbf64dec..2bddbd2c0e 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm and b/src/Mod/Draft/Resources/translations/Draft_pt-PT.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts b/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts index 014b0f9900..8684811cb7 100644 --- a/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts +++ b/src/Mod/Draft/Resources/translations/Draft_pt-PT.ts @@ -1565,17 +1565,17 @@ Note that this is not fully supported, and many object will be not editable with Textos e dimensões - + Text settings Definições de texto - + Font family Família de fonte - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1583,184 +1583,194 @@ such as "Arial:Bold" Este é o nome da fonte pré-configurada para todos os textos e dimensões desenhados. Ele pode ser um nome do fonte, como "Arial", um estilo de fonte como "sans", "serif" ou "mono" ou uma família de fontes como "Arial, Helvetica, sans" ou um nome com um estilo associado como "Arial:Bold" - + Internal font Tipo interno - + Font size Tamanho da fonte - + Default height for texts and dimensions Altura Predefinida para os Textos e Dimensões - - - - - - + + + + + + mm mm - + Dimension settings Configurações de cotagem - + Display mode Modo de visualização - + World Mundo - + Screen Screen - + Number of decimals Número de casas decimais - + Extension lines size Tamanho das linhas de extensão - + The default size of dimensions extension lines O tamanho predefinido das dimensões das linhas de extensão - + Extension line overshoot Superação da linha de extensão - + The default length of extension line above dimension line O comprimento predefinido da linha de extensão acima da linha de cotagem - + Dimension line overshoot Superação da linha de cotagem - + The default distance the dimension line is extended past extension lines A distância predefinida em que a linha de cotagem é estendida para lá das linhas de extensão - + Arrows style Estilo de setas - + Dot Ponto - + Circle Círculo - + Arrow Flecha - + Tick diagonal - + Tick-2 Diagonal-2 - + Arrows size Tamanho das setas - + The default size of arrows O tamanho predefinido das flechas - + Text orientation Orientação do texto - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Esta é a orientação de textos de dimensão quando verticais. Pré-configurada à esquerda, que é o padrão ISO. - + Left (ISO standard) Esquerda (norma ISO) - + Right Direita - + Text spacing Espaçamento do texto - + The space between the dimension line and the dimension text O espaço entre a linha de dimensão e o texto da dimensão - + Show the unit suffix in dimensions Mostrar o sufixo das unidade nas dimensões - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Configurações de ShapeString - + Default ShapeString font file Ficheiro de fonte predefinida para ShapeString - + Select a font file Selecione um ficheiro de tipos @@ -3252,7 +3262,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5431,7 +5441,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5725,12 +5735,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_ro.qm b/src/Mod/Draft/Resources/translations/Draft_ro.qm index 94830acead..a36cbec241 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ro.qm and b/src/Mod/Draft/Resources/translations/Draft_ro.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ro.ts b/src/Mod/Draft/Resources/translations/Draft_ro.ts index dee2446024..97985a4af3 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ro.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ro.ts @@ -1565,17 +1565,17 @@ Rețineți că aceasta nu este în întregime suportată și multe obiecte nu vo Texte și dimensiuni - + Text settings Parametrii textului - + Font family Familia de fonturi - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1585,184 +1585,194 @@ Acesta poate fi un nume de font cum ar fi "Arial", un stil implicit cum ar fi "s sau "mono", sau o familie cum ar fi "Arial,Helvetica,sans", sau un nume şi un stil cum ar fi " Arial:Bold " - + Internal font Font intern - + Font size Dimensiunea fontului - + Default height for texts and dimensions Înălţimea implicită pentru texte şi cote - - - - - - + + + + + + mm mm - + Dimension settings Paramètrii de cotare - + Display mode Mod de afișare - + World Lumea - + Screen Screen - + Number of decimals Număr de zecimale - + Extension lines size Dimensiune linie de extensie - + The default size of dimensions extension lines Dimensiunea implicită a dimensiunilor liniilor de extensie - + Extension line overshoot Depăşirea liniei de prelungire - + The default length of extension line above dimension line Lungimea implicită a linei de prelungire trece deasupra liniei de dimensiune - + Dimension line overshoot Dimensiunea liniei depăşiri - + The default distance the dimension line is extended past extension lines Distanța implicită a liniei de dimensiune se extinde peste liniile de prelungire - + Arrows style Tipul de săgeată - + Dot Punct - + Circle Cerc - + Arrow Săgeată - + Tick Cocher - + Tick-2 Oblique 2 - + Arrows size Dimensiunea săgeții - + The default size of arrows Dimensiunea implicită a săgeților - + Text orientation Orientarea textului - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Aceasta este orientarea pentru textele cotelor când acestea sunt verticale. Implicit este la stânga, acesta este şi standardul ISO. - + Left (ISO standard) Stânga (ISO standard) - + Right Dreapta - + Text spacing Spațierea textului - + The space between the dimension line and the dimension text Spațiul dintre linia de dimensionare și textul dimensiunii - + Show the unit suffix in dimensions Arată sufixul unităților în dimensiuni - + Override unit Suprascrie unitatea - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Lăsând acest câmp necompletat, măsurătorile dimensiunilor vor fi afișate în unitatea curentă definită în FreeCAD. Prin indicarea unei unităţi aici, cum ar fi m sau cm, puteţi forţa ca noile dimensiuni să fie indicate în acea unitate. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Configurări aliniere - + Default ShapeString font file Fichier implicit de font și ligne de forme - + Select a font file Selectați un fișier font @@ -3255,7 +3265,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5434,7 +5444,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5728,12 +5738,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_ru.qm b/src/Mod/Draft/Resources/translations/Draft_ru.qm index bc3573f4e1..2d74bb3be8 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_ru.qm and b/src/Mod/Draft/Resources/translations/Draft_ru.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_ru.ts b/src/Mod/Draft/Resources/translations/Draft_ru.ts index 1fc9b9dea9..bb15b3b3fc 100644 --- a/src/Mod/Draft/Resources/translations/Draft_ru.ts +++ b/src/Mod/Draft/Resources/translations/Draft_ru.ts @@ -553,8 +553,8 @@ Negative values will result in copies produced in the negative direction. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - Если флажок установлен, результирующие объекты в массиве будут сливаться, если они соприкасаются друг с другом. -Это работает только в том случае, если «массив ссылок» отключен. + Если отмечено, то результирующие объекты в массиве будут слиты, если касаются друг друга. +Это работает только в том случае, если "Связь массивов" отключена. @@ -565,13 +565,13 @@ This only works if "Link array" is off. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. - Если флажок установлен, результирующий объект будет «массивом ссылок» вместо обычного массива. -Массив Link более эффективен при создании нескольких копий, но его нельзя объединить вместе. + Если отмечено, результирующим объектом будет "Массив ссылок" вместо обычного массива. +Массив ссылок более эффективен при создании нескольких копий, но к нему нельзя применить операцию слияния. Link array - Массив ссылок + Массив из связанных объектов @@ -650,25 +650,25 @@ Change the direction of the axis itself in the property editor. If checked, the resulting objects in the array will be fused if they touch each other. This only works if "Link array" is off. - Если отмечено, то результирующие объекты в массиве будут слиты, если касаются друг друга. -Это работает только в том случае, если "Связь массивов" отключена. + Если флажок установлен, результирующие объекты в массиве будут сливаться, если они соприкасаются друг с другом. +Это работает только в том случае, если «массив ссылок» отключен. Fuse - Объединение + Слияние If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. - Если отмечено, результирующим объектом будет "Массив ссылок" вместо обычного массива. -Массив ссылок более эффективен при создании нескольких копий, но к нему нельзя применить операцию слияния. + Если флажок установлен, результирующий объект будет «массивом ссылок» вместо обычного массива. +Массив Link более эффективен при создании нескольких копий, но его нельзя объединить вместе. Link array - Массив из связанных объектов + Массив ссылок @@ -1141,7 +1141,7 @@ value by using the [ and ] keys while drawing Tick-2 - Зацепление-2 + Засечка-2 @@ -1557,17 +1557,17 @@ Note that this is not fully supported, and many object will be not editable with Текст и размеры - + Text settings Настройки текста - + Font family Шрифт - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1575,184 +1575,194 @@ such as "Arial:Bold" Это имя шрифта по умолчанию для всех чертежных текстов и размеров. Это может быть имя шрифта, такок, как «Arial», стиль по умолчанию, такой как «sans», «serif» или «моно» или семейство как "Arial, Helvetica, sans» или имя со стилем, такое, как" Arial:Bold» - + Internal font встроенный шрифт - + Font size Размер шрифта - + Default height for texts and dimensions Высота текста и размеров по умолчанию - - - - - - + + + + + + mm мм - + Dimension settings Настройки размеров - + Display mode Режим отображения - + World Окружение - + Screen Экран - + Number of decimals Количество десятичных знаков - + Extension lines size Размер выносной линий - + The default size of dimensions extension lines Длина выносных размерных линий по умолчанию - + Extension line overshoot Нахлёст линии расширения - + The default length of extension line above dimension line Длина выносной линии над размерной линией по умолчанию - + Dimension line overshoot Нахлёст размерной линии - + The default distance the dimension line is extended past extension lines Расстояние по умолчанию, на которое размерная линия расширена за выносные линии - + Arrows style Стиль стрелки - + Dot Точка - + Circle Окружность - + Arrow Стрелка - + Tick Засечка - + Tick-2 - Засечка-2 + Зацепление-2 - + Arrows size Размер стрелки - + The default size of arrows Размер стрелок по умолчанию - + Text orientation Ориентация текста - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Это ориентация размерных надписей, когда эти надписи вертикальны. По умолчанию - слева, согласно стандарту ISO. - + Left (ISO standard) Слева (стандарт ISO) - + Right Вправо - + Text spacing Интервал текста - + The space between the dimension line and the dimension text Отступ между размерной линией и текстом - + Show the unit suffix in dimensions Показать суффикс единиц для размеров - + Override unit Переопределить единицу измерения - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Если оставить это поле пустым, то будут показаны те единицы измерения, какие указаны в FreeCAD. Указывая единицу измерения здесь как м или см, Вы можете указать новые единицы измерения. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Настройки инструмента Текст в кривую - + Default ShapeString font file Файл шрифта по умолчанию - + Select a font file Выберите файл шрифта @@ -3236,7 +3246,7 @@ or try saving to a lower DWG version. Выбранные фигуры должны определять плоскость - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5414,7 +5424,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5589,7 +5599,7 @@ from menu Tools -> Addon Manager Draw style - Стиль представления + Стиль рисования @@ -5706,12 +5716,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Неизвестный стиль экспорта SVG, переключение на Translated - + The export list contains no object with a valid bounding box Список экспорта не содержит объектов с допустимым габаритом diff --git a/src/Mod/Draft/Resources/translations/Draft_sl.qm b/src/Mod/Draft/Resources/translations/Draft_sl.qm index 3e7ae641b2..7443c4f1c2 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sl.qm and b/src/Mod/Draft/Resources/translations/Draft_sl.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sl.ts b/src/Mod/Draft/Resources/translations/Draft_sl.ts index 1c2a501c6f..6b925e164a 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sl.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sl.ts @@ -658,7 +658,7 @@ To deluje le, če je "Vezana razpostavitev" izključena. Fuse - Zlij + Združi @@ -966,7 +966,7 @@ risanjem spremenite s tipkama [ in ] px - sl. točk + px @@ -1162,7 +1162,7 @@ risanjem spremenite s tipkama [ in ] Arrow size - Velikost puščice + Velikost puščic @@ -1567,17 +1567,17 @@ Vedite, da ta možnost ni popolnoma podprta in da številnih predmetov ne bo mog Besedila in mere - + Text settings Nastavitve besedila - + Font family Družina pisav - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1588,184 +1588,194 @@ stalno širino"), družina (npr. "Arial,Helvetica,sans") ali ime s slogom (npr. "Arial:krepko") - + Internal font Notranja pisava - + Font size Velikost pisave - + Default height for texts and dimensions Privzeta višina besedila in mer - - - - - - + + + + + + mm mm - + Dimension settings Nastavitve kót - + Display mode Prikazni način - + World Svet - + Screen Zaslon - + Number of decimals Število decimalk - + Extension lines size Dolžina pomožnih kotirnih črt - + The default size of dimensions extension lines Privzeta velikost pomožnih kotirnih črt - + Extension line overshoot Prekoračitev pomožne kotirne črte - + The default length of extension line above dimension line Privzeto podaljšanje pomožne kotirne črte preko kotirne črte - + Dimension line overshoot Prekoračitev kotirne črte - + The default distance the dimension line is extended past extension lines Privzeto podaljšanje kotirne črte preko pomožnih kotirnih črt - + Arrows style Slog puščic - + Dot Pika - + Circle Krog - + Arrow Puščica - + Tick Kljukica - + Tick-2 Kljukica-2 - + Arrows size Velikost puščic - + The default size of arrows Privzeta velikost puščic - + Text orientation Usmerjenost besedila - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. To je usmerjenost besedila navpičnih mer. Privzeto je levo (po standardu ISO). - + Left (ISO standard) Levo (standard ISO) - + Right Desno - + Text spacing Razmik besedila - + The space between the dimension line and the dimension text Razmik med kotirno črto in besedilom mere - + Show the unit suffix in dimensions Prikaži pripono enot v merah - + Override unit Povozi enoto - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Če to polje pustite prazno, bodo mere kót prikazane v enotah, ki so trenutno nastavljene v FreeCAD-u, če pa želite vsiliti drugo enoto, npr. m ali cm, to vnesite v polje. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Nastavitve besedilne oblike - + Default ShapeString font file Privzeta datoteka pisave besedilne oblike - + Select a font file Izberite datoteko pisave @@ -3258,7 +3268,7 @@ ali poskusite shraniti v starejšo različico DWGja. Izbrane oblike morajo tvoriti ravnino - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5437,7 +5447,7 @@ Končni kót bo seštevek izhodiščnega in tega kóta. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5609,7 +5619,7 @@ z menija Orodja -> Upravljalnik vstavkov Line width - Debelina črte + Širina črte @@ -5731,12 +5741,12 @@ z menija Orodja -> Upravljalnik vstavkov ImportSVG - + Unknown SVG export style, switching to Translated Neznan slog izvažanja SVG, preklapljanje na Prevedeno - + The export list contains no object with a valid bounding box Izvozni seznam ne vsebuje predmetov z veljavnim mejnim kvadrom @@ -8143,7 +8153,7 @@ Use 'arch' to force US arch notation Arrow size - Velikost puščic + Velikost puščice diff --git a/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm b/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm index 5834f598a8..8b1027a059 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm and b/src/Mod/Draft/Resources/translations/Draft_sr-CS.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts b/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts index 651da15bcd..856977836f 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sr-CS.ts @@ -657,7 +657,7 @@ Ovo radi samo ako je "Umnožavanje veza" isključeno. Fuse - Unija + Spajanje @@ -964,7 +964,7 @@ promeniti korišćenjem tipki [ i ] tokom crtanja px - PX + px @@ -1135,12 +1135,12 @@ promeniti korišćenjem tipki [ i ] tokom crtanja Arrow - Strelica + Strela Tick - Kosa crta + Otkucaj @@ -1565,17 +1565,17 @@ Imaj na umu da ova opcija nije u potpunosti podržana i da se mnogi objekti neć Tekst i kote - + Text settings Podešavanje teksta - + Font family Familija fontova - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1586,184 +1586,194 @@ ili "mono", ili familija, kao što su "Arial,Helvetica,sans" ili ime sa stilom kao što su "Arial:Bold" - + Internal font Interni font - + Font size Veličina fonta - + Default height for texts and dimensions Podrazumevana visina za tekst i kote - - - - - - + + + + + + mm milimetar - + Dimension settings Podešavanje kota - + Display mode Režim prikaza - + World Svet - + Screen Ekran - + Number of decimals Broj decimala - + Extension lines size Dužina pomoćnih kotnih linija - + The default size of dimensions extension lines Podrazumevana dužina pomoćnih kotnih linija - + Extension line overshoot Produžetak pomoćne kotne linije - + The default length of extension line above dimension line Podrazumevani produžetak pomoćne kotne linije iznad kotne linije - + Dimension line overshoot Produžetak kotne linije - + The default distance the dimension line is extended past extension lines Podrazumevani produžetak kotne linije iza pomoćne kotne linije - + Arrows style Stil strelice - + Dot Tačka - + Circle Krug - + Arrow - Strela + Strelica - + Tick - Otkucaj + Kosa crta - + Tick-2 Kosa crta 2 - + Arrows size Veličina strelice - + The default size of arrows Podrazumevana veličina strelica - + Text orientation Orijentacija teksta - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Orijentacija kotnog broja kada su te kote vertikalne. Podrazumevano je levo, što je ISO standard. - + Left (ISO standard) Levo (ISO standard) - + Right Desno - + Text spacing Razmak u tekstu - + The space between the dimension line and the dimension text Razmak između kotne linije i kotnog broja - + Show the unit suffix in dimensions Prikaži jedinice iza kotnog broja - + Override unit Zameni jedinice - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Ako ovo polje ostaviš praznim, kote će biti prikazane u trenutno predefinisanim jedinicama u FreeCAD-u. Naznačavanjem jedinice ovde kao što je m ili cm, možeš naterati da se nove kote prikažu u toj jedinici. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Podešavanje tekstualnog oblika - + Default ShapeString font file Podrazumevani font Tekstualnog oblika - + Select a font file Izaberi datoteku fonta @@ -3253,7 +3263,7 @@ or try saving to a lower DWG version. Izabrani oblici moraju definisati ravan - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5432,7 +5442,7 @@ Krajnji ugao će biti početni ugao plus ovaj iznos. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5726,12 +5736,12 @@ iz menija Alati/Menadžer dodataka ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_sr.qm b/src/Mod/Draft/Resources/translations/Draft_sr.qm index d3c04a2d35..8164f26979 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sr.qm and b/src/Mod/Draft/Resources/translations/Draft_sr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sr.ts b/src/Mod/Draft/Resources/translations/Draft_sr.ts index 0f0b26abaf..5bd480a9f6 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sr.ts @@ -1565,17 +1565,17 @@ Note that this is not fully supported, and many object will be not editable with Текст и коте - + Text settings Подешавање текста - + Font family Фамилија фонтова - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1586,184 +1586,194 @@ such as "Arial:Bold" као што су "Arial:Bold" - + Internal font Интерни фонт - + Font size Величина фонта - + Default height for texts and dimensions Подразумевана висина за текст и коте - - - - - - + + + + + + mm мм - + Dimension settings Подешавање кота - + Display mode Режим приказа - + World Свет - + Screen Екран - + Number of decimals Број децимала - + Extension lines size Дужина помоћних котних линија - + The default size of dimensions extension lines Подразумевана дужина помоћних котних линија - + Extension line overshoot Продужетак помоћне котне линије - + The default length of extension line above dimension line Подразумевани продужетак помоћне котне линије изнад котне линије - + Dimension line overshoot Продужетак котне линије - + The default distance the dimension line is extended past extension lines Подразумевани продужетак котне линије иза помоћне котне линије - + Arrows style Стил стрелице - + Dot Тачка - + Circle Круг - + Arrow Cтрелица - + Tick Коса црта - + Tick-2 Коса црта 2 - + Arrows size Величина стрелице - + The default size of arrows Подразумевана величина стрелица - + Text orientation Оријентација текста - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Оријентација котног броја када су те коте вертикалне. Подразумевано је лево, што је ISO стандард. - + Left (ISO standard) Лево (ISO стандард) - + Right Сдесна - + Text spacing Размак у тексту - + The space between the dimension line and the dimension text Размак између котне линије и котног броја - + Show the unit suffix in dimensions Прикажи јединице иза котног броја - + Override unit Замени јединице - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Ако ово поље оставиш празним, коте ће бити приказане у тренутно предефинисаним јединицама у FreeCAD-у. Назначавањем јединице овде као што је м или цм, можеш натерати да се нове коте прикажу у тој јединици. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Подешавање Текстуалног облика - + Default ShapeString font file Подразумевани фонт Текстуалног облика - + Select a font file Изабери датотеку фонта @@ -3253,7 +3263,7 @@ or try saving to a lower DWG version. Изабрани облици морају дефинисати раван - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5432,7 +5442,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5726,12 +5736,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm b/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm index ae1e204a12..d9fae65a1b 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm and b/src/Mod/Draft/Resources/translations/Draft_sv-SE.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts b/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts index d51e15bbbc..000fb864d3 100644 --- a/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts +++ b/src/Mod/Draft/Resources/translations/Draft_sv-SE.ts @@ -1563,17 +1563,17 @@ Observera att detta inte stöds fullt ut, och många objekt kommer inte att kunn Texter och måttsättningar - + Text settings Textinställningar - + Font family Teckensnitt - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1584,184 +1584,194 @@ eller "mono", eller en familj som "Arial,Helvetica,sans" eller ett namn med en s som "Arial:Bold" - + Internal font Internt teckensnitt - + Font size Teckenstorlek - + Default height for texts and dimensions Standardhöjd för texter och dimensioner - - - - - - + + + + + + mm mm - + Dimension settings Måttsättningsinställningar - + Display mode Visningsläge - + World Värld - + Screen Skärm - + Number of decimals Antal decimaler - + Extension lines size Tjocklek på förlängningslinjer - + The default size of dimensions extension lines Standardtjockleken för måttsättningars förlängningslinjer - + Extension line overshoot Överskjut på förlängningslinje - + The default length of extension line above dimension line Standardlängden som förlängningslinjer förlängs efter måttsättningslinje - + Dimension line overshoot Överskjut på måttsättningslinje - + The default distance the dimension line is extended past extension lines Standardlängden som måttsättningslinjer förlängs efter förlängningslinjer - + Arrows style Pilstil - + Dot Punkt - + Circle Cirkel - + Arrow Pil - + Tick Bock - + Tick-2 Bock-2 - + Arrows size Pilarnas storlek - + The default size of arrows Standardstorleken på pilar - + Text orientation Textriktning - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Detta är dimensionstextens placering när dimensionerna är vertikala. Standard är vänster, vilket är ISO standard - + Left (ISO standard) Vänster (ISO standard) - + Right Höger - + Text spacing Textavstånd - + The space between the dimension line and the dimension text Avståndet mellan måttsättningsraden och måttsättningstexten - + Show the unit suffix in dimensions Visa enhetssuffix i måttsättningar - + Override unit Åsidosätt enhet - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Genom att lämna det här fältet tomt kommer måtten att visas i den nuvarande enheten som definieras i FreeCAD. Genom att ange en enhet här som m eller cm kan du tvinga fram nya mått som ska visas i den enheten. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Textformsinställningar - + Default ShapeString font file Standardteckensnittsfil för textform - + Select a font file Välj en teckensnittsfil @@ -3251,7 +3261,7 @@ eller försök spara till en lägre DWG-version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5430,7 +5440,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5724,12 +5734,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_tr.qm b/src/Mod/Draft/Resources/translations/Draft_tr.qm index 6b3b5397bf..f6950aaca2 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_tr.qm and b/src/Mod/Draft/Resources/translations/Draft_tr.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_tr.ts b/src/Mod/Draft/Resources/translations/Draft_tr.ts index ee9a8d1ae9..4394e29040 100644 --- a/src/Mod/Draft/Resources/translations/Draft_tr.ts +++ b/src/Mod/Draft/Resources/translations/Draft_tr.ts @@ -1567,17 +1567,17 @@ Bunun tam olarak desteklenmediğini ve birçok nesnenin Taslak Değiştiricilerl Metinler ve ölçüler - + Text settings Metin ayarları - + Font family Yazı tipi - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1586,184 +1586,194 @@ such as "Arial:Bold" Bu değer, "Arial", varsayılan stiller "sans", "serif" veya "mono", veya aile adı olarak "Arial,Helvetica,sans", veya stil ile herhangi bir ad "Arial:Bold" gibi yazı tipi değerleri alabilir. - + Internal font İç yazı tipi - + Font size Yazı Boyutu - + Default height for texts and dimensions Metinler ve boyutlar için kullanılacak yazı tipi - - - - - - + + + + + + mm mm - + Dimension settings Boyut ayarları - + Display mode Ekran kipi - + World Dünya - + Screen Ekran - + Number of decimals Ondalık basamak sayısı - + Extension lines size Uzatma çizgileri boyutu - + The default size of dimensions extension lines Boyutları uzantı çizgileri varsayılan boyutu - + Extension line overshoot Uzatma çizgisi aşımı - + The default length of extension line above dimension line Ölçülendirme çizgisinin üzerindeki varsayılan uzantı hattı mesafesi - + Dimension line overshoot Ölçülendirme çizgisi aşımı - + The default distance the dimension line is extended past extension lines Varsayılan ölçülendirme çizgisi mesafesi, uzantı hatlarını geçecek şekilde genişletilir - + Arrows style Okların biçimi - + Dot Nokta - + Circle Daire - + Arrow Ok İşareti - + Tick işaretleme - + Tick-2 Tik-2 - + Arrows size Okların boyutu - + The default size of arrows Ok İşaretleri varsayılan boyutu - + Text orientation Metin yönlendirmesi - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Bu, boyutlar dikey olduğunda boyut yazılarının yönüdür. Varsayılan ISO standardı olarak Soldur. - + Left (ISO standard) Sol (ISO standardı) - + Right Sağ - + Text spacing Birim Aralığı - + The space between the dimension line and the dimension text Ölçü metni ile ölçü çizgisi arasındaki boşluk mesafesi - + Show the unit suffix in dimensions Boyutları içinde birim soneki göster - + Override unit Geçersiz kılma birimi - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Bu alanın boş bırakılmasıyla, boyut ölçümleri FreeCAD' teki mevcut tanımlı birimde gösterilecek. Buraya m veya cm olarak bir birim girilmesiyle, yeni boyutların o birimde gösterilmesini zorlayabilirsiniz. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings ShapeString ayarları - + Default ShapeString font file Varsayılan ShapeString yazı tipi dosyası - + Select a font file Grip Dosyasını Seçin @@ -3254,7 +3264,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5433,7 +5443,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5727,12 +5737,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_uk.qm b/src/Mod/Draft/Resources/translations/Draft_uk.qm index 7f436f34d9..5a140c3870 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_uk.qm and b/src/Mod/Draft/Resources/translations/Draft_uk.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_uk.ts b/src/Mod/Draft/Resources/translations/Draft_uk.ts index e4f7ca35b7..5d6b0a86a2 100644 --- a/src/Mod/Draft/Resources/translations/Draft_uk.ts +++ b/src/Mod/Draft/Resources/translations/Draft_uk.ts @@ -1568,17 +1568,17 @@ make Shell Тексти та розміри - + Text settings Налаштування тексту - + Font family Гарнітура - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1589,184 +1589,194 @@ such as "Arial:Bold" стилем - як "Arial:Bold" - + Internal font Вбудований шрифт - + Font size Розмір шрифту - + Default height for texts and dimensions Стандартна висота для тексту та розмірів - - - - - - + + + + + + mm мм - + Dimension settings Налаштування розмірів - + Display mode Режим відображення - + World Світ - + Screen Екран - + Number of decimals Кількість десяткових знаків - + Extension lines size Розмір виносних ліній - + The default size of dimensions extension lines Розмір виносних ліній за замовчуванням - + Extension line overshoot Розширення виносної лінії - + The default length of extension line above dimension line Довжина за замовчуванням подовжувальної лінії вище розмірної лінії - + Dimension line overshoot Перевищення розмірної лінії - + The default distance the dimension line is extended past extension lines Відстань за замовчуванням, розмірна лінія продовжена за виносні лінії - + Arrows style Стиль стрілок - + Dot Крапка - + Circle Коло - + Arrow Стрілка - + Tick Позначка - + Tick-2 Тік-2 - + Arrows size Розмір стрілок - + The default size of arrows Розмір стрілок за замовчуванням - + Text orientation Орієнтація тексту - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Це орієнтація текстів розмірів, коли ці розміри вертикальні. За замовчуванням - стандарт ISO. - + Left (ISO standard) Наліво (стандарт ISO) - + Right Направо - + Text spacing Інтервал тексту - + The space between the dimension line and the dimension text Відстань між розмірною лінією та текстом - + Show the unit suffix in dimensions Показати суфікс одиниці у розмірах - + Override unit Перевизначити одиницю - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. Якщо залишити це поле порожнім, розміри буде показано в поточній одиниці, визначеній у FreeCAD. Додаючи сюди одиниці вимірювання, наприклад m або см, ви можете змусити нові розміри показуватися в цій одиниці. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Налаштування Контуру рядка - + Default ShapeString font file Файл шрифту ShapeString за замовчуванням - + Select a font file Обрати файл шрифту @@ -3258,7 +3268,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5437,7 +5447,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5731,12 +5741,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box @@ -5848,7 +5858,7 @@ will be used to provide information to the label. Hatch - Штрихування + Hatch @@ -8174,7 +8184,7 @@ past the extension lines Length of the extension lines - Довжина виносних ліній + Length of the extension lines diff --git a/src/Mod/Draft/Resources/translations/Draft_val-ES.qm b/src/Mod/Draft/Resources/translations/Draft_val-ES.qm index 7d6109132e..c85fe484b0 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_val-ES.qm and b/src/Mod/Draft/Resources/translations/Draft_val-ES.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_val-ES.ts b/src/Mod/Draft/Resources/translations/Draft_val-ES.ts index 9b81fe1509..b6cd0ebca4 100644 --- a/src/Mod/Draft/Resources/translations/Draft_val-ES.ts +++ b/src/Mod/Draft/Resources/translations/Draft_val-ES.ts @@ -1553,17 +1553,17 @@ Tingueu en compte que això no és totalment compatible i que molts objectes no Textos i dimensions - + Text settings Paràmetres del text - + Font family Tipus lletra - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1571,184 +1571,194 @@ such as "Arial:Bold" Aquest és el nom de tipus de lletra predeterminada per a tots els textos d'esborrany i dimensions. Pot ser un nom de lletra com "Arial", un estil per defecte com "sans", "serif" o "mono" o una família com «Arial, Helvètica sans "o un nom amb un estil com «Arial: negreta" - + Internal font Tipus de lletra interna - + Font size Mida del tipus de lletra - + Default height for texts and dimensions Alçària predeterminada per a textos i dimensions - - - - - - + + + + + + mm mm - + Dimension settings Paràmetres de dimensió - + Display mode Mode de visualització - + World Món - + Screen Screen - + Number of decimals Nombre de decimals - + Extension lines size Mida de les línies d'extensió - + The default size of dimensions extension lines La mida per defecte de les línies d'extensió de cotes - + Extension line overshoot Superació de la línia d'extensió - + The default length of extension line above dimension line La llargària per defecte de l'extensió de la línia per damunt de la línia de dimensió - + Dimension line overshoot Superació de la línia de dimensió - + The default distance the dimension line is extended past extension lines La distància per defecte de la línia de de dimensió s'estén més enllà de les línies d'extensió - + Arrows style Estil de fletxes - + Dot Punt - + Circle Cercle - + Arrow Fletxa - + Tick Tick - + Tick-2 Tick-2 - + Arrows size Mida de les fletxes - + The default size of arrows La mida per defecte de les fletxes - + Text orientation Orientació del text - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. Açò és l'orientació dels dels textos de les cotes quan aquestes cotes són verticals. Per defecte està a l'esquerra, que és l'estàndard ISO. - + Left (ISO standard) Esquerra (norma ISO) - + Right Dreta - + Text spacing Espaiat de text - + The space between the dimension line and the dimension text L'espai entre la línia de la dimensió i el text de la cota - + Show the unit suffix in dimensions Mostra el sufix d'unitat en dimensions - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings Paràmetres del Textforma, ShapeString - + Default ShapeString font file Fitxer de tipus de lletra per defecte de Textforma, ShapeString - + Select a font file Seleccioneu un fitxer de tipus de lletra @@ -3229,7 +3239,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5408,7 +5418,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5702,12 +5712,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm b/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm index 315acb055b..e09f63a838 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm and b/src/Mod/Draft/Resources/translations/Draft_zh-CN.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts b/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts index 148c768d9e..54184687b2 100644 --- a/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts +++ b/src/Mod/Draft/Resources/translations/Draft_zh-CN.ts @@ -1558,17 +1558,17 @@ Note that this is not fully supported, and many object will be not editable with 文字和尺寸 - + Text settings 文本设置 - + Font family 字体系列 - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1576,184 +1576,194 @@ such as "Arial:Bold" 所有绘图文字及尺寸标注的默认字体名称.如:字体名称"Arial",默认样式"sans","serif"或"mono",或组合"Arial,Helvetica,sans"或包含名称和样式"Arial:Bold" - + Internal font 内部字体 - + Font size 字体大小 - + Default height for texts and dimensions 文本及尺寸标注的默认高度 - - - - - - + + + + + + mm mm - + Dimension settings 尺寸设置 - + Display mode 显示模式 - + World 世界 - + Screen 屏幕 - + Number of decimals 小数位数 - + Extension lines size 延伸线尺寸 - + The default size of dimensions extension lines 默认尺寸延伸线的大小 - + Extension line overshoot 延长线过度 - + The default length of extension line above dimension line 尺寸线上方延长线的默认长度 - + Dimension line overshoot 尺寸线过度 - + The default distance the dimension line is extended past extension lines 尺寸线延伸到延长线之后的默认距离 - + Arrows style 箭头样式 - + Dot - + Circle - + Arrow 箭头 - + Tick 刻度 - + Tick-2 刻度-2 - + Arrows size 箭头大小 - + The default size of arrows 默认的箭头的大小 - + Text orientation 文本方向 - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. 垂直尺寸标注的文字方向.默认为左(ISO标准). - + Left (ISO standard) 左(ISO标准) - + Right - + Text spacing 文字间距 - + The space between the dimension line and the dimension text 尺寸线和尺寸文本之间的距离 - + Show the unit suffix in dimensions 在尺寸标注中显示单位 - + Override unit Override unit - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings 字串造型产生器设置 - + Default ShapeString font file 默认字串造型产生器字体文件 - + Select a font file 选择一个字体文件 @@ -3246,7 +3256,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5425,7 +5435,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5719,12 +5729,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm b/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm index a44b252d38..96abe873ac 100644 Binary files a/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm and b/src/Mod/Draft/Resources/translations/Draft_zh-TW.qm differ diff --git a/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts b/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts index 6b0c8a4304..02c7d93088 100644 --- a/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts +++ b/src/Mod/Draft/Resources/translations/Draft_zh-TW.ts @@ -435,8 +435,8 @@ This only works if "Link array" is off. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. - If checked, the resulting object will be a "Link array" instead of a regular array. -A Link array is more efficient when creating multiple copies, but it cannot be fused together. + 若被勾選,其結果物件將是一個“鏈接陣列”,而不是一個常規陣列。 +鏈接陣列在創建多個副本時更有效,但不能融合在一起。 @@ -567,8 +567,8 @@ This only works if "Link array" is off. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. - If checked, the resulting object will be a "Link array" instead of a regular array. -A Link array is more efficient when creating multiple copies, but it cannot be fused together. + 若被勾選,其結果物件將是一個“鏈接陣列”,而不是一個常規陣列。 +鏈接陣列在創建多個副本時更有效,但不能融合在一起。 @@ -664,8 +664,8 @@ This only works if "Link array" is off. If checked, the resulting object will be a "Link array" instead of a regular array. A Link array is more efficient when creating multiple copies, but it cannot be fused together. - If checked, the resulting object will be a "Link array" instead of a regular array. -A Link array is more efficient when creating multiple copies, but it cannot be fused together. + 若被勾選,其結果物件將是一個“鏈接陣列”,而不是一個常規陣列。 +鏈接陣列在創建多個副本時更有效,但不能融合在一起。 @@ -966,7 +966,7 @@ value by using the [ and ] keys while drawing px - 像素 + px @@ -1567,17 +1567,17 @@ Note that this is not fully supported, and many object will be not editable with 文字和尺寸 - + Text settings 文字設定 - + Font family 字型家族 - + This is the default font name for all Draft texts and dimensions. It can be a font name such as "Arial", a default style such as "sans", "serif" or "mono", or a family such as "Arial,Helvetica,sans" or a name with a style @@ -1585,184 +1585,194 @@ such as "Arial:Bold" 這是所有底圖文字和標註的預設字體名稱。如"Arial"、預設樣式如"san"、"serif"或"mono"或一個家族""Arial,Helvetica,sans"或名稱的樣式如"arial:粗體" - + Internal font 內部字型 - + Font size 字型尺寸 - + Default height for texts and dimensions 預設文字和標註高度 - - - - - - + + + + + + mm mm - + Dimension settings 尺寸設定 - + Display mode 顯示模式 - + World 世界 - + Screen Screen - + Number of decimals Number of decimals - + Extension lines size Extension lines size - + The default size of dimensions extension lines 標註延長線預設大小 - + Extension line overshoot Extension line overshoot - + The default length of extension line above dimension line The default length of extension line above dimension line - + Dimension line overshoot 尺寸線超越量 - + The default distance the dimension line is extended past extension lines The default distance the dimension line is extended past extension lines - + Arrows style 箭頭樣式 - + Dot - + Circle - + Arrow 箭頭 - + Tick Tick - + Tick-2 Tick-2 - + Arrows size 箭頭尺寸 - + The default size of arrows 箭頭預設尺寸 - + Text orientation 文字方向 - + This is the orientation of the dimension texts when those dimensions are vertical. Default is left, which is the ISO standard. 當尺度為垂直時,此為尺度文字方向,預設為左且為ISO標準 - + Left (ISO standard) 左側(ISO標準) - + Right 右視圖 - + Text spacing 文字間距 - + The space between the dimension line and the dimension text 標註線與文字間的距離 - + Show the unit suffix in dimensions 於標註中顯示單位 - + Override unit 覆蓋單位 - + By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. By leaving this field blank, the dimension measurements will be shown in the current unit defined in FreeCAD. By indicating a unit here such as m or cm, you can force new dimensions to be shown in that unit. - + + Feet separator + Feet separator + + + + Optional string to appear between the feet and inches values in dimensions + Optional string to appear between the feet and inches values in dimensions + + + ShapeString settings 字串造型產生器設定 - + Default ShapeString font file 預設字串造型產生器字型檔 - + Select a font file 選擇一個字型檔 @@ -3253,7 +3263,7 @@ or try saving to a lower DWG version. Selected Shapes must define a plane - + The DXF import/export libraries needed by FreeCAD to handle the DXF format were not found on this system. Please either enable FreeCAD to download these libraries: @@ -5432,7 +5442,7 @@ The final angle will be the base angle plus this amount. Draft - + Download of dxf libraries failed. Please install the dxf Library addon manually from menu Tools -> Addon Manager @@ -5726,12 +5736,12 @@ from menu Tools -> Addon Manager ImportSVG - + Unknown SVG export style, switching to Translated Unknown SVG export style, switching to Translated - + The export list contains no object with a valid bounding box The export list contains no object with a valid bounding box @@ -6858,8 +6868,8 @@ A 'Link array' is more efficient when handling many copies but the 'Fuse' option Creates a clone of the selected objects. The resulting clone can be scaled in each of its three directions. - Creates a clone of the selected objects. -The resulting clone can be scaled in each of its three directions. + 創建所選物件的複製品。 +生成的複製品可以在其三個方向中進行縮放。 @@ -7841,10 +7851,9 @@ The arc is drawn counter-clockwise. This is normally the point where two line segments, or their extensions intersect, resulting in the measured 'Angle' between them. - The center point of the dimension line, which is a circular arc. + 標註線的中心點,這是一個圓弧。 -This is normally the point where two line segments, or their extensions -intersect, resulting in the measured 'Angle' between them. +通常,這是兩條直線段或它們的延伸相交的點,從而形成它們之間的測量'角度'。 diff --git a/src/Mod/Draft/Resources/ui/TaskShapeString.ui b/src/Mod/Draft/Resources/ui/TaskShapeString.ui index fc6f2d9c42..8ce8e2bcd7 100644 --- a/src/Mod/Draft/Resources/ui/TaskShapeString.ui +++ b/src/Mod/Draft/Resources/ui/TaskShapeString.ui @@ -178,7 +178,11 @@
- + + + Font files (*.ttf *.otf *.pfb) + + diff --git a/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui b/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui index ced8087ba0..9f8d462ebe 100644 --- a/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui +++ b/src/Mod/Draft/Resources/ui/preferences-drafttexts.ui @@ -576,6 +576,9 @@ such as "Arial:Bold" 0 + + Font files (*.ttf *.otf *.pfb) + Select a font file diff --git a/src/Mod/Draft/Resources/ui/preferences-draftvisual.ui b/src/Mod/Draft/Resources/ui/preferences-draftvisual.ui index 843ab20a49..6019fc04d1 100644 --- a/src/Mod/Draft/Resources/ui/preferences-draftvisual.ui +++ b/src/Mod/Draft/Resources/ui/preferences-draftvisual.ui @@ -182,6 +182,9 @@ 0 + + Gui::FileChooser::Directory + Here you can specify a directory with custom SVG files containing <pattern> definitions to be added to the standard patterns diff --git a/src/Mod/Draft/WorkingPlane.py b/src/Mod/Draft/WorkingPlane.py index 1be1c388cf..44c5a1d739 100644 --- a/src/Mod/Draft/WorkingPlane.py +++ b/src/Mod/Draft/WorkingPlane.py @@ -1,5 +1,6 @@ # *************************************************************************** # * Copyright (c) 2009, 2010 Ken Cline * +# * Copyright (c) 2023 FreeCAD Project Association * # * * # * This program is free software; you can redistribute it and/or modify * # * it under the terms of the GNU Lesser General Public License (LGPL) * @@ -52,6 +53,544 @@ __author__ = "Ken Cline" __url__ = "https://www.freecad.org" +class PlaneBase: + """PlaneBase is the base class for the Plane class and the PlaneGui class. + + Parameters + ---------- + u: Base.Vector or WorkingPlane.PlaneBase, optional + Defaults to Vector(1, 0, 0). + If a WP is provided: + A copy of the WP is created, all other parameters are then ignored. + If a vector is provided: + Unit vector for the `u` attribute (+X axis). + + v: Base.Vector, optional + Defaults to Vector(0, 1, 0). + Unit vector for the `v` attribute (+Y axis). + + w: Base.Vector, optional + Defaults to Vector(0, 0, 1). + Unit vector for the `axis` attribute (+Z axis). + + pos: Base.Vector, optional + Defaults to Vector(0, 0, 0). + Vector for the `position` attribute (origin). + + Note that the u, v and w vectors are not checked for validity. + """ + + def __init__(self, + u=Vector(1, 0, 0), v=Vector(0, 1, 0), w=Vector(0, 0, 1), + pos=Vector(0, 0, 0)): + + if isinstance(u, PlaneBase): + self.match(u) + return + self.u = Vector(u) + self.v = Vector(v) + self.axis = Vector(w) + self.position = Vector(pos) + + def __repr__(self): + text = "Workplane" + text += " x=" + str(DraftVecUtils.rounded(self.u)) + text += " y=" + str(DraftVecUtils.rounded(self.v)) + text += " z=" + str(DraftVecUtils.rounded(self.axis)) + text += " pos=" + str(DraftVecUtils.rounded(self.position)) + return text + + def copy(self): + """Return a new WP that is a copy of the present object.""" + wp = PlaneBase() + self.match(source=self, target=wp) + return wp + + def _copy_value(self, val): + """Return a copy of a value, primarily required for vectors.""" + return val.__class__(val) + + def match(self, source, target=None): + """Match the main properties of two working planes. + + Parameters + ---------- + source: WP object + WP to copy properties from. + target: WP object, optional + Defaults to `None`. + WP to copy properties to. If `None` the present object is used. + """ + if target is None: + target = self + for prop in self._get_prop_list(): + setattr(target, prop, self._copy_value(getattr(source, prop))) + + def get_parameters(self): + """Return a data dictionary with the main properties of the WP.""" + data = {} + for prop in self._get_prop_list(): + data[prop] = self._copy_value(getattr(self, prop)) + return data + + def set_parameters(self, data): + """Set the main properties of the WP according to a data dictionary.""" + for prop in self._get_prop_list(): + setattr(self, prop, self._copy_value(data[prop])) + + def align_to_3_points(self, p1, p2, p3, offset=0): + """Align the WP to 3 points with an optional offset. + + The points must define a plane. + + Parameters + ---------- + p1: Base.Vector + New WP `position`. + p2: Base.Vector + Point on the +X axis. (p2 - p1) defines the WP `u` axis. + p3: Base.Vector + Defines the plane. + offset: float, optional + Defaults to zero. + Offset along the WP `axis`. + + Returns + ------- + `True`/`False` + `True` if successful. + """ + return self.align_to_edge_or_wire(Part.makePolygon([p1, p2, p3]), offset) + + def align_to_edges_vertexes(self, shapes, offset=0): + """Align the WP to the endpoints of edges and/or the points of vertexes + with an optional offset. + + The points must define a plane. + + The first 2 points define the WP `position` and `u` axis. + + Parameters + ---------- + shapes: iterable + One or more edges and/or vertexes. + offset: float, optional + Defaults to zero. + Offset along the WP `axis`. + + Returns + ------- + `True`/`False` + `True` if successful. + """ + points = [vert.Point for shape in shapes for vert in shape.Vertexes] + if len(points) < 2: + return False + return self.align_to_edge_or_wire(Part.makePolygon(points), offset) + + def align_to_edge_or_wire(self, shape, offset=0): + """Align the WP to an edge or wire with an optional offset. + + The shape must define a plane. + + If the shape is an edge with a `Center` then that defines the WP + `position`. The vector between the center and its start point then + defines the WP `u` axis. + + In other cases the start point of the first edge defines the WP + `position` and the 1st derivative at that point the WP `u` axis. + + Parameters + ---------- + shape: Part.Edge or Part.Wire + Edge or wire. + offset: float, optional + Defaults to zero. + Offset along the WP `axis`. + + Returns + ------- + `True`/`False` + `True` if successful. + """ + tol = 1e-7 + plane = shape.findPlane() + if plane is None: + return False + self.axis = plane.Axis + if shape.ShapeType == "Edge" and hasattr(shape.Curve, "Center"): + pos = shape.Curve.Center + vec = shape.Vertexes[0].Point - pos + if vec.Length > tol: + self.u = vec + self.u.normalize() + self.v = self.axis.cross(self.u) + else: + self.u, self.v, _ = self._axes_from_rotation(plane.Rotation) + elif shape.Edges[0].Length > tol: + pos = shape.Vertexes[0].Point + self.u = shape.Edges[0].derivative1At(0) + self.u.normalize() + self.v = self.axis.cross(self.u) + else: + pos = shape.Vertexes[0].Point + self.u, self.v, _ = self._axes_from_rotation(plane.Rotation) + self.position = pos + (self.axis * offset) + return True + + def align_to_face(self, shape, offset=0): + """Align the WP to a face with an optional offset. + + The face must be planar. + + The center of gravity of the face defines the WP `position` and the + normal of the face the WP `axis`. The WP `u` and `v` vectors are + determined by the DraftGeomUtils.uv_vectors_from_face function. + See there. + + Parameters + ---------- + shape: Part.Face + Face. + offset: float, optional + Defaults to zero. + Offset along the WP `axis`. + + Returns + ------- + `True`/`False` + `True` if successful. + """ + if shape.Surface.isPlanar() is False: + return False + place = DraftGeomUtils.placement_from_face(shape) + self.u, self.v, self.axis = self._axes_from_rotation(place.Rotation) + self.position = place.Base + (self.axis * offset) + return True + + def align_to_placement(self, place, offset=0): + """Align the WP to a placement with an optional offset. + + Parameters + ---------- + place: Base.Placement + Placement. + offset: float, optional + Defaults to zero. + Offset along the WP `axis`. + + Returns + ------- + `True` + """ + self.u, self.v, self.axis = self._axes_from_rotation(place.Rotation) + self.position = place.Base + (self.axis * offset) + return True + + def align_to_point_and_axis(self, point, axis, offset=0, upvec=Vector(1, 0, 0)): + """Align the WP to a point and an axis with an optional offset and an + optional up-vector. + + If the axis and up-vector are parallel the FreeCAD.Rotation algorithm + will replace the up-vector: Vector(0, 0, 1) is tried first, then + Vector(0, 1, 0), and finally Vector(1, 0, 0). + + Parameters + ---------- + point: Base.Vector + New WP `position`. + axis: Base.Vector + New WP `axis`. + offset: float, optional + Defaults to zero. + Offset along the WP `axis`. + upvec: Base.Vector, optional + Defaults to Vector(1, 0, 0). + Up-vector. + + Returns + ------- + `True` + """ + tol = 1e-7 + if axis.Length < tol: + return False + if upvec.Length < tol: + return False + axis = Vector(axis).normalize() + upvec = Vector(upvec).normalize() + if axis.isEqual(upvec, tol) or axis.isEqual(upvec.negative(), tol): + upvec = axis + rot = FreeCAD.Rotation(Vector(), upvec, axis, "ZYX") + self.u, self.v, _ = self._axes_from_rotation(rot) + self.axis = axis + self.position = point + (self.axis * offset) + return True + + def align_to_point_and_axis_svg(self, point, axis, offset=0): + """Align the WP to a point and an axis with an optional offset. + + It aligns `u` and `v` based on the magnitude of the components + of `axis`. + + Parameters + ---------- + point: Base.Vector + The new `position` of the plane, adjusted by + the `offset`. + axis: Base.Vector + A vector whose unit vector will be used as the new `axis` + of the plane. + The magnitudes of the `x`, `y`, `z` components of the axis + determine the orientation of `u` and `v` of the plane. + offset: float, optional + Defaults to zero. A value which will be used to offset + the plane in the direction of its `axis`. + + Returns + ------- + `True` + + Cases + ----- + The `u` and `v` are always calculated the same + + * `u` is the cross product of the positive or negative of `axis` + with a `reference vector`. + :: + u = [+1|-1] axis.cross(ref_vec) + * `v` is `u` rotated 90 degrees around `axis`. + + Whether the `axis` is positive or negative, and which reference + vector is used, depends on the absolute values of the `x`, `y`, `z` + components of the `axis` unit vector. + + #. If `x > y`, and `y > z` + The reference vector is +Z + :: + u = -1 axis.cross(+Z) + #. If `y > z`, and `z >= x` + The reference vector is +X. + :: + u = -1 axis.cross(+X) + #. If `y >= x`, and `x > z` + The reference vector is +Z. + :: + u = +1 axis.cross(+Z) + #. If `x > z`, and `z >= y` + The reference vector is +Y. + :: + u = +1 axis.cross(+Y) + #. If `z >= y`, and `y > x` + The reference vector is +X. + :: + u = +1 axis.cross(+X) + #. otherwise + The reference vector is +Y. + :: + u = -1 axis.cross(+Y) + """ + self.axis = Vector(axis).normalize() + ref_vec = Vector(0.0, 1.0, 0.0) + + if ((abs(axis.x) > abs(axis.y)) and (abs(axis.y) > abs(axis.z))): + ref_vec = Vector(0.0, 0., 1.0) + self.u = axis.negative().cross(ref_vec) + self.u.normalize() + self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) + # projcase = "Case new" + + elif ((abs(axis.y) > abs(axis.z)) and (abs(axis.z) >= abs(axis.x))): + ref_vec = Vector(1.0, 0.0, 0.0) + self.u = axis.negative().cross(ref_vec) + self.u.normalize() + self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) + # projcase = "Y>Z, View Y" + + elif ((abs(axis.y) >= abs(axis.x)) and (abs(axis.x) > abs(axis.z))): + ref_vec = Vector(0.0, 0., 1.0) + self.u = axis.cross(ref_vec) + self.u.normalize() + self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) + # projcase = "ehem. XY, Case XY" + + elif ((abs(axis.x) > abs(axis.z)) and (abs(axis.z) >= abs(axis.y))): + self.u = axis.cross(ref_vec) + self.u.normalize() + self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) + # projcase = "X>Z, View X" + + elif ((abs(axis.z) >= abs(axis.y)) and (abs(axis.y) > abs(axis.x))): + ref_vec = Vector(1.0, 0., 0.0) + self.u = axis.cross(ref_vec) + self.u.normalize() + self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) + # projcase = "Y>X, Case YZ" + + else: + self.u = axis.negative().cross(ref_vec) + self.u.normalize() + self.v = DraftVecUtils.rotate(self.u, math.pi/2, self.axis) + # projcase = "else" + + # spat_vec = self.u.cross(self.v) + # spat_res = spat_vec.dot(axis) + # Console.PrintMessage(projcase + " spat Prod = " + str(spat_res) + "\n") + + offsetVector = Vector(axis) + offsetVector.multiply(offset) + self.position = point.add(offsetVector) + + return True + + def get_global_coords(self, point, as_vector=False): + """Translate a point or vector from the local (WP) coordinate system to + the global coordinate system. + + Parameters + ---------- + point: Base.Vector + Point. + as_vector: bool, optional + Defaults to `False`. + If `True` treat point as a vector. + + Returns + ------- + Base.Vector + """ + pos = Vector() if as_vector else self.position + mtx = FreeCAD.Matrix(self.u, self.v, self.axis, pos) + return mtx.multVec(point) + + def get_local_coords(self, point, as_vector=False): + """Translate a point or vector from the global coordinate system to + the local (WP) coordinate system. + + Parameters + ---------- + point: Base.Vector + Point. + as_vector: bool, optional + Defaults to `False`. + If `True` treat point as a vector. + + Returns + ------- + Base.Vector + """ + pos = Vector() if as_vector else self.position + mtx = FreeCAD.Matrix(self.u, self.v, self.axis, pos) + return mtx.inverse().multVec(point) + + def get_closest_axis(self, vec): + """Return a string indicating the positive or negative WP axis closest + to a vector. + + Parameters + ---------- + vec: Base.Vector + Vector. + + Returns + ------- + str + `"x"`, `"y"` or `"z"`. + """ + xyz = list(self.get_local_coords(vec, as_vector=True)) + x, y, z = [abs(coord) for coord in xyz] + if x >= y and x >= z: + return "x" + elif y >= x and y >= z: + return "y" + else: + return "z" + + def get_placement(self): + """Return a placement calculated from the WP.""" + return FreeCAD.Placement(self.position, FreeCAD.Rotation(self.u, self.v, self.axis, "ZYX")) + + def is_global(self): + """Return `True` if the WP matches the global coordinate system exactly.""" + return self.u == Vector(1, 0, 0) \ + and self.v == Vector(0, 1, 0) \ + and self.axis == Vector(0, 0, 1) \ + and self.position == Vector() + + def is_ortho(self): + """Return `True` if all WP axes are parallel to a global axis.""" + rot = FreeCAD.Rotation(self.u, self.v, self.axis, "ZYX") + ypr = [round(ang, 6) for ang in rot.getYawPitchRoll()] + return all([ang%90 == 0 for ang in ypr]) + + def project_point(self, point, direction=None, force_projection=True): + """Project a point onto the WP and return the global coordinates of the + projected point. + + Parameters + ---------- + point: Base.Vector + Point to project. + direction: Base.Vector, optional + Defaults to `None` in which case the WP `axis` is used. + Direction of projection. + force_projection: Bool, optional + Defaults to `True`. + See DraftGeomUtils.project_point_on_plane + + Returns + ------- + Base.Vector + """ + return DraftGeomUtils.project_point_on_plane(point, + self.position, + self.axis, + direction, + force_projection) + + def set_to_top(self, offset=0): + """Sets the WP to the top position with an optional offset.""" + self.u = Vector(1, 0, 0) + self.v = Vector(0, 1, 0) + self.axis = Vector(0, 0, 1) + self.position = self.axis * offset + + def set_to_front(self, offset=0): + """Sets the WP to the front position with an optional offset.""" + self.u = Vector(1, 0, 0) + self.v = Vector(0, 0, 1) + self.axis = Vector(0, -1, 0) + self.position = self.axis * offset + + def set_to_side(self, offset=0): + """Sets the WP to the right side position with an optional offset.""" + self.u = Vector(0, 1, 0) + self.v = Vector(0, 0, 1) + self.axis = Vector(1, 0, 0) + self.position = self.axis * offset + + def _axes_from_rotation(self, rot): + """Return a tuple with the `u`, `v` and `axis` vectors from a Base.Rotation.""" + mtx = rot.toMatrix() + return mtx.col(0), mtx.col(1), mtx.col(2) + + def _axes_from_view_rotation(self, rot): + """Return a tuple with the `u`, `v` and `axis` vectors from a Base.Rotation + derived from a view. The Yaw, Pitch and Roll angles are rounded if they are + near multiples of 45 degrees. + """ + ypr = [round(ang, 3) for ang in rot.getYawPitchRoll()] + if all([ang%45 == 0 for ang in ypr]): + rot.setEulerAngles("YawPitchRoll", *ypr) + return self._axes_from_rotation(rot) + + def _get_prop_list(self): + return ["u", + "v", + "axis", + "position"] + + class Plane: """A WorkPlane object. diff --git a/src/Mod/Draft/draftgeoutils/geometry.py b/src/Mod/Draft/draftgeoutils/geometry.py index f25f1eb62e..329e819e5f 100644 --- a/src/Mod/Draft/draftgeoutils/geometry.py +++ b/src/Mod/Draft/draftgeoutils/geometry.py @@ -529,8 +529,8 @@ def mirror_matrix(mtx, pos, nor): nor: Base::Vector3 Normal of mirror plane. - Return - ------ + Returns + ------- Base::Matrix """ # Code by Jolbas: @@ -563,8 +563,8 @@ def uv_vectors_from_face(face, vec_z=App.Vector(0, 0, 1), tol=-1): Defaults to -1. Internal tolerance. 1e-7 is used if tol <=0. - Return - ------ + Returns + ------- tuple U and v vector (Base::Vector3). """ @@ -608,8 +608,8 @@ def placement_from_face(face, vec_z=App.Vector(0, 0, 1), rotated=False, tol=-1): Defaults to -1. Internal tolerance. 1e-7 is used if tol <=0. - Return - ------ + Returns + ------- Base::Placement See also @@ -645,8 +645,8 @@ def placement_from_points(pt_pos, pt_x, pt_y, as_vectors=False, tol=-1): Defaults to -1. Internal tolerance. 1e-7 is used if tol <=0. - Return - ------ + Returns + ------- Base::Placement See also @@ -675,6 +675,79 @@ def placement_from_points(pt_pos, pt_x, pt_y, as_vectors=False, tol=-1): return App.Placement(pt_pos, rot) +# Code separated from WorkingPlane.py (offsetToPoint function). +# Note that the return value of this function has the opposite sign. +def distance_to_plane(point, base, normal): + """Return the signed distance from a plane to a point. + + The distance is positive if the point lies on the +normal side of the plane. + + Parameters + ---------- + point: Base::Vector3 + Point to project. + base: Base::Vector3 + Point on plane. + normal: Base::Vector3 + Normal of plane. + + Returns + ------- + float + """ + return (point - base).dot(normal) + + +# Code separated from WorkingPlane.py (projectPoint function). +# See: https://github.com/FreeCAD/FreeCAD/pull/5307 +def project_point_on_plane(point, base, normal, direction=None, force_projection=False, tol=-1): + """Project a point onto a plane. + + Parameters + ---------- + point: Base::Vector3 + Point to project. + base: Base::Vector3 + Point on plane. + normal: Base::Vector3 + Normal of plane. + direction: Base::Vector3, optional + Defaults to `None` in which case the normal is used. + Direction of projection. + force_projection: Bool, optional + Defaults to `False`. + If `True` forces the projection if the deviation between the direction + and the normal is less than tol from the orthogonality. The direction + of projection is then modified to a tol deviation between the direction + and the orthogonal. + tol: float, optional + Defaults to -1. + Internal tolerance. 1e-7 is used if tol <=0. + + Returns + ------- + Base::Vector3 or `None` + """ + err = 1e-7 if tol <= 0 else tol + normal = App.Vector(normal).normalize() + if direction is None: + direction = normal + else: + direction = App.Vector(direction).normalize() + + cos = direction.dot(normal) + delta_ax_proj = (point - base).dot(normal) + # check the only conflicting case: direction orthogonal to normal + if abs(cos) < err: + if force_projection: + cos = math.copysign(err, delta_ax_proj) + direction = normal.cross(direction).cross(normal) - cos * normal + else: + return None + + return point - delta_ax_proj / cos * direction + + #compatibility layer getSplineNormal = get_spline_normal diff --git a/src/Mod/Draft/draftobjects/base.py b/src/Mod/Draft/draftobjects/base.py index f9121b2c20..c070b33349 100644 --- a/src/Mod/Draft/draftobjects/base.py +++ b/src/Mod/Draft/draftobjects/base.py @@ -85,7 +85,7 @@ class DraftObject(object): # Object properties are updated when the document is opened. self.props_changed_clear() - def __getstate__(self): + def dumps(self): """Return a tuple of all serializable objects or None. When saving the document this object gets stored @@ -102,7 +102,7 @@ class DraftObject(object): """ return self.Type - def __setstate__(self, state): + def loads(self, state): """Set some internal properties for all restored objects. When a document is restored this method is used to set some properties diff --git a/src/Mod/Draft/draftobjects/draft_annotation.py b/src/Mod/Draft/draftobjects/draft_annotation.py index 1270a43ab2..3b2981de33 100644 --- a/src/Mod/Draft/draftobjects/draft_annotation.py +++ b/src/Mod/Draft/draftobjects/draft_annotation.py @@ -82,11 +82,11 @@ class DraftAnnotation(object): if multiplier is not None: vobj.ScaleMultiplier = multiplier - def __getstate__(self): + def dumps(self): return - def __setstate__(self,state): + def loads(self,state): return diff --git a/src/Mod/Draft/draftobjects/draftlink.py b/src/Mod/Draft/draftobjects/draftlink.py index 591385037e..94bb3a282d 100644 --- a/src/Mod/Draft/draftobjects/draftlink.py +++ b/src/Mod/Draft/draftobjects/draftlink.py @@ -64,17 +64,17 @@ class DraftLink(DraftObject): if obj: self.attach(obj) - def __getstate__(self): + def dumps(self): """Return a tuple of all serializable objects or None.""" return self.__dict__ - def __setstate__(self, state): + def loads(self, state): """Set some internal properties for all restored objects.""" if isinstance(state, dict): self.__dict__ = state else: self.use_link = False - super(DraftLink, self).__setstate__(state) + super(DraftLink, self).loads(state) def attach(self, obj): """Set up the properties when the object is attached.""" diff --git a/src/Mod/Draft/draftobjects/hatch.py b/src/Mod/Draft/draftobjects/hatch.py index 53c7c1156f..8c89d4cb2e 100644 --- a/src/Mod/Draft/draftobjects/hatch.py +++ b/src/Mod/Draft/draftobjects/hatch.py @@ -67,11 +67,11 @@ class Hatch(DraftObject): self.setProperties(obj) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Draft/draftobjects/layer.py b/src/Mod/Draft/draftobjects/layer.py index 53cbedeb27..29f4cf2e7c 100644 --- a/src/Mod/Draft/draftobjects/layer.py +++ b/src/Mod/Draft/draftobjects/layer.py @@ -80,11 +80,11 @@ class Layer: _wrn("v0.19, " + obj.Label + ", " + translate("draft", "added missing view properties")) - def __getstate__(self): + def dumps(self): """Return a tuple of objects to save or None.""" return self.Type - def __setstate__(self, state): + def loads(self, state): """Set the internal properties from the restored state.""" if state: self.Type = state @@ -126,12 +126,12 @@ class LayerContainer: group.sort(key=lambda layer: layer.Label) obj.Group = group - def __getstate__(self): + def dumps(self): """Return a tuple of objects to save or None.""" if hasattr(self, "Type"): return self.Type - def __setstate__(self, state): + def loads(self, state): """Set the internal properties from the restored state.""" if state: self.Type = state diff --git a/src/Mod/Draft/draftobjects/shapestring.py b/src/Mod/Draft/draftobjects/shapestring.py index 1370a31f08..41ada164f7 100644 --- a/src/Mod/Draft/draftobjects/shapestring.py +++ b/src/Mod/Draft/draftobjects/shapestring.py @@ -27,6 +27,7 @@ ## \addtogroup draftobjects # @{ +import math from PySide.QtCore import QT_TRANSLATE_NOOP import FreeCAD as App @@ -88,6 +89,10 @@ class ShapeString(DraftObject): _tip = QT_TRANSLATE_NOOP("App::Property", "Inter-character spacing") obj.addProperty("App::PropertyDistance", "Tracking", "Draft", _tip) + if "ObliqueAngle" not in properties: + _tip = QT_TRANSLATE_NOOP("App::Property", "Oblique (slant) angle") + obj.addProperty("App::PropertyAngle", "ObliqueAngle", "Draft", _tip) + if "MakeFace" not in properties: _tip = QT_TRANSLATE_NOOP("App::Property", "Fill letters with faces") obj.addProperty("App::PropertyBool", "MakeFace", "Draft", _tip).MakeFace = True @@ -98,7 +103,7 @@ class ShapeString(DraftObject): def onDocumentRestored(self, obj): super().onDocumentRestored(obj) - if hasattr(obj, "Justification"): # several more properties were added + if hasattr(obj, "ObliqueAngle"): # several more properties were added return self.update_properties_0v22(obj) @@ -111,7 +116,7 @@ class ShapeString(DraftObject): obj.ScaleToSize = False obj.Tracking = old_tracking _wrn("v0.22, " + obj.Label + ", " - + translate("draft", "added 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ScaleToSize' and 'Fuse' properties")) + + translate("draft", "added 'Fuse', 'Justification', 'JustificationReference', 'KeepLeftMargin', 'ObliqueAngle' and 'ScaleToSize' properties")) _wrn("v0.22, " + obj.Label + ", " + translate("draft", "changed 'Tracking' property type")) @@ -159,11 +164,23 @@ class ShapeString(DraftObject): if obj.ScaleToSize: ss_shape.scale(obj.Size / cap_height) cap_height = obj.Size - obj.Shape = self.justification(ss_shape, - cap_height, - obj.Justification, - obj.JustificationReference, - obj.KeepLeftMargin) + just_vec = self.justification_vector(ss_shape, + cap_height, + obj.Justification, + obj.JustificationReference, + obj.KeepLeftMargin) + if obj.ObliqueAngle: + if -80 <= obj.ObliqueAngle <= 80: + mtx = App.Matrix() + mtx.A12 = math.tan(math.radians(obj.ObliqueAngle)) + ss_shape = ss_shape.transformGeometry(mtx) + else: + wrn = translate("draft", "ShapeString: oblique angle must be in the -80 to +80 degree range") + "\n" + App.Console.PrintWarning(wrn) + shapes = ss_shape.SubShapes + for shape in shapes: + shape.translate(just_vec) + obj.Shape = Part.Compound(shapes) else: App.Console.PrintWarning(translate("draft", "ShapeString: string has no wires") + "\n") @@ -176,10 +193,9 @@ class ShapeString(DraftObject): def onChanged(self, obj, prop): self.props_changed_store(prop) - def justification(self, ss_shape, cap_height, just, just_ref, keep_left_margin): # ss_shape is a compound - shapes = ss_shape.SubShapes + def justification_vector(self, ss_shape, cap_height, just, just_ref, keep_left_margin): # ss_shape is a compound box = ss_shape.BoundBox - if keep_left_margin is True: + if keep_left_margin is True and "Left" in just: vec = App.Vector(0, 0, 0) else: vec = App.Vector(-box.XMin, 0, 0) # remove left margin caused by kerning and white space characters @@ -197,9 +213,7 @@ class ShapeString(DraftObject): vec = vec + App.Vector(-width, 0, 0) elif "Center" in just: vec = vec + App.Vector(-width/2, 0, 0) - for shape in shapes: - shape.translate(vec) - return Part.Compound(shapes) + return vec def make_faces(self, wireChar): wrn = translate("draft", "ShapeString: face creation failed for one character") + "\n" diff --git a/src/Mod/Draft/draftobjects/text.py b/src/Mod/Draft/draftobjects/text.py index 439f172fa3..11112361d3 100644 --- a/src/Mod/Draft/draftobjects/text.py +++ b/src/Mod/Draft/draftobjects/text.py @@ -76,7 +76,7 @@ class Text(DraftAnnotation): """Execute code when the document is restored.""" super().onDocumentRestored(obj) - # See __setstate__: self.Type is None for new objects. + # See loads: self.Type is None for new objects. if self.Type is not None \ and hasattr(obj, "ViewObject") \ and obj.ViewObject: @@ -93,7 +93,7 @@ class Text(DraftAnnotation): _wrn("v0.21, " + obj.Label + ", " + translate("draft", "renamed 'DisplayMode' options to 'World/Screen'")) - def __setstate__(self,state): + def loads(self,state): # Before update_properties_0v21 the self.Type value was stored. # We use this to identify older objects that need to be updated. self.Type = state diff --git a/src/Mod/Draft/draftobjects/wpproxy.py b/src/Mod/Draft/draftobjects/wpproxy.py index 2f72ddca01..2f7d270424 100644 --- a/src/Mod/Draft/draftobjects/wpproxy.py +++ b/src/Mod/Draft/draftobjects/wpproxy.py @@ -70,10 +70,10 @@ class WorkingPlaneProxy: def getNormal(self,obj): return obj.Shape.Faces[0].normalAt(0,0) - def __getstate__(self): + def dumps(self): return self.Type - def __setstate__(self,state): + def loads(self,state): if state: self.Type = state diff --git a/src/Mod/Draft/draftviewproviders/view_base.py b/src/Mod/Draft/draftviewproviders/view_base.py index 7deadd1255..1acb1d714b 100644 --- a/src/Mod/Draft/draftviewproviders/view_base.py +++ b/src/Mod/Draft/draftviewproviders/view_base.py @@ -118,7 +118,7 @@ class ViewProviderDraft(object): "Defines the size of the SVG pattern.")) vobj.PatternSize = utils.get_param("HatchPatternSize", 1) - def __getstate__(self): + def dumps(self): """Return a tuple of all serializable objects or None. When saving the document this view provider object gets stored @@ -138,7 +138,7 @@ class ViewProviderDraft(object): """ return None - def __setstate__(self, state): + def loads(self, state): """Set some internal properties for all restored objects. When a document is restored this method is used to set some properties @@ -147,7 +147,7 @@ class ViewProviderDraft(object): Override this method to define the properties to change for the restored serialized objects. - By default no objects were serialized with `__getstate__`, + By default no objects were serialized with `dumps`, so nothing needs to be done here, and it returns `None`. Parameters diff --git a/src/Mod/Draft/draftviewproviders/view_clone.py b/src/Mod/Draft/draftviewproviders/view_clone.py index 1ac8c6806e..eb7c6a0b62 100644 --- a/src/Mod/Draft/draftviewproviders/view_clone.py +++ b/src/Mod/Draft/draftviewproviders/view_clone.py @@ -38,10 +38,10 @@ class ViewProviderClone: def getIcon(self): return ":/icons/Draft_Clone.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def getDisplayModes(self, vobj): diff --git a/src/Mod/Draft/draftviewproviders/view_draft_annotation.py b/src/Mod/Draft/draftviewproviders/view_draft_annotation.py index 31f8e5100a..eb09e2742e 100644 --- a/src/Mod/Draft/draftviewproviders/view_draft_annotation.py +++ b/src/Mod/Draft/draftviewproviders/view_draft_annotation.py @@ -162,11 +162,11 @@ class ViewProviderDraftAnnotation(object): "Graphics", _tip) - def __getstate__(self): + def dumps(self): """Return a tuple of objects to save or None.""" return None - def __setstate__(self, state): + def loads(self, state): """Set the internal properties from the restored state.""" return None diff --git a/src/Mod/Draft/draftviewproviders/view_hatch.py b/src/Mod/Draft/draftviewproviders/view_hatch.py index 01c5bbe88a..142ecb7b7d 100644 --- a/src/Mod/Draft/draftviewproviders/view_hatch.py +++ b/src/Mod/Draft/draftviewproviders/view_hatch.py @@ -41,11 +41,11 @@ class ViewProviderDraftHatch: return ":/icons/Draft_Hatch.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None diff --git a/src/Mod/Draft/draftviewproviders/view_layer.py b/src/Mod/Draft/draftviewproviders/view_layer.py index 56dd1dfe35..c486511644 100644 --- a/src/Mod/Draft/draftviewproviders/view_layer.py +++ b/src/Mod/Draft/draftviewproviders/view_layer.py @@ -204,11 +204,11 @@ class ViewProviderLayer: """Return the saved display mode.""" return mode - def __getstate__(self): + def dumps(self): """Return a tuple of objects to save or None.""" return None - def __setstate__(self, state): + def loads(self, state): """Set the internal properties from the restored state.""" return None @@ -574,11 +574,11 @@ class ViewProviderLayerContainer: doc.recompute() doc.commitTransaction() - def __getstate__(self): + def dumps(self): """Return a tuple of objects to save or None.""" return None - def __setstate__(self, state): + def loads(self, state): """Set the internal properties from the restored state.""" return None diff --git a/src/Mod/Draft/draftviewproviders/view_wpproxy.py b/src/Mod/Draft/draftviewproviders/view_wpproxy.py index c1fe3c8de5..899deb9aee 100644 --- a/src/Mod/Draft/draftviewproviders/view_wpproxy.py +++ b/src/Mod/Draft/draftviewproviders/view_wpproxy.py @@ -227,10 +227,10 @@ class ViewProviderWorkingPlaneProxy: self.drawstyle.lineWidth = vobj.LineWidth return - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None ## @} diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing.ts index a5b9e144f9..06bf23e2a8 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing - + &Annotation - - + + Inserts an Annotation view in the active drawing @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing - + &Clip - - + + Inserts a clip group in the active drawing @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing - + &Draft View - - + + Inserts a Draft view of the selected object(s) in the active drawing @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File - + &Export page... - - + + Export a page to an SVG file @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing - - + + Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing - - + + Insert new drawing @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing - + Insert view in drawing - + Insert a new View of a Part in the active drawing @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing - + Open &browser view - - + + Opens the selected page in a browser view @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing - + Insert orthographic views - + Insert an orthographic projection of a part in the active drawing @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing - + Project shape... - - + + Project shape onto a user-defined plane @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing - + &Spreadsheet View - - + + Inserts a view of a selected spreadsheet in the active drawing @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing - + &Symbol - - + + Inserts a symbol from a svg file in the active drawing @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background - + &Outline - + &Native - + &OpenGL - + &Image - + &High Quality Antialiasing - + Open SVG File - + Could not open file '%1'. - + &Renderer - + Export PDF - + PDF file - + Page sizes - + A0 - + A1 - + A2 - + A3 - + A4 - + A5 - + Different orientation - + The printer uses a different orientation than the drawing. Do you want to continue? - - + + Different paper size - - + + The printer uses a different paper size than the drawing. Do you want to continue? - + Opening file failed - + Can't open file '%1' for writing. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges - + Visible smooth edges - + Visible sewn edges - + Visible outline edges - + Visible isoparameters - + Hidden sharp edges - + Hidden smooth edges - + Hidden sewn edges - + Hidden outline edges - + Hidden isoparameters - + Project shapes - + No active document - + There is currently no active document to complete the operation @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page - + Landscape - + Portrait - + %1%2 %3 - + Insert new %1%2 %3 drawing - + %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open - - - + + + Scalable Vector Graphic - - - - - + + + + + Wrong selection - + Select a Part object. - - - - - - + + + + + + No page found - - - - - - + + + + + + Create a page first. - + Select exactly one Part object. - - + + Select one Page object. - + All Files - + Export page - + Select exactly one Spreadsheet object. - + Make axonometric... - + Edit axonometric settings... - + Make orthographic diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_be.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_be.ts index 646ebf17bc..a55b22c95d 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_be.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_be.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Чарцёж - + &Annotation З&аметка - - + + Inserts an Annotation view in the active drawing Ўставіць выгляд Заметкі ў бягучы чарцёж @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Чарцёж - + &Clip &Выгляд - - + + Inserts a clip group in the active drawing Уставіць суполку выразак у бягучы чарцёж @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Чарцёж - + &Draft View Выгляд &Чарнавіка - - + + Inserts a Draft view of the selected object(s) in the active drawing Уставіць выгляд Чарнавіка абраных аб'ектаў у бягучы чарцёж @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Файл - + &Export page... &Экспартаваць старонку... - - + + Export a page to an SVG file Экспартаваць старонку ў файл SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Чарцёж - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Чарцёж - - + + Insert new drawing Уставіць новы чарцёж @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Чарцёж - + Insert view in drawing Уставіць выгляд у чарцёж - + Insert a new View of a Part in the active drawing Уставіць новы выгляд дэталі ў бягучы чарцёж @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Чарцёж - + Open &browser view Адчыніць выгляд у &аглядальніку - - + + Opens the selected page in a browser view Адчыніць абраную старонку для прагляду ў аглядальніку @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Чарцёж - + Insert orthographic views Уставіць артаганальныя выгляды - + Insert an orthographic projection of a part in the active drawing Уставіць артаганальную праекцыю дэталі ў бягучы чарцёж @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Чарцёж - + Project shape... Праекцыя фігуры... - - + + Project shape onto a user-defined plane Праекцыя фігуры на карыстальніцкую плоскасць @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Чарцёж - + &Spreadsheet View Прагляд &Зводнай табліцы - - + + Inserts a view of a selected spreadsheet in the active drawing Уставіць выгляд абранай зводнай табліцы ў бягучы чарцёж @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Чарцёж - + &Symbol &Знак - - + + Inserts a symbol from a svg file in the active drawing Уставіць знак з файла svg у бягучы чарцёж @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Фон - + &Outline &Контур - + &Native &Убудаваны - + &OpenGL &OpenGL - + &Image &Выява - + &High Quality Antialiasing &Высакаякаснае згладжванне - + Open SVG File Адчыніць файл SVG - + Could not open file '%1'. Не атрымалася адчыніць файл '%1'. - + &Renderer Сродак &візуалізацыі - + Export PDF Экспартаваць у PDF - + PDF file Файл PDF - + Page sizes Памеры старонкі - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Адрозная арыентацыя - + The printer uses a different orientation than the drawing. Do you want to continue? Друкарка ўжывае арыентацыю адрозную ад чарцяжа. Вы жадаеце працягнуць? - - + + Different paper size Адрозны памер паперы - - + + The printer uses a different paper size than the drawing. Do you want to continue? Друкарка ўжывае памер паперы, адрозны ад чарцяжа. Вы жадаеце працягнуць? - + Opening file failed Немагчыма адчыніць файл - + Can't open file '%1' for writing. Не атрымалася адчыніць файл '%1' для запісу. @@ -557,67 +557,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Бачныя вострыя рэбры - + Visible smooth edges Бачныя плыўныя рэбры - + Visible sewn edges Бачныя сшытыя рэбры - + Visible outline edges Бачныя контуры рабра - + Visible isoparameters Бачныя ізапараметры - + Hidden sharp edges Схаваныя вострыя рэбры - + Hidden smooth edges Схаваныя плыўныя рэбры - + Hidden sewn edges Схаваныя сшытыя рэбры - + Hidden outline edges Схаваныя контуры рабра - + Hidden isoparameters Схаваныя ізапараметры - + Project shapes Праекцыі фігур - + No active document Без бягучага дакумента - + There is currently no active document to complete the operation У бягучы час адсутнічае бягучы дакумент для завяршэння аперацыі @@ -635,37 +635,37 @@ Do you want to continue? Drawing_NewPage - + Page Старонка - + Landscape Альбомны - + Portrait Партрэтны - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Уставіць новы %1%2 %3 чарцёж - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Уставіць новы %1%2 %3 (%4) чарцёж @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Абраць файл SVG, каб адчыніць - - - + + + Scalable Vector Graphic Маштабаваная вектарная графіка (SVG) - - - - - + + + + + Wrong selection Няправільны выбар - + Select a Part object. Абраць аб'ект Дэталі. - - - - - - + + + + + + No page found Старонка не знойдзена - - - - - - + + + + + + Create a page first. Спачатку стварыць старонку. - + Select exactly one Part object. Выберыце толькі адзін аб'ект Дэталі. - - + + Select one Page object. Абраць адзін аб'ект Старонкі. - + All Files Усе файлы - + Export page Экспартаваць старонку - + Select exactly one Spreadsheet object. Выберыце толькі адзін аб'ект Зводнай табліцы. - + Make axonometric... Зрабіць аксанаметрычным... - + Edit axonometric settings... Змяніць налады аксанаметрыі... - + Make orthographic Зрабіць артаганальным diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ca.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ca.ts index 256d066f81..9f23001690 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ca.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ca.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Dibuixant - + &Annotation &Anotació - - + + Inserts an Annotation view in the active drawing Insereix una nota en el dibuix actiu @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Dibuixant - + &Clip &Retalla - - + + Inserts a clip group in the active drawing Insereix un grup de retall al full de disseny actiu @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Dibuixant - + &Draft View &Vista Croquis - - + + Inserts a Draft view of the selected object(s) in the active drawing Insereix una vista de croquis de l'objecte o objectes seleccionats en el dibuix actiu @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Fitxer - + &Export page... &Exportar pàgina... - - + + Export a page to an SVG file Exporta una pàgina a un arxiu SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Dibuixant - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Dibuixant - - + + Insert new drawing Insereix un dibuix nou @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Dibuixant - + Insert view in drawing Inserir una vista en el dibuix - + Insert a new View of a Part in the active drawing Insereix una nova Vista d'una Part en el dibuix actiu @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Dibuixant - + Open &browser view O&bre una vista de navegador - - + + Opens the selected page in a browser view Obre la pàgina seleccionada en una vista de navegador @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Dibuixant - + Insert orthographic views Inserir vistes ortogràfiques - + Insert an orthographic projection of a part in the active drawing Insereix una projecció ortogonal d'una part del dibuix actual @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Dibuixant - + Project shape... Projecta la forma... - - + + Project shape onto a user-defined plane Projecta la forma en un pla definit d'usuari @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Dibuixant - + &Spreadsheet View &Visualització del full de càlcul - - + + Inserts a view of a selected spreadsheet in the active drawing Insereix una vista del full de càlcul seleccionat al dibuix actiu @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Dibuixant - + &Symbol &Símbol - - + + Inserts a symbol from a svg file in the active drawing Insereix un símbol des d'un fitxer svg en el dibuix actiu @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background &Fons - + &Outline &Contorn - + &Native &Natiu - + &OpenGL &OpenGL - + &Image &Imatge - + &High Quality Antialiasing &Antialiasing d'alta qualitat - + Open SVG File Obre un fitxer SVG - + Could not open file '%1'. No s'ha pogut obrir l'arxiu '%1'. - + &Renderer &Renderitzador - + Export PDF Exporta a PDF - + PDF file Arxiu PDF - + Page sizes Mides de pàgina - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientació diferent - + The printer uses a different orientation than the drawing. Do you want to continue? La impressora utilitza una mida de paper diferent que la del dibuix. Voleu continuar? - - + + Different paper size Mida de paper diferent - - + + The printer uses a different paper size than the drawing. Do you want to continue? La impressora utilitza una mida de paper diferent que la del dibuix. Voleu continuar? - + Opening file failed No s'ha pogut obrir el fitxer - + Can't open file '%1' for writing. No s'ha pogut obrir el fitxer '%1' per escriure-hi. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Vores esmolades visibles - + Visible smooth edges Vores suaus visibles - + Visible sewn edges Vores cosides visibles - + Visible outline edges Arestes de contorn visibles - + Visible isoparameters Isoparàmetres visibles - + Hidden sharp edges Arestes esmolades amagades - + Hidden smooth edges Arestes suaus amagades - + Hidden sewn edges Vores cosides amagades - + Hidden outline edges Amaga unions - + Hidden isoparameters Isoparàmetres ocults - + Project shapes Formes del Projecte - + No active document Document no Actiu - + There is currently no active document to complete the operation Actualment no hi ha cap document actiu per completar l'operació @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Pàgina - + Landscape Paisatge - + Portrait Vertical - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Insereix dibuix de %3 de %1%2 nou - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Insereix dibuix de %3 (%4) de %1%2 nou @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Triar un fitxer SVG per obrir - - - + + + Scalable Vector Graphic Vector grafic escalable - - - - - + + + + + Wrong selection Selecció incorrecta - + Select a Part object. Selecciona part del objecte. - - - - - - + + + + + + No page found Cap pàgina trobada - - - - - - + + + + + + Create a page first. Crear una pàgina primer. - + Select exactly one Part object. Seleccioneu exactament part de l'objecte. - - + + Select one Page object. Seleccioneu un objecte Page. - + All Files Tots els fitxers - + Export page Exportar pàgina - + Select exactly one Spreadsheet object. Selecciona exactament un objecte de full de càlcul. - + Make axonometric... Fer axonomètrica... - + Edit axonometric settings... Edita la configuració axonomètrica... - + Make orthographic Fer ortogonals diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_cs.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_cs.ts index 5afb9b2c10..393437fb5a 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_cs.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_cs.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Výkres - + &Annotation &Poznámka - - + + Inserts an Annotation view in the active drawing Vloží zobrazení poznámky v aktivním výkresu @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Výkres - + &Clip Výřez - - + + Inserts a clip group in the active drawing Vložení výřezu skupiny v aktivním výkresu @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Výkres - + &Draft View &Pohled z Návrhu - - + + Inserts a Draft view of the selected object(s) in the active drawing Vloží pohled vybraných objektů z Návrhu do aktivního výkresu @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Soubor - + &Export page... &Exportovat stránku... - - + + Export a page to an SVG file Exportovat stránku do souboru SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Výkres - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Výkres - - + + Insert new drawing Vložit nový výkres @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Výkres - + Insert view in drawing Vložit pohled do výkresu - + Insert a new View of a Part in the active drawing Vložit nový pohled na díl do aktivního výkresu @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Výkres - + Open &browser view Otevřít prohlížeč - - + + Opens the selected page in a browser view Otevře vybranou stránku v prohlížeči @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Výkres - + Insert orthographic views Vložit pravoúhlé zobrazení - + Insert an orthographic projection of a part in the active drawing V aktivním výkresu vložit pravoúhlé promítání části @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Výkres - + Project shape... Projekce tvaru... - - + + Project shape onto a user-defined plane Projekce tvaru na plochu definovanou uživatelem @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Výkres - + &Spreadsheet View Zobrazení Tabulky - - + + Inserts a view of a selected spreadsheet in the active drawing Vloží zobrazení vybrané tabulky v aktivním výkresu @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Výkres - + &Symbol &Symbol - - + + Inserts a symbol from a svg file in the active drawing Vložit symbol ze souboru svg do aktivního výkresu @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Pozadí - + &Outline Obrysová čára - + &Native Přirozený - + &OpenGL &OpenGL - + &Image Obrázek - + &High Quality Antialiasing Vysoká kvalita vyhlazování - + Open SVG File Otevřít soubor SVG - + Could not open file '%1'. Nelze otevřít soubor '%1'. - + &Renderer Stínovací software - + Export PDF Export PDF - + PDF file PDF soubor - + Page sizes Rozměry stránky - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Jiná orientace - + The printer uses a different orientation than the drawing. Do you want to continue? Tiskárna používá jinou orientaci než výkres. Chcete pokračovat? - - + + Different paper size Jiný formát papíru - - + + The printer uses a different paper size than the drawing. Do you want to continue? Tiskárna používá jiný formát papíru než výkres. Chcete pokračovat? - + Opening file failed Otevření souboru selhalo - + Can't open file '%1' for writing. Soubor "%1" nelze otevřít pro zápis. @@ -470,7 +470,7 @@ Chcete pokračovat? Auto scale / position - Auto měřítko / pozice + Auto měřítko / poloha @@ -557,67 +557,67 @@ Chcete pokračovat? DrawingGui::TaskProjection - + Visible sharp edges Viditelné ostré hrany - + Visible smooth edges Hladké hrany Viditelné - + Visible sewn edges Šité okraje viditelné - + Visible outline edges Viditelný obrys okrajů - + Visible isoparameters Viditelné iso parametry - + Hidden sharp edges Ostré hrany skryté - + Hidden smooth edges Hladké hrany skryté - + Hidden sewn edges Šité okraje skryté - + Hidden outline edges Obrysové čáry skryté - + Hidden isoparameters Skryté iso parametry - + Project shapes Projekce tvaru - + No active document Žádný aktivní dokument - + There is currently no active document to complete the operation Pro dokončení operace není žádný aktivní dokument @@ -635,37 +635,37 @@ Chcete pokračovat? Drawing_NewPage - + Page Stránka - + Landscape Na šířku - + Portrait Na výšku - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Vložit nový %1%2 %3 výkres - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Vložit nový %1%2 %3 (%4) výkres @@ -673,93 +673,93 @@ Chcete pokračovat? QObject - - + + Choose an SVG file to open Zvolte soubor SVG pro otevření - - - + + + Scalable Vector Graphic Škálovatelná vektorová grafika - - - - - + + + + + Wrong selection Neplatný výběr - + Select a Part object. Vybrat díl. - - - - - - + + + + + + No page found Stránka nebyla nalezena - - - - - - + + + + + + Create a page first. Vytvořte nejprve stránku. - + Select exactly one Part object. Vyberte právě jednu součást. - - + + Select one Page object. Vyberte jeden objekt stránky. - + All Files Všechny soubory - + Export page Exportovat stránku - + Select exactly one Spreadsheet object. Vyberte právě jeden objekt Tabulky. - + Make axonometric... Změnit na axonometrický - + Edit axonometric settings... Upravit nastavení axonometrie... - + Make orthographic Změnit na ortografický diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_de.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_de.ts index cac297b93a..6fa9b000ee 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_de.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_de.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Zeichnung - + &Annotation &Anmerkung - - + + Inserts an Annotation view in the active drawing Fügt eine Anmerkungsansicht in die aktive Zeichnung ein @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Zeichnung - + &Clip &Ausschnitt - - + + Inserts a clip group in the active drawing Eine Auschnittsgruppe in die aktive Zeichnung einfügen @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Zeichnung - + &Draft View &Entwurfsansicht - - + + Inserts a Draft view of the selected object(s) in the active drawing Fügt eine Entwurfsansicht der(des) ausgewählten Objekte(s) in die aktive Zeichnung ein @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Datei - + &Export page... Seite &exportieren... - - + + Export a page to an SVG file Seite in SVG-Datei exportieren @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Zeichnung - - + + Insert new A3 landscape drawing Neue A3-Zeichung einfügen (im Querformat) @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Zeichnung - - + + Insert new drawing Neue Zeichnung einfügen @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Zeichnung - + Insert view in drawing Ansicht in Zeichnung einfügen - + Insert a new View of a Part in the active drawing Neue Ansicht eines Teils in aktive Zeichnung einfügen @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Zeichnung - + Open &browser view &Browser-Ansicht öffnen - - + + Opens the selected page in a browser view Öffnet die ausgewählte Seite in einer Browseransicht @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Zeichnung - + Insert orthographic views Orthografische Ansichten einfügen - + Insert an orthographic projection of a part in the active drawing Orthografische Projektion eines Bauteils in die aktive Zeichnung einfügen @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Zeichnung - + Project shape... Fläche projizieren... - - + + Project shape onto a user-defined plane Fläche auf eine benutzerdefinierte Ebene projizieren @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Zeichnung - + &Spreadsheet View Tabellenan&sicht - - + + Inserts a view of a selected spreadsheet in the active drawing Fügt eine Ansicht einer ausgewählte Kalkulationstabelle in die aktive Zeichnung ein @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Zeichnung - + &Symbol &Symbol - - + + Inserts a symbol from a svg file in the active drawing Fügt ein Symbol aus einer SVG-Datei in der aktiven Zeichnung ein @@ -238,127 +238,127 @@ DrawingGui::DrawingView - + &Background &Hintergrund - + &Outline &Umriss - + &Native &Nativ - + &OpenGL &OpenGL - + &Image &Grafik - + &High Quality Antialiasing &High Quality Antialiasing - + Open SVG File SVG-Datei öffnen - + Could not open file '%1'. Datei '%1' konnte nicht geöffnet werden. - + &Renderer &Rendern - + Export PDF PDF exportieren - + PDF file PDF-Datei - + Page sizes Seitengrößen - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Andere Ausrichtung - + The printer uses a different orientation than the drawing. Do you want to continue? Der Drucker verwendet eine andere Ausrichtung als die Zeichnung. Möchten Sie fortfahren? - - + + Different paper size Anderes Papierformat - - + + The printer uses a different paper size than the drawing. Do you want to continue? Der Drucker verwendet eine andere Papiergröße als die Zeichnung. Möchten Sie fortfahren? - + Opening file failed Fehler beim Öffnen der Datei - + Can't open file '%1' for writing. Datei '%1' kann zum Schreiben nicht geöffnet werden. @@ -556,67 +556,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Sichtbare scharfe Kanten - + Visible smooth edges Sichtbare tangentiale Kanten - + Visible sewn edges Sichtbare genähte Kanten - + Visible outline edges Sichtbare Außenkanten - + Visible isoparameters Sichtbare Isoparameter - + Hidden sharp edges Versteckte scharfe Kanten - + Hidden smooth edges Versteckte tangentiale Kanten - + Hidden sewn edges Versteckte genähte Kanten - + Hidden outline edges Versteckte Außenkanten - + Hidden isoparameters Versteckte Isoparameter - + Project shapes Flächen projizieren - + No active document Kein aktives Dokument - + There is currently no active document to complete the operation Es gibt derzeit kein aktives Dokument, um die Operation abzuschließen @@ -634,37 +634,37 @@ Do you want to continue? Drawing_NewPage - + Page Seite - + Landscape Querformat - + Portrait Hochformat - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Neue %1%2 %3 Zeichnung einfügen - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Neue %1%2 %3 (%4) Zeichnung einfügen @@ -672,93 +672,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Wählen Sie eine SVG-Datei zum Öffnen aus - - - + + + Scalable Vector Graphic Skalierbare Vektorgrafik - - - - - + + + + + Wrong selection Falsche Auswahl - + Select a Part object. Wählen Sie ein Teile-Objekt aus.. - - - - - - + + + + + + No page found Keine Seite gefunden - - - - - - + + + + + + Create a page first. Erstellen Sie zunächst eine Seite. - + Select exactly one Part object. Wählen Sie genau ein Teil-Objekt. - - + + Select one Page object. Wählen Sie ein Page-Objekt aus. - + All Files Alle Dateien - + Export page Seite exportieren - + Select exactly one Spreadsheet object. Wählen Sie genau ein Kalkulationstabellen-Objekt. - + Make axonometric... Axonometrisch machen... - + Edit axonometric settings... Axonometrie-Einstellungen bearbeiten... - + Make orthographic Orthographisch machen diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_el.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_el.ts index b18adcb0ae..d2b9cc6922 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_el.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_el.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Σχέδιο - + &Annotation & Σχολιασμός - - + + Inserts an Annotation view in the active drawing Εισάγει μια προβολή Περιγραφής στο ενεργό σχέδιο @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Σχέδιο - + &Clip Αποκοπή - - + + Inserts a clip group in the active drawing Εισάγει μια ομάδα αποκοπής στο ενεργό σχέδιο @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Σχέδιο - + &Draft View Προβολή Προσχε&δίου - - + + Inserts a Draft view of the selected object(s) in the active drawing Εισάγει μια προβολή Προσχεδίου του επιλεγμένου αντικειμένου(ων) στο ενεργό σχέδιο @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Αρχείο - + &Export page... Εξαγωγή σελίδας... - - + + Export a page to an SVG file Εξαγάγετε μια σελίδα σε ένα αρχείο SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Σχέδιο - - + + Insert new A3 landscape drawing Εισαγωγή νέου σχεδίου A3 landscape @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Σχέδιο - - + + Insert new drawing Εισαγάγετε νέο σχέδιο @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Σχέδιο - + Insert view in drawing Εισαγάγετε προβολή στο σχέδιο - + Insert a new View of a Part in the active drawing Εισαγάγετε μια νέα Προβολή ενός Εξαρτήματος στο ενεργό σχέδιο @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Σχέδιο - + Open &browser view Ανοίξτε την προβολή περιηγητή - - + + Opens the selected page in a browser view Ανοίγει την επιλεγμένη σελίδα σε προβολή περιηγητή @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Σχέδιο - + Insert orthographic views Εισαγάγετε ορθογραφικές προβολές - + Insert an orthographic projection of a part in the active drawing Εισαγάγετε μια ορθογραφική προβολή ενός εξαρτήματος στο ενεργό σχέδιο @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Σχέδιο - + Project shape... Προβάλετε σχήμα... - - + + Project shape onto a user-defined plane Προβάλετε σχήμα πάνω σε επίπεδο που ορίζεται από τον χρήστη @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Σχέδιο - + &Spreadsheet View Προβολή Υπολογι&στικού φύλλου - - + + Inserts a view of a selected spreadsheet in the active drawing Εισάγει μια προβολή ενός επιλεγμένου υπολογιστικού φύλλου στο ενεργό σχέδιο @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Σχέδιο - + &Symbol &Σύμβολο - - + + Inserts a symbol from a svg file in the active drawing Εισάγει ένα σύμβολο από ένα αρχείο svg στο ενεργό σχέδιο @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background Υπό&βαθρο - + &Outline Περίγραμμα - + &Native Γηγε&νές - + &OpenGL &OpenGL - + &Image Ε&ικόνα - + &High Quality Antialiasing Υψ&ηλής ποιότητας Antialiasing - + Open SVG File Ανοίξτε αρχείο SVG - + Could not open file '%1'. Δεν ήταν δυνατό το άνοιγμα αρχείου '%1'. - + &Renderer Π&ρόγραμμα αποτύπωσης - + Export PDF Εξαγωγή PDF - + PDF file Αρχείο PDF - + Page sizes Μεγέθη σελίδας - + A0 A0 - + A1 A1 - + A2 Α2 - + A3 A3 - + A4 Α4 - + A5 A5 - + Different orientation Διαφορετικός προσανατολισμός - + The printer uses a different orientation than the drawing. Do you want to continue? Ο εκτυπωτής χρησιμοποιεί διαφορετικό προσανατολισμό από το σχέδιο. Θέλετε να συνεχίσετε; - - + + Different paper size Διαφορετικό μέγεθος χαρτιού - - + + The printer uses a different paper size than the drawing. Do you want to continue? Ο εκτυπωτής χρησιμοποιεί διαφορετικό μέγεθος χαρτιού από το σχέδιο. Θέλετε να συνεχίσετε; - + Opening file failed Αποτυχία ανοίγματος αρχείου - + Can't open file '%1' for writing. Αδυναμία ανοίγματος αρχείου '%1' για εγγραφή. @@ -557,67 +557,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Ορατές αιχμηρές ακμές - + Visible smooth edges Ορατές ομαλές ακμές - + Visible sewn edges Ορατές ενωμένες ακμές - + Visible outline edges Ορατές ακμές περιγράμματος - + Visible isoparameters Ορατές παράμετροι iso - + Hidden sharp edges Κρυφές αιχμηρές ακμές - + Hidden smooth edges Κρυφές ομαλές ακμές - + Hidden sewn edges Κρυφές ενωμένες ακμές - + Hidden outline edges Κρυφές ακμές περιγράμματος - + Hidden isoparameters Κρυφές παράμετροι ISO - + Project shapes Προβάλετε σχήματα - + No active document Κανένα ενεργό έγγραφο - + There is currently no active document to complete the operation Αυτή τη στιγμή δεν υπάρχει κανένα ενεργό έγγραφο για να ολοκληρωθεί η λειτουργία @@ -635,37 +635,37 @@ Do you want to continue? Drawing_NewPage - + Page Σελίδα - + Landscape Τοπίο - + Portrait Πορτρέτο - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Εισαγάγετε νέο %1%2%3 σχέδιο - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Εισαγάγετε νέο %1%2 %3 (%4) σχέδιο @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Επιλέξτε ένα αρχείο SVG για άνοιγμα - - - + + + Scalable Vector Graphic Αρχείο Κλιμακωτών Διανυσματικών Γραφικών - - - - - + + + + + Wrong selection Λάθος επιλογή - + Select a Part object. Επιλέξτε ένα Εξάρτημα. - - - - - - + + + + + + No page found Δεν βρέθηκε σελίδα - - - - - - + + + + + + Create a page first. Δημιουργήστε πρώτα μια σελίδα. - + Select exactly one Part object. Επιλέξτε ακριβώς ένα Εξάρτημα. - - + + Select one Page object. Επιλέξτε μια Σελίδα. - + All Files Όλα τα Αρχεία - + Export page Εξαγάγετε σελίδα - + Select exactly one Spreadsheet object. Επιλέξτε ακριβώς ένα Υπολογιστικό Φύλλο. - + Make axonometric... Κάντε αξονομετρική... - + Edit axonometric settings... Επεξεργαστείτε τις αξονομετρικές ρυθμίσεις... - + Make orthographic Κάντε ορθογραφική diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-AR.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-AR.ts index 9844b161ac..c07db88ad0 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-AR.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-AR.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Dibujo - + &Annotation &Anotación - - + + Inserts an Annotation view in the active drawing Inserta una anotación en el dibujo activo @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Dibujo - + &Clip &Clip - - + + Inserts a clip group in the active drawing Inserta un clip de grupo en el actual dibujo @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Dibujo - + &Draft View & Vista Boceto - - + + Inserts a Draft view of the selected object(s) in the active drawing Inserta una vista de boceto del/los objeto(s) seleccionado(s) en el dibujo activo @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Archivo - + &Export page... &Exportar página... - - + + Export a page to an SVG file Exportar una página a un archivo SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Dibujo - - + + Insert new A3 landscape drawing Inserta un nuevo dibujo en formato A3 @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Dibujo - - + + Insert new drawing Insertar nuevo dibujo @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Dibujo - + Insert view in drawing Insertar vista en el dibujo - + Insert a new View of a Part in the active drawing Insertar una nueva Vista de una Pieza en el dibujo activo @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Dibujo - + Open &browser view Abrir &vista de navegador - - + + Opens the selected page in a browser view Abre la página seleccionada en una vista de navegador @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Dibujo - + Insert orthographic views Insertar vistas ortogonales - + Insert an orthographic projection of a part in the active drawing Inserta una proyección ortogonal de una pieza en el dibujo activo @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Dibujo - + Project shape... Formas del proyecto... - - + + Project shape onto a user-defined plane Projectar silueta a un plano definido por el usuario @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Dibujo - + &Spreadsheet View Vista &Hoja de cálculo - - + + Inserts a view of a selected spreadsheet in the active drawing Inserta una vista de una hoja de cálculo seleccionada en el dibujo activo @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Dibujo - + &Symbol &Símbolo - - + + Inserts a symbol from a svg file in the active drawing Inserta un símbolo desde un archivo svg en el dibujo activo @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Fondo - + &Outline &Contorno - + &Native &Nativo - + &OpenGL &OpenGL - + &Image &Imagen - + &High Quality Antialiasing &Antialiasing de alta calidad - + Open SVG File Abrir Archivo SVG - + Could not open file '%1'. No se pudo abrir el archivo '%1'. - + &Renderer &Renderizador - + Export PDF Exportar a PDF - + PDF file Archivo PDF - + Page sizes Tamaños de página - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientación diferente de la hoja - + The printer uses a different orientation than the drawing. Do you want to continue? La impresora usa una orientación diferente al dibujo. ¿Desea continuar? - - + + Different paper size Tamaño de papel diferente - - + + The printer uses a different paper size than the drawing. Do you want to continue? La impresora usa un tamaño de papel distinto al del dibujo. ¿Desea continuar? - + Opening file failed No se pudo abrir el archivo - + Can't open file '%1' for writing. No se puede abrir el archivo '%1' para escritura. @@ -557,67 +557,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Aristas visibles - + Visible smooth edges Bordes suavizados visibles - + Visible sewn edges Bordes cosidos visibles - + Visible outline edges Aristas de contorno visibles - + Visible isoparameters Isoparámetros visibles - + Hidden sharp edges Aristas ocultas - + Hidden smooth edges oculta aristas no vivas - + Hidden sewn edges Aristas ocultas cosidas - + Hidden outline edges Aristas de contorno ocultas - + Hidden isoparameters Isoparámetros ocultos - + Project shapes Formas del proyecto - + No active document Ningún documento activo - + There is currently no active document to complete the operation Actualmente no hay documentación activa para completar la operación @@ -635,37 +635,37 @@ Do you want to continue? Drawing_NewPage - + Page Página - + Landscape Horizontal - + Portrait Vertical - + %1%2 %3 %1 %2 %3 - + Insert new %1%2 %3 drawing Inserte el nuevo dibujo de %1 %2 %3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Inserte nuevo dibujo %1%2 %3 (%4) @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Seleccionar un archivo SVG para abrir - - - + + + Scalable Vector Graphic Gráfico vectorial escalable - - - - - + + + + + Wrong selection Selección Incorrecta - + Select a Part object. Seleccione un objeto Pieza. - - - - - - + + + + + + No page found No se ha encontrado una página de dibujo - - - - - - + + + + + + Create a page first. Cree una página de dibujo primero. - + Select exactly one Part object. Seleccione un único objeto pieza. - - + + Select one Page object. Seleccionar un objeto Página. - + All Files Todos los Archivos - + Export page Exportar página - + Select exactly one Spreadsheet object. Seleccione exactamente un objeto de hoja de cálculo. - + Make axonometric... Hacer axonométrica... - + Edit axonometric settings... Editar configuración axonométrica... - + Make orthographic Hacer ortogonal diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-ES.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-ES.ts index efe6eaffdf..cbb24f5982 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-ES.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_es-ES.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Dibujo - + &Annotation &Anotación - - + + Inserts an Annotation view in the active drawing Inserta una anotación en el dibujo activo @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Dibujo - + &Clip &Clip - - + + Inserts a clip group in the active drawing Inserta un clip de grupo en el actual dibujo @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Dibujo - + &Draft View & Vista Boceto - - + + Inserts a Draft view of the selected object(s) in the active drawing Inserta una vista de boceto del/los objeto(s) seleccionado(s) en el dibujo activo @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Archivo - + &Export page... &Exportar página... - - + + Export a page to an SVG file Exportar una página a un archivo SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Dibujo - - + + Insert new A3 landscape drawing Inserta un nuevo dibujo en formato A3 @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Dibujo - - + + Insert new drawing Insertar nuevo dibujo @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Dibujo - + Insert view in drawing Insertar vista en el dibujo - + Insert a new View of a Part in the active drawing Insertar una nueva Vista de una Pieza en el dibujo activo @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Dibujo - + Open &browser view Abrir &vista de navegador - - + + Opens the selected page in a browser view Abre la página seleccionada en una vista de navegador @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Dibujo - + Insert orthographic views Insertar vistas ortogonales - + Insert an orthographic projection of a part in the active drawing Insertar una proyección ortogonal de una parte in el actual dibujo @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Dibujo - + Project shape... Formas del proyecto... - - + + Project shape onto a user-defined plane Projectar silueta a un plano definido por el usuario @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Dibujo - + &Spreadsheet View Vista &Hoja de cálculo - - + + Inserts a view of a selected spreadsheet in the active drawing Inserta una vista de una hoja de cálculo seleccionada en el dibujo activo @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Dibujo - + &Symbol &Símbolo - - + + Inserts a symbol from a svg file in the active drawing Inserta un símbolo desde un archivo svg en el dibujo activo @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Fondo - + &Outline &Contorno - + &Native &Nativo - + &OpenGL &OpenGL - + &Image &Imagen - + &High Quality Antialiasing &Antialiasing de alta calidad - + Open SVG File Abrir archivo SVG - + Could not open file '%1'. No se pudo abrir el archivo '%1'. - + &Renderer &Renderizador - + Export PDF Exportar PDF - + PDF file Archivo PDF - + Page sizes Tamaños de página - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientación diferente de la hoja - + The printer uses a different orientation than the drawing. Do you want to continue? La impresora usa una orientación diferente al dibujo. ¿Desea continuar? - - + + Different paper size Tamaño de papel diferente - - + + The printer uses a different paper size than the drawing. Do you want to continue? La impresora usa un tamaño de papel distinto al del dibujo. ¿Desea continuar? - + Opening file failed No se pudo abrir el archivo - + Can't open file '%1' for writing. No se puede abrir el archivo '%1' para escritura. @@ -557,67 +557,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Aristas visibles - + Visible smooth edges Bordes suavizados visibles - + Visible sewn edges Bordes cosidos visibles - + Visible outline edges Aristas de contorno visibles - + Visible isoparameters Isoparámetros visibles - + Hidden sharp edges Aristas ocultas - + Hidden smooth edges oculta aristas no vivas - + Hidden sewn edges Aristas ocultas cosidas - + Hidden outline edges Aristas de contorno ocultas - + Hidden isoparameters Isoparámetros ocultos - + Project shapes Formas del proyecto - + No active document Ningún documento activo - + There is currently no active document to complete the operation Actualmente no hay documentación activa para completar la operación @@ -635,37 +635,37 @@ Do you want to continue? Drawing_NewPage - + Page Página - + Landscape Apaisado - + Portrait Vertical - + %1%2 %3 %1 %2 %3 - + Insert new %1%2 %3 drawing Inserte el nuevo dibujo de %1 %2 %3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Inserte nuevo dibujo %1%2 %3 (%4) @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Seleccionar un archivo SVG para abrir - - - + + + Scalable Vector Graphic Gráfico vectorial escalable - - - - - + + + + + Wrong selection Selección incorrecta - + Select a Part object. Seleccionar un objeto Pieza. - - - - - - + + + + + + No page found No se ha encontrado una página de dibujo - - - - - - + + + + + + Create a page first. Cree una página de dibujo primero. - + Select exactly one Part object. Seleccione un único objeto pieza. - - + + Select one Page object. Seleccionar un objeto Página. - + All Files Todos los Archivos - + Export page Exportar página - + Select exactly one Spreadsheet object. Seleccione exactamente un objeto de hoja de cálculo. - + Make axonometric... Hacer axonométricas... - + Edit axonometric settings... Editar configuración axonométricas... - + Make orthographic Hacer ortogonal diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts index 271c8b01bd..d2f14c07e4 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_eu.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Marrazkia - + &Annotation &Oharpena - - + + Inserts an Annotation view in the active drawing Oharpen-bista bat txertatzen du marrazki aktiboan @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Marrazkia - + &Clip &Ebaki - - + + Inserts a clip group in the active drawing Txertatu ebaketa talde bat marrazki aktiboan @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Marrazkia - + &Draft View &Zirriborratu bista - - + + Inserts a Draft view of the selected object(s) in the active drawing Txertatu marrazki aktiboan hautatutako objektu(ar)en Zirriborro ikuspegi bat @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Fitxategia - + &Export page... &Esportatu orria... - - + + Export a page to an SVG file Esportatu orri bat SVG fitxategi batera @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Marrazkia - - + + Insert new A3 landscape drawing Txertatu A3 tamainako marrazki horizontala @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Marrazkia - - + + Insert new drawing Txertatu marrazki berria @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Marrazkia - + Insert view in drawing Txertatu bista marrazkian - + Insert a new View of a Part in the active drawing Txertatu zati baten bista berria marrazki aktiboan @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Marrazkia - + Open &browser view Ireki &nabigatzailearen ikuspegia - - + + Opens the selected page in a browser view Hautatutako orria nabigatzaile batean irekitzen du @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Marrazkia - + Insert orthographic views Txertatu bista ortografikoak - + Insert an orthographic projection of a part in the active drawing Txertatu zati baten proiekzio ortografiko bat marrazki aktiboan @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Marrazkia - + Project shape... Proiektatu forma... - - + + Project shape onto a user-defined plane Proiektatu forma erabiltzaileak definitutako plano baten gainean @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Marrazkia - + &Spreadsheet View &Kalkulu-orria ikuspegia - - + + Inserts a view of a selected spreadsheet in the active drawing Hautatutako kalkulu-orri baten bista bat txertatzen du marrazki aktiboan @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Marrazkia - + &Symbol I&kurra - - + + Inserts a symbol from a svg file in the active drawing SVG fitxategi bateko ikur bat txertatzen du marrazki aktiboan @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Atzeko planoa - + &Outline &Eskema - + &Native &Jatorrizkoa - + &OpenGL &OpenGL - + &Image &Irudia - + &High Quality Antialiasing Kalitate &handiko antialiasing-a - + Open SVG File Ireki SVG fitxategia - + Could not open file '%1'. Ezin da '%1' fitxategia ireki. - + &Renderer E&rrendatzailea - + Export PDF Esportatu PDFa - + PDF file PDF fitxategia - + Page sizes Orri-tamainak - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientazio desberdina - + The printer uses a different orientation than the drawing. Do you want to continue? Inprimagailuak eta marrazkiak orientazio desberdina dute. Jarraitu nahi duzu? - - + + Different paper size Paper-tamaina desberdina - - + + The printer uses a different paper size than the drawing. Do you want to continue? Inprimagailuak eta marrazkiak paper-tamaina desberdina dute. Jarraitu nahi duzu? - + Opening file failed Fitxategia irekitzeak huts egin du - + Can't open file '%1' for writing. Ezin da '%1' fitxategia ireki hura idazteko. @@ -557,67 +557,67 @@ Jarraitu nahi duzu? DrawingGui::TaskProjection - + Visible sharp edges Ertz zorrotzak ikusgai - + Visible smooth edges Ertz leunak ikusgai - + Visible sewn edges Jositako ertz ikusgaiak - + Visible outline edges Eskemaren ertz ikusgarriak - + Visible isoparameters Isoparametroak ikusgai - + Hidden sharp edges Ertz zorrotz ezkutuak - + Hidden smooth edges Ezkutuko ertz leunak - + Hidden sewn edges Jositako ertz ezkutuak - + Hidden outline edges Eskemaren ertz ezkutuak - + Hidden isoparameters Ezkutuko isoparametroak - + Project shapes Proiektuaren formak - + No active document Ez dago dokumentu aktiborik - + There is currently no active document to complete the operation Une honetan ez dago dokumentu aktiborik eragiketa osatzeko @@ -635,37 +635,37 @@ Jarraitu nahi duzu? Drawing_NewPage - + Page Orrialdea - + Landscape Horizontala - + Portrait Bertikala - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Txertatu %1%2 %3 marrazki berria - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Txertatu %1%2 %3 (%4) marrazki berria @@ -673,93 +673,93 @@ Jarraitu nahi duzu? QObject - - + + Choose an SVG file to open Hautatu SVG fitxategi bat irekitzeko - - - + + + Scalable Vector Graphic Grafiko bektorial eskalagarria - - - - - + + + + + Wrong selection Hautapen okerra - + Select a Part object. Hautatu objektu zati bat. - - - - - - + + + + + + No page found Ez da orririk aurkitu - - - - - - + + + + + + Create a page first. Aldez aurretik sortu orri bat. - + Select exactly one Part object. Hautatu objektu zati zehatz bat. - - + + Select one Page object. Hautatu objektu-orri bat. - + All Files Fitxategi guztiak - + Export page Esportatu orria - + Select exactly one Spreadsheet object. Hautatu kalkulu-orri objektu zehatz bat. - + Make axonometric... Egin axonometrikoak... - + Edit axonometric settings... Editatu ezarpen axonometrikoak... - + Make orthographic Egin ortografikoa diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_fi.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_fi.ts index 9a8606c049..0fc0f0e3de 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_fi.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_fi.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Piirros - + &Annotation &Huomautukset - - + + Inserts an Annotation view in the active drawing Lisää huomautus aktiiviseen piirrustukseen @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Piirros - + &Clip &Leikkaa - - + + Inserts a clip group in the active drawing Lisää leikeryhmän aktiiviseen tekniseen piirustukseen @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Piirros - + &Draft View & Vedosnäkymä - - + + Inserts a Draft view of the selected object(s) in the active drawing Lisää valitun kohteen (kohteiden) vedosnäkymän aktiivisessa piirroksessa @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Tiedosto - + &Export page... &Vie sivu... - - + + Export a page to an SVG file Vie sivu SVG-tiedostoon @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Piirros - - + + Insert new A3 landscape drawing Lisää uusi A3 piirustus @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Piirros - - + + Insert new drawing Lisää uusi piirros @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Piirros - + Insert view in drawing Lisää näkymä piirrokseen - + Insert a new View of a Part in the active drawing Lisää uusi näkymä aktiivisen piirustuksen osaan @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Piirros - + Open &browser view Avaa &selaimen näkymä - - + + Opens the selected page in a browser view Avaa valitun sivun selainnäkymässä @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Piirros - + Insert orthographic views Lisää ortografisia näkymiä - + Insert an orthographic projection of a part in the active drawing Lisää ortografinen projektio aktiivisen teknisen piirroksen osaan @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Piirros - + Project shape... Projektin muoto... - - + + Project shape onto a user-defined plane Projektin muoto käyttäjän määrittelemän tason päälle @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Piirros - + &Spreadsheet View Taulukkonäkymä - - + + Inserts a view of a selected spreadsheet in the active drawing Lisää valitun kohteen vedosnäkymän aktiivisessa piirroksessa @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Piirros - + &Symbol & Symboli - - + + Inserts a symbol from a svg file in the active drawing Lisää symbolin svg-tiedostosta aktiiviseen piirrokseen @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Tausta - + &Outline &Jäsennys - + &Native &Paikallinen - + &OpenGL &OpenGL - + &Image &Kuva - + &High Quality Antialiasing &Korkealaatuinen reunojen pehmennys - + Open SVG File Avaa SVG-tiedosto - + Could not open file '%1'. Tiedostoa '%1' ei voitu avata. - + &Renderer &Renderöinti - + Export PDF Vie PDF-asiakirjaan - + PDF file PDF-tiedosto - + Page sizes Sivukoot - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Erilainen sivun suunta - + The printer uses a different orientation than the drawing. Do you want to continue? Tulostin käyttää eri paperisuuntaa kuin piirroksesi. Haluatko jatkaa? - - + + Different paper size Erilainen paperikoko - - + + The printer uses a different paper size than the drawing. Do you want to continue? Tulostin käyttää eri paperikokoa kuin piirros. Haluatko jatkaa? - + Opening file failed Tiedoston avaaminen epäonnistui - + Can't open file '%1' for writing. Tiedostoon ”%1” ei voida tallentaa. @@ -557,67 +557,67 @@ Haluatko jatkaa? DrawingGui::TaskProjection - + Visible sharp edges Näkyvät terävät reunat - + Visible smooth edges Näkyvät pehmeät reunat - + Visible sewn edges Näkyvät pehmeäkantiset reunat - + Visible outline edges Näytä jäsennyksen reunat - + Visible isoparameters Näytä isoparametriset - + Hidden sharp edges Piilotetut terävät reunat - + Hidden smooth edges Piilotetut pehmeät reunat - + Hidden sewn edges Piilotetut pehmeäkantiset reunat - + Hidden outline edges Piilotetut ääriviivojen reunat - + Hidden isoparameters Piilotetut isoparametrit - + Project shapes Projektin muodot - + No active document Ei aktiivista dokumenttia - + There is currently no active document to complete the operation Toiminnon loppuun saattamiseen ei tällä hetkellä ole aktiivista asiakirjaa @@ -635,37 +635,37 @@ Haluatko jatkaa? Drawing_NewPage - + Page Sivu - + Landscape Vaakasuora - + Portrait Pystysuora - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Lisää uusi %1%2 %3 piirros - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Laita uusi %1%2 %3 (%4) piirros @@ -673,93 +673,93 @@ Haluatko jatkaa? QObject - - + + Choose an SVG file to open Valitse avattava SVG-tiedosto - - - + + + Scalable Vector Graphic Skaalautuva vektorigrafiikka - - - - - + + + + + Wrong selection Väärä valinta - + Select a Part object. Valitse osa-objekti. - - - - - - + + + + + + No page found Sivua ei löydy - - - - - - + + + + + + Create a page first. Luo sivu ensin. - + Select exactly one Part object. Valitse täsmälleen yksi osa-kohde. - - + + Select one Page object. Valitse yksi sivu-objekti. - + All Files Kaikki tiedostot - + Export page Vie sivu - + Select exactly one Spreadsheet object. Valitse täsmälleen yksi taulukkokohde. - + Make axonometric... Tee aksonometrisenä... - + Edit axonometric settings... Muokkaa aksonometrisiä asetuksia... - + Make orthographic Tee ortograafinen diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_fr.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_fr.ts index dd33caa88a..7b352a05fa 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_fr.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_fr.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Mise en plan - + &Annotation &Annotation - - + + Inserts an Annotation view in the active drawing Insère une annotation sur la feuille active @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Dessin - + &Clip &Masque - - + + Inserts a clip group in the active drawing Insère un groupe de masquage sur la feuille active @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Mise en plan - + &Draft View Vue &Draft - - + + Inserts a Draft view of the selected object(s) in the active drawing Insère une vue brouillon des objets sélectionnés dans le dessin actif @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Fichier - + &Export page... &Exporter la page... - - + + Export a page to an SVG file Exporter une page vers un fichier SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Mise en plan - - + + Insert new A3 landscape drawing Insère une nouvelle feuille A3 paysage @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Mise en plan - - + + Insert new drawing Insérer une nouvelle feuille @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Mise en plan - + Insert view in drawing Insérer une vue dans la page - + Insert a new View of a Part in the active drawing Insérer une nouvelle vue de la pièce dans la page active @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Mise en plan - + Open &browser view Vue &web - - + + Opens the selected page in a browser view Ouvre la feuille sélectionnée dans le navigateur web @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Mise en plan - + Insert orthographic views Insérer des vues orthogonales - + Insert an orthographic projection of a part in the active drawing Insérer une projection orthogonale d'une forme sur la feuille active @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Mise en plan - + Project shape... Projeter la forme... - - + + Project shape onto a user-defined plane Projeter une forme sur un plan défini par l'utilisateur @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Mise en plan - + &Spreadsheet View Vue &feuille de calcul - - + + Inserts a view of a selected spreadsheet in the active drawing Insère une vue d'une feuille de calcul sélectionnée sur le dessin actif @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Mise en plan - + &Symbol &Symbole - - + + Inserts a symbol from a svg file in the active drawing Insère un symbole à partir d'un fichier svg dans la mise en plan active @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background &Arrière-plan - + &Outline &Contour - + &Native &Natif - + &OpenGL &OpenGL - + &Image &Image - + &High Quality Antialiasing Anticrénelage &haute qualité - + Open SVG File Ouvrir un fichier SVG - + Could not open file '%1'. Impossible d'ouvrir le fichier '%1'. - + &Renderer Moteur de &rendu - + Export PDF Exporter vers PDF - + PDF file Fichier PDF - + Page sizes Formats de papier - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientation différente - + The printer uses a different orientation than the drawing. Do you want to continue? L'imprimante utilise une orientation différente que celle du dessin. Voulez-vous continuer ? - - + + Different paper size Format de papier différent - - + + The printer uses a different paper size than the drawing. Do you want to continue? L'imprimante utilise un format de papier différent que le dessin. Voulez-vous continuer ? - + Opening file failed L'ouverture du fichier a échoué - + Can't open file '%1' for writing. Le fichier '%1' n'accepte pas l'écriture. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Arêtes vives visibles - + Visible smooth edges Arêtes de tangence visibles - + Visible sewn edges Arêtes cousues visibles - + Visible outline edges Arêtes de contour visibles - + Visible isoparameters Isoparamètres visibles - + Hidden sharp edges Arêtes vives masquées - + Hidden smooth edges Arêtes de tangence masquées - + Hidden sewn edges Arêtes cousues masquées - + Hidden outline edges Arêtes de contour masquées - + Hidden isoparameters Isoparamètres masqués - + Project shapes Projeter les formes - + No active document Aucun document actif - + There is currently no active document to complete the operation Il n'y a actuellement aucun document actif pour terminer l'opération @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Feuille - + Landscape Paysage - + Portrait Portrait - + %1%2 %3 %1 %2 %3 - + Insert new %1%2 %3 drawing Insérer le nouveau %1 %2 %3 dessin - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Insérer le nouveau dessin %1 %2 %3 (%4) @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Choisir un fichier SVG à ouvrir - - - + + + Scalable Vector Graphic Graphique Vectoriel Adaptable (Svg) - - - - - + + + + + Wrong selection Mauvaise sélection - + Select a Part object. Sélectionnez un objet pièce. - - - - - - + + + + + + No page found Aucune page trouvée - - - - - - + + + + + + Create a page first. Créer d'abord une page. - + Select exactly one Part object. Sélectionnez exactement un seul objet Pièce. - - + + Select one Page object. Sélectionnez un objet Page. - + All Files Tous les fichiers - + Export page Exporter la page - + Select exactly one Spreadsheet object. Merci de sélectionner un seul objet Spreadsheet - + Make axonometric... Rendre axonométrique... - + Edit axonometric settings... Editer les paramètres axonométriques... - + Make orthographic Rendre orthographique diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_gl.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_gl.ts index 605e054424..df471ea12c 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_gl.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_gl.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Debuxo - + &Annotation &Apuntamento - - + + Inserts an Annotation view in the active drawing Insire un Apuntamento no debuxo actual @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Debuxo - + &Clip &Recortar - - + + Inserts a clip group in the active drawing Insire un grupo "clip" no debuxo actual @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Debuxo - + &Draft View &Vista Bosquexo - - + + Inserts a Draft view of the selected object(s) in the active drawing Insire unha vista dos obxectos Bosquexo escolmados da folla activa @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Ficheiro - + &Export page... &Exportar páxina... - - + + Export a page to an SVG file Exportar unha páxina a un ficheiro SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Debuxo - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Debuxo - - + + Insert new drawing Inserir novo debuxo @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Debuxo - + Insert view in drawing Inserir unha vista no debuxo - + Insert a new View of a Part in the active drawing Inserir unha nova Vista de Peza no debuxo activo @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Debuxo - + Open &browser view Abrir &vista de buscador - - + + Opens the selected page in a browser view Abre a páxina escollida nunha vista de buscador @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Debuxo - + Insert orthographic views Inserir vistas ortogonais - + Insert an orthographic projection of a part in the active drawing Insire unha proxección ortogonal duna peza no debuxo actual @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Debuxo - + Project shape... Proxectar forma... - - + + Project shape onto a user-defined plane Proxecta unha forma sobre un plano definido pelo usuario @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Debuxo - + &Spreadsheet View &Vista de folla de cálculo - - + + Inserts a view of a selected spreadsheet in the active drawing Insire unha vista da folla de cálculo escollida no debuxo activo @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Debuxo - + &Symbol &Símbolo - - + + Inserts a symbol from a svg file in the active drawing Insire un símbolo dende un ficheiro svg no debuxo activo @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Fondo - + &Outline &Contorna - + &Native &Nativo - + &OpenGL &OpenGL - + &Image &Imaxe - + &High Quality Antialiasing &Ante-entrelazado de alta calidade - + Open SVG File Abrir ficheiro SVG - + Could not open file '%1'. Non se puido abrir o ficheiro '%1'. - + &Renderer &Renderización - + Export PDF Exportar en PDF - + PDF file Ficheiro PDF - + Page sizes Tamaños de páxina - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientación diferente - + The printer uses a different orientation than the drawing. Do you want to continue? A impresora usa diferente orientación que o deseño. Queres continuar? - - + + Different paper size Tamaño de papel diferente - - + + The printer uses a different paper size than the drawing. Do you want to continue? A impresora usa un tamaño de papel diferente do do debuxo. Quere seguir? - + Opening file failed Falla ó abrir o ficheiro - + Can't open file '%1' for writing. Non se pode abrir o ficheiro '%1' para escrita. @@ -557,67 +557,67 @@ Quere seguir? DrawingGui::TaskProjection - + Visible sharp edges Arestas vivas visíbeis - + Visible smooth edges Arestas suaves visíbeis - + Visible sewn edges Arestas cosidas visíbeis - + Visible outline edges Arestas de contorno visíbeis - + Visible isoparameters Isoparámetros visíbeis - + Hidden sharp edges Ocultar arestas vivas - + Hidden smooth edges Ocultar arestas suaves - + Hidden sewn edges Arestas cosidas ocultas - + Hidden outline edges Arestas de contorna ocultas - + Hidden isoparameters Isoparámetros ocultos - + Project shapes Proxectar formas - + No active document Ningún documento activo - + There is currently no active document to complete the operation Neste intre non hai documentación activa para completar a operación @@ -635,37 +635,37 @@ Quere seguir? Drawing_NewPage - + Page Páxina - + Landscape Horizontal - + Portrait Vertical - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Insire o novo debuxo de %1%2 %3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Insire o novo debuxo de %1%2 %3 (%4) @@ -673,93 +673,93 @@ Quere seguir? QObject - - + + Choose an SVG file to open Escolme un ficheiro SVG para abrir - - - + + + Scalable Vector Graphic Gráfico vectorial escalábel - - - - - + + + + + Wrong selection Escolma errada - + Select a Part object. Escolme un obxecto Peza. - - - - - - + + + + + + No page found Páxina non atopada - - - - - - + + + + + + Create a page first. Primeiro, cree unha páxina. - + Select exactly one Part object. Escolme só un obxecto Peza. - - + + Select one Page object. Escolme un obxecto Páxina. - + All Files Tódolos ficheiros - + Export page Exportar páxina - + Select exactly one Spreadsheet object. Escolme só un obxecto Folla de cálculo. - + Make axonometric... Facer axonométrica... - + Edit axonometric settings... Editar configuracións axonométricas... - + Make orthographic Facer ortogonal diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_hr.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_hr.ts index 725f3627a8..50502ae90d 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_hr.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_hr.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Crtež - + &Annotation Anotacija - - + + Inserts an Annotation view in the active drawing Dodaje anotacijski pogled aktivnom crtežu @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Crtež - + &Clip &Izrez - - + + Inserts a clip group in the active drawing Dodaje izrezanu grupu aktivnom pogledu @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Crtež - + &Draft View Prikaz &Crteža - - + + Inserts a Draft view of the selected object(s) in the active drawing Umetnite prikaz(e) crteža u aktivni crtež @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Datoteka - + &Export page... Izvedi stranicu... - - + + Export a page to an SVG file Izvoz stranicu za SVG datoteku @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Crtež - - + + Insert new A3 landscape drawing Umetanje novog A3 pejzaža za crtanje @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Crtež - - + + Insert new drawing Umetni novi crtež @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Crtež - + Insert view in drawing Umetnite pogled u crtežu - + Insert a new View of a Part in the active drawing Umetnite novi pogled na dio u aktivnom crtežu @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Crtež - + Open &browser view Otvori za pregledavanje - - + + Opens the selected page in a browser view Otvara odabrani crtež u modu pregledavanja @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Crtež - + Insert orthographic views Umetni ortografske poglede - + Insert an orthographic projection of a part in the active drawing Postavi ortografsku projekciju parta u aktivnom crtežu @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Crtež - + Project shape... Projecirani oblik ... - - + + Project shape onto a user-defined plane Projeciraj oblik na korisnički definiranu ravninu @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Crtež - + &Spreadsheet View Prikaz &Tabela - - + + Inserts a view of a selected spreadsheet in the active drawing Umetnite prikaz(e) tabele(a) u aktivni crtež @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Crtež - + &Symbol &Simbol - - + + Inserts a symbol from a svg file in the active drawing Umetni simbol iz SVG dokumenta u aktivni crtež @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background &Pozadina - + &Outline &Obrub - + &Native &Prirodan - + &OpenGL &OpenGL - + &Image &Slika - + &High Quality Antialiasing &Visko kvalitetno zaglađivanje nazubljenosti - + Open SVG File Otvori SVG datoteku - + Could not open file '%1'. Nije moguće otvoriti datoteku '%1. - + &Renderer &Iscrtavanje - + Export PDF Izvoz PDF - + PDF file PDF Datoteka - + Page sizes Veličine stranica - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Drugačija orijentacija - + The printer uses a different orientation than the drawing. Do you want to continue? Pisač koristi drugu orijentaciju ispisa nego što je u crtežu. Želite li nastaviti? - - + + Different paper size Drugačija veličina papira - - + + The printer uses a different paper size than the drawing. Do you want to continue? Pisač koristi drugu veličinu papra nego što je u crtežu. Želite li nastaviti? - + Opening file failed Otvaranje dokumenta nije uspjelo - + Can't open file '%1' for writing. Ne mogu otvoriti dokument '%1' za ispis. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Vidljivi oštri rubovi - + Visible smooth edges Vidljivi glatki rubovi - + Visible sewn edges Vidljivi iscrtkani rubovi - + Visible outline edges Vidljivi vanjski rubovi - + Visible isoparameters Vidljivi izometrijski parametri - + Hidden sharp edges Skriveni oštri rubovi - + Hidden smooth edges Skriveni glatki rubovi - + Hidden sewn edges Skriveni iscrtkani rubovi - + Hidden outline edges Skriveni vanjski rubovi - + Hidden isoparameters Skriveni izometrijski parametri - + Project shapes Projecirani oblik - + No active document Nema aktivnog dokumenta - + There is currently no active document to complete the operation Trenutno nema aktivnog dokumenta za završetak postupka @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Stranica - + Landscape Pejzaž - + Portrait Portret - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Umetanje novog %1%2 %3 crteža - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Umetanje novog %1%2 %3 (%4) crteža @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Odaberite SVG datoteku za otvaranje - - - + + + Scalable Vector Graphic Skalabilna vektorska grafika - - - - - + + + + + Wrong selection Pogrešan odabir - + Select a Part object. Odaberite dio objekta. - - - - - - + + + + + + No page found Stranica nije pronađena - - - - - - + + + + + + Create a page first. Najprije napravite stranicu. - + Select exactly one Part object. Odaberite točno jedan Dio-objekt. - - + + Select one Page object. Odaberite jednu stranicu objekta - + All Files Sve datoteke - + Export page Izvedi stranicu - + Select exactly one Spreadsheet object. Odaberite točno jedan objekt tablice. - + Make axonometric... Napraviti aksonometrijski... - + Edit axonometric settings... Uređivanje aksonometrijskih postavki... - + Make orthographic Napraviti orografski diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts index 6470ed3162..ed624f3847 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_hu.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Rajz - + &Annotation Szövegmagyarázat - - + + Inserts an Annotation view in the active drawing Egy jegyzet nézet beillesztése az aktív rajzba @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Rajz - + &Clip Kivágás - - + + Inserts a clip group in the active drawing Kivágás csoport beillesztése az aktív rajzba @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Rajz - + &Draft View Tervrajz nézet - - + + Inserts a Draft view of the selected object(s) in the active drawing Beilleszt a kiválasztott tárgy(ak)ról egy Tervezet nézetet az aktív rajzba @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Fájl - + &Export page... Oldal exportálása... - - + + Export a page to an SVG file Egy oldal exportálása SVG-fájlba @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Rajz - - + + Insert new A3 landscape drawing Új A3 fekvő rajzot illeszt @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Rajz - - + + Insert new drawing Új rajz beszúrása @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Rajz - + Insert view in drawing Nézet beszúrása a rajzba - + Insert a new View of a Part in the active drawing Egy rész új nézetének beszúrása az aktív rajzba @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Rajz - + Open &browser view &Böngészőnézet megnyitása - - + + Opens the selected page in a browser view Megnyitja a kijelölt oldalt egy böngészőnézetben @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Rajz - + Insert orthographic views Merőleges vetítés nézetek beszúrása - + Insert an orthographic projection of a part in the active drawing Az aktív rajz egy részének a merőleges vetítés beszúrása @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Rajz - + Project shape... Terv formák... - - + + Project shape onto a user-defined plane A felhasználó által meghatározott síkra vetített formák @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Rajz - + &Spreadsheet View &Számolótábla megtekintése - - + + Inserts a view of a selected spreadsheet in the active drawing Alkatrészlista beillesztése az aktív rajzba @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Rajz - + &Symbol &Szimbólum - - + + Inserts a symbol from a svg file in the active drawing Egy szimbólumot szúr be az aktív rajzon szereplő svg-fájlból @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background Háttér - + &Outline Körvonal - + &Native &Natív - + &OpenGL &OpenGL - + &Image Kép - + &High Quality Antialiasing Magas minőségű élsimítás - + Open SVG File SVG fájl megnyitása - + Could not open file '%1'. Nem sikerült megnyitni a '%1'fájlt. - + &Renderer Renderelő - + Export PDF Exportálás PDF-be - + PDF file PDF-fájl - + Page sizes Oldalméretek - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Eltérő tájolású - + The printer uses a different orientation than the drawing. Do you want to continue? A nyomtató a rajztól eltérő tájolást használ. Szeretné folytatni? - - + + Different paper size Eltérő papírméret - - + + The printer uses a different paper size than the drawing. Do you want to continue? A nyomtató a rajztól eltérő méretű papír méretet használ. Szeretné folytatni? - + Opening file failed Fájl megnyitása sikertelen - + Can't open file '%1' for writing. Nem lehet megnyitni a(z) '%1' fájlt írásra. @@ -557,67 +557,67 @@ Szeretné folytatni? DrawingGui::TaskProjection - + Visible sharp edges Látható éles élek - + Visible smooth edges Látható simított élek - + Visible sewn edges Látható varrott élek - + Visible outline edges Látható körvonal élek - + Visible isoparameters Látható isoparaméterek - + Hidden sharp edges Rejtett éles élek - + Hidden smooth edges Rejtett simított élek - + Hidden sewn edges Rejtett varrott élek - + Hidden outline edges Rejtett vázlat élek - + Hidden isoparameters Rejtett iso-paraméterek - + Project shapes Terv formák - + No active document Nincs aktív dokumentum - + There is currently no active document to complete the operation A művelet elvégzéséhez jelenleg nincs aktív dokumentum @@ -635,37 +635,37 @@ Szeretné folytatni? Drawing_NewPage - + Page Oldal - + Landscape Fekvő - + Portrait Álló - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Új %1%2 %3 rajz beszúrása - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Új %1%2 %3 (%4) rajz beszúrása @@ -673,93 +673,93 @@ Szeretné folytatni? QObject - - + + Choose an SVG file to open SVG fájl kiválasztása megnyitáshoz - - - + + + Scalable Vector Graphic Méretezhető vektorgrafika - - - - - + + + + + Wrong selection Nem megfelelő kiválasztás - + Select a Part object. Objektum rész kiválasztása. - - - - - - + + + + + + No page found Az oldal nem található - - - - - - + + + + + + Create a page first. Először hozzon létre egy oldalt. - + Select exactly one Part object. Jelöljön ki pontosan egy tárgy alkotórészt. - - + + Select one Page object. Válasszon ki egy teljes oldal tárgyat. - + All Files Összes fájl - + Export page Oldal exportálása - + Select exactly one Spreadsheet object. Jelöljön ki pontosan egy számolótábla tárgyat. - + Make axonometric... Axonometrikus létrehozás... - + Edit axonometric settings... Axonometrikus beállítások szerkesztése... - + Make orthographic Ortografikus létrehozás diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_id.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_id.ts index 3b984c1d5f..6de82d502d 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_id.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_id.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Gambar - + &Annotation &Annotation - - + + Inserts an Annotation view in the active drawing Inserts an Annotation view in the active drawing @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Gambar - + &Clip & Klip - - + + Inserts a clip group in the active drawing Memasukkan sekelompok klip dalam gambar aktif @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Gambar - + &Draft View & Rancangan View - - + + Inserts a Draft view of the selected object(s) in the active drawing Menyisipkan Draft pandangan dari objek yang dipilih (s) dalam aktif menggambar @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Mengajukan - + &Export page... & Halaman Ekspor... - - + + Export a page to an SVG file Mengekspor halaman ke file SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Gambar - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Gambar - - + + Insert new drawing Menyisipkan gambar baru @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Gambar - + Insert view in drawing Masukkan tampilan dalam gambar - + Insert a new View of a Part in the active drawing Masukkan Tampilan Baru dari Bagian dalam gambar aktif @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Gambar - + Open &browser view Buka & tampilan browser - - + + Opens the selected page in a browser view Membuka halaman yang dipilih dalam browser tampilan @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Gambar - + Insert orthographic views Masukkan tampilan ortografi - + Insert an orthographic projection of a part in the active drawing Masukkan proyeksi ortografi bagian dalam gambar aktif @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Gambar - + Project shape... Bentuk proyek... - - + + Project shape onto a user-defined plane Bentuk proyek ke pesawat yang ditentukan pengguna @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Gambar - + &Spreadsheet View & Tampilan Spreadsheet - - + + Inserts a view of a selected spreadsheet in the active drawing Menyisipkan tampilan spreadsheet terpilih dalam gambar aktif @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Gambar - + &Symbol &Simbol - - + + Inserts a symbol from a svg file in the active drawing Sisipan simbol dari file svg dalam gambar aktif @@ -238,127 +238,127 @@ DrawingGui::DrawingView - + &Background &Latar Belakang - + &Outline &Garis besar - + &Native &Asli - + &OpenGL & OpenGL - + &Image &Gambar - + &High Quality Antialiasing & Antialiasing Berkualitas Tinggi - + Open SVG File Buka Berkas SVG - + Could not open file '%1'. Tidak bisa membuka file ' % 1 '. - + &Renderer & Renderer - + Export PDF Ekspor PDF - + PDF file File PDF - + Page sizes Ukuran halaman - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientasi berbeda - + The printer uses a different orientation than the drawing. Do you want to continue? Printer menggunakan orientasi yang berbeda dari gambar. Apakah Anda ingin melanjutkan? - - + + Different paper size Ukuran kertas berbeda - - + + The printer uses a different paper size than the drawing. Do you want to continue? Printer menggunakan ukuran kertas yang berbeda dari pada gambar. Apakah Anda ingin melanjutkan? - + Opening file failed Membuka file gagal - + Can't open file '%1' for writing. Tidak bisa membuka file ' % 1 ' untuk tulisan. @@ -556,67 +556,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Terlihat tepi yang tajam - + Visible smooth edges Terlihat tepi halus - + Visible sewn edges Terlihat tepi yang dijahit - + Visible outline edges Tepi garis besar terlihat - + Visible isoparameters Terlihat isoparameter - + Hidden sharp edges Tepi tajam tersembunyi - + Hidden smooth edges Tepi yang tersembunyi tersembunyi - + Hidden sewn edges Tepi tersembunyi yang tersembunyi - + Hidden outline edges Garis tepi tersembunyi - + Hidden isoparameters Isoparameter tersembunyi - + Project shapes Bentuk proyek - + No active document Tidak ada dokumen aktif - + There is currently no active document to complete the operation Saat ini tidak ada dokumen aktif untuk menyelesaikan operasi @@ -634,37 +634,37 @@ Do you want to continue? Drawing_NewPage - + Page Halaman - + Landscape Pemandangan - + Portrait Potret - + %1%2 %3 % 1 % 2 % 3 - + Insert new %1%2 %3 drawing Sisipkan baru % 1 % 2 % 3 menggambar - + %1%2 %3 (%4) % 1 % 2 % 3 ( % 4) - + Insert new %1%2 %3 (%4) drawing Sisipkan baru % 1 % 2 % 3 ( % 4) menggambar @@ -672,93 +672,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Pilih file SVG untuk membuka - - - + + + Scalable Vector Graphic Scalable Vector Graphic - - - - - + + + + + Wrong selection Pilihan salah - + Select a Part object. Pilih objek Bagian. - - - - - - + + + + + + No page found Tidak ditemukan halaman - - - - - - + + + + + + Create a page first. Buat halaman terlebih dahulu. - + Select exactly one Part object. Pilih salah satu bagian objek. - - + + Select one Page object. Pilih satu objek Halaman. - + All Files Semua data - + Export page Halaman ekspor - + Select exactly one Spreadsheet object. Pilih salah satu objek Spreadsheet. - + Make axonometric... Membuat axonometric... - + Edit axonometric settings... Edit pengaturan axonometric... - + Make orthographic Buat ortografi diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_it.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_it.ts index cee32d279e..d70d878ed2 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_it.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_it.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Disegno - + &Annotation &Annotazione - - + + Inserts an Annotation view in the active drawing Inserisce un'annotazione nel disegno attivo @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Disegno - + &Clip &Clip - - + + Inserts a clip group in the active drawing Inserisce un gruppo clip nel disegno attivo @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Disegno - + &Draft View Vista &Draft - - + + Inserts a Draft view of the selected object(s) in the active drawing Inserisce nel disegno attivo una vista Draft dell'oggetto(i) selezionato @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File File - + &Export page... &Esporta pagina... - - + + Export a page to an SVG file Esporta una pagina in un file SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Disegno - - + + Insert new A3 landscape drawing Inserisci un nuovo disegno A3 orizzontale @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Disegno - - + + Insert new drawing Inserisci nuovo disegno @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Disegno - + Insert view in drawing Inserisci vista nel disegno - + Insert a new View of a Part in the active drawing Inserisce una nuova vista di una parte nel disegno attivo @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Disegno - + Open &browser view Apri finestra &browser - - + + Opens the selected page in a browser view Visualizza la pagina selezionata in una vista browser @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Disegno - + Insert orthographic views Inserisci viste ortogonali - + Insert an orthographic projection of a part in the active drawing Inserisce una proiezione ortogonale di una parte nel disegno attivo @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Disegno - + Project shape... Proietta le forme... - - + + Project shape onto a user-defined plane Proietta una forma su di un piano definito dall'utente @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Disegno - + &Spreadsheet View Vi&sta foglio di calcolo - - + + Inserts a view of a selected spreadsheet in the active drawing Inserisce nel disegno attivo una vista di un foglio di calcolo selezionato @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Disegno - + &Symbol &Simbolo - - + + Inserts a symbol from a svg file in the active drawing Inserisce un simbolo da un file svg nel disegno attivo @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background &Sfondo - + &Outline C&ontorno - + &Native &Nativo - + &OpenGL &OpenGL - + &Image &Immagine - + &High Quality Antialiasing &Antialiasing di qualità elevata - + Open SVG File Apri file SVG - + Could not open file '%1'. Impossibile aprire il file '%1'. - + &Renderer &Renderizzatore - + Export PDF Esporta PDF - + PDF file File PDF - + Page sizes Dimensioni pagina - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientamento diverso - + The printer uses a different orientation than the drawing. Do you want to continue? La stampante utilizza un orientamento diverso rispetto al disegno. Si desidera continuare? - - + + Different paper size Formato carta diverso - - + + The printer uses a different paper size than the drawing. Do you want to continue? La stampante utilizza un formato di carta diverso rispetto al disegno. Si desidera continuare? - + Opening file failed Apertura del file non riuscita - + Can't open file '%1' for writing. Impossibile aprire il file '%1' per la scrittura. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges mostra gli spigoli vivi - + Visible smooth edges Mostra i bordi dei raccordi - + Visible sewn edges Mostra i bordi cuciti - + Visible outline edges Mostra i bordi esterni - + Visible isoparameters Mostra le isoparametriche - + Hidden sharp edges Nascondi gli spigoli vivi - + Hidden smooth edges Nascondi i bordi dei raccordi - + Hidden sewn edges Nascondi i bordi cuciti - + Hidden outline edges Nascondi i bordi esterni - + Hidden isoparameters Nascondi le isoparametriche - + Project shapes Proietta le forme - + No active document Nessun documento attivo - + There is currently no active document to complete the operation Attualmente non esiste alcun documento attivo per completare l'operazione @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Pagina - + Landscape Orizzontale - + Portrait Verticale - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Inserisci nuovo disegno %1 %2 %3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Inserire il nuovo disegno %1%2 %3 (%4) @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Seleziona un file SVG da aprire - - - + + + Scalable Vector Graphic Immagine vettoriale scalabile - - - - - + + + + + Wrong selection Selezione errata - + Select a Part object. Seleziona un oggetto Parte. - - - - - - + + + + + + No page found Nessuna pagina trovata - - - - - - + + + + + + Create a page first. Prima creare una pagina. - + Select exactly one Part object. Selezionare un solo oggetto Parte. - - + + Select one Page object. Seleziona un oggetto Pagina. - + All Files Tutti i file - + Export page Esporta pagina - + Select exactly one Spreadsheet object. Selezionare un solo oggetto Foglio di calcolo. - + Make axonometric... Rendi assonometrica... - + Edit axonometric settings... Modifica impostazioni assonometriche... - + Make orthographic Rendi ortogonale diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ja.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ja.ts index 9fbe3922e8..5831550a0b 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ja.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ja.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing 図面 - + &Annotation 注釈(&A) - - + + Inserts an Annotation view in the active drawing アクティブな図面に注釈表示を挿入 @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing 図面 - + &Clip クリップ(&C) - - + + Inserts a clip group in the active drawing アクティブな図面にクリップグループを挿入 @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing 図面 - + &Draft View ドラフト・ビュー(&D) - - + + Inserts a Draft view of the selected object(s) in the active drawing アクティブな図面に選択したオブジェクトのドラフト・ビューを挿入 @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File ファイル - + &Export page... ページをエクスポート(&E)... - - + + Export a page to an SVG file ページをSVGファイルにエクスポート @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing 図面 - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing 図面 - - + + Insert new drawing 新しい図面を挿入 @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing 図面 - + Insert view in drawing 図面にビューを挿入 - + Insert a new View of a Part in the active drawing アクティブな図面に新しい部品の表示を挿入 @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing 図面 - + Open &browser view ブラウザ表示を開く(&b) - - + + Opens the selected page in a browser view ブラウザ表示で選択されているページを開く @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing 図面 - + Insert orthographic views 正投影表示を挿入 - + Insert an orthographic projection of a part in the active drawing アクティブな図面に部品の正投影図を挿入 @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing 図面 - + Project shape... 形状を投影... - - + + Project shape onto a user-defined plane ユーザー定義面上に形状を投影 @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing 図面 - + &Spreadsheet View スプレッドシートビュー(&S) - - + + Inserts a view of a selected spreadsheet in the active drawing アクティブな図面に選択したスプレッドシートのビューを挿入 @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing 図面 - + &Symbol シンボル(&S) - - + + Inserts a symbol from a svg file in the active drawing 記号をSVGファイルから現在の図面に挿入します @@ -238,127 +238,127 @@ DrawingGui::DrawingView - + &Background 背景(&B) - + &Outline アウトライン(&O) - + &Native ネィティブ(&N) - + &OpenGL OpenGL(&O) - + &Image 画像(&I) - + &High Quality Antialiasing 高品質アンチエイリアス(&H) - + Open SVG File SVGファイルを開く - + Could not open file '%1'. ファイル '%1' を開けませんでした。 - + &Renderer レンダラー(&R) - + Export PDF PDFファイル形式でエクスポート - + PDF file PDFファイル - + Page sizes ページサイズ - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation 異なる向き - + The printer uses a different orientation than the drawing. Do you want to continue? プリンターでは、図面と異なる印刷方向を使用します。続行しますか? - - + + Different paper size 別の用紙サイズ - - + + The printer uses a different paper size than the drawing. Do you want to continue? プリンターでは、図面とは異なる用紙サイズを使用します。 続行しますか? - + Opening file failed ファイルを開けませんでした。 - + Can't open file '%1' for writing. 書き込み用ファイル '%1' を開くことができません。 @@ -556,67 +556,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges 鋭角エッジ表示 - + Visible smooth edges スムースエッジ表示 - + Visible sewn edges 縫い合わせエッジ表示 - + Visible outline edges 外形エッジ表示 - + Visible isoparameters アイソパラメトリック曲線表示 - + Hidden sharp edges 鋭角エッジ非表示 - + Hidden smooth edges スムースエッジ非表示 - + Hidden sewn edges 縫い合わせエッジ非表示 - + Hidden outline edges 外形エッジ非表示 - + Hidden isoparameters アイソパラメトリック曲線の非表示 - + Project shapes 形状を投影 - + No active document アクティブなドキュメントがありません - + There is currently no active document to complete the operation 操作を完了するためのアクティブなドキュメントが現在ありません。 @@ -634,38 +634,38 @@ Do you want to continue? Drawing_NewPage - + Page ページ - + Landscape - + Portrait - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing 新しい %1 %2 %3 の図面を挿入 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing 新しい図面を %1%2 %3 (%4) で挿入します @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open 開くSVGファイルを選択 - - - + + + Scalable Vector Graphic スケーラブル・ベクター・グラフィック - - - - - + + + + + Wrong selection 誤った選択 - + Select a Part object. パーツオブジェクトを選択 - - - - - - + + + + + + No page found ページが見つかりません - - - - - - + + + + + + Create a page first. 最初にページを作成してください - + Select exactly one Part object. 部品オブジェクトを1 つだけ選択して下さい。 - - + + Select one Page object. ページオブジェクトを1つ選択 - + All Files すべてのファイル - + Export page ページをエクスポート - + Select exactly one Spreadsheet object. スプレッドシートオブジェクトを1 つだけ選択して下さい。 - + Make axonometric... 不等角投影図を作成... - + Edit axonometric settings... 不等角投影図の設定を編集... - + Make orthographic 正投影図を作成 diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ka.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ka.ts index 530a46f513..c6023271dd 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ka.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ka.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing ხაზვა - + &Annotation &შენიშვნა - - + + Inserts an Annotation view in the active drawing ჩასვამს ანოტაციის ხედს აქტიურ ნახაზში @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing ნახაზი - + &Clip &კვეთა - - + + Inserts a clip group in the active drawing კვეთების ჯგუფის აქტიურ ნახაზში ჩასმა @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing ნახაზი - + &Draft View ესკიზური ხედი - - + + Inserts a Draft view of the selected object(s) in the active drawing არჩეული ობიექტ(ებ)-ის ესკიზის აქტიურ ნახაზში ჩადება @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File ფაილი - + &Export page... &გვერდის გატანა... - - + + Export a page to an SVG file გვერდის SVG ფაილში გატანა @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing ნახაზი - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing - ხაზვა + ნახაზი - - + + Insert new drawing ახალი ნახაზის ჩასმა @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing ნახაზი - + Insert view in drawing ხედის ხაზში ჩასმა - + Insert a new View of a Part in the active drawing ჩასვამს ნაწილის ახალ ხედს აქტიურ ნახაზში @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing ნახაზი - + Open &browser view ბრაუზერში გახსნა - - + + Opens the selected page in a browser view არჩეული გვერდის ბრაუზერში გახსნა @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing ნახაზი - + Insert orthographic views ორთოგრაფიული ხედების ჩასმა - + Insert an orthographic projection of a part in the active drawing ნაწილის ორთოგრაფიული პროექცის აქტიურ ნახაზში ჩასმა @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing ნახაზი - + Project shape... ფიგურის პროექცია... - - + + Project shape onto a user-defined plane ფიგურის პროექცია მოცემულ სიბრტყეზე @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing ნახაზი - + &Spreadsheet View &ელცხრილის ხედი - - + + Inserts a view of a selected spreadsheet in the active drawing მონიშნული ელცხრილის ხედის აქტიურ ნახაზში ჩასმა @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing ნახაზი - + &Symbol &სიმბოლო - - + + Inserts a symbol from a svg file in the active drawing აქტიურ ნახაზში Svg ფაილიდან სიმბოლოს ჩასმა @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &ფონი - + &Outline გარემოხაზულობა - + &Native &ჩაშენებული - + &OpenGL &OpenGL - + &Image &გამოსახულება - + &High Quality Antialiasing &ფონტების მაღალი ხარისხის მოგლუვება - + Open SVG File SVG ფაილის გახსნა - + Could not open file '%1'. ვერ გავხსენი ფაილი %1. - + &Renderer &რენდერერი - + Export PDF PDF-ად გატანა - + PDF file PDF ფაილი - + Page sizes გვერდის ზომები - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation განსხვავებული ორიენტაცია - + The printer uses a different orientation than the drawing. Do you want to continue? პრინტერი იყენებს განსხვავებულ ორიენტაციას, ვიდრე ნახაზი. Გინდა გააგრძელო? - - + + Different paper size ფურცლის განსხვავებული ზომა - - + + The printer uses a different paper size than the drawing. Do you want to continue? პრინტერი იყენებს ქაღალდის განსხვავებულ ზომას, ვიდრე ნახაზი. Გინდა გააგრძელო? - + Opening file failed ფაილის გახსნის შეცდომა - + Can't open file '%1' for writing. ჩასაწერად ფაილის „%1“ გახსნა შეუძლებელია. @@ -557,67 +557,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges ხილული ბასრი წიბოები - + Visible smooth edges ხილული გლუვი წიბოები - + Visible sewn edges ხილული შეკერილი წიბოები - + Visible outline edges ხილული ნაპირა წიბოები - + Visible isoparameters ხილული იზოპარამეტრები - + Hidden sharp edges დამალული მახვილი წიბოები - + Hidden smooth edges დამალული გლუვი წიბოები - + Hidden sewn edges დამალული შეკერილი წიბოები - + Hidden outline edges დამალული ნაპირა წიბოები - + Hidden isoparameters დამალული იზოპარამეტრები - + Project shapes ფიგურების პროექციის მორგება - + No active document აქტიური დოკუმენტის გარეშე - + There is currently no active document to complete the operation ამჟამად ამ ოპერაციის დასასრულებლად აქტიური დოკუმენტი არ არსებობს @@ -635,37 +635,37 @@ Do you want to continue? Drawing_NewPage - + Page გვერდი - + Landscape ლანდშაფტური - + Portrait ვერტიკალური - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing ახალი %1%2%3 ჩასმა ნახაზი - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing ახალი %1%2%3 (%4) ნახაზი @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open აირჩიეთ გასახსნელი SVG ფაილი - - - + + + Scalable Vector Graphic მასშტაბირებადი ვექტორული გრაფიკა - - - - - + + + + + Wrong selection არასწორი არჩევანი - + Select a Part object. აირჩიეთ ნაწილის ობიექტი. - - - - - - + + + + + + No page found გვერდი არ მოიძებნა - - - - - - + + + + + + Create a page first. ჯერ შექმენით გვერდი. - + Select exactly one Part object. მონიშნეთ ზუსტად ერთი ნაწილის ტიპის ობიექტი. - - + + Select one Page object. აირჩიეთ ერთგვერდიანი ობიექტი. - + All Files ყველა ფაილი - + Export page გვერდის გატანა - + Select exactly one Spreadsheet object. აირჩიეთ ელცხრილის ზუსტად ერთი ობიექტი. - + Make axonometric... აქსონომეტრიულად გადაკეთება... - + Edit axonometric settings... აქსონომეტრიის პარამეტრების ჩასწორება... - + Make orthographic ორთოგრაფიულად გადაკეთება @@ -774,7 +774,7 @@ Do you want to continue? Drawing - ნახაზი + ხაზვა diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ko.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ko.ts index 5713afa0f4..536421205d 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ko.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ko.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing 드로잉 - + &Annotation 주석(&A) - - + + Inserts an Annotation view in the active drawing 활성 드로잉에서 주석 보기 삽입 @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing 드로잉 - + &Clip 클립(&C) - - + + Inserts a clip group in the active drawing 활성 도면에 클립 그룹을 삽입한다 @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing 드로잉 - + &Draft View 초안 보기(&D) - - + + Inserts a Draft view of the selected object(s) in the active drawing 활성도면에 선택된 물체(들)의 초안 뷰를 삽입한다 @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File 파일 - + &Export page... 페이지 내보내기(&E)... - - + + Export a page to an SVG file SVG 파일로 페이지 내보내기 @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing 드로잉 - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing 드로잉 - - + + Insert new drawing 새 도면 삽입 @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing 드로잉 - + Insert view in drawing 도면에 뷰 삽입 - + Insert a new View of a Part in the active drawing 활성 도면에 파트의 새로운 뷰를 삽입한다 @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing 드로잉 - + Open &browser view 브라우저 보기 열기(&B) - - + + Opens the selected page in a browser view 브라우져 화면에서 선택한 페이지 열기 @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing 드로잉 - + Insert orthographic views 직교 화면을 추가 - + Insert an orthographic projection of a part in the active drawing 활성화된 드로잉에서 파트의 직교 투영을 추가 @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing 드로잉 - + Project shape... 프로젝트 모양... - - + + Project shape onto a user-defined plane 사용자가 정의한 평면에 모양을 투영 @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing 드로잉 - + &Spreadsheet View 스프레드시트 보기(&S) - - + + Inserts a view of a selected spreadsheet in the active drawing 활성화된 드로잉에 선택한 스프레드 시트의 화면을 추가 @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing 드로잉 - + &Symbol 기호(&S) - - + + Inserts a symbol from a svg file in the active drawing 활성화된 드로잉에 SVG파일로부터 심벌을 추가 @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background 배경(&B) - + &Outline 윤곽선(&O) - + &Native 네이티브(&N) - + &OpenGL &OpenGL - + &Image 이미지(&I) - + &High Quality Antialiasing 고품질 앤티앨리어싱(&H) - + Open SVG File SVG 파일 열기 - + Could not open file '%1'. '%1' 파일을 열 수 없습니다. - + &Renderer 렌더러(&R) - + Export PDF PDF로 내보내기 - + PDF file PDF 파일 - + Page sizes 페이지 크기 - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation 다른 방향 - + The printer uses a different orientation than the drawing. Do you want to continue? 프린터 사용중인 방향이 현재 드로잉과는 다릅니다. 계속 진행하시겠습니까? - - + + Different paper size 다른 용지 크기 - - + + The printer uses a different paper size than the drawing. Do you want to continue? 프린터가 사용중인 종이 크기가 현재 드로잉과는 다릅니다. 계속 진행하시겠습니까? - + Opening file failed 파일 열기 실패 - + Can't open file '%1' for writing. 쓰기에 사용할 '%1' 파일을 열 수 없습니다. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges 눈에 보이는 날카로운 모서리 - + Visible smooth edges 눈에 보이는 부드러운 가장자리 - + Visible sewn edges 눈에 보이는 날카로운 모서리 - + Visible outline edges 보이는 윤곽선 가장자리 - + Visible isoparameters Visible isoparameters - + Hidden sharp edges 숨겨진 날카로운 모서리 - + Hidden smooth edges 숨겨진 매끄러운 모서리 - + Hidden sewn edges 숨겨진 날카로운 모서리 - + Hidden outline edges 보이는 윤곽선 가장자리 - + Hidden isoparameters Hidden isoparameters - + Project shapes 프로젝트 모양 - + No active document 활성 문서가 없습니다 - + There is currently no active document to complete the operation 현재 작업을 완료하기 위한 활성 문서가 없습니다. @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Page - + Landscape 가로 - + Portrait 세로 - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing 새 %1%2 %3 도면 삽입하기 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing 새 %1%2 %3 (%4) 도면 삽입하기 @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open 불러올 SVG 파일을 선택하세요 - - - + + + Scalable Vector Graphic 스케일러블 벡터 그래픽(SVG) - - - - - + + + + + Wrong selection 잘못 된 선택 - + Select a Part object. 부분 오브젝트를 선택합니다. - - - - - - + + + + + + No page found 페이지를 찾을 수 없습니다 - - - - - - + + + + + + Create a page first. 먼저 페이지를 작성합니다. - + Select exactly one Part object. 정확히 하나의 부분 오브젝트를 선택합니다. - - + + Select one Page object. 하나의 페이지 오브젝트를 선택합니다. - + All Files 모든 파일 - + Export page 페이지 내보내기 - + Select exactly one Spreadsheet object. 스프레드시트 오브젝트를 하나만 선택하십시오. - + Make axonometric... 부등각 투영을 만든다... - + Edit axonometric settings... Edit axonometric settings... - + Make orthographic Make orthographic diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_nl.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_nl.ts index 8c2b826ad9..23c437abe4 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_nl.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_nl.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Tekening - + &Annotation Aantekening - - + + Inserts an Annotation view in the active drawing Voeg een aantekening toe aan de actieve tekening @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Tekening - + &Clip &Clip - - + + Inserts a clip group in the active drawing Voegt een clipgroep in de actieve tekening in @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Tekening - + &Draft View &Concept weergave - - + + Inserts a Draft view of the selected object(s) in the active drawing Hiermee voegt u een conceptweergave van het/de geselecteerde object(en) in de actieve tekening @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Bestand - + &Export page... &Exporteer pagina... - - + + Export a page to an SVG file Een pagina naar een SVG-bestand exporteren @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Tekening - - + + Insert new A3 landscape drawing Nieuwe A3-liggend invoegen @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Tekening - - + + Insert new drawing Nieuwe tekening invoegen @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Tekening - + Insert view in drawing Een weergave in de tekening invoegen - + Insert a new View of a Part in the active drawing Een nieuwe weergave van een onderdeel in de actieve tekening invoegen @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Tekening - + Open &browser view Open &browser scherm - - + + Opens the selected page in a browser view Hiermee opent u de geselecteerde pagina in een browserweergave @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Tekening - + Insert orthographic views Orthografische weergaves invoegen - + Insert an orthographic projection of a part in the active drawing Voeg een orthografische projectie van een onderdeel in de actieve tekening in @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Tekening - + Project shape... Projectvorm... - - + + Project shape onto a user-defined plane Projecteer vorm op een door de gebruiker gedefinieerd vlak @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Tekening - + &Spreadsheet View &Rekenbladweergave - - + + Inserts a view of a selected spreadsheet in the active drawing Voegt een weergave van een geselecteerd werkblad in de actieve tekening in @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Tekening - + &Symbol &Symbool - - + + Inserts a symbol from a svg file in the active drawing Voegt een symbool van een svg-bestand in de actieve tekening in @@ -238,127 +238,127 @@ DrawingGui::DrawingView - + &Background &Achtergrond - + &Outline &Omtrek - + &Native &Eigen - + &OpenGL &OpenGL - + &Image &Afbeelding - + &High Quality Antialiasing Hoge kwaliteit Antialiasing - + Open SVG File Open SVG-bestand - + Could not open file '%1'. Kon bestand '%1' niet openen. - + &Renderer Renderer - + Export PDF Exporteren als PDF - + PDF file PDF-bestand - + Page sizes Paginaformaten - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Verschillende oriëntatie - + The printer uses a different orientation than the drawing. Do you want to continue? De printer gebruikt een andere richting dan de tekening. Wil je doorgaan? - - + + Different paper size Ander papierformaat - - + + The printer uses a different paper size than the drawing. Do you want to continue? De printer gebruikt een ander papierfromaat dan de tekening. Wilt u toch doorgaan? - + Opening file failed Bestand openen mislukt - + Can't open file '%1' for writing. Kan bestand '%1' niet openen om te schrijven. @@ -556,67 +556,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Zichtbare scherpe randen - + Visible smooth edges Zichtbare gladde randen - + Visible sewn edges Zichtbare genaaide randen - + Visible outline edges Zichtbare omtrekranden - + Visible isoparameters Zichtbare ISO-parameters - + Hidden sharp edges Verborgen scherpe randen - + Hidden smooth edges Verborgen gladde randen - + Hidden sewn edges Verborgen genaaide randen - + Hidden outline edges Verborgen omtrekranden - + Hidden isoparameters Verborgen ISO-parameters - + Project shapes Projecteer vormen - + No active document Geen actief document - + There is currently no active document to complete the operation Er is momenteel geen actief document om de operatie te voltooien @@ -634,37 +634,37 @@ Do you want to continue? Drawing_NewPage - + Page Pagina - + Landscape Liggend - + Portrait Staand - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Nieuwe %1%2 %3 -tekening invoegen - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Nieuwe %1%2 %3 (%4)-tekening invoegen @@ -672,93 +672,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Kies een SVG-bestand om te openen - - - + + + Scalable Vector Graphic Schaalbare vectorafbeelding - - - - - + + + + + Wrong selection Verkeerde selectie - + Select a Part object. Selecteer een onderdeel-object. - - - - - - + + + + + + No page found Geen pagina gevonden - - - - - - + + + + + + Create a page first. Maak eerst een pagina. - + Select exactly one Part object. Selecteer slechts één deel object. - - + + Select one Page object. Selecteer een pagina-object. - + All Files Alle bestanden - + Export page Exporteer pagina - + Select exactly one Spreadsheet object. Selecteer exact één Spreadsheet-object. - + Make axonometric... Axonometrisch maken... - + Edit axonometric settings... Axonometrische instellingen bewerken... - + Make orthographic Orthografische maken diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pl.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pl.ts index 983cbe9654..8e5b428ebe 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pl.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pl.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Kreślenie - + &Annotation &Adnotacja - - + + Inserts an Annotation view in the active drawing Wstaw widok adnotacji w aktywnym rysunku @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Kreślenie - + &Clip &Wycinek - - + + Inserts a clip group in the active drawing Wstaw grupę wycinków do aktywnego rysunku @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Kreślenie - + &Draft View Widok &rysunku - - + + Inserts a Draft view of the selected object(s) in the active drawing Wstaw widok Szkicu przez zaznaczenie obiektu(ów) w aktywnym rysunku @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Plik - + &Export page... &Eksportuj stronę ... - - + + Export a page to an SVG file Wyeksportuj stronę do pliku w formacie DXF @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Kreślenie - - + + Insert new A3 landscape drawing Wstaw formatkę A3 poziomo @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Kreślenie - - + + Insert new drawing Wstaw nowy rysunek @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Kreślenie - + Insert view in drawing Wstaw widok do rysunku - + Insert a new View of a Part in the active drawing Wstaw nowy widok części w aktywnym rysunku @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Kreślenie - + Open &browser view Otwórz &widok z przeglądarki - - + + Opens the selected page in a browser view Otwórz wybraną stronę w przeglądarce @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Kreślenie - + Insert orthographic views Wstaw widoki ortogonalne - + Insert an orthographic projection of a part in the active drawing Wstaw rzut ortogonalny części aktywnego rysunku @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Kreślenie - + Project shape... Rzutowanie kształtów ... - - + + Project shape onto a user-defined plane Rzut kształtu na płaszczyznę zdefiniowaną przez użytkownika @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Kreślenie - + &Spreadsheet View &Widok arkusza kalkulacyjnego - - + + Inserts a view of a selected spreadsheet in the active drawing Wstaw widok wybranego arkusza w aktywnym rysunku @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Kreślenie - + &Symbol &Symbol - - + + Inserts a symbol from a svg file in the active drawing Wstaw symbol z pliku SVG do aktywnego rysunku @@ -238,127 +238,127 @@ DrawingGui::DrawingView - + &Background &Tło - + &Outline &Kontur - + &Native &Wbudowany - + &OpenGL &OpenGL - + &Image &Obraz - + &High Quality Antialiasing &Wygładzanie wysokiej jakości - + Open SVG File Otwórz plik w formacie SVG - + Could not open file '%1'. Nie można otworzyć pliku '%1'. - + &Renderer &Renderowanie - + Export PDF Eksport PDF - + PDF file Plik PDF - + Page sizes Rozmiary stron - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Odmienna orientacja - + The printer uses a different orientation than the drawing. Do you want to continue? Drukarka używa innej orientacji strony niż zastosowano w rysunku. Czy chcesz kontynuować? - - + + Different paper size Odmienny format papieru - - + + The printer uses a different paper size than the drawing. Do you want to continue? Drukarka używa innego rozmiaru papieru niż zastosowano na rysunku. Czy chcesz kontynuować? - + Opening file failed Otwarcie pliku nie powiodło się - + Can't open file '%1' for writing. Nie można otworzyć pliku "%1" do zapisu. @@ -556,67 +556,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Widoczne ostre krawędzie - + Visible smooth edges Widoczne gładkie krawędzie - + Visible sewn edges Widoczne krawędzie szwu - + Visible outline edges Widoczne krawędzie konturu - + Visible isoparameters Widoczne izoparametry - + Hidden sharp edges Ukryte ostre krawędzie - + Hidden smooth edges Ukryte gładkie krawędzie - + Hidden sewn edges Ukryte krawędzie szwu - + Hidden outline edges Ukryte krawędzie konturu - + Hidden isoparameters Ukryte krzywe isoparametryczne - + Project shapes Rzutowanie kształtów - + No active document Brak aktywnego dokumentu - + There is currently no active document to complete the operation Obecnie nie ma aktywnego dokumentu do zakończenia operacji @@ -634,37 +634,37 @@ Do you want to continue? Drawing_NewPage - + Page Strona - + Landscape Orientacja pozioma - + Portrait Orientacja pionowa - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Wstaw nowy rysunek %1 %2 %3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Wstaw nowy rysunek %1%2 %3 (%4) @@ -672,93 +672,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Wybierz plik SVG do otwarcia - - - + + + Scalable Vector Graphic Skalowalna grafika wektorowa - - - - - + + + + + Wrong selection Nieprawidłowy wybór - + Select a Part object. Wybierz obiekt Części. - - - - - - + + + + + + No page found Strony nie znaleziono - - - - - - + + + + + + Create a page first. Najpierw stwórz stronę. - + Select exactly one Part object. Wybierz dokładnie jeden obiekt Części. - - + + Select one Page object. Wybierz jeden obiekt Strona. - + All Files Wszystkie pliki - + Export page Eksportuj stronę - + Select exactly one Spreadsheet object. Wybierz dokładnie jeden obiekt Arkusza. - + Make axonometric... Utwórz aksonometrię ... - + Edit axonometric settings... Edytuj ustawienia aksonometryczne ... - + Make orthographic Rzutuj ortogonalnie diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts index 44ce3f4215..e4282bda22 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-BR.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Desenho - + &Annotation &Anotação - - + + Inserts an Annotation view in the active drawing Insere uma Anotação no desenho ativo @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Desenho - + &Clip &Recorte - - + + Inserts a clip group in the active drawing Inserir um grupo de Apara no desenho ativo @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Desenho - + &Draft View Vista &Traço - - + + Inserts a Draft view of the selected object(s) in the active drawing Insere uma vista produzida pelo módulo Traço do(s) objeto(s) selecionado(s) na folha ativa @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Arquivo - + &Export page... &Exportar página... - - + + Export a page to an SVG file Exportar página para um arquivo SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Desenho - - + + Insert new A3 landscape drawing Inserir um novo desenho A3 paisagem @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Desenho - - + + Insert new drawing Inserir novo desenho @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Desenho - + Insert view in drawing Inserir vista no desenho - + Insert a new View of a Part in the active drawing Inserir uma nova Vista de uma peça no desenho ativo @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Desenho - + Open &browser view Abrir visualização no navegador - - + + Opens the selected page in a browser view Abrir a página selecionada no navegador @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Desenho - + Insert orthographic views Inserir visualizações ortográficas - + Insert an orthographic projection of a part in the active drawing Inserir uma projeção ortogonal de uma peça no desenho ativo @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Desenho - + Project shape... Projetar forma... - - + + Project shape onto a user-defined plane Projeta forma sobre um plano definido pelo usuário @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Desenho - + &Spreadsheet View Visão da Planilha - - + + Inserts a view of a selected spreadsheet in the active drawing Insere uma vista da planilha selecionada no desenho ativo @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Desenho - + &Symbol &Símbolo - - + + Inserts a symbol from a svg file in the active drawing Insere um símbolo de um arquivo svg no desenho ativo @@ -238,127 +238,127 @@ DrawingGui::DrawingView - + &Background Plano de &Fundo - + &Outline &Contorno - + &Native &Nativo - + &OpenGL &OpenGL - + &Image &Imagem - + &High Quality Antialiasing Antialiasing de alta qualidade - + Open SVG File Abrir arquivo SVG - + Could not open file '%1'. Não foi possível abrir o arquivo "%1". - + &Renderer &Renderizador - + Export PDF Exportar PDF - + PDF file Arquivo PDF - + Page sizes Tamanhos de página - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientação diferente - + The printer uses a different orientation than the drawing. Do you want to continue? A impressora utiliza uma orientação diferente do que o desenho. Deseja continuar? - - + + Different paper size Tamanho de papel diferente - - + + The printer uses a different paper size than the drawing. Do you want to continue? A impressora usa um tamanho de papel diferente do que o desenho. Deseja continuar? - + Opening file failed Falha ao abrir arquivo - + Can't open file '%1' for writing. Não é possível abrir o arquivo '%1' para a gravação. @@ -556,67 +556,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Bordas vivas visíveis - + Visible smooth edges Bordas suaves visíveis - + Visible sewn edges Bordas emendadas visíveis - + Visible outline edges Bordas de contorno visíveis - + Visible isoparameters Isoparâmetros visíveis - + Hidden sharp edges Bordas vivas escondidas - + Hidden smooth edges Bordas suaves escondidas - + Hidden sewn edges Bordas emendadas escondidas - + Hidden outline edges Bordas de contorno escondidas - + Hidden isoparameters Isoparâmetros escondidos - + Project shapes Projetar formas - + No active document Nenhum documento ativo - + There is currently no active document to complete the operation Não há atualmente nenhum documento ativo para concluir a operação @@ -634,37 +634,37 @@ Do you want to continue? Drawing_NewPage - + Page Página - + Landscape Paisagem - + Portrait Retrato - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Inserir novo %1%2 %3 desenho - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Inserir novo desenho %1%2 %3 (%4) @@ -672,93 +672,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Escolha um arquivo SVG para abrir - - - + + + Scalable Vector Graphic Gráficos vetoriais escaláveis (Svg) - - - - - + + + + + Wrong selection Seleção errada - + Select a Part object. Selecione um objeto Peça - - - - - - + + + + + + No page found Nenhuma página encontrada - - - - - - + + + + + + Create a page first. Primeiro, crie uma página. - + Select exactly one Part object. Selecione exatamente uma peça. - - + + Select one Page object. Selecione um objeto de tipo Página. - + All Files Todos os Arquivos - + Export page Exportar uma página - + Select exactly one Spreadsheet object. Selecione exatamente um objeto de planilha. - + Make axonometric... Fazer axonométrico... - + Edit axonometric settings... Editar configurações axonométricas... - + Make orthographic Fazer ortográfico diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-PT.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-PT.ts index 668ec5bb9e..c83f94c779 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-PT.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_pt-PT.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Desenho de folhas (layout) - + &Annotation &Anotação - - + + Inserts an Annotation view in the active drawing Insere uma Anotação na folha de desenho ativa @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Desenho de folhas (layout) - + &Clip &Cortar - - + + Inserts a clip group in the active drawing Insere um grupo de corte na folha de desenho ativa @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Desenho de folhas (layout) - + &Draft View &Vista Draft - - + + Inserts a Draft view of the selected object(s) in the active drawing Insere uma vista Draft dos objetos selecionados na folha ativa @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Ficheiro - + &Export page... Exportar página ... - - + + Export a page to an SVG file Exportar página para um ficheiro SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Desenho de folhas (layout) - - + + Insert new A3 landscape drawing Inserir novo desenho A3 deitado @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Desenho de folhas (layout) - - + + Insert new drawing Inserir nova folha de desenho @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Desenho de folhas (layout) - + Insert view in drawing Inserir uma vista na folha de desenho - + Insert a new View of a Part in the active drawing Inserir uma nova Vista de uma peça na folha de desenho ativa @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Desenho de folhas (layout) - + Open &browser view Abrir &Navegador de Visualização - - + + Opens the selected page in a browser view Abre a página selecionada num navegador de visualização @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Desenho de folhas (layout) - + Insert orthographic views Inserir vistas ortográficas - + Insert an orthographic projection of a part in the active drawing Inserir uma projeção ortográfica de uma peça na folha de desenho ativa @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Desenho de folhas (layout) - + Project shape... Projetar forma... - - + + Project shape onto a user-defined plane Projeta forma sobre um plano definido pelo utilizador @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Desenho de folhas (layout) - + &Spreadsheet View &Vista de folha de cálculo - - + + Inserts a view of a selected spreadsheet in the active drawing Insere uma vista da folha de cálculo selecionada na folha de desenho ativa @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Desenho de folhas (layout) - + &Symbol &Símbolo - - + + Inserts a symbol from a svg file in the active drawing Insere um símbolo de um arquivo svg na folha de desenho ativa @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background &Fundo - + &Outline &Contorno - + &Native Nativo - + &OpenGL &OPenGl - + &Image &Imagem - + &High Quality Antialiasing Suavização de &Alta Qualidade - + Open SVG File Abrir Ficheiro SVG - + Could not open file '%1'. Não foi possível abrir o ficheiro "%1". - + &Renderer &Renderização - + Export PDF Exportar PDF - + PDF file Ficheiro PDF - + Page sizes Tamanhos de página - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientação diferente - + The printer uses a different orientation than the drawing. Do you want to continue? A impressora utiliza uma orientação diferente da folha de desenho. Deseja continuar? - - + + Different paper size Tamanho de papel diferente - - + + The printer uses a different paper size than the drawing. Do you want to continue? A impressora usa um tamanho de papel diferente da folha de desenho. Deseja continuar? - + Opening file failed Falha ao abrir ficheiro - + Can't open file '%1' for writing. Não é possível abrir o ficheiro '%1' para escrita. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Arestas cortantes visíveis - + Visible smooth edges Arestas planas visíveis - + Visible sewn edges Arestas costuradas visíveis - + Visible outline edges Arestas de contorno visiveis - + Visible isoparameters Isoparâmetros visíveis - + Hidden sharp edges Ocultar arestas vivas - + Hidden smooth edges Ocultar arestas suavizadas - + Hidden sewn edges Arestas costuradas ocultas - + Hidden outline edges Arestas de contorno ocultas - + Hidden isoparameters Isoparâmetros ocultos - + Project shapes Projetar formas - + No active document Nenhum documento ativo - + There is currently no active document to complete the operation Não há atualmente nenhum documento ativo para concluir a operação @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Folha de desenho - + Landscape Horizontal - + Portrait Vertical - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Inserir nova %1%2 %3 folha de desenho - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Inserir nova %1%2 %3 (%4) folha de desenho @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Escolha um ficheiro SVG para abrir - - - + + + Scalable Vector Graphic Gráficos vetoriais escaláveis (Svg) - - - - - + + + + + Wrong selection Seleção errada - + Select a Part object. Selecione um objeto parte. - - - - - - + + + + + + No page found Nenhuma página encontrada - - - - - - + + + + + + Create a page first. Primeiro, crie uma página. - + Select exactly one Part object. Selecione exatamente uma peça (Part). - - + + Select one Page object. Selecione um objeto Página. - + All Files Todos os Ficheiros - + Export page Exportar página - + Select exactly one Spreadsheet object. Selecione apenas um objeto folha de cálculo. - + Make axonometric... Fazer axonométria... - + Edit axonometric settings... Editar configurações axonométricas... - + Make orthographic Tornar ortográfico diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ro.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ro.ts index d77db0c5f4..1df8e65cf6 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ro.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ro.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Desen - + &Annotation &Adnotație - - + + Inserts an Annotation view in the active drawing Inserează o vizualizare de adnotație în desenul activ @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Desen - + &Clip &Clip - - + + Inserts a clip group in the active drawing Inserează un grup de clipuri în desenul activ @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Desen - + &Draft View Vue &Draft - - + + Inserts a Draft view of the selected object(s) in the active drawing Insère une vue brouillon des objets sélectionnés dans le dessin actif @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Fişier - + &Export page... &Exportă pagina... - - + + Export a page to an SVG file Exportă pagina într-un fişier SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Desen - - + + Insert new A3 landscape drawing Inserare A3 nou format peisaj @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Desen - - + + Insert new drawing Inserează un desen nou @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Desen - + Insert view in drawing Inseraţi vizualizare în desen - + Insert a new View of a Part in the active drawing Insereaza o nouă vizualizare a unei piese în desenul activ @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Desen - + Open &browser view Deschideți &browser-ul - - + + Opens the selected page in a browser view Deschide pagina selectată într-un browser @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Desen - + Insert orthographic views Inserați vederi ortogonale - + Insert an orthographic projection of a part in the active drawing Inseraţi o proiecţie ortogonală a unei componente în desenul activ @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Desen - + Project shape... Proiectează forma... - - + + Project shape onto a user-defined plane Proiectează forma pe un plan definit de către utilizator @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Desen - + &Spreadsheet View Vedere & Foaie de calcul - - + + Inserts a view of a selected spreadsheet in the active drawing Introduceți o vedere cu o foaie de calcul selectată într-un desen activ @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Desen - + &Symbol &Simbol - - + + Inserts a symbol from a svg file in the active drawing Inserează un simbol dintr-un fișier svg în desenul activ @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background &Fundal - + &Outline &Contur - + &Native &Nativ - + &OpenGL &OpenGL - + &Image &Imagine - + &High Quality Antialiasing &Antialiasing de înaltă calitate - + Open SVG File Deschide fişier SVG - + Could not open file '%1'. Fişierul '%1' nu a putut fi deschis. - + &Renderer &Renderizator - + Export PDF Export format PDF - + PDF file Fişier PDF - + Page sizes Dimensiuni de pagină - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientare diferită - + The printer uses a different orientation than the drawing. Do you want to continue? Imprimanta utilizează o orientare diferită a hârtiei decât desenul. Doriţi să continuaţi? - - + + Different paper size Hârtie de dimensiune diferită - - + + The printer uses a different paper size than the drawing. Do you want to continue? Imprimanta utilizează o altă dimensiune de hârtie decât desenul. Doriţi să continuaţi? - + Opening file failed Deschiderea fișierului a eșuat - + Can't open file '%1' for writing. Fișierul r '%1' nu acceptă scrierea. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Muchiile ascuțite vizibile - + Visible smooth edges Muchiile netede vizibile - + Visible sewn edges Muchiile îmbinate vizibile - + Visible outline edges Muchiile de contur vizibile - + Visible isoparameters Isoparametrii vizibili - + Hidden sharp edges Muchiile ascuțite ascunse - + Hidden smooth edges Muchiile netede ascunse - + Hidden sewn edges Muchiile îmbinate ascunse - + Hidden outline edges Muchiile de contur ascunse - + Hidden isoparameters Isoparametrii ascunși - + Project shapes Proiectează formele - + No active document Nici un document activ - + There is currently no active document to complete the operation Nu este nici un document activ pentru a termina operațiunea @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Pagină - + Landscape Peisaj - + Portrait Orientare tip portret - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Inserează un nou %1%2%3 desen - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Inserare desen nou %1%2 %3 (%4) @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Alegeţi un fişier SVG pentru deschidere - - - + + + Scalable Vector Graphic Vector Grafic Scalabil (Svg) - - - - - + + + + + Wrong selection Selecție greșită - + Select a Part object. Selecteaza un obiect tip piesă - - - - - - + + + + + + No page found Pagină negăsită - - - - - - + + + + + + Create a page first. Creați /selectați o pagină mai întâi. - + Select exactly one Part object. Selectați doar un singur obiect tip Piesă. - - + + Select one Page object. Selectează un obiect pagină - + All Files Toate fișierele - + Export page Exportă pagina - + Select exactly one Spreadsheet object. Selectați doar un singur obiect tip foaie de calcul Spreadsheet. - + Make axonometric... Fă-l axonometric... - + Edit axonometric settings... Editare configurări axonometrice... - + Make orthographic Fă-l ortogonal diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ru.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ru.ts index 0bd477db71..12c77c59a7 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_ru.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_ru.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Чертёж - + &Annotation &Заметка - - + + Inserts an Annotation view in the active drawing Вставить заметку в активный чертёж @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Чертеж - + &Clip &Срез - - + + Inserts a clip group in the active drawing Вставить группу срезов в активный чертёж @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Чертеж - + &Draft View &Эскизный вид - - + + Inserts a Draft view of the selected object(s) in the active drawing Вставить эскиз выбранного объекта(ов) в активный чертёж @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Файл - + &Export page... &Экспортировать страницу... - - + + Export a page to an SVG file Экспорт страницы в файл SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Чертеж - - + + Insert new A3 landscape drawing Вставить новый фоновый чертеж А3 @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing - Чертёж + Чертеж - - + + Insert new drawing Вставить новый чертёж @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Чертеж - + Insert view in drawing Вставить вид в чертёж - + Insert a new View of a Part in the active drawing Вставить новый вид детали в текущий чертёж @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Чертеж - + Open &browser view Открыть в &обозревателе - - + + Opens the selected page in a browser view Открыть выбранную страницу для просмотра во встроенном обозревателе @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Чертеж - + Insert orthographic views Вставить ортографические виды - + Insert an orthographic projection of a part in the active drawing Вставить ортографическую проекцию детали в активный чертёж @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Чертеж - + Project shape... Проекция фигуры... - - + + Project shape onto a user-defined plane Проекция фигуры на заданную плоскость @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Чертеж - + &Spreadsheet View &Вставка таблицы - - + + Inserts a view of a selected spreadsheet in the active drawing Вставить выбранную таблицу в активный чертёж @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Чертеж - + &Symbol &Символ - - + + Inserts a symbol from a svg file in the active drawing Вставить символ из файла svg в активный чертёж @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Фон - + &Outline &Контур - + &Native &Встроенный - + &OpenGL &OpenGL - + &Image &Изображение - + &High Quality Antialiasing &Высококачественное сглаживания - + Open SVG File Открыть файл SVG - + Could not open file '%1'. Не удалось открыть файл '%1'. - + &Renderer Отрисовщик - + Export PDF Экспорт в PDF - + PDF file Файл PDF - + Page sizes Размеры страницы - + A0 А0 - + A1 А1 - + A2 А2 - + A3 А3 - + A4 А4 - + A5 А5 - + Different orientation Отличающаяся ориентация - + The printer uses a different orientation than the drawing. Do you want to continue? Принтер использует отличающуюся от чертежа ориентацию бумаги. Хотите продолжить? - - + + Different paper size Отличающийся формат листа - - + + The printer uses a different paper size than the drawing. Do you want to continue? Принтер использует отличающийся от чертежа формат листа. Хотите продолжить? - + Opening file failed Ошибка при открытии файла - + Can't open file '%1' for writing. Не удается записать в файл '%1'. @@ -557,67 +557,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Видимые острые края - + Visible smooth edges Видимые сглаженные края - + Visible sewn edges Видимые сшитые края - + Visible outline edges Видимые края контура - + Visible isoparameters Параметры отображения изометрии - + Hidden sharp edges Скрытые острые края - + Hidden smooth edges Скрытые сглаженные края - + Hidden sewn edges Скрытые cшитые края - + Hidden outline edges Скрытые края контура - + Hidden isoparameters Параметры скрытия изометрии - + Project shapes Настройка проекции фигур - + No active document Нет активного документа - + There is currently no active document to complete the operation В настоящее время нет активного документа для выполнения этой операции @@ -635,37 +635,37 @@ Do you want to continue? Drawing_NewPage - + Page Страница - + Landscape Альбомный - + Portrait Портретный - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Вставить новый чертёж %1 %2%3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Вставить новый чертёж %1%2 %3 (%4) @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Выберите файл SVG для открытия - - - + + + Scalable Vector Graphic Масштабируемая векторная графика - - - - - + + + + + Wrong selection Неправильный выбор - + Select a Part object. Выберите объект типа Деталь. - - - - - - + + + + + + No page found Страниц не найдено - - - - - - + + + + + + Create a page first. Сначала создайте страницу. - + Select exactly one Part object. Выберите ровно один объект Детали. - - + + Select one Page object. Выберите один объект типа Страница. - + All Files Все файлы - + Export page Экспортировать страницу - + Select exactly one Spreadsheet object. Выберите только один объект типа Таблица. - + Make axonometric... Сделать аксонометрическим... - + Edit axonometric settings... Изменить настройки аксонометрии... - + Make orthographic Сделать ортографическим @@ -774,7 +774,7 @@ Do you want to continue? Drawing - Чертеж + Чертёж diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sl.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sl.ts index 972514dc54..e37896b81e 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sl.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sl.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Risba - + &Annotation &Opisi - - + + Inserts an Annotation view in the active drawing Vstavi pogled za opise v dejavno risbo @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Risba - + &Clip &Obreži - - + + Inserts a clip group in the active drawing Vstavi izbrani obrez v dejavno risbo @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Risba - + &Draft View &Izrisni pogled - - + + Inserts a Draft view of the selected object(s) in the active drawing Vstavi izrisni pogled izbranih predmeov v dejavno risbo @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Datoteka - + &Export page... I&zvozi stran … - - + + Export a page to an SVG file Izvozi stran v datoteko SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Risba - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Risba - - + + Insert new drawing Vstavi novo risbo @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Risba - + Insert view in drawing Vstavi pogled v risbo - + Insert a new View of a Part in the active drawing Vstavi nov pogled dela v dejavno risbo @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Risba - + Open &browser view Odpri pogled &brskalnika - - + + Opens the selected page in a browser view Odpre izbrano stran v pogledu brskalnika @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Risba - + Insert orthographic views Vstavi pravokotne poglede - + Insert an orthographic projection of a part in the active drawing Vstavi pravokotno preslikavo dela v dejavno risbo @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Risba - + Project shape... Preslikaj obliko … - - + + Project shape onto a user-defined plane Preslikaj obliko na ravnino, ki jo izbere uporabnik @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Risba - + &Spreadsheet View &Preglednični pogled - - + + Inserts a view of a selected spreadsheet in the active drawing Vstavi pogled izbranih preglednic v dejavno risbo @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Risba - + &Symbol &Znak - - + + Inserts a symbol from a svg file in the active drawing Vstavi znak iz datoteke Svg v dejavno risbo @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Ozadje - + &Outline &Obris - + &Native I&zvoren - + &OpenGL &OpenGL - + &Image &Slika - + &High Quality Antialiasing &Visokokakovostno glajenje robov - + Open SVG File Odpri datoteko SVG - + Could not open file '%1'. Ni bilo možno odpreti datoteke '%1'. - + &Renderer I&zrisovalnik - + Export PDF Izvozi v PDF - + PDF file Datoteka PDF - + Page sizes Velikosti strani - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Druga usmerjenost - + The printer uses a different orientation than the drawing. Do you want to continue? Tiskalnik uporablja drugačno usmerjenost kot risba. Ali želite nadaljevati? - - + + Different paper size Druga velikost papirja - - + + The printer uses a different paper size than the drawing. Do you want to continue? Tiskalnik uporablja drugo velikost papirja kot risba. Ali želite nadaljevati? - + Opening file failed Odpiranje datoteke ni uspelo - + Can't open file '%1' for writing. Datoteke '%1' ni mogoče odpreti za pisanje. @@ -557,67 +557,67 @@ Ali želite nadaljevati? DrawingGui::TaskProjection - + Visible sharp edges Vidni ostri robovi - + Visible smooth edges Vidni zglajeni robovi - + Visible sewn edges Vidni črtkani robovi - + Visible outline edges Vidni obrisni robovi - + Visible isoparameters Vidne izoparametre - + Hidden sharp edges Skriti ostri robovi - + Hidden smooth edges Skriti zglajeni robovi - + Hidden sewn edges Skriti črtkani robovi - + Hidden outline edges Skriti obrisni robovi - + Hidden isoparameters Skrite izoparametre - + Project shapes Preslikaj oblike - + No active document Ni dejavnega dokumenta - + There is currently no active document to complete the operation Trenutno ni dejavnega dokumenta za dokončanje opravila @@ -635,37 +635,37 @@ Ali želite nadaljevati? Drawing_NewPage - + Page Stran - + Landscape Ležeče - + Portrait Pokončno - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Vstavi novo risbo %1 %2 %3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Vstavi novo risbo %1%2 %3 (%4) @@ -673,93 +673,93 @@ Ali želite nadaljevati? QObject - - + + Choose an SVG file to open Izberite datoteko SVG, ki jo želite odpreti - - - + + + Scalable Vector Graphic Vektorska slika spremenljive velikosti - - - - - + + + + + Wrong selection Napačen izbor - + Select a Part object. Izberite del. - - - - - - + + + + + + No page found Stran ni bila najdena - - - - - - + + + + + + Create a page first. Najprej ustvarite stran. - + Select exactly one Part object. Izberite natanko en del. - - + + Select one Page object. Izberite predmet - stran. - + All Files Vse datoteke - + Export page Izvozi stran - + Select exactly one Spreadsheet object. Izberite natanko eno preglednico. - + Make axonometric... Izdelaj aksonometrijo ... - + Edit axonometric settings... Uredi nastavitve aksonometrije... - + Make orthographic Izdelaj pravokotno preslikavo diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts index 90da639b7d..ac06895312 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr-CS.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Crtež - + &Annotation Napomena - - + + Inserts an Annotation view in the active drawing Dodaje napomenu aktivnom crtežu @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Crtež - + &Clip &Clip - - + + Inserts a clip group in the active drawing Inserts a clip group in the active drawing @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Crtež - + &Draft View &Draft View - - + + Inserts a Draft view of the selected object(s) in the active drawing Inserts a Draft view of the selected object(s) in the active drawing @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Datoteka - + &Export page... Izvezi stranicu... - - + + Export a page to an SVG file Izvezi stranicu u SVG datoteku @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Crtež - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Crtež - - + + Insert new drawing Umetni novi crtež @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Crtež - + Insert view in drawing Ubaci prikaz u crtež - + Insert a new View of a Part in the active drawing Ubaci novi pogled dela u aktivni crtež @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Crtež - + Open &browser view Otvori pogled u pregledaču - - + + Opens the selected page in a browser view Otvara odabranu stranicu u pregledaču @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Crtež - + Insert orthographic views Umetni ortografske poglede - + Insert an orthographic projection of a part in the active drawing Umetni ortografsku projekciju dela u aktivni crtež @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Crtež - + Project shape... Projiciraj objekat u 3D pogled... - - + + Project shape onto a user-defined plane Projiciraj oblik na ravan definisanu od strane korisnika @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Crtež - + &Spreadsheet View &Spreadsheet View - - + + Inserts a view of a selected spreadsheet in the active drawing Inserts a view of a selected spreadsheet in the active drawing @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Crtež - + &Symbol &Simbol - - + + Inserts a symbol from a svg file in the active drawing Umeće simbol iz svg datoteke u aktivni crtež @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Pozadina - + &Outline &Obris - + &Native Izvorni - + &OpenGL &OpenGL - + &Image &Slika - + &High Quality Antialiasing &Antialiasing visokog kvaliteta - + Open SVG File Otvori 'SVG' datoteku - + Could not open file '%1'. Ne mogu da otvorim datoteku "%1". - + &Renderer Prikazivač - + Export PDF Izvezi PDF - + PDF file PDF datoteka - + Page sizes Veličina stranice - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Drugačija orijentacija - + The printer uses a different orientation than the drawing. Do you want to continue? The printer uses a different orientation than the drawing. Do you want to continue? - - + + Different paper size Drugačija veličina papira - - + + The printer uses a different paper size than the drawing. Do you want to continue? Štampač koristi drugačiju veličinu papira od crteža. Da li želiš da nastaviš? - + Opening file failed Otvaranje datoteke neuspešno - + Can't open file '%1' for writing. Can't open file '%1' for writing. @@ -557,67 +557,67 @@ Da li želiš da nastaviš? DrawingGui::TaskProjection - + Visible sharp edges Vidljive oštre ivice - + Visible smooth edges Vidljive ublažene ivice - + Visible sewn edges Vidljive šivene ivice - + Visible outline edges Vidljive spoljne ivice - + Visible isoparameters Vidljivi izometrijcki parametri - + Hidden sharp edges Sakrivene oštre ivice - + Hidden smooth edges Sakrivene ublažene ivice - + Hidden sewn edges Sakrivene ušivene ivice - + Hidden outline edges Sakrivene spoljne ivice - + Hidden isoparameters Sakriveni isoparameters - + Project shapes Projiciraj objekat - + No active document Nema aktivnog dokumenta - + There is currently no active document to complete the operation Trenutno nema aktivnog dokumenta da se dovrši operacija @@ -635,37 +635,37 @@ Da li želiš da nastaviš? Drawing_NewPage - + Page Crtež - + Landscape Položeno - + Portrait Uspravno - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Umetni novi %1%2 %3 crtež - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Umetni novi%1%2 %3 (%4) crtež @@ -673,93 +673,93 @@ Da li želiš da nastaviš? QObject - - + + Choose an SVG file to open Izaberi SVG datoteku za otvaranje - - - + + + Scalable Vector Graphic Scalable Vector Graphic - - - - - + + + + + Wrong selection Pogrešan izbor - + Select a Part object. Izaberi objekat Deo. - - - - - - + + + + + + No page found Stranica nije pronađena - - - - - - + + + + + + Create a page first. Prvo napravi stranicu. - + Select exactly one Part object. Izaberi samo jedan objekat Deo. - - + + Select one Page object. Izaberi jedan objekat Stranica. - + All Files Sve datoteke - + Export page Izvezi stranicu - + Select exactly one Spreadsheet object. Izaberi samo jedan tabelarni objekat. - + Make axonometric... Napravi aksonometrijski... - + Edit axonometric settings... Podešavanje aksonometrije... - + Make orthographic Napravi ortografski diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts index a3b5326bf5..c70ce32f45 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sr.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Цртеж - + &Annotation &Напомена - - + + Inserts an Annotation view in the active drawing Додаје напомену активном цртежу @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Цртеж - + &Clip &Clip - - + + Inserts a clip group in the active drawing Inserts a clip group in the active drawing @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Цртеж - + &Draft View &Draft View - - + + Inserts a Draft view of the selected object(s) in the active drawing Inserts a Draft view of the selected object(s) in the active drawing @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Датотека - + &Export page... Извоз странице... - - + + Export a page to an SVG file Извези страницу у 'SVG' датотеку @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Цртеж - - + + Insert new A3 landscape drawing Убаците Нови А3 пејзажни цртеж @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Цртеж - - + + Insert new drawing Уметни нови цртеж @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Цртеж - + Insert view in drawing Убаци поглед у цртеж - + Insert a new View of a Part in the active drawing Убаците нови поглед дела у активном цртежу @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Цртеж - + Open &browser view Отвори &поглед у прегледачу - - + + Opens the selected page in a browser view Отвара одабрану страницу у прегледачу @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Цртеж - + Insert orthographic views Уметни ортографcке погледе - + Insert an orthographic projection of a part in the active drawing Уметни ортографску пројекцију дела у активни цртеж @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Цртеж - + Project shape... Пројицирај објекат у 3Д поглед... - - + + Project shape onto a user-defined plane Пројицирај облик на раван дефиниcану од cтране кориcника @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Цртеж - + &Spreadsheet View &Spreadsheet View - - + + Inserts a view of a selected spreadsheet in the active drawing Inserts a view of a selected spreadsheet in the active drawing @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Цртеж - + &Symbol &Симбол - - + + Inserts a symbol from a svg file in the active drawing Умеће cимбол из svg датотеке у активни цртеж @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Позадина - + &Outline &Обрис - + &Native &Изворни - + &OpenGL &OpenGL - + &Image &Слика - + &High Quality Antialiasing &Антиалиасинг високог квалитета - + Open SVG File Отвори SVG датотеку - + Could not open file '%1'. Не могу да отворим датотеку "%1". - + &Renderer Приказивач - + Export PDF Извоз у ПДФ-у - + PDF file PDF датотека - + Page sizes Величина странице - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Другачија оријентација - + The printer uses a different orientation than the drawing. Do you want to continue? The printer uses a different orientation than the drawing. Do you want to continue? - - + + Different paper size Другачија величина папира - - + + The printer uses a different paper size than the drawing. Do you want to continue? Штампач користи другачију величину папира од цртежа. Да ли желиш да наставиш? - + Opening file failed Отварање датотеке неуcпешно - + Can't open file '%1' for writing. Can't open file '%1' for writing. @@ -557,67 +557,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Видљиве оштре ивице - + Visible smooth edges Видљиве ублажене ивице - + Visible sewn edges Видљиве шивене ивице - + Visible outline edges Видљиве спољне ивице - + Visible isoparameters Видљиви изометријcки параметри - + Hidden sharp edges Сакривене оштре ивице - + Hidden smooth edges Сакривене ублажене ивице - + Hidden sewn edges Сакривене шивене ивице - + Hidden outline edges Сакривене спољне ивице - + Hidden isoparameters Сакривени isoparameters - + Project shapes Пројицирај објекат - + No active document Нема активног документа - + There is currently no active document to complete the operation Тренутно нема активног документа да се доврши операција @@ -635,37 +635,37 @@ Do you want to continue? Drawing_NewPage - + Page Страна - + Landscape Положено - + Portrait Усправно - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Уметни нови %1%2 %3 цртеж - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Уметни нови%1%2 %3 (%4) цртеж @@ -673,93 +673,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Изабери SVG датотеку за отварање - - - + + + Scalable Vector Graphic Scalable Vector Graphic - - - - - + + + + + Wrong selection Погрешан избор - + Select a Part object. Изабери део објекта. - - - - - - + + + + + + No page found Страница није пронађена - - - - - - + + + + + + Create a page first. Прво направи страницу. - + Select exactly one Part object. Изабери само један Део. - - + + Select one Page object. Изабери објекат једне странице. - + All Files Све датотеке - + Export page Извоз странице - + Select exactly one Spreadsheet object. Изабери само један табеларни објекат. - + Make axonometric... Направи аксонометријски... - + Edit axonometric settings... Подешавање аксонометрије... - + Make orthographic Направи ортографски diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sv-SE.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sv-SE.ts index 591d75b021..7dccc3cfea 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_sv-SE.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_sv-SE.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Ritning - + &Annotation &Annotering - - + + Inserts an Annotation view in the active drawing Infogar en annoteringsvy i den aktiva ritningen @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Ritning - + &Clip &Klipp - - + + Inserts a clip group in the active drawing Infogar en Klipp-grupp i den aktiva ritningen @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Ritning - + &Draft View &Utkastvy - - + + Inserts a Draft view of the selected object(s) in the active drawing Lägger till en Draft-vy av det valda objektet(en) i den aktiva ritningen @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Fil - + &Export page... &Exportera sida... - - + + Export a page to an SVG file Exportera en sida till en SVG-fil @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Ritning - - + + Insert new A3 landscape drawing Infoga ny A3 landskap ritning @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Ritning - - + + Insert new drawing Sätt in ny ritning @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Ritning - + Insert view in drawing Infoga vy i ritningen - + Insert a new View of a Part in the active drawing Sätt in en ny vy av en Del i den aktiva ritningen @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Ritning - + Open &browser view Öppna we&bbläsarvy - - + + Opens the selected page in a browser view Öppnar den valda sidan i en webbläsarvy @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Ritning - + Insert orthographic views Infoga ortografiska vyer - + Insert an orthographic projection of a part in the active drawing Infoga en ortografisk projektion av en del i den aktiva ritningen @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Ritning - + Project shape... Projekt former... - - + + Project shape onto a user-defined plane Projicera form på ett användardefinierat plan @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Ritning - + &Spreadsheet View Kalkylblad&svy - - + + Inserts a view of a selected spreadsheet in the active drawing Lägger till en vy av valt Kalkylblad i den aktiva ritningen @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Ritning - + &Symbol &Symbol - - + + Inserts a symbol from a svg file in the active drawing Infogar en symbol från en svg-fil i den aktiva ritningen @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background B&akgrund - + &Outline &Kontur - + &Native &Nativ - + &OpenGL &OpenGL - + &Image &Bild - + &High Quality Antialiasing &Högkvalitets kantutjämning - + Open SVG File Öppna SVG-fil - + Could not open file '%1'. Det gick inte att öppna fil '%1'. - + &Renderer &Renderare - + Export PDF Exportera PDF - + PDF file PDF-fil - + Page sizes Sidstorlekar - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Annan orientering - + The printer uses a different orientation than the drawing. Do you want to continue? Skrivaren använder en annan orientering än ritningen. Vill du fortsätta? - - + + Different paper size Annan pappersstorlek - - + + The printer uses a different paper size than the drawing. Do you want to continue? Skrivaren använder en annan pappersstorlek än ritningen. Vill du fortsätta? - + Opening file failed Fel vid filöppning - + Can't open file '%1' for writing. Kan inte öppna filen '%1' för skrivning. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Synliga vassa kanter - + Visible smooth edges Synliga jämna kanter - + Visible sewn edges Synliga sydda kanter - + Visible outline edges Synliga kontur kanter - + Visible isoparameters Synliga isoparametrar - + Hidden sharp edges Dolda vassa kanter - + Hidden smooth edges Dolda jämna kanter - + Hidden sewn edges Dolda sydda kanter - + Hidden outline edges Dolda kontur kanter - + Hidden isoparameters Dolda isoparametrar - + Project shapes Projekt former - + No active document Inget aktivt dokument - + There is currently no active document to complete the operation Det finns för närvarande inget aktivt dokument att slutföra åtgärden @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Sida - + Landscape Landskap - + Portrait Porträtt - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Infoga ny %1%2 %3 ritning - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Infoga nya %1%2 %3 (%4) i ritning @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Välj en SVG fil att öppna - - - + + + Scalable Vector Graphic Skalbar vektorgrafik - - - - - + + + + + Wrong selection Fel val - + Select a Part object. Välj ett Del objekt. - - - - - - + + + + + + No page found Ingen sida hittades - - - - - - + + + + + + Create a page first. Skapa en sida först. - + Select exactly one Part object. Markera exakt ett delobjekt. - - + + Select one Page object. Välj ett sidobjekt. - + All Files Alla Filer - + Export page Exportera sida - + Select exactly one Spreadsheet object. Välj exakt ett sprängskissobjekt. - + Make axonometric... Gör axonometrisk... - + Edit axonometric settings... Redigera axonometriska inställningar... - + Make orthographic Gör ortografisk diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_tr.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_tr.ts index f4704c4106..c9e4991beb 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_tr.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_tr.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Çizim - + &Annotation &Açıklayıcı notlar - - + + Inserts an Annotation view in the active drawing Etkin çizime açıklayıcı bir not ekler @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Çizim - + &Clip &Kırpmak - - + + Inserts a clip group in the active drawing Etkin çizimine kırpma grubu ekler @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Çizim - + &Draft View &Taslak Görünümü - - + + Inserts a Draft view of the selected object(s) in the active drawing Seçili nesnelerin taslak görünümünü etkin çizime ekler @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Dosya - + &Export page... &Sayfayı dışa aktar... - - + + Export a page to an SVG file Sayfayı, SVG dosyası olarak dışarı aktar @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Çizim - - + + Insert new A3 landscape drawing Yeni yatay A3 boyutlu çizim ekle @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Çizim - - + + Insert new drawing Yeni Çizim Ekle @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Çizim - + Insert view in drawing Çizime görünüm ekle - + Insert a new View of a Part in the active drawing Etkin çizimde bir parçanın yeni görünümünü ekle @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Çizim - + Open &browser view &tarayıcı görünümü aç - - + + Opens the selected page in a browser view Seçili sayfayı tarayıcı görünümünde açar @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Çizim - + Insert orthographic views Ortografik görünümleri ekle - + Insert an orthographic projection of a part in the active drawing Bir parçanın ortografik izdüşümünü etkin çizime ekle @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Çizim - + Project shape... Proje şekilleri... - - + + Project shape onto a user-defined plane Kullanıcının tanımladığı bir düzleme şekli yansıt @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Çizim - + &Spreadsheet View He&sapTablosu Görünümü - - + + Inserts a view of a selected spreadsheet in the active drawing Seçili hesap tablolarının bir görünümünü etkin çizime ekler @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Çizim - + &Symbol &Sembol - - + + Inserts a symbol from a svg file in the active drawing Etkin çizimde bir svg dosyasından bir simge ekler @@ -238,128 +238,128 @@ DrawingGui::DrawingView - + &Background &Arkaplan - + &Outline &Taslak - + &Native &Yerel - + &OpenGL &OpenGL - + &Image &Resim - + &High Quality Antialiasing &Yüksek kaliteli keskinlik yumuşatma - + Open SVG File SVG Dosyası Aç - + Could not open file '%1'. '%1' adlı dosya açılamadı. - + &Renderer İşleyici (Renderer) - + Export PDF PDF olarak dışarı aktar - + PDF file PDF dosyası - + Page sizes Sayfa boyutları - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Ekran yönü - + The printer uses a different orientation than the drawing. Do you want to continue? Yazıcı çizimden farklı bir yönlendirme kullanıyor. Devam etmek istiyor musun? - - + + Different paper size Farklı kağıt boyutu - - + + The printer uses a different paper size than the drawing. Do you want to continue? Yazıcı, çizimden farklı bir kağıt boyutu kullanıyor. Devam etmek istiyor musun? - + Opening file failed Dosya açılamadı - + Can't open file '%1' for writing. Dosya '%1' yazmak için açılamıyor. @@ -557,67 +557,67 @@ Devam etmek istiyor musun? DrawingGui::TaskProjection - + Visible sharp edges Görünür keskin kenarlar - + Visible smooth edges Görünür pürüzsüz kenarlar - + Visible sewn edges Görünür dikilir kenarlar - + Visible outline edges Görünür anahat kenarları - + Visible isoparameters Görünür izodeğişkenler - + Hidden sharp edges Gizli keskin kenarlar - + Hidden smooth edges Gizli pürüzsüz kenarlar - + Hidden sewn edges Gizli dikili kenarlar - + Hidden outline edges Gizli kenar konturları - + Hidden isoparameters Gizli izodeğişkenler - + Project shapes Proje şekilleri - + No active document Etkin belge yok - + There is currently no active document to complete the operation İşlemi tamamlamak için henüz aktif bir belge mevcut değil @@ -635,37 +635,37 @@ Devam etmek istiyor musun? Drawing_NewPage - + Page Sayfa - + Landscape Manzara - + Portrait Dikey - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Yeni %1%2 %3 çizim ekle - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Yeni %1%2 %3 (%4) çizim ekle @@ -673,93 +673,93 @@ Devam etmek istiyor musun? QObject - - + + Choose an SVG file to open Açmak için bir SVG dosyası seçin - - - + + + Scalable Vector Graphic Ölçeklenebilir Vektör Grafiği - - - - - + + + + + Wrong selection Yanlış seçim - + Select a Part object. Parça nesnesi seçin. - - - - - - + + + + + + No page found Sayfa bulunamadı - - - - - - + + + + + + Create a page first. Önce bir sayfa oluşturun. - + Select exactly one Part object. Tek bir bölüm nesnesi seçin. - - + + Select one Page object. Bir sayfa nesnesi seçin. - + All Files Tüm Dosyalar - + Export page Sayfayı dışarı aktar - + Select exactly one Spreadsheet object. Tam olarak bir Hesap Tablosu nesnesi seçin. - + Make axonometric... Aksonometrik yap... - + Edit axonometric settings... Aksonometrik ayarlarını düzenle... - + Make orthographic Ortografik yap diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_uk.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_uk.ts index fa36aa8767..1fe69c7e89 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_uk.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_uk.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Рисунок - + &Annotation & Анотації - - + + Inserts an Annotation view in the active drawing Вставляє перегляд анотації у активне креслення @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Рисунок - + &Clip &Кліп - - + + Inserts a clip group in the active drawing Вставляє кліп групи у активне креслення @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Рисунок - + &Draft View Перегляд &чернетки - - + + Inserts a Draft view of the selected object(s) in the active drawing Вставити чернетку обраного об'єкта(ів) у поточне креслення @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Файл - + &Export page... &Експорт сторінки... - - + + Export a page to an SVG file Експорт сторінки в SVG файл @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Рисунок - - + + Insert new A3 landscape drawing Вставить нове фонове креслення А3 @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Рисунок - - + + Insert new drawing Вставити нове креслення @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Рисунок - + Insert view in drawing Додати вигляд в креслення - + Insert a new View of a Part in the active drawing Вставить новий вигляд деталі в поточне креслення @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Рисунок - + Open &browser view Відкрити & переглянути у браузері - - + + Opens the selected page in a browser view Відкрити вибрану сторінку у перегляді браузера @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Рисунок - + Insert orthographic views Вставити ортогональний перегляд - + Insert an orthographic projection of a part in the active drawing Вставити ортогональну проекцію частини у активному кресленні @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Рисунок - + Project shape... Проект форми... - - + + Project shape onto a user-defined plane Проект форми на поверхні, визначеній користувачем @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Рисунок - + &Spreadsheet View & Перегляд електронної таблиці - - + + Inserts a view of a selected spreadsheet in the active drawing Вставлення перегляду вибраної таблиці в активному рисунку @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Рисунок - + &Symbol &Символ - - + + Inserts a symbol from a svg file in the active drawing Вставити символ з svg файлу в креслення, що редагується @@ -238,127 +238,127 @@ DrawingGui::DrawingView - + &Background &Фон - + &Outline &Контур - + &Native &Рідне - + &OpenGL &OpenGL - + &Image &Зображення - + &High Quality Antialiasing &Висока якість згладжування - + Open SVG File Відкрити SVG файл - + Could not open file '%1'. Не вдається відкрити файл '%1'. - + &Renderer &Промалювувач - + Export PDF Експорт в PDF - + PDF file PDF-файл - + Page sizes Розміри сторінки - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Відмінна орієнтація - + The printer uses a different orientation than the drawing. Do you want to continue? Принтер використовує відмінну від креслення орієнтацію. Бажаєте продовжити? - - + + Different paper size Відмінний розмір паперу - - + + The printer uses a different paper size than the drawing. Do you want to continue? Принтер використовує відмінний від креслення розмір паперу. Бажаєте продовжити? - + Opening file failed Відкриття файлу не вдалося - + Can't open file '%1' for writing. Не вдалося відкрити файл '%1' для запису. @@ -556,67 +556,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Видимі гострі ребра - + Visible smooth edges Видимі згладжені ребра - + Visible sewn edges Видимі зшиті ребра - + Visible outline edges Видимі контурні ребра - + Visible isoparameters Видимі ізопараметри - + Hidden sharp edges Приховані гострі ребра - + Hidden smooth edges Приховані згладжені ребра - + Hidden sewn edges Приховані зшиті ребра - + Hidden outline edges Приховані контурні ребра - + Hidden isoparameters Приховані ізопараметри - + Project shapes Проект форм - + No active document Немає активного документу - + There is currently no active document to complete the operation В даний час немає активного документа до завершення операції @@ -634,37 +634,37 @@ Do you want to continue? Drawing_NewPage - + Page Сторінка - + Landscape Альбомна - + Portrait Портретна - + %1%2 %3 %1 %2 %3 - + Insert new %1%2 %3 drawing Вставити нове %1%2 %3 креслення - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Вставити нове креслення %1%2 %3 (%4) @@ -672,93 +672,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Виберіть файл SVG для відкриття - - - + + + Scalable Vector Graphic Масштабована Векторна графіка - - - - - + + + + + Wrong selection Невірний вибір - + Select a Part object. Виберіть об'єкт деталі. - - - - - - + + + + + + No page found Сторінка не знайдена - - - - - - + + + + + + Create a page first. Спочатку створіть сторінку. - + Select exactly one Part object. Виберіть лише одну деталь. - - + + Select one Page object. Оберіть один об'єкт сторінки. - + All Files Всі файли - + Export page Експорт сторінки - + Select exactly one Spreadsheet object. Виберіть саме один об'єкт електронної таблиці. - + Make axonometric... Зробити аксонометрію... - + Edit axonometric settings... Редагувати налаштування аксонометрії... - + Make orthographic Зробити ортогональну проекцію diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_val-ES.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_val-ES.ts index 7cae67b1ba..c4117cec71 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_val-ES.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_val-ES.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing Dibuix - + &Annotation &Anotació - - + + Inserts an Annotation view in the active drawing Insereix una vista de l'anotació en el dibuix actiu @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing Dibuix - + &Clip &Retalla - - + + Inserts a clip group in the active drawing Insereix un grup de retalls en el dibuix actual @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing Dibuix - + &Draft View &Vista d'esborrany - - + + Inserts a Draft view of the selected object(s) in the active drawing Insereix una vista d'esborrany dels objectes seleccionats en el dibuix actiu @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File Fitxer - + &Export page... &Exporta la pàgina... - - + + Export a page to an SVG file Exporta una pàgina a un fitxer SVG @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing Dibuix - - + + Insert new A3 landscape drawing Insert new A3 landscape drawing @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing Dibuix - - + + Insert new drawing Insereix un dibuix nou @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing Dibuix - + Insert view in drawing Insereix la vista en el dibuix - + Insert a new View of a Part in the active drawing Insereix una vista nova d'una peça en el dibuix actiu @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing Dibuix - + Open &browser view Obri una &vista de navegador - - + + Opens the selected page in a browser view Obri la pàgina seleccionada en una vista de navegador @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing Dibuix - + Insert orthographic views Insereix vistes ortogràfiques - + Insert an orthographic projection of a part in the active drawing Insereix una projecció ortogonal d'una part en el dibuix actiu @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing Dibuix - + Project shape... Projecta la forma... - - + + Project shape onto a user-defined plane Projecta la forma en un pla definit per l'usuari @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing Dibuix - + &Spreadsheet View &Visualització del full de càlcul - - + + Inserts a view of a selected spreadsheet in the active drawing Insereix una vista del full de càlcul seleccionat en el dibuix actiu @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing Dibuix - + &Symbol &Símbol - - + + Inserts a symbol from a svg file in the active drawing Insereix un símbol des d'un fitxer svg en el dibuix actiu @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background &Fons - + &Outline &Contorn - + &Native &Natiu - + &OpenGL &OpenGL - + &Image &Imatge - + &High Quality Antialiasing &Antialiàsing d'alta qualitat - + Open SVG File Obri un fitxer SVG - + Could not open file '%1'. No s'ha pogut obrir el fitxer '%1'. - + &Renderer &Renderitzador - + Export PDF Exporta a PDF - + PDF file Fitxer PDF - + Page sizes Mides de pàgina - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation Orientació diferent - + The printer uses a different orientation than the drawing. Do you want to continue? La impressora utilitza una orientació diferent de la del dibuix. Voleu continuar? - - + + Different paper size Mida de paper diferent - - + + The printer uses a different paper size than the drawing. Do you want to continue? La impressora utilitza una mida de paper diferent de la del dibuix. Voleu continuar? - + Opening file failed No s'ha pogut obrir el fitxer. - + Can't open file '%1' for writing. No s'ha pogut obrir el fitxer '%1' per a escriure-hi. @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges Arestes afilades visibles - + Visible smooth edges Arestes suaus visibles - + Visible sewn edges Arestes cosides visibles - + Visible outline edges Arestes de contorn visibles - + Visible isoparameters Isoparàmetres visibles - + Hidden sharp edges Arestes afilades amagades - + Hidden smooth edges Arestes suaus amagades - + Hidden sewn edges Arestes cosides amagades - + Hidden outline edges Arestes de contorn amagades - + Hidden isoparameters Isoparàmetres ocults - + Project shapes Projecta formes - + No active document No hi ha cap document actiu. - + There is currently no active document to complete the operation Actualment no hi ha cap document actiu per a completar l'operació @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page Pàgina - + Landscape Horitzontal - + Portrait Vertical - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing Insereix el nou dibuix %1%2 %3 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing Insereix el nou dibuix %1%2 %3 (%4) @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open Trieu un fitxer SVG per a obrir-lo - - - + + + Scalable Vector Graphic Gràfic vectorial escalable - - - - - + + + + + Wrong selection Selecció incorrecta - + Select a Part object. Seleccioneu un objecte peça - - - - - - + + + + + + No page found No s'ha trobat cap pàgina. - - - - - - + + + + + + Create a page first. Creeu una pàgina primer - + Select exactly one Part object. Seleccioneu exactament un únic objecte peça - - + + Select one Page object. Seleccioneu un objecte pàgina - + All Files Tots els fitxers - + Export page Exporta la pàgina - + Select exactly one Spreadsheet object. Seleccioneu exactament un sol objecte full de càlcul. - + Make axonometric... Fes axonomètrica... - + Edit axonometric settings... Edita la configuració axonomètrica... - + Make orthographic Fes ortogràfica diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-CN.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-CN.ts index 2eaf468879..ac44ce24f7 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-CN.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-CN.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing 图纸 - + &Annotation 注释(&A) - - + + Inserts an Annotation view in the active drawing 在当前制图中插入注释视图 @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing 图纸 - + &Clip 剪裁(&C) - - + + Inserts a clip group in the active drawing 在当前图纸中插入剪辑组 @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing 图纸 - + &Draft View 草图视图(&D) - - + + Inserts a Draft view of the selected object(s) in the active drawing 在当前图纸中插入所选对象的工程图视图 @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File 文件 - + &Export page... 导出页(&E)... - - + + Export a page to an SVG file 将页面导出为SVG文件 @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing 图纸 - - + + Insert new A3 landscape drawing 插入A3横向图框 @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing 图纸 - - + + Insert new drawing 插入新视图 @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing 图纸 - + Insert view in drawing 在图纸中插入视图 - + Insert a new View of a Part in the active drawing 在当前图纸中插入一个零件视图 @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing 图纸 - + Open &browser view 打开浏览器视图(&B) - - + + Opens the selected page in a browser view 在浏览器视图中打开选定页面 @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing 图纸 - + Insert orthographic views 插入正交视图 - + Insert an orthographic projection of a part in the active drawing 在当前图纸中插入零件的正交投影 @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing 图纸 - + Project shape... 投影形体... - - + + Project shape onto a user-defined plane 投影形体至用户定义平面 @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing 图纸 - + &Spreadsheet View 表格视图(&S) - - + + Inserts a view of a selected spreadsheet in the active drawing 在当前图纸中将所选表格作为一个视图插入 @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing 图纸 - + &Symbol 符号(&S) - - + + Inserts a symbol from a svg file in the active drawing 在当前图纸中将 svg 文件内容作为一个符号插入 @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background 背景(&B) - + &Outline 轮廓(&O) - + &Native 本地(&N) - + &OpenGL &OpenGL - + &Image 图片(&I) - + &High Quality Antialiasing 高品质抗锯齿(&H) - + Open SVG File 打开SVG文件 - + Could not open file '%1'. 无法打开文件'%1'. - + &Renderer 渲染器(&R) - + Export PDF 导出PDF - + PDF file PDF 文件 - + Page sizes 页面大小 - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation 不同方向 - + The printer uses a different orientation than the drawing. Do you want to continue? 打印机和图纸使用了不同的定位位置。你想要继续吗? - - + + Different paper size 不同的图纸大小 - - + + The printer uses a different paper size than the drawing. Do you want to continue? 打印机和当前图纸使用了不同大小的图纸,是否继续? - + Opening file failed 打开文件失败 - + Can't open file '%1' for writing. 无法打开文件“%1”进行写入。 @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges 锐化边缘可见 - + Visible smooth edges 平滑边缘可见 - + Visible sewn edges 可视缝合边 - + Visible outline edges 轮廓边缘可见 - + Visible isoparameters 可视等角参数 - + Hidden sharp edges 隐藏锐利边 - + Hidden smooth edges 平滑边缘隐藏 - + Hidden sewn edges 镶贴边缘隐藏 - + Hidden outline edges 轮廓边缘隐藏 - + Hidden isoparameters 隐藏iso参数 - + Project shapes 投影形体 - + No active document 没有活动文档 - + There is currently no active document to complete the operation 目前尚没有活动的文档来完成该操作 @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page - + Landscape 橫向 - + Portrait 纵向 - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing 插入新的 %1%2 %3 图面 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing 插入新的 %1%2 %3 (%4) 图面 @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open 选择一个SVG文件打开 - - - + + + Scalable Vector Graphic 可缩放矢量图形 - - - - - + + + + + Wrong selection 选择错误 - + Select a Part object. 选择零件对象. - - - - - - + + + + + + No page found 没有找到页面 - - - - - - + + + + + + Create a page first. 首先创建一个页面。 - + Select exactly one Part object. 选择一个零部件对象。 - - + + Select one Page object. 选择一个页对象. - + All Files 所有文件 - + Export page 导出页面 - + Select exactly one Spreadsheet object. 选择一个电子表格对象。 - + Make axonometric... 创建轴测投影... - + Edit axonometric settings... 编辑轴测图设置... - + Make orthographic 创建正交投影 diff --git a/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-TW.ts b/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-TW.ts index 528a3850ec..2a7f8187c4 100644 --- a/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-TW.ts +++ b/src/Mod/Drawing/Gui/Resources/translations/Drawing_zh-TW.ts @@ -4,18 +4,18 @@ CmdDrawingAnnotation - + Drawing 工程圖 - + &Annotation 註釋(&A) - - + + Inserts an Annotation view in the active drawing 於目前圖面插入註釋視圖 @@ -23,18 +23,18 @@ CmdDrawingClip - + Drawing 工程圖 - + &Clip 剪下(&C) - - + + Inserts a clip group in the active drawing 於目前圖面插入剪下群組 @@ -42,18 +42,18 @@ CmdDrawingDraftView - + Drawing 工程圖 - + &Draft View 底圖檢視(&D) - - + + Inserts a Draft view of the selected object(s) in the active drawing 於目前圖面中插入所選物件之底圖視圖 @@ -61,18 +61,18 @@ CmdDrawingExportPage - + File 檔案 - + &Export page... 匯出頁面(&E)... - - + + Export a page to an SVG file 匯出此頁為SVG檔 @@ -80,13 +80,13 @@ CmdDrawingNewA3Landscape - + Drawing 工程圖 - - + + Insert new A3 landscape drawing 插入新的 A3 橫式圖紙 @@ -94,13 +94,13 @@ CmdDrawingNewPage - + Drawing 工程圖 - - + + Insert new drawing 插入新繪圖區 @@ -108,17 +108,17 @@ CmdDrawingNewView - + Drawing 工程圖 - + Insert view in drawing 於繪圖區插入視圖 - + Insert a new View of a Part in the active drawing 於目前繪圖區插入新的零件視圖 @@ -144,18 +144,18 @@ CmdDrawingOpenBrowserView - + Drawing 工程圖 - + Open &browser view 開啟瀏覽模式(&b) - - + + Opens the selected page in a browser view 以瀏覽模式開啟選定頁面 @@ -163,17 +163,17 @@ CmdDrawingOrthoViews - + Drawing 工程圖 - + Insert orthographic views 插入正交視圖 - + Insert an orthographic projection of a part in the active drawing 插入目前圖面零件之正交投影 @@ -181,18 +181,18 @@ CmdDrawingProjectShape - + Drawing 工程圖 - + Project shape... 專案形式 - - + + Project shape onto a user-defined plane 投影外型至用戶定義的面上 @@ -200,18 +200,18 @@ CmdDrawingSpreadsheetView - + Drawing 工程圖 - + &Spreadsheet View 試算表視圖(&S) - - + + Inserts a view of a selected spreadsheet in the active drawing 於使用中之工程圖內插入所選之試算表視圖 @@ -219,18 +219,18 @@ CmdDrawingSymbol - + Drawing 工程圖 - + &Symbol 符號(&S) - - + + Inserts a symbol from a svg file in the active drawing 於目前圖面內插入一個來自svg檔的符號 @@ -238,126 +238,126 @@ DrawingGui::DrawingView - + &Background 背景(&B) - + &Outline 大綱(&O) - + &Native 原始的(&N) - + &OpenGL OpenGL(&O) - + &Image 影像(&I) - + &High Quality Antialiasing 高品質反鋸齒(&H) - + Open SVG File 開啟 SVG 檔 - + Could not open file '%1'. 無法開啟檔案"%1"。 - + &Renderer 算繪(&R) - + Export PDF 匯出 PDF - + PDF file PDF 檔 - + Page sizes 頁面尺寸 - + A0 A0 - + A1 A1 - + A2 A2 - + A3 A3 - + A4 A4 - + A5 A5 - + Different orientation 不同方向 - + The printer uses a different orientation than the drawing. Do you want to continue? 印表機與圖面使用之方向不同,您要繼續嗎? - - + + Different paper size 紙張尺寸不同 - - + + The printer uses a different paper size than the drawing. Do you want to continue? 印表機與圖面之紙張尺寸不同,您要繼續嗎? - + Opening file failed 開啟檔案失敗 - + Can't open file '%1' for writing. 無法開啟並寫入檔案 '%1' @@ -555,67 +555,67 @@ Do you want to continue? DrawingGui::TaskProjection - + Visible sharp edges 顯示銳利邊 - + Visible smooth edges 顯示平滑邊 - + Visible sewn edges 可視縫合邊 - + Visible outline edges 可視輪廓邊 - + Visible isoparameters 可視等角參數 - + Hidden sharp edges 隱藏銳利邊 - + Hidden smooth edges 隱藏平滑邊 - + Hidden sewn edges 隱藏縫合邊 - + Hidden outline edges 隱藏輪廓邊 - + Hidden isoparameters 隱藏等角參數 - + Project shapes 專案形式 - + No active document 無可用文件 - + There is currently no active document to complete the operation 目前尚無使用中之檔案可以完成操作 @@ -633,37 +633,37 @@ Do you want to continue? Drawing_NewPage - + Page - + Landscape 橫向 - + Portrait 縱向 - + %1%2 %3 %1%2 %3 - + Insert new %1%2 %3 drawing 插入新的 %1%2 %3 圖面 - + %1%2 %3 (%4) %1%2 %3 (%4) - + Insert new %1%2 %3 (%4) drawing 插入新的 %1%2 %3 (%4) 圖面 @@ -671,93 +671,93 @@ Do you want to continue? QObject - - + + Choose an SVG file to open 選擇要開啟的 SVG 檔 - - - + + + Scalable Vector Graphic 可縮放向量圖檔 - - - - - + + + + + Wrong selection 錯誤的選取 - + Select a Part object. 選取零件物件。 - - - - - - + + + + + + No page found 未發現頁面 - - - - - - + + + + + + Create a page first. 請先建立一個頁面 - + Select exactly one Part object. 請確實選取一個零件物件 - - + + Select one Page object. 選取一個頁面物件。 - + All Files 所有檔案 - + Export page 匯出頁面 - + Select exactly one Spreadsheet object. 請僅選擇一個試算表物件 - + Make axonometric... 產生軸測... - + Edit axonometric settings... 編輯軸測設定 - + Make orthographic 建立正投影視角 diff --git a/src/Mod/Fem/App/AppFem.cpp b/src/Mod/Fem/App/AppFem.cpp index e2e4f4a6c2..b71b06b2e7 100644 --- a/src/Mod/Fem/App/AppFem.cpp +++ b/src/Mod/Fem/App/AppFem.cpp @@ -30,26 +30,26 @@ #include "FemAnalysis.h" #include "FemConstraintBearing.h" -#include "FemConstraintFixed.h" -#include "FemConstraintForce.h" -#include "FemConstraintPressure.h" -#include "FemConstraintGear.h" -#include "FemConstraintPulley.h" +#include "FemConstraintContact.h" #include "FemConstraintDisplacement.h" -#include "FemConstraintTemperature.h" +#include "FemConstraintFixed.h" +#include "FemConstraintFluidBoundary.h" +#include "FemConstraintForce.h" +#include "FemConstraintGear.h" #include "FemConstraintHeatflux.h" #include "FemConstraintInitialTemperature.h" #include "FemConstraintPlaneRotation.h" -#include "FemConstraintContact.h" -#include "FemConstraintFluidBoundary.h" -#include "FemConstraintTransform.h" +#include "FemConstraintPressure.h" +#include "FemConstraintPulley.h" #include "FemConstraintSpring.h" +#include "FemConstraintTemperature.h" +#include "FemConstraintTransform.h" #include "FemMesh.h" #include "FemMeshObject.h" #include "FemMeshProperty.h" #include "FemMeshPy.h" -#include "FemMeshShapeObject.h" #include "FemMeshShapeNetgenObject.h" +#include "FemMeshShapeObject.h" #include "FemResultObject.h" #include "FemSetElementsObject.h" #include "FemSetFacesObject.h" @@ -59,14 +59,15 @@ #include "HypothesisPy.h" #ifdef FC_USE_VTK -# include "FemPostFilter.h" -# include "FemPostFunction.h" -# include "FemPostPipeline.h" -# include "PropertyPostDataObject.h" +#include "FemPostFilter.h" +#include "FemPostFunction.h" +#include "FemPostPipeline.h" +#include "PropertyPostDataObject.h" #endif -namespace Fem { +namespace Fem +{ extern PyObject* initModule(); } @@ -76,15 +77,16 @@ PyMOD_INIT_FUNC(Fem) // load dependent module try { Base::Interpreter().loadModule("Part"); - //Base::Interpreter().loadModule("Mesh"); + // Base::Interpreter().loadModule("Mesh"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } PyObject* femModule = Fem::initModule(); Base::Console().Log("Loading Fem module... done\n"); + // clang-format off Fem::StdMeshers_Arithmetic1DPy ::init_type(femModule); Fem::StdMeshers_AutomaticLengthPy ::init_type(femModule); Fem::StdMeshers_NotConformAllowedPy ::init_type(femModule); @@ -194,6 +196,7 @@ PyMOD_INIT_FUNC(Fem) Fem::PropertyPostDataObject ::init(); #endif + // clang-format on PyMOD_Return(femModule); } diff --git a/src/Mod/Fem/App/AppFemPy.cpp b/src/Mod/Fem/App/AppFemPy.cpp index 8cb3ccbd28..6b08618a28 100644 --- a/src/Mod/Fem/App/AppFemPy.cpp +++ b/src/Mod/Fem/App/AppFemPy.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -43,65 +43,77 @@ #endif -namespace Fem { -class Module : public Py::ExtensionModule +namespace Fem +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Fem") + Module() + : Py::ExtensionModule("Fem") { - add_varargs_method("open",&Module::open, - "open(string) -- Create a new document and a Mesh::Import feature to load the file into the document." - ); - add_varargs_method("insert",&Module::insert, - "insert(string|mesh,[string]) -- Load or insert a mesh into the given or active document." - ); - add_varargs_method("export",&Module::exporter, - "export(list,string) -- Export a list of objects into a single file." - ); - add_varargs_method("read",&Module::read, - "Read a mesh from a file and returns a Mesh object." - ); + add_varargs_method("open", + &Module::open, + "open(string) -- Create a new document and a Mesh::Import feature to " + "load the file into the document."); + add_varargs_method("insert", + &Module::insert, + "insert(string|mesh,[string]) -- Load or insert a mesh into the given " + "or active document."); + add_varargs_method("export", + &Module::exporter, + "export(list,string) -- Export a list of objects into a single file."); + add_varargs_method("read", + &Module::read, + "Read a mesh from a file and returns a Mesh object."); #ifdef FC_USE_VTK - add_varargs_method("readResult",&Module::readResult, - "Read a CFD or Mechanical result (auto detect) from a file (file format detected from file suffix)" - ); - add_varargs_method("writeResult",&Module::writeResult, - "write a CFD or FEM result (auto detect) to a file (file format detected from file suffix)" - ); + add_varargs_method("readResult", + &Module::readResult, + "Read a CFD or Mechanical result (auto detect) from a file (file format " + "detected from file suffix)"); + add_varargs_method("writeResult", + &Module::writeResult, + "write a CFD or FEM result (auto detect) to a file (file format " + "detected from file suffix)"); #endif - add_varargs_method("show",&Module::show, - "show(shape,[string]) -- Add the mesh to the active document or create one if no document exists." - ); - initialize("This module is the Fem module."); // register with Python + add_varargs_method("show", + &Module::show, + "show(shape,[string]) -- Add the mesh to the active document or create " + "one if no document exists."); + initialize("This module is the Fem module."); // register with Python } private: - Py::Object invoke_method_varargs(void *method_def, const Py::Tuple &args) override + Py::Object invoke_method_varargs(void* method_def, const Py::Tuple& args) override { try { return Py::ExtensionModule::invoke_method_varargs(method_def, args); } - catch (const Standard_Failure &e) { + catch (const Standard_Failure& e) { std::string str; Standard_CString msg = e.GetMessageString(); str += typeid(e).name(); str += " "; - if (msg) {str += msg;} - else {str += "No OCCT Exception Message";} + if (msg) { + str += msg; + } + else { + str += "No OCCT Exception Message"; + } throw Py::Exception(Part::PartExceptionOCCError, str); } - catch (const Base::Exception &e) { + catch (const Base::Exception& e) { throw Py::RuntimeError(e.what()); } - catch (const std::exception &e) { + catch (const std::exception& e) { throw Py::RuntimeError(e.what()); } } Py::Object open(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -110,9 +122,9 @@ private: mesh->read(EncodedName.c_str()); Base::FileInfo file(EncodedName.c_str()); // create new document and add Import feature - App::Document *pcDoc = App::GetApplication().newDocument(); - FemMeshObject *pcFeature = static_cast - (pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str())); + App::Document* pcDoc = App::GetApplication().newDocument(); + FemMeshObject* pcFeature = static_cast( + pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str())); pcFeature->Label.setValue(file.fileNamePure().c_str()); pcFeature->FemMesh.setValuePtr(mesh.release()); pcFeature->purgeTouched(); @@ -123,17 +135,20 @@ private: { char* Name; const char* DocName = nullptr; - if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&DocName)) + if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &DocName)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); - App::Document *pcDoc = nullptr; - if (DocName) + App::Document* pcDoc = nullptr; + if (DocName) { pcDoc = App::GetApplication().getDocument(DocName); - else + } + else { pcDoc = App::GetApplication().getActiveDocument(); + } if (!pcDoc) { pcDoc = App::GetApplication().newDocument(DocName); @@ -145,8 +160,8 @@ private: std::unique_ptr mesh(new FemMesh); mesh->read(EncodedName.c_str()); - FemMeshObject *pcFeature = static_cast - (pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str())); + FemMeshObject* pcFeature = static_cast( + pcDoc->addObject("Fem::FemMeshObject", file.fileNamePure().c_str())); pcFeature->Label.setValue(file.fileNamePure().c_str()); pcFeature->FemMesh.setValuePtr(mesh.release()); pcFeature->purgeTouched(); @@ -155,8 +170,8 @@ private: #ifdef FC_USE_VTK if (FemPostPipeline::canRead(file)) { - FemPostPipeline *pcFeature = static_cast - (pcDoc->addObject("Fem::FemPostPipeline", file.fileNamePure().c_str())); + FemPostPipeline* pcFeature = static_cast( + pcDoc->addObject("Fem::FemPostPipeline", file.fileNamePure().c_str())); pcFeature->Label.setValue(file.fileNamePure().c_str()); pcFeature->read(file); @@ -177,8 +192,9 @@ private: { PyObject* object; char* Name; - if (!PyArg_ParseTuple(args.ptr(), "Oet",&object,"utf-8",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "Oet", &object, "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -188,7 +204,8 @@ private: for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* item = (*it).ptr(); if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) { - App::DocumentObject* obj = static_cast(item)->getDocumentObjectPtr(); + App::DocumentObject* obj = + static_cast(item)->getDocumentObjectPtr(); if (obj->getTypeId().isDerivedFrom(meshId)) { static_cast(obj)->FemMesh.getValue().write(EncodedName.c_str()); return Py::None(); @@ -201,8 +218,9 @@ private: Py::Object read(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -218,21 +236,22 @@ private: char* fileName = nullptr; char* objName = nullptr; - if (!PyArg_ParseTuple(args.ptr(), "et|et","utf-8", &fileName, "utf-8", &objName)) + if (!PyArg_ParseTuple(args.ptr(), "et|et", "utf-8", &fileName, "utf-8", &objName)) { throw Py::Exception(); + } std::string EncodedName = std::string(fileName); PyMem_Free(fileName); std::string resName = std::string(objName); PyMem_Free(objName); - if (resName.length()) - { + if (resName.length()) { App::Document* pcDoc = App::GetApplication().getActiveDocument(); App::DocumentObject* obj = pcDoc->getObject(resName.c_str()); FemVTKTools::readResult(EncodedName.c_str(), obj); } - else + else { FemVTKTools::readResult(EncodedName.c_str()); // assuming activeObject can hold Result + } return Py::None(); } @@ -240,23 +259,29 @@ private: Py::Object writeResult(const Py::Tuple& args) { char* fileName = nullptr; - PyObject *pcObj = nullptr; + PyObject* pcObj = nullptr; - if (!PyArg_ParseTuple(args.ptr(), "et|O!","utf-8", &fileName, &(App::DocumentObjectPy::Type), &pcObj)) + if (!PyArg_ParseTuple(args.ptr(), + "et|O!", + "utf-8", + &fileName, + &(App::DocumentObjectPy::Type), + &pcObj)) { throw Py::Exception(); + } std::string EncodedName = std::string(fileName); PyMem_Free(fileName); - if (pcObj) - { - if (PyObject_TypeCheck(pcObj, &(App::DocumentObjectPy::Type))) - { - App::DocumentObject* obj = static_cast(pcObj)->getDocumentObjectPtr(); + if (pcObj) { + if (PyObject_TypeCheck(pcObj, &(App::DocumentObjectPy::Type))) { + App::DocumentObject* obj = + static_cast(pcObj)->getDocumentObjectPtr(); FemVTKTools::writeResult(EncodedName.c_str(), obj); } } - else + else { FemVTKTools::writeResult(EncodedName.c_str()); + } return Py::None(); } @@ -264,18 +289,20 @@ private: Py::Object show(const Py::Tuple& args) { - PyObject *pcObj; - char *name = "Mesh"; - if (!PyArg_ParseTuple(args.ptr(), "O!|s", &(FemMeshPy::Type), &pcObj, &name)) + PyObject* pcObj; + char* name = "Mesh"; + if (!PyArg_ParseTuple(args.ptr(), "O!|s", &(FemMeshPy::Type), &pcObj, &name)) { throw Py::Exception(); + } - App::Document *pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + App::Document* pcDoc = App::GetApplication().getActiveDocument(); + if (!pcDoc) { pcDoc = App::GetApplication().newDocument(); + } FemMeshPy* pShape = static_cast(pcObj); - Fem::FemMeshObject *pcFeature = static_cast - (pcDoc->addObject("Fem::FemMeshObject", name)); + Fem::FemMeshObject* pcFeature = + static_cast(pcDoc->addObject("Fem::FemMeshObject", name)); // copy the data pcFeature->FemMesh.setValue(*(pShape->getFemMeshPtr())); pcDoc->recompute(); @@ -289,4 +316,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Fem +} // namespace Fem diff --git a/src/Mod/Fem/App/FemAnalysis.cpp b/src/Mod/Fem/App/FemAnalysis.cpp index 69c081af4f..ff31baedda 100644 --- a/src/Mod/Fem/App/FemAnalysis.cpp +++ b/src/Mod/Fem/App/FemAnalysis.cpp @@ -62,17 +62,20 @@ PROPERTY_SOURCE_ABSTRACT(Fem::DocumentObject, App::DocumentObject) // Python feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Fem::FemAnalysisPython, Fem::FemAnalysis) -template<> const char* Fem::FemAnalysisPython::getViewProviderName() const { +template<> +const char* Fem::FemAnalysisPython::getViewProviderName() const +{ return "FemGui::ViewProviderFemAnalysisPython"; } // template<> void Fem::FemAnalysisPython::Restore(Base::XMLReader& reader) { // FemAnalysis::Restore(reader); // } -//template<> PyObject* Fem::FemAnalysisPython::getPyObject(void) { +// template<> PyObject* Fem::FemAnalysisPython::getPyObject(void) { // if (PythonObject.is(Py::_None())) { // // ref counter is set to 1 // PythonObject = Py::Object(new App::DocumentObjectPy(this),true); @@ -83,17 +86,22 @@ template<> const char* Fem::FemAnalysisPython::getViewProviderName() const { // explicit template instantiation template class FemExport FeaturePythonT; -} +} // namespace App // --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Fem::FeaturePython, Fem::DocumentObject) -template<> const char* Fem::FeaturePython::getViewProviderName() const { +template<> +const char* Fem::FeaturePython::getViewProviderName() const +{ return "Gui::ViewProviderPythonFeature"; } -template<> PyObject* Fem::FeaturePython::getPyObject() { +template<> +PyObject* Fem::FeaturePython::getPyObject() +{ if (PythonObject.is(Py::_None())) { // ref counter is set to 1 PythonObject = Py::Object(new App::FeaturePythonPyT(this), true); @@ -103,4 +111,4 @@ template<> PyObject* Fem::FeaturePython::getPyObject() { // explicit template instantiation template class FemExport FeaturePythonT; /// @endcond -} +} // namespace App diff --git a/src/Mod/Fem/App/FemAnalysis.h b/src/Mod/Fem/App/FemAnalysis.h index 222da40828..884db2ea46 100644 --- a/src/Mod/Fem/App/FemAnalysis.h +++ b/src/Mod/Fem/App/FemAnalysis.h @@ -24,12 +24,13 @@ #define Fem_FemAnalysis_H #include -#include #include +#include #include -namespace Fem { +namespace Fem +{ /** * @brief Container of objects relevant to one simulation. @@ -49,7 +50,8 @@ namespace Fem { * Analysis object. Every document object of FreeCAD can be part of a * Analysis. */ -class FemExport FemAnalysis : public App::DocumentObjectGroup { +class FemExport FemAnalysis: public App::DocumentObjectGroup +{ PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemAnalysis); public: @@ -66,9 +68,10 @@ public: * directory name for an analysis. Retains its value across save/load * cycles. */ - App::PropertyUUID Uid; + App::PropertyUUID Uid; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemAnalysis"; } @@ -82,11 +85,12 @@ protected: * property of DocumentObjectGroup. This methods translates old files * still using the "Member" property. */ - void handleChangedPropertyName( - Base::XMLReader &reader, const char * TypeName, const char *PropName) override; + void handleChangedPropertyName(Base::XMLReader& reader, + const char* TypeName, + const char* PropName) override; }; -class FemExport DocumentObject : public App::DocumentObject +class FemExport DocumentObject: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::DocumentObject); }; @@ -95,7 +99,7 @@ using FemAnalysisPython = App::FeaturePythonT; using FeaturePython = App::FeaturePythonT; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemAnalysis_H +#endif // Fem_FemAnalysis_H diff --git a/src/Mod/Fem/App/FemConstraint.cpp b/src/Mod/Fem/App/FemConstraint.cpp index eb9aafd9dd..84f5fb3477 100644 --- a/src/Mod/Fem/App/FemConstraint.cpp +++ b/src/Mod/Fem/App/FemConstraint.cpp @@ -24,32 +24,32 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include //OvG: Required for log10 -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if OCC_VERSION_HEX < 0x070600 -# include -# include -# endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //OvG: Required for log10 +#include +#include +#include +#include +#if OCC_VERSION_HEX < 0x070600 +#include +#include +#endif #endif #include @@ -72,16 +72,29 @@ PROPERTY_SOURCE(Fem::Constraint, App::DocumentObject) Constraint::Constraint() { - ADD_PROPERTY_TYPE(References, (nullptr, nullptr), "Constraint", (App::PropertyType)(App::Prop_None), "Elements where the constraint is applied"); - ADD_PROPERTY_TYPE(NormalDirection, (Base::Vector3d(0, 0, 1)), "Constraint", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Normal direction pointing outside of solid"); - ADD_PROPERTY_TYPE(Scale, (1), "Base", App::PropertyType(App::Prop_Output), "Scale used for drawing constraints"); //OvG: Add scale parameter inherited by all derived constraints + ADD_PROPERTY_TYPE(References, + (nullptr, nullptr), + "Constraint", + (App::PropertyType)(App::Prop_None), + "Elements where the constraint is applied"); + ADD_PROPERTY_TYPE(NormalDirection, + (Base::Vector3d(0, 0, 1)), + "Constraint", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Normal direction pointing outside of solid"); + ADD_PROPERTY_TYPE(Scale, + (1), + "Base", + App::PropertyType(App::Prop_Output), + "Scale used for drawing constraints"); // OvG: Add scale parameter inherited + // by all derived constraints References.setScope(App::LinkScope::Global); } Constraint::~Constraint() = default; -App::DocumentObjectExecReturn *Constraint::execute() +App::DocumentObjectExecReturn* Constraint::execute() { try { References.touch(); @@ -93,15 +106,17 @@ App::DocumentObjectExecReturn *Constraint::execute() } } -//OvG: Provide the ability to determine how big to draw constraint arrows etc. +// OvG: Provide the ability to determine how big to draw constraint arrows etc. int Constraint::calcDrawScaleFactor(double lparam) const { - return ((int)round(log(lparam)*log(lparam)*log(lparam)/10)>1)?((int)round(log(lparam)*log(lparam)*log(lparam)/10)):1; + return ((int)round(log(lparam) * log(lparam) * log(lparam) / 10) > 1) + ? ((int)round(log(lparam) * log(lparam) * log(lparam) / 10)) + : 1; } int Constraint::calcDrawScaleFactor(double lvparam, double luparam) const { - return calcDrawScaleFactor((lvparam+luparam)/2.0); + return calcDrawScaleFactor((lvparam + luparam) / 2.0); } int Constraint::calcDrawScaleFactor() const @@ -113,8 +128,9 @@ int Constraint::calcDrawScaleFactor() const void Constraint::onChanged(const App::Property* prop) { if (prop == &References) { - // If References are changed, recalculate the normal direction. If no useful reference is found, - // use z axis or previous value. If several faces are selected, only the first one is used + // If References are changed, recalculate the normal direction. If no useful reference is + // found, use z axis or previous value. If several faces are selected, only the first one is + // used std::vector Objects = References.getValues(); std::vector SubElements = References.getSubValues(); @@ -137,7 +153,7 @@ void Constraint::onChanged(const App::Property* prop) gp_Pnt center; double u1, u2, v1, v2; props.Bounds(u1, u2, v1, v2); - props.Normal((u1+u2)/2.0, (v1+v2)/2.0, center, normal); + props.Normal((u1 + u2) / 2.0, (v1 + v2) / 2.0, center, normal); normal.Normalize(); NormalDirection.setValue(normal.X(), normal.Y(), normal.Z()); // One face is enough... @@ -157,7 +173,9 @@ void Constraint::onDocumentRestored() App::DocumentObject::onDocumentRestored(); } -bool Constraint::getPoints(std::vector &points, std::vector &normals, int * scale) const +bool Constraint::getPoints(std::vector& points, + std::vector& normals, + int* scale) const { std::vector Objects = References.getValues(); std::vector SubElements = References.getSubValues(); @@ -169,23 +187,26 @@ bool Constraint::getPoints(std::vector &points, std::vector(obj); const Part::TopoShape& toposhape = feat->Shape.getShape(); - if (toposhape.isNull()) + if (toposhape.isNull()) { return false; + } sh = toposhape.getSubShape(SubElements[i].c_str(), true); - if (sh.IsNull()) + if (sh.IsNull()) { return false; + } if (sh.ShapeType() == TopAbs_VERTEX) { const TopoDS_Vertex& vertex = TopoDS::Vertex(sh); gp_Pnt p = BRep_Tool::Pnt(vertex); points.emplace_back(p.X(), p.Y(), p.Z()); normals.push_back(NormalDirection.getValue()); - //OvG: Scale by whole object mass in case of a vertex + // OvG: Scale by whole object mass in case of a vertex GProp_GProps props; BRepGProp::VolumeProperties(toposhape.getShape(), props); double lx = props.Mass(); - *scale = this->calcDrawScaleFactor(sqrt(lx)*0.5); //OvG: setup draw scale for constraint + // OvG: setup draw scale for constraint + *scale = this->calcDrawScaleFactor(sqrt(lx) * 0.5); } else if (sh.ShapeType() == TopAbs_EDGE) { BRepAdaptor_Curve curve(TopoDS::Edge(sh)); @@ -194,26 +215,26 @@ bool Constraint::getPoints(std::vector &points, std::vector= 30) //OvG: Increase 10 units distance proportionately to l for larger objects. - { - *scale = this->calcDrawScaleFactor(l); //OvG: setup draw scale for constraint - steps = (int)round(l / (10*( *scale))); - steps = steps<3?3:steps; + // OvG: Increase 10 units distance proportionately to l for larger objects. + if (l >= 30) { + *scale = this->calcDrawScaleFactor(l); // OvG: setup draw scale for constraint + steps = (int)round(l / (10 * (*scale))); + steps = steps < 3 ? 3 : steps; } - else if (l >= 20) - { + else if (l >= 20) { steps = (int)round(l / 10); - *scale = this->calcDrawScaleFactor(); //OvG: setup draw scale for constraint + *scale = this->calcDrawScaleFactor(); // OvG: setup draw scale for constraint } - else - { + else { steps = 1; - *scale = this->calcDrawScaleFactor(); //OvG: setup draw scale for constraint + *scale = this->calcDrawScaleFactor(); // OvG: setup draw scale for constraint } - steps = steps>CONSTRAINTSTEPLIMIT?CONSTRAINTSTEPLIMIT:steps; //OvG: Place upper limit on number of steps + // OvG: Place upper limit on number of steps + steps = steps > CONSTRAINTSTEPLIMIT ? CONSTRAINTSTEPLIMIT : steps; double step = (lp - fp) / steps; for (int i = 0; i < steps + 1; i++) { // Parameter values must be in the range [fp, lp] (#0003683) @@ -256,12 +277,12 @@ bool Constraint::getPoints(std::vector &points, std::vectorValue(ulp, vfp); gp_Pnt p2 = hsurf->Value(ulp, vlp); - lv = (l + p1.Distance(p2))/2.0; + lv = (l + p1.Distance(p2)) / 2.0; } try { @@ -276,52 +297,52 @@ bool Constraint::getPoints(std::vector &points, std::vectorValue(ufp, vlp); gp_Pnt p2 = hsurf->Value(ulp, vlp); - lu = (l + p1.Distance(p2))/2.0; + lu = (l + p1.Distance(p2)) / 2.0; } + // OvG: Increase 10 units distance proportionately to lv for larger objects. int stepsv; - if (lv >= 30) //OvG: Increase 10 units distance proportionately to lv for larger objects. - { - *scale = this->calcDrawScaleFactor(lv, lu); //OvG: setup draw scale for constraint + if (lv >= 30) { + *scale = this->calcDrawScaleFactor(lv, lu); // OvG: setup draw scale for constraint stepsv = (int)round(lv / (10 * (*scale))); - stepsv = stepsv<3?3:stepsv; + stepsv = stepsv < 3 ? 3 : stepsv; } - else if (lv >= 20.0) - { + else if (lv >= 20.0) { stepsv = (int)round(lv / 10); - *scale = this->calcDrawScaleFactor(); //OvG: setup draw scale for constraint + *scale = this->calcDrawScaleFactor(); // OvG: setup draw scale for constraint } - else - { - stepsv = 2; // Minimum of three arrows to ensure (as much as possible) that at least one is displayed - *scale = this->calcDrawScaleFactor(); //OvG: setup draw scale for constraint + else { + // Minimum of three arrows to ensure (as much as possible) that at + // least one is displayed + stepsv = 2; + *scale = this->calcDrawScaleFactor(); // OvG: setup draw scale for constraint } - stepsv = stepsv>CONSTRAINTSTEPLIMIT?CONSTRAINTSTEPLIMIT:stepsv; //OvG: Place upper limit on number of steps + // OvG: Place upper limit on number of steps + stepsv = stepsv > CONSTRAINTSTEPLIMIT ? CONSTRAINTSTEPLIMIT : stepsv; int stepsu; - if (lu >= 30) //OvG: Increase 10 units distance proportionately to lu for larger objects. - { - *scale = this->calcDrawScaleFactor(lv,lu); //OvG: setup draw scale for constraint - stepsu = (int)round(lu / (10*( *scale))); - stepsu = stepsu<3?3:stepsu; + // OvG: Increase 10 units distance proportionately to lu for larger objects. + if (lu >= 30) { + *scale = this->calcDrawScaleFactor(lv, lu); // OvG: setup draw scale for constraint + stepsu = (int)round(lu / (10 * (*scale))); + stepsu = stepsu < 3 ? 3 : stepsu; } - else if (lu >= 20.0) - { + else if (lu >= 20.0) { stepsu = (int)round(lu / 10); - *scale = this->calcDrawScaleFactor(); //OvG: setup draw scale for constraint + *scale = this->calcDrawScaleFactor(); // OvG: setup draw scale for constraint } - else - { + else { stepsu = 2; - *scale = this->calcDrawScaleFactor(); //OvG: setup draw scale for constraint + *scale = this->calcDrawScaleFactor(); // OvG: setup draw scale for constraint } - stepsu = stepsu>CONSTRAINTSTEPLIMIT?CONSTRAINTSTEPLIMIT:stepsu; //OvG: Place upper limit on number of steps + // OvG: Place upper limit on number of steps + stepsu = stepsu > CONSTRAINTSTEPLIMIT ? CONSTRAINTSTEPLIMIT : stepsu; double stepv = (vlp - vfp) / stepsv; double stepu = (ulp - ufp) / stepsu; // Create points and normals @@ -333,7 +354,7 @@ bool Constraint::getPoints(std::vector &points, std::vector &points, std::vector Objects = References.getValues(); std::vector SubElements = References.getSubValues(); - if (Objects.empty()) + if (Objects.empty()) { return false; + } App::DocumentObject* obj = Objects[0]; Part::Feature* feat = static_cast(obj); const Part::TopoShape& toposhape = feat->Shape.getShape(); - if (toposhape.isNull()) + if (toposhape.isNull()) { return false; + } TopoDS_Shape sh = toposhape.getSubShape(SubElements[0].c_str()); TopoDS_Face face = TopoDS::Face(sh); BRepAdaptor_Surface surface(face); gp_Cylinder cyl = surface.Cylinder(); gp_Pnt start = surface.Value(surface.FirstUParameter(), surface.FirstVParameter()); - gp_Pnt end = surface.Value(surface.FirstUParameter(), surface.LastVParameter()); + gp_Pnt end = surface.Value(surface.FirstUParameter(), surface.LastVParameter()); height = start.Distance(end); radius = cyl.Radius(); @@ -374,14 +400,17 @@ bool Constraint::getCylinder(double &radius, double &height, Base::Vector3d& bas return true; } -Base::Vector3d Constraint::getBasePoint(const Base::Vector3d& base, const Base::Vector3d& axis, - const App::PropertyLinkSub& location, const double& dist) +Base::Vector3d Constraint::getBasePoint(const Base::Vector3d& base, + const Base::Vector3d& axis, + const App::PropertyLinkSub& location, + const double& dist) { // Get the point specified by Location and Distance App::DocumentObject* objLoc = location.getValue(); std::vector names = location.getSubValues(); - if (names.empty()) - return Base::Vector3d(0,0,0); + if (names.empty()) { + return Base::Vector3d(0, 0, 0); + } std::string subName = names.front(); Part::Feature* featLoc = static_cast(objLoc); TopoDS_Shape shloc = featLoc->Shape.getShape().getSubShape(subName.c_str()); @@ -392,7 +421,8 @@ Base::Vector3d Constraint::getBasePoint(const Base::Vector3d& base, const Base:: if (shloc.ShapeType() == TopAbs_FACE) { BRepAdaptor_Surface surface(TopoDS::Face(shloc)); plane = surface.Plane(); - } else { + } + else { BRepAdaptor_Curve curve(TopoDS::Edge(shloc)); gp_Lin line = curve.Line(); gp_Dir tang = line.Direction().Crossed(cylaxis); @@ -404,28 +434,32 @@ Base::Vector3d Constraint::getBasePoint(const Base::Vector3d& base, const Base:: Handle(Geom_Plane) pln = new Geom_Plane(plane); gp_Pnt cylbase(base.x, base.y, base.z); GeomAPI_ProjectPointOnSurf proj(cylbase, pln); - if (!proj.IsDone()) - return Base::Vector3d(0,0,0); + if (!proj.IsDone()) { + return Base::Vector3d(0, 0, 0); + } gp_Pnt projPnt = proj.NearestPoint(); - if ((fabs(dist) > Precision::Confusion()) && (projPnt.IsEqual(cylbase, Precision::Confusion()) == Standard_False)) + if ((fabs(dist) > Precision::Confusion()) + && (projPnt.IsEqual(cylbase, Precision::Confusion()) == Standard_False)) { plane.Translate(gp_Vec(projPnt, cylbase).Normalized().Multiplied(dist)); + } Handle(Geom_Plane) plnt = new Geom_Plane(plane); // Intersect translated plane with cylinder axis Handle(Geom_Curve) crv = new Geom_Line(cylbase, cylaxis); GeomAPI_IntCS intersector(crv, plnt); - if (!intersector.IsDone()) - return Base::Vector3d(0,0,0); + if (!intersector.IsDone()) { + return Base::Vector3d(0, 0, 0); + } gp_Pnt inter = intersector.Point(1); return Base::Vector3d(inter.X(), inter.Y(), inter.Z()); } -const Base::Vector3d Constraint::getDirection(const App::PropertyLinkSub &direction) +const Base::Vector3d Constraint::getDirection(const App::PropertyLinkSub& direction) { App::DocumentObject* obj = direction.getValue(); if (!obj) { - return Base::Vector3d(0,0,0); + return Base::Vector3d(0, 0, 0); } if (obj->getTypeId().isDerivedFrom(App::Line::getClassTypeId())) { @@ -447,13 +481,15 @@ const Base::Vector3d Constraint::getDirection(const App::PropertyLinkSub &direct } std::vector names = direction.getSubValues(); - if (names.empty()) - return Base::Vector3d(0,0,0); + if (names.empty()) { + return Base::Vector3d(0, 0, 0); + } std::string subName = names.front(); Part::Feature* feat = static_cast(obj); const Part::TopoShape& shape = feat->Shape.getShape(); - if (shape.isNull()) - return Base::Vector3d(0,0,0); + if (shape.isNull()) { + return Base::Vector3d(0, 0, 0); + } TopoDS_Shape sh; try { sh = shape.getSubShape(subName.c_str()); @@ -469,17 +505,22 @@ const Base::Vector3d Constraint::getDirection(const App::PropertyLinkSub &direct // Python feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Fem::ConstraintPython, Fem::Constraint) -template<> const char* Fem::ConstraintPython::getViewProviderName() const { +template<> +const char* Fem::ConstraintPython::getViewProviderName() const +{ return "FemGui::ViewProviderFemConstraintPython"; } -template<> PyObject* Fem::ConstraintPython::getPyObject() { +template<> +PyObject* Fem::ConstraintPython::getPyObject() +{ if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new App::FeaturePythonPyT(this),true); + PythonObject = Py::Object(new App::FeaturePythonPyT(this), true); } return Py::new_reference_to(PythonObject); } @@ -489,4 +530,4 @@ template class FemExport FeaturePythonT; /// @endcond -} +} // namespace App diff --git a/src/Mod/Fem/App/FemConstraint.h b/src/Mod/Fem/App/FemConstraint.h index 77899c69bd..e5f9c0782f 100644 --- a/src/Mod/Fem/App/FemConstraint.h +++ b/src/Mod/Fem/App/FemConstraint.h @@ -32,7 +32,8 @@ #include -namespace Fem { +namespace Fem +{ /** * @brief Base class of all Constraint Objects of the Fem module. @@ -56,7 +57,8 @@ namespace Fem { * and @ref Scale and the protected method @ref getPoints(points&, normals&, * scale&). */ -class FemExport Constraint : public App::DocumentObject { +class FemExport Constraint: public App::DocumentObject +{ PROPERTY_HEADER_WITH_OVERRIDE(Fem::Constraint); public: @@ -113,7 +115,7 @@ public: * cleared right after the @ref execute call by the recompute mechanism. * See Document::recompute() and DocumentObject::purgeTouched(). */ - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /** * @brief Calculates scale factor based on length of edge. @@ -154,12 +156,12 @@ public: */ int calcDrawScaleFactor() const; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemConstraint"; } protected: - /** * @brief Updates NormalDirection if References change. */ @@ -208,10 +210,9 @@ protected: * returns true. If an error occurred and the data couldn't be extracted * properly false is returned. */ - bool getPoints( - std::vector& points, - std::vector& normals, - int * scale) const; + bool getPoints(std::vector& points, + std::vector& normals, + int* scale) const; /** * @brief Extract properties of cylindrical face. @@ -220,9 +221,8 @@ protected: * This method is very specific and doesn't require access to member * variables. It should be rewritten at a different place. */ - bool getCylinder( - double& radius, double& height, - Base::Vector3d& base, Base::Vector3d& axis) const; + bool + getCylinder(double& radius, double& height, Base::Vector3d& base, Base::Vector3d& axis) const; /** * @brief Calculate point of cylindrical face where to render widget. @@ -231,8 +231,10 @@ protected: * This method is very specific and doesn't require access to member * variables. It should be rewritten at a different place. */ - Base::Vector3d getBasePoint(const Base::Vector3d& base, const Base::Vector3d& axis, - const App::PropertyLinkSub &location, const double& dist); + Base::Vector3d getBasePoint(const Base::Vector3d& base, + const Base::Vector3d& axis, + const App::PropertyLinkSub& location, + const double& dist); /** * @brief Get normal vector of point calculated by @ref getBasePoint. * @@ -240,13 +242,13 @@ protected: * This method is very specific and doesn't require access to member * variables. It should be rewritten at a different place. */ - const Base::Vector3d getDirection(const App::PropertyLinkSub &direction); + const Base::Vector3d getDirection(const App::PropertyLinkSub& direction); }; using ConstraintPython = App::FeaturePythonT; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINT_H +#endif // FEM_CONSTRAINT_H diff --git a/src/Mod/Fem/App/FemConstraintBearing.cpp b/src/Mod/Fem/App/FemConstraintBearing.cpp index e54cef3e39..69a06a86c0 100644 --- a/src/Mod/Fem/App/FemConstraintBearing.cpp +++ b/src/Mod/Fem/App/FemConstraintBearing.cpp @@ -40,19 +40,28 @@ PROPERTY_SOURCE(Fem::ConstraintBearing, Fem::Constraint) ConstraintBearing::ConstraintBearing() { - ADD_PROPERTY_TYPE(Location,(nullptr),"ConstraintBearing",(App::PropertyType)(App::Prop_None), + ADD_PROPERTY_TYPE(Location, + (nullptr), + "ConstraintBearing", + (App::PropertyType)(App::Prop_None), "Element giving axial location of constraint"); - ADD_PROPERTY(Dist,(0.0)); - ADD_PROPERTY(AxialFree,(0)); - ADD_PROPERTY(Radius,(0.0)); - ADD_PROPERTY(Height,(0.0)); - ADD_PROPERTY_TYPE(BasePoint,(Base::Vector3d(0,0,0)),"ConstraintBearing",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY(Dist, (0.0)); + ADD_PROPERTY(AxialFree, (0)); + ADD_PROPERTY(Radius, (0.0)); + ADD_PROPERTY(Height, (0.0)); + ADD_PROPERTY_TYPE(BasePoint, + (Base::Vector3d(0, 0, 0)), + "ConstraintBearing", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Base point of cylindrical bearing seat"); - ADD_PROPERTY_TYPE(Axis,(Base::Vector3d(0,1,0)),"ConstraintBearing",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(Axis, + (Base::Vector3d(0, 1, 0)), + "ConstraintBearing", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Axis of bearing seat"); } -App::DocumentObjectExecReturn *ConstraintBearing::execute() +App::DocumentObjectExecReturn* ConstraintBearing::execute() { return Constraint::execute(); } @@ -67,19 +76,21 @@ void ConstraintBearing::onChanged(const App::Property* prop) // Find data of cylinder double radius, height; Base::Vector3d base, axis; - if (!getCylinder(radius, height, base, axis)) + if (!getCylinder(radius, height, base, axis)) { return; + } Radius.setValue(radius); Axis.setValue(axis); Height.setValue(height); // Update base point - base = base + axis * height/2; + base = base + axis * height / 2; if (Location.getValue()) { base = getBasePoint(base, axis, Location, Dist.getValue()); } BasePoint.setValue(base); - BasePoint.touch(); // This triggers ViewProvider::updateData() - } else if ((prop == &Location) || (prop == &Dist)) { + BasePoint.touch(); // This triggers ViewProvider::updateData() + } + else if ((prop == &Location) || (prop == &Dist)) { App::DocumentObject* obj = Location.getValue(); std::vector names = Location.getSubValues(); if (names.empty()) { @@ -92,20 +103,22 @@ void ConstraintBearing::onChanged(const App::Property* prop) if (sh.ShapeType() == TopAbs_FACE) { BRepAdaptor_Surface surface(TopoDS::Face(sh)); if (surface.GetType() != GeomAbs_Plane) { - return; // "Location must be a planar face or linear edge" + return; // "Location must be a planar face or linear edge" } - } else if (sh.ShapeType() == TopAbs_EDGE) { + } + else if (sh.ShapeType() == TopAbs_EDGE) { BRepAdaptor_Curve line(TopoDS::Edge(sh)); if (line.GetType() != GeomAbs_Line) { - return; // "Location must be a planar face or linear edge" + return; // "Location must be a planar face or linear edge" } } double radius, height; Base::Vector3d base, axis; - if (!getCylinder(radius, height, base, axis)) + if (!getCylinder(radius, height, base, axis)) { return; - base = getBasePoint(base + axis * height/2, axis, Location, Dist.getValue()); + } + base = getBasePoint(base + axis * height / 2, axis, Location, Dist.getValue()); BasePoint.setValue(base); BasePoint.touch(); } diff --git a/src/Mod/Fem/App/FemConstraintBearing.h b/src/Mod/Fem/App/FemConstraintBearing.h index b5d91ce515..d02fc0e62b 100644 --- a/src/Mod/Fem/App/FemConstraintBearing.h +++ b/src/Mod/Fem/App/FemConstraintBearing.h @@ -33,7 +33,7 @@ namespace Fem { -class FemExport ConstraintBearing : public Fem::Constraint +class FemExport ConstraintBearing: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintBearing); @@ -54,10 +54,11 @@ public: App::PropertyVector Axis; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemConstraintBearing"; } @@ -65,7 +66,7 @@ protected: void onChanged(const App::Property* prop) override; }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTBEARING_H +#endif // FEM_CONSTRAINTBEARING_H diff --git a/src/Mod/Fem/App/FemConstraintContact.cpp b/src/Mod/Fem/App/FemConstraintContact.cpp index 7a1d09be44..d49c67c262 100644 --- a/src/Mod/Fem/App/FemConstraintContact.cpp +++ b/src/Mod/Fem/App/FemConstraintContact.cpp @@ -32,20 +32,26 @@ PROPERTY_SOURCE(Fem::ConstraintContact, Fem::Constraint) ConstraintContact::ConstraintContact() { -/*Note: Initialise parameters here*/ - ADD_PROPERTY(Slope,(0.0)); - ADD_PROPERTY(Friction,(0.0)); -/* */ + /*Note: Initialise parameters here*/ + ADD_PROPERTY(Slope, (0.0)); + ADD_PROPERTY(Friction, (0.0)); + /* */ - ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"ConstraintContact",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintContact", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"ConstraintContact",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), - "Normals where symbols are drawn"); + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintContact", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Normals where symbols are drawn"); Points.setValues(std::vector()); Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintContact::execute() +App::DocumentObjectExecReturn* ConstraintContact::execute() { return Constraint::execute(); } @@ -62,12 +68,12 @@ void ConstraintContact::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintContact.h b/src/Mod/Fem/App/FemConstraintContact.h index 1c48949f64..60c82cfbf9 100644 --- a/src/Mod/Fem/App/FemConstraintContact.h +++ b/src/Mod/Fem/App/FemConstraintContact.h @@ -30,7 +30,7 @@ namespace Fem { -class FemExport ConstraintContact : public Fem::Constraint +class FemExport ConstraintContact: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintContact); @@ -42,32 +42,31 @@ public: App::PropertyVectorList Points; App::PropertyVectorList Normals; -/*Note*/ - //Constraint parameters + /*Note*/ + // Constraint parameters /****** * Add the constraint parameters here, the variables or data * that needs to be eventually send over to the calculix input file. * This is only the definitions of the variables ******/ - //ex. + // ex. App::PropertyFloat Slope; App::PropertyFloat Friction; - //etc -/* */ + // etc + /* */ /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; protected: void onChanged(const App::Property* prop) override; - }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTCONTACT_H +#endif // FEM_CONSTRAINTCONTACT_H diff --git a/src/Mod/Fem/App/FemConstraintDisplacement.cpp b/src/Mod/Fem/App/FemConstraintDisplacement.cpp index d7f56e225c..4fcb5f4f01 100644 --- a/src/Mod/Fem/App/FemConstraintDisplacement.cpp +++ b/src/Mod/Fem/App/FemConstraintDisplacement.cpp @@ -94,7 +94,7 @@ ConstraintDisplacement::ConstraintDisplacement() Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintDisplacement::execute() +App::DocumentObjectExecReturn* ConstraintDisplacement::execute() { return Constraint::execute(); } @@ -105,8 +105,8 @@ const char* ConstraintDisplacement::getViewProviderName() const } void ConstraintDisplacement::handleChangedPropertyType(Base::XMLReader& reader, - const char* TypeName, - App::Property* prop) + const char* TypeName, + App::Property* prop) { // properties _Displacement had App::PropertyFloat and were changed to App::PropertyDistance if (prop == &xDisplacement && strcmp(TypeName, "App::PropertyFloat") == 0) { @@ -152,12 +152,12 @@ void ConstraintDisplacement::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; // OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); // OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintDisplacement.h b/src/Mod/Fem/App/FemConstraintDisplacement.h index 4ce17ce7ab..69fa72248f 100644 --- a/src/Mod/Fem/App/FemConstraintDisplacement.h +++ b/src/Mod/Fem/App/FemConstraintDisplacement.h @@ -32,7 +32,7 @@ namespace Fem { -class FemExport ConstraintDisplacement : public Fem::Constraint +class FemExport ConstraintDisplacement: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintDisplacement); @@ -44,7 +44,7 @@ public: App::PropertyVectorList Points; App::PropertyVectorList Normals; - //Displacement parameters + // Displacement parameters App::PropertyDistance xDisplacement; App::PropertyDistance yDisplacement; App::PropertyDistance zDisplacement; @@ -72,19 +72,19 @@ public: App::PropertyBool useFlowSurfaceForce; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; protected: - void handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, App::Property* prop) override; void onChanged(const App::Property* prop) override; - }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTDISPLACEMENT_H +#endif // FEM_CONSTRAINTDISPLACEMENT_H diff --git a/src/Mod/Fem/App/FemConstraintFixed.cpp b/src/Mod/Fem/App/FemConstraintFixed.cpp index c43ca31cc1..0df6f879f5 100644 --- a/src/Mod/Fem/App/FemConstraintFixed.cpp +++ b/src/Mod/Fem/App/FemConstraintFixed.cpp @@ -32,15 +32,21 @@ PROPERTY_SOURCE(Fem::ConstraintFixed, Fem::Constraint) ConstraintFixed::ConstraintFixed() { - ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"ConstraintFixed",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintFixed", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"ConstraintFixed",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), - "Normals where symbols are drawn"); + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintFixed", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Normals where symbols are drawn"); Points.setValues(std::vector()); Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintFixed::execute() +App::DocumentObjectExecReturn* ConstraintFixed::execute() { return Constraint::execute(); } @@ -54,12 +60,12 @@ void ConstraintFixed::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintFixed.h b/src/Mod/Fem/App/FemConstraintFixed.h index 79fbf05bf8..a7d2d1462b 100644 --- a/src/Mod/Fem/App/FemConstraintFixed.h +++ b/src/Mod/Fem/App/FemConstraintFixed.h @@ -30,7 +30,7 @@ namespace Fem { -class FemExport ConstraintFixed : public Fem::Constraint +class FemExport ConstraintFixed: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintFixed); @@ -43,10 +43,11 @@ public: App::PropertyVectorList Normals; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemConstraintFixed"; } @@ -54,7 +55,7 @@ protected: void onChanged(const App::Property* prop) override; }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTFIXED_H +#endif // FEM_CONSTRAINTFIXED_H diff --git a/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp b/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp index 20f6f57f76..56a98c888d 100644 --- a/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -36,6 +36,7 @@ using namespace Fem; PROPERTY_SOURCE(Fem::ConstraintFluidBoundary, Fem::Constraint) +// clang-format off // see forum topic: https://forum.freecad.org/viewtopic.php?&p=407901 // also defined in TaskFemConstraintFluidBoundary.cpp and FoamCaseBuilder/BasicBuilder.py, update simultaneously @@ -58,9 +59,11 @@ static const char* ThermalBoundaryTypes[] = {"fixedValue","zeroGradient", "fixed static const char* ThermalBoundaryHelpTexts[] = {"fixed Temperature [K]", "no heat transfer ()", "fixed value heat flux [K/m]", "mixed fixedGradient and fixedValue", "fixed heat flux [W/m2]", "Heat transfer coeff [W/(M2)/K]", "conjugate heat transfer with solid", NULL}; */ +// clang-format on ConstraintFluidBoundary::ConstraintFluidBoundary() { + // clang-format off /// momentum boundary: pressure and velocity ADD_PROPERTY_TYPE(BoundaryType,(1),"FluidBoundary",(App::PropertyType)(App::Prop_None), "Basic boundary type like inlet, wall, outlet,etc"); @@ -104,9 +107,10 @@ ConstraintFluidBoundary::ConstraintFluidBoundary() ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"FluidBoundary",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), "Normals where symbols are drawn"); Normals.setValues(std::vector()); + // clang-format on } -App::DocumentObjectExecReturn *ConstraintFluidBoundary::execute() +App::DocumentObjectExecReturn* ConstraintFluidBoundary::execute() { return Constraint::execute(); } @@ -128,40 +132,47 @@ void ConstraintFluidBoundary::onChanged(const App::Property* prop) else if (boundaryType == "freestream") { Subtype.setEnums(FreestreamSubtypes); } - else if(boundaryType == "inlet") { + else if (boundaryType == "inlet") { Subtype.setEnums(InletSubtypes); } - else if(boundaryType == "outlet") { + else if (boundaryType == "outlet") { Subtype.setEnums(OutletSubtypes); } else { Base::Console().Message(boundaryType.c_str()); Base::Console().Message(" Error: this boundaryType is not defined\n"); } - Subtype.setValue(1); // must set a default (0 or 1) as freestream has only 2 subtypes + + // must set a default (0 or 1) as freestream has only 2 subtypes + Subtype.setValue(1); // need to trigger ViewProvider::updateData() for redraw in 3D view after this method } - //naturalDirectionVector is a private member of this class + // naturalDirectionVector is a private member of this class if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } - } else if (prop == &Direction) { - Base::Vector3d direction = getDirection(Direction); // Fem::Constraint - if (direction.Length() < Precision::Confusion()) // if Direct has no link provided return Base::Vector3d(0,0,0); + } + else if (prop == &Direction) { + Base::Vector3d direction = getDirection(Direction); + // if Direct has no link provided return Base::Vector3d(0,0,0); + if (direction.Length() < Precision::Confusion()) { return; + } naturalDirectionVector = direction; - if (Reversed.getValue()) + if (Reversed.getValue()) { direction = -direction; + } DirectionVector.setValue(direction); - } else if (prop == &Reversed) { + } + else if (prop == &Reversed) { // if the direction is invalid try to compute it again if (naturalDirectionVector.Length() < Precision::Confusion()) { naturalDirectionVector = getDirection(Direction); @@ -169,16 +180,20 @@ void ConstraintFluidBoundary::onChanged(const App::Property* prop) if (naturalDirectionVector.Length() >= Precision::Confusion()) { if (Reversed.getValue() && (DirectionVector.getValue() == naturalDirectionVector)) { DirectionVector.setValue(-naturalDirectionVector); - } else if (!Reversed.getValue() && (DirectionVector.getValue() != naturalDirectionVector)) { + } + else if (!Reversed.getValue() + && (DirectionVector.getValue() != naturalDirectionVector)) { DirectionVector.setValue(naturalDirectionVector); } } - } else if (prop == &NormalDirection) { + } + else if (prop == &NormalDirection) { // Set a default direction if no direction reference has been given if (!Direction.getValue()) { Base::Vector3d direction = NormalDirection.getValue(); - if (Reversed.getValue()) + if (Reversed.getValue()) { direction = -direction; + } DirectionVector.setValue(direction); naturalDirectionVector = direction; } diff --git a/src/Mod/Fem/App/FemConstraintFluidBoundary.h b/src/Mod/Fem/App/FemConstraintFluidBoundary.h index 403e27fc12..9a43031800 100644 --- a/src/Mod/Fem/App/FemConstraintFluidBoundary.h +++ b/src/Mod/Fem/App/FemConstraintFluidBoundary.h @@ -55,14 +55,15 @@ public: App::PropertyBool Reversed; // Read-only (calculated values). These trigger changes in the ViewProvider App::PropertyVectorList Points; - App::PropertyVectorList Normals; // needed to draw diff BoundaryType + App::PropertyVectorList Normals; // needed to draw diff BoundaryType App::PropertyVector DirectionVector; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemConstraintFluidBoundary"; } @@ -73,7 +74,7 @@ private: Base::Vector3d naturalDirectionVector; }; -} //namespace Fem +} // namespace Fem -#endif // FEM_FLUIDBOUNDARY_H +#endif // FEM_FLUIDBOUNDARY_H diff --git a/src/Mod/Fem/App/FemConstraintForce.cpp b/src/Mod/Fem/App/FemConstraintForce.cpp index 7da870e3a3..68099c550a 100644 --- a/src/Mod/Fem/App/FemConstraintForce.cpp +++ b/src/Mod/Fem/App/FemConstraintForce.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "FemConstraintForce.h" @@ -36,19 +36,29 @@ PROPERTY_SOURCE(Fem::ConstraintForce, Fem::Constraint) ConstraintForce::ConstraintForce() { - ADD_PROPERTY(Force,(0.0)); - ADD_PROPERTY_TYPE(Direction,(nullptr),"ConstraintForce",(App::PropertyType)(App::Prop_None), + ADD_PROPERTY(Force, (0.0)); + ADD_PROPERTY_TYPE(Direction, + (nullptr), + "ConstraintForce", + (App::PropertyType)(App::Prop_None), "Element giving direction of constraint"); - ADD_PROPERTY(Reversed,(0)); - ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"ConstraintForce",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY(Reversed, (0)); + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintForce", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where arrows are drawn"); - ADD_PROPERTY_TYPE(DirectionVector,(Base::Vector3d(0,0,1)),"ConstraintForce",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(DirectionVector, + (Base::Vector3d(0, 0, 1)), + "ConstraintForce", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Direction of arrows"); - naturalDirectionVector = Base::Vector3d(0,0,0); // by default use the null vector to indicate an invalid value + naturalDirectionVector = + Base::Vector3d(0, 0, 0); // by default use the null vector to indicate an invalid value Points.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintForce::execute() +App::DocumentObjectExecReturn* ConstraintForce::execute() { return Constraint::execute(); } @@ -62,21 +72,27 @@ void ConstraintForce::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { - Points.setValues(points); // We don't use the normals because all arrows should have the same direction - Scale.setValue(scale); //OvG Scale + // We don't use the normals because all arrows should have + // the same direction + Points.setValues(points); + Scale.setValue(scale); Points.touch(); } - } else if (prop == &Direction) { + } + else if (prop == &Direction) { Base::Vector3d direction = getDirection(Direction); - if (direction.Length() < Precision::Confusion()) + if (direction.Length() < Precision::Confusion()) { return; + } naturalDirectionVector = direction; - if (Reversed.getValue()) + if (Reversed.getValue()) { direction = -direction; + } DirectionVector.setValue(direction); - } else if (prop == &Reversed) { + } + else if (prop == &Reversed) { // if the direction is invalid try to compute it again if (naturalDirectionVector.Length() < Precision::Confusion()) { naturalDirectionVector = getDirection(Direction); @@ -84,16 +100,20 @@ void ConstraintForce::onChanged(const App::Property* prop) if (naturalDirectionVector.Length() >= Precision::Confusion()) { if (Reversed.getValue() && (DirectionVector.getValue() == naturalDirectionVector)) { DirectionVector.setValue(-naturalDirectionVector); - } else if (!Reversed.getValue() && (DirectionVector.getValue() != naturalDirectionVector)) { + } + else if (!Reversed.getValue() + && (DirectionVector.getValue() != naturalDirectionVector)) { DirectionVector.setValue(naturalDirectionVector); } } - } else if (prop == &NormalDirection) { + } + else if (prop == &NormalDirection) { // Set a default direction if no direction reference has been given if (!Direction.getValue()) { Base::Vector3d direction = NormalDirection.getValue(); - if (Reversed.getValue()) + if (Reversed.getValue()) { direction = -direction; + } DirectionVector.setValue(direction); naturalDirectionVector = direction; } diff --git a/src/Mod/Fem/App/FemConstraintForce.h b/src/Mod/Fem/App/FemConstraintForce.h index 7db3bb904f..8b35686f18 100644 --- a/src/Mod/Fem/App/FemConstraintForce.h +++ b/src/Mod/Fem/App/FemConstraintForce.h @@ -30,7 +30,7 @@ namespace Fem { -class FemExport ConstraintForce : public Fem::Constraint +class FemExport ConstraintForce: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintForce); @@ -46,10 +46,11 @@ public: App::PropertyVector DirectionVector; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemConstraintForce"; } @@ -60,7 +61,7 @@ private: Base::Vector3d naturalDirectionVector; }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTFORCE_H +#endif // FEM_CONSTRAINTFORCE_H diff --git a/src/Mod/Fem/App/FemConstraintGear.cpp b/src/Mod/Fem/App/FemConstraintGear.cpp index 4cd1e03502..1919e2c7b9 100644 --- a/src/Mod/Fem/App/FemConstraintGear.cpp +++ b/src/Mod/Fem/App/FemConstraintGear.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "FemConstraintGear.h" @@ -36,18 +36,24 @@ PROPERTY_SOURCE(Fem::ConstraintGear, Fem::ConstraintBearing) ConstraintGear::ConstraintGear() { - ADD_PROPERTY(Diameter,(100.0)); - ADD_PROPERTY(Force,(1000.0)); - ADD_PROPERTY(ForceAngle,(0.0)); - ADD_PROPERTY_TYPE(Direction,(nullptr),"ConstraintGear",(App::PropertyType)(App::Prop_None), + ADD_PROPERTY(Diameter, (100.0)); + ADD_PROPERTY(Force, (1000.0)); + ADD_PROPERTY(ForceAngle, (0.0)); + ADD_PROPERTY_TYPE(Direction, + (nullptr), + "ConstraintGear", + (App::PropertyType)(App::Prop_None), "Element giving direction of gear force"); - ADD_PROPERTY(Reversed,(0)); - ADD_PROPERTY_TYPE(DirectionVector,(Base::Vector3d(1,1,1).Normalize()),"ConstraintGear",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY(Reversed, (0)); + ADD_PROPERTY_TYPE(DirectionVector, + (Base::Vector3d(1, 1, 1).Normalize()), + "ConstraintGear", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Direction of gear force"); - naturalDirectionVector = Base::Vector3d(1,1,1).Normalize(); + naturalDirectionVector = Base::Vector3d(1, 1, 1).Normalize(); } -App::DocumentObjectExecReturn *ConstraintGear::execute() +App::DocumentObjectExecReturn* ConstraintGear::execute() { return ConstraintBearing::execute(); } @@ -58,18 +64,22 @@ void ConstraintGear::onChanged(const App::Property* prop) if (prop == &Direction) { Base::Vector3d direction = getDirection(Direction); - if (direction.Length() < Precision::Confusion()) + if (direction.Length() < Precision::Confusion()) { return; + } naturalDirectionVector = direction; - if (Reversed.getValue()) + if (Reversed.getValue()) { direction = -direction; + } DirectionVector.setValue(direction); DirectionVector.touch(); - } else if (prop == &Reversed) { + } + else if (prop == &Reversed) { if (Reversed.getValue() && (DirectionVector.getValue() == naturalDirectionVector)) { DirectionVector.setValue(-naturalDirectionVector); DirectionVector.touch(); - } else if (!Reversed.getValue() && (DirectionVector.getValue() != naturalDirectionVector)) { + } + else if (!Reversed.getValue() && (DirectionVector.getValue() != naturalDirectionVector)) { DirectionVector.setValue(naturalDirectionVector); DirectionVector.touch(); } diff --git a/src/Mod/Fem/App/FemConstraintGear.h b/src/Mod/Fem/App/FemConstraintGear.h index b5a5ee5ed6..ed86237105 100644 --- a/src/Mod/Fem/App/FemConstraintGear.h +++ b/src/Mod/Fem/App/FemConstraintGear.h @@ -30,7 +30,7 @@ namespace Fem { -class FemExport ConstraintGear : public Fem::ConstraintBearing +class FemExport ConstraintGear: public Fem::ConstraintBearing { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintGear); @@ -47,10 +47,11 @@ public: App::PropertyVector DirectionVector; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemConstraintGear"; } @@ -61,7 +62,7 @@ private: Base::Vector3d naturalDirectionVector; }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTGear_H +#endif // FEM_CONSTRAINTGear_H diff --git a/src/Mod/Fem/App/FemConstraintHeatflux.cpp b/src/Mod/Fem/App/FemConstraintHeatflux.cpp index 1d98082d67..fdff59ced9 100644 --- a/src/Mod/Fem/App/FemConstraintHeatflux.cpp +++ b/src/Mod/Fem/App/FemConstraintHeatflux.cpp @@ -31,27 +31,36 @@ using namespace Fem; PROPERTY_SOURCE(Fem::ConstraintHeatflux, Fem::Constraint) -static const char* ConstraintTypes[] = {"DFlux","Convection", nullptr}; +static const char* ConstraintTypes[] = {"DFlux", "Convection", nullptr}; ConstraintHeatflux::ConstraintHeatflux() { - ADD_PROPERTY(AmbientTemp,(0.0)); + ADD_PROPERTY(AmbientTemp, (0.0)); /*ADD_PROPERTY(FaceTemp,(0.0));*/ - ADD_PROPERTY(FilmCoef,(0.0)); - ADD_PROPERTY(DFlux,(0.0)); - ADD_PROPERTY_TYPE(ConstraintType,(1),"ConstraintHeatflux",(App::PropertyType)(App::Prop_None), + ADD_PROPERTY(FilmCoef, (0.0)); + ADD_PROPERTY(DFlux, (0.0)); + ADD_PROPERTY_TYPE(ConstraintType, + (1), + "ConstraintHeatflux", + (App::PropertyType)(App::Prop_None), "Type of constraint, surface convection or surface heat flux"); ConstraintType.setEnums(ConstraintTypes); - ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"ConstraintHeatflux",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintHeatflux", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"ConstraintHeatflux",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), - "Normals where symbols are drawn"); + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintHeatflux", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Normals where symbols are drawn"); Points.setValues(std::vector()); Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintHeatflux::execute() +App::DocumentObjectExecReturn* ConstraintHeatflux::execute() { return Constraint::execute(); } @@ -70,12 +79,12 @@ void ConstraintHeatflux::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintHeatflux.h b/src/Mod/Fem/App/FemConstraintHeatflux.h index 1031bd94c0..69a37d41e5 100644 --- a/src/Mod/Fem/App/FemConstraintHeatflux.h +++ b/src/Mod/Fem/App/FemConstraintHeatflux.h @@ -29,9 +29,10 @@ #include "FemConstraint.h" -namespace Fem { +namespace Fem +{ -class FemExport ConstraintHeatflux : public Fem::Constraint +class FemExport ConstraintHeatflux: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintHeatflux); @@ -48,7 +49,7 @@ public: App::PropertyVectorList Normals; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; @@ -57,6 +58,6 @@ protected: void onChanged(const App::Property* prop) override; }; -} +} // namespace Fem -#endif // FEM_CONSTRAINTHEATFLUX_H +#endif // FEM_CONSTRAINTHEATFLUX_H diff --git a/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp b/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp index a8ef1ea755..32b3203c10 100644 --- a/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp +++ b/src/Mod/Fem/App/FemConstraintInitialTemperature.cpp @@ -36,11 +36,13 @@ ConstraintInitialTemperature::ConstraintInitialTemperature() { ADD_PROPERTY(initialTemperature, (300.0)); - ADD_PROPERTY_TYPE(Points, (Base::Vector3d()), + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), "ConstraintInitialTemperature", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, (Base::Vector3d()), + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), "ConstraintInitialTemperature", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Normals where symbols are drawn"); @@ -51,7 +53,7 @@ ConstraintInitialTemperature::ConstraintInitialTemperature() References.setStatus(App::Property::Hidden, true); } -App::DocumentObjectExecReturn *ConstraintInitialTemperature::execute() +App::DocumentObjectExecReturn* ConstraintInitialTemperature::execute() { return Constraint::execute(); } @@ -83,12 +85,12 @@ void ConstraintInitialTemperature::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintInitialTemperature.h b/src/Mod/Fem/App/FemConstraintInitialTemperature.h index 0f27c06d81..fc7331b002 100644 --- a/src/Mod/Fem/App/FemConstraintInitialTemperature.h +++ b/src/Mod/Fem/App/FemConstraintInitialTemperature.h @@ -32,7 +32,7 @@ namespace Fem { -class FemExport ConstraintInitialTemperature : public Fem::Constraint +class FemExport ConstraintInitialTemperature: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintInitialTemperature); @@ -44,24 +44,24 @@ public: App::PropertyVectorList Points; App::PropertyVectorList Normals; - //Temperature parameters + // Temperature parameters App::PropertyTemperature initialTemperature; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; protected: - void handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, App::Property* prop) override; void onChanged(const App::Property* prop) override; - }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTINITIALTEMPERATURE_H +#endif // FEM_CONSTRAINTINITIALTEMPERATURE_H diff --git a/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp b/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp index 76e5b01075..fd329393a4 100644 --- a/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp +++ b/src/Mod/Fem/App/FemConstraintPlaneRotation.cpp @@ -33,15 +33,21 @@ PROPERTY_SOURCE(Fem::ConstraintPlaneRotation, Fem::Constraint) ConstraintPlaneRotation::ConstraintPlaneRotation() { - ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"ConstraintPlaneRotation",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintPlaneRotation", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"ConstraintPlaneRotation",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), - "Normals where symbols are drawn"); + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintPlaneRotation", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Normals where symbols are drawn"); Points.setValues(std::vector()); Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintPlaneRotation::execute() +App::DocumentObjectExecReturn* ConstraintPlaneRotation::execute() { return Constraint::execute(); } @@ -58,12 +64,12 @@ void ConstraintPlaneRotation::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintPlaneRotation.h b/src/Mod/Fem/App/FemConstraintPlaneRotation.h index 04be57401f..a251ded4e8 100644 --- a/src/Mod/Fem/App/FemConstraintPlaneRotation.h +++ b/src/Mod/Fem/App/FemConstraintPlaneRotation.h @@ -30,7 +30,7 @@ namespace Fem { -class FemExport ConstraintPlaneRotation : public Fem::Constraint +class FemExport ConstraintPlaneRotation: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintPlaneRotation); @@ -44,17 +44,16 @@ public: /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; protected: void onChanged(const App::Property* prop) override; - }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTPLANEROTATION_H +#endif // FEM_CONSTRAINTPLANEROTATION_H diff --git a/src/Mod/Fem/App/FemConstraintPressure.cpp b/src/Mod/Fem/App/FemConstraintPressure.cpp index ee14198125..5381846f52 100644 --- a/src/Mod/Fem/App/FemConstraintPressure.cpp +++ b/src/Mod/Fem/App/FemConstraintPressure.cpp @@ -32,19 +32,23 @@ PROPERTY_SOURCE(Fem::ConstraintPressure, Fem::Constraint) ConstraintPressure::ConstraintPressure() { - ADD_PROPERTY(Pressure,(0.0)); - ADD_PROPERTY(Reversed,(0)); - ADD_PROPERTY_TYPE(Points,(Base::Vector3d()),"ConstraintPressure", - App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), - "Points where arrows are drawn"); - ADD_PROPERTY_TYPE(Normals,(Base::Vector3d()),"ConstraintPressure", - App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), - "Normals where symbols are drawn"); + ADD_PROPERTY(Pressure, (0.0)); + ADD_PROPERTY(Reversed, (0)); + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintPressure", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Points where arrows are drawn"); + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintPressure", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Normals where symbols are drawn"); Points.setValues(std::vector()); Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintPressure::execute() +App::DocumentObjectExecReturn* ConstraintPressure::execute() { return Constraint::execute(); } @@ -68,7 +72,8 @@ void ConstraintPressure::onChanged(const App::Property* prop) Scale.setValue(scale); Points.touch(); } - } else if (prop == &Reversed) { + } + else if (prop == &Reversed) { Points.touch(); } } diff --git a/src/Mod/Fem/App/FemConstraintPressure.h b/src/Mod/Fem/App/FemConstraintPressure.h index e0773f072b..7ebb3ca754 100644 --- a/src/Mod/Fem/App/FemConstraintPressure.h +++ b/src/Mod/Fem/App/FemConstraintPressure.h @@ -27,9 +27,10 @@ #include "FemConstraint.h" -namespace Fem { +namespace Fem +{ -class FemExport ConstraintPressure : public Fem::Constraint +class FemExport ConstraintPressure: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintPressure); @@ -42,7 +43,7 @@ public: App::PropertyVectorList Normals; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; @@ -51,6 +52,6 @@ protected: void onChanged(const App::Property* prop) override; }; -} +} // namespace Fem -#endif // FEM_CONSTRAINTPRESSURE_H +#endif // FEM_CONSTRAINTPRESSURE_H diff --git a/src/Mod/Fem/App/FemConstraintPulley.cpp b/src/Mod/Fem/App/FemConstraintPulley.cpp index d23fd72fd0..d4b136adf4 100644 --- a/src/Mod/Fem/App/FemConstraintPulley.cpp +++ b/src/Mod/Fem/App/FemConstraintPulley.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "FemConstraintPulley.h" @@ -36,16 +36,25 @@ PROPERTY_SOURCE(Fem::ConstraintPulley, Fem::ConstraintGear) ConstraintPulley::ConstraintPulley() { - ADD_PROPERTY(OtherDiameter,(100.0)); - ADD_PROPERTY(CenterDistance,(500.0)); - ADD_PROPERTY(IsDriven,(0)); - ADD_PROPERTY(TensionForce,(0.0)); + ADD_PROPERTY(OtherDiameter, (100.0)); + ADD_PROPERTY(CenterDistance, (500.0)); + ADD_PROPERTY(IsDriven, (0)); + ADD_PROPERTY(TensionForce, (0.0)); - ADD_PROPERTY_TYPE(BeltAngle,(0),"ConstraintPulley",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(BeltAngle, + (0), + "ConstraintPulley", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Angle of belt forces"); - ADD_PROPERTY_TYPE(BeltForce1,(0.0),"ConstraintPulley",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(BeltForce1, + (0.0), + "ConstraintPulley", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "First belt force"); - ADD_PROPERTY_TYPE(BeltForce2,(0.0),"ConstraintPulley",App::PropertyType(App::Prop_ReadOnly|App::Prop_Output), + ADD_PROPERTY_TYPE(BeltForce2, + (0.0), + "ConstraintPulley", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Second belt force"); ForceAngle.setValue(0.0); Diameter.setValue(300.0); @@ -53,7 +62,7 @@ ConstraintPulley::ConstraintPulley() onChanged(&Force); } -App::DocumentObjectExecReturn *ConstraintPulley::execute() +App::DocumentObjectExecReturn* ConstraintPulley::execute() { return ConstraintGear::execute(); } @@ -64,24 +73,30 @@ void ConstraintPulley::onChanged(const App::Property* prop) if ((prop == &Diameter) || (prop == &OtherDiameter) || (prop == &CenterDistance)) { if (CenterDistance.getValue() > Precision::Confusion()) { - BeltAngle.setValue(asin((Diameter.getValue() - OtherDiameter.getValue())/2/CenterDistance.getValue())); + BeltAngle.setValue(asin((Diameter.getValue() - OtherDiameter.getValue()) / 2 + / CenterDistance.getValue())); BeltAngle.touch(); } - } else if ((prop == &Force) || (prop == &TensionForce) || (prop == &IsDriven)) { + } + else if ((prop == &Force) || (prop == &TensionForce) || (prop == &IsDriven)) { double radius = Diameter.getValue() / 2.0; - if (radius < Precision::Confusion()) + if (radius < Precision::Confusion()) { return; - double force = Force.getValue() / (radius/1000); - if (fabs(force) < Precision::Confusion()) + } + double force = Force.getValue() / (radius / 1000); + if (fabs(force) < Precision::Confusion()) { return; + } bool neg = (force < 0.0); - if (neg) + if (neg) { force *= -1.0; + } if (IsDriven.getValue() == neg) { BeltForce1.setValue(force + TensionForce.getValue()); BeltForce2.setValue(TensionForce.getValue()); - } else { + } + else { BeltForce2.setValue(force + TensionForce.getValue()); BeltForce1.setValue(TensionForce.getValue()); } diff --git a/src/Mod/Fem/App/FemConstraintPulley.h b/src/Mod/Fem/App/FemConstraintPulley.h index b881711c51..61df7b8183 100644 --- a/src/Mod/Fem/App/FemConstraintPulley.h +++ b/src/Mod/Fem/App/FemConstraintPulley.h @@ -30,7 +30,7 @@ namespace Fem { -class FemExport ConstraintPulley : public Fem::ConstraintGear +class FemExport ConstraintPulley: public Fem::ConstraintGear { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintPulley); @@ -52,19 +52,19 @@ public: App::PropertyFloat BeltForce2; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemConstraintPulley"; } protected: void onChanged(const App::Property* prop) override; - }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTPulley_H +#endif // FEM_CONSTRAINTPulley_H diff --git a/src/Mod/Fem/App/FemConstraintSpring.cpp b/src/Mod/Fem/App/FemConstraintSpring.cpp index 87b44a5b03..6aa2dbdb6d 100644 --- a/src/Mod/Fem/App/FemConstraintSpring.cpp +++ b/src/Mod/Fem/App/FemConstraintSpring.cpp @@ -26,8 +26,7 @@ #include "FemConstraintSpring.h" -static const char* Stiffnesses[] = {"Normal Stiffness", - "Tangential Stiffness", nullptr}; +static const char* Stiffnesses[] = {"Normal Stiffness", "Tangential Stiffness", nullptr}; using namespace Fem; @@ -38,12 +37,16 @@ ConstraintSpring::ConstraintSpring() ADD_PROPERTY(NormalStiffness, (0.0)); ADD_PROPERTY(TangentialStiffness, (0.0)); ADD_PROPERTY(ElmerStiffness, (1)); - ADD_PROPERTY_TYPE(Points, (Base::Vector3d()), "ConstraintSpring", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Points where arrows are drawn"); - ADD_PROPERTY_TYPE(Normals, (Base::Vector3d()), "ConstraintSpring", - App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), - "Normals where symbols are drawn"); + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintSpring", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Points where arrows are drawn"); + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintSpring", + App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), + "Normals where symbols are drawn"); ElmerStiffness.setEnums(Stiffnesses); Points.setValues(std::vector()); diff --git a/src/Mod/Fem/App/FemConstraintSpring.h b/src/Mod/Fem/App/FemConstraintSpring.h index bc6fd144bd..52caebf723 100644 --- a/src/Mod/Fem/App/FemConstraintSpring.h +++ b/src/Mod/Fem/App/FemConstraintSpring.h @@ -27,9 +27,10 @@ #include "FemConstraint.h" -namespace Fem { +namespace Fem +{ -class FemExport ConstraintSpring : public Fem::Constraint +class FemExport ConstraintSpring: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintSpring); @@ -43,7 +44,7 @@ public: App::PropertyVectorList Normals; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; @@ -52,6 +53,6 @@ protected: void onChanged(const App::Property* prop) override; }; -} +} // namespace Fem -#endif // FEM_CONSTRAINTPSPRING_H +#endif // FEM_CONSTRAINTPSPRING_H diff --git a/src/Mod/Fem/App/FemConstraintTemperature.cpp b/src/Mod/Fem/App/FemConstraintTemperature.cpp index 26e8042bc6..dc4037482f 100644 --- a/src/Mod/Fem/App/FemConstraintTemperature.cpp +++ b/src/Mod/Fem/App/FemConstraintTemperature.cpp @@ -32,28 +32,34 @@ using namespace Fem; PROPERTY_SOURCE(Fem::ConstraintTemperature, Fem::Constraint) -static const char* ConstraintTypes[] = {"CFlux","Temperature", nullptr}; +static const char* ConstraintTypes[] = {"CFlux", "Temperature", nullptr}; ConstraintTemperature::ConstraintTemperature() { ADD_PROPERTY(Temperature, (300.0)); ADD_PROPERTY(CFlux, (0.0)); - ADD_PROPERTY_TYPE(ConstraintType, (1), "ConstraintTemperature", + ADD_PROPERTY_TYPE(ConstraintType, + (1), + "ConstraintTemperature", (App::PropertyType)(App::Prop_None), "Type of constraint, temperature or concentrated heat flux"); ConstraintType.setEnums(ConstraintTypes); - ADD_PROPERTY_TYPE(Points, (Base::Vector3d()), "ConstraintTemperature", + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintTemperature", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, (Base::Vector3d()), "ConstraintTemperature", + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintTemperature", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Normals where symbols are drawn"); Points.setValues(std::vector()); Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintTemperature::execute() +App::DocumentObjectExecReturn* ConstraintTemperature::execute() { return Constraint::execute(); } @@ -63,7 +69,8 @@ const char* ConstraintTemperature::getViewProviderName() const return "FemGui::ViewProviderFemConstraintTemperature"; } -void ConstraintTemperature::handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, +void ConstraintTemperature::handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, App::Property* prop) { // property Temperature had App::PropertyFloat and was changed to App::PropertyTemperature @@ -90,12 +97,12 @@ void ConstraintTemperature::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintTemperature.h b/src/Mod/Fem/App/FemConstraintTemperature.h index 9da66dc089..b857c23a7f 100644 --- a/src/Mod/Fem/App/FemConstraintTemperature.h +++ b/src/Mod/Fem/App/FemConstraintTemperature.h @@ -32,7 +32,7 @@ namespace Fem { -class FemExport ConstraintTemperature : public Fem::Constraint +class FemExport ConstraintTemperature: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintTemperature); @@ -44,26 +44,26 @@ public: App::PropertyVectorList Points; App::PropertyVectorList Normals; - //Temperature parameters + // Temperature parameters App::PropertyTemperature Temperature; App::PropertyPower CFlux; App::PropertyEnumeration ConstraintType; /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; protected: - void handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, App::Property* prop) override; void onChanged(const App::Property* prop) override; - }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTTEMPERATURE_H +#endif // FEM_CONSTRAINTTEMPERATURE_H diff --git a/src/Mod/Fem/App/FemConstraintTransform.cpp b/src/Mod/Fem/App/FemConstraintTransform.cpp index ce41ca3d83..6ee538c62f 100644 --- a/src/Mod/Fem/App/FemConstraintTransform.cpp +++ b/src/Mod/Fem/App/FemConstraintTransform.cpp @@ -30,71 +30,86 @@ using namespace Fem; PROPERTY_SOURCE(Fem::ConstraintTransform, Fem::Constraint) -static const char* TransformTypes[] = {"Cylindrical","Rectangular", nullptr}; +static const char* TransformTypes[] = {"Cylindrical", "Rectangular", nullptr}; ConstraintTransform::ConstraintTransform() { ADD_PROPERTY(X_rot, (0.0)); ADD_PROPERTY(Y_rot, (0.0)); ADD_PROPERTY(Z_rot, (0.0)); - ADD_PROPERTY_TYPE(TransformType, (1), "ConstraintTransform", + ADD_PROPERTY_TYPE(TransformType, + (1), + "ConstraintTransform", (App::PropertyType)(App::Prop_None), "Type of transform, rectangular or cylindrical"); TransformType.setEnums(TransformTypes); - ADD_PROPERTY_TYPE(RefDispl, (nullptr, nullptr), - "ConstraintTransform", (App::PropertyType)(App::Prop_None), + ADD_PROPERTY_TYPE(RefDispl, + (nullptr, nullptr), + "ConstraintTransform", + (App::PropertyType)(App::Prop_None), "Elements where the constraint is applied"); // RefDispl must get a global scope, see // https://forum.freecad.org/viewtopic.php?p=671402#p671402 RefDispl.setScope(App::LinkScope::Global); - ADD_PROPERTY_TYPE(NameDispl, (nullptr), "ConstraintTransform", + ADD_PROPERTY_TYPE(NameDispl, + (nullptr), + "ConstraintTransform", (App::PropertyType)(App::Prop_None), "Elements where the constraint is applied"); - ADD_PROPERTY_TYPE(BasePoint, (Base::Vector3d(0, 0, 0)), "ConstraintTransform", + ADD_PROPERTY_TYPE(BasePoint, + (Base::Vector3d(0, 0, 0)), + "ConstraintTransform", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Base point of cylindrical surface"); - ADD_PROPERTY_TYPE(Axis, (Base::Vector3d(0, 1, 0)), "ConstraintTransform", + ADD_PROPERTY_TYPE(Axis, + (Base::Vector3d(0, 1, 0)), + "ConstraintTransform", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Axis of cylindrical surface"); - ADD_PROPERTY_TYPE(Points, (Base::Vector3d()), "ConstraintTransform", + ADD_PROPERTY_TYPE(Points, + (Base::Vector3d()), + "ConstraintTransform", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Points where symbols are drawn"); - ADD_PROPERTY_TYPE(Normals, (Base::Vector3d()), "ConstraintTransform", + ADD_PROPERTY_TYPE(Normals, + (Base::Vector3d()), + "ConstraintTransform", App::PropertyType(App::Prop_ReadOnly | App::Prop_Output), "Normals where symbols are drawn"); Points.setValues(std::vector()); Normals.setValues(std::vector()); } -App::DocumentObjectExecReturn *ConstraintTransform::execute() +App::DocumentObjectExecReturn* ConstraintTransform::execute() { return Constraint::execute(); } const char* ConstraintTransform::getViewProviderName() const { - return "FemGui::ViewProviderFemConstraintTransform"; + return "FemGui::ViewProviderFemConstraintTransform"; } void ConstraintTransform::handleChangedPropertyType(Base::XMLReader& reader, - const char* TypeName, App::Property* prop) + const char* TypeName, + App::Property* prop) { - // properties _rot had App::PropertyFloat and were changed to App::PropertyAngle - if (prop == &X_rot && strcmp(TypeName, "App::PropertyFloat") == 0) { - App::PropertyFloat X_rotProperty; - X_rotProperty.Restore(reader); - X_rot.setValue(X_rotProperty.getValue()); - } - else if (prop == &Y_rot && strcmp(TypeName, "App::PropertyFloat") == 0) { - App::PropertyFloat Y_rotProperty; - Y_rotProperty.Restore(reader); - Y_rot.setValue(Y_rotProperty.getValue()); - } - else if (prop == &Z_rot && strcmp(TypeName, "App::PropertyFloat") == 0) { - App::PropertyFloat Z_rotProperty; - Z_rotProperty.Restore(reader); - Z_rot.setValue(Z_rotProperty.getValue()); - } + // properties _rot had App::PropertyFloat and were changed to App::PropertyAngle + if (prop == &X_rot && strcmp(TypeName, "App::PropertyFloat") == 0) { + App::PropertyFloat X_rotProperty; + X_rotProperty.Restore(reader); + X_rot.setValue(X_rotProperty.getValue()); + } + else if (prop == &Y_rot && strcmp(TypeName, "App::PropertyFloat") == 0) { + App::PropertyFloat Y_rotProperty; + Y_rotProperty.Restore(reader); + Y_rot.setValue(Y_rotProperty.getValue()); + } + else if (prop == &Z_rot && strcmp(TypeName, "App::PropertyFloat") == 0) { + App::PropertyFloat Z_rotProperty; + Z_rotProperty.Restore(reader); + Z_rot.setValue(Z_rotProperty.getValue()); + } } void ConstraintTransform::onChanged(const App::Property* prop) @@ -104,24 +119,25 @@ void ConstraintTransform::onChanged(const App::Property* prop) if (prop == &References) { std::vector points; std::vector normals; - int scale = 1; //OvG: Enforce use of scale + int scale = 1; // OvG: Enforce use of scale if (getPoints(points, normals, &scale)) { Points.setValues(points); Normals.setValues(normals); - Scale.setValue(scale); //OvG: Scale - Points.touch(); // This triggers ViewProvider::updateData() + Scale.setValue(scale); // OvG: Scale + Points.touch(); // This triggers ViewProvider::updateData() std::string transform_type = TransformType.getValueAsString(); if (transform_type == "Cylindrical") { // Find data of cylinder double radius, height; Base::Vector3d base, axis; - if (!getCylinder(radius, height, base, axis)) - return; + if (!getCylinder(radius, height, base, axis)) { + return; + } Axis.setValue(axis); // Update base point - base = base + axis * height/2; + base = base + axis * height / 2; BasePoint.setValue(base); - BasePoint.touch(); // This triggers ViewProvider::updateData() + BasePoint.touch(); // This triggers ViewProvider::updateData() } } } diff --git a/src/Mod/Fem/App/FemConstraintTransform.h b/src/Mod/Fem/App/FemConstraintTransform.h index 417992501c..27eb133da6 100644 --- a/src/Mod/Fem/App/FemConstraintTransform.h +++ b/src/Mod/Fem/App/FemConstraintTransform.h @@ -29,7 +29,7 @@ namespace Fem { -class FemExport ConstraintTransform : public Fem::Constraint +class FemExport ConstraintTransform: public Fem::Constraint { PROPERTY_HEADER_WITH_OVERRIDE(Fem::ConstraintTransform); @@ -48,23 +48,23 @@ public: App::PropertyAngle Y_rot; App::PropertyAngle Z_rot; App::PropertyEnumeration TransformType; - //etc -/* */ + // etc + /* */ /// recalculate the object - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider const char* getViewProviderName() const override; protected: - void handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, App::Property* prop) override; void onChanged(const App::Property* prop) override; - }; -} //namespace Fem +} // namespace Fem -#endif // FEM_CONSTRAINTTransform_H +#endif // FEM_CONSTRAINTTransform_H diff --git a/src/Mod/Fem/App/FemMesh.cpp b/src/Mod/Fem/App/FemMesh.cpp index ceaf0bd50d..56e315f830 100644 --- a/src/Mod/Fem/App/FemMesh.cpp +++ b/src/Mod/Fem/App/FemMesh.cpp @@ -23,41 +23,41 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -# include -# include //to simplify parsing input files we use the boost lib +#include +#include //to simplify parsing input files we use the boost lib #endif #include @@ -74,7 +74,7 @@ #include #ifdef FC_USE_VTK -# include "FemVTKTools.h" +#include "FemVTKTools.h" #endif @@ -88,16 +88,16 @@ static int StatCount = 0; SMESH_Gen* FemMesh::_mesh_gen = nullptr; -TYPESYSTEM_SOURCE(Fem::FemMesh , Base::Persistence) +TYPESYSTEM_SOURCE(Fem::FemMesh, Base::Persistence) FemMesh::FemMesh() { - //Base::Console().Log("FemMesh::FemMesh():%p (id=%i)\n",this,StatCount); - // create a mesh always with new StudyId to avoid overlapping destruction + // Base::Console().Log("FemMesh::FemMesh():%p (id=%i)\n",this,StatCount); + // create a mesh always with new StudyId to avoid overlapping destruction #if SMESH_VERSION_MAJOR >= 9 myMesh = getGenerator()->CreateMesh(false); #else - myMesh = getGenerator()->CreateMesh(StatCount++,false); + myMesh = getGenerator()->CreateMesh(StatCount++, false); #endif } @@ -106,33 +106,33 @@ FemMesh::FemMesh(const FemMesh& mesh) #if SMESH_VERSION_MAJOR >= 9 myMesh = getGenerator()->CreateMesh(false); #else - myMesh = getGenerator()->CreateMesh(StatCount++,false); + myMesh = getGenerator()->CreateMesh(StatCount++, false); #endif copyMeshData(mesh); } FemMesh::~FemMesh() { - //Base::Console().Log("FemMesh::~FemMesh():%p\n",this); + // Base::Console().Log("FemMesh::~FemMesh():%p\n",this); try { TopoDS_Shape aNull; myMesh->ShapeToMesh(aNull); myMesh->Clear(); - //myMesh->ClearLog(); + // myMesh->ClearLog(); delete myMesh; } catch (...) { } } -FemMesh &FemMesh::operator=(const FemMesh& mesh) +FemMesh& FemMesh::operator=(const FemMesh& mesh) { if (this != &mesh) { #if SMESH_VERSION_MAJOR >= 9 myMesh = getGenerator()->CreateMesh(true); #else - myMesh = getGenerator()->CreateMesh(0,true); + myMesh = getGenerator()->CreateMesh(0, true); #endif copyMeshData(mesh); } @@ -154,24 +154,26 @@ void FemMesh::copyMeshData(const FemMesh& mesh) SMESH_MeshEditor editor(this->myMesh); // 3. Get elements to copy - SMDS_ElemIteratorPtr srcElemIt; SMDS_NodeIteratorPtr srcNodeIt; + SMDS_ElemIteratorPtr srcElemIt; + SMDS_NodeIteratorPtr srcNodeIt; srcElemIt = srcMeshDS->elementsIterator(); srcNodeIt = srcMeshDS->nodesIterator(); // 4. Copy elements int iN; const SMDS_MeshNode *nSrc, *nTgt; - std::vector< const SMDS_MeshNode* > nodes; + std::vector nodes; while (srcElemIt->more()) { - const SMDS_MeshElement * elem = srcElemIt->next(); + const SMDS_MeshElement* elem = srcElemIt->next(); // find / add nodes nodes.resize(elem->NbNodes()); SMDS_ElemIteratorPtr nIt = elem->nodesIterator(); for (iN = 0; nIt->more(); ++iN) { - nSrc = static_cast( nIt->next() ); - nTgt = newMeshDS->FindNode( nSrc->GetID()); - if (!nTgt) - nTgt = newMeshDS->AddNodeWithID( nSrc->X(), nSrc->Y(), nSrc->Z(), nSrc->GetID()); + nSrc = static_cast(nIt->next()); + nTgt = newMeshDS->FindNode(nSrc->GetID()); + if (!nTgt) { + nTgt = newMeshDS->AddNodeWithID(nSrc->X(), nSrc->Y(), nSrc->Z(), nSrc->GetID()); + } nodes[iN] = nTgt; } @@ -179,25 +181,27 @@ void FemMesh::copyMeshData(const FemMesh& mesh) if (elem->GetType() != SMDSAbs_Node) { int ID = elem->GetID(); switch (elem->GetEntityType()) { - case SMDSEntity_Polyhedra: + case SMDSEntity_Polyhedra: #if SMESH_VERSION_MAJOR >= 9 - editor.GetMeshDS()->AddPolyhedralVolumeWithID( - nodes, static_cast(elem)->GetQuantities(), ID); + editor.GetMeshDS()->AddPolyhedralVolumeWithID( + nodes, + static_cast(elem)->GetQuantities(), + ID); #else - editor.GetMeshDS()->AddPolyhedralVolumeWithID( - nodes, static_cast(elem)->GetQuantities(), ID); + editor.GetMeshDS()->AddPolyhedralVolumeWithID( + nodes, + static_cast(elem)->GetQuantities(), + ID); #endif - break; - case SMDSEntity_Ball: - { - SMESH_MeshEditor::ElemFeatures elemFeat; - elemFeat.Init(static_cast(elem)->GetDiameter()); - elemFeat.SetID(ID); - editor.AddElement(nodes, elemFeat); - break; - } - default: - { + break; + case SMDSEntity_Ball: { + SMESH_MeshEditor::ElemFeatures elemFeat; + elemFeat.Init(static_cast(elem)->GetDiameter()); + elemFeat.SetID(ID); + editor.AddElement(nodes, elemFeat); + break; + } + default: { SMESH_MeshEditor::ElemFeatures elemFeat(elem->GetType(), elem->IsPoly()); elemFeat.SetID(ID); editor.AddElement(nodes, elemFeat); @@ -225,23 +229,27 @@ void FemMesh::copyMeshData(const FemMesh& mesh) // Check group type. We copy nodal groups containing nodes of copied element SMDSAbs_ElementType groupType = groupDS->GetType(); - if (groupType != SMDSAbs_Node && newMeshDS->GetMeshInfo().NbElements( groupType ) == 0) - continue; // group type differs from types of meshPart + if (groupType != SMDSAbs_Node && newMeshDS->GetMeshInfo().NbElements(groupType) == 0) { + continue; // group type differs from types of meshPart + } // Find copied elements in the group - std::vector< const SMDS_MeshElement* > groupElems; + std::vector groupElems; SMDS_ElemIteratorPtr eIt = groupDS->GetElements(); const SMDS_MeshElement* foundElem; if (groupType == SMDSAbs_Node) { while (eIt->more()) { - if ((foundElem = newMeshDS->FindNode( eIt->next()->GetID()))) + if ((foundElem = newMeshDS->FindNode(eIt->next()->GetID()))) { groupElems.push_back(foundElem); + } } } else { - while (eIt->more()) - if ((foundElem = newMeshDS->FindElement(eIt->next()->GetID()))) + while (eIt->more()) { + if ((foundElem = newMeshDS->FindElement(eIt->next()->GetID()))) { groupElems.push_back(foundElem); + } + } } // Make a new group @@ -251,8 +259,9 @@ void FemMesh::copyMeshData(const FemMesh& mesh) SMESHDS_Group* newGroupDS = dynamic_cast(newGroupObj->GetGroupDS()); if (newGroupDS) { SMDS_MeshGroup& smdsGroup = ((SMESHDS_Group*)newGroupDS)->SMDSGroup(); - for (auto it : groupElems) + for (auto it : groupElems) { smdsGroup.Add(it); + } } } } @@ -265,20 +274,20 @@ void FemMesh::copyMeshData(const FemMesh& mesh) // Some further information is still not copied: // http://forum.freecad.org/viewtopic.php?f=18&t=18982#p148114 SMDS_NodeIteratorPtr aNodeIter = mesh.myMesh->GetMeshDS()->nodesIterator(); - for (;aNodeIter->more();) { + for (; aNodeIter->more();) { const SMDS_MeshNode* aNode = aNodeIter->next(); double temp[3]; aNode->GetXYZ(temp); - meshds->AddNodeWithID(temp[0],temp[1],temp[2], aNode->GetID()); + meshds->AddNodeWithID(temp[0], temp[1], temp[2], aNode->GetID()); } SMDS_EdgeIteratorPtr aEdgeIter = mesh.myMesh->GetMeshDS()->edgesIterator(); - for (;aEdgeIter->more();) { + for (; aEdgeIter->more();) { const SMDS_MeshEdge* aEdge = aEdgeIter->next(); meshds->AddEdgeWithID(aEdge->GetNode(0), aEdge->GetNode(1), aEdge->GetID()); } SMDS_FaceIteratorPtr aFaceIter = mesh.myMesh->GetMeshDS()->facesIterator(); - for (;aFaceIter->more();) { + for (; aFaceIter->more();) { const SMDS_MeshFace* aFace = aFaceIter->next(); switch (aFace->NbNodes()) { case 3: @@ -316,15 +325,16 @@ void FemMesh::copyMeshData(const FemMesh& mesh) break; default: { std::vector aNodes; - for (int i = 0; aFace->NbNodes(); i++) + for (int i = 0; aFace->NbNodes(); i++) { aNodes.push_back(aFace->GetNode(0)); + } meshds->AddPolygonalFaceWithID(aNodes, aFace->GetID()); } break; } } SMDS_VolumeIteratorPtr aVolIter = mesh.myMesh->GetMeshDS()->volumesIterator(); - for (;aVolIter->more();) { + for (; aVolIter->more();) { const SMDS_MeshVolume* aVol = aVolIter->next(); switch (aVol->NbNodes()) { case 4: @@ -434,15 +444,18 @@ void FemMesh::copyMeshData(const FemMesh& mesh) break; default: { if (aVol->IsPoly()) { - const SMDS_PolyhedralVolumeOfNodes* aPolyVol = - dynamic_cast(aVol); - if (!aPolyVol) - break; - std::vector aNodes; - for (int i = 0; i < aPolyVol->NbNodes(); i++) - aNodes.push_back(aPolyVol->GetNode(i)); - meshds->AddPolyhedralVolumeWithID( - aNodes, aPolyVol->GetQuanities(), aPolyVol->GetID()); + const SMDS_PolyhedralVolumeOfNodes* aPolyVol = + dynamic_cast(aVol); + if (!aPolyVol) { + break; + } + std::vector aNodes; + for (int i = 0; i < aPolyVol->NbNodes(); i++) { + aNodes.push_back(aPolyVol->GetNode(i)); + } + meshds->AddPolyhedralVolumeWithID(aNodes, + aPolyVol->GetQuanities(), + aPolyVol->GetID()); } } break; } @@ -457,25 +470,27 @@ void FemMesh::copyMeshData(const FemMesh& mesh) int aId; if (sourceGroupDS->GetType() == SMDSAbs_Node) { - SMESH_Group* targetGroup = - this->myMesh->AddGroup(SMDSAbs_Node, sourceGroupDS->GetStoreName(), aId); - if (targetGroup) { - SMESHDS_Group* targetGroupDS = - dynamic_cast(targetGroup->GetGroupDS()); - if (targetGroupDS) { - SMDS_ElemIteratorPtr aIter = sourceGroupDS->GetElements(); - while (aIter->more()) { - const SMDS_MeshElement* aElem = aIter->next(); - const SMDS_MeshNode* aNode = meshds->FindNode(aElem->GetID()); - if (aNode) - targetGroupDS->SMDSGroup().Add(aNode); + SMESH_Group* targetGroup = + this->myMesh->AddGroup(SMDSAbs_Node, sourceGroupDS->GetStoreName(), aId); + if (targetGroup) { + SMESHDS_Group* targetGroupDS = + dynamic_cast(targetGroup->GetGroupDS()); + if (targetGroupDS) { + SMDS_ElemIteratorPtr aIter = sourceGroupDS->GetElements(); + while (aIter->more()) { + const SMDS_MeshElement* aElem = aIter->next(); + const SMDS_MeshNode* aNode = meshds->FindNode(aElem->GetID()); + if (aNode) { + targetGroupDS->SMDSGroup().Add(aNode); } } } + } } else { - SMESH_Group* targetGroup = this->myMesh->AddGroup( - sourceGroupDS->GetType(), sourceGroupDS->GetStoreName(), aId); + SMESH_Group* targetGroup = this->myMesh->AddGroup(sourceGroupDS->GetType(), + sourceGroupDS->GetStoreName(), + aId); if (targetGroup) { SMESHDS_Group* targetGroupDS = dynamic_cast(targetGroup->GetGroupDS()); @@ -484,8 +499,9 @@ void FemMesh::copyMeshData(const FemMesh& mesh) while (aIter->more()) { const SMDS_MeshElement* aElem = aIter->next(); const SMDS_MeshElement* aElement = meshds->FindElement(aElem->GetID()); - if (aElement) + if (aElement) { targetGroupDS->SMDSGroup().Add(aElement); + } } } } @@ -504,14 +520,15 @@ SMESH_Mesh* FemMesh::getSMesh() return myMesh; } -SMESH_Gen * FemMesh::getGenerator() +SMESH_Gen* FemMesh::getGenerator() { - if (!FemMesh::_mesh_gen) + if (!FemMesh::_mesh_gen) { FemMesh::_mesh_gen = new SMESH_Gen(); + } return FemMesh::_mesh_gen; } -void FemMesh::addHypothesis(const TopoDS_Shape & aSubShape, SMESH_HypothesisPtr hyp) +void FemMesh::addHypothesis(const TopoDS_Shape& aSubShape, SMESH_HypothesisPtr hyp) { myMesh->AddHypothesis(aSubShape, hyp->GetID()); SMESH_HypothesisPtr ptr(hyp); @@ -520,10 +537,11 @@ void FemMesh::addHypothesis(const TopoDS_Shape & aSubShape, SMESH_HypothesisPtr void FemMesh::setStandardHypotheses() { - if (!hypoth.empty()) + if (!hypoth.empty()) { return; + } #if SMESH_VERSION_MAJOR >= 9 - int hyp=0; + int hyp = 0; SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, getGenerator())); static_cast(len.get())->SetLength(1.0); hypoth.push_back(len); @@ -547,17 +565,17 @@ void FemMesh::setStandardHypotheses() SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, getGenerator())); hypoth.push_back(reg); - //SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, getGenerator())); - //static_cast(sel.get())->SetLength(1.0, true); - //hypoth.push_back(sel); + // SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, getGenerator())); + // static_cast(sel.get())->SetLength(1.0, true); + // hypoth.push_back(sel); - SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,getGenerator())); + SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, getGenerator())); hypoth.push_back(qdp); - SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,getGenerator())); + SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++, getGenerator())); hypoth.push_back(q2d); #else - int hyp=0; + int hyp = 0; SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, 1, getGenerator())); static_cast(len.get())->SetLength(1.0); hypoth.push_back(len); @@ -581,20 +599,21 @@ void FemMesh::setStandardHypotheses() SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, 1, getGenerator())); hypoth.push_back(reg); - //SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, 1, getGenerator())); - //static_cast(sel.get())->SetLength(1.0, true); - //hypoth.push_back(sel); + // SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, 1, getGenerator())); + // static_cast(sel.get())->SetLength(1.0, true); + // hypoth.push_back(sel); - SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,1,getGenerator())); + SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, 1, getGenerator())); hypoth.push_back(qdp); - SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,1,getGenerator())); + SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++, 1, getGenerator())); hypoth.push_back(q2d); #endif // Apply hypothesis - for (int i = 0; i < hyp; i++) + for (int i = 0; i < hyp; i++) { myMesh->AddHypothesis(myMesh->GetShapeToMesh(), i); + } } void FemMesh::compute() @@ -605,20 +624,20 @@ void FemMesh::compute() std::set FemMesh::getSurfaceNodes(long /*ElemId*/, short /*FaceId*/, float /*Angle*/) const { std::set result; - //const SMESHDS_Mesh* data = myMesh->GetMeshDS(); + // const SMESHDS_Mesh* data = myMesh->GetMeshDS(); - //const SMDS_MeshElement * element = data->FindElement(ElemId); - //int fNbr = element->NbFaces(); - //element-> + // const SMDS_MeshElement * element = data->FindElement(ElemId); + // int fNbr = element->NbFaces(); + // element-> return result; } /*! That function returns map containing volume ID and face ID. */ -std::list > FemMesh::getVolumesByFace(const TopoDS_Face &face) const +std::list> FemMesh::getVolumesByFace(const TopoDS_Face& face) const { - std::list > result; + std::list> result; std::set nodes_on_face = getNodesByFace(face); #if SMESH_VERSION_MAJOR >= 7 @@ -626,7 +645,7 @@ std::list > FemMesh::getVolumesByFace(const TopoDS_Face &fac // to iterate volume faces // In SMESH9 this function has been removed // - std::map< int, std::set > face_nodes; + std::map> face_nodes; // get faces that contribute to 'nodes_on_face' with all of its nodes SMDS_FaceIteratorPtr face_iter = myMesh->GetMeshDS()->facesIterator(); @@ -714,9 +733,9 @@ std::list > FemMesh::getVolumesByFace(const TopoDS_Face &fac /*! That function returns a list of face IDs. */ -std::list FemMesh::getFacesByFace(const TopoDS_Face &face) const +std::list FemMesh::getFacesByFace(const TopoDS_Face& face) const { - //TODO: This function is broken with SMESH7 as it is impossible to iterate volume faces + // TODO: This function is broken with SMESH7 as it is impossible to iterate volume faces std::list result; std::set nodes_on_face = getNodesByFace(face); @@ -747,7 +766,7 @@ std::list FemMesh::getFacesByFace(const TopoDS_Face &face) const return result; } -std::list FemMesh::getEdgesByEdge(const TopoDS_Edge &edge) const +std::list FemMesh::getEdgesByEdge(const TopoDS_Edge& edge) const { std::list result; std::set nodes_on_edge = getNodesByEdge(edge); @@ -782,14 +801,14 @@ std::list FemMesh::getEdgesByEdge(const TopoDS_Edge &edge) const * as per CalculiX definition for tetrahedral elements. See CalculiX * documentation for the details. */ -std::map FemMesh::getccxVolumesByFace(const TopoDS_Face &face) const +std::map FemMesh::getccxVolumesByFace(const TopoDS_Face& face) const { std::map result; std::set nodes_on_face = getNodesByFace(face); - static std::map > elem_order; + static std::map> elem_order; if (elem_order.empty()) { - std::vector c3d4 = boost::assign::list_of(1)(0)(2)(3); + std::vector c3d4 = boost::assign::list_of(1)(0)(2)(3); std::vector c3d10 = boost::assign::list_of(1)(0)(2)(3)(4)(6)(5)(8)(7)(9); elem_order.insert(std::make_pair(c3d4.size(), c3d4)); @@ -802,10 +821,10 @@ std::map FemMesh::getccxVolumesByFace(const TopoDS_Face &face) const while (vol_iter->more()) { const SMDS_MeshVolume* vol = vol_iter->next(); num_of_nodes = vol->NbNodes(); - std::pair > apair; + std::pair> apair; apair.first = vol->GetID(); - std::map >::iterator it = elem_order.find(num_of_nodes); + std::map>::iterator it = elem_order.find(num_of_nodes); if (it != elem_order.end()) { const std::vector& order = it->second; for (int jt : order) { @@ -842,21 +861,21 @@ std::map FemMesh::getccxVolumesByFace(const TopoDS_Face &face) const Face 4: 3-4-1, missing point 2 means it's face P4 */ int face_ccx = 0; switch (missing_node) { - case 1: - face_ccx = 3; - break; - case 2: - face_ccx = 4; - break; - case 3: - face_ccx = 2; - break; - case 4: - face_ccx = 1; - break; - default: - assert(false); // should never happen - break; + case 1: + face_ccx = 3; + break; + case 2: + face_ccx = 4; + break; + case 3: + face_ccx = 2; + break; + case 4: + face_ccx = 1; + break; + default: + assert(false); // should never happen + break; } result[apair.first] = face_ccx; } @@ -865,7 +884,7 @@ std::map FemMesh::getccxVolumesByFace(const TopoDS_Face &face) const return result; } -std::set FemMesh::getNodesBySolid(const TopoDS_Solid &solid) const +std::set FemMesh::getNodesBySolid(const TopoDS_Solid& solid) const { std::set result; @@ -876,8 +895,9 @@ std::set FemMesh::getNodesBySolid(const TopoDS_Solid &solid) const TopAbs_ShapeEnum shapetype = TopAbs_SHAPE; ShapeAnalysis_ShapeTolerance analysis; double limit = analysis.Tolerance(solid, 1, shapetype); - Base::Console().Log( - "The limit if a node is in or out: %.12lf in scientific: %.4e \n", limit, limit); + Base::Console().Log("The limit if a node is in or out: %.12lf in scientific: %.4e \n", + limit, + limit); // get the current transform of the FemMesh const Base::Matrix4D Mtrx(getTransform()); @@ -897,15 +917,16 @@ std::set FemMesh::getNodesBySolid(const TopoDS_Solid &solid) const // Apply the matrix to hold the BoundBox in absolute space. vec = Mtrx * vec; - if (!box.IsOut(gp_Pnt(vec.x,vec.y,vec.z))) { + if (!box.IsOut(gp_Pnt(vec.x, vec.y, vec.z))) { // create a vertex BRepBuilderAPI_MakeVertex aBuilder(gp_Pnt(vec.x, vec.y, vec.z)); TopoDS_Shape s = aBuilder.Vertex(); // measure distance BRepExtrema_DistShapeShape measure(solid, s); measure.Perform(); - if (!measure.IsDone() || measure.NbSolution() < 1) + if (!measure.IsDone() || measure.NbSolution() < 1) { continue; + } if (measure.Value() < limit) #pragma omp critical @@ -917,7 +938,7 @@ std::set FemMesh::getNodesBySolid(const TopoDS_Solid &solid) const return result; } -std::set FemMesh::getNodesByFace(const TopoDS_Face &face) const +std::set FemMesh::getNodesByFace(const TopoDS_Face& face) const { std::set result; @@ -925,7 +946,7 @@ std::set FemMesh::getNodesByFace(const TopoDS_Face &face) const BRepBndLib::Add( face, box, - Standard_False);// https://forum.freecad.org/viewtopic.php?f=18&t=21571&start=70#p221591 + Standard_False); // https://forum.freecad.org/viewtopic.php?f=18&t=21571&start=70#p221591 // limit where the mesh node belongs to the face: double limit = BRep_Tool::Tolerance(face); box.Enlarge(limit); @@ -948,15 +969,16 @@ std::set FemMesh::getNodesByFace(const TopoDS_Face &face) const // Apply the matrix to hold the BoundBox in absolute space. vec = Mtrx * vec; - if (!box.IsOut(gp_Pnt(vec.x,vec.y,vec.z))) { + if (!box.IsOut(gp_Pnt(vec.x, vec.y, vec.z))) { // create a vertex BRepBuilderAPI_MakeVertex aBuilder(gp_Pnt(vec.x, vec.y, vec.z)); TopoDS_Shape s = aBuilder.Vertex(); // measure distance BRepExtrema_DistShapeShape measure(face, s); measure.Perform(); - if (!measure.IsDone() || measure.NbSolution() < 1) + if (!measure.IsDone() || measure.NbSolution() < 1) { continue; + } if (measure.Value() < limit) #pragma omp critical @@ -969,7 +991,7 @@ std::set FemMesh::getNodesByFace(const TopoDS_Face &face) const return result; } -std::set FemMesh::getNodesByEdge(const TopoDS_Edge &edge) const +std::set FemMesh::getNodesByEdge(const TopoDS_Edge& edge) const { std::set result; @@ -997,15 +1019,16 @@ std::set FemMesh::getNodesByEdge(const TopoDS_Edge &edge) const // Apply the matrix to hold the BoundBox in absolute space. vec = Mtrx * vec; - if (!box.IsOut(gp_Pnt(vec.x,vec.y,vec.z))) { + if (!box.IsOut(gp_Pnt(vec.x, vec.y, vec.z))) { // create a vertex BRepBuilderAPI_MakeVertex aBuilder(gp_Pnt(vec.x, vec.y, vec.z)); TopoDS_Shape s = aBuilder.Vertex(); // measure distance BRepExtrema_DistShapeShape measure(edge, s); measure.Perform(); - if (!measure.IsDone() || measure.NbSolution() < 1) + if (!measure.IsDone() || measure.NbSolution() < 1) { continue; + } if (measure.Value() < limit) #pragma omp critical @@ -1018,12 +1041,12 @@ std::set FemMesh::getNodesByEdge(const TopoDS_Edge &edge) const return result; } -std::set FemMesh::getNodesByVertex(const TopoDS_Vertex &vertex) const +std::set FemMesh::getNodesByVertex(const TopoDS_Vertex& vertex) const { std::set result; double limit = BRep_Tool::Tolerance(vertex); - limit *= limit; // use square to improve speed + limit *= limit; // use square to improve speed gp_Pnt pnt = BRep_Tool::Pnt(vertex); Base::Vector3d node(pnt.X(), pnt.Y(), pnt.Z()); @@ -1059,8 +1082,9 @@ std::list FemMesh::getElementNodes(int id) const std::list result; const SMDS_MeshElement* elem = myMesh->GetMeshDS()->FindElement(id); if (elem) { - for (int i = 0; i < elem->NbNodes(); i++) + for (int i = 0; i < elem->NbNodes(); i++) { result.push_back(elem->GetNode(i)->GetID()); + } } return result; @@ -1102,17 +1126,21 @@ std::set FemMesh::getEdgesOnly() const // if aEdgeNodes is not a subset of any aFaceNodes --> aEdge does not belong to any Face std::vector inodes; - std::set_intersection(aFaceNodes.begin(), aFaceNodes.end(), - aEdgeNodes.begin(), aEdgeNodes.end(), + std::set_intersection(aFaceNodes.begin(), + aFaceNodes.end(), + aEdgeNodes.begin(), + aEdgeNodes.end(), std::back_inserter(inodes)); - std::set intersection_nodes(inodes.begin(), inodes.end()); // convert vector to set + std::set intersection_nodes(inodes.begin(), + inodes.end()); // convert vector to set if (aEdgeNodes == intersection_nodes) { edgeBelongsToAFace = true; break; } } - if (!edgeBelongsToAFace) + if (!edgeBelongsToAFace) { resultIDs.insert(aEdge->GetID()); + } } return resultIDs; @@ -1140,7 +1168,8 @@ std::set FemMesh::getFacesOnly() const // if not in volume faces // add it to the faces only // - // but the volume faces do not seem to know their global mesh ID, I could not find any method in SMESH + // but the volume faces do not seem to know their global mesh ID, I could not find any method in + // SMESH std::set resultIDs; @@ -1159,29 +1188,37 @@ std::set FemMesh::getFacesOnly() const std::list vnodes = getElementNodes(aVol->GetID()); std::set aVolNodes(vnodes.begin(), vnodes.end()); // convert list to set - // if aFaceNodes is not a subset of any aVolNodes --> aFace does not belong to any Volume + // if aFaceNodes is not a subset of any aVolNodes --> aFace does not belong to any + // Volume std::vector inodes; - std::set_intersection(aVolNodes.begin(), aVolNodes.end(), - aFaceNodes.begin(), aFaceNodes.end(), + std::set_intersection(aVolNodes.begin(), + aVolNodes.end(), + aFaceNodes.begin(), + aFaceNodes.end(), std::back_inserter(inodes)); - std::set intersection_nodes(inodes.begin(), inodes.end()); // convert vector to set + std::set intersection_nodes(inodes.begin(), + inodes.end()); // convert vector to set if (aFaceNodes == intersection_nodes) { faceBelongsToAVolume = true; break; } } - if (!faceBelongsToAVolume) + if (!faceBelongsToAVolume) { resultIDs.insert(aFace->GetID()); + } } return resultIDs; } -namespace { -class NastranElement { +namespace +{ +class NastranElement +{ public: virtual ~NastranElement() = default; - bool isValid() const { + bool isValid() const + { return element_id >= 0; } virtual void read(const std::string& str1, const std::string& str2) = 0; @@ -1194,8 +1231,10 @@ protected: using NastranElementPtr = std::shared_ptr; -class GRIDElement : public NastranElement { - void addToMesh(SMESHDS_Mesh* meshds) override { +class GRIDElement: public NastranElement +{ + void addToMesh(SMESHDS_Mesh* meshds) override + { meshds->AddNodeWithID(node.x, node.y, node.z, element_id); } @@ -1203,14 +1242,17 @@ protected: Base::Vector3d node; }; -class GRIDFreeFieldElement : public GRIDElement { - void read(const std::string& str, const std::string&) override { +class GRIDFreeFieldElement: public GRIDElement +{ + void read(const std::string& str, const std::string&) override + { char_separator sep(","); - tokenizer > tokens(str, sep); + tokenizer> tokens(str, sep); std::vector token_results; - token_results.assign(tokens.begin(),tokens.end()); - if (token_results.size() < 6) - return;//Line does not include Nodal coordinates + token_results.assign(tokens.begin(), tokens.end()); + if (token_results.size() < 6) { + return; // Line does not include Nodal coordinates + } element_id = atoi(token_results[1].c_str()); node.x = atof(token_results[3].c_str()); @@ -1219,32 +1261,33 @@ class GRIDFreeFieldElement : public GRIDElement { } }; -class GRIDLongFieldElement : public GRIDElement { - void read(const std::string& str1, const std::string& str2) override { - element_id = atoi(str1.substr(8,24).c_str()); - node.x = atof(str1.substr(40,56).c_str()); - node.y = atof(str1.substr(56,72).c_str()); - node.z = atof(str2.substr(8,24).c_str()); +class GRIDLongFieldElement: public GRIDElement +{ + void read(const std::string& str1, const std::string& str2) override + { + element_id = atoi(str1.substr(8, 24).c_str()); + node.x = atof(str1.substr(40, 56).c_str()); + node.y = atof(str1.substr(56, 72).c_str()); + node.z = atof(str2.substr(8, 24).c_str()); } }; -class GRIDSmallFieldElement : public GRIDElement { - void read(const std::string&, const std::string&) override { - } +class GRIDSmallFieldElement: public GRIDElement +{ + void read(const std::string&, const std::string&) override + {} }; -class CTRIA3Element : public NastranElement { +class CTRIA3Element: public NastranElement +{ public: - void addToMesh(SMESHDS_Mesh* meshds) override { + void addToMesh(SMESHDS_Mesh* meshds) override + { const SMDS_MeshNode* n0 = meshds->FindNode(elements[0]); const SMDS_MeshNode* n1 = meshds->FindNode(elements[1]); const SMDS_MeshNode* n2 = meshds->FindNode(elements[2]); if (n0 && n1 && n2) { - meshds->AddFaceWithID - ( - n0, n1, n2, - element_id - ); + meshds->AddFaceWithID(n0, n1, n2, element_id); } else { Base::Console().Warning("NASTRAN: Failed to add face %d from nodes: (%d, %d, %d,)\n", @@ -1256,15 +1299,18 @@ public: } }; -class CTRIA3FreeFieldElement : public CTRIA3Element { +class CTRIA3FreeFieldElement: public CTRIA3Element +{ public: - void read(const std::string& str, const std::string&) override { + void read(const std::string& str, const std::string&) override + { char_separator sep(","); - tokenizer > tokens(str, sep); + tokenizer> tokens(str, sep); std::vector token_results; - token_results.assign(tokens.begin(),tokens.end()); - if (token_results.size() < 6) - return;//Line does not include enough nodal IDs + token_results.assign(tokens.begin(), tokens.end()); + if (token_results.size() < 6) { + return; // Line does not include enough nodal IDs + } element_id = atoi(token_results[1].c_str()); elements.push_back(atoi(token_results[3].c_str())); @@ -1273,25 +1319,30 @@ public: } }; -class CTRIA3LongFieldElement : public CTRIA3Element { +class CTRIA3LongFieldElement: public CTRIA3Element +{ public: - void read(const std::string& str, const std::string&) override { - element_id = atoi(str.substr(8,16).c_str()); - elements.push_back(atoi(str.substr(24,32).c_str())); - elements.push_back(atoi(str.substr(32,40).c_str())); - elements.push_back(atoi(str.substr(40,48).c_str())); + void read(const std::string& str, const std::string&) override + { + element_id = atoi(str.substr(8, 16).c_str()); + elements.push_back(atoi(str.substr(24, 32).c_str())); + elements.push_back(atoi(str.substr(32, 40).c_str())); + elements.push_back(atoi(str.substr(40, 48).c_str())); } }; -class CTRIA3SmallFieldElement : public CTRIA3Element { +class CTRIA3SmallFieldElement: public CTRIA3Element +{ public: - void read(const std::string&, const std::string&) override { - } + void read(const std::string&, const std::string&) override + {} }; -class CTETRAElement : public NastranElement { +class CTETRAElement: public NastranElement +{ public: - void addToMesh(SMESHDS_Mesh* meshds) override { + void addToMesh(SMESHDS_Mesh* meshds) override + { const SMDS_MeshNode* n0 = meshds->FindNode(elements[1]); const SMDS_MeshNode* n1 = meshds->FindNode(elements[0]); const SMDS_MeshNode* n2 = meshds->FindNode(elements[2]); @@ -1303,14 +1354,11 @@ public: const SMDS_MeshNode* n8 = meshds->FindNode(elements[7]); const SMDS_MeshNode* n9 = meshds->FindNode(elements[9]); if (n0 && n1 && n2 && n3 && n4 && n5 && n6 && n7 && n8 && n9) { - meshds->AddVolumeWithID - ( - n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, - element_id - ); + meshds->AddVolumeWithID(n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, element_id); } else { - Base::Console().Warning("NASTRAN: Failed to add volume %d from nodes: (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)\n", + Base::Console().Warning("NASTRAN: Failed to add volume %d from nodes: (%d, %d, %d, %d, " + "%d, %d, %d, %d, %d, %d)\n", element_id, elements[1], elements[0], @@ -1326,15 +1374,18 @@ public: } }; -class CTETRAFreeFieldElement : public CTETRAElement { +class CTETRAFreeFieldElement: public CTETRAElement +{ public: - void read(const std::string& str, const std::string&) override { + void read(const std::string& str, const std::string&) override + { char_separator sep(","); - tokenizer > tokens(str, sep); + tokenizer> tokens(str, sep); std::vector token_results; - token_results.assign(tokens.begin(),tokens.end()); - if (token_results.size() < 14) - return;//Line does not include enough nodal IDs + token_results.assign(tokens.begin(), tokens.end()); + if (token_results.size() < 14) { + return; // Line does not include enough nodal IDs + } element_id = atoi(token_results[1].c_str()); elements.push_back(atoi(token_results[3].c_str())); @@ -1350,45 +1401,53 @@ public: } }; -class CTETRALongFieldElement : public CTETRAElement { +class CTETRALongFieldElement: public CTETRAElement +{ public: - void read(const std::string& str1, const std::string& str2) override { - int id = atoi(str1.substr(8,16).c_str()); + void read(const std::string& str1, const std::string& str2) override + { + int id = atoi(str1.substr(8, 16).c_str()); int offset = 0; - if (id < 1000000) + if (id < 1000000) { offset = 0; - else if (id < 10000000) + } + else if (id < 10000000) { offset = 1; - else if (id < 100000000) + } + else if (id < 100000000) { offset = 2; + } element_id = id; - elements.push_back(atoi(str1.substr(24,32).c_str())); - elements.push_back(atoi(str1.substr(32,40).c_str())); - elements.push_back(atoi(str1.substr(40,48).c_str())); - elements.push_back(atoi(str1.substr(48,56).c_str())); - elements.push_back(atoi(str1.substr(56,64).c_str())); - elements.push_back(atoi(str1.substr(64,72).c_str())); - elements.push_back(atoi(str2.substr(8+offset,16+offset).c_str())); - elements.push_back(atoi(str2.substr(16+offset,24+offset).c_str())); - elements.push_back(atoi(str2.substr(24+offset,32+offset).c_str())); - elements.push_back(atoi(str2.substr(32+offset,40+offset).c_str())); + elements.push_back(atoi(str1.substr(24, 32).c_str())); + elements.push_back(atoi(str1.substr(32, 40).c_str())); + elements.push_back(atoi(str1.substr(40, 48).c_str())); + elements.push_back(atoi(str1.substr(48, 56).c_str())); + elements.push_back(atoi(str1.substr(56, 64).c_str())); + elements.push_back(atoi(str1.substr(64, 72).c_str())); + elements.push_back(atoi(str2.substr(8 + offset, 16 + offset).c_str())); + elements.push_back(atoi(str2.substr(16 + offset, 24 + offset).c_str())); + elements.push_back(atoi(str2.substr(24 + offset, 32 + offset).c_str())); + elements.push_back(atoi(str2.substr(32 + offset, 40 + offset).c_str())); } }; -class CTETRASmallFieldElement : public CTETRAElement { +class CTETRASmallFieldElement: public CTETRAElement +{ public: - void read(const std::string&, const std::string&) override { - } + void read(const std::string&, const std::string&) override + {} }; // NASTRAN-95 -class GRIDNastran95Element : public GRIDElement { - void read(const std::string& str, const std::string&) override { +class GRIDNastran95Element: public GRIDElement +{ + void read(const std::string& str, const std::string&) override + { element_id = atoi(str.substr(8, 16).c_str()); node.x = atof(str.substr(24, 32).c_str()); node.y = atof(str.substr(32, 40).c_str()); @@ -1396,175 +1455,167 @@ class GRIDNastran95Element : public GRIDElement { } }; -class CBARElement : public NastranElement { - void read(const std::string& str, const std::string&) override { - element_id = atoi(str.substr(8,16).c_str()); - elements.push_back(atoi(str.substr(24,32).c_str())); - elements.push_back(atoi(str.substr(32,40).c_str())); +class CBARElement: public NastranElement +{ + void read(const std::string& str, const std::string&) override + { + element_id = atoi(str.substr(8, 16).c_str()); + elements.push_back(atoi(str.substr(24, 32).c_str())); + elements.push_back(atoi(str.substr(32, 40).c_str())); } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddEdgeWithID( - elements[0], - elements[1], - element_id - ); + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddEdgeWithID(elements[0], elements[1], element_id); } }; -class CTRMEMElement : public NastranElement { - void read(const std::string& str, const std::string&) override { - element_id = atoi(str.substr(8,16).c_str()); - elements.push_back(atoi(str.substr(24,32).c_str())); - elements.push_back(atoi(str.substr(32,40).c_str())); - elements.push_back(atoi(str.substr(40,48).c_str())); - } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddFaceWithID( - elements[0], - elements[1], - elements[2], - element_id - ); - } -}; - -class CTRIA1Element : public NastranElement { - void read(const std::string& str, const std::string&) override { - element_id = atoi(str.substr(8,16).c_str()); +class CTRMEMElement: public NastranElement +{ + void read(const std::string& str, const std::string&) override + { + element_id = atoi(str.substr(8, 16).c_str()); elements.push_back(atoi(str.substr(24, 32).c_str())); elements.push_back(atoi(str.substr(32, 40).c_str())); elements.push_back(atoi(str.substr(40, 48).c_str())); } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddFaceWithID( - elements[0], - elements[1], - elements[2], - element_id - ); + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddFaceWithID(elements[0], elements[1], elements[2], element_id); } }; -class CQUAD1Element : public NastranElement { - void read(const std::string& str, const std::string&) override { - element_id = atoi(str.substr(8,16).c_str()); +class CTRIA1Element: public NastranElement +{ + void read(const std::string& str, const std::string&) override + { + element_id = atoi(str.substr(8, 16).c_str()); + elements.push_back(atoi(str.substr(24, 32).c_str())); + elements.push_back(atoi(str.substr(32, 40).c_str())); + elements.push_back(atoi(str.substr(40, 48).c_str())); + } + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddFaceWithID(elements[0], elements[1], elements[2], element_id); + } +}; + +class CQUAD1Element: public NastranElement +{ + void read(const std::string& str, const std::string&) override + { + element_id = atoi(str.substr(8, 16).c_str()); elements.push_back(atoi(str.substr(24, 32).c_str())); elements.push_back(atoi(str.substr(32, 40).c_str())); elements.push_back(atoi(str.substr(40, 48).c_str())); elements.push_back(atoi(str.substr(48, 56).c_str())); } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddFaceWithID( - elements[0], - elements[1], - elements[2], - elements[3], - element_id - ); + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddFaceWithID(elements[0], elements[1], elements[2], elements[3], element_id); } }; -class CTETRANastran95Element : public NastranElement { - void read(const std::string& str, const std::string&) override { - element_id = atoi(str.substr(8,16).c_str()); +class CTETRANastran95Element: public NastranElement +{ + void read(const std::string& str, const std::string&) override + { + element_id = atoi(str.substr(8, 16).c_str()); elements.push_back(atoi(str.substr(24, 32).c_str())); elements.push_back(atoi(str.substr(32, 40).c_str())); elements.push_back(atoi(str.substr(40, 48).c_str())); elements.push_back(atoi(str.substr(48, 56).c_str())); } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddFaceWithID( - elements[0], - elements[1], - elements[2], - elements[3], - element_id - ); + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddFaceWithID(elements[0], elements[1], elements[2], elements[3], element_id); } }; -class CWEDGEElement : public NastranElement { - void read(const std::string& str, const std::string&) override { - element_id = atoi(str.substr(8,16).c_str()); - elements.push_back(atoi(str.substr(24,32).c_str())); - elements.push_back(atoi(str.substr(32,40).c_str())); - elements.push_back(atoi(str.substr(40,48).c_str())); - elements.push_back(atoi(str.substr(48,56).c_str())); - elements.push_back(atoi(str.substr(56,64).c_str())); - elements.push_back(atoi(str.substr(64,72).c_str())); +class CWEDGEElement: public NastranElement +{ + void read(const std::string& str, const std::string&) override + { + element_id = atoi(str.substr(8, 16).c_str()); + elements.push_back(atoi(str.substr(24, 32).c_str())); + elements.push_back(atoi(str.substr(32, 40).c_str())); + elements.push_back(atoi(str.substr(40, 48).c_str())); + elements.push_back(atoi(str.substr(48, 56).c_str())); + elements.push_back(atoi(str.substr(56, 64).c_str())); + elements.push_back(atoi(str.substr(64, 72).c_str())); } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddVolumeWithID( - elements[0], - elements[1], - elements[2], - elements[3], - elements[4], - elements[5], - element_id - ); + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddVolumeWithID(elements[0], + elements[1], + elements[2], + elements[3], + elements[4], + elements[5], + element_id); } }; -class CHEXA1Element : public NastranElement { - void read(const std::string& str1, const std::string& str2) override { - element_id = atoi(str1.substr(8,16).c_str()); - elements.push_back(atoi(str1.substr(24,32).c_str())); - elements.push_back(atoi(str1.substr(32,40).c_str())); - elements.push_back(atoi(str1.substr(40,48).c_str())); - elements.push_back(atoi(str1.substr(48,56).c_str())); - elements.push_back(atoi(str1.substr(56,64).c_str())); - elements.push_back(atoi(str1.substr(64,72).c_str())); +class CHEXA1Element: public NastranElement +{ + void read(const std::string& str1, const std::string& str2) override + { + element_id = atoi(str1.substr(8, 16).c_str()); + elements.push_back(atoi(str1.substr(24, 32).c_str())); + elements.push_back(atoi(str1.substr(32, 40).c_str())); + elements.push_back(atoi(str1.substr(40, 48).c_str())); + elements.push_back(atoi(str1.substr(48, 56).c_str())); + elements.push_back(atoi(str1.substr(56, 64).c_str())); + elements.push_back(atoi(str1.substr(64, 72).c_str())); - elements.push_back(atoi(str2.substr(8,16).c_str())); - elements.push_back(atoi(str2.substr(16,24).c_str())); + elements.push_back(atoi(str2.substr(8, 16).c_str())); + elements.push_back(atoi(str2.substr(16, 24).c_str())); } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddVolumeWithID( - elements[0], - elements[1], - elements[2], - elements[3], - elements[4], - elements[5], - elements[6], - elements[7], - element_id - ); + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddVolumeWithID(elements[0], + elements[1], + elements[2], + elements[3], + elements[4], + elements[5], + elements[6], + elements[7], + element_id); } }; -class CHEXA2Element : public NastranElement { - void read(const std::string& str1, const std::string& str2) override { - element_id = atoi(str1.substr(8,16).c_str()); - elements.push_back(atoi(str1.substr(24,32).c_str())); - elements.push_back(atoi(str1.substr(32,40).c_str())); - elements.push_back(atoi(str1.substr(40,48).c_str())); - elements.push_back(atoi(str1.substr(48,56).c_str())); - elements.push_back(atoi(str1.substr(56,64).c_str())); - elements.push_back(atoi(str1.substr(64,72).c_str())); +class CHEXA2Element: public NastranElement +{ + void read(const std::string& str1, const std::string& str2) override + { + element_id = atoi(str1.substr(8, 16).c_str()); + elements.push_back(atoi(str1.substr(24, 32).c_str())); + elements.push_back(atoi(str1.substr(32, 40).c_str())); + elements.push_back(atoi(str1.substr(40, 48).c_str())); + elements.push_back(atoi(str1.substr(48, 56).c_str())); + elements.push_back(atoi(str1.substr(56, 64).c_str())); + elements.push_back(atoi(str1.substr(64, 72).c_str())); - elements.push_back(atoi(str2.substr(8,16).c_str())); - elements.push_back(atoi(str2.substr(16,24).c_str())); + elements.push_back(atoi(str2.substr(8, 16).c_str())); + elements.push_back(atoi(str2.substr(16, 24).c_str())); } - void addToMesh(SMESHDS_Mesh* meshds) override { - meshds->AddVolumeWithID( - elements[0], - elements[1], - elements[2], - elements[3], - elements[4], - elements[5], - elements[6], - elements[7], - element_id - ); + void addToMesh(SMESHDS_Mesh* meshds) override + { + meshds->AddVolumeWithID(elements[0], + elements[1], + elements[2], + elements[3], + elements[4], + elements[5], + elements[6], + elements[7], + element_id); } }; -} +} // namespace -void FemMesh::readNastran(const std::string &Filename) +void FemMesh::readNastran(const std::string& Filename) { Base::TimeInfo Start; Base::Console().Log("Start: FemMesh::readNastran() =================================\n"); @@ -1575,35 +1626,37 @@ void FemMesh::readNastran(const std::string &Filename) Base::ifstream inputfile; inputfile.open(fi); inputfile.seekg(std::ifstream::beg); - std::string line1,line2; + std::string line1, line2; std::vector mesh_elements; - enum Format { + enum Format + { FreeField, SmallField, LongField }; Format nastranFormat = Format::LongField; - do - { - std::getline(inputfile,line1); - if (line1.empty()) + do { + std::getline(inputfile, line1); + if (line1.empty()) { continue; - if (line1.find(',') != std::string::npos) + } + if (line1.find(',') != std::string::npos) { nastranFormat = Format::FreeField; + } NastranElementPtr ptr; - if (line1.find("GRID*") != std::string::npos) { //We found a Grid line - //Now lets extract the GRID Points = Nodes - //As each GRID Line consists of two subsequent lines we have to - //take care of that as well + if (line1.find("GRID*") != std::string::npos) { // We found a Grid line + // Now lets extract the GRID Points = Nodes + // As each GRID Line consists of two subsequent lines we have to + // take care of that as well if (nastranFormat == Format::LongField) { - std::getline(inputfile,line2); + std::getline(inputfile, line2); ptr = std::make_shared(); ptr->read(line1, line2); } } - else if (line1.find("GRID") != std::string::npos) { //We found a Grid line + else if (line1.find("GRID") != std::string::npos) { // We found a Grid line if (nastranFormat == Format::FreeField) { ptr = std::make_shared(); ptr->read(line1, ""); @@ -1620,11 +1673,11 @@ void FemMesh::readNastran(const std::string &Filename) } } else if (line1.find("CTETRA") != std::string::npos) { - //Lets extract the elements - //As each Element Line consists of two subsequent lines as well - //we have to take care of that - //At a first step we only extract Quadratic Tetrahedral Elements - std::getline(inputfile,line2); + // Lets extract the elements + // As each Element Line consists of two subsequent lines as well + // we have to take care of that + // At a first step we only extract Quadratic Tetrahedral Elements + std::getline(inputfile, line2); if (nastranFormat == Format::FreeField) { ptr = std::make_shared(); ptr->read(line1.append(line2), ""); @@ -1638,13 +1691,13 @@ void FemMesh::readNastran(const std::string &Filename) if (ptr && ptr->isValid()) { mesh_elements.push_back(ptr); } - } - while (inputfile.good()); + } while (inputfile.good()); inputfile.close(); - Base::Console().Log(" %f: File read, start building mesh\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: File read, start building mesh\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); - //Now fill the SMESH datastructure + // Now fill the SMESH datastructure SMESHDS_Mesh* meshds = this->myMesh->GetMeshDS(); meshds->ClearMesh(); @@ -1652,11 +1705,10 @@ void FemMesh::readNastran(const std::string &Filename) it->addToMesh(meshds); } - Base::Console().Log(" %f: Done \n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); - + Base::Console().Log(" %f: Done \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); } -void FemMesh::readNastran95(const std::string &Filename) +void FemMesh::readNastran95(const std::string& Filename) { Base::TimeInfo Start; Base::Console().Log("Start: FemMesh::readNastran95() =================================\n"); @@ -1667,101 +1719,93 @@ void FemMesh::readNastran95(const std::string &Filename) Base::ifstream inputfile; inputfile.open(fi); inputfile.seekg(std::ifstream::beg); - std::string line1,line2,tcard; + std::string line1, line2, tcard; std::vector mesh_nodes; std::vector mesh_elements; - do - { + do { NastranElementPtr node; NastranElementPtr elem; std::getline(inputfile, line1); - //cout << line1 << endl; - if (line1.empty()) + // cout << line1 << endl; + if (line1.empty()) { continue; + } tcard = line1.substr(0, 8).c_str(); - //boost::algorithm::trim(tcard); - if (line1.find("GRID*") != std::string::npos ) //We found a Grid line + // boost::algorithm::trim(tcard); + if (line1.find("GRID*") != std::string::npos) // We found a Grid line { - //Now lets extract the GRID Points = Nodes - //As each GRID Line consists of two subsequent lines we have to - //take care of that as well - std::getline(inputfile,line2); + // Now lets extract the GRID Points = Nodes + // As each GRID Line consists of two subsequent lines we have to + // take care of that as well + std::getline(inputfile, line2); node = std::make_shared(); node->read(line1, line2); } - else if (line1.find("GRID") != std::string::npos) //We found a Grid line + else if (line1.find("GRID") != std::string::npos) // We found a Grid line { - //Base::Console().Log("Found a GRID\n"); - //D06.inp - //GRID 109 .9 .7 - //Now lets extract the GRID Points = Nodes - //Get the Nodal ID + // Base::Console().Log("Found a GRID\n"); + // D06.inp + // GRID 109 .9 .7 + // Now lets extract the GRID Points = Nodes + // Get the Nodal ID node = std::make_shared(); node->read(line1, ""); } - //1D - else if (line1.substr(0, 6) == "CBAR") - { + // 1D + else if (line1.substr(0, 6) == "CBAR") { elem = std::make_shared(); elem->read(line1, ""); } - //2d - else if (line1.substr(0, 6) == "CTRMEM") - { - //D06 - //CTRMEM 322 1 179 180 185 + // 2d + else if (line1.substr(0, 6) == "CTRMEM") { + // D06 + // CTRMEM 322 1 179 180 185 elem = std::make_shared(); elem->read(line1, ""); } - else if (line1.substr(0, 6) == "CTRIA1") - { - //D06 - //CTRMEM 322 1 179 180 185 + else if (line1.substr(0, 6) == "CTRIA1") { + // D06 + // CTRMEM 322 1 179 180 185 elem = std::make_shared(); elem->read(line1, ""); } - else if (line1.substr(0, 6) == "CQUAD1") - { - //D06 - //CTRMEM 322 1 179 180 185 + else if (line1.substr(0, 6) == "CQUAD1") { + // D06 + // CTRMEM 322 1 179 180 185 elem = std::make_shared(); elem->read(line1, ""); } - //3d element - else if (line1.find("CTETRA")!= std::string::npos) - { - //d011121a.inp - //CTETRA 3 200 104 114 3 103 + // 3d element + else if (line1.find("CTETRA") != std::string::npos) { + // d011121a.inp + // CTETRA 3 200 104 114 3 103 elem = std::make_shared(); elem->read(line1, ""); } - else if (line1.find("CWEDGE")!= std::string::npos) - { - //d011121a.inp - //CWEDGE 11 200 6 17 16 106 117 116 + else if (line1.find("CWEDGE") != std::string::npos) { + // d011121a.inp + // CWEDGE 11 200 6 17 16 106 117 116 elem = std::make_shared(); elem->read(line1, ""); } - else if (line1.find("CHEXA1")!= std::string::npos) - { - //d011121a.inp - //CHEXA1 1 200 1 2 13 12 101 102 +SOL1 + else if (line1.find("CHEXA1") != std::string::npos) { + // d011121a.inp + // CHEXA1 1 200 1 2 13 12 101 102 +SOL1 //+SOL1 113 112 - std::getline(inputfile,line2); + std::getline(inputfile, line2); elem = std::make_shared(); elem->read(line1, line2); } - else if (line1.find("CHEXA2")!= std::string::npos) - { - //d011121a.inp - //CHEXA1 1 200 1 2 13 12 101 102 +SOL1 + else if (line1.find("CHEXA2") != std::string::npos) { + // d011121a.inp + // CHEXA1 1 200 1 2 13 12 101 102 +SOL1 //+SOL1 113 112 - std::getline(inputfile,line2); + std::getline(inputfile, line2); elem = std::make_shared(); elem->read(line1, line2); } @@ -1773,13 +1817,13 @@ void FemMesh::readNastran95(const std::string &Filename) if (elem && elem->isValid()) { mesh_elements.push_back(elem); } - } - while (inputfile.good()); + } while (inputfile.good()); inputfile.close(); - Base::Console().Log(" %f: File read, start building mesh\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: File read, start building mesh\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); - //Now fill the SMESH datastructure + // Now fill the SMESH datastructure SMESHDS_Mesh* meshds = this->myMesh->GetMeshDS(); meshds->ClearMesh(); @@ -1791,10 +1835,10 @@ void FemMesh::readNastran95(const std::string &Filename) it->addToMesh(meshds); } - Base::Console().Log(" %f: Done \n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: Done \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); } -void FemMesh::readAbaqus(const std::string &FileName) +void FemMesh::readAbaqus(const std::string& FileName) { Base::TimeInfo Start; Base::Console().Log("Start: FemMesh::readAbaqus() =================================\n"); @@ -1802,12 +1846,14 @@ void FemMesh::readAbaqus(const std::string &FileName) /* Python command to read Abaqus inp mesh file from test suite: from feminout.importInpMesh import read as read_inp - femmesh = read_inp(FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem/femtest/data/mesh/tetra10_mesh.inp') + femmesh = read_inp(FreeCAD.ConfigGet("AppHomePath") + + 'Mod/Fem/femtest/data/mesh/tetra10_mesh.inp') */ PyObject* module = PyImport_ImportModule("feminout.importInpMesh"); - if (!module) + if (!module) { return; + } try { Py::Module abaqusmod(module, true); Py::Callable method(abaqusmod.getAttr("read")); @@ -1817,8 +1863,9 @@ void FemMesh::readAbaqus(const std::string &FileName) if (PyObject_TypeCheck(mesh.ptr(), &FemMeshPy::Type)) { FemMeshPy* fempy = static_cast(mesh.ptr()); FemMesh* fem = fempy->getFemMeshPtr(); - *this = *fem; // the deep copy should be avoided, a pointer swap method could be implemented - // see https://forum.freecad.org/viewtopic.php?f=10&t=31999&start=10#p274241 + *this = *fem; // the deep copy should be avoided, a pointer swap method could be + // implemented see + // https://forum.freecad.org/viewtopic.php?f=10&t=31999&start=10#p274241 } else { throw Base::FileException("Problems reading file"); @@ -1827,10 +1874,10 @@ void FemMesh::readAbaqus(const std::string &FileName) catch (Py::Exception& e) { e.clear(); } - Base::Console().Log(" %f: Done \n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: Done \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); } -void FemMesh::readZ88(const std::string &FileName) +void FemMesh::readZ88(const std::string& FileName) { Base::TimeInfo Start; Base::Console().Log("Start: FemMesh::readZ88() =================================\n"); @@ -1838,12 +1885,14 @@ void FemMesh::readZ88(const std::string &FileName) /* Python command to read Z88 mesh file from test suite: from feminout.importZ88Mesh import read as read_z88 - femmesh = read_z88(FreeCAD.ConfigGet("AppHomePath") + 'Mod/Fem/femtest/data/mesh/tetra10_mesh.z88') + femmesh = read_z88(FreeCAD.ConfigGet("AppHomePath") + + 'Mod/Fem/femtest/data/mesh/tetra10_mesh.z88') */ PyObject* module = PyImport_ImportModule("feminout.importZ88Mesh"); - if (!module) + if (!module) { return; + } try { Py::Module z88mod(module, true); Py::Callable method(z88mod.getAttr("read")); @@ -1853,8 +1902,9 @@ void FemMesh::readZ88(const std::string &FileName) if (PyObject_TypeCheck(mesh.ptr(), &FemMeshPy::Type)) { FemMeshPy* fempy = static_cast(mesh.ptr()); FemMesh* fem = fempy->getFemMeshPtr(); - *this = *fem; // the deep copy should be avoided, a pointer swap method could be implemented - // see https://forum.freecad.org/viewtopic.php?f=10&t=31999&start=10#p274241 + *this = *fem; // the deep copy should be avoided, a pointer swap method could be + // implemented see + // https://forum.freecad.org/viewtopic.php?f=10&t=31999&start=10#p274241 } else { throw Base::FileException("Problems reading file"); @@ -1863,46 +1913,48 @@ void FemMesh::readZ88(const std::string &FileName) catch (Py::Exception& e) { e.clear(); } - Base::Console().Log(" %f: Done \n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: Done \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); } -void FemMesh::read(const char *FileName) +void FemMesh::read(const char* FileName) { Base::FileInfo File(FileName); _Mtrx = Base::Matrix4D(); // checking on the file - if (!File.isReadable()) + if (!File.isReadable()) { throw Base::FileException("File to load not existing or not readable", File); + } - if (File.hasExtension("unv") ) { + if (File.hasExtension("unv")) { // read UNV file myMesh->UNVToMesh(File.filePath().c_str()); } - else if (File.hasExtension("med") ) { - myMesh->MEDToMesh(File.filePath().c_str(),File.fileNamePure().c_str()); + else if (File.hasExtension("med")) { + myMesh->MEDToMesh(File.filePath().c_str(), File.fileNamePure().c_str()); } - else if (File.hasExtension("inp") ) { + else if (File.hasExtension("inp")) { // read Abaqus inp mesh file readAbaqus(File.filePath()); // if the file doesn't contain supported geometries try Nastran95 SMESHDS_Mesh* meshds = this->myMesh->GetMeshDS(); - if (meshds->NbNodes() == 0) + if (meshds->NbNodes() == 0) { readNastran95(File.filePath()); + } } - else if (File.hasExtension("stl") ) { + else if (File.hasExtension("stl")) { // read brep-file myMesh->STLToMesh(File.filePath().c_str()); } #if SMESH_VERSION_MAJOR < 7 - else if (File.hasExtension("dat") ) { + else if (File.hasExtension("dat")) { // read brep-file // vejmarie disable myMesh->DATToMesh(File.filePath().c_str()); } #endif - else if (File.hasExtension("bdf") ) { + else if (File.hasExtension("bdf")) { // read Nastran-file readNastran(File.filePath()); } @@ -1912,16 +1964,16 @@ void FemMesh::read(const char *FileName) FemVTKTools::readVTKMesh(File.filePath().c_str(), this); } #endif - else if (File.hasExtension("z88") ) { + else if (File.hasExtension("z88")) { // read Z88 mesh file readZ88(File.filePath()); } - else{ + else { throw Base::FileException("Unknown extension"); } } -void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool groupParam) const +void FemMesh::writeABAQUS(const std::string& Filename, int elemParam, bool groupParam) const { /* * elemParam: @@ -1934,7 +1986,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group * false = do not write group data */ - static std::map > elemOrderMap; + static std::map> elemOrderMap; static std::map edgeTypeMap; static std::map faceTypeMap; static std::map volTypeMap; @@ -1990,8 +2042,8 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // master 0.14 release // changed to this in August 2013, committed by juergen (jriedel) // https://github.com/FreeCAD/FreeCAD/commit/af56b324b9566b20f3b6e7880c29354c1dbe7a99 - //std::vector c3d4 = boost::assign::list_of(0)(3)(1)(2); - //std::vector c3d10 = boost::assign::list_of(0)(2)(1)(3)(6)(5)(4)(7)(9)(8); + // std::vector c3d4 = boost::assign::list_of(0)(3)(1)(2); + // std::vector c3d10 = boost::assign::list_of(0)(2)(1)(3)(6)(5)(4)(7)(9)(8); // since master 0.15 // added by werner (wmayer) March 2015, @@ -2000,7 +2052,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // https://github.com/FreeCAD/FreeCAD/commit/b007bd19e4e4608caa4cdad350a9f480287fac6b // tetra4 FreeCAD --> C3D4 CalculiX // N2, N1, N3, N4 - std::vector c3d4 = boost::assign::list_of(1)(0)(2)(3); + std::vector c3d4 = boost::assign::list_of(1)(0)(2)(3); // tetra10: FreeCAD --> C3D10 CalculiX // N2, N1, N3, N4, N5, N7, N6, N9, N8, N10 std::vector c3d10 = boost::assign::list_of(1)(0)(2)(3)(4)(6)(5)(8)(7)(9); @@ -2009,15 +2061,15 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // be careful with activating because of method getccxVolumesByFace()) // tetra4 FreeCAD --> C3D4 CalculiX // N2, N3, N4, N1 - //std::vector c3d4 = boost::assign::list_of(1)(2)(3)(0); + // std::vector c3d4 = boost::assign::list_of(1)(2)(3)(0); // // tetra10: FreeCAD --> C3D10 CalculiX // N2, N3, N4, N1, N6, N10, N9, N5, N7, N8 - //std::vector c3d10 = boost::assign::list_of(1)(2)(3)(0)(5)(9)(8)(4)(6)(7); + // std::vector c3d10 = boost::assign::list_of(1)(2)(3)(0)(5)(9)(8)(4)(6)(7); // hexa8 FreeCAD --> C3D8 CalculiX // N6, N7, N8, N5, N2, N3, N4, N1 - std::vector c3d8 = boost::assign::list_of(5)(6)(7)(4)(1)(2)(3)(0) ; + std::vector c3d8 = boost::assign::list_of(5)(6)(7)(4)(1)(2)(3)(0); // // hexa20 FreeCAD --> C3D20 CalculiX // N6, N7, N8, N5, N2, N3, N4, N1, N14, N15, N16, N13, N10, N11, N12, N9, N18, N19, N20, N17 @@ -2026,11 +2078,12 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // // penta6 FreeCAD --> C3D6 CalculiX // N5, N6, N4, N2, N3, N1 - std::vector c3d6 = boost::assign::list_of(4)(5)(3)(1)(2)(0) ; + std::vector c3d6 = boost::assign::list_of(4)(5)(3)(1)(2)(0); // // penta15 FreeCAD --> C3D15 CalculiX // N5, N6, N4, N2, N3, N1, N11, N12, N10, N8, N9, N7, N14, N15, N13 - std::vector c3d15 = boost::assign::list_of(4)(5)(3)(1)(2)(0)(10)(11)(9)(7)(8)(6)(13)(14)(12); + std::vector c3d15 = + boost::assign::list_of(4)(5)(3)(1)(2)(0)(10)(11)(9)(7)(8)(6)(13)(14)(12); elemOrderMap.insert(std::make_pair("C3D4", c3d4)); volTypeMap.insert(std::make_pair(elemOrderMap["C3D4"].size(), "C3D4")); @@ -2048,7 +2101,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // get all data --> Extract Nodes and Elements of the current SMESH datastructure using VertexMap = std::map; - using NodesMap = std::map >; + using NodesMap = std::map>; using ElementsMap = std::map; // get nodes @@ -2057,7 +2110,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group Base::Vector3d current_node; while (aNodeIter->more()) { const SMDS_MeshNode* aNode = aNodeIter->next(); - current_node.Set(aNode->X(),aNode->Y(),aNode->Z()); + current_node.Set(aNode->X(), aNode->Y(), aNode->Z()); current_node = _Mtrx * current_node; vertexMap[aNode->GetID()] = current_node; } @@ -2067,19 +2120,20 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group SMDS_VolumeIteratorPtr aVolIter = myMesh->GetMeshDS()->volumesIterator(); while (aVolIter->more()) { const SMDS_MeshVolume* aVol = aVolIter->next(); - std::pair > apair; + std::pair> apair; apair.first = aVol->GetID(); int numNodes = aVol->NbNodes(); std::map::iterator it = volTypeMap.find(numNodes); if (it != volTypeMap.end()) { const std::vector& order = elemOrderMap[it->second]; - for (int jt : order) + for (int jt : order) { apair.second.push_back(aVol->GetNode(jt)->GetID()); + } elementsMapVol[it->second].insert(apair); } } - //get faces + // get faces ElementsMap elementsMapFac; // empty faces map used for elemParam = 1 // and elementsMapVol is not empty if ((elemParam == 0) || (elemParam == 1 && elementsMapVol.empty())) { @@ -2088,14 +2142,15 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group SMDS_FaceIteratorPtr aFaceIter = myMesh->GetMeshDS()->facesIterator(); while (aFaceIter->more()) { const SMDS_MeshFace* aFace = aFaceIter->next(); - std::pair > apair; + std::pair> apair; apair.first = aFace->GetID(); int numNodes = aFace->NbNodes(); std::map::iterator it = faceTypeMap.find(numNodes); if (it != faceTypeMap.end()) { const std::vector& order = elemOrderMap[it->second]; - for (int jt : order) + for (int jt : order) { apair.second.push_back(aFace->GetNode(jt)->GetID()); + } elementsMapFac[it->second].insert(apair); } } @@ -2104,15 +2159,16 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // we're going to fill the elementsMapFac with the facesOnly std::set facesOnly = getFacesOnly(); for (int itfa : facesOnly) { - std::pair > apair; + std::pair> apair; apair.first = itfa; const SMDS_MeshElement* aFace = myMesh->GetMeshDS()->FindElement(itfa); int numNodes = aFace->NbNodes(); std::map::iterator it = faceTypeMap.find(numNodes); if (it != faceTypeMap.end()) { const std::vector& order = elemOrderMap[it->second]; - for (int jt : order) + for (int jt : order) { apair.second.push_back(aFace->GetNode(jt)->GetID()); + } elementsMapFac[it->second].insert(apair); } } @@ -2127,14 +2183,15 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group SMDS_EdgeIteratorPtr aEdgeIter = myMesh->GetMeshDS()->edgesIterator(); while (aEdgeIter->more()) { const SMDS_MeshEdge* aEdge = aEdgeIter->next(); - std::pair > apair; + std::pair> apair; apair.first = aEdge->GetID(); int numNodes = aEdge->NbNodes(); std::map::iterator it = edgeTypeMap.find(numNodes); if (it != edgeTypeMap.end()) { const std::vector& order = elemOrderMap[it->second]; - for (int jt : order) + for (int jt : order) { apair.second.push_back(aEdge->GetNode(jt)->GetID()); + } elementsMapEdg[it->second].insert(apair); } } @@ -2143,15 +2200,16 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // we're going to fill the elementsMapEdg with the edgesOnly std::set edgesOnly = getEdgesOnly(); for (int ited : edgesOnly) { - std::pair > apair; + std::pair> apair; apair.first = ited; const SMDS_MeshElement* aEdge = myMesh->GetMeshDS()->FindElement(ited); int numNodes = aEdge->NbNodes(); std::map::iterator it = edgeTypeMap.find(numNodes); if (it != edgeTypeMap.end()) { const std::vector& order = elemOrderMap[it->second]; - for (int jt : order) + for (int jt : order) { apair.second.push_back(aEdge->GetNode(jt)->GetID()); + } elementsMapEdg[it->second].insert(apair); } } @@ -2167,8 +2225,8 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // add some text and make sure one of the known elemParam values is used anABAQUS_Output << "** written by FreeCAD inp file writer for CalculiX,Abaqus meshes" - << std::endl; - switch(elemParam){ + << std::endl; + switch (elemParam) { case 0: anABAQUS_Output << "** all mesh elements." << std::endl << std::endl; break; @@ -2194,12 +2252,11 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // This way we get sorted output. // See http://forum.freecad.org/viewtopic.php?f=18&t=12646&start=40#p103004 for (const auto& it : vertexMap) { - anABAQUS_Output << it.first << ", " - << it.second.x << ", " - << it.second.y << ", " - << it.second.z << std::endl; + anABAQUS_Output << it.first << ", " << it.second.x << ", " << it.second.y << ", " + << it.second.z << std::endl; } - anABAQUS_Output << std::endl << std::endl;; + anABAQUS_Output << std::endl << std::endl; + ; // write volumes to file @@ -2215,7 +2272,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group bool first_line = true; for (auto kt = jt.second.begin(); kt != jt.second.end(); ++kt, ++ct) { if (ct < 15) { - anABAQUS_Output << ", " << *kt; + anABAQUS_Output << ", " << *kt; } else { if (first_line) { @@ -2245,10 +2302,12 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group anABAQUS_Output << std::endl; } } - if (elsetname.empty()) + if (elsetname.empty()) { elsetname += "Efaces"; - else + } + else { elsetname += ", Efaces"; + } anABAQUS_Output << std::endl; } @@ -2265,10 +2324,12 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group anABAQUS_Output << std::endl; } } - if (elsetname.empty()) + if (elsetname.empty()) { elsetname += "Eedges"; - else + } + else { elsetname += ", Eedges"; + } anABAQUS_Output << std::endl; } @@ -2283,7 +2344,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group } else { // get and write group data - anABAQUS_Output << std::endl << "** Group data" << std::endl; + anABAQUS_Output << std::endl << "** Group data" << std::endl; std::list groupIDs = myMesh->GetGroupIds(); for (int it : groupIDs) { @@ -2293,15 +2354,31 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group // PyObject* FemMeshPy::getGroupElementType() SMDSAbs_ElementType aElementType = myMesh->GetGroup(it)->GetGroupDS()->GetType(); const char* groupElementType = ""; - switch(aElementType) { - case SMDSAbs_All : groupElementType = "All"; break; - case SMDSAbs_Node : groupElementType = "Node"; break; - case SMDSAbs_Edge : groupElementType = "Edge"; break; - case SMDSAbs_Face : groupElementType = "Face"; break; - case SMDSAbs_Volume : groupElementType = "Volume"; break; - case SMDSAbs_0DElement : groupElementType = "0DElement"; break; - case SMDSAbs_Ball : groupElementType = "Ball"; break; - default : groupElementType = "Unknown"; break; + switch (aElementType) { + case SMDSAbs_All: + groupElementType = "All"; + break; + case SMDSAbs_Node: + groupElementType = "Node"; + break; + case SMDSAbs_Edge: + groupElementType = "Edge"; + break; + case SMDSAbs_Face: + groupElementType = "Face"; + break; + case SMDSAbs_Volume: + groupElementType = "Volume"; + break; + case SMDSAbs_0DElement: + groupElementType = "0DElement"; + break; + case SMDSAbs_Ball: + groupElementType = "Ball"; + break; + default: + groupElementType = "Unknown"; + break; } const char* groupName = myMesh->GetGroup(it)->GetName(); anABAQUS_Output << "** GroupID: " << (it) << " --> GroupName: " << groupName @@ -2333,7 +2410,7 @@ void FemMesh::writeABAQUS(const std::string &Filename, int elemParam, bool group } -void FemMesh::writeZ88(const std::string &FileName) const +void FemMesh::writeZ88(const std::string& FileName) const { Base::TimeInfo Start; Base::Console().Log("Start: FemMesh::writeZ88() =================================\n"); @@ -2345,8 +2422,9 @@ void FemMesh::writeZ88(const std::string &FileName) const */ PyObject* module = PyImport_ImportModule("feminout.importZ88Mesh"); - if (!module) + if (!module) { return; + } try { Py::Module z88mod(module, true); Py::Object mesh = Py::asObject(new FemMeshPy(const_cast(this))); @@ -2362,11 +2440,11 @@ void FemMesh::writeZ88(const std::string &FileName) const } -void FemMesh::write(const char *FileName) const +void FemMesh::write(const char* FileName) const { Base::FileInfo File(FileName); - if (File.hasExtension("unv") ) { + if (File.hasExtension("unv")) { Base::Console().Log("FEM mesh object will be exported to unv format.\n"); // write UNV file myMesh->ExportUNV(File.filePath().c_str()); @@ -2376,19 +2454,19 @@ void FemMesh::write(const char *FileName) const myMesh->ExportMED(File.filePath().c_str(), File.fileNamePure().c_str(), false, - 2); // 2 means MED_V2_2 version! + 2); // 2 means MED_V2_2 version! } - else if (File.hasExtension("stl") ) { + else if (File.hasExtension("stl")) { Base::Console().Log("FEM mesh object will be exported to stl format.\n"); // export to stl file - myMesh->ExportSTL(File.filePath().c_str(),false); + myMesh->ExportSTL(File.filePath().c_str(), false); } - else if (File.hasExtension("dat") ) { + else if (File.hasExtension("dat")) { Base::Console().Log("FEM mesh object will be exported to dat format.\n"); // export to dat file myMesh->ExportDAT(File.filePath().c_str()); } - else if (File.hasExtension("inp") ) { + else if (File.hasExtension("inp")) { Base::Console().Log("FEM mesh object will be exported to inp format.\n"); // get Abaqus inp prefs ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( @@ -2405,27 +2483,27 @@ void FemMesh::write(const char *FileName) const FemVTKTools::writeVTKMesh(File.filePath().c_str(), this); } #endif - else if (File.hasExtension("z88") ) { + else if (File.hasExtension("z88")) { Base::Console().Log("FEM mesh object will be exported to z88 format.\n"); // write z88 file writeZ88(File.filePath()); } - else{ + else { throw Base::FileException("An unknown file extension was added!"); } } // ==== Base class implementer ============================================================== -unsigned int FemMesh::getMemSize () const +unsigned int FemMesh::getMemSize() const { return 0; } -void FemMesh::Save (Base::Writer &writer) const +void FemMesh::Save(Base::Writer& writer) const { if (!writer.isForceXML()) { - //See SaveDocFile(), RestoreDocFile() + // See SaveDocFile(), RestoreDocFile() writer.Stream() << writer.ind() << "ExportUNV(fi.filePath().c_str()); Base::ifstream file(fi, std::ios::in | std::ios::binary); - if (file){ + if (file) { std::streambuf* buf = file.rdbuf(); writer.Stream() << buf; } @@ -2502,15 +2580,16 @@ void FemMesh::SaveDocFile (Base::Writer &writer) const fi.deleteFile(); } -void FemMesh::RestoreDocFile(Base::Reader &reader) +void FemMesh::RestoreDocFile(Base::Reader& reader) { // create a temporary file and copy the content from the zip stream Base::FileInfo fi(App::Application::getTempFileName().c_str()); // read in the ASCII file and write back to the file stream Base::ofstream file(fi, std::ios::out | std::ios::binary); - if (reader) + if (reader) { reader >> file.rdbuf(); + } file.close(); // read the shape from the temp file @@ -2522,15 +2601,15 @@ void FemMesh::RestoreDocFile(Base::Reader &reader) void FemMesh::transformGeometry(const Base::Matrix4D& rclTrf) { - //We perform a translation and rotation of the current active Mesh object + // We perform a translation and rotation of the current active Mesh object Base::Matrix4D clMatrix(rclTrf); SMDS_NodeIteratorPtr aNodeIter = myMesh->GetMeshDS()->nodesIterator(); Base::Vector3d current_node; - for (;aNodeIter->more();) { + for (; aNodeIter->more();) { const SMDS_MeshNode* aNode = aNodeIter->next(); - current_node.Set(aNode->X(),aNode->Y(),aNode->Z()); + current_node.Set(aNode->X(), aNode->Y(), aNode->Z()); current_node = clMatrix * current_node; - myMesh->GetMeshDS()->MoveNode(aNode,current_node.x,current_node.y,current_node.z); + myMesh->GetMeshDS()->MoveNode(aNode, current_node.x, current_node.y, current_node.z); } } @@ -2552,9 +2631,9 @@ Base::BoundBox3d FemMesh::getBoundBox() const const SMESHDS_Mesh* data = getSMesh()->GetMeshDS(); SMDS_NodeIteratorPtr aNodeIter = data->nodesIterator(); - for (;aNodeIter->more();) { + for (; aNodeIter->more();) { const SMDS_MeshNode* aNode = aNodeIter->next(); - Base::Vector3d vec(aNode->X(),aNode->Y(),aNode->Z()); + Base::Vector3d vec(aNode->X(), aNode->Y(), aNode->Z()); // Apply the matrix to hold the BoundBox in absolute space. vec = _Mtrx * vec; box.Add(vec); @@ -2582,23 +2661,24 @@ unsigned long FemMesh::countSubElements(const char* /*Type*/) const Data::Segment* FemMesh::getSubElement(const char* /*Type*/, unsigned long /*n*/) const { // FIXME implement subelement interface - //std::stringstream str; - //str << Type << n; - //std::string temp = str.str(); - //return new ShapeSegment(getSubShape(temp.c_str())); + // std::stringstream str; + // str << Type << n; + // std::string temp = str.str(); + // return new ShapeSegment(getSubShape(temp.c_str())); return nullptr; } -void FemMesh::getPoints(std::vector &Points, - std::vector & /*Normals*/, - double /*Accuracy*/, uint16_t /*flags*/) const +void FemMesh::getPoints(std::vector& Points, + std::vector& /*Normals*/, + double /*Accuracy*/, + uint16_t /*flags*/) const { const SMESHDS_Mesh* data = getSMesh()->GetMeshDS(); std::vector nodes; nodes.reserve(data->NbNodes()); SMDS_NodeIteratorPtr aNodeIter = data->nodesIterator(); - for (;aNodeIter->more();) { + for (; aNodeIter->more();) { const SMDS_MeshNode* aNode = aNodeIter->next(); nodes.emplace_back(aNode->X(), aNode->Y(), aNode->Z()); } @@ -2606,11 +2686,12 @@ void FemMesh::getPoints(std::vector &Points, Points = transformPointsToOutside(nodes); } -struct Fem::FemMesh::FemMeshInfo FemMesh::getInfo() const{ +struct Fem::FemMesh::FemMeshInfo FemMesh::getInfo() const +{ struct FemMeshInfo rtrn; - const SMESHDS_Mesh* data = getSMesh()->GetMeshDS(); + const SMESHDS_Mesh* data = getSMesh()->GetMeshDS(); const SMDS_MeshInfo& info = data->GetMeshInfo(); rtrn.numFaces = data->NbFaces(); rtrn.numNode = info.NbNodes(); @@ -2625,7 +2706,6 @@ struct Fem::FemMesh::FemMeshInfo FemMesh::getInfo() const{ rtrn.numHedr = info.NbPolyhedrons(); return rtrn; - } // for (unsigned int i = 0; i < all_elements.size(); i++) // { @@ -2647,35 +2727,36 @@ struct Fem::FemMesh::FemMeshInfo FemMesh::getInfo() const{ // ); // } -Base::Quantity FemMesh::getVolume()const +Base::Quantity FemMesh::getVolume() const { SMDS_VolumeIteratorPtr aVolIter = myMesh->GetMeshDS()->volumesIterator(); - //Calculate Mesh Volume - //For an accurate Volume Calculation of a quadratic Tetrahedron - //we have to calculate the Volume of 8 Sub-Tetrahedrons - Base::Vector3d a,b,c,a_b_product; + // Calculate Mesh Volume + // For an accurate Volume Calculation of a quadratic Tetrahedron + // we have to calculate the Volume of 8 Sub-Tetrahedrons + Base::Vector3d a, b, c, a_b_product; double volume = 0.0; - for (;aVolIter->more();) - { + for (; aVolIter->more();) { const SMDS_MeshVolume* aVol = aVolIter->next(); - if ( aVol->NbNodes() != 10 ) continue; + if (aVol->NbNodes() != 10) { + continue; + } - Base::Vector3d v1(aVol->GetNode(1)->X(),aVol->GetNode(1)->Y(),aVol->GetNode(1)->Z()); - Base::Vector3d v0(aVol->GetNode(0)->X(),aVol->GetNode(0)->Y(),aVol->GetNode(0)->Z()); - Base::Vector3d v2(aVol->GetNode(2)->X(),aVol->GetNode(2)->Y(),aVol->GetNode(2)->Z()); - Base::Vector3d v3(aVol->GetNode(3)->X(),aVol->GetNode(3)->Y(),aVol->GetNode(3)->Z()); - Base::Vector3d v4(aVol->GetNode(4)->X(),aVol->GetNode(4)->Y(),aVol->GetNode(4)->Z()); - Base::Vector3d v6(aVol->GetNode(6)->X(),aVol->GetNode(6)->Y(),aVol->GetNode(6)->Z()); - Base::Vector3d v5(aVol->GetNode(5)->X(),aVol->GetNode(5)->Y(),aVol->GetNode(5)->Z()); - Base::Vector3d v8(aVol->GetNode(8)->X(),aVol->GetNode(8)->Y(),aVol->GetNode(8)->Z()); - Base::Vector3d v7(aVol->GetNode(7)->X(),aVol->GetNode(7)->Y(),aVol->GetNode(7)->Z()); - Base::Vector3d v9(aVol->GetNode(9)->X(),aVol->GetNode(9)->Y(),aVol->GetNode(9)->Z()); + Base::Vector3d v1(aVol->GetNode(1)->X(), aVol->GetNode(1)->Y(), aVol->GetNode(1)->Z()); + Base::Vector3d v0(aVol->GetNode(0)->X(), aVol->GetNode(0)->Y(), aVol->GetNode(0)->Z()); + Base::Vector3d v2(aVol->GetNode(2)->X(), aVol->GetNode(2)->Y(), aVol->GetNode(2)->Z()); + Base::Vector3d v3(aVol->GetNode(3)->X(), aVol->GetNode(3)->Y(), aVol->GetNode(3)->Z()); + Base::Vector3d v4(aVol->GetNode(4)->X(), aVol->GetNode(4)->Y(), aVol->GetNode(4)->Z()); + Base::Vector3d v6(aVol->GetNode(6)->X(), aVol->GetNode(6)->Y(), aVol->GetNode(6)->Z()); + Base::Vector3d v5(aVol->GetNode(5)->X(), aVol->GetNode(5)->Y(), aVol->GetNode(5)->Z()); + Base::Vector3d v8(aVol->GetNode(8)->X(), aVol->GetNode(8)->Y(), aVol->GetNode(8)->Z()); + Base::Vector3d v7(aVol->GetNode(7)->X(), aVol->GetNode(7)->Y(), aVol->GetNode(7)->Z()); + Base::Vector3d v9(aVol->GetNode(9)->X(), aVol->GetNode(9)->Y(), aVol->GetNode(9)->Z()); - //1,5,8,7 + // 1,5,8,7 a = v4 - v0; b = v7 - v0; c = v6 - v0; @@ -2684,7 +2765,7 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - //5,9,8,7 + // 5,9,8,7 a = v8 - v4; b = v7 - v4; c = v6 - v4; @@ -2693,7 +2774,7 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - //5,2,9,7 + // 5,2,9,7 a = v1 - v4; b = v8 - v4; c = v6 - v4; @@ -2702,7 +2783,7 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - //2,6,9,7 + // 2,6,9,7 a = v5 - v1; b = v8 - v1; c = v6 - v1; @@ -2711,7 +2792,7 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - //9,6,10,7 + // 9,6,10,7 a = v5 - v8; b = v9 - v8; c = v6 - v8; @@ -2720,7 +2801,7 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - //6,3,10,7 + // 6,3,10,7 a = v2 - v5; b = v9 - v5; c = v6 - v5; @@ -2729,7 +2810,7 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - //8,9,10,7 + // 8,9,10,7 a = v8 - v7; b = v9 - v7; c = v6 - v7; @@ -2738,7 +2819,7 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - //8,9,10,4 + // 8,9,10,4 a = v8 - v7; b = v9 - v7; c = v3 - v7; @@ -2747,12 +2828,9 @@ Base::Quantity FemMesh::getVolume()const a_b_product.z = a.x * b.y - b.x * a.y; volume += 1.0 / 6.0 * fabs((a_b_product.x * c.x) + (a_b_product.y * c.y) + (a_b_product.z * c.z)); - } - return Base::Quantity(volume,Unit::Volume); - - + return Base::Quantity(volume, Unit::Volume); } int FemMesh::addGroup(const std::string TypeString, const std::string Name, const int theId) @@ -2773,19 +2851,21 @@ int FemMesh::addGroup(const std::string TypeString, const std::string Name, cons // check whether typestring is valid bool typeStringValid = false; - for (string_eltype_map::const_iterator it = mapping.begin(); it != mapping.end(); ++it) - { + for (string_eltype_map::const_iterator it = mapping.begin(); it != mapping.end(); ++it) { std::string key = it->first; - if (key == TypeString) + if (key == TypeString) { typeStringValid = true; + } } - if (!typeStringValid) + if (!typeStringValid) { throw std::runtime_error("AddGroup: Invalid type string! Allowed: All, Node, Edge, Face, " "Volume, 0DElement, Ball"); + } // add group to mesh SMESH_Group* group = this->getSMesh()->AddGroup(mapping[TypeString], Name.c_str(), aId); - if (!group) + if (!group) { throw std::runtime_error("AddGroup: Failed to create new group."); + } #if SMESH_VERSION_MAJOR >= 9 return group->GetID(); #else @@ -2813,11 +2893,11 @@ void FemMesh::addGroupElements(int GroupId, const std::set& ElementIds) const SMDS_MeshElement* aElem = aElemIter->next(); std::set::iterator it; it = ElementIds.find(aElem->GetID()); - if (it != ElementIds.end()) - { + if (it != ElementIds.end()) { // the element was in the list - if (!groupDS->Contains(aElem)) // check whether element is already in group - groupDS->Add(aElem); // if not, add it + if (!groupDS->Contains(aElem)) { // check whether element is already in group + groupDS->Add(aElem); // if not, add it + } } } } @@ -2826,4 +2906,3 @@ bool FemMesh::removeGroup(int GroupId) { return this->getSMesh()->RemoveGroup(GroupId); } - diff --git a/src/Mod/Fem/App/FemMesh.h b/src/Mod/Fem/App/FemMesh.h index 568a9af6c0..8c3431a869 100644 --- a/src/Mod/Fem/App/FemMesh.h +++ b/src/Mod/Fem/App/FemMesh.h @@ -27,8 +27,8 @@ #include #include -#include #include +#include #include #include @@ -51,7 +51,7 @@ using SMESH_HypothesisPtr = std::shared_ptr; /** The representation of a FemMesh */ -class FemExport FemMesh : public Data::ComplexGeoData +class FemExport FemMesh: public Data::ComplexGeoData { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -60,20 +60,20 @@ public: FemMesh(const FemMesh&); ~FemMesh() override; - FemMesh &operator=(const FemMesh&); + FemMesh& operator=(const FemMesh&); const SMESH_Mesh* getSMesh() const; SMESH_Mesh* getSMesh(); - static SMESH_Gen * getGenerator(); - void addHypothesis(const TopoDS_Shape & aSubShape, SMESH_HypothesisPtr hyp); + static SMESH_Gen* getGenerator(); + void addHypothesis(const TopoDS_Shape& aSubShape, SMESH_HypothesisPtr hyp); void setStandardHypotheses(); void compute(); // from base class - unsigned int getMemSize () const override; - void Save (Base::Writer &/*writer*/) const override; - void Restore(Base::XMLReader &/*reader*/) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + unsigned int getMemSize() const override; + void Save(Base::Writer& /*writer*/) const override; + void Restore(Base::XMLReader& /*reader*/) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; /** @name Subelement management */ //@{ @@ -86,40 +86,41 @@ public: /// get the subelement by type and number Data::Segment* getSubElement(const char* Type, unsigned long) const override; /** Get points from object with given accuracy */ - void getPoints(std::vector &Points, - std::vector &Normals, - double Accuracy, uint16_t flags=0) const override; + void getPoints(std::vector& Points, + std::vector& Normals, + double Accuracy, + uint16_t flags = 0) const override; //@} /** @name search and retrieval */ //@{ /// retrieving by region growing - std::set getSurfaceNodes(long ElemId, short FaceId, float Angle=360)const; + std::set getSurfaceNodes(long ElemId, short FaceId, float Angle = 360) const; /// retrieving by solid - std::set getNodesBySolid(const TopoDS_Solid &solid) const; + std::set getNodesBySolid(const TopoDS_Solid& solid) const; /// retrieving by face - std::set getNodesByFace(const TopoDS_Face &face) const; + std::set getNodesByFace(const TopoDS_Face& face) const; /// retrieving by edge - std::set getNodesByEdge(const TopoDS_Edge &edge) const; + std::set getNodesByEdge(const TopoDS_Edge& edge) const; /// retrieving by vertex - std::set getNodesByVertex(const TopoDS_Vertex &vertex) const; + std::set getNodesByVertex(const TopoDS_Vertex& vertex) const; /// retrieving node IDs by element ID std::list getElementNodes(int id) const; /// retrieving elements IDs by node ID - std::list getNodeElements(int id, SMDSAbs_ElementType type=SMDSAbs_All) const; + std::list getNodeElements(int id, SMDSAbs_ElementType type = SMDSAbs_All) const; /// retrieving face IDs number by face - std::list getFacesByFace(const TopoDS_Face &face) const; + std::list getFacesByFace(const TopoDS_Face& face) const; /// retrieving edge IDs number by edge - std::list getEdgesByEdge(const TopoDS_Edge &edge) const; + std::list getEdgesByEdge(const TopoDS_Edge& edge) const; /// retrieving volume IDs and face IDs number by face - std::list > getVolumesByFace(const TopoDS_Face &face) const; + std::list> getVolumesByFace(const TopoDS_Face& face) const; /// retrieving volume IDs and CalculiX face number by face - std::map getccxVolumesByFace(const TopoDS_Face &face) const; + std::map getccxVolumesByFace(const TopoDS_Face& face) const; /// retrieving IDs of edges not belonging to any face (and thus not belonging to any volume too) std::set getEdgesOnly() const; /// retrieving IDs of faces not belonging to any volume std::set getFacesOnly() const; - //@} + //@} /** @name Placement control */ //@{ @@ -128,21 +129,21 @@ public: /// get the transformation Base::Matrix4D getTransform() const override; /// Bound box from the shape - Base::BoundBox3d getBoundBox()const override; + Base::BoundBox3d getBoundBox() const override; /// get the volume (when there are volume elements) - Base::Quantity getVolume()const; + Base::Quantity getVolume() const; //@} /** @name Modification */ //@{ /// Applies a transformation on the real geometric data type - void transformGeometry(const Base::Matrix4D &rclMat) override; + void transformGeometry(const Base::Matrix4D& rclMat) override; //@} /** @name Group management */ //@{ /// Adds group to mesh - int addGroup(const std::string, const std::string, const int=-1); + int addGroup(const std::string, const std::string, const int = -1); /// Adds elements to group (int due to int used by raw SMESH functions) void addGroupElements(int, const std::set&); /// Remove group (Name due to similarity to SMESH basis functions) @@ -150,7 +151,8 @@ public: //@} - struct FemMeshInfo { + struct FemMeshInfo + { int numFaces; int numNode; int numTria; @@ -168,28 +170,28 @@ public: struct FemMeshInfo getInfo() const; /// import from files - void read(const char *FileName); - void write(const char *FileName) const; - void writeABAQUS(const std::string &Filename, int elemParam, bool groupParam) const; - void writeZ88(const std::string &FileName) const; + void read(const char* FileName); + void write(const char* FileName) const; + void writeABAQUS(const std::string& Filename, int elemParam, bool groupParam) const; + void writeZ88(const std::string& FileName) const; private: void copyMeshData(const FemMesh&); - void readNastran(const std::string &Filename); - void readNastran95(const std::string &Filename); - void readZ88(const std::string &Filename); - void readAbaqus(const std::string &Filename); + void readNastran(const std::string& Filename); + void readNastran95(const std::string& Filename); + void readZ88(const std::string& Filename); + void readAbaqus(const std::string& Filename); private: /// positioning matrix Base::Matrix4D _Mtrx; - SMESH_Mesh *myMesh; + SMESH_Mesh* myMesh; std::list hypoth; - static SMESH_Gen *_mesh_gen; + static SMESH_Gen* _mesh_gen; }; -} //namespace Part +} // namespace Fem -#endif // FEM_FEMMESH_H +#endif // FEM_FEMMESH_H diff --git a/src/Mod/Fem/App/FemMeshObject.cpp b/src/Mod/Fem/App/FemMeshObject.cpp index c106061a03..43b31db040 100644 --- a/src/Mod/Fem/App/FemMeshObject.cpp +++ b/src/Mod/Fem/App/FemMeshObject.cpp @@ -22,12 +22,12 @@ #include "PreCompiled.h" -#include #include +#include #include -#include "FemMeshObject.h" #include "FemMesh.h" +#include "FemMeshObject.h" using namespace Fem; @@ -38,7 +38,7 @@ PROPERTY_SOURCE(Fem::FemMeshObject, App::GeoFeature) FemMeshObject::FemMeshObject() { - ADD_PROPERTY_TYPE(FemMesh,(), "FEM Mesh",Prop_NoRecompute,"FEM Mesh object"); + ADD_PROPERTY_TYPE(FemMesh, (), "FEM Mesh", Prop_NoRecompute, "FEM Mesh object"); // in the regard of recomputes see: // https://forum.freecad.org/viewtopic.php?f=18&t=33329#p279203 } @@ -50,9 +50,9 @@ short FemMeshObject::mustExecute() const return 0; } -PyObject *FemMeshObject::getPyObject() +PyObject* FemMeshObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 PythonObject = Py::asObject(new GeoFeaturePy(this)); } @@ -67,19 +67,23 @@ void FemMeshObject::onChanged(const Property* prop) if (prop == &this->Placement) { this->FemMesh.setTransform(this->Placement.getValue().toMatrix()); } - } // Python feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Fem::FemMeshObjectPython, Fem::FemMeshObject) -template<> const char* Fem::FemMeshObjectPython::getViewProviderName() const { +template<> +const char* Fem::FemMeshObjectPython::getViewProviderName() const +{ return "FemGui::ViewProviderFemMeshPython"; } -template<> PyObject* Fem::FemMeshObjectPython::getPyObject() { +template<> +PyObject* Fem::FemMeshObjectPython::getPyObject() +{ if (PythonObject.is(Py::_None())) { // ref counter is set to 1 PythonObject = Py::asObject(new App::FeaturePythonPyT(this)); @@ -92,4 +96,4 @@ template class FemExport FeaturePythonT; /// @endcond -} +} // namespace App diff --git a/src/Mod/Fem/App/FemMeshObject.h b/src/Mod/Fem/App/FemMeshObject.h index 5360686d31..97d51b44db 100644 --- a/src/Mod/Fem/App/FemMeshObject.h +++ b/src/Mod/Fem/App/FemMeshObject.h @@ -33,7 +33,7 @@ namespace Fem { -class FemExport FemMeshObject : public App::GeoFeature +class FemExport FemMeshObject: public App::GeoFeature { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemMeshObject); @@ -43,15 +43,18 @@ public: ~FemMeshObject() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemMesh"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; - const App::PropertyComplexGeoData* getPropertyOfGeometry() const override { + PyObject* getPyObject() override; + const App::PropertyComplexGeoData* getPropertyOfGeometry() const override + { return &FemMesh; } @@ -59,13 +62,13 @@ public: protected: /// get called by the container when a property has changed - void onChanged (const App::Property* prop) override; + void onChanged(const App::Property* prop) override; }; using FemMeshObjectPython = App::FeaturePythonT; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemMeshObject_H +#endif // Fem_FemMeshObject_H diff --git a/src/Mod/Fem/App/FemMeshProperty.cpp b/src/Mod/Fem/App/FemMeshProperty.cpp index 84b1f41dff..d4721bc7c3 100644 --- a/src/Mod/Fem/App/FemMeshProperty.cpp +++ b/src/Mod/Fem/App/FemMeshProperty.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -36,11 +36,11 @@ using namespace Fem; -TYPESYSTEM_SOURCE(Fem::PropertyFemMesh , App::PropertyComplexGeoData) +TYPESYSTEM_SOURCE(Fem::PropertyFemMesh, App::PropertyComplexGeoData) -PropertyFemMesh::PropertyFemMesh() : _FemMesh(new FemMesh) -{ -} +PropertyFemMesh::PropertyFemMesh() + : _FemMesh(new FemMesh) +{} PropertyFemMesh::~PropertyFemMesh() = default; @@ -61,7 +61,7 @@ void PropertyFemMesh::setValue(const FemMesh& sh) hasSetValue(); } -const FemMesh &PropertyFemMesh::getValue()const +const FemMesh& PropertyFemMesh::getValue() const { return *_FemMesh; } @@ -76,7 +76,7 @@ Base::BoundBox3d PropertyFemMesh::getBoundingBox() const return _FemMesh->getBoundBox(); } -void PropertyFemMesh::setTransform(const Base::Matrix4D &rclTrf) +void PropertyFemMesh::setTransform(const Base::Matrix4D& rclTrf) { _FemMesh->setTransform(rclTrf); } @@ -86,28 +86,28 @@ Base::Matrix4D PropertyFemMesh::getTransform() const return _FemMesh->getTransform(); } -void PropertyFemMesh::transformGeometry(const Base::Matrix4D &rclMat) +void PropertyFemMesh::transformGeometry(const Base::Matrix4D& rclMat) { aboutToSetValue(); _FemMesh->transformGeometry(rclMat); hasSetValue(); } -PyObject *PropertyFemMesh::getPyObject() +PyObject* PropertyFemMesh::getPyObject() { FemMeshPy* mesh = new FemMeshPy(&*_FemMesh); mesh->setConst(); return mesh; } -void PropertyFemMesh::setPyObject(PyObject *value) +void PropertyFemMesh::setPyObject(PyObject* value) { if (PyObject_TypeCheck(value, &(FemMeshPy::Type))) { - FemMeshPy *pcObject = static_cast(value); + FemMeshPy* pcObject = static_cast(value); setValue(*pcObject->getFemMeshPtr()); } else if (PyObject_TypeCheck(value, &(Base::PlacementPy::Type))) { - Base::PlacementPy *pcObject = static_cast(value); + Base::PlacementPy* pcObject = static_cast(value); transformGeometry(pcObject->getPlacementPtr()->toMatrix()); } else { @@ -117,41 +117,41 @@ void PropertyFemMesh::setPyObject(PyObject *value) } } -App::Property *PropertyFemMesh::Copy() const +App::Property* PropertyFemMesh::Copy() const { - PropertyFemMesh *prop = new PropertyFemMesh(); + PropertyFemMesh* prop = new PropertyFemMesh(); prop->_FemMesh = this->_FemMesh; return prop; } -void PropertyFemMesh::Paste(const App::Property &from) +void PropertyFemMesh::Paste(const App::Property& from) { aboutToSetValue(); _FemMesh = dynamic_cast(from)._FemMesh; hasSetValue(); } -unsigned int PropertyFemMesh::getMemSize () const +unsigned int PropertyFemMesh::getMemSize() const { return _FemMesh->getMemSize(); } -void PropertyFemMesh::Save (Base::Writer &writer) const +void PropertyFemMesh::Save(Base::Writer& writer) const { _FemMesh->Save(writer); } -void PropertyFemMesh::Restore(Base::XMLReader &reader) +void PropertyFemMesh::Restore(Base::XMLReader& reader) { _FemMesh->Restore(reader); } -void PropertyFemMesh::SaveDocFile (Base::Writer &writer) const +void PropertyFemMesh::SaveDocFile(Base::Writer& writer) const { _FemMesh->SaveDocFile(writer); } -void PropertyFemMesh::RestoreDocFile(Base::Reader &reader ) +void PropertyFemMesh::RestoreDocFile(Base::Reader& reader) { aboutToSetValue(); _FemMesh->RestoreDocFile(reader); diff --git a/src/Mod/Fem/App/FemMeshProperty.h b/src/Mod/Fem/App/FemMeshProperty.h index a6d1af5138..84bdb8ff80 100644 --- a/src/Mod/Fem/App/FemMeshProperty.h +++ b/src/Mod/Fem/App/FemMeshProperty.h @@ -35,7 +35,7 @@ namespace Fem /** The part shape property class. * @author Werner Mayer */ -class FemExport PropertyFemMesh : public App::PropertyComplexGeoData +class FemExport PropertyFemMesh: public App::PropertyComplexGeoData { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -49,9 +49,10 @@ public: /// set the FemMesh shape void setValue(const FemMesh&); /// does nothing, for add property macro - void setValue(){} + void setValue() + {} /// get the FemMesh shape - const FemMesh &getValue() const; + const FemMesh& getValue() const; const Data::ComplexGeoData* getComplexData() const override; //@} @@ -64,26 +65,29 @@ public: void setTransform(const Base::Matrix4D& rclTrf) override; /// Get the placement of the geometry Base::Matrix4D getTransform() const override; - void transformGeometry(const Base::Matrix4D &rclMat) override; + void transformGeometry(const Base::Matrix4D& rclMat) override; //@} /** @name Python interface */ //@{ PyObject* getPyObject() override; - void setPyObject(PyObject *value) override; + void setPyObject(PyObject* value) override; //@} /** @name Save/restore */ //@{ - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; - App::Property *Copy() const override; - void Paste(const App::Property &from) override; - unsigned int getMemSize () const override; - const char* getEditorName() const override { return "FemGui::PropertyFemMeshItem"; } + App::Property* Copy() const override; + void Paste(const App::Property& from) override; + unsigned int getMemSize() const override; + const char* getEditorName() const override + { + return "FemGui::PropertyFemMeshItem"; + } //@} private: @@ -91,7 +95,7 @@ private: }; -} //namespace Fem +} // namespace Fem -#endif // PROPERTYTOPOSHAPE_H +#endif // PROPERTYTOPOSHAPE_H diff --git a/src/Mod/Fem/App/FemMeshPyImp.cpp b/src/Mod/Fem/App/FemMeshPyImp.cpp index 38f7899491..0a0d764135 100644 --- a/src/Mod/Fem/App/FemMeshPyImp.cpp +++ b/src/Mod/Fem/App/FemMeshPyImp.cpp @@ -23,35 +23,37 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif +#include "Mod/Fem/App/FemMesh.h" #include #include #include #include -#include #include #include +#include #include #include -#include "Mod/Fem/App/FemMesh.h" +// clang-format off // inclusion of the generated files (generated out of FemMeshPy.xml) #include "FemMeshPy.h" #include "FemMeshPy.cpp" #include "HypothesisPy.h" +// clang-format on using namespace Fem; @@ -64,7 +66,7 @@ std::string FemMeshPy::representation() const return str.str(); } -PyObject *FemMeshPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* FemMeshPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of FemMeshPy and the Twin object return new FemMeshPy(new FemMesh); @@ -73,29 +75,32 @@ PyObject *FemMeshPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Py // constructor method int FemMeshPy::PyInit(PyObject* args, PyObject* /*kwd*/) { - PyObject *pcObj=nullptr; - if (!PyArg_ParseTuple(args, "|O", &pcObj)) + PyObject* pcObj = nullptr; + if (!PyArg_ParseTuple(args, "|O", &pcObj)) { return -1; + } try { // if no mesh is given - if (!pcObj) + if (!pcObj) { return 0; + } if (PyObject_TypeCheck(pcObj, &(FemMeshPy::Type))) { - getFemMeshPtr()->operator= (*static_cast(pcObj)->getFemMeshPtr()); + getFemMeshPtr()->operator=(*static_cast(pcObj)->getFemMeshPtr()); } else { - PyErr_Format(PyExc_TypeError, "Cannot create a FemMesh out of a '%s'", - pcObj->ob_type->tp_name); + PyErr_Format(PyExc_TypeError, + "Cannot create a FemMesh out of a '%s'", + pcObj->ob_type->tp_name); return -1; } } - catch (const Base::Exception &e) { + catch (const Base::Exception& e) { e.setPyException(); return -1; } - catch (const std::exception &e) { - PyErr_SetString(Base::PyExc_FC_GeneralError,e.what()); + catch (const std::exception& e) { + PyErr_SetString(Base::PyExc_FC_GeneralError, e.what()); return -1; } catch (const Py::Exception&) { @@ -108,11 +113,12 @@ int FemMeshPy::PyInit(PyObject* args, PyObject* /*kwd*/) // ===== Methods ============================================================ -PyObject* FemMeshPy::setShape(PyObject *args) +PyObject* FemMeshPy::setShape(PyObject* args) { - PyObject *pcObj; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapePy::Type), &pcObj)) + PyObject* pcObj; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapePy::Type), &pcObj)) { return nullptr; + } try { TopoDS_Shape shape = static_cast(pcObj)->getTopoShapePtr()->getShape(); @@ -125,20 +131,23 @@ PyObject* FemMeshPy::setShape(PyObject *args) Py_Return; } -PyObject* FemMeshPy::addHypothesis(PyObject *args) +PyObject* FemMeshPy::addHypothesis(PyObject* args) { PyObject* hyp; PyObject* shp = nullptr; // Since we have not a common base class for the Python binding of the // hypotheses classes we cannot pass a certain Python type - if (!PyArg_ParseTuple(args, "O|O!",&hyp, &(Part::TopoShapePy::Type), &shp)) + if (!PyArg_ParseTuple(args, "O|O!", &hyp, &(Part::TopoShapePy::Type), &shp)) { return nullptr; + } TopoDS_Shape shape; - if (!shp) + if (!shp) { shape = getFemMeshPtr()->getSMesh()->GetShapeToMesh(); - else + } + else { shape = static_cast(shp)->getTopoShapePtr()->getShape(); + } try { Py::Object obj(hyp); @@ -156,10 +165,11 @@ PyObject* FemMeshPy::addHypothesis(PyObject *args) Py_Return; } -PyObject* FemMeshPy::setStandardHypotheses(PyObject *args) +PyObject* FemMeshPy::setStandardHypotheses(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { getFemMeshPtr()->setStandardHypotheses(); @@ -171,10 +181,11 @@ PyObject* FemMeshPy::setStandardHypotheses(PyObject *args) Py_Return; } -PyObject* FemMeshPy::compute(PyObject *args) +PyObject* FemMeshPy::compute(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { getFemMeshPtr()->compute(); @@ -186,17 +197,18 @@ PyObject* FemMeshPy::compute(PyObject *args) Py_Return; } -PyObject* FemMeshPy::addNode(PyObject *args) +PyObject* FemMeshPy::addNode(PyObject* args) { - double x,y,z; + double x, y, z; int i = -1; - if (PyArg_ParseTuple(args, "ddd",&x,&y,&z)){ + if (PyArg_ParseTuple(args, "ddd", &x, &y, &z)) { try { SMESH_Mesh* mesh = getFemMeshPtr()->getSMesh(); SMESHDS_Mesh* meshDS = mesh->GetMeshDS(); - SMDS_MeshNode* node = meshDS->AddNode(x,y,z); - if (!node) + SMDS_MeshNode* node = meshDS->AddNode(x, y, z); + if (!node) { throw std::runtime_error("Failed to add node"); + } return Py::new_reference_to(Py::Long(node->GetID())); } catch (const std::exception& e) { @@ -206,13 +218,14 @@ PyObject* FemMeshPy::addNode(PyObject *args) } PyErr_Clear(); - if (PyArg_ParseTuple(args, "dddi",&x,&y,&z,&i)){ + if (PyArg_ParseTuple(args, "dddi", &x, &y, &z, &i)) { try { SMESH_Mesh* mesh = getFemMeshPtr()->getSMesh(); SMESHDS_Mesh* meshDS = mesh->GetMeshDS(); - SMDS_MeshNode* node = meshDS->AddNodeWithID(x,y,z,i); - if (!node) + SMDS_MeshNode* node = meshDS->AddNodeWithID(x, y, z, i); + if (!node) { throw std::runtime_error("Failed to add node"); + } return Py::new_reference_to(Py::Long(node->GetID())); } catch (const std::exception& e) { @@ -220,27 +233,30 @@ PyObject* FemMeshPy::addNode(PyObject *args) return nullptr; } } - PyErr_SetString(PyExc_TypeError, "addNode() accepts:\n" - "-- addNode(x,y,z)\n" - "-- addNode(x,y,z,ElemId)\n"); + PyErr_SetString(PyExc_TypeError, + "addNode() accepts:\n" + "-- addNode(x,y,z)\n" + "-- addNode(x,y,z,ElemId)\n"); return nullptr; } -PyObject* FemMeshPy::addEdge(PyObject *args) +PyObject* FemMeshPy::addEdge(PyObject* args) { SMESH_Mesh* mesh = getFemMeshPtr()->getSMesh(); SMESHDS_Mesh* meshDS = mesh->GetMeshDS(); - int n1,n2; - if (PyArg_ParseTuple(args, "ii",&n1,&n2)) { + int n1, n2; + if (PyArg_ParseTuple(args, "ii", &n1, &n2)) { try { const SMDS_MeshNode* node1 = meshDS->FindNode(n1); const SMDS_MeshNode* node2 = meshDS->FindNode(n2); - if (!node1 || !node2) + if (!node1 || !node2) { throw std::runtime_error("Failed to get node of the given indices"); + } SMDS_MeshEdge* edge = meshDS->AddEdge(node1, node2); - if (!edge) + if (!edge) { throw std::runtime_error("Failed to add edge"); + } return Py::new_reference_to(Py::Long(edge->GetID())); } catch (const std::exception& e) { @@ -250,79 +266,87 @@ PyObject* FemMeshPy::addEdge(PyObject *args) } PyErr_Clear(); - PyObject *obj; - int ElementId=-1; - if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) - { + PyObject* obj; + int ElementId = -1; + if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) { Py::List list(obj); std::vector Nodes; for (Py::List::iterator it = list.begin(); it != list.end(); ++it) { Py::Long NoNr(*it); const SMDS_MeshNode* node = meshDS->FindNode(NoNr); - if (!node) + if (!node) { throw std::runtime_error("Failed to get node of the given indices"); + } Nodes.push_back(node); } - SMDS_MeshEdge* edge=nullptr; - if(ElementId != -1) { - switch(Nodes.size()){ + SMDS_MeshEdge* edge = nullptr; + if (ElementId != -1) { + switch (Nodes.size()) { case 2: - edge = meshDS->AddEdgeWithID(Nodes[0],Nodes[1],ElementId); - if (!edge) + edge = meshDS->AddEdgeWithID(Nodes[0], Nodes[1], ElementId); + if (!edge) { throw std::runtime_error("Failed to add edge with given ElementId"); + } break; case 3: - edge = meshDS->AddEdgeWithID(Nodes[0],Nodes[1],Nodes[2],ElementId); - if (!edge) + edge = meshDS->AddEdgeWithID(Nodes[0], Nodes[1], Nodes[2], ElementId); + if (!edge) { throw std::runtime_error("Failed to add edge with given ElementId"); + } break; default: - throw std::runtime_error("Unknown node count, [2|3] are allowed"); //unknown edge type + throw std::runtime_error( + "Unknown node count, [2|3] are allowed"); // unknown edge type } } else { - switch(Nodes.size()){ - case 2: - edge = meshDS->AddEdge(Nodes[0],Nodes[1]); - if (!edge) - throw std::runtime_error("Failed to add edge"); - break; - case 3: - edge = meshDS->AddEdge(Nodes[0],Nodes[1],Nodes[2]); - if (!edge) - throw std::runtime_error("Failed to add edge"); - break; - default: - throw std::runtime_error("Unknown node count, [2|3] are allowed"); //unknown edge type + switch (Nodes.size()) { + case 2: + edge = meshDS->AddEdge(Nodes[0], Nodes[1]); + if (!edge) { + throw std::runtime_error("Failed to add edge"); + } + break; + case 3: + edge = meshDS->AddEdge(Nodes[0], Nodes[1], Nodes[2]); + if (!edge) { + throw std::runtime_error("Failed to add edge"); + } + break; + default: + throw std::runtime_error( + "Unknown node count, [2|3] are allowed"); // unknown edge type } } return Py::new_reference_to(Py::Long(edge->GetID())); } - PyErr_SetString(PyExc_TypeError, "addEdge accepts:\n" - "-- int,int\n" - "-- [2|3],[int]\n"); + PyErr_SetString(PyExc_TypeError, + "addEdge accepts:\n" + "-- int,int\n" + "-- [2|3],[int]\n"); return nullptr; } -PyObject* FemMeshPy::addFace(PyObject *args) +PyObject* FemMeshPy::addFace(PyObject* args) { SMESH_Mesh* mesh = getFemMeshPtr()->getSMesh(); SMESHDS_Mesh* meshDS = mesh->GetMeshDS(); - int n1,n2,n3; - if (PyArg_ParseTuple(args, "iii",&n1,&n2,&n3)) - { + int n1, n2, n3; + if (PyArg_ParseTuple(args, "iii", &n1, &n2, &n3)) { // old form, deprecated try { const SMDS_MeshNode* node1 = meshDS->FindNode(n1); const SMDS_MeshNode* node2 = meshDS->FindNode(n2); const SMDS_MeshNode* node3 = meshDS->FindNode(n3); - if (!node1 || !node2 || !node3) + if (!node1 || !node2 || !node3) { throw std::runtime_error("Failed to get node of the given indices"); + } SMDS_MeshFace* face = meshDS->AddFace(node1, node2, node3); - if (!face) + if (!face) { throw std::runtime_error("Failed to add face"); + } return Py::new_reference_to(Py::Long(face->GetID())); } catch (const std::exception& e) { @@ -332,87 +356,122 @@ PyObject* FemMeshPy::addFace(PyObject *args) } PyErr_Clear(); - PyObject *obj; - int ElementId=-1; - if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) - { + PyObject* obj; + int ElementId = -1; + if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) { Py::List list(obj); std::vector Nodes; for (Py::List::iterator it = list.begin(); it != list.end(); ++it) { Py::Long NoNr(*it); const SMDS_MeshNode* node = meshDS->FindNode(NoNr); - if (!node) + if (!node) { throw std::runtime_error("Failed to get node of the given indices"); + } Nodes.push_back(node); } - SMDS_MeshFace* face=nullptr; - if(ElementId != -1) { - switch(Nodes.size()){ + SMDS_MeshFace* face = nullptr; + if (ElementId != -1) { + switch (Nodes.size()) { case 3: - face = meshDS->AddFaceWithID(Nodes[0],Nodes[1],Nodes[2],ElementId); - if (!face) - throw std::runtime_error("Failed to add triangular face with given ElementId"); + face = meshDS->AddFaceWithID(Nodes[0], Nodes[1], Nodes[2], ElementId); + if (!face) { + throw std::runtime_error( + "Failed to add triangular face with given ElementId"); + } break; case 4: - face = meshDS->AddFaceWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],ElementId); - if (!face) + face = meshDS->AddFaceWithID(Nodes[0], Nodes[1], Nodes[2], Nodes[3], ElementId); + if (!face) { throw std::runtime_error("Failed to add face with given ElementId"); + } break; case 6: - face = meshDS->AddFaceWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],ElementId); - if (!face) + face = meshDS->AddFaceWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + ElementId); + if (!face) { throw std::runtime_error("Failed to add face with given ElementId"); + } break; case 8: - face = meshDS->AddFaceWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],ElementId); - if (!face) + face = meshDS->AddFaceWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + ElementId); + if (!face) { throw std::runtime_error("Failed to add face with given ElementId"); + } break; default: - throw std::runtime_error("Unknown node count, [3|4|6|8] are allowed"); //unknown face type + throw std::runtime_error( + "Unknown node count, [3|4|6|8] are allowed"); // unknown face type } - }else{ - switch(Nodes.size()){ + } + else { + switch (Nodes.size()) { case 3: - face = meshDS->AddFace(Nodes[0],Nodes[1],Nodes[2]); - if (!face) + face = meshDS->AddFace(Nodes[0], Nodes[1], Nodes[2]); + if (!face) { throw std::runtime_error("Failed to add triangular face"); + } break; case 4: - face = meshDS->AddFace(Nodes[0],Nodes[1],Nodes[2],Nodes[3]); - if (!face) + face = meshDS->AddFace(Nodes[0], Nodes[1], Nodes[2], Nodes[3]); + if (!face) { throw std::runtime_error("Failed to add face"); + } break; case 6: - face = meshDS->AddFace(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5]); - if (!face) + face = + meshDS->AddFace(Nodes[0], Nodes[1], Nodes[2], Nodes[3], Nodes[4], Nodes[5]); + if (!face) { throw std::runtime_error("Failed to add face"); + } break; case 8: - face = meshDS->AddFace(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7]); - if (!face) + face = meshDS->AddFace(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7]); + if (!face) { throw std::runtime_error("Failed to add face"); + } break; default: - throw std::runtime_error("Unknown node count, [4|5|6|8] are allowed"); //unknown face type + throw std::runtime_error( + "Unknown node count, [4|5|6|8] are allowed"); // unknown face type } } return Py::new_reference_to(Py::Long(face->GetID())); - } - PyErr_SetString(PyExc_TypeError, "addFace accepts:\n" - "-- int,int,int\n" - "-- [3|4|6|8 int],[int]\n"); + PyErr_SetString(PyExc_TypeError, + "addFace accepts:\n" + "-- int,int,int\n" + "-- [3|4|6|8 int],[int]\n"); return nullptr; } -PyObject* FemMeshPy::addQuad(PyObject *args) +PyObject* FemMeshPy::addQuad(PyObject* args) { - int n1,n2,n3,n4; - if (!PyArg_ParseTuple(args, "iiii",&n1,&n2,&n3,&n4)) + int n1, n2, n3, n4; + if (!PyArg_ParseTuple(args, "iiii", &n1, &n2, &n3, &n4)) { return nullptr; + } try { SMESH_Mesh* mesh = getFemMeshPtr()->getSMesh(); @@ -421,11 +480,13 @@ PyObject* FemMeshPy::addQuad(PyObject *args) const SMDS_MeshNode* node2 = meshDS->FindNode(n2); const SMDS_MeshNode* node3 = meshDS->FindNode(n3); const SMDS_MeshNode* node4 = meshDS->FindNode(n4); - if (!node1 || !node2 || !node3 || !node4) + if (!node1 || !node2 || !node3 || !node4) { throw std::runtime_error("Failed to get node of the given indices"); + } SMDS_MeshFace* face = meshDS->AddFace(node1, node2, node3, node4); - if (!face) + if (!face) { throw std::runtime_error("Failed to add quad"); + } return Py::new_reference_to(Py::Long(face->GetID())); } catch (const std::exception& e) { @@ -434,24 +495,25 @@ PyObject* FemMeshPy::addQuad(PyObject *args) } } -PyObject* FemMeshPy::addVolume(PyObject *args) +PyObject* FemMeshPy::addVolume(PyObject* args) { SMESH_Mesh* mesh = getFemMeshPtr()->getSMesh(); SMESHDS_Mesh* meshDS = mesh->GetMeshDS(); - int n1,n2,n3,n4; - if (PyArg_ParseTuple(args, "iiii",&n1,&n2,&n3,&n4)) - { + int n1, n2, n3, n4; + if (PyArg_ParseTuple(args, "iiii", &n1, &n2, &n3, &n4)) { try { const SMDS_MeshNode* node1 = meshDS->FindNode(n1); const SMDS_MeshNode* node2 = meshDS->FindNode(n2); const SMDS_MeshNode* node3 = meshDS->FindNode(n3); const SMDS_MeshNode* node4 = meshDS->FindNode(n4); - if (!node1 || !node2 || !node3 || !node4) + if (!node1 || !node2 || !node3 || !node4) { throw std::runtime_error("Failed to get node of the given indices"); + } SMDS_MeshVolume* vol = meshDS->AddVolume(node1, node2, node3, node4); - if (!vol) + if (!vol) { throw std::runtime_error("Failed to add volume"); + } return Py::new_reference_to(Py::Long(vol->GetID())); } catch (const std::exception& e) { @@ -461,134 +523,307 @@ PyObject* FemMeshPy::addVolume(PyObject *args) } PyErr_Clear(); - PyObject *obj; - int ElementId=-1; - if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) - { + PyObject* obj; + int ElementId = -1; + if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) { Py::List list(obj); std::vector Nodes; for (Py::List::iterator it = list.begin(); it != list.end(); ++it) { Py::Long NoNr(*it); const SMDS_MeshNode* node = meshDS->FindNode(NoNr); - if (!node) + if (!node) { throw std::runtime_error("Failed to get node of the given indices"); + } Nodes.push_back(node); } - SMDS_MeshVolume* vol=nullptr; - if(ElementId != -1) { - switch(Nodes.size()){ + SMDS_MeshVolume* vol = nullptr; + if (ElementId != -1) { + switch (Nodes.size()) { case 4: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],ElementId); - if (!vol) + vol = + meshDS->AddVolumeWithID(Nodes[0], Nodes[1], Nodes[2], Nodes[3], ElementId); + if (!vol) { throw std::runtime_error("Failed to add Tet4 volume with given ElementId"); + } break; case 5: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],ElementId); - if (!vol) + vol = meshDS->AddVolumeWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + ElementId); + if (!vol) { throw std::runtime_error("Failed to add Pyra5 volume with given ElementId"); + } break; case 6: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],ElementId); - if (!vol) - throw std::runtime_error("Failed to add Penta6 volume with given ElementId"); + vol = meshDS->AddVolumeWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + ElementId); + if (!vol) { + throw std::runtime_error( + "Failed to add Penta6 volume with given ElementId"); + } break; case 8: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],ElementId); - if (!vol) + vol = meshDS->AddVolumeWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + ElementId); + if (!vol) { throw std::runtime_error("Failed to add Hexa8 volume with given ElementId"); + } break; case 10: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9],ElementId); - if (!vol) + vol = meshDS->AddVolumeWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9], + ElementId); + if (!vol) { throw std::runtime_error("Failed to add Tet10 volume with given ElementId"); + } break; case 13: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9],Nodes[10],Nodes[11],Nodes[12],ElementId); - if (!vol) - throw std::runtime_error("Failed to add Pyra13 volume with given ElementId"); + vol = meshDS->AddVolumeWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9], + Nodes[10], + Nodes[11], + Nodes[12], + ElementId); + if (!vol) { + throw std::runtime_error( + "Failed to add Pyra13 volume with given ElementId"); + } break; case 15: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9],Nodes[10],Nodes[11],Nodes[12],Nodes[13],Nodes[14],ElementId); - if (!vol) - throw std::runtime_error("Failed to add Penta15 volume with given ElementId"); + vol = meshDS->AddVolumeWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9], + Nodes[10], + Nodes[11], + Nodes[12], + Nodes[13], + Nodes[14], + ElementId); + if (!vol) { + throw std::runtime_error( + "Failed to add Penta15 volume with given ElementId"); + } break; case 20: - vol = meshDS->AddVolumeWithID(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9],Nodes[10],Nodes[11],Nodes[12],Nodes[13],Nodes[14],Nodes[15],Nodes[16],Nodes[17],Nodes[18],Nodes[19],ElementId); - if (!vol) - throw std::runtime_error("Failed to add Hexa20 volume with given ElementId"); + vol = meshDS->AddVolumeWithID(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9], + Nodes[10], + Nodes[11], + Nodes[12], + Nodes[13], + Nodes[14], + Nodes[15], + Nodes[16], + Nodes[17], + Nodes[18], + Nodes[19], + ElementId); + if (!vol) { + throw std::runtime_error( + "Failed to add Hexa20 volume with given ElementId"); + } break; - default: throw std::runtime_error("Unknown node count, [4|5|6|8|10|13|15|20] are allowed"); //unknown volume type + default: + throw std::runtime_error( + "Unknown node count, [4|5|6|8|10|13|15|20] are allowed"); // unknown volume + // type } - }else{ - switch(Nodes.size()){ + } + else { + switch (Nodes.size()) { case 4: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], Nodes[1], Nodes[2], Nodes[3]); + if (!vol) { throw std::runtime_error("Failed to add Tet4 volume"); + } break; case 5: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], Nodes[1], Nodes[2], Nodes[3], Nodes[4]); + if (!vol) { throw std::runtime_error("Failed to add Pyra5 volume"); + } break; case 6: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5]); + if (!vol) { throw std::runtime_error("Failed to add Penta6 volume"); + } break; case 8: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7]); + if (!vol) { throw std::runtime_error("Failed to add Hexa8 volume"); + } break; case 10: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9]); + if (!vol) { throw std::runtime_error("Failed to add Tet10 volume"); + } break; case 13: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9],Nodes[10],Nodes[11],Nodes[12]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9], + Nodes[10], + Nodes[11], + Nodes[12]); + if (!vol) { throw std::runtime_error("Failed to add Pyra13 volume"); + } break; case 15: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9],Nodes[10],Nodes[11],Nodes[12],Nodes[13],Nodes[14]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9], + Nodes[10], + Nodes[11], + Nodes[12], + Nodes[13], + Nodes[14]); + if (!vol) { throw std::runtime_error("Failed to add Penta15 volume"); + } break; case 20: - vol = meshDS->AddVolume(Nodes[0],Nodes[1],Nodes[2],Nodes[3],Nodes[4],Nodes[5],Nodes[6],Nodes[7],Nodes[8],Nodes[9],Nodes[10],Nodes[11],Nodes[12],Nodes[13],Nodes[14],Nodes[15],Nodes[16],Nodes[17],Nodes[18],Nodes[19]); - if (!vol) + vol = meshDS->AddVolume(Nodes[0], + Nodes[1], + Nodes[2], + Nodes[3], + Nodes[4], + Nodes[5], + Nodes[6], + Nodes[7], + Nodes[8], + Nodes[9], + Nodes[10], + Nodes[11], + Nodes[12], + Nodes[13], + Nodes[14], + Nodes[15], + Nodes[16], + Nodes[17], + Nodes[18], + Nodes[19]); + if (!vol) { throw std::runtime_error("Failed to add Hexa20 volume"); + } break; - default: throw std::runtime_error("Unknown node count, [4|5|6|8|10|13|15|20] are allowed"); //unknown volume type + default: + throw std::runtime_error( + "Unknown node count, [4|5|6|8|10|13|15|20] are allowed"); // unknown volume + // type } } return Py::new_reference_to(Py::Long(vol->GetID())); - } - PyErr_SetString(PyExc_TypeError, "addVolume accepts:\n" - "-- int,int,int,int\n" - "-- [4|5|6|8|10|13|15|20 int],[int]\n"); + PyErr_SetString(PyExc_TypeError, + "addVolume accepts:\n" + "-- int,int,int,int\n" + "-- [4|5|6|8|10|13|15|20 int],[int]\n"); return nullptr; } -PyObject* FemMeshPy::copy(PyObject *args) +PyObject* FemMeshPy::copy(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } const FemMesh& mesh = *getFemMeshPtr(); return new FemMeshPy(new FemMesh(mesh)); } -PyObject* FemMeshPy::read(PyObject *args) +PyObject* FemMeshPy::read(PyObject* args) { char* Name; - if (!PyArg_ParseTuple(args, "et","utf-8",&Name)) + if (!PyArg_ParseTuple(args, "et", "utf-8", &Name)) { return nullptr; + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -602,11 +837,12 @@ PyObject* FemMeshPy::read(PyObject *args) Py_Return; } -PyObject* FemMeshPy::write(PyObject *args) +PyObject* FemMeshPy::write(PyObject* args) { char* Name; - if (!PyArg_ParseTuple(args, "et","utf-8",&Name)) + if (!PyArg_ParseTuple(args, "et", "utf-8", &Name)) { return nullptr; + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -620,13 +856,14 @@ PyObject* FemMeshPy::write(PyObject *args) Py_Return; } -PyObject* FemMeshPy::writeABAQUS(PyObject *args) +PyObject* FemMeshPy::writeABAQUS(PyObject* args) { char* Name; int elemParam; PyObject* groupParam; - if (!PyArg_ParseTuple(args, "etiO!","utf-8",&Name,&elemParam,&PyBool_Type,&groupParam)) + if (!PyArg_ParseTuple(args, "etiO!", "utf-8", &Name, &elemParam, &PyBool_Type, &groupParam)) { return nullptr; + } std::string EncodedName = std::string(Name); PyMem_Free(Name); bool grpParam = Base::asBoolean(groupParam); @@ -641,11 +878,12 @@ PyObject* FemMeshPy::writeABAQUS(PyObject *args) Py_Return; } -PyObject* FemMeshPy::setTransform(PyObject *args) +PyObject* FemMeshPy::setTransform(PyObject* args) { PyObject* ptr; - if (!PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &ptr)) + if (!PyArg_ParseTuple(args, "O!", &(Base::PlacementPy::Type), &ptr)) { return nullptr; + } Base::Placement* placement = static_cast(ptr)->getPlacementPtr(); Base::Matrix4D mat = placement->toMatrix(); @@ -654,14 +892,16 @@ PyObject* FemMeshPy::setTransform(PyObject *args) } -PyObject* FemMeshPy::getFacesByFace(PyObject *args) +PyObject* FemMeshPy::getFacesByFace(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Face is empty"); return nullptr; @@ -671,7 +911,7 @@ PyObject* FemMeshPy::getFacesByFace(PyObject *args) Py::List ret; std::list resultSet = getFemMeshPtr()->getFacesByFace(fc); - for (std::list::const_iterator it = resultSet.begin();it!=resultSet.end();++it) { + for (std::list::const_iterator it = resultSet.begin(); it != resultSet.end(); ++it) { ret.append(Py::Long(*it)); } @@ -684,14 +924,16 @@ PyObject* FemMeshPy::getFacesByFace(PyObject *args) } -PyObject* FemMeshPy::getEdgesByEdge(PyObject *args) +PyObject* FemMeshPy::getEdgesByEdge(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeEdgePy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeEdgePy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Edge is empty"); return nullptr; @@ -701,7 +943,7 @@ PyObject* FemMeshPy::getEdgesByEdge(PyObject *args) Py::List ret; std::list resultSet = getFemMeshPtr()->getEdgesByEdge(fc); - for (std::list::const_iterator it = resultSet.begin();it!=resultSet.end();++it) { + for (std::list::const_iterator it = resultSet.begin(); it != resultSet.end(); ++it) { ret.append(Py::Long(*it)); } @@ -713,14 +955,16 @@ PyObject* FemMeshPy::getEdgesByEdge(PyObject *args) } } -PyObject* FemMeshPy::getVolumesByFace(PyObject *args) +PyObject* FemMeshPy::getVolumesByFace(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Face is empty"); return nullptr; @@ -729,8 +973,10 @@ PyObject* FemMeshPy::getVolumesByFace(PyObject *args) const TopoDS_Face& fc = TopoDS::Face(sh); Py::List ret; - std::list > resultSet = getFemMeshPtr()->getVolumesByFace(fc); - for (std::list >::const_iterator it = resultSet.begin();it!=resultSet.end();++it) { + std::list> resultSet = getFemMeshPtr()->getVolumesByFace(fc); + for (std::list>::const_iterator it = resultSet.begin(); + it != resultSet.end(); + ++it) { Py::Tuple vol_face(2); vol_face.setItem(0, Py::Long(it->first)); vol_face.setItem(1, Py::Long(it->second)); @@ -745,14 +991,16 @@ PyObject* FemMeshPy::getVolumesByFace(PyObject *args) } } -PyObject* FemMeshPy::getccxVolumesByFace(PyObject *args) +PyObject* FemMeshPy::getccxVolumesByFace(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Face is empty"); return nullptr; @@ -762,7 +1010,8 @@ PyObject* FemMeshPy::getccxVolumesByFace(PyObject *args) Py::List ret; std::map resultSet = getFemMeshPtr()->getccxVolumesByFace(fc); - for (std::map::const_iterator it = resultSet.begin();it!=resultSet.end();++it) { + for (std::map::const_iterator it = resultSet.begin(); it != resultSet.end(); + ++it) { Py::Tuple vol_face(2); vol_face.setItem(0, Py::Long(it->first)); vol_face.setItem(1, Py::Long(it->second)); @@ -777,33 +1026,37 @@ PyObject* FemMeshPy::getccxVolumesByFace(PyObject *args) } } -PyObject* FemMeshPy::getNodeById(PyObject *args) +PyObject* FemMeshPy::getNodeById(PyObject* args) { int id; - if (!PyArg_ParseTuple(args, "i", &id)) + if (!PyArg_ParseTuple(args, "i", &id)) { return nullptr; + } Base::Matrix4D Mtrx = getFemMeshPtr()->getTransform(); const SMDS_MeshNode* aNode = getFemMeshPtr()->getSMesh()->GetMeshDS()->FindNode(id); - if(aNode){ - Base::Vector3d vec(aNode->X(),aNode->Y(),aNode->Z()); + if (aNode) { + Base::Vector3d vec(aNode->X(), aNode->Y(), aNode->Z()); vec = Mtrx * vec; - return new Base::VectorPy( vec ); - }else{ + return new Base::VectorPy(vec); + } + else { PyErr_SetString(PyExc_ValueError, "No valid node ID"); return nullptr; } } -PyObject* FemMeshPy::getNodesBySolid(PyObject *args) +PyObject* FemMeshPy::getNodesBySolid(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeSolidPy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeSolidPy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); const TopoDS_Solid& fc = TopoDS::Solid(sh); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Solid is empty"); @@ -811,11 +1064,11 @@ PyObject* FemMeshPy::getNodesBySolid(PyObject *args) } Py::List ret; std::set resultSet = getFemMeshPtr()->getNodesBySolid(fc); - for (int it : resultSet) + for (int it : resultSet) { ret.append(Py::Long(it)); + } return Py::new_reference_to(ret); - } catch (Standard_Failure& e) { PyErr_SetString(Base::PyExc_FC_CADKernelError, e.GetMessageString()); @@ -823,14 +1076,16 @@ PyObject* FemMeshPy::getNodesBySolid(PyObject *args) } } -PyObject* FemMeshPy::getNodesByFace(PyObject *args) +PyObject* FemMeshPy::getNodesByFace(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeFacePy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); const TopoDS_Face& fc = TopoDS::Face(sh); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Face is empty"); @@ -838,11 +1093,11 @@ PyObject* FemMeshPy::getNodesByFace(PyObject *args) } Py::List ret; std::set resultSet = getFemMeshPtr()->getNodesByFace(fc); - for (int it : resultSet) + for (int it : resultSet) { ret.append(Py::Long(it)); + } return Py::new_reference_to(ret); - } catch (Standard_Failure& e) { PyErr_SetString(Base::PyExc_FC_CADKernelError, e.GetMessageString()); @@ -850,14 +1105,16 @@ PyObject* FemMeshPy::getNodesByFace(PyObject *args) } } -PyObject* FemMeshPy::getNodesByEdge(PyObject *args) +PyObject* FemMeshPy::getNodesByEdge(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeEdgePy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeEdgePy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); const TopoDS_Edge& fc = TopoDS::Edge(sh); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Edge is empty"); @@ -865,11 +1122,11 @@ PyObject* FemMeshPy::getNodesByEdge(PyObject *args) } Py::List ret; std::set resultSet = getFemMeshPtr()->getNodesByEdge(fc); - for (int it : resultSet) + for (int it : resultSet) { ret.append(Py::Long(it)); + } return Py::new_reference_to(ret); - } catch (Standard_Failure& e) { PyErr_SetString(Base::PyExc_FC_CADKernelError, e.GetMessageString()); @@ -877,14 +1134,16 @@ PyObject* FemMeshPy::getNodesByEdge(PyObject *args) } } -PyObject* FemMeshPy::getNodesByVertex(PyObject *args) +PyObject* FemMeshPy::getNodesByVertex(PyObject* args) { - PyObject *pW; - if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeVertexPy::Type), &pW)) - return nullptr; + PyObject* pW; + if (!PyArg_ParseTuple(args, "O!", &(Part::TopoShapeVertexPy::Type), &pW)) { + return nullptr; + } try { - const TopoDS_Shape& sh = static_cast(pW)->getTopoShapePtr()->getShape(); + const TopoDS_Shape& sh = + static_cast(pW)->getTopoShapePtr()->getShape(); const TopoDS_Vertex& fc = TopoDS::Vertex(sh); if (sh.IsNull()) { PyErr_SetString(PyExc_ValueError, "Vertex is empty"); @@ -892,11 +1151,11 @@ PyObject* FemMeshPy::getNodesByVertex(PyObject *args) } Py::List ret; std::set resultSet = getFemMeshPtr()->getNodesByVertex(fc); - for (int it : resultSet) + for (int it : resultSet) { ret.append(Py::Long(it)); + } return Py::new_reference_to(ret); - } catch (Standard_Failure& e) { PyErr_SetString(Base::PyExc_FC_CADKernelError, e.GetMessageString()); @@ -904,18 +1163,20 @@ PyObject* FemMeshPy::getNodesByVertex(PyObject *args) } } -PyObject* FemMeshPy::getElementNodes(PyObject *args) +PyObject* FemMeshPy::getElementNodes(PyObject* args) { int id; - if (!PyArg_ParseTuple(args, "i", &id)) - return nullptr; + if (!PyArg_ParseTuple(args, "i", &id)) { + return nullptr; + } try { std::list resultSet = getFemMeshPtr()->getElementNodes(id); Py::Tuple ret(resultSet.size()); int index = 0; - for (std::list::const_iterator it = resultSet.begin();it!=resultSet.end();++it) + for (std::list::const_iterator it = resultSet.begin(); it != resultSet.end(); ++it) { ret.setItem(index++, Py::Long(*it)); + } return Py::new_reference_to(ret); } @@ -941,8 +1202,9 @@ PyObject* FemMeshPy::getNodeElements(PyObject* args) { int id; const char* typeStr = "All"; - if (!PyArg_ParseTuple(args, "i|s", &id, &typeStr)) + if (!PyArg_ParseTuple(args, "i|s", &id, &typeStr)) { return nullptr; + } auto it = std::find_if(vecTypeName.begin(), vecTypeName.end(), [=](const pairStrElemType& x) { return x.first == typeStr; @@ -964,11 +1226,12 @@ PyObject* FemMeshPy::getNodeElements(PyObject* args) return Py::new_reference_to(result); } -PyObject* FemMeshPy::getGroupName(PyObject *args) +PyObject* FemMeshPy::getGroupName(PyObject* args) { int id; - if (!PyArg_ParseTuple(args, "i", &id)) - return nullptr; + if (!PyArg_ParseTuple(args, "i", &id)) { + return nullptr; + } SMESH_Group* group = getFemMeshPtr()->getSMesh()->GetGroup(id); if (!group) { @@ -978,11 +1241,12 @@ PyObject* FemMeshPy::getGroupName(PyObject *args) return PyUnicode_FromString(group->GetName()); } -PyObject* FemMeshPy::getGroupElementType(PyObject *args) +PyObject* FemMeshPy::getGroupElementType(PyObject* args) { int id; - if (!PyArg_ParseTuple(args, "i", &id)) - return nullptr; + if (!PyArg_ParseTuple(args, "i", &id)) { + return nullptr; + } SMESH_Group* group = getFemMeshPtr()->getSMesh()->GetGroup(id); if (!group) { @@ -1000,11 +1264,12 @@ PyObject* FemMeshPy::getGroupElementType(PyObject *args) return PyUnicode_FromString(typeStr); } -PyObject* FemMeshPy::getGroupElements(PyObject *args) +PyObject* FemMeshPy::getGroupElements(PyObject* args) { int id; - if (!PyArg_ParseTuple(args, "i", &id)) - return nullptr; + if (!PyArg_ParseTuple(args, "i", &id)) { + return nullptr; + } SMESH_Group* group = getFemMeshPtr()->getSMesh()->GetGroup(id); if (!group) { @@ -1032,14 +1297,15 @@ PyObject* FemMeshPy::getGroupElements(PyObject *args) Add Groups and elements to these. */ -PyObject* FemMeshPy::addGroup(PyObject *args) +PyObject* FemMeshPy::addGroup(PyObject* args) { // get name and typestring from arguments char* Name; char* typeString; int theId = -1; - if (!PyArg_ParseTuple(args, "etet|i","utf-8", &Name, "utf-8", &typeString, &theId)) + if (!PyArg_ParseTuple(args, "etet|i", "utf-8", &Name, "utf-8", &typeString, &theId)) { return nullptr; + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -1048,30 +1314,30 @@ PyObject* FemMeshPy::addGroup(PyObject *args) int retId = -1; - try - { + try { retId = getFemMeshPtr()->addGroup(EncodedTypeString, EncodedName, theId); } catch (Standard_Failure& e) { PyErr_SetString(Base::PyExc_FC_CADKernelError, e.GetMessageString()); return nullptr; } - std::cout << "Added Group: Name: \'" << EncodedName << "\' Type: \'" << EncodedTypeString << "\' id: " << retId << std::endl; + std::cout << "Added Group: Name: \'" << EncodedName << "\' Type: \'" << EncodedTypeString + << "\' id: " << retId << std::endl; return PyLong_FromLong(retId); } -PyObject* FemMeshPy::addGroupElements(PyObject *args) +PyObject* FemMeshPy::addGroupElements(PyObject* args) { int id; // the second object should be a list - // see https://stackoverflow.com/questions/22458298/extending-python-with-c-pass-a-list-to-pyarg-parsetuple - PyObject *pList; - PyObject *pItem; + // see + // https://stackoverflow.com/questions/22458298/extending-python-with-c-pass-a-list-to-pyarg-parsetuple + PyObject* pList; + PyObject* pItem; Py_ssize_t n; - if (!PyArg_ParseTuple(args, "iO!", &id, &PyList_Type, &pList)) - { + if (!PyArg_ParseTuple(args, "iO!", &id, &PyList_Type, &pList)) { PyErr_SetString(PyExc_TypeError, "AddGroupElements: 2nd Parameter must be a list."); return nullptr; } @@ -1081,7 +1347,7 @@ PyObject* FemMeshPy::addGroupElements(PyObject *args) std::cout << "AddGroupElements: num elements: " << n << " sizeof: " << sizeof(n) << std::endl; for (Py_ssize_t i = 0; i < n; i++) { pItem = PyList_GetItem(pList, i); - if(!PyLong_Check(pItem)) { + if (!PyLong_Check(pItem)) { PyErr_SetString(PyExc_TypeError, "AddGroupElements: List items must be integers."); return nullptr; } @@ -1092,11 +1358,11 @@ PyObject* FemMeshPy::addGroupElements(PyObject *args) // Downcast Py_ssize_t to int to be compatible with SMESH functions std::set int_ids; - for (Py_ssize_t it : ids) + for (Py_ssize_t it : ids) { int_ids.insert(Py_SAFE_DOWNCAST(it, Py_ssize_t, int)); + } - try - { + try { getFemMeshPtr()->addGroupElements(id, int_ids); } catch (Standard_Failure& e) { @@ -1107,30 +1373,34 @@ PyObject* FemMeshPy::addGroupElements(PyObject *args) Py_Return; } -PyObject* FemMeshPy::removeGroup(PyObject *args) +PyObject* FemMeshPy::removeGroup(PyObject* args) { int theId; - if (!PyArg_ParseTuple(args, "i", &theId)) + if (!PyArg_ParseTuple(args, "i", &theId)) { return nullptr; + } return PyBool_FromLong((long)(getFemMeshPtr()->removeGroup(theId))); } -PyObject* FemMeshPy::getElementType(PyObject *args) +PyObject* FemMeshPy::getElementType(PyObject* args) { int id; - if (!PyArg_ParseTuple(args, "i", &id)) + if (!PyArg_ParseTuple(args, "i", &id)) { return nullptr; + } // An element ... SMDSAbs_ElementType elemType = getFemMeshPtr()->getSMesh()->GetElementType(id, true); // ... or a node - if (elemType == SMDSAbs_All) + if (elemType == SMDSAbs_All) { elemType = getFemMeshPtr()->getSMesh()->GetElementType(id, false); + } - auto it = std::find_if(vecTypeName.begin()+1, vecTypeName.end(), [=](const pairStrElemType& x) { - return x.second == elemType; - }); + auto it = + std::find_if(vecTypeName.begin() + 1, vecTypeName.end(), [=](const pairStrElemType& x) { + return x.second == elemType; + }); const char* typeStr = it != vecTypeName.end() ? it->first.c_str() : nullptr; if (!typeStr) { @@ -1141,11 +1411,12 @@ PyObject* FemMeshPy::getElementType(PyObject *args) return PyUnicode_FromString(typeStr); } -PyObject* FemMeshPy::getIdByElementType(PyObject *args) +PyObject* FemMeshPy::getIdByElementType(PyObject* args) { const char* typeStr; - if (!PyArg_ParseTuple(args, "s", &typeStr)) + if (!PyArg_ParseTuple(args, "s", &typeStr)) { return nullptr; + } auto it = std::find_if(vecTypeName.begin(), vecTypeName.end(), [=](const pairStrElemType& x) { return x.first == typeStr; @@ -1158,7 +1429,8 @@ PyObject* FemMeshPy::getIdByElementType(PyObject *args) SMDSAbs_ElementType elemType = it->second; std::set ids; - SMDS_ElemIteratorPtr aElemIter = getFemMeshPtr()->getSMesh()->GetMeshDS()->elementsIterator(elemType); + SMDS_ElemIteratorPtr aElemIter = + getFemMeshPtr()->getSMesh()->GetMeshDS()->elementsIterator(elemType); while (aElemIter->more()) { const SMDS_MeshElement* aElem = aElemIter->next(); ids.insert(aElem->GetID()); @@ -1177,22 +1449,22 @@ PyObject* FemMeshPy::getIdByElementType(PyObject *args) Py::Dict FemMeshPy::getNodes() const { - //int count = getFemMeshPtr()->getSMesh()->GetMeshDS()->NbNodes(); - //Py::Tuple tup(count); + // int count = getFemMeshPtr()->getSMesh()->GetMeshDS()->NbNodes(); + // Py::Tuple tup(count); Py::Dict dict; // get the actual transform of the FemMesh Base::Matrix4D Mtrx = getFemMeshPtr()->getTransform(); SMDS_NodeIteratorPtr aNodeIter = getFemMeshPtr()->getSMesh()->GetMeshDS()->nodesIterator(); - for (int i=0;aNodeIter->more();i++) { + for (int i = 0; aNodeIter->more(); i++) { const SMDS_MeshNode* aNode = aNodeIter->next(); - Base::Vector3d vec(aNode->X(),aNode->Y(),aNode->Z()); + Base::Vector3d vec(aNode->X(), aNode->Y(), aNode->Z()); // Apply the matrix to hold the BoundBox in absolute space. vec = Mtrx * vec; int id = aNode->GetID(); - dict[Py::Long(id)] = Py::asObject(new Base::VectorPy( vec )); + dict[Py::Long(id)] = Py::asObject(new Base::VectorPy(vec)); } return dict; @@ -1362,12 +1634,11 @@ Py::Tuple FemMeshPy::getGroups() const Py::Object FemMeshPy::getVolume() const { return Py::asObject(new Base::QuantityPy(new Base::Quantity(getFemMeshPtr()->getVolume()))); - } // ===== custom attributes ============================================================ -PyObject *FemMeshPy::getCustomAttributes(const char* /*attr*/) const +PyObject* FemMeshPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp b/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp index 73a7631c85..cc11e8f6d5 100644 --- a/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp +++ b/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp @@ -24,22 +24,22 @@ #include #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# ifdef FCWithNetgen -# include -# include -# endif +#ifdef FCWithNetgen +#include +#include +#endif #endif #include #include #include -#include "FemMeshShapeNetgenObject.h" #include "FemMesh.h" +#include "FemMeshShapeNetgenObject.h" using namespace Fem; @@ -47,49 +47,64 @@ using namespace App; PROPERTY_SOURCE(Fem::FemMeshShapeNetgenObject, Fem::FemMeshShapeObject) -const char* FinenessEnums[]= {"VeryCoarse","Coarse","Moderate","Fine","VeryFine","UserDefined",nullptr}; +const char* FinenessEnums[] = + {"VeryCoarse", "Coarse", "Moderate", "Fine", "VeryFine", "UserDefined", nullptr}; FemMeshShapeNetgenObject::FemMeshShapeNetgenObject() { - ADD_PROPERTY_TYPE(MaxSize,(1000), "MeshParams",Prop_None,"Maximum element size"); - ADD_PROPERTY_TYPE(SecondOrder,(true), "MeshParams",Prop_None,"Create quadric elements"); - ADD_PROPERTY_TYPE(Fineness,(2), "MeshParams",Prop_None,"Fineness level of the mesh"); + ADD_PROPERTY_TYPE(MaxSize, (1000), "MeshParams", Prop_None, "Maximum element size"); + ADD_PROPERTY_TYPE(SecondOrder, (true), "MeshParams", Prop_None, "Create quadric elements"); + ADD_PROPERTY_TYPE(Fineness, (2), "MeshParams", Prop_None, "Fineness level of the mesh"); Fineness.setEnums(FinenessEnums); - ADD_PROPERTY_TYPE(GrowthRate,(0.3), "MeshParams",Prop_None," allows to define how much the linear dimensions of two adjacent cells can differ"); - ADD_PROPERTY_TYPE(NbSegsPerEdge,(1), "MeshParams",Prop_None,"allows to define the minimum number of mesh segments in which edges will be split"); - ADD_PROPERTY_TYPE(NbSegsPerRadius,(2), "MeshParams",Prop_None,"allows to define the minimum number of mesh segments in which radiuses will be split"); - ADD_PROPERTY_TYPE(Optimize,(true), "MeshParams",Prop_None,"Optimize the resulting mesh"); - + ADD_PROPERTY_TYPE( + GrowthRate, + (0.3), + "MeshParams", + Prop_None, + " allows to define how much the linear dimensions of two adjacent cells can differ"); + ADD_PROPERTY_TYPE( + NbSegsPerEdge, + (1), + "MeshParams", + Prop_None, + "allows to define the minimum number of mesh segments in which edges will be split"); + ADD_PROPERTY_TYPE( + NbSegsPerRadius, + (2), + "MeshParams", + Prop_None, + "allows to define the minimum number of mesh segments in which radiuses will be split"); + ADD_PROPERTY_TYPE(Optimize, (true), "MeshParams", Prop_None, "Optimize the resulting mesh"); } FemMeshShapeNetgenObject::~FemMeshShapeNetgenObject() = default; -App::DocumentObjectExecReturn *FemMeshShapeNetgenObject::execute() +App::DocumentObjectExecReturn* FemMeshShapeNetgenObject::execute() { #ifdef FCWithNetgen Fem::FemMesh newMesh; - Part::Feature *feat = Shape.getValue(); + Part::Feature* feat = Shape.getValue(); TopoDS_Shape shape = feat->Shape.getValue(); - NETGENPlugin_Mesher myNetGenMesher(newMesh.getSMesh(),shape,true); + NETGENPlugin_Mesher myNetGenMesher(newMesh.getSMesh(), shape, true); #if SMESH_VERSION_MAJOR >= 9 - NETGENPlugin_Hypothesis* tet= new NETGENPlugin_Hypothesis(0,newMesh.getGenerator()); + NETGENPlugin_Hypothesis* tet = new NETGENPlugin_Hypothesis(0, newMesh.getGenerator()); #else - NETGENPlugin_Hypothesis* tet= new NETGENPlugin_Hypothesis(0,1,newMesh.getGenerator()); + NETGENPlugin_Hypothesis* tet = new NETGENPlugin_Hypothesis(0, 1, newMesh.getGenerator()); #endif tet->SetMaxSize(MaxSize.getValue()); tet->SetSecondOrder(SecondOrder.getValue()); tet->SetOptimize(Optimize.getValue()); int iFineness = Fineness.getValue(); tet->SetFineness((NETGENPlugin_Hypothesis::Fineness)iFineness); - if(iFineness == 5){ + if (iFineness == 5) { tet->SetGrowthRate(GrowthRate.getValue()); tet->SetNbSegPerEdge(NbSegsPerEdge.getValue()); tet->SetNbSegPerRadius(NbSegsPerRadius.getValue()); } - myNetGenMesher.SetParameters( tet); + myNetGenMesher.SetParameters(tet); newMesh.getSMesh()->ShapeToMesh(shape); myNetGenMesher.Compute(); @@ -100,40 +115,42 @@ App::DocumentObjectExecReturn *FemMeshShapeNetgenObject::execute() const SMDS_MeshInfo& info = data->GetMeshInfo(); int numFaces = data->NbFaces(); int numNode = info.NbNodes(); - //int numTria = info.NbTriangles(); - //int numQuad = info.NbQuadrangles(); - //int numPoly = info.NbPolygons(); + // int numTria = info.NbTriangles(); + // int numQuad = info.NbQuadrangles(); + // int numPoly = info.NbPolygons(); int numVolu = info.NbVolumes(); - //int numTetr = info.NbTetras(); - //int numHexa = info.NbHexas(); - //int numPyrd = info.NbPyramids(); - //int numPris = info.NbPrisms(); - //int numHedr = info.NbPolyhedrons(); + // int numTetr = info.NbTetras(); + // int numHexa = info.NbHexas(); + // int numPyrd = info.NbPyramids(); + // int numPris = info.NbPrisms(); + // int numHedr = info.NbPolyhedrons(); - Base::Console().Log("NetgenMesh: %i Nodes, %i Volumes, %i Faces\n",numNode,numVolu,numFaces); + Base::Console().Log("NetgenMesh: %i Nodes, %i Volumes, %i Faces\n", numNode, numVolu, numFaces); - FemMesh.setValue(newMesh); + FemMesh.setValue(newMesh); return App::DocumentObject::StdReturn; #else - return new App::DocumentObjectExecReturn("The FEM module is built without NETGEN support. Meshing will not work!!!", this); + return new App::DocumentObjectExecReturn( + "The FEM module is built without NETGEN support. Meshing will not work!!!", + this); #endif } -//short FemMeshShapeNetgenObject::mustExecute(void) const +// short FemMeshShapeNetgenObject::mustExecute(void) const //{ -// return 0; -//} +// return 0; +// } -//PyObject *FemMeshShapeNetgenObject::getPyObject() +// PyObject *FemMeshShapeNetgenObject::getPyObject() //{ -// if (PythonObject.is(Py::_None())){ -// // ref counter is set to 1 -// PythonObject = Py::Object(new DocumentObjectPy(this),true); -// } -// return Py::new_reference_to(PythonObject); -//} +// if (PythonObject.is(Py::_None())){ +// // ref counter is set to 1 +// PythonObject = Py::Object(new DocumentObjectPy(this),true); +// } +// return Py::new_reference_to(PythonObject); +// } -//void FemMeshShapeNetgenObject::onChanged(const Property* prop) +// void FemMeshShapeNetgenObject::onChanged(const Property* prop) //{ -// Fem::FemMeshShapeObject::onChanged(prop); -//} +// Fem::FemMeshShapeObject::onChanged(prop); +// } diff --git a/src/Mod/Fem/App/FemMeshShapeNetgenObject.h b/src/Mod/Fem/App/FemMeshShapeNetgenObject.h index 14666927d3..748cc868b1 100644 --- a/src/Mod/Fem/App/FemMeshShapeNetgenObject.h +++ b/src/Mod/Fem/App/FemMeshShapeNetgenObject.h @@ -23,13 +23,13 @@ #ifndef Fem_FemMeshShapeNetgenObject_H #define Fem_FemMeshShapeNetgenObject_H -#include #include "FemMeshShapeObject.h" +#include namespace Fem { -class FemExport FemMeshShapeNetgenObject : public FemMeshShapeObject +class FemExport FemMeshShapeNetgenObject: public FemMeshShapeObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemMeshShapeNetgenObject); @@ -38,31 +38,32 @@ public: FemMeshShapeNetgenObject(); ~FemMeshShapeNetgenObject() override; - App::PropertyFloat MaxSize; - App::PropertyBool SecondOrder; - App::PropertyEnumeration Fineness; - App::PropertyFloat GrowthRate; - App::PropertyInteger NbSegsPerEdge; - App::PropertyInteger NbSegsPerRadius; - App::PropertyBool Optimize; + App::PropertyFloat MaxSize; + App::PropertyBool SecondOrder; + App::PropertyEnumeration Fineness; + App::PropertyFloat GrowthRate; + App::PropertyInteger NbSegsPerEdge; + App::PropertyInteger NbSegsPerRadius; + App::PropertyBool Optimize; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemMeshShapeNetgen"; } - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; - //virtual short mustExecute(void) const; - //virtual PyObject *getPyObject(void); + // virtual short mustExecute(void) const; + // virtual PyObject *getPyObject(void); - //App::PropertyLink Shape; + // App::PropertyLink Shape; protected: /// get called by the container when a property has changed - //virtual void onChanged (const App::Property* prop); + // virtual void onChanged (const App::Property* prop); }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemMeshShapeNetgenObject_H +#endif // Fem_FemMeshShapeNetgenObject_H diff --git a/src/Mod/Fem/App/FemMeshShapeObject.cpp b/src/Mod/Fem/App/FemMeshShapeObject.cpp index 6d8f98c8a8..04d9f1e9d4 100644 --- a/src/Mod/Fem/App/FemMeshShapeObject.cpp +++ b/src/Mod/Fem/App/FemMeshShapeObject.cpp @@ -24,33 +24,33 @@ #include #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include -#include "FemMeshShapeObject.h" #include "FemMesh.h" +#include "FemMeshShapeObject.h" using namespace Fem; @@ -62,17 +62,20 @@ PROPERTY_SOURCE(Fem::FemMeshShapeObject, Fem::FemMeshObject) FemMeshShapeObject::FemMeshShapeObject() { ADD_PROPERTY_TYPE( - Shape, (nullptr), "FEM Mesh", Prop_None, + Shape, + (nullptr), + "FEM Mesh", + Prop_None, "Geometry object, the mesh is made from. The geometry object has to have a Shape."); } FemMeshShapeObject::~FemMeshShapeObject() = default; -App::DocumentObjectExecReturn *FemMeshShapeObject::execute() +App::DocumentObjectExecReturn* FemMeshShapeObject::execute() { Fem::FemMesh newMesh; - Part::Feature *feat = Shape.getValue(); + Part::Feature* feat = Shape.getValue(); #if 0 TopoDS_Shape oshape = feat->Shape.getValue(); @@ -84,9 +87,9 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute() #endif newMesh.getSMesh()->ShapeToMesh(shape); - SMESH_Gen *myGen = newMesh.getGenerator(); + SMESH_Gen* myGen = newMesh.getGenerator(); - int hyp=0; + int hyp = 0; #if 0 SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, 1, myGen)); static_cast(len.get())->SetLength(1.0); @@ -152,10 +155,10 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute() SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, myGen)); newMesh.addHypothesis(shape, reg); - SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,myGen)); + SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, myGen)); newMesh.addHypothesis(shape, qdp); - SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,myGen)); + SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++, myGen)); newMesh.addHypothesis(shape, q2d); #else SMESH_HypothesisPtr len(new StdMeshers_MaxLength(hyp++, 1, myGen)); @@ -181,21 +184,21 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute() SMESH_HypothesisPtr reg(new StdMeshers_Regular_1D(hyp++, 1, myGen)); newMesh.addHypothesis(shape, reg); - //SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, 1, myGen)); - //static_cast(sel.get())->SetLength(1.0, true); - //newMesh.addHypothesis(shape, sel; + // SMESH_HypothesisPtr sel(new StdMeshers_StartEndLength(hyp++, 1, myGen)); + // static_cast(sel.get())->SetLength(1.0, true); + // newMesh.addHypothesis(shape, sel; - SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++,1,myGen)); + SMESH_HypothesisPtr qdp(new StdMeshers_QuadranglePreference(hyp++, 1, myGen)); newMesh.addHypothesis(shape, qdp); - SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++,1,myGen)); + SMESH_HypothesisPtr q2d(new StdMeshers_Quadrangle_2D(hyp++, 1, myGen)); newMesh.addHypothesis(shape, q2d); #endif // create mesh newMesh.compute(); #endif -#if 0 // NETGEN test +#if 0 // NETGEN test NETGENPlugin_Mesher myNetGenMesher(newMesh.getSMesh(),shape,true); //NETGENPlugin_SimpleHypothesis_2D * tet2 = new NETGENPlugin_SimpleHypothesis_2D(hyp++,1,myGen); @@ -219,21 +222,21 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute() return App::DocumentObject::StdReturn; } -//short FemMeshShapeObject::mustExecute(void) const +// short FemMeshShapeObject::mustExecute(void) const //{ -// return 0; -//} +// return 0; +// } -//PyObject *FemMeshShapeObject::getPyObject() +// PyObject *FemMeshShapeObject::getPyObject() //{ -// if (PythonObject.is(Py::_None())){ -// // ref counter is set to 1 -// PythonObject = Py::Object(new DocumentObjectPy(this),true); -// } -// return Py::new_reference_to(PythonObject); -//} +// if (PythonObject.is(Py::_None())){ +// // ref counter is set to 1 +// PythonObject = Py::Object(new DocumentObjectPy(this),true); +// } +// return Py::new_reference_to(PythonObject); +// } -//void FemMeshShapeObject::onChanged(const Property* prop) +// void FemMeshShapeObject::onChanged(const Property* prop) //{ -// App::GeoFeature::onChanged(prop); -//} +// App::GeoFeature::onChanged(prop); +// } diff --git a/src/Mod/Fem/App/FemMeshShapeObject.h b/src/Mod/Fem/App/FemMeshShapeObject.h index 7bd2c09f7d..13d20af526 100644 --- a/src/Mod/Fem/App/FemMeshShapeObject.h +++ b/src/Mod/Fem/App/FemMeshShapeObject.h @@ -29,7 +29,7 @@ namespace Fem { -class FemExport FemMeshShapeObject : public FemMeshObject +class FemExport FemMeshShapeObject: public FemMeshObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemMeshShapeObject); @@ -39,22 +39,23 @@ public: ~FemMeshShapeObject() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemMeshShape"; } - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; - //virtual short mustExecute(void) const; - //virtual PyObject *getPyObject(void); + // virtual short mustExecute(void) const; + // virtual PyObject *getPyObject(void); App::PropertyLink Shape; protected: /// get called by the container when a property has changed - //virtual void onChanged (const App::Property* prop); + // virtual void onChanged (const App::Property* prop); }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemMeshShapeObject_H +#endif // Fem_FemMeshShapeObject_H diff --git a/src/Mod/Fem/App/FemPostFilter.cpp b/src/Mod/Fem/App/FemPostFilter.cpp index aad66d32e0..ad3ea6a880 100644 --- a/src/Mod/Fem/App/FemPostFilter.cpp +++ b/src/Mod/Fem/App/FemPostFilter.cpp @@ -23,9 +23,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -42,7 +42,7 @@ PROPERTY_SOURCE(Fem::FemPostFilter, Fem::FemPostObject) FemPostFilter::FemPostFilter() { - ADD_PROPERTY(Input,(nullptr)); + ADD_PROPERTY(Input, (nullptr)); } FemPostFilter::~FemPostFilter() = default; @@ -69,13 +69,14 @@ DocumentObjectExecReturn* FemPostFilter::execute() if (!m_pipelines.empty() && !m_activePipeline.empty()) { FemPostFilter::FilterPipeline& pipe = m_pipelines[m_activePipeline]; vtkSmartPointer data = getInputData(); - if (!data || !data->IsA("vtkDataSet")) + if (!data || !data->IsA("vtkDataSet")) { return StdReturn; + } if ((m_activePipeline == "DataAlongLine") || (m_activePipeline == "DataAtPoint")) { - pipe.filterSource->SetSourceData(getInputData()); - pipe.filterTarget->Update(); - Data.setValue(pipe.filterTarget->GetOutputDataObject(0)); + pipe.filterSource->SetSourceData(getInputData()); + pipe.filterTarget->Update(); + Data.setValue(pipe.filterTarget->GetOutputDataObject(0)); } else { pipe.source->SetInputDataObject(data); @@ -90,19 +91,23 @@ DocumentObjectExecReturn* FemPostFilter::execute() vtkDataObject* FemPostFilter::getInputData() { if (Input.getValue()) { - if (Input.getValue()->getTypeId().isDerivedFrom(Base::Type::fromName("Fem::FemPostObject"))) + if (Input.getValue()->getTypeId().isDerivedFrom( + Base::Type::fromName("Fem::FemPostObject"))) { return Input.getValue()->Data.getValue(); - else + } + else { throw std::runtime_error( "The filter's Input object is not a 'Fem::FemPostObject' object!"); + } } else { - //get the pipeline and use the pipelinedata + // get the pipeline and use the pipelinedata std::vector objs = getDocument()->getObjectsOfType(FemPostPipeline::getClassTypeId()); for (auto it : objs) { - if (static_cast(it)->holdsPostObject(this)) + if (static_cast(it)->holdsPostObject(this)) { return static_cast(it)->Data.getValue(); + } } } @@ -136,10 +141,16 @@ FemPostDataAlongLineFilter::FemPostDataAlongLineFilter() "DataAlongLine", App::Prop_None, "The number of intervals between the 2 end points of line"); - ADD_PROPERTY_TYPE( - XAxisData, (0), "DataAlongLine", App::Prop_None, "X axis data values used for plotting"); - ADD_PROPERTY_TYPE( - YAxisData, (0), "DataAlongLine", App::Prop_None, "Y axis data values used for plotting"); + ADD_PROPERTY_TYPE(XAxisData, + (0), + "DataAlongLine", + App::Prop_None, + "X axis data values used for plotting"); + ADD_PROPERTY_TYPE(YAxisData, + (0), + "DataAlongLine", + App::Prop_None, + "Y axis data values used for plotting"); ADD_PROPERTY_TYPE(PlotData, (""), "DataAlongLine", App::Prop_None, "Field used for plotting"); PlotData.setStatus(App::Property::ReadOnly, true); @@ -178,7 +189,7 @@ FemPostDataAlongLineFilter::~FemPostDataAlongLineFilter() = default; DocumentObjectExecReturn* FemPostDataAlongLineFilter::execute() { - //recalculate the filter + // recalculate the filter return Fem::FemPostFilter::execute(); } @@ -223,10 +234,12 @@ void FemPostDataAlongLineFilter::onChanged(const Property* prop) short int FemPostDataAlongLineFilter::mustExecute() const { - if (Point1.isTouched() || Point2.isTouched() || Resolution.isTouched()) + if (Point1.isTouched() || Point2.isTouched() || Resolution.isTouched()) { return 1; - else + } + else { return App::DocumentObject::mustExecute(); + } } void FemPostDataAlongLineFilter::GetAxisData() @@ -236,13 +249,15 @@ void FemPostDataAlongLineFilter::GetAxisData() vtkSmartPointer data = m_probe->GetOutputDataObject(0); vtkDataSet* dset = vtkDataSet::SafeDownCast(data); - if (!dset) + if (!dset) { return; + } vtkDataArray* pdata = dset->GetPointData()->GetArray(PlotData.getValue()); // VTK cannot deliver data when the filer relies e.g. on a scalar clip filter // whose value is set so that all data are clipped - if (!pdata) + if (!pdata) { return; + } vtkDataArray* tcoords = dset->GetPointData()->GetTCoords("Texture Coordinates"); vtkIdType component = 0; @@ -260,8 +275,9 @@ void FemPostDataAlongLineFilter::GetAxisData() value = pdata->GetComponent(i, component); } else { - for (vtkIdType j = 0; j < pdata->GetNumberOfComponents(); ++j) + for (vtkIdType j = 0; j < pdata->GetNumberOfComponents(); ++j) { value += std::pow(pdata->GetComponent(i, j), 2); + } value = std::sqrt(value); } @@ -288,8 +304,11 @@ FemPostDataAtPointFilter::FemPostDataAtPointFilter() "DataAtPoint", App::Prop_None, "Center of the point"); - ADD_PROPERTY_TYPE( - Radius, (0), "DataAtPoint", App::Prop_None, "Radius around the point (unused)"); + ADD_PROPERTY_TYPE(Radius, + (0), + "DataAtPoint", + App::Prop_None, + "Radius around the point (unused)"); ADD_PROPERTY_TYPE(PointData, (0), "DataAtPoint", App::Prop_None, "Point data values"); ADD_PROPERTY_TYPE(FieldName, (""), "DataAtPoint", App::Prop_None, "Field used for plotting"); ADD_PROPERTY_TYPE(Unit, (""), "DataAtPoint", App::Prop_None, "Unit used for the field"); @@ -327,7 +346,7 @@ FemPostDataAtPointFilter::~FemPostDataAtPointFilter() = default; DocumentObjectExecReturn* FemPostDataAtPointFilter::execute() { - //recalculate the filter + // recalculate the filter return Fem::FemPostFilter::execute(); } @@ -343,10 +362,12 @@ void FemPostDataAtPointFilter::onChanged(const Property* prop) short int FemPostDataAtPointFilter::mustExecute() const { - if (Center.isTouched()) + if (Center.isTouched()) { return 1; - else + } + else { return App::DocumentObject::mustExecute(); + } } void FemPostDataAtPointFilter::GetPointData() @@ -355,24 +376,28 @@ void FemPostDataAtPointFilter::GetPointData() vtkSmartPointer data = m_probe->GetOutputDataObject(0); vtkDataSet* dset = vtkDataSet::SafeDownCast(data); - if (!dset) + if (!dset) { return; + } vtkDataArray* pdata = dset->GetPointData()->GetArray(FieldName.getValue()); // VTK cannot deliver data when the filer relies e.g. on a scalar clip filter // whose value is set so that all data are clipped - if (!pdata) + if (!pdata) { return; + } int component = 0; for (int i = 0; i < dset->GetNumberOfPoints(); ++i) { double value = 0; - if (pdata->GetNumberOfComponents() == 1) + if (pdata->GetNumberOfComponents() == 1) { value = pdata->GetComponent(i, component); + } else { - for (int j = 0; j < pdata->GetNumberOfComponents(); ++j) + for (int j = 0; j < pdata->GetNumberOfComponents(); ++j) { value += std::pow(pdata->GetComponent(i, j), 2); + } value = std::sqrt(value); } @@ -439,10 +464,12 @@ void FemPostClipFilter::onChanged(const Property* prop) } else if (prop == &CutCells) { - if (!CutCells.getValue()) + if (!CutCells.getValue()) { setActiveFilterPipeline("extract"); - else + } + else { setActiveFilterPipeline("clip"); + } }; Fem::FemPostFilter::onChanged(prop); @@ -450,17 +477,20 @@ void FemPostClipFilter::onChanged(const Property* prop) short int FemPostClipFilter::mustExecute() const { - if (Function.isTouched() || InsideOut.isTouched() || CutCells.isTouched()) + if (Function.isTouched() || InsideOut.isTouched() || CutCells.isTouched()) { return 1; - else + } + else { return App::DocumentObject::mustExecute(); + } } DocumentObjectExecReturn* FemPostClipFilter::execute() { - if (!m_extractor->GetImplicitFunction()) + if (!m_extractor->GetImplicitFunction()) { return StdReturn; + } return Fem::FemPostFilter::execute(); } @@ -474,10 +504,16 @@ FemPostContoursFilter::FemPostContoursFilter() { ADD_PROPERTY_TYPE(NumberOfContours, (10), "Contours", App::Prop_None, "The number of contours"); ADD_PROPERTY_TYPE(Field, (long(0)), "Clip", App::Prop_None, "The field used to clip"); - ADD_PROPERTY_TYPE( - VectorMode, ((long)0), "Contours", App::Prop_None, "Select what vector field"); - ADD_PROPERTY_TYPE(NoColor, (false), "Contours", - PropertyType(Prop_Hidden), "Don't color the contours"); + ADD_PROPERTY_TYPE(VectorMode, + ((long)0), + "Contours", + App::Prop_None, + "Select what vector field"); + ADD_PROPERTY_TYPE(NoColor, + (false), + "Contours", + PropertyType(Prop_Hidden), + "Don't color the contours"); m_contourConstraints.LowerBound = 1; m_contourConstraints.UpperBound = 1000; @@ -509,23 +545,27 @@ DocumentObjectExecReturn* FemPostContoursFilter::execute() // delete contour field vtkSmartPointer data = getInputData(); vtkDataSet* dset = vtkDataSet::SafeDownCast(data); - if (!dset) + if (!dset) { return returnObject; + } dset->GetPointData()->RemoveArray(contourFieldName.c_str()); // refresh fields to reflect the deletion - if (!m_blockPropertyChanges) + if (!m_blockPropertyChanges) { refreshFields(); + } return returnObject; } void FemPostContoursFilter::onChanged(const Property* prop) { - if (m_blockPropertyChanges) + if (m_blockPropertyChanges) { return; + } - if (prop == &Field && (Field.getValue() >= 0)) + if (prop == &Field && (Field.getValue() >= 0)) { refreshVectors(); + } // note that we need to calculate also in case of a Data change // otherwise the contours output would be empty and the ViewProviderFemPostObject @@ -537,15 +577,20 @@ void FemPostContoursFilter::onChanged(const Property* prop) // get the field and its data vtkSmartPointer data = getInputData(); vtkDataSet* dset = vtkDataSet::SafeDownCast(data); - if (!dset) + if (!dset) { return; + } vtkDataArray* pdata = dset->GetPointData()->GetArray(Field.getValueAsString()); - if (!pdata) + if (!pdata) { return; + } if (pdata->GetNumberOfComponents() == 1) { // if we have a scalar, we can directly use the array - m_contours->SetInputArrayToProcess( - 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, Field.getValueAsString()); + m_contours->SetInputArrayToProcess(0, + 0, + 0, + vtkDataObject::FIELD_ASSOCIATION_POINTS, + Field.getValueAsString()); pdata->GetRange(p); recalculateContours(p[0], p[1]); } @@ -555,12 +600,15 @@ void FemPostContoursFilter::onChanged(const Property* prop) // scalar array and append this temporarily to the data. (vtkExtractVectorComponents // does not work because our data is an unstructured data set.) int component = -1; - if (VectorMode.getValue() == 1) + if (VectorMode.getValue() == 1) { component = 0; - else if (VectorMode.getValue() == 2) + } + else if (VectorMode.getValue() == 2) { component = 1; - else if (VectorMode.getValue() == 3) + } + else if (VectorMode.getValue() == 3) { component = 2; + } // extract the component to a new array vtkSmartPointer componentArray = vtkSmartPointer::New(); componentArray->SetNumberOfComponents(1); @@ -569,8 +617,9 @@ void FemPostContoursFilter::onChanged(const Property* prop) if (component >= 0) { for (vtkIdType tupleIdx = 0; tupleIdx < numTuples; ++tupleIdx) { - componentArray->SetComponent( - tupleIdx, 0, pdata->GetComponent(tupleIdx, component)); + componentArray->SetComponent(tupleIdx, + 0, + pdata->GetComponent(tupleIdx, component)); } } else { @@ -590,8 +639,11 @@ void FemPostContoursFilter::onChanged(const Property* prop) // add the array as new field and use it for the contour filter dset->GetPointData()->AddArray(componentArray); - m_contours->SetInputArrayToProcess( - 0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, contourFieldName.c_str()); + m_contours->SetInputArrayToProcess(0, + 0, + 0, + vtkDataObject::FIELD_ASSOCIATION_POINTS, + contourFieldName.c_str()); componentArray->GetRange(p); recalculateContours(p[0], p[1]); if (prop == &Data) { @@ -610,10 +662,12 @@ void FemPostContoursFilter::onChanged(const Property* prop) short int FemPostContoursFilter::mustExecute() const { if (Field.isTouched() || VectorMode.isTouched() || NumberOfContours.isTouched() - || Data.isTouched()) + || Data.isTouched()) { return 1; - else + } + else { return App::DocumentObject::mustExecute(); + } } void FemPostContoursFilter::recalculateContours(double min, double max) @@ -630,8 +684,9 @@ void FemPostContoursFilter::refreshFields() m_blockPropertyChanges = true; std::string fieldName; - if (Field.getValue() >= 0) + if (Field.getValue() >= 0) { fieldName = Field.getValueAsString(); + } std::vector FieldsArray; @@ -688,12 +743,14 @@ void FemPostContoursFilter::refreshVectors() // store name if already set std::string vectorName; - if (VectorMode.hasEnums() && VectorMode.getValue() >= 0) + if (VectorMode.hasEnums() && VectorMode.getValue() >= 0) { vectorName = VectorMode.getValueAsString(); + } std::vector vectorArray; - if (fieldArray->GetNumberOfComponents() == 1) + if (fieldArray->GetNumberOfComponents() == 1) { vectorArray.emplace_back("Not a vector"); + } else { vectorArray.emplace_back("Magnitude"); if (fieldArray->GetNumberOfComponents() >= 2) { @@ -711,8 +768,9 @@ void FemPostContoursFilter::refreshVectors() // apply stored name auto it = std::find(vectorArray.begin(), vectorArray.end(), vectorName); - if (!vectorName.empty() && it != vectorArray.end()) + if (!vectorName.empty() && it != vectorArray.end()) { VectorMode.setValue(vectorName.c_str()); + } m_blockPropertyChanges = false; } @@ -756,16 +814,19 @@ void FemPostCutFilter::onChanged(const Property* prop) short int FemPostCutFilter::mustExecute() const { - if (Function.isTouched()) + if (Function.isTouched()) { return 1; - else + } + else { return App::DocumentObject::mustExecute(); + } } DocumentObjectExecReturn* FemPostCutFilter::execute() { - if (!m_cutter->GetCutFunction()) + if (!m_cutter->GetCutFunction()) { return StdReturn; + } return Fem::FemPostFilter::execute(); } @@ -775,17 +836,22 @@ DocumentObjectExecReturn* FemPostCutFilter::execute() // scalar clip filter PROPERTY_SOURCE(Fem::FemPostScalarClipFilter, Fem::FemPostFilter) -FemPostScalarClipFilter::FemPostScalarClipFilter() : FemPostFilter() { +FemPostScalarClipFilter::FemPostScalarClipFilter() + : FemPostFilter() +{ - ADD_PROPERTY_TYPE( - Value, (0), "Clip", App::Prop_None, "The scalar value used to clip the selected field"); + ADD_PROPERTY_TYPE(Value, + (0), + "Clip", + App::Prop_None, + "The scalar value used to clip the selected field"); ADD_PROPERTY_TYPE(Scalars, (long(0)), "Clip", App::Prop_None, "The field used to clip"); ADD_PROPERTY_TYPE(InsideOut, (false), "Clip", App::Prop_None, "Invert the clip direction"); Value.setConstraints(&m_constraints); FilterPipeline clip; - m_clipper = vtkSmartPointer::New(); + m_clipper = vtkSmartPointer::New(); clip.source = m_clipper; clip.target = m_clipper; addFilterPipeline(clip, "clip"); @@ -797,21 +863,24 @@ FemPostScalarClipFilter::~FemPostScalarClipFilter() = default; DocumentObjectExecReturn* FemPostScalarClipFilter::execute() { std::string val; - if (Scalars.getValue() >= 0) + if (Scalars.getValue() >= 0) { val = Scalars.getValueAsString(); + } std::vector ScalarsArray; vtkSmartPointer data = getInputData(); vtkDataSet* dset = vtkDataSet::SafeDownCast(data); - if (!dset) + if (!dset) { return StdReturn; + } vtkPointData* pd = dset->GetPointData(); // get all scalar fields for (int i = 0; i < pd->GetNumberOfArrays(); ++i) { - if (pd->GetArray(i)->GetNumberOfComponents() == 1) + if (pd->GetArray(i)->GetNumberOfComponents() == 1) { ScalarsArray.emplace_back(pd->GetArrayName(i)); + } } App::Enumeration empty; @@ -822,10 +891,11 @@ DocumentObjectExecReturn* FemPostScalarClipFilter::execute() // search if the current field is in the available ones and set it std::vector::iterator it = std::find(ScalarsArray.begin(), ScalarsArray.end(), val); - if (!val.empty() && it != ScalarsArray.end()) + if (!val.empty() && it != ScalarsArray.end()) { Scalars.setValue(val.c_str()); + } - //recalculate the filter + // recalculate the filter return Fem::FemPostFilter::execute(); } @@ -838,8 +908,11 @@ void FemPostScalarClipFilter::onChanged(const Property* prop) m_clipper->SetInsideOut(InsideOut.getValue()); } else if (prop == &Scalars && (Scalars.getValue() >= 0)) { - m_clipper->SetInputArrayToProcess(0, 0, 0, - vtkDataObject::FIELD_ASSOCIATION_POINTS, Scalars.getValueAsString()); + m_clipper->SetInputArrayToProcess(0, + 0, + 0, + vtkDataObject::FIELD_ASSOCIATION_POINTS, + Scalars.getValueAsString()); setConstraintForField(); } @@ -848,26 +921,28 @@ void FemPostScalarClipFilter::onChanged(const Property* prop) short int FemPostScalarClipFilter::mustExecute() const { - if (Value.isTouched() || - InsideOut.isTouched() || - Scalars.isTouched()) + if (Value.isTouched() || InsideOut.isTouched() || Scalars.isTouched()) { return 1; - else + } + else { return App::DocumentObject::mustExecute(); + } } void FemPostScalarClipFilter::setConstraintForField() { vtkSmartPointer data = getInputData(); vtkDataSet* dset = vtkDataSet::SafeDownCast(data); - if (!dset) + if (!dset) { return; + } vtkDataArray* pdata = dset->GetPointData()->GetArray(Scalars.getValueAsString()); // VTK cannot deliver data when the filer relies e.g. on a cut clip filter // whose value is set so that all data are cut - if (!pdata) + if (!pdata) { return; + } double p[2]; pdata->GetRange(p); m_constraints.LowerBound = p[0]; @@ -880,18 +955,22 @@ void FemPostScalarClipFilter::setConstraintForField() // warp vector filter PROPERTY_SOURCE(Fem::FemPostWarpVectorFilter, Fem::FemPostFilter) -FemPostWarpVectorFilter::FemPostWarpVectorFilter() : FemPostFilter() +FemPostWarpVectorFilter::FemPostWarpVectorFilter() + : FemPostFilter() { ADD_PROPERTY_TYPE(Factor, (0), "Warp", App::Prop_None, "The factor by which the vector is added to the node positions"); - ADD_PROPERTY_TYPE( - Vector, (long(0)), "Warp", App::Prop_None, "The field added to the node position"); + ADD_PROPERTY_TYPE(Vector, + (long(0)), + "Warp", + App::Prop_None, + "The field added to the node position"); FilterPipeline warp; - m_warp = vtkSmartPointer::New(); + m_warp = vtkSmartPointer::New(); warp.source = m_warp; warp.target = m_warp; addFilterPipeline(warp, "warp"); @@ -903,21 +982,24 @@ FemPostWarpVectorFilter::~FemPostWarpVectorFilter() = default; DocumentObjectExecReturn* FemPostWarpVectorFilter::execute() { std::string val; - if (Vector.getValue() >= 0) + if (Vector.getValue() >= 0) { val = Vector.getValueAsString(); + } std::vector VectorArray; vtkSmartPointer data = getInputData(); vtkDataSet* dset = vtkDataSet::SafeDownCast(data); - if (!dset) + if (!dset) { return StdReturn; + } vtkPointData* pd = dset->GetPointData(); // get all vector fields for (int i = 0; i < pd->GetNumberOfArrays(); ++i) { - if (pd->GetArray(i)->GetNumberOfComponents() == 3) + if (pd->GetArray(i)->GetNumberOfComponents() == 3) { VectorArray.emplace_back(pd->GetArrayName(i)); + } } App::Enumeration empty; @@ -926,31 +1008,38 @@ DocumentObjectExecReturn* FemPostWarpVectorFilter::execute() Vector.setValue(m_vectorFields); // search if the current field is in the available ones and set it - std::vector::iterator it = - std::find(VectorArray.begin(), VectorArray.end(), val); - if (!val.empty() && it != VectorArray.end()) + std::vector::iterator it = std::find(VectorArray.begin(), VectorArray.end(), val); + if (!val.empty() && it != VectorArray.end()) { Vector.setValue(val.c_str()); + } - //recalculate the filter + // recalculate the filter return Fem::FemPostFilter::execute(); } void FemPostWarpVectorFilter::onChanged(const Property* prop) { - if (prop == &Factor) + if (prop == &Factor) { // since our mesh is in mm, we must scale the factor m_warp->SetScaleFactor(1000 * Factor.getValue()); - else if (prop == &Vector && (Vector.getValue() >= 0)) - m_warp->SetInputArrayToProcess(0, 0, 0, - vtkDataObject::FIELD_ASSOCIATION_POINTS, Vector.getValueAsString()); + } + else if (prop == &Vector && (Vector.getValue() >= 0)) { + m_warp->SetInputArrayToProcess(0, + 0, + 0, + vtkDataObject::FIELD_ASSOCIATION_POINTS, + Vector.getValueAsString()); + } Fem::FemPostFilter::onChanged(prop); } short int FemPostWarpVectorFilter::mustExecute() const { - if (Factor.isTouched() || Vector.isTouched()) + if (Factor.isTouched() || Vector.isTouched()) { return 1; - else + } + else { return App::DocumentObject::mustExecute(); + } } diff --git a/src/Mod/Fem/App/FemPostFilter.h b/src/Mod/Fem/App/FemPostFilter.h index a00edb7d9b..b4a292bf31 100644 --- a/src/Mod/Fem/App/FemPostFilter.h +++ b/src/Mod/Fem/App/FemPostFilter.h @@ -28,11 +28,11 @@ #include #include #include -#include #include #include #include #include +#include #include #include @@ -43,7 +43,7 @@ namespace Fem { -class FemExport FemPostFilter : public Fem::FemPostObject +class FemExport FemPostFilter: public Fem::FemPostObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostFilter); @@ -59,18 +59,20 @@ public: protected: vtkDataObject* getInputData(); - //pipeline handling for derived filter - struct FilterPipeline { - vtkSmartPointer source, target; - vtkSmartPointer filterSource, filterTarget; - std::vector > algorithmStorage; + // pipeline handling for derived filter + struct FilterPipeline + { + vtkSmartPointer source, target; + vtkSmartPointer filterSource, filterTarget; + std::vector> algorithmStorage; }; void addFilterPipeline(const FilterPipeline& p, std::string name); void setActiveFilterPipeline(std::string name); FilterPipeline& getFilterPipeline(std::string name); + private: - //handling of multiple pipelines which can be the filter + // handling of multiple pipelines which can be the filter std::map m_pipelines; std::string m_activePipeline; }; @@ -93,14 +95,14 @@ public: App::PropertyVectorDistance Point1; App::PropertyVectorDistance Point2; - App::PropertyInteger Resolution; - App::PropertyFloatList XAxisData; - App::PropertyFloatList YAxisData; - App::PropertyString PlotData; + App::PropertyInteger Resolution; + App::PropertyFloatList XAxisData; + App::PropertyFloatList YAxisData; + App::PropertyString PlotData; const char* getViewProviderName() const override { - return "FemGui::ViewProviderFemPostDataAlongLine"; + return "FemGui::ViewProviderFemPostDataAlongLine"; } short int mustExecute() const override; void GetAxisData(); @@ -108,7 +110,8 @@ public: protected: App::DocumentObjectExecReturn* execute() override; void onChanged(const App::Property* prop) override; - void handleChangedPropertyType(Base::XMLReader& reader, const char* TypeName, + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, App::Property* prop) override; private: @@ -128,15 +131,15 @@ public: FemPostDataAtPointFilter(); ~FemPostDataAtPointFilter() override; - App::PropertyVectorDistance Center; - App::PropertyDistance Radius; - App::PropertyString FieldName; - App::PropertyFloatList PointData; - App::PropertyString Unit; + App::PropertyVectorDistance Center; + App::PropertyDistance Radius; + App::PropertyString FieldName; + App::PropertyFloatList PointData; + App::PropertyString Unit; const char* getViewProviderName() const override { - return "FemGui::ViewProviderFemPostDataAtPoint"; + return "FemGui::ViewProviderFemPostDataAtPoint"; } short int mustExecute() const override; @@ -168,7 +171,7 @@ public: const char* getViewProviderName() const override { - return "FemGui::ViewProviderFemPostClip"; + return "FemGui::ViewProviderFemPostClip"; } short int mustExecute() const override; App::DocumentObjectExecReturn* execute() override; @@ -286,7 +289,8 @@ private: // *************************************************************************** // warp vector filter -class FemExport FemPostWarpVectorFilter : public FemPostFilter { +class FemExport FemPostWarpVectorFilter: public FemPostFilter +{ PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostWarpVectorFilter); @@ -294,10 +298,11 @@ public: FemPostWarpVectorFilter(); ~FemPostWarpVectorFilter() override; - App::PropertyFloat Factor; - App::PropertyEnumeration Vector; + App::PropertyFloat Factor; + App::PropertyEnumeration Vector; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostWarpVector"; } short int mustExecute() const override; @@ -307,11 +312,11 @@ protected: void onChanged(const App::Property* prop) override; private: - vtkSmartPointer m_warp; - App::Enumeration m_vectorFields; + vtkSmartPointer m_warp; + App::Enumeration m_vectorFields; }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemPostFilter_H +#endif // Fem_FemPostFilter_H diff --git a/src/Mod/Fem/App/FemPostFunction.cpp b/src/Mod/Fem/App/FemPostFunction.cpp index 5330c738c2..0b41eb95d8 100644 --- a/src/Mod/Fem/App/FemPostFunction.cpp +++ b/src/Mod/Fem/App/FemPostFunction.cpp @@ -30,14 +30,17 @@ using namespace App; PROPERTY_SOURCE(Fem::FemPostFunctionProvider, App::DocumentObject) -FemPostFunctionProvider::FemPostFunctionProvider() : DocumentObject() { +FemPostFunctionProvider::FemPostFunctionProvider() + : DocumentObject() +{ ADD_PROPERTY(Functions, (nullptr)); } FemPostFunctionProvider::~FemPostFunctionProvider() = default; -void FemPostFunctionProvider::onChanged(const Property* prop) { +void FemPostFunctionProvider::onChanged(const Property* prop) +{ App::DocumentObject::onChanged(prop); } @@ -48,7 +51,8 @@ FemPostFunction::FemPostFunction() = default; FemPostFunction::~FemPostFunction() = default; -DocumentObjectExecReturn* FemPostFunction::execute() { +DocumentObjectExecReturn* FemPostFunction::execute() +{ return DocumentObject::StdReturn; } @@ -80,10 +84,12 @@ void FemPostBoxFunction::onChanged(const Property* prop) float l = Length.getValue(); float w = Width.getValue(); float h = Height.getValue(); - m_box->SetBounds( - vec[0] - l/2, vec[0] + l/2, - vec[1] - w/2, vec[1] + w/2, - vec[2] - h/2, vec[2] + h/2); + m_box->SetBounds(vec[0] - l / 2, + vec[0] + l / 2, + vec[1] - w / 2, + vec[1] + w / 2, + vec[2] - h / 2, + vec[2] + h / 2); } Fem::FemPostFunction::onChanged(prop); @@ -145,7 +151,9 @@ void FemPostCylinderFunction::onDocumentRestored() // plane function PROPERTY_SOURCE(Fem::FemPostPlaneFunction, Fem::FemPostFunction) -FemPostPlaneFunction::FemPostPlaneFunction() : FemPostFunction() { +FemPostPlaneFunction::FemPostPlaneFunction() + : FemPostFunction() +{ ADD_PROPERTY(Origin, (Base::Vector3d(0.0, 0.0, 0.0))); ADD_PROPERTY(Normal, (Base::Vector3d(0.0, 0.0, 1.0))); @@ -159,7 +167,8 @@ FemPostPlaneFunction::FemPostPlaneFunction() : FemPostFunction() { FemPostPlaneFunction::~FemPostPlaneFunction() = default; -void FemPostPlaneFunction::onChanged(const Property* prop) { +void FemPostPlaneFunction::onChanged(const Property* prop) +{ if (prop == &Origin) { const Base::Vector3d& vec = Origin.getValue(); @@ -173,7 +182,8 @@ void FemPostPlaneFunction::onChanged(const Property* prop) { Fem::FemPostFunction::onChanged(prop); } -void FemPostPlaneFunction::onDocumentRestored() { +void FemPostPlaneFunction::onDocumentRestored() +{ // This is to notify the view provider that the document has been fully restored Normal.touch(); } @@ -183,7 +193,9 @@ void FemPostPlaneFunction::onDocumentRestored() { // sphere function PROPERTY_SOURCE(Fem::FemPostSphereFunction, Fem::FemPostFunction) -FemPostSphereFunction::FemPostSphereFunction() : FemPostFunction() { +FemPostSphereFunction::FemPostSphereFunction() + : FemPostFunction() +{ ADD_PROPERTY(Radius, (5.0)); ADD_PROPERTY(Center, (Base::Vector3d(1.0, 0.0, 0.0))); @@ -197,7 +209,8 @@ FemPostSphereFunction::FemPostSphereFunction() : FemPostFunction() { FemPostSphereFunction::~FemPostSphereFunction() = default; -void FemPostSphereFunction::onChanged(const Property* prop) { +void FemPostSphereFunction::onChanged(const Property* prop) +{ if (prop == &Center) { const Base::Vector3d& vec = Center.getValue(); diff --git a/src/Mod/Fem/App/FemPostFunction.h b/src/Mod/Fem/App/FemPostFunction.h index f5d12cea01..e8885d9369 100644 --- a/src/Mod/Fem/App/FemPostFunction.h +++ b/src/Mod/Fem/App/FemPostFunction.h @@ -39,7 +39,7 @@ namespace Fem { -class FemExport FemPostFunction : public App::DocumentObject +class FemExport FemPostFunction: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostFunction); @@ -48,24 +48,32 @@ public: FemPostFunction(); ~FemPostFunction() override; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostFunction"; } App::DocumentObjectExecReturn* execute() override; - //bound box handling - void setBoundingBox(vtkBoundingBox b) {m_boundingBox = b;}; + // bound box handling + void setBoundingBox(vtkBoundingBox b) + { + m_boundingBox = b; + }; - //get the algorithm or the data - vtkSmartPointer getImplicitFunction() {return m_implicit;}; + // get the algorithm or the data + vtkSmartPointer getImplicitFunction() + { + return m_implicit; + }; protected: - vtkSmartPointer m_implicit; - vtkBoundingBox m_boundingBox; + vtkSmartPointer m_implicit; + vtkBoundingBox m_boundingBox; }; -class FemExport FemPostFunctionProvider : public App::DocumentObject { +class FemExport FemPostFunctionProvider: public App::DocumentObject +{ PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostFunctionProvider); @@ -73,7 +81,8 @@ public: FemPostFunctionProvider(); ~FemPostFunctionProvider() override; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostFunctionProvider"; } @@ -85,21 +94,21 @@ protected: // --------------------------------------------------------------------------- -class FemExport FemPostBoxFunction : public FemPostFunction +class FemExport FemPostBoxFunction: public FemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostBoxFunction); public: - FemPostBoxFunction(); ~FemPostBoxFunction() override; - App::PropertyVectorDistance Center; - App::PropertyDistance Length; - App::PropertyDistance Width; - App::PropertyDistance Height; + App::PropertyVectorDistance Center; + App::PropertyDistance Length; + App::PropertyDistance Width; + App::PropertyDistance Height; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostBoxFunction"; } @@ -113,20 +122,20 @@ protected: // --------------------------------------------------------------------------- -class FemExport FemPostCylinderFunction : public FemPostFunction +class FemExport FemPostCylinderFunction: public FemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostCylinderFunction); public: - FemPostCylinderFunction(); ~FemPostCylinderFunction() override; - App::PropertyVector Axis; - App::PropertyVectorDistance Center; - App::PropertyDistance Radius; + App::PropertyVector Axis; + App::PropertyVectorDistance Center; + App::PropertyDistance Radius; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostCylinderFunction"; } @@ -140,19 +149,19 @@ protected: // --------------------------------------------------------------------------- -class FemExport FemPostPlaneFunction : public FemPostFunction +class FemExport FemPostPlaneFunction: public FemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostPlaneFunction); public: - FemPostPlaneFunction(); ~FemPostPlaneFunction() override; - App::PropertyVector Normal; - App::PropertyVectorDistance Origin; + App::PropertyVector Normal; + App::PropertyVectorDistance Origin; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostPlaneFunction"; } @@ -166,19 +175,19 @@ protected: // --------------------------------------------------------------------------- -class FemExport FemPostSphereFunction : public FemPostFunction +class FemExport FemPostSphereFunction: public FemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostSphereFunction); public: - FemPostSphereFunction(); ~FemPostSphereFunction() override; - App::PropertyDistance Radius; - App::PropertyVectorDistance Center; + App::PropertyDistance Radius; + App::PropertyVectorDistance Center; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostSphereFunction"; } @@ -188,7 +197,7 @@ protected: vtkSmartPointer m_sphere; }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemPostFunction_H +#endif // Fem_FemPostFunction_H diff --git a/src/Mod/Fem/App/FemPostObject.cpp b/src/Mod/Fem/App/FemPostObject.cpp index 3be1a3f154..afb7ff4953 100644 --- a/src/Mod/Fem/App/FemPostObject.cpp +++ b/src/Mod/Fem/App/FemPostObject.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "FemPostObject.h" @@ -42,13 +42,15 @@ FemPostObject::FemPostObject() FemPostObject::~FemPostObject() = default; -vtkBoundingBox FemPostObject::getBoundingBox() { +vtkBoundingBox FemPostObject::getBoundingBox() +{ vtkBoundingBox box; vtkDataSet* dset = vtkDataSet::SafeDownCast(Data.getValue()); - if (dset) + if (dset) { box.AddBounds(dset->GetBounds()); + } // TODO: add calculation of multiblock and Multipiece datasets diff --git a/src/Mod/Fem/App/FemPostObject.h b/src/Mod/Fem/App/FemPostObject.h index f7c00c4a83..4f0c840436 100644 --- a/src/Mod/Fem/App/FemPostObject.h +++ b/src/Mod/Fem/App/FemPostObject.h @@ -24,8 +24,8 @@ #ifndef Fem_FemPostObject_H #define Fem_FemPostObject_H -#include #include "PropertyPostDataObject.h" +#include #include @@ -34,7 +34,7 @@ namespace Fem // poly data is the only data we can visualize, hence every post // processing object needs to expose it -class FemExport FemPostObject : public App::GeoFeature +class FemExport FemPostObject: public App::GeoFeature { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostObject); @@ -48,7 +48,7 @@ public: vtkBoundingBox getBoundingBox(); }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemPostObject_H +#endif // Fem_FemPostObject_H diff --git a/src/Mod/Fem/App/FemPostPipeline.cpp b/src/Mod/Fem/App/FemPostPipeline.cpp index 16e1d43423..53ac2721ae 100644 --- a/src/Mod/Fem/App/FemPostPipeline.cpp +++ b/src/Mod/Fem/App/FemPostPipeline.cpp @@ -23,27 +23,27 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include -#include "FemPostPipeline.h" -#include "FemPostPipelinePy.h" #include "FemMesh.h" #include "FemMeshObject.h" +#include "FemPostPipeline.h" +#include "FemPostPipelinePy.h" #include "FemVTKTools.h" @@ -51,12 +51,15 @@ using namespace Fem; using namespace App; PROPERTY_SOURCE(Fem::FemPostPipeline, Fem::FemPostObject) -const char* FemPostPipeline::ModeEnums[] = { "Serial", "Parallel", "Custom", nullptr }; +const char* FemPostPipeline::ModeEnums[] = {"Serial", "Parallel", "Custom", nullptr}; FemPostPipeline::FemPostPipeline() { - ADD_PROPERTY_TYPE( - Filter, (nullptr), "Pipeline", App::Prop_None, "The filter used in this pipeline"); + ADD_PROPERTY_TYPE(Filter, + (nullptr), + "Pipeline", + App::Prop_None, + "The filter used in this pipeline"); ADD_PROPERTY_TYPE(Functions, (nullptr), "Pipeline", @@ -77,25 +80,28 @@ FemPostPipeline::~FemPostPipeline() = default; short FemPostPipeline::mustExecute() const { - if (Mode.isTouched()) + if (Mode.isTouched()) { return 1; + } return FemPostFilter::mustExecute(); } -DocumentObjectExecReturn* FemPostPipeline::execute() { +DocumentObjectExecReturn* FemPostPipeline::execute() +{ // if we are the toplevel pipeline our data object is not created by filters, // we are the main source - if (!Input.getValue()) + if (!Input.getValue()) { return StdReturn; + } // now if we are a filter than our data object is created by the filter we hold // if we are in serial mode we just copy over the data of the last filter, // but if we are in parallel we need to combine all filter results if (Mode.getValue() == 0) { - //serial + // serial Data.setValue(getLastPostObject()->Data.getValue()); } else if (Mode.getValue() == 1) { @@ -117,34 +123,45 @@ DocumentObjectExecReturn* FemPostPipeline::execute() { } -bool FemPostPipeline::canRead(Base::FileInfo File) { +bool FemPostPipeline::canRead(Base::FileInfo File) +{ // from FemResult only unstructural mesh is supported in femvtktoools.cpp return File.hasExtension({"vtk", "vtp", "vts", "vtr", "vti", "vtu", "pvtu"}); } -void FemPostPipeline::read(Base::FileInfo File) { +void FemPostPipeline::read(Base::FileInfo File) +{ // checking on the file - if (!File.isReadable()) + if (!File.isReadable()) { throw Base::FileException("File to load not existing or not readable", File); + } - if (File.hasExtension("vtu")) + if (File.hasExtension("vtu")) { readXMLFile(File.filePath()); - else if (File.hasExtension("pvtu")) + } + else if (File.hasExtension("pvtu")) { readXMLFile(File.filePath()); - else if (File.hasExtension("vtp")) + } + else if (File.hasExtension("vtp")) { readXMLFile(File.filePath()); - else if (File.hasExtension("vts")) + } + else if (File.hasExtension("vts")) { readXMLFile(File.filePath()); - else if (File.hasExtension("vtr")) + } + else if (File.hasExtension("vtr")) { readXMLFile(File.filePath()); - else if (File.hasExtension("vti")) + } + else if (File.hasExtension("vti")) { readXMLFile(File.filePath()); - else if (File.hasExtension("vtk")) + } + else if (File.hasExtension("vtk")) { readXMLFile(File.filePath()); - else + } + else { throw Base::FileException("Unknown extension"); + } } void FemPostPipeline::scale(double s) @@ -158,14 +175,16 @@ void FemPostPipeline::onChanged(const Property* prop) // if we are in custom mode the user is free to set the input // thus nothing needs to be done here - if (Mode.getValue() == 2) // custom + if (Mode.getValue() == 2) { // custom return; + } // we check if all connections are right and add new ones if needed std::vector objs = Filter.getValues(); - if (objs.empty()) + if (objs.empty()) { return; + } std::vector::iterator it = objs.begin(); FemPostFilter* filter = static_cast(*it); @@ -174,8 +193,9 @@ void FemPostPipeline::onChanged(const Property* prop) if (Input.getValue()) { // the first filter is always connected to the input - if (filter->Input.getValue() != Input.getValue()) + if (filter->Input.getValue() != Input.getValue()) { filter->Input.setValue(Input.getValue()); + } // all the others need to be connected to the previous filter or the source, // dependent on the mode @@ -183,13 +203,15 @@ void FemPostPipeline::onChanged(const Property* prop) for (; it != objs.end(); ++it) { FemPostFilter* nextFilter = static_cast(*it); - if (Mode.getValue() == 0) { //serial mode - if (nextFilter->Input.getValue() != filter) + if (Mode.getValue() == 0) { // serial mode + if (nextFilter->Input.getValue() != filter) { nextFilter->Input.setValue(filter); + } } - else { //Parallel mode - if (nextFilter->Input.getValue() != Input.getValue()) + else { // Parallel mode + if (nextFilter->Input.getValue() != Input.getValue()) { nextFilter->Input.setValue(Input.getValue()); + } } filter = nextFilter; @@ -198,8 +220,9 @@ void FemPostPipeline::onChanged(const Property* prop) // if we have no input the filters are responsible of grabbing the pipeline data themself else { // the first filter must always grab the data - if (filter->Input.getValue()) + if (filter->Input.getValue()) { filter->Input.setValue(nullptr); + } // all the others need to be connected to the previous filter or grab the data, // dependent on mode @@ -207,13 +230,15 @@ void FemPostPipeline::onChanged(const Property* prop) for (; it != objs.end(); ++it) { FemPostFilter* nextFilter = static_cast(*it); - if (Mode.getValue() == 0) { //serial mode - if (nextFilter->Input.getValue() != filter) + if (Mode.getValue() == 0) { // serial mode + if (nextFilter->Input.getValue() != filter) { nextFilter->Input.setValue(filter); + } } - else { //Parallel mode - if (nextFilter->Input.getValue()) + else { // Parallel mode + if (nextFilter->Input.getValue()) { nextFilter->Input.setValue(nullptr); + } } filter = nextFilter; @@ -222,35 +247,40 @@ void FemPostPipeline::onChanged(const Property* prop) } App::GeoFeature::onChanged(prop); - } void FemPostPipeline::recomputeChildren() { - for (const auto &obj : Filter.getValues()) + for (const auto& obj : Filter.getValues()) { obj->touch(); + } } -FemPostObject* FemPostPipeline::getLastPostObject() { +FemPostObject* FemPostPipeline::getLastPostObject() +{ - if (Filter.getValues().empty()) + if (Filter.getValues().empty()) { return this; + } return static_cast(Filter.getValues().back()); } -bool FemPostPipeline::holdsPostObject(FemPostObject* obj) { +bool FemPostPipeline::holdsPostObject(FemPostObject* obj) +{ std::vector::const_iterator it = Filter.getValues().begin(); for (; it != Filter.getValues().end(); ++it) { - if (*it == obj) + if (*it == obj) { return true; + } } return false; } -void FemPostPipeline::load(FemResultObject* res) { +void FemPostPipeline::load(FemResultObject* res) +{ if (!res->Mesh.getValue()) { Base::Console().Log("Result mesh object is empty.\n"); return; diff --git a/src/Mod/Fem/App/FemPostPipeline.h b/src/Mod/Fem/App/FemPostPipeline.h index 0022a6f7c7..475b0e6f99 100644 --- a/src/Mod/Fem/App/FemPostPipeline.h +++ b/src/Mod/Fem/App/FemPostPipeline.h @@ -34,7 +34,7 @@ namespace Fem { -class FemExport FemPostPipeline : public Fem::FemPostFilter +class FemExport FemPostPipeline: public Fem::FemPostFilter { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemPostPipeline); @@ -43,38 +43,41 @@ public: FemPostPipeline(); ~FemPostPipeline() override; - App::PropertyLinkList Filter; - App::PropertyLink Functions; - App::PropertyEnumeration Mode; + App::PropertyLinkList Filter; + App::PropertyLink Functions; + App::PropertyEnumeration Mode; short mustExecute() const override; App::DocumentObjectExecReturn* execute() override; PyObject* getPyObject() override; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderFemPostPipeline"; } - //load data from files + // load data from files static bool canRead(Base::FileInfo file); void read(Base::FileInfo file); void scale(double s); - //load from results + // load from results void load(FemResultObject* res); - //Pipeline handling + // Pipeline handling void recomputeChildren(); - FemPostObject *getLastPostObject(); - bool holdsPostObject(FemPostObject *obj); + FemPostObject* getLastPostObject(); + bool holdsPostObject(FemPostObject* obj); protected: - void onChanged(const App::Property *prop) override; + void onChanged(const App::Property* prop) override; private: static const char* ModeEnums[]; - template void readXMLFile(std::string file) { + template + void readXMLFile(std::string file) + { vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(file.c_str()); @@ -83,7 +86,7 @@ private: } }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemPostPipeline_H +#endif // Fem_FemPostPipeline_H diff --git a/src/Mod/Fem/App/FemPostPipelinePyImp.cpp b/src/Mod/Fem/App/FemPostPipelinePyImp.cpp index 484df01a5a..485ee6e6ce 100644 --- a/src/Mod/Fem/App/FemPostPipelinePyImp.cpp +++ b/src/Mod/Fem/App/FemPostPipelinePyImp.cpp @@ -22,14 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include +// clang-format off #include "FemPostPipeline.h" #include "FemPostPipelinePy.h" #include "FemPostPipelinePy.cpp" +// clang-format on using namespace Fem; @@ -40,7 +42,7 @@ std::string FemPostPipelinePy::representation() const return {""}; } -PyObject* FemPostPipelinePy::read(PyObject *args) +PyObject* FemPostPipelinePy::read(PyObject* args) { char* Name; if (PyArg_ParseTuple(args, "et", "utf-8", &Name)) { @@ -51,7 +53,7 @@ PyObject* FemPostPipelinePy::read(PyObject *args) return nullptr; } -PyObject* FemPostPipelinePy::scale(PyObject *args) +PyObject* FemPostPipelinePy::scale(PyObject* args) { double scale; if (PyArg_ParseTuple(args, "d", &scale)) { @@ -61,11 +63,12 @@ PyObject* FemPostPipelinePy::scale(PyObject *args) return nullptr; } -PyObject* FemPostPipelinePy::load(PyObject *args) +PyObject* FemPostPipelinePy::load(PyObject* args) { PyObject* py; - if (!PyArg_ParseTuple(args, "O!", &(App::DocumentObjectPy::Type), &py)) + if (!PyArg_ParseTuple(args, "O!", &(App::DocumentObjectPy::Type), &py)) { return nullptr; + } App::DocumentObject* obj = static_cast(py)->getDocumentObjectPtr(); if (!obj->getTypeId().isDerivedFrom(FemResultObject::getClassTypeId())) { @@ -77,31 +80,35 @@ PyObject* FemPostPipelinePy::load(PyObject *args) Py_Return; } -PyObject *FemPostPipelinePy::recomputeChildren(PyObject *args) +PyObject* FemPostPipelinePy::recomputeChildren(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getFemPostPipelinePtr()->recomputeChildren(); Py_Return; } -PyObject* FemPostPipelinePy::getLastPostObject(PyObject *args) +PyObject* FemPostPipelinePy::getLastPostObject(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } App::DocumentObject* obj = getFemPostPipelinePtr()->getLastPostObject(); - if (obj) + if (obj) { return obj->getPyObject(); + } Py_Return; } -PyObject* FemPostPipelinePy::holdsPostObject(PyObject *args) +PyObject* FemPostPipelinePy::holdsPostObject(PyObject* args) { PyObject* py; - if (!PyArg_ParseTuple(args, "O!", &(App::DocumentObjectPy::Type), &py)) + if (!PyArg_ParseTuple(args, "O!", &(App::DocumentObjectPy::Type), &py)) { return nullptr; + } App::DocumentObject* obj = static_cast(py)->getDocumentObjectPtr(); if (!obj->getTypeId().isDerivedFrom(FemPostObject::getClassTypeId())) { @@ -113,7 +120,7 @@ PyObject* FemPostPipelinePy::holdsPostObject(PyObject *args) return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject *FemPostPipelinePy::getCustomAttributes(const char* /*attr*/) const +PyObject* FemPostPipelinePy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Fem/App/FemResultObject.cpp b/src/Mod/Fem/App/FemResultObject.cpp index d7e8fc676f..f14d561252 100644 --- a/src/Mod/Fem/App/FemResultObject.cpp +++ b/src/Mod/Fem/App/FemResultObject.cpp @@ -54,29 +54,34 @@ short FemResultObject::mustExecute() const return 0; } -PyObject *FemResultObject::getPyObject() +PyObject* FemResultObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } return Py::new_reference_to(PythonObject); } // Python feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Fem::FemResultObjectPython, Fem::FemResultObject) -template<> const char* Fem::FemResultObjectPython::getViewProviderName() const { +template<> +const char* Fem::FemResultObjectPython::getViewProviderName() const +{ return "FemGui::ViewProviderResultPython"; } /// @endcond -template<> PyObject* Fem::FemResultObjectPython::getPyObject() { +template<> +PyObject* Fem::FemResultObjectPython::getPyObject() +{ if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new App::FeaturePythonPyT(this),true); + PythonObject = Py::Object(new App::FeaturePythonPyT(this), true); } return Py::new_reference_to(PythonObject); } @@ -84,4 +89,4 @@ template<> PyObject* Fem::FemResultObjectPython::getPyObject() { // explicit template instantiation template class FemExport FeaturePythonT; -} +} // namespace App diff --git a/src/Mod/Fem/App/FemResultObject.h b/src/Mod/Fem/App/FemResultObject.h index 97de965e4a..5104d0a752 100644 --- a/src/Mod/Fem/App/FemResultObject.h +++ b/src/Mod/Fem/App/FemResultObject.h @@ -31,7 +31,7 @@ namespace Fem { /// Father of all result data in a Fem Analysis -class FemExport FemResultObject : public App::DocumentObject +class FemExport FemResultObject: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemResultObject); @@ -50,20 +50,22 @@ public: /// Displacement vectors of analysis /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderResult"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; + PyObject* getPyObject() override; }; using FemResultObjectPython = App::FeaturePythonT; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemResultObject_H +#endif // Fem_FemResultObject_H diff --git a/src/Mod/Fem/App/FemSetElementsObject.cpp b/src/Mod/Fem/App/FemSetElementsObject.cpp index 08bf489f28..ed2c321138 100644 --- a/src/Mod/Fem/App/FemSetElementsObject.cpp +++ b/src/Mod/Fem/App/FemSetElementsObject.cpp @@ -42,12 +42,11 @@ short FemSetElementsObject::mustExecute() const return 0; } -PyObject *FemSetElementsObject::getPyObject() +PyObject* FemSetElementsObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } return Py::new_reference_to(PythonObject); } - diff --git a/src/Mod/Fem/App/FemSetElementsObject.h b/src/Mod/Fem/App/FemSetElementsObject.h index 4889a892df..4a021166d4 100644 --- a/src/Mod/Fem/App/FemSetElementsObject.h +++ b/src/Mod/Fem/App/FemSetElementsObject.h @@ -23,14 +23,14 @@ #ifndef Fem_FemSetElementsObjec_H #define Fem_FemSetElementsObjec_H -#include #include "FemSetObject.h" +#include namespace Fem { -class FemExport FemSetElementsObject : public FemSetObject +class FemExport FemSetElementsObject: public FemSetObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemSetElementsObject); @@ -40,19 +40,19 @@ public: ~FemSetElementsObject() override; // returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderSetElements"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; - - + PyObject* getPyObject() override; }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemSetElementsObjec_H +#endif // Fem_FemSetElementsObjec_H diff --git a/src/Mod/Fem/App/FemSetFacesObject.cpp b/src/Mod/Fem/App/FemSetFacesObject.cpp index 4aca555e60..c8d6816150 100644 --- a/src/Mod/Fem/App/FemSetFacesObject.cpp +++ b/src/Mod/Fem/App/FemSetFacesObject.cpp @@ -42,12 +42,11 @@ short FemSetFacesObject::mustExecute() const return 0; } -PyObject *FemSetFacesObject::getPyObject() +PyObject* FemSetFacesObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } return Py::new_reference_to(PythonObject); } - diff --git a/src/Mod/Fem/App/FemSetFacesObject.h b/src/Mod/Fem/App/FemSetFacesObject.h index 834e8fa310..8d921e4e32 100644 --- a/src/Mod/Fem/App/FemSetFacesObject.h +++ b/src/Mod/Fem/App/FemSetFacesObject.h @@ -23,14 +23,14 @@ #ifndef Fem_FemSetFacesObject_H #define Fem_FemSetFacesObject_H -#include #include "FemSetObject.h" +#include namespace Fem { -class FemExport FemSetFacesObject : public FemSetObject +class FemExport FemSetFacesObject: public FemSetObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemSetFacesObject); @@ -40,17 +40,19 @@ public: ~FemSetFacesObject() override; // returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderSetFaces"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; + PyObject* getPyObject() override; }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemSetFacesObject_H +#endif // Fem_FemSetFacesObject_H diff --git a/src/Mod/Fem/App/FemSetGeometryObject.cpp b/src/Mod/Fem/App/FemSetGeometryObject.cpp index 57044225c7..55025bf087 100644 --- a/src/Mod/Fem/App/FemSetGeometryObject.cpp +++ b/src/Mod/Fem/App/FemSetGeometryObject.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" -#include #include "FemSetGeometryObject.h" +#include using namespace Fem; @@ -41,12 +41,11 @@ short FemSetGeometryObject::mustExecute() const return 0; } -PyObject *FemSetGeometryObject::getPyObject() +PyObject* FemSetGeometryObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } return Py::new_reference_to(PythonObject); } - diff --git a/src/Mod/Fem/App/FemSetGeometryObject.h b/src/Mod/Fem/App/FemSetGeometryObject.h index 4135786826..a9de42bba6 100644 --- a/src/Mod/Fem/App/FemSetGeometryObject.h +++ b/src/Mod/Fem/App/FemSetGeometryObject.h @@ -23,14 +23,14 @@ #ifndef Fem_FemSetGeometryObject_H #define Fem_FemSetGeometryObject_H -#include #include "FemSetObject.h" +#include namespace Fem { -class FemExport FemSetGeometryObject : public FemSetObject +class FemExport FemSetGeometryObject: public FemSetObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemSetGeometryObject); @@ -40,19 +40,19 @@ public: ~FemSetGeometryObject() override; // returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderSetGeometry"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; - - + PyObject* getPyObject() override; }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemSetGeometryObject_H +#endif // Fem_FemSetGeometryObject_H diff --git a/src/Mod/Fem/App/FemSetNodesObject.cpp b/src/Mod/Fem/App/FemSetNodesObject.cpp index 0554831fa4..467acf402d 100644 --- a/src/Mod/Fem/App/FemSetNodesObject.cpp +++ b/src/Mod/Fem/App/FemSetNodesObject.cpp @@ -35,7 +35,7 @@ PROPERTY_SOURCE(Fem::FemSetNodesObject, Fem::FemSetObject) FemSetNodesObject::FemSetNodesObject() { - ADD_PROPERTY_TYPE(Nodes,(), "Node indexes",Prop_None,"Nodes belonging to the NodesSet"); + ADD_PROPERTY_TYPE(Nodes, (), "Node indexes", Prop_None, "Nodes belonging to the NodesSet"); } FemSetNodesObject::~FemSetNodesObject() = default; @@ -45,12 +45,11 @@ short FemSetNodesObject::mustExecute() const return 0; } -PyObject *FemSetNodesObject::getPyObject() +PyObject* FemSetNodesObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } return Py::new_reference_to(PythonObject); } - diff --git a/src/Mod/Fem/App/FemSetNodesObject.h b/src/Mod/Fem/App/FemSetNodesObject.h index f33f780675..d9b292f7aa 100644 --- a/src/Mod/Fem/App/FemSetNodesObject.h +++ b/src/Mod/Fem/App/FemSetNodesObject.h @@ -24,14 +24,14 @@ #ifndef Fem_FemSetNodesObject_H #define Fem_FemSetNodesObject_H +#include "FemSetObject.h" #include #include -#include "FemSetObject.h" namespace Fem { -class FemExport FemSetNodesObject : public FemSetObject +class FemExport FemSetNodesObject: public FemSetObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemSetNodesObject); @@ -43,19 +43,19 @@ public: App::PropertyIntegerSet Nodes; // returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderSetNodes"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; - - + PyObject* getPyObject() override; }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemSetNodesObject_H +#endif // Fem_FemSetNodesObject_H diff --git a/src/Mod/Fem/App/FemSetObject.cpp b/src/Mod/Fem/App/FemSetObject.cpp index 3cdcb59f7b..05ee5f2648 100644 --- a/src/Mod/Fem/App/FemSetObject.cpp +++ b/src/Mod/Fem/App/FemSetObject.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" -#include #include "FemSetObject.h" +#include using namespace Fem; @@ -34,7 +34,7 @@ PROPERTY_SOURCE(Fem::FemSetObject, App::DocumentObject) FemSetObject::FemSetObject() { - ADD_PROPERTY_TYPE(FemMesh,(nullptr), "MeshSet link",Prop_None,"MeshSet the set belongs to"); + ADD_PROPERTY_TYPE(FemMesh, (nullptr), "MeshSet link", Prop_None, "MeshSet the set belongs to"); } FemSetObject::~FemSetObject() = default; @@ -44,12 +44,11 @@ short FemSetObject::mustExecute() const return 0; } -PyObject *FemSetObject::getPyObject() +PyObject* FemSetObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } return Py::new_reference_to(PythonObject); } - diff --git a/src/Mod/Fem/App/FemSetObject.h b/src/Mod/Fem/App/FemSetObject.h index 2d25a059bf..9f121fdad8 100644 --- a/src/Mod/Fem/App/FemSetObject.h +++ b/src/Mod/Fem/App/FemSetObject.h @@ -31,7 +31,7 @@ namespace Fem { -class FemExport FemSetObject : public App::DocumentObject +class FemExport FemSetObject: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemSetObject); @@ -43,19 +43,18 @@ public: App::PropertyLink FemMesh; /// returns the type name of the ViewProvider - //virtual const char* getViewProviderName(void) const { - // return "FemGui::ViewProviderFemSet"; - //} - App::DocumentObjectExecReturn *execute() override { + // virtual const char* getViewProviderName(void) const { + // return "FemGui::ViewProviderFemSet"; + // } + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; - - + PyObject* getPyObject() override; }; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemSetObject_H +#endif // Fem_FemSetObject_H diff --git a/src/Mod/Fem/App/FemSolverObject.cpp b/src/Mod/Fem/App/FemSolverObject.cpp index 7ca43ff8f1..8809c216aa 100644 --- a/src/Mod/Fem/App/FemSolverObject.cpp +++ b/src/Mod/Fem/App/FemSolverObject.cpp @@ -44,28 +44,33 @@ short FemSolverObject::mustExecute() const return 0; } -PyObject *FemSolverObject::getPyObject() +PyObject* FemSolverObject::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new DocumentObjectPy(this),true); + PythonObject = Py::Object(new DocumentObjectPy(this), true); } return Py::new_reference_to(PythonObject); } // Python feature --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Fem::FemSolverObjectPython, Fem::FemSolverObject) -template<> const char* Fem::FemSolverObjectPython::getViewProviderName() const { +template<> +const char* Fem::FemSolverObjectPython::getViewProviderName() const +{ return "FemGui::ViewProviderSolverPython"; } -template<> PyObject* Fem::FemSolverObjectPython::getPyObject() { +template<> +PyObject* Fem::FemSolverObjectPython::getPyObject() +{ if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new App::FeaturePythonPyT(this),true); + PythonObject = Py::Object(new App::FeaturePythonPyT(this), true); } return Py::new_reference_to(PythonObject); } @@ -73,4 +78,4 @@ template<> PyObject* Fem::FemSolverObjectPython::getPyObject() { // explicit template instantiation template class FemExport FeaturePythonT; -} +} // namespace App diff --git a/src/Mod/Fem/App/FemSolverObject.h b/src/Mod/Fem/App/FemSolverObject.h index ab5a7b0e13..629f7cbc7d 100644 --- a/src/Mod/Fem/App/FemSolverObject.h +++ b/src/Mod/Fem/App/FemSolverObject.h @@ -31,7 +31,7 @@ namespace Fem { /// Father of all result data in a Fem Analysis -class FemExport FemSolverObject : public App::DocumentObject +class FemExport FemSolverObject: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Fem::FemSolverObject); @@ -43,20 +43,21 @@ public: // Attributes are implemented in the FemSolverObjectPython /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "FemGui::ViewProviderSolver"; } - App::DocumentObjectExecReturn *execute() override { + App::DocumentObjectExecReturn* execute() override + { return App::DocumentObject::StdReturn; } short mustExecute() const override; - PyObject *getPyObject() override; - + PyObject* getPyObject() override; }; using FemSolverObjectPython = App::FeaturePythonT; -} //namespace Fem +} // namespace Fem -#endif // Fem_FemSolverObject_H +#endif // Fem_FemSolverObject_H diff --git a/src/Mod/Fem/App/FemTools.cpp b/src/Mod/Fem/App/FemTools.cpp index d622862fcf..585e62c559 100644 --- a/src/Mod/Fem/App/FemTools.cpp +++ b/src/Mod/Fem/App/FemTools.cpp @@ -23,24 +23,24 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -78,22 +78,22 @@ bool Fem::Tools::isPlanar(const TopoDS_Face& face) else if (surface.GetType() == GeomAbs_BSplineSurface) { Handle(Geom_BSplineSurface) spline = surface.BSpline(); try { - TColgp_Array2OfPnt poles(1,spline->NbUPoles(),1,spline->NbVPoles()); + TColgp_Array2OfPnt poles(1, spline->NbUPoles(), 1, spline->NbVPoles()); spline->Poles(poles); // get the plane from three control points - gp_Pnt p1 = poles(poles.LowerRow(),poles.LowerCol()); - gp_Pnt p2 = poles(poles.UpperRow(),poles.LowerCol()); - gp_Pnt p3 = poles(poles.LowerRow(),poles.UpperCol()); + gp_Pnt p1 = poles(poles.LowerRow(), poles.LowerCol()); + gp_Pnt p2 = poles(poles.UpperRow(), poles.LowerCol()); + gp_Pnt p3 = poles(poles.LowerRow(), poles.UpperCol()); gp_Vec vec1(p1, p2); gp_Vec vec2(p1, p3); gp_Vec vec3 = vec1.Crossed(vec2); gp_Pln plane(p1, gp_Dir(vec3)); - for (int i=poles.LowerRow(); i<=poles.UpperRow(); i++) { - for (int j=poles.LowerCol(); j Precision::Confusion()) { return false; @@ -110,22 +110,22 @@ bool Fem::Tools::isPlanar(const TopoDS_Face& face) else if (surface.GetType() == GeomAbs_BezierSurface) { Handle(Geom_BezierSurface) bezier = surface.Bezier(); try { - TColgp_Array2OfPnt poles(1,bezier->NbUPoles(),1,bezier->NbVPoles()); + TColgp_Array2OfPnt poles(1, bezier->NbUPoles(), 1, bezier->NbVPoles()); bezier->Poles(poles); // get the plane from three control points - gp_Pnt p1 = poles(poles.LowerRow(),poles.LowerCol()); - gp_Pnt p2 = poles(poles.UpperRow(),poles.LowerCol()); - gp_Pnt p3 = poles(poles.LowerRow(),poles.UpperCol()); + gp_Pnt p1 = poles(poles.LowerRow(), poles.LowerCol()); + gp_Pnt p2 = poles(poles.UpperRow(), poles.LowerCol()); + gp_Pnt p3 = poles(poles.LowerRow(), poles.UpperCol()); gp_Vec vec1(p1, p2); gp_Vec vec2(p1, p3); gp_Vec vec3 = vec1.Crossed(vec2); gp_Pln plane(p1, gp_Dir(vec3)); - for (int i=poles.LowerRow(); i<=poles.UpperRow(); i++) { - for (int j=poles.LowerCol(); j Precision::Confusion()) { return false; @@ -154,13 +154,13 @@ gp_XYZ Fem::Tools::getDirection(const TopoDS_Face& face) else if (surface.GetType() == GeomAbs_BSplineSurface) { Handle(Geom_BSplineSurface) spline = surface.BSpline(); try { - TColgp_Array2OfPnt poles(1,spline->NbUPoles(),1,spline->NbVPoles()); + TColgp_Array2OfPnt poles(1, spline->NbUPoles(), 1, spline->NbVPoles()); spline->Poles(poles); // get the plane from three control points - gp_Pnt p1 = poles(poles.LowerRow(),poles.LowerCol()); - gp_Pnt p2 = poles(poles.UpperRow(),poles.LowerCol()); - gp_Pnt p3 = poles(poles.LowerRow(),poles.UpperCol()); + gp_Pnt p1 = poles(poles.LowerRow(), poles.LowerCol()); + gp_Pnt p2 = poles(poles.UpperRow(), poles.LowerCol()); + gp_Pnt p3 = poles(poles.LowerRow(), poles.UpperCol()); gp_Vec vec1(p1, p2); gp_Vec vec2(p1, p3); gp_Vec vec3 = vec1.Crossed(vec2); @@ -173,13 +173,13 @@ gp_XYZ Fem::Tools::getDirection(const TopoDS_Face& face) else if (surface.GetType() == GeomAbs_BezierSurface) { Handle(Geom_BezierSurface) bezier = surface.Bezier(); try { - TColgp_Array2OfPnt poles(1,bezier->NbUPoles(),1,bezier->NbVPoles()); + TColgp_Array2OfPnt poles(1, bezier->NbUPoles(), 1, bezier->NbVPoles()); bezier->Poles(poles); // get the plane from three control points - gp_Pnt p1 = poles(poles.LowerRow(),poles.LowerCol()); - gp_Pnt p2 = poles(poles.UpperRow(),poles.LowerCol()); - gp_Pnt p3 = poles(poles.LowerRow(),poles.UpperCol()); + gp_Pnt p1 = poles(poles.LowerRow(), poles.LowerCol()); + gp_Pnt p2 = poles(poles.UpperRow(), poles.LowerCol()); + gp_Pnt p3 = poles(poles.LowerRow(), poles.UpperCol()); gp_Vec vec1(p1, p2); gp_Vec vec2(p1, p3); gp_Vec vec3 = vec1.Crossed(vec2); @@ -207,7 +207,7 @@ bool Fem::Tools::isLinear(const TopoDS_Edge& edge) gp_Vec vec(s1, sn); gp_Lin line(s1, gp_Dir(vec)); - for (int i=2; iNbPoles(); i++) { + for (int i = 2; i < spline->NbPoles(); i++) { // are control points collinear? Standard_Real dist = line.Distance(spline->Pole(i)); if (dist > Precision::Confusion()) { @@ -229,7 +229,7 @@ bool Fem::Tools::isLinear(const TopoDS_Edge& edge) gp_Vec vec(s1, sn); gp_Lin line(s1, gp_Dir(vec)); - for (int i=2; iNbPoles(); i++) { + for (int i = 2; i < bezier->NbPoles(); i++) { // are control points collinear? Standard_Real dist = line.Distance(bezier->Pole(i)); if (dist > Precision::Confusion()) { @@ -285,8 +285,8 @@ gp_XYZ Fem::Tools::getDirection(const TopoDS_Edge& edge) // function to determine 3rd-party binaries used by the FEM WB std::string Fem::Tools::checkIfBinaryExists(std::string prefSection, - std::string prefBinaryName, - std::string binaryName) + std::string prefBinaryName, + std::string binaryName) { // if "Search in known binary directories" is set in the preferences, we ignore custom path auto paramPath = "User parameter:BaseApp/Preferences/Mod/Fem/" + prefSection; @@ -305,8 +305,9 @@ std::string Fem::Tools::checkIfBinaryExists(std::string prefSection, // check the folder of the FreeCAD binary else { auto homePathBinary = App::Application::getHomePath() + "bin/" + binaryName; - if (QFileInfo::exists(QString::fromLatin1(homePathBinary.c_str()))) + if (QFileInfo::exists(QString::fromLatin1(homePathBinary.c_str()))) { return binaryName; + } } } else { @@ -315,8 +316,9 @@ std::string Fem::Tools::checkIfBinaryExists(std::string prefSection, App::GetApplication().GetParameterGroupByPath(paramPath.c_str()); auto binaryPath = hGrp->GetASCII(binaryPathString.c_str(), ""); QFileInfo::exists(QString::fromLatin1(binaryPath.c_str())); - if (QFileInfo::exists(QString::fromLatin1(binaryPath.c_str()))) + if (QFileInfo::exists(QString::fromLatin1(binaryPath.c_str()))) { return binaryPath; + } } return ""; } diff --git a/src/Mod/Fem/App/FemTools.h b/src/Mod/Fem/App/FemTools.h index 628923570b..d5397df0df 100644 --- a/src/Mod/Fem/App/FemTools.h +++ b/src/Mod/Fem/App/FemTools.h @@ -25,8 +25,8 @@ #define FEM_TOOLS_H #include -#include #include +#include class TopoDS_Shape; class TopoDS_Edge; @@ -72,11 +72,12 @@ public: The result is either the full path if available or just the binary name if it was found in a system path */ - static std::string checkIfBinaryExists(std::string prefSection, std::string prefBinaryPath, + static std::string checkIfBinaryExists(std::string prefSection, + std::string prefBinaryPath, std::string prefBinaryName); }; -} //namespace Fem +} // namespace Fem -#endif // FEM_TOOLS_H +#endif // FEM_TOOLS_H diff --git a/src/Mod/Fem/App/FemVTKTools.cpp b/src/Mod/Fem/App/FemVTKTools.cpp index 1b572bba94..49ff9f0d39 100644 --- a/src/Mod/Fem/App/FemVTKTools.cpp +++ b/src/Mod/Fem/App/FemVTKTools.cpp @@ -24,38 +24,38 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -66,31 +66,31 @@ #include #include -#include "FemVTKTools.h" #include "FemAnalysis.h" #include "FemResultObject.h" +#include "FemVTKTools.h" namespace Fem { -template vtkDataSet* readVTKFile(const char*fileName) +template +vtkDataSet* readVTKFile(const char* fileName) { - vtkSmartPointer reader = - vtkSmartPointer::New(); + vtkSmartPointer reader = vtkSmartPointer::New(); reader->SetFileName(fileName); reader->Update(); auto output = reader->GetOutput(); - if (output) + if (output) { output->Register(reader); + } return vtkDataSet::SafeDownCast(output); } template void writeVTKFile(const char* filename, vtkSmartPointer dataset) { - vtkSmartPointer writer = - vtkSmartPointer::New(); + vtkSmartPointer writer = vtkSmartPointer::New(); writer->SetFileName(filename); writer->SetInputData(dataset); writer->Write(); @@ -104,11 +104,11 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me Base::Console().Log("%d nodes/points and %d cells/elements found!\n", nPoints, nCells); Base::Console().Log("Build SMESH mesh out of the vtk mesh data.\n", nPoints, nCells); - //vtkSmartPointer cells = dataset->GetCells(); - // works only for vtkUnstructuredGrid - vtkSmartPointer idlist= vtkSmartPointer::New(); + // vtkSmartPointer cells = dataset->GetCells(); + // works only for vtkUnstructuredGrid + vtkSmartPointer idlist = vtkSmartPointer::New(); - //Now fill the SMESH datastructure + // Now fill the SMESH datastructure SMESH_Mesh* smesh = mesh->getSMesh(); SMESHDS_Mesh* meshds = smesh->GetMeshDS(); meshds->ClearMesh(); @@ -124,10 +124,10 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me vtkIdType* ids = idlist->GetPointer(0); switch (dataset->GetCellType(iCell)) { // 2D faces - case VTK_TRIANGLE:// tria3 + case VTK_TRIANGLE: // tria3 meshds->AddFaceWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, iCell + 1); break; - case VTK_QUADRATIC_TRIANGLE:// tria6 + case VTK_QUADRATIC_TRIANGLE: // tria6 meshds->AddFaceWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -136,10 +136,10 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me ids[5] + 1, iCell + 1); break; - case VTK_QUAD:// quad4 + case VTK_QUAD: // quad4 meshds->AddFaceWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, ids[3] + 1, iCell + 1); break; - case VTK_QUADRATIC_QUAD:// quad8 + case VTK_QUADRATIC_QUAD: // quad8 meshds->AddFaceWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -152,10 +152,10 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me break; // 3D volumes - case VTK_TETRA:// tetra4 + case VTK_TETRA: // tetra4 meshds->AddVolumeWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, ids[3] + 1, iCell + 1); break; - case VTK_QUADRATIC_TETRA:// tetra10 + case VTK_QUADRATIC_TETRA: // tetra10 meshds->AddVolumeWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -168,7 +168,7 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me ids[9] + 1, iCell + 1); break; - case VTK_HEXAHEDRON:// hexa8 + case VTK_HEXAHEDRON: // hexa8 meshds->AddVolumeWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -179,7 +179,7 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me ids[7] + 1, iCell + 1); break; - case VTK_QUADRATIC_HEXAHEDRON:// hexa20 + case VTK_QUADRATIC_HEXAHEDRON: // hexa20 meshds->AddVolumeWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -202,7 +202,7 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me ids[19] + 1, iCell + 1); break; - case VTK_WEDGE:// penta6 + case VTK_WEDGE: // penta6 meshds->AddVolumeWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -211,7 +211,7 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me ids[5] + 1, iCell + 1); break; - case VTK_QUADRATIC_WEDGE:// penta15 + case VTK_QUADRATIC_WEDGE: // penta15 meshds->AddVolumeWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -229,11 +229,15 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me ids[14] + 1, iCell + 1); break; - case VTK_PYRAMID:// pyra5 - meshds->AddVolumeWithID( - ids[0] + 1, ids[1] + 1, ids[2] + 1, ids[3] + 1, ids[4] + 1, iCell + 1); + case VTK_PYRAMID: // pyra5 + meshds->AddVolumeWithID(ids[0] + 1, + ids[1] + 1, + ids[2] + 1, + ids[3] + 1, + ids[4] + 1, + iCell + 1); break; - case VTK_QUADRATIC_PYRAMID:// pyra13 + case VTK_QUADRATIC_PYRAMID: // pyra13 meshds->AddVolumeWithID(ids[0] + 1, ids[1] + 1, ids[2] + 1, @@ -294,7 +298,7 @@ FemMesh* FemVTKTools::readVTKMesh(const char* filename, FemMesh* mesh) Base::Console().Error("file name extension is not supported\n"); return nullptr; } - //Mesh should link to the part feature, in order to set up FemConstraint + // Mesh should link to the part feature, in order to set up FemConstraint Base::Console().Log(" %f: Done \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); return mesh; @@ -310,11 +314,10 @@ void exportFemMeshFaces(vtkSmartPointer grid, vtkSmartPointer quadArray = vtkSmartPointer::New(); vtkSmartPointer quadQuadArray = vtkSmartPointer::New(); - for (;aFaceIter->more();) - { + for (; aFaceIter->more();) { const SMDS_MeshFace* aFace = aFaceIter->next(); - //triangle + // triangle if (aFace->NbNodes() == 3) { vtkSmartPointer tria = vtkSmartPointer::New(); tria->GetPointIds()->SetId(0, aFace->GetNode(0)->GetID() - 1); @@ -323,7 +326,7 @@ void exportFemMeshFaces(vtkSmartPointer grid, triangleArray->InsertNextCell(tria); } - //quad + // quad else if (aFace->NbNodes() == 4) { vtkSmartPointer quad = vtkSmartPointer::New(); quad->GetPointIds()->SetId(0, aFace->GetNode(0)->GetID() - 1); @@ -333,7 +336,7 @@ void exportFemMeshFaces(vtkSmartPointer grid, quadArray->InsertNextCell(quad); } - //quadratic triangle + // quadratic triangle else if (aFace->NbNodes() == 6) { vtkSmartPointer tria = vtkSmartPointer::New(); @@ -345,7 +348,7 @@ void exportFemMeshFaces(vtkSmartPointer grid, tria->GetPointIds()->SetId(5, aFace->GetNode(5)->GetID() - 1); quadTriangleArray->InsertNextCell(tria); } - //quadratic quad + // quadratic quad else if (aFace->NbNodes() == 8) { vtkSmartPointer quad = vtkSmartPointer::New(); quad->GetPointIds()->SetId(0, aFace->GetNode(0)->GetID() - 1); @@ -363,17 +366,21 @@ void exportFemMeshFaces(vtkSmartPointer grid, throw std::runtime_error("Face not yet supported by FreeCAD's VTK mesh builder\n"); } } - if (triangleArray->GetNumberOfCells() > 0) + if (triangleArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_TRIANGLE, triangleArray); + } - if (quadArray->GetNumberOfCells() > 0) + if (quadArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_QUAD, quadArray); + } - if (quadTriangleArray->GetNumberOfCells() > 0) + if (quadTriangleArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_QUADRATIC_TRIANGLE, quadTriangleArray); + } - if (quadQuadArray->GetNumberOfCells() > 0) + if (quadQuadArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_QUADRATIC_QUAD, quadQuadArray); + } Base::Console().Log(" End: VTK mesh builder faces.\n"); } @@ -392,11 +399,10 @@ void exportFemMeshCells(vtkSmartPointer grid, vtkSmartPointer quadWedgeArray = vtkSmartPointer::New(); vtkSmartPointer quadHexaArray = vtkSmartPointer::New(); - for (;aVolIter->more();) - { + for (; aVolIter->more();) { const SMDS_MeshVolume* aVol = aVolIter->next(); - if (aVol->NbNodes() == 4) {// tetra4 + if (aVol->NbNodes() == 4) { // tetra4 Base::Console().Log(" Volume tetra4\n"); vtkSmartPointer cell = vtkSmartPointer::New(); cell->GetPointIds()->SetId(0, aVol->GetNode(0)->GetID() - 1); @@ -405,7 +411,7 @@ void exportFemMeshCells(vtkSmartPointer grid, cell->GetPointIds()->SetId(3, aVol->GetNode(3)->GetID() - 1); tetraArray->InsertNextCell(cell); } - else if (aVol->NbNodes() == 5) {// pyra5 + else if (aVol->NbNodes() == 5) { // pyra5 Base::Console().Log(" Volume pyra5\n"); vtkSmartPointer cell = vtkSmartPointer::New(); cell->GetPointIds()->SetId(0, aVol->GetNode(0)->GetID() - 1); @@ -415,7 +421,7 @@ void exportFemMeshCells(vtkSmartPointer grid, cell->GetPointIds()->SetId(4, aVol->GetNode(4)->GetID() - 1); pyramidArray->InsertNextCell(cell); } - else if (aVol->NbNodes() == 6) {// penta6 + else if (aVol->NbNodes() == 6) { // penta6 Base::Console().Log(" Volume penta6\n"); vtkSmartPointer cell = vtkSmartPointer::New(); cell->GetPointIds()->SetId(0, aVol->GetNode(0)->GetID() - 1); @@ -426,7 +432,7 @@ void exportFemMeshCells(vtkSmartPointer grid, cell->GetPointIds()->SetId(5, aVol->GetNode(5)->GetID() - 1); wedgeArray->InsertNextCell(cell); } - else if (aVol->NbNodes() == 8) {// hexa8 + else if (aVol->NbNodes() == 8) { // hexa8 Base::Console().Log(" Volume hexa8\n"); vtkSmartPointer cell = vtkSmartPointer::New(); cell->GetPointIds()->SetId(0, aVol->GetNode(0)->GetID() - 1); @@ -439,7 +445,7 @@ void exportFemMeshCells(vtkSmartPointer grid, cell->GetPointIds()->SetId(7, aVol->GetNode(7)->GetID() - 1); hexaArray->InsertNextCell(cell); } - else if (aVol->NbNodes() == 10) {// tetra10 + else if (aVol->NbNodes() == 10) { // tetra10 Base::Console().Log(" Volume tetra10\n"); vtkSmartPointer tetra = vtkSmartPointer::New(); for (int i = 0; i < 10; i++) { @@ -448,7 +454,7 @@ void exportFemMeshCells(vtkSmartPointer grid, quadTetraArray->InsertNextCell(tetra); } - else if (aVol->NbNodes() == 13) {// pyra13 + else if (aVol->NbNodes() == 13) { // pyra13 Base::Console().Log(" Volume pyra13\n"); vtkSmartPointer cell = vtkSmartPointer::New(); for (int i = 0; i < 13; i++) { @@ -457,7 +463,7 @@ void exportFemMeshCells(vtkSmartPointer grid, } quadPyramidArray->InsertNextCell(cell); } - else if (aVol->NbNodes() == 15) {// penta15 + else if (aVol->NbNodes() == 15) { // penta15 Base::Console().Log(" Volume penta15\n"); vtkSmartPointer cell = vtkSmartPointer::New(); for (int i = 0; i < 15; i++) { @@ -465,7 +471,7 @@ void exportFemMeshCells(vtkSmartPointer grid, } quadWedgeArray->InsertNextCell(cell); } - else if (aVol->NbNodes() == 20) {// hexa20 + else if (aVol->NbNodes() == 20) { // hexa20 Base::Console().Log(" Volume hexa20\n"); vtkSmartPointer cell = vtkSmartPointer::New(); @@ -479,34 +485,43 @@ void exportFemMeshCells(vtkSmartPointer grid, } } - if (tetraArray->GetNumberOfCells() > 0) + if (tetraArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_TETRA, tetraArray); + } - if (pyramidArray->GetNumberOfCells() > 0) + if (pyramidArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_PYRAMID, pyramidArray); + } - if (wedgeArray->GetNumberOfCells() > 0) + if (wedgeArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_WEDGE, wedgeArray); + } - if (hexaArray->GetNumberOfCells() > 0) + if (hexaArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_HEXAHEDRON, hexaArray); + } - if (quadTetraArray->GetNumberOfCells() > 0) + if (quadTetraArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_QUADRATIC_TETRA, quadTetraArray); + } - if (quadPyramidArray->GetNumberOfCells() > 0) + if (quadPyramidArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_QUADRATIC_PYRAMID, quadPyramidArray); + } - if (quadWedgeArray->GetNumberOfCells() > 0) + if (quadWedgeArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_QUADRATIC_WEDGE, quadWedgeArray); + } - if (quadHexaArray->GetNumberOfCells() > 0) + if (quadHexaArray->GetNumberOfCells() > 0) { grid->SetCells(VTK_QUADRATIC_HEXAHEDRON, quadHexaArray); + } Base::Console().Log(" End: VTK mesh builder volumes.\n"); } -void FemVTKTools::exportVTKMesh(const FemMesh* mesh, vtkSmartPointer grid, +void FemVTKTools::exportVTKMesh(const FemMesh* mesh, + vtkSmartPointer grid, float scale) { @@ -521,9 +536,10 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh, vtkSmartPointernodesIterator(); while (aNodeIter->more()) { - const SMDS_MeshNode* node = aNodeIter->next();// why float, not double? - double coords[3] = { - double(node->X() * scale), double(node->Y() * scale), double(node->Z() * scale)}; + const SMDS_MeshNode* node = aNodeIter->next(); // why float, not double? + double coords[3] = {double(node->X() * scale), + double(node->Y() * scale), + double(node->Z() * scale)}; points->InsertPoint(node->GetID() - 1, coords); // memory is allocated by VTK points size for max node id, not for point count // if the SMESH mesh has gaps in node numbering, points without any element @@ -559,7 +575,7 @@ void FemVTKTools::writeVTKMesh(const char* filename, const FemMesh* mesh) vtkSmartPointer grid = vtkSmartPointer::New(); exportVTKMesh(mesh, grid); - //vtkSmartPointer dataset = vtkDataSet::SafeDownCast(grid); + // vtkSmartPointer dataset = vtkDataSet::SafeDownCast(grid); Base::Console().Log("Start: writing mesh data ======================\n"); if (f.hasExtension("vtu")) { writeVTKFile(filename, grid); @@ -571,7 +587,7 @@ void FemVTKTools::writeVTKMesh(const char* filename, const FemMesh* mesh) Base::Console().Error("file name extension is not supported to write VTK\n"); } - Base::Console().Log(" %f: Done \n",Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); + Base::Console().Log(" %f: Done \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); } @@ -589,9 +605,10 @@ App::DocumentObject* getObjectByType(const Base::Type type) } if (obj->getTypeId() == FemAnalysis::getClassTypeId()) { std::vector fem = (static_cast(obj))->Group.getValues(); - for (const auto & it : fem) { - if (it->getTypeId().isDerivedFrom(type)) - return static_cast(it);// return the first of that type + for (const auto& it : fem) { + if (it->getTypeId().isDerivedFrom(type)) { + return static_cast(it); // return the first of that type + } } } return nullptr; @@ -613,7 +630,7 @@ App::DocumentObject* createObjectByType(const Base::Type type) return newobj; } else { - return pcDoc->addObject(type.getName());// create in the active document + return pcDoc->addObject(type.getName()); // create in the active document } } @@ -621,7 +638,8 @@ App::DocumentObject* createObjectByType(const Base::Type type) App::DocumentObject* FemVTKTools::readResult(const char* filename, App::DocumentObject* res) { Base::TimeInfo Start; - Base::Console().Log("Start: read FemResult with FemMesh from VTK file ======================\n"); + Base::Console().Log( + "Start: read FemResult with FemMesh from VTK file ======================\n"); Base::FileInfo f(filename); vtkSmartPointer ds; @@ -666,10 +684,11 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document // PropertyLink is the property type to store DocumentObject pointer App::PropertyLink* link = dynamic_cast(result->getPropertyByName("Mesh")); - if (link) + if (link) { link->setValue(mesh); + } - //vtkSmartPointer pd = dataset->GetPointData(); + // vtkSmartPointer pd = dataset->GetPointData(); importFreeCADResult(dataset, result); } @@ -681,14 +700,15 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document } -void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* res) { +void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* res) +{ if (!res) { App::Document* pcDoc = App::GetApplication().getActiveDocument(); if (!pcDoc) { Base::Console().Message("No active document is found thus do nothing and return\n"); return; } - res = pcDoc->getActiveObject();//type checking is done by caller + res = pcDoc->getActiveObject(); // type checking is done by caller } if (!res) { Base::Console().Error("Result object pointer is invalid and it is not active object"); @@ -713,7 +733,7 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r // result FemVTKTools::exportFreeCADResult(res, grid); - //vtkSmartPointer dataset = vtkDataSet::SafeDownCast(grid); + // vtkSmartPointer dataset = vtkDataSet::SafeDownCast(grid); if (f.hasExtension("vtu")) { writeVTKFile(filename, grid); } @@ -730,7 +750,8 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r } -std::map _getFreeCADMechResultVectorProperties() { +std::map _getFreeCADMechResultVectorProperties() +{ // see src/Mod/Fem/femobjects/_FemResultMechanical // App::PropertyVectorList will be a list of vectors in vtk std::map resFCVecProp; @@ -750,12 +771,13 @@ std::map _getFreeCADMechResultVectorProperties() { // some scalar list are not needed on VTK file export but they are needed for internal VTK pipeline // TODO some filter to only export the needed values to VTK file but have all // in FreeCAD VTK pipeline -std::map _getFreeCADMechResultScalarProperties() { +std::map _getFreeCADMechResultScalarProperties() +{ // see src/Mod/Fem/femobjects/result_mechanical.py // App::PropertyFloatList will be a list of scalars in vtk std::map resFCScalProp; resFCScalProp["DisplacementLengths"] = - "Displacement Magnitude";// can be plotted in Paraview as THE DISPLACEMENT MAGNITUDE + "Displacement Magnitude"; // can be plotted in Paraview as THE DISPLACEMENT MAGNITUDE resFCScalProp["MaxShear"] = "Tresca Stress"; resFCScalProp["NodeStressXX"] = "Stress xx component"; resFCScalProp["NodeStressYY"] = "Stress yy component"; @@ -782,12 +804,13 @@ std::map _getFreeCADMechResultScalarProperties() { // how to generate them in paraview) // but there are needed anyway because the pipeline in FreeCAD needs the principal stress values // https://forum.freecad.org/viewtopic.php?f=18&t=33106&p=416006#p412800 - resFCScalProp["PrincipalMax"] = - "Major Principal Stress";// can be plotted in Paraview as THE MAJOR PRINCIPAL STRESS MAGNITUDE + resFCScalProp["PrincipalMax"] = "Major Principal Stress"; // can be plotted in Paraview as THE + // MAJOR PRINCIPAL STRESS MAGNITUDE resFCScalProp["PrincipalMed"] = - "Intermediate Principal Stress";// can be plotted in Paraview as THE INTERMEDIATE PRINCIPAL STRESS MAGNITUDE - resFCScalProp["PrincipalMin"] = - "Minor Principal Stress";// can be plotted in Paraview as THE MINOR PRINCIPAL STRESS MAGNITUDE + "Intermediate Principal Stress"; // can be plotted in Paraview as THE INTERMEDIATE + // PRINCIPAL STRESS MAGNITUDE + resFCScalProp["PrincipalMin"] = "Minor Principal Stress"; // can be plotted in Paraview as THE + // MINOR PRINCIPAL STRESS MAGNITUDE resFCScalProp["vonMises"] = "von Mises Stress"; resFCScalProp["Temperature"] = "Temperature"; resFCScalProp["MohrCoulomb"] = "MohrCoulomb"; @@ -811,7 +834,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, std::map vectors = _getFreeCADMechResultVectorProperties(); std::map scalars = _getFreeCADMechResultScalarProperties(); - double ts = 0.0;// t=0.0 for static simulation + double ts = 0.0; // t=0.0 for static simulation static_cast(result->getPropertyByName("Time"))->setValue(ts); vtkSmartPointer pd = dataset->GetPointData(); @@ -833,9 +856,9 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, Base::Console().Log(" NodeNumbers have been filled with values.\n"); // vectors - for (const auto & it : vectors) { - int dim = 3;// Fixme: currently 3D only, here we could run into trouble, - // FreeCAD only supports dim 3D, I do not know about VTK + for (const auto& it : vectors) { + int dim = 3; // Fixme: currently 3D only, here we could run into trouble, + // FreeCAD only supports dim 3D, I do not know about VTK vtkDataArray* vector_field = vtkDataArray::SafeDownCast(pd->GetArray(it.second.c_str())); if (vector_field && vector_field->GetNumberOfComponents() == dim) { App::PropertyVectorList* vector_list = @@ -844,7 +867,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, std::vector vec(nPoints); for (vtkIdType i = 0; i < nPoints; ++i) { double* p = vector_field->GetTuple( - i);// both vtkFloatArray and vtkDoubleArray return double* for GetTuple(i) + i); // both vtkFloatArray and vtkDoubleArray return double* for GetTuple(i) vec[i] = (Base::Vector3d(p[0], p[1], p[2])); } // PropertyVectorList will not show up in PropertyEditor @@ -859,17 +882,18 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, continue; } } - else + else { Base::Console().Message(" PropertyVectorList NOT found in vkt file data: %s\n", it.first.c_str()); + } } // scalars - for (const auto & scalar : scalars) { + for (const auto& scalar : scalars) { vtkDataArray* vec = vtkDataArray::SafeDownCast(pd->GetArray(scalar.second.c_str())); if (nPoints && vec && vec->GetNumberOfComponents() == 1) { - App::PropertyFloatList* field = - static_cast(result->getPropertyByName(scalar.first.c_str())); + App::PropertyFloatList* field = static_cast( + result->getPropertyByName(scalar.first.c_str())); if (!field) { Base::Console().Error("static_cast((result->" "getPropertyByName(\"%s\")) failed.\n", @@ -882,18 +906,21 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, for (vtkIdType i = 0; i < vec->GetNumberOfTuples(); i++) { double v = *(vec->GetTuple(i)); values[i] = v; - if (v > vmax) + if (v > vmax) { vmax = v; - if (v < vmin) + } + if (v < vmin) { vmin = v; + } } field->setValues(values); Base::Console().Log(" A PropertyFloatList has been filled with vales: %s\n", scalar.first.c_str()); } - else + else { Base::Console().Message(" PropertyFloatList NOT found in vkt file data %s\n", scalar.first.c_str()); + } } // stats @@ -931,19 +958,21 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, double factor = 1.0; // vectors - for (const auto & it : vectors) { - const int dim = 3;//Fixme, detect dim, but FreeCAD PropertyVectorList ATM only has DIM of 3 + for (const auto& it : vectors) { + const int dim = + 3; // Fixme, detect dim, but FreeCAD PropertyVectorList ATM only has DIM of 3 App::PropertyVectorList* field = nullptr; - if (res->getPropertyByName(it.first.c_str())) - field = - static_cast(res->getPropertyByName(it.first.c_str())); - else + if (res->getPropertyByName(it.first.c_str())) { + field = static_cast(res->getPropertyByName(it.first.c_str())); + } + else { Base::Console().Error(" PropertyVectorList not found: %s\n", it.first.c_str()); + } if (field && field->getSize() > 0) { - //if (nPoints != field->getSize()) - // Base::Console().Error("Size of PropertyVectorList = %d, not equal - // to vtk mesh node count %d \n", field->getSize(), nPoints); + // if (nPoints != field->getSize()) + // Base::Console().Error("Size of PropertyVectorList = %d, not equal + // to vtk mesh node count %d \n", field->getSize(), nPoints); const std::vector& vel = field->getValues(); vtkSmartPointer data = vtkSmartPointer::New(); data->SetNumberOfComponents(dim); @@ -960,13 +989,15 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, } } - if (it.first.compare("DisplacementVectors") == 0) - factor = 0.001;// to get meter - else + if (it.first.compare("DisplacementVectors") == 0) { + factor = 0.001; // to get meter + } + else { factor = 1.0; + } SMDS_NodeIteratorPtr aNodeIter = meshDS->nodesIterator(); - for (const auto & jt : vel) { + for (const auto& jt : vel) { const SMDS_MeshNode* node = aNodeIter->next(); double tuple[] = {jt.x * factor, jt.y * factor, jt.z * factor}; data->SetTuple(node->GetID() - 1, tuple); @@ -985,17 +1016,20 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, } // scalars - for (const auto & scalar : scalars) { + for (const auto& scalar : scalars) { App::PropertyFloatList* field = nullptr; - if (res->getPropertyByName(scalar.first.c_str())) - field = static_cast(res->getPropertyByName(scalar.first.c_str())); - else + if (res->getPropertyByName(scalar.first.c_str())) { + field = + static_cast(res->getPropertyByName(scalar.first.c_str())); + } + else { Base::Console().Error("PropertyFloatList %s not found \n", scalar.first.c_str()); + } if (field && field->getSize() > 0) { - //if (nPoints != field->getSize()) - // Base::Console().Error("Size of PropertyFloatList = %d, not equal to vtk mesh - // node count %d \n", field->getSize(), nPoints); + // if (nPoints != field->getSize()) + // Base::Console().Error("Size of PropertyFloatList = %d, not equal to vtk mesh + // node count %d \n", field->getSize(), nPoints); const std::vector& vec = field->getValues(); vtkSmartPointer data = vtkSmartPointer::New(); data->SetNumberOfValues(nPoints); @@ -1021,19 +1055,23 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, || (scalar.first.compare("PrincipalMed") == 0) || (scalar.first.compare("PrincipalMin") == 0) || (scalar.first.compare("vonMises") == 0) - || (scalar.first.compare("NetworkPressure") == 0) ) - factor = 1e6; // to get Pascal - else if (scalar.first.compare("DisplacementLengths") == 0) - factor = 0.001; // to get meter - else + || (scalar.first.compare("NetworkPressure") == 0)) { + factor = 1e6; // to get Pascal + } + else if (scalar.first.compare("DisplacementLengths") == 0) { + factor = 0.001; // to get meter + } + else { factor = 1.0; + } SMDS_NodeIteratorPtr aNodeIter = meshDS->nodesIterator(); for (double i : vec) { const SMDS_MeshNode* node = aNodeIter->next(); // for the MassFlowRate the last vec entries can be a nullptr, thus check this - if (node) + if (node) { data->SetValue(node->GetID() - 1, i * factor); + } } grid->GetPointData()->AddArray(data); @@ -1052,4 +1090,4 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, Base::Console().Log("End: Create VTK result data from FreeCAD result data.\n"); } -} // namespace +} // namespace Fem diff --git a/src/Mod/Fem/App/FemVTKTools.h b/src/Mod/Fem/App/FemVTKTools.h index 87f5bb1491..19fb2d32b0 100644 --- a/src/Mod/Fem/App/FemVTKTools.h +++ b/src/Mod/Fem/App/FemVTKTools.h @@ -34,34 +34,42 @@ namespace Fem { - // utility class to import/export read/write vtk mesh and result - class FemExport FemVTKTools - { - public: - // extract data from vtkUnstructuredGrid instance and fill a FreeCAD FEM mesh object with that data - static void importVTKMesh(vtkSmartPointer grid, FemMesh* mesh, float scale = 1.0); +// utility class to import/export read/write vtk mesh and result +class FemExport FemVTKTools +{ +public: + // extract data from vtkUnstructuredGrid instance and fill a FreeCAD FEM mesh object with that + // data + static void importVTKMesh(vtkSmartPointer grid, FemMesh* mesh, float scale = 1.0); - // extract data from FreCAD FEM mesh and fill a vtkUnstructuredGrid instance with that data - static void exportVTKMesh(const FemMesh* mesh, vtkSmartPointer grid, float scale = 1.0); + // extract data from FreCAD FEM mesh and fill a vtkUnstructuredGrid instance with that data + static void exportVTKMesh(const FemMesh* mesh, + vtkSmartPointer grid, + float scale = 1.0); - // extract data from vtkUnstructuredGrid object and fill a FreeCAD FEM result object with that data (needed by readResult) - static void importFreeCADResult(vtkSmartPointer dataset, App::DocumentObject* result); + // extract data from vtkUnstructuredGrid object and fill a FreeCAD FEM result object with that + // data (needed by readResult) + static void importFreeCADResult(vtkSmartPointer dataset, + App::DocumentObject* result); - // extract data from a FreeCAD FEM result object and fill a vtkUnstructuredGrid object with that data (needed by writeResult) - static void exportFreeCADResult(const App::DocumentObject* result, vtkSmartPointer grid); + // extract data from a FreeCAD FEM result object and fill a vtkUnstructuredGrid object with that + // data (needed by writeResult) + static void exportFreeCADResult(const App::DocumentObject* result, + vtkSmartPointer grid); - // FemMesh read from vtkUnstructuredGrid data file - static FemMesh* readVTKMesh(const char* filename, FemMesh* mesh); + // FemMesh read from vtkUnstructuredGrid data file + static FemMesh* readVTKMesh(const char* filename, FemMesh* mesh); - // FemMesh write to vtkUnstructuredGrid data file - static void writeVTKMesh(const char* Filename, const FemMesh* mesh); + // FemMesh write to vtkUnstructuredGrid data file + static void writeVTKMesh(const char* Filename, const FemMesh* mesh); - // FemResult (activeObject or created if res= NULL) read from vtkUnstructuredGrid dataset file - static App::DocumentObject* readResult(const char* Filename, App::DocumentObject* res = nullptr); + // FemResult (activeObject or created if res= NULL) read from vtkUnstructuredGrid dataset file + static App::DocumentObject* readResult(const char* Filename, + App::DocumentObject* res = nullptr); - // write FemResult (activeObject if res= NULL) to vtkUnstructuredGrid dataset file - static void writeResult(const char* filename, const App::DocumentObject* res = nullptr); - }; -} + // write FemResult (activeObject if res= NULL) to vtkUnstructuredGrid dataset file + static void writeResult(const char* filename, const App::DocumentObject* res = nullptr); +}; +} // namespace Fem -#endif //FEM_VTK_TOOLS_H +#endif // FEM_VTK_TOOLS_H diff --git a/src/Mod/Fem/App/HypothesisPy.cpp b/src/Mod/Fem/App/HypothesisPy.cpp old mode 100755 new mode 100644 index 45d54f2b9c..1c9c8f646b --- a/src/Mod/Fem/App/HypothesisPy.cpp +++ b/src/Mod/Fem/App/HypothesisPy.cpp @@ -27,42 +27,42 @@ #include "HypothesisPy.h" #ifndef _PreComp_ -# include -# include // needed for SMESH_VERSION_MAJOR -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if SMESH_VERSION_MAJOR < 7 -# include -# endif +#include // needed for SMESH_VERSION_MAJOR +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if SMESH_VERSION_MAJOR < 7 +#include +#endif #endif #include @@ -74,9 +74,8 @@ using namespace Fem; HypothesisPy::HypothesisPy(std::shared_ptr h) - : hyp(h) -{ -} + : hyp(h) +{} HypothesisPy::~HypothesisPy() = default; @@ -91,34 +90,54 @@ void SMESH_HypothesisPy::init_type(PyObject* module) SMESH_HypothesisPy::behaviors().supportSetattr(); SMESH_HypothesisPy::behaviors().set_tp_new(PyMake); - SMESH_HypothesisPy::add_varargs_method("setLibName", &SMESH_HypothesisPy::setLibName, "setLibName(String)"); - SMESH_HypothesisPy::add_varargs_method("getLibName", &SMESH_HypothesisPy::getLibName, "String getLibName()"); + SMESH_HypothesisPy::add_varargs_method("setLibName", + &SMESH_HypothesisPy::setLibName, + "setLibName(String)"); + SMESH_HypothesisPy::add_varargs_method("getLibName", + &SMESH_HypothesisPy::getLibName, + "String getLibName()"); #if SMESH_VERSION_MAJOR < 7 - SMESH_HypothesisPy::add_varargs_method("setParameters", &SMESH_HypothesisPy::setParameters, "setParameters(String)"); - SMESH_HypothesisPy::add_varargs_method("getParameters", &SMESH_HypothesisPy::getParameters, "String getParameters()"); - SMESH_HypothesisPy::add_varargs_method("setLastParameters", &SMESH_HypothesisPy::setLastParameters, "setLastParameters(String)"); - SMESH_HypothesisPy::add_varargs_method("getLastParameters", &SMESH_HypothesisPy::getLastParameters, "String getLastParameters()"); - SMESH_HypothesisPy::add_varargs_method("clearParameters", &SMESH_HypothesisPy::clearParameters, "clearParameters()"); + SMESH_HypothesisPy::add_varargs_method("setParameters", + &SMESH_HypothesisPy::setParameters, + "setParameters(String)"); + SMESH_HypothesisPy::add_varargs_method("getParameters", + &SMESH_HypothesisPy::getParameters, + "String getParameters()"); + SMESH_HypothesisPy::add_varargs_method("setLastParameters", + &SMESH_HypothesisPy::setLastParameters, + "setLastParameters(String)"); + SMESH_HypothesisPy::add_varargs_method("getLastParameters", + &SMESH_HypothesisPy::getLastParameters, + "String getLastParameters()"); + SMESH_HypothesisPy::add_varargs_method("clearParameters", + &SMESH_HypothesisPy::clearParameters, + "clearParameters()"); #endif - SMESH_HypothesisPy::add_varargs_method("isAuxiliary", &SMESH_HypothesisPy::isAuxiliary, "Bool isAuxiliary()"); - SMESH_HypothesisPy::add_varargs_method("setParametersByMesh", &SMESH_HypothesisPy::setParametersByMesh, "setParametersByMesh(Mesh,Shape)"); + SMESH_HypothesisPy::add_varargs_method("isAuxiliary", + &SMESH_HypothesisPy::isAuxiliary, + "Bool isAuxiliary()"); + SMESH_HypothesisPy::add_varargs_method("setParametersByMesh", + &SMESH_HypothesisPy::setParametersByMesh, + "setParametersByMesh(Mesh,Shape)"); Base::Interpreter().addType(SMESH_HypothesisPy::behaviors().type_object(), - module,SMESH_HypothesisPy::behaviors().getName()); + module, + SMESH_HypothesisPy::behaviors().getName()); } template -SMESH_HypothesisPy::SMESH_HypothesisPy(SMESH_Hypothesis* h) : hyp(h) -{ -} +SMESH_HypothesisPy::SMESH_HypothesisPy(SMESH_Hypothesis* h) + : hyp(h) +{} template SMESH_HypothesisPy::~SMESH_HypothesisPy() = default; template -Py::Object SMESH_HypothesisPy::getattr(const char *name) +Py::Object SMESH_HypothesisPy::getattr(const char* name) { - if (strcmp(name,"this") == 0) + if (strcmp(name, "this") == 0) { return Hypothesis(Py::asObject(new HypothesisPy(this->getHypothesis()))); + } return Py::PythonExtension::getattr(name); } @@ -141,13 +160,14 @@ Py::Object SMESH_HypothesisPy::setLibName(const Py::Tuple& args) template Py::Object SMESH_HypothesisPy::getLibName(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::String(hypothesis()->GetLibName()); } -#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- +#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- template Py::Object SMESH_HypothesisPy::setParameters(const Py::Tuple& args) { @@ -159,16 +179,18 @@ Py::Object SMESH_HypothesisPy::setParameters(const Py::Tuple& args) template Py::Object SMESH_HypothesisPy::getParameters(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::String(hypothesis()->GetParameters()); } template Py::Object SMESH_HypothesisPy::setLastParameters(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } std::string paramName = static_cast(Py::String(args[0])); hypothesis()->SetLastParameters(paramName.c_str()); return Py::None(); @@ -177,29 +199,35 @@ Py::Object SMESH_HypothesisPy::setLastParameters(const Py::Tuple& args) template Py::Object SMESH_HypothesisPy::getLastParameters(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::String(hypothesis()->GetLastParameters()); } template Py::Object SMESH_HypothesisPy::clearParameters(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } hypothesis()->ClearParameters(); return Py::None(); } -#endif // -------------------------------------------------------------------- +#endif // -------------------------------------------------------------------- template Py::Object SMESH_HypothesisPy::setParametersByMesh(const Py::Tuple& args) { PyObject *mesh, *shape; - if (!PyArg_ParseTuple(args.ptr(), "O!O!", - &(Fem::FemMeshPy::Type), &mesh, - &(Part::TopoShapePy::Type), &shape)) + if (!PyArg_ParseTuple(args.ptr(), + "O!O!", + &(Fem::FemMeshPy::Type), + &mesh, + &(Part::TopoShapePy::Type), + &shape)) { throw Py::Exception(); + } Fem::FemMesh* m = static_cast(mesh)->getFemMeshPtr(); const TopoDS_Shape& s = static_cast(shape)->getTopoShapePtr()->getShape(); return Py::Boolean(hypothesis()->SetParametersByMesh(m->getSMesh(), s)); @@ -208,18 +236,21 @@ Py::Object SMESH_HypothesisPy::setParametersByMesh(const Py::Tuple& args) template Py::Object SMESH_HypothesisPy::isAuxiliary(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Boolean(hypothesis()->IsAuxiliary()); } template -PyObject *SMESH_HypothesisPy::PyMake(struct _typeobject * /*type*/, PyObject * args, PyObject * /*kwds*/) +PyObject* +SMESH_HypothesisPy::PyMake(struct _typeobject* /*type*/, PyObject* args, PyObject* /*kwds*/) { int hypId; PyObject* obj; - if (!PyArg_ParseTuple(args, "iO!",&hypId,&(FemMeshPy::Type),&obj)) + if (!PyArg_ParseTuple(args, "iO!", &hypId, &(FemMeshPy::Type), &obj)) { return nullptr; + } FemMesh* mesh = static_cast(obj)->getFemMeshPtr(); #if SMESH_VERSION_MAJOR >= 9 return new T(hypId, mesh->getGenerator()); @@ -242,32 +273,30 @@ void StdMeshers_Arithmetic1DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Arithmetic1DPy::StdMeshers_Arithmetic1DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Arithmetic1D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Arithmetic1D(hypId, gen)) +{} #else StdMeshers_Arithmetic1DPy::StdMeshers_Arithmetic1DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Arithmetic1D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Arithmetic1D(hypId, studyId, gen)) +{} #endif StdMeshers_Arithmetic1DPy::~StdMeshers_Arithmetic1DPy() = default; Py::Object StdMeshers_Arithmetic1DPy::setLength(const Py::Tuple& args) { - hypothesis()-> - SetLength((double)Py::Float(args[0]), (bool)Py::Boolean(args[1])); + hypothesis()->SetLength((double)Py::Float(args[0]), + (bool)Py::Boolean(args[1])); return Py::None(); } Py::Object StdMeshers_Arithmetic1DPy::getLength(const Py::Tuple& args) { int start; - if (!PyArg_ParseTuple(args.ptr(), "i",&start)) + if (!PyArg_ParseTuple(args.ptr(), "i", &start)) { throw Py::Exception(); - return Py::Float(hypothesis()-> - GetLength(start ? true : false)); + } + return Py::Float(hypothesis()->GetLength(start ? true : false)); } // --------------------------------------------------------------------------- @@ -285,14 +314,14 @@ void StdMeshers_AutomaticLengthPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_AutomaticLengthPy::StdMeshers_AutomaticLengthPy(int /*hypId*/, SMESH_Gen* /*gen*/) - : SMESH_HypothesisPyBase(0) -{ -} + : SMESH_HypothesisPyBase(0) +{} #else -StdMeshers_AutomaticLengthPy::StdMeshers_AutomaticLengthPy(int /*hypId*/, int /*studyId*/, SMESH_Gen* /*gen*/) - : SMESH_HypothesisPyBase(nullptr) -{ -} +StdMeshers_AutomaticLengthPy::StdMeshers_AutomaticLengthPy(int /*hypId*/, + int /*studyId*/, + SMESH_Gen* /*gen*/) + : SMESH_HypothesisPyBase(nullptr) +{} #endif StdMeshers_AutomaticLengthPy::~StdMeshers_AutomaticLengthPy() = default; @@ -306,23 +335,27 @@ Py::Object StdMeshers_AutomaticLengthPy::setFineness(const Py::Tuple& args) Py::Object StdMeshers_AutomaticLengthPy::getFineness(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetFineness()); } -namespace Py { - using FemMesh = ExtensionObject; - using TopoShape = ExtensionObject; - template<> bool FemMesh::accepts (PyObject *pyob) const - { - return (pyob && PyObject_TypeCheck(pyob, &(Fem::FemMeshPy::Type))); - } - template<> bool TopoShape::accepts (PyObject *pyob) const - { - return (pyob && PyObject_TypeCheck(pyob, &(Part::TopoShapePy::Type))); - } +namespace Py +{ +using FemMesh = ExtensionObject; +using TopoShape = ExtensionObject; +template<> +bool FemMesh::accepts(PyObject* pyob) const +{ + return (pyob && PyObject_TypeCheck(pyob, &(Fem::FemMeshPy::Type))); } +template<> +bool TopoShape::accepts(PyObject* pyob) const +{ + return (pyob && PyObject_TypeCheck(pyob, &(Part::TopoShapePy::Type))); +} +} // namespace Py Py::Object StdMeshers_AutomaticLengthPy::getLength(const Py::Tuple& args) { @@ -332,12 +365,12 @@ Py::Object StdMeshers_AutomaticLengthPy::getLength(const Py::Tuple& args) Fem::FemMesh* m = mesh.extensionObject()->getFemMeshPtr(); if (shape_or_double.type() == Py::Float().type()) { double len = (double)Py::Float(shape_or_double); - return Py::Float(hypothesis()->GetLength(m->getSMesh(),len)); + return Py::Float(hypothesis()->GetLength(m->getSMesh(), len)); } else { Py::TopoShape shape(shape_or_double); const TopoDS_Shape& s = shape.extensionObject()->getTopoShapePtr()->getShape(); - return Py::Float(hypothesis()->GetLength(m->getSMesh(),s)); + return Py::Float(hypothesis()->GetLength(m->getSMesh(), s)); } } @@ -352,14 +385,14 @@ void StdMeshers_NotConformAllowedPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_NotConformAllowedPy::StdMeshers_NotConformAllowedPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_NotConformAllowed(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_NotConformAllowed(hypId, gen)) +{} #else -StdMeshers_NotConformAllowedPy::StdMeshers_NotConformAllowedPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_NotConformAllowed(hypId, studyId, gen)) -{ -} +StdMeshers_NotConformAllowedPy::StdMeshers_NotConformAllowedPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_NotConformAllowed(hypId, studyId, gen)) +{} #endif StdMeshers_NotConformAllowedPy::~StdMeshers_NotConformAllowedPy() = default; @@ -373,24 +406,32 @@ void StdMeshers_MaxLengthPy::init_type(PyObject* module) add_varargs_method("setLength", &StdMeshers_MaxLengthPy::setLength, "setLength()"); add_varargs_method("getLength", &StdMeshers_MaxLengthPy::getLength, "getLength()"); - add_varargs_method("havePreestimatedLength", &StdMeshers_MaxLengthPy::havePreestimatedLength, "havePreestimatedLength()"); - add_varargs_method("getPreestimatedLength", &StdMeshers_MaxLengthPy::getPreestimatedLength, "getPreestimatedLength()"); - add_varargs_method("setPreestimatedLength", &StdMeshers_MaxLengthPy::setPreestimatedLength, "setPreestimatedLength()"); - add_varargs_method("setUsePreestimatedLength", &StdMeshers_MaxLengthPy::setUsePreestimatedLength, "setUsePreestimatedLength()"); - add_varargs_method("getUsePreestimatedLength", &StdMeshers_MaxLengthPy::getUsePreestimatedLength, "getUsePreestimatedLength()"); + add_varargs_method("havePreestimatedLength", + &StdMeshers_MaxLengthPy::havePreestimatedLength, + "havePreestimatedLength()"); + add_varargs_method("getPreestimatedLength", + &StdMeshers_MaxLengthPy::getPreestimatedLength, + "getPreestimatedLength()"); + add_varargs_method("setPreestimatedLength", + &StdMeshers_MaxLengthPy::setPreestimatedLength, + "setPreestimatedLength()"); + add_varargs_method("setUsePreestimatedLength", + &StdMeshers_MaxLengthPy::setUsePreestimatedLength, + "setUsePreestimatedLength()"); + add_varargs_method("getUsePreestimatedLength", + &StdMeshers_MaxLengthPy::getUsePreestimatedLength, + "getUsePreestimatedLength()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 StdMeshers_MaxLengthPy::StdMeshers_MaxLengthPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MaxLength(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MaxLength(hypId, gen)) +{} #else StdMeshers_MaxLengthPy::StdMeshers_MaxLengthPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MaxLength(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MaxLength(hypId, studyId, gen)) +{} #endif StdMeshers_MaxLengthPy::~StdMeshers_MaxLengthPy() = default; @@ -403,22 +444,25 @@ Py::Object StdMeshers_MaxLengthPy::setLength(const Py::Tuple& args) Py::Object StdMeshers_MaxLengthPy::getLength(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetLength()); } Py::Object StdMeshers_MaxLengthPy::havePreestimatedLength(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Boolean(hypothesis()->HavePreestimatedLength()); } Py::Object StdMeshers_MaxLengthPy::getPreestimatedLength(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetPreestimatedLength()); } @@ -436,8 +480,9 @@ Py::Object StdMeshers_MaxLengthPy::setUsePreestimatedLength(const Py::Tuple& arg Py::Object StdMeshers_MaxLengthPy::getUsePreestimatedLength(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Boolean(hypothesis()->GetUsePreestimatedLength()); } @@ -457,14 +502,12 @@ void StdMeshers_LocalLengthPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_LocalLengthPy::StdMeshers_LocalLengthPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_LocalLength(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_LocalLength(hypId, gen)) +{} #else StdMeshers_LocalLengthPy::StdMeshers_LocalLengthPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_LocalLength(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_LocalLength(hypId, studyId, gen)) +{} #endif StdMeshers_LocalLengthPy::~StdMeshers_LocalLengthPy() = default; @@ -477,8 +520,9 @@ Py::Object StdMeshers_LocalLengthPy::setLength(const Py::Tuple& args) Py::Object StdMeshers_LocalLengthPy::getLength(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetLength()); } @@ -490,8 +534,9 @@ Py::Object StdMeshers_LocalLengthPy::setPrecision(const Py::Tuple& args) Py::Object StdMeshers_LocalLengthPy::getPrecision(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetPrecision()); } @@ -509,14 +554,12 @@ void StdMeshers_MaxElementAreaPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_MaxElementAreaPy::StdMeshers_MaxElementAreaPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MaxElementArea(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MaxElementArea(hypId, gen)) +{} #else StdMeshers_MaxElementAreaPy::StdMeshers_MaxElementAreaPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MaxElementArea(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MaxElementArea(hypId, studyId, gen)) +{} #endif StdMeshers_MaxElementAreaPy::~StdMeshers_MaxElementAreaPy() = default; @@ -529,8 +572,9 @@ Py::Object StdMeshers_MaxElementAreaPy::setMaxArea(const Py::Tuple& args) Py::Object StdMeshers_MaxElementAreaPy::getMaxArea(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetMaxArea()); } @@ -545,14 +589,14 @@ void StdMeshers_QuadranglePreferencePy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_QuadranglePreferencePy::StdMeshers_QuadranglePreferencePy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_QuadranglePreference(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_QuadranglePreference(hypId, gen)) +{} #else -StdMeshers_QuadranglePreferencePy::StdMeshers_QuadranglePreferencePy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_QuadranglePreference(hypId, studyId, gen)) -{ -} +StdMeshers_QuadranglePreferencePy::StdMeshers_QuadranglePreferencePy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_QuadranglePreference(hypId, studyId, gen)) +{} #endif StdMeshers_QuadranglePreferencePy::~StdMeshers_QuadranglePreferencePy() = default; @@ -568,14 +612,12 @@ void StdMeshers_Quadrangle_2DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Quadrangle_2DPy::StdMeshers_Quadrangle_2DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Quadrangle_2D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Quadrangle_2D(hypId, gen)) +{} #else StdMeshers_Quadrangle_2DPy::StdMeshers_Quadrangle_2DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Quadrangle_2D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Quadrangle_2D(hypId, studyId, gen)) +{} #endif StdMeshers_Quadrangle_2DPy::~StdMeshers_Quadrangle_2DPy() = default; @@ -591,14 +633,12 @@ void StdMeshers_Regular_1DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Regular_1DPy::StdMeshers_Regular_1DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Regular_1D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Regular_1D(hypId, gen)) +{} #else StdMeshers_Regular_1DPy::StdMeshers_Regular_1DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Regular_1D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Regular_1D(hypId, studyId, gen)) +{} #endif StdMeshers_Regular_1DPy::~StdMeshers_Regular_1DPy() = default; @@ -614,14 +654,12 @@ void StdMeshers_UseExisting_1DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_UseExisting_1DPy::StdMeshers_UseExisting_1DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_1D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_1D(hypId, gen)) +{} #else StdMeshers_UseExisting_1DPy::StdMeshers_UseExisting_1DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_1D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_1D(hypId, studyId, gen)) +{} #endif StdMeshers_UseExisting_1DPy::~StdMeshers_UseExisting_1DPy() = default; @@ -637,14 +675,12 @@ void StdMeshers_UseExisting_2DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_UseExisting_2DPy::StdMeshers_UseExisting_2DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_2D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_2D(hypId, gen)) +{} #else StdMeshers_UseExisting_2DPy::StdMeshers_UseExisting_2DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_2D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_UseExisting_2D(hypId, studyId, gen)) +{} #endif StdMeshers_UseExisting_2DPy::~StdMeshers_UseExisting_2DPy() = default; @@ -660,14 +696,14 @@ void StdMeshers_CompositeSegment_1DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_CompositeSegment_1DPy::StdMeshers_CompositeSegment_1DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_CompositeSegment_1D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_CompositeSegment_1D(hypId, gen)) +{} #else -StdMeshers_CompositeSegment_1DPy::StdMeshers_CompositeSegment_1DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_CompositeSegment_1D(hypId, studyId, gen)) -{ -} +StdMeshers_CompositeSegment_1DPy::StdMeshers_CompositeSegment_1DPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_CompositeSegment_1D(hypId, studyId, gen)) +{} #endif StdMeshers_CompositeSegment_1DPy::~StdMeshers_CompositeSegment_1DPy() = default; @@ -679,20 +715,20 @@ void StdMeshers_Deflection1DPy::init_type(PyObject* module) behaviors().name("StdMeshers_Deflection1D"); behaviors().doc("StdMeshers_Deflection1D"); - add_varargs_method("setDeflection", &StdMeshers_Deflection1DPy::setDeflection, "setDeflection()"); + add_varargs_method("setDeflection", + &StdMeshers_Deflection1DPy::setDeflection, + "setDeflection()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Deflection1DPy::StdMeshers_Deflection1DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Deflection1D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Deflection1D(hypId, gen)) +{} #else StdMeshers_Deflection1DPy::StdMeshers_Deflection1DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Deflection1D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Deflection1D(hypId, studyId, gen)) +{} #endif StdMeshers_Deflection1DPy::~StdMeshers_Deflection1DPy() = default; @@ -715,21 +751,19 @@ void StdMeshers_Hexa_3DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Hexa_3DPy::StdMeshers_Hexa_3DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Hexa_3D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Hexa_3D(hypId, gen)) +{} #else StdMeshers_Hexa_3DPy::StdMeshers_Hexa_3DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Hexa_3D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Hexa_3D(hypId, studyId, gen)) +{} #endif StdMeshers_Hexa_3DPy::~StdMeshers_Hexa_3DPy() = default; // --------------------------------------------------------------------------- -#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- +#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- void StdMeshers_TrianglePreferencePy::init_type(PyObject* module) { behaviors().name("StdMeshers_TrianglePreference"); @@ -737,13 +771,14 @@ void StdMeshers_TrianglePreferencePy::init_type(PyObject* module) SMESH_HypothesisPyBase::init_type(module); } -StdMeshers_TrianglePreferencePy::StdMeshers_TrianglePreferencePy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_TrianglePreference(hypId, studyId, gen)) -{ -} +StdMeshers_TrianglePreferencePy::StdMeshers_TrianglePreferencePy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_TrianglePreference(hypId, studyId, gen)) +{} StdMeshers_TrianglePreferencePy::~StdMeshers_TrianglePreferencePy() = default; -#endif // -------------------------------------------------------------------- +#endif // -------------------------------------------------------------------- // --------------------------------------------------------------------------- @@ -758,27 +793,27 @@ void StdMeshers_StartEndLengthPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_StartEndLengthPy::StdMeshers_StartEndLengthPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_StartEndLength(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_StartEndLength(hypId, gen)) +{} #else StdMeshers_StartEndLengthPy::StdMeshers_StartEndLengthPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_StartEndLength(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_StartEndLength(hypId, studyId, gen)) +{} #endif StdMeshers_StartEndLengthPy::~StdMeshers_StartEndLengthPy() = default; Py::Object StdMeshers_StartEndLengthPy::setLength(const Py::Tuple& args) { - hypothesis()->SetLength((double)Py::Float(args[0]),(bool)Py::Boolean(args[1])); + hypothesis()->SetLength((double)Py::Float(args[0]), + (bool)Py::Boolean(args[1])); return Py::None(); } Py::Object StdMeshers_StartEndLengthPy::getLength(const Py::Tuple& args) { - return Py::Float(hypothesis()->GetLength((bool)Py::Boolean(args[0]))); + return Py::Float( + hypothesis()->GetLength((bool)Py::Boolean(args[0]))); } // --------------------------------------------------------------------------- @@ -787,21 +822,26 @@ void StdMeshers_SegmentLengthAroundVertexPy::init_type(PyObject* module) { behaviors().name("StdMeshers_SegmentLengthAroundVertex"); behaviors().doc("StdMeshers_SegmentLengthAroundVertex"); - add_varargs_method("setLength", &StdMeshers_SegmentLengthAroundVertexPy::setLength, "setLength()"); - add_varargs_method("getLength", &StdMeshers_SegmentLengthAroundVertexPy::getLength, "getLength()"); + add_varargs_method("setLength", + &StdMeshers_SegmentLengthAroundVertexPy::setLength, + "setLength()"); + add_varargs_method("getLength", + &StdMeshers_SegmentLengthAroundVertexPy::getLength, + "getLength()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 -StdMeshers_SegmentLengthAroundVertexPy::StdMeshers_SegmentLengthAroundVertexPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_SegmentLengthAroundVertex(hypId, gen)) -{ -} +StdMeshers_SegmentLengthAroundVertexPy::StdMeshers_SegmentLengthAroundVertexPy(int hypId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_SegmentLengthAroundVertex(hypId, gen)) +{} #else -StdMeshers_SegmentLengthAroundVertexPy::StdMeshers_SegmentLengthAroundVertexPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_SegmentLengthAroundVertex(hypId, studyId, gen)) -{ -} +StdMeshers_SegmentLengthAroundVertexPy::StdMeshers_SegmentLengthAroundVertexPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_SegmentLengthAroundVertex(hypId, studyId, gen)) +{} #endif StdMeshers_SegmentLengthAroundVertexPy::~StdMeshers_SegmentLengthAroundVertexPy() = default; @@ -814,8 +854,9 @@ Py::Object StdMeshers_SegmentLengthAroundVertexPy::setLength(const Py::Tuple& ar Py::Object StdMeshers_SegmentLengthAroundVertexPy::getLength(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetLength()); } @@ -830,14 +871,14 @@ void StdMeshers_SegmentAroundVertex_0DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_SegmentAroundVertex_0DPy::StdMeshers_SegmentAroundVertex_0DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_SegmentAroundVertex_0D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_SegmentAroundVertex_0D(hypId, gen)) +{} #else -StdMeshers_SegmentAroundVertex_0DPy::StdMeshers_SegmentAroundVertex_0DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_SegmentAroundVertex_0D(hypId, studyId, gen)) -{ -} +StdMeshers_SegmentAroundVertex_0DPy::StdMeshers_SegmentAroundVertex_0DPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_SegmentAroundVertex_0D(hypId, studyId, gen)) +{} #endif StdMeshers_SegmentAroundVertex_0DPy::~StdMeshers_SegmentAroundVertex_0DPy() = default; @@ -853,14 +894,12 @@ void StdMeshers_RadialPrism_3DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_RadialPrism_3DPy::StdMeshers_RadialPrism_3DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_RadialPrism_3D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_RadialPrism_3D(hypId, gen)) +{} #else StdMeshers_RadialPrism_3DPy::StdMeshers_RadialPrism_3DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_RadialPrism_3D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_RadialPrism_3D(hypId, studyId, gen)) +{} #endif StdMeshers_RadialPrism_3DPy::~StdMeshers_RadialPrism_3DPy() = default; @@ -876,14 +915,12 @@ void StdMeshers_QuadraticMeshPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_QuadraticMeshPy::StdMeshers_QuadraticMeshPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_QuadraticMesh(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_QuadraticMesh(hypId, gen)) +{} #else StdMeshers_QuadraticMeshPy::StdMeshers_QuadraticMeshPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_QuadraticMesh(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_QuadraticMesh(hypId, studyId, gen)) +{} #endif StdMeshers_QuadraticMeshPy::~StdMeshers_QuadraticMeshPy() = default; @@ -899,14 +936,14 @@ void StdMeshers_ProjectionSource3DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_ProjectionSource3DPy::StdMeshers_ProjectionSource3DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource3D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource3D(hypId, gen)) +{} #else -StdMeshers_ProjectionSource3DPy::StdMeshers_ProjectionSource3DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource3D(hypId, studyId, gen)) -{ -} +StdMeshers_ProjectionSource3DPy::StdMeshers_ProjectionSource3DPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource3D(hypId, studyId, gen)) +{} #endif StdMeshers_ProjectionSource3DPy::~StdMeshers_ProjectionSource3DPy() = default; @@ -922,14 +959,14 @@ void StdMeshers_ProjectionSource2DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_ProjectionSource2DPy::StdMeshers_ProjectionSource2DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource2D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource2D(hypId, gen)) +{} #else -StdMeshers_ProjectionSource2DPy::StdMeshers_ProjectionSource2DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource2D(hypId, studyId, gen)) -{ -} +StdMeshers_ProjectionSource2DPy::StdMeshers_ProjectionSource2DPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource2D(hypId, studyId, gen)) +{} #endif StdMeshers_ProjectionSource2DPy::~StdMeshers_ProjectionSource2DPy() = default; @@ -945,14 +982,14 @@ void StdMeshers_ProjectionSource1DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_ProjectionSource1DPy::StdMeshers_ProjectionSource1DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource1D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource1D(hypId, gen)) +{} #else -StdMeshers_ProjectionSource1DPy::StdMeshers_ProjectionSource1DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource1D(hypId, studyId, gen)) -{ -} +StdMeshers_ProjectionSource1DPy::StdMeshers_ProjectionSource1DPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_ProjectionSource1D(hypId, studyId, gen)) +{} #endif StdMeshers_ProjectionSource1DPy::~StdMeshers_ProjectionSource1DPy() = default; @@ -968,14 +1005,12 @@ void StdMeshers_Projection_3DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Projection_3DPy::StdMeshers_Projection_3DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Projection_3D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Projection_3D(hypId, gen)) +{} #else StdMeshers_Projection_3DPy::StdMeshers_Projection_3DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Projection_3D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Projection_3D(hypId, studyId, gen)) +{} #endif StdMeshers_Projection_3DPy::~StdMeshers_Projection_3DPy() = default; @@ -991,14 +1026,12 @@ void StdMeshers_Projection_2DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Projection_2DPy::StdMeshers_Projection_2DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Projection_2D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Projection_2D(hypId, gen)) +{} #else StdMeshers_Projection_2DPy::StdMeshers_Projection_2DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Projection_2D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Projection_2D(hypId, studyId, gen)) +{} #endif StdMeshers_Projection_2DPy::~StdMeshers_Projection_2DPy() = default; @@ -1014,14 +1047,12 @@ void StdMeshers_Projection_1DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Projection_1DPy::StdMeshers_Projection_1DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Projection_1D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Projection_1D(hypId, gen)) +{} #else StdMeshers_Projection_1DPy::StdMeshers_Projection_1DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Projection_1D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Projection_1D(hypId, studyId, gen)) +{} #endif StdMeshers_Projection_1DPy::~StdMeshers_Projection_1DPy() = default; @@ -1037,14 +1068,12 @@ void StdMeshers_Prism_3DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_Prism_3DPy::StdMeshers_Prism_3DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Prism_3D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Prism_3D(hypId, gen)) +{} #else StdMeshers_Prism_3DPy::StdMeshers_Prism_3DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_Prism_3D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_Prism_3D(hypId, studyId, gen)) +{} #endif StdMeshers_Prism_3DPy::~StdMeshers_Prism_3DPy() = default; @@ -1055,21 +1084,23 @@ void StdMeshers_NumberOfSegmentsPy::init_type(PyObject* module) { behaviors().name("StdMeshers_NumberOfSegments"); behaviors().doc("StdMeshers_NumberOfSegments"); - add_varargs_method("setNumberOfSegments",&StdMeshers_NumberOfSegmentsPy::setNumSegm,"setNumberOfSegments()"); - add_varargs_method("getNumberOfSegments",&StdMeshers_NumberOfSegmentsPy::getNumSegm,"getNumberOfSegments()"); + add_varargs_method("setNumberOfSegments", + &StdMeshers_NumberOfSegmentsPy::setNumSegm, + "setNumberOfSegments()"); + add_varargs_method("getNumberOfSegments", + &StdMeshers_NumberOfSegmentsPy::getNumSegm, + "getNumberOfSegments()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 StdMeshers_NumberOfSegmentsPy::StdMeshers_NumberOfSegmentsPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_NumberOfSegments(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_NumberOfSegments(hypId, gen)) +{} #else StdMeshers_NumberOfSegmentsPy::StdMeshers_NumberOfSegmentsPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_NumberOfSegments(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_NumberOfSegments(hypId, studyId, gen)) +{} #endif StdMeshers_NumberOfSegmentsPy::~StdMeshers_NumberOfSegmentsPy() = default; @@ -1082,8 +1113,9 @@ Py::Object StdMeshers_NumberOfSegmentsPy::setNumSegm(const Py::Tuple& args) Py::Object StdMeshers_NumberOfSegmentsPy::getNumSegm(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Long(hypothesis()->GetNumberOfSegments()); } @@ -1093,21 +1125,23 @@ void StdMeshers_NumberOfLayersPy::init_type(PyObject* module) { behaviors().name("StdMeshers_NumberOfLayers"); behaviors().doc("StdMeshers_NumberOfLayers"); - add_varargs_method("setNumberOfLayers",&StdMeshers_NumberOfLayersPy::setNumLayers,"setNumberOfLayers()"); - add_varargs_method("getNumberOfLayers",&StdMeshers_NumberOfLayersPy::getNumLayers,"getNumberOfLayers()"); + add_varargs_method("setNumberOfLayers", + &StdMeshers_NumberOfLayersPy::setNumLayers, + "setNumberOfLayers()"); + add_varargs_method("getNumberOfLayers", + &StdMeshers_NumberOfLayersPy::getNumLayers, + "getNumberOfLayers()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 StdMeshers_NumberOfLayersPy::StdMeshers_NumberOfLayersPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_NumberOfLayers(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_NumberOfLayers(hypId, gen)) +{} #else StdMeshers_NumberOfLayersPy::StdMeshers_NumberOfLayersPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_NumberOfLayers(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_NumberOfLayers(hypId, studyId, gen)) +{} #endif StdMeshers_NumberOfLayersPy::~StdMeshers_NumberOfLayersPy() = default; @@ -1120,8 +1154,9 @@ Py::Object StdMeshers_NumberOfLayersPy::setNumLayers(const Py::Tuple& args) Py::Object StdMeshers_NumberOfLayersPy::getNumLayers(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Long(hypothesis()->GetNumberOfLayers()); } @@ -1136,14 +1171,12 @@ void StdMeshers_MEFISTO_2DPy::init_type(PyObject* module) #if SMESH_VERSION_MAJOR >= 9 StdMeshers_MEFISTO_2DPy::StdMeshers_MEFISTO_2DPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, gen)) +{} #else StdMeshers_MEFISTO_2DPy::StdMeshers_MEFISTO_2DPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MEFISTO_2D(hypId, studyId, gen)) +{} #endif StdMeshers_MEFISTO_2DPy::~StdMeshers_MEFISTO_2DPy() = default; @@ -1154,21 +1187,23 @@ void StdMeshers_MaxElementVolumePy::init_type(PyObject* module) { behaviors().name("StdMeshers_MaxElementVolume"); behaviors().doc("StdMeshers_MaxElementVolume"); - add_varargs_method("setMaxVolume",&StdMeshers_MaxElementVolumePy::setMaxVolume,"setMaxVolume()"); - add_varargs_method("getMaxVolume",&StdMeshers_MaxElementVolumePy::getMaxVolume,"getMaxVolume()"); + add_varargs_method("setMaxVolume", + &StdMeshers_MaxElementVolumePy::setMaxVolume, + "setMaxVolume()"); + add_varargs_method("getMaxVolume", + &StdMeshers_MaxElementVolumePy::getMaxVolume, + "getMaxVolume()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 StdMeshers_MaxElementVolumePy::StdMeshers_MaxElementVolumePy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MaxElementVolume(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MaxElementVolume(hypId, gen)) +{} #else StdMeshers_MaxElementVolumePy::StdMeshers_MaxElementVolumePy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_MaxElementVolume(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_MaxElementVolume(hypId, studyId, gen)) +{} #endif StdMeshers_MaxElementVolumePy::~StdMeshers_MaxElementVolumePy() = default; @@ -1181,8 +1216,9 @@ Py::Object StdMeshers_MaxElementVolumePy::setMaxVolume(const Py::Tuple& args) Py::Object StdMeshers_MaxElementVolumePy::getMaxVolume(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Float(hypothesis()->GetMaxVolume()); } @@ -1192,21 +1228,19 @@ void StdMeshers_LengthFromEdgesPy::init_type(PyObject* module) { behaviors().name("StdMeshers_LengthFromEdges"); behaviors().doc("StdMeshers_LengthFromEdges"); - add_varargs_method("setMode",&StdMeshers_LengthFromEdgesPy::setMode,"setMode()"); - add_varargs_method("getMode",&StdMeshers_LengthFromEdgesPy::getMode,"getMode()"); + add_varargs_method("setMode", &StdMeshers_LengthFromEdgesPy::setMode, "setMode()"); + add_varargs_method("getMode", &StdMeshers_LengthFromEdgesPy::getMode, "getMode()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 StdMeshers_LengthFromEdgesPy::StdMeshers_LengthFromEdgesPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_LengthFromEdges(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_LengthFromEdges(hypId, gen)) +{} #else StdMeshers_LengthFromEdgesPy::StdMeshers_LengthFromEdgesPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_LengthFromEdges(hypId, studyId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_LengthFromEdges(hypId, studyId, gen)) +{} #endif StdMeshers_LengthFromEdgesPy::~StdMeshers_LengthFromEdgesPy() = default; @@ -1219,8 +1253,9 @@ Py::Object StdMeshers_LengthFromEdgesPy::setMode(const Py::Tuple& args) Py::Object StdMeshers_LengthFromEdgesPy::getMode(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::Long(hypothesis()->GetMode()); } @@ -1231,39 +1266,41 @@ void StdMeshers_LayerDistributionPy::init_type(PyObject* module) behaviors().name("StdMeshers_LayerDistribution"); behaviors().doc("StdMeshers_LayerDistribution"); add_varargs_method("setLayerDistribution", - &StdMeshers_LayerDistributionPy::setLayerDistribution, - "setLayerDistribution()"); + &StdMeshers_LayerDistributionPy::setLayerDistribution, + "setLayerDistribution()"); add_varargs_method("getLayerDistribution", - &StdMeshers_LayerDistributionPy::getLayerDistribution, - "getLayerDistribution()"); + &StdMeshers_LayerDistributionPy::getLayerDistribution, + "getLayerDistribution()"); SMESH_HypothesisPyBase::init_type(module); } #if SMESH_VERSION_MAJOR >= 9 StdMeshers_LayerDistributionPy::StdMeshers_LayerDistributionPy(int hypId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_LayerDistribution(hypId, gen)) -{ -} + : SMESH_HypothesisPyBase(new StdMeshers_LayerDistribution(hypId, gen)) +{} #else -StdMeshers_LayerDistributionPy::StdMeshers_LayerDistributionPy(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_HypothesisPyBase(new StdMeshers_LayerDistribution(hypId, studyId, gen)) -{ -} +StdMeshers_LayerDistributionPy::StdMeshers_LayerDistributionPy(int hypId, + int studyId, + SMESH_Gen* gen) + : SMESH_HypothesisPyBase(new StdMeshers_LayerDistribution(hypId, studyId, gen)) +{} #endif StdMeshers_LayerDistributionPy::~StdMeshers_LayerDistributionPy() = default; Py::Object StdMeshers_LayerDistributionPy::setLayerDistribution(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } return Py::None(); } Py::Object StdMeshers_LayerDistributionPy::getLayerDistribution(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); - //return hypothesis()->GetLayerDistribution(); + } + // return hypothesis()->GetLayerDistribution(); return Py::None(); } diff --git a/src/Mod/Fem/App/HypothesisPy.h b/src/Mod/Fem/App/HypothesisPy.h old mode 100755 new mode 100644 index 5b321ac7d4..0526a0398f --- a/src/Mod/Fem/App/HypothesisPy.h +++ b/src/Mod/Fem/App/HypothesisPy.h @@ -24,22 +24,25 @@ #define FEM_HYPOTHESISPY_H #include +#include // needed for SMESH_VERSION_MAJOR #include -#include // needed for SMESH_VERSION_MAJOR class SMESH_Hypothesis; class SMESH_Gen; -namespace Fem { +namespace Fem +{ -class HypothesisPy : public Py::PythonExtension +class HypothesisPy: public Py::PythonExtension { public: using HypothesisPyBase = Py::PythonExtension; explicit HypothesisPy(std::shared_ptr); ~HypothesisPy() override; std::shared_ptr getHypothesis() const - { return hyp; } + { + return hyp; + } private: std::shared_ptr hyp; @@ -47,17 +50,17 @@ private: using Hypothesis = Py::ExtensionObject; -template -class SMESH_HypothesisPy : public Py::PythonExtension +template +class SMESH_HypothesisPy: public Py::PythonExtension { public: using SMESH_HypothesisPyBase = SMESH_HypothesisPy; - static void init_type(PyObject*); // announce properties and methods + static void init_type(PyObject*); // announce properties and methods explicit SMESH_HypothesisPy(SMESH_Hypothesis*); ~SMESH_HypothesisPy() override; - Py::Object getattr(const char *name) override; + Py::Object getattr(const char* name) override; Py::Object repr() override; Py::Object getLibName(const Py::Tuple& args); Py::Object setLibName(const Py::Tuple& args); @@ -72,22 +75,26 @@ public: Py::Object setParametersByMesh(const Py::Tuple& args); std::shared_ptr getHypothesis() const - { return hyp; } + { + return hyp; + } protected: template type* hypothesis() const - { return static_cast(hyp.get()); } + { + return static_cast(hyp.get()); + } private: - static PyObject *PyMake(struct _typeobject *, PyObject *, PyObject *); + static PyObject* PyMake(struct _typeobject*, PyObject*, PyObject*); private: std::shared_ptr hyp; }; #if SMESH_VERSION_MAJOR >= 9 -class StdMeshers_Arithmetic1DPy : public SMESH_HypothesisPy +class StdMeshers_Arithmetic1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -98,7 +105,7 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_AutomaticLengthPy : public SMESH_HypothesisPy +class StdMeshers_AutomaticLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -110,7 +117,7 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_NotConformAllowedPy : public SMESH_HypothesisPy +class StdMeshers_NotConformAllowedPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -118,7 +125,7 @@ public: ~StdMeshers_NotConformAllowedPy(); }; -class StdMeshers_MaxLengthPy : public SMESH_HypothesisPy +class StdMeshers_MaxLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -134,7 +141,7 @@ public: Py::Object getUsePreestimatedLength(const Py::Tuple& args); }; -class StdMeshers_LocalLengthPy : public SMESH_HypothesisPy +class StdMeshers_LocalLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -147,7 +154,7 @@ public: Py::Object getPrecision(const Py::Tuple& args); }; -class StdMeshers_MaxElementAreaPy : public SMESH_HypothesisPy +class StdMeshers_MaxElementAreaPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -158,7 +165,8 @@ public: Py::Object getMaxArea(const Py::Tuple& args); }; -class StdMeshers_QuadranglePreferencePy : public SMESH_HypothesisPy +class StdMeshers_QuadranglePreferencePy + : public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -166,7 +174,7 @@ public: ~StdMeshers_QuadranglePreferencePy(); }; -class StdMeshers_Quadrangle_2DPy : public SMESH_HypothesisPy +class StdMeshers_Quadrangle_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -174,7 +182,7 @@ public: ~StdMeshers_Quadrangle_2DPy(); }; -class StdMeshers_Regular_1DPy : public SMESH_HypothesisPy +class StdMeshers_Regular_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -182,7 +190,7 @@ public: ~StdMeshers_Regular_1DPy(); }; -class StdMeshers_UseExisting_1DPy : public SMESH_HypothesisPy +class StdMeshers_UseExisting_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -190,7 +198,7 @@ public: ~StdMeshers_UseExisting_1DPy(); }; -class StdMeshers_UseExisting_2DPy : public SMESH_HypothesisPy +class StdMeshers_UseExisting_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -198,7 +206,7 @@ public: ~StdMeshers_UseExisting_2DPy(); }; -class StdMeshers_CompositeSegment_1DPy : public SMESH_HypothesisPy +class StdMeshers_CompositeSegment_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -206,7 +214,7 @@ public: ~StdMeshers_CompositeSegment_1DPy(); }; -class StdMeshers_Deflection1DPy : public SMESH_HypothesisPy +class StdMeshers_Deflection1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -216,7 +224,7 @@ public: Py::Object setDeflection(const Py::Tuple& args); }; -class StdMeshers_Hexa_3DPy : public SMESH_HypothesisPy +class StdMeshers_Hexa_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -224,7 +232,7 @@ public: ~StdMeshers_Hexa_3DPy(); }; -class StdMeshers_StartEndLengthPy : public SMESH_HypothesisPy +class StdMeshers_StartEndLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -234,7 +242,8 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_SegmentLengthAroundVertexPy : public SMESH_HypothesisPy +class StdMeshers_SegmentLengthAroundVertexPy + : public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -244,7 +253,8 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_SegmentAroundVertex_0DPy : public SMESH_HypothesisPy +class StdMeshers_SegmentAroundVertex_0DPy + : public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -252,7 +262,7 @@ public: ~StdMeshers_SegmentAroundVertex_0DPy(); }; -class StdMeshers_RadialPrism_3DPy : public SMESH_HypothesisPy +class StdMeshers_RadialPrism_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -260,7 +270,7 @@ public: ~StdMeshers_RadialPrism_3DPy(); }; -class StdMeshers_QuadraticMeshPy : public SMESH_HypothesisPy +class StdMeshers_QuadraticMeshPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -268,7 +278,7 @@ public: ~StdMeshers_QuadraticMeshPy(); }; -class StdMeshers_ProjectionSource3DPy : public SMESH_HypothesisPy +class StdMeshers_ProjectionSource3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -276,7 +286,7 @@ public: ~StdMeshers_ProjectionSource3DPy(); }; -class StdMeshers_ProjectionSource2DPy : public SMESH_HypothesisPy +class StdMeshers_ProjectionSource2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -284,7 +294,7 @@ public: ~StdMeshers_ProjectionSource2DPy(); }; -class StdMeshers_ProjectionSource1DPy : public SMESH_HypothesisPy +class StdMeshers_ProjectionSource1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -292,7 +302,7 @@ public: ~StdMeshers_ProjectionSource1DPy(); }; -class StdMeshers_Projection_3DPy : public SMESH_HypothesisPy +class StdMeshers_Projection_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -300,7 +310,7 @@ public: ~StdMeshers_Projection_3DPy(); }; -class StdMeshers_Projection_2DPy : public SMESH_HypothesisPy +class StdMeshers_Projection_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -308,7 +318,7 @@ public: ~StdMeshers_Projection_2DPy(); }; -class StdMeshers_Projection_1DPy : public SMESH_HypothesisPy +class StdMeshers_Projection_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -316,7 +326,7 @@ public: ~StdMeshers_Projection_1DPy(); }; -class StdMeshers_Prism_3DPy : public SMESH_HypothesisPy +class StdMeshers_Prism_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -324,7 +334,7 @@ public: ~StdMeshers_Prism_3DPy(); }; -class StdMeshers_NumberOfSegmentsPy : public SMESH_HypothesisPy +class StdMeshers_NumberOfSegmentsPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -334,7 +344,7 @@ public: Py::Object getNumSegm(const Py::Tuple& args); }; -class StdMeshers_NumberOfLayersPy : public SMESH_HypothesisPy +class StdMeshers_NumberOfLayersPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -344,7 +354,7 @@ public: Py::Object getNumLayers(const Py::Tuple& args); }; -class StdMeshers_MEFISTO_2DPy : public SMESH_HypothesisPy +class StdMeshers_MEFISTO_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -352,7 +362,7 @@ public: ~StdMeshers_MEFISTO_2DPy(); }; -class StdMeshers_MaxElementVolumePy : public SMESH_HypothesisPy +class StdMeshers_MaxElementVolumePy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -362,7 +372,7 @@ public: Py::Object getMaxVolume(const Py::Tuple& args); }; -class StdMeshers_LengthFromEdgesPy : public SMESH_HypothesisPy +class StdMeshers_LengthFromEdgesPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -372,7 +382,7 @@ public: Py::Object getMode(const Py::Tuple& args); }; -class StdMeshers_LayerDistributionPy : public SMESH_HypothesisPy +class StdMeshers_LayerDistributionPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -382,7 +392,7 @@ public: Py::Object getLayerDistribution(const Py::Tuple& args); }; #else -class StdMeshers_Arithmetic1DPy : public SMESH_HypothesisPy +class StdMeshers_Arithmetic1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -393,7 +403,7 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_AutomaticLengthPy : public SMESH_HypothesisPy +class StdMeshers_AutomaticLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -405,7 +415,7 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_NotConformAllowedPy : public SMESH_HypothesisPy +class StdMeshers_NotConformAllowedPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -413,7 +423,7 @@ public: ~StdMeshers_NotConformAllowedPy() override; }; -class StdMeshers_MaxLengthPy : public SMESH_HypothesisPy +class StdMeshers_MaxLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -429,7 +439,7 @@ public: Py::Object getUsePreestimatedLength(const Py::Tuple& args); }; -class StdMeshers_LocalLengthPy : public SMESH_HypothesisPy +class StdMeshers_LocalLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -442,7 +452,7 @@ public: Py::Object getPrecision(const Py::Tuple& args); }; -class StdMeshers_MaxElementAreaPy : public SMESH_HypothesisPy +class StdMeshers_MaxElementAreaPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -453,7 +463,8 @@ public: Py::Object getMaxArea(const Py::Tuple& args); }; -class StdMeshers_QuadranglePreferencePy : public SMESH_HypothesisPy +class StdMeshers_QuadranglePreferencePy + : public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -461,7 +472,7 @@ public: ~StdMeshers_QuadranglePreferencePy() override; }; -class StdMeshers_Quadrangle_2DPy : public SMESH_HypothesisPy +class StdMeshers_Quadrangle_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -469,7 +480,7 @@ public: ~StdMeshers_Quadrangle_2DPy() override; }; -class StdMeshers_Regular_1DPy : public SMESH_HypothesisPy +class StdMeshers_Regular_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -477,7 +488,7 @@ public: ~StdMeshers_Regular_1DPy() override; }; -class StdMeshers_UseExisting_1DPy : public SMESH_HypothesisPy +class StdMeshers_UseExisting_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -485,7 +496,7 @@ public: ~StdMeshers_UseExisting_1DPy() override; }; -class StdMeshers_UseExisting_2DPy : public SMESH_HypothesisPy +class StdMeshers_UseExisting_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -493,7 +504,7 @@ public: ~StdMeshers_UseExisting_2DPy() override; }; -class StdMeshers_CompositeSegment_1DPy : public SMESH_HypothesisPy +class StdMeshers_CompositeSegment_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -501,7 +512,7 @@ public: ~StdMeshers_CompositeSegment_1DPy() override; }; -class StdMeshers_Deflection1DPy : public SMESH_HypothesisPy +class StdMeshers_Deflection1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -511,24 +522,24 @@ public: Py::Object setDeflection(const Py::Tuple& args); }; -class StdMeshers_Hexa_3DPy : public SMESH_HypothesisPy +class StdMeshers_Hexa_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); StdMeshers_Hexa_3DPy(int hypId, int studyId, SMESH_Gen* gen); ~StdMeshers_Hexa_3DPy() override; }; -#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- -class StdMeshers_TrianglePreferencePy : public SMESH_HypothesisPy +#if SMESH_VERSION_MAJOR < 7 // ----------------------------------------------- +class StdMeshers_TrianglePreferencePy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); StdMeshers_TrianglePreferencePy(int hypId, int studyId, SMESH_Gen* gen); ~StdMeshers_TrianglePreferencePy(); }; -#endif // -------------------------------------------------------------------- +#endif // -------------------------------------------------------------------- -class StdMeshers_StartEndLengthPy : public SMESH_HypothesisPy +class StdMeshers_StartEndLengthPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -538,7 +549,8 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_SegmentLengthAroundVertexPy : public SMESH_HypothesisPy +class StdMeshers_SegmentLengthAroundVertexPy + : public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -548,7 +560,8 @@ public: Py::Object getLength(const Py::Tuple& args); }; -class StdMeshers_SegmentAroundVertex_0DPy : public SMESH_HypothesisPy +class StdMeshers_SegmentAroundVertex_0DPy + : public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -556,7 +569,7 @@ public: ~StdMeshers_SegmentAroundVertex_0DPy() override; }; -class StdMeshers_RadialPrism_3DPy : public SMESH_HypothesisPy +class StdMeshers_RadialPrism_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -564,7 +577,7 @@ public: ~StdMeshers_RadialPrism_3DPy() override; }; -class StdMeshers_QuadraticMeshPy : public SMESH_HypothesisPy +class StdMeshers_QuadraticMeshPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -572,63 +585,63 @@ public: ~StdMeshers_QuadraticMeshPy() override; }; -class StdMeshers_ProjectionSource3DPy : public SMESH_HypothesisPy +class StdMeshers_ProjectionSource3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); StdMeshers_ProjectionSource3DPy(int hypId, int studyId, SMESH_Gen* gen); ~StdMeshers_ProjectionSource3DPy() override; - //Py::Object setSource3DShape(const Py::Tuple& args); - //Py::Object getSource3DShape(const Py::Tuple& args); - //Py::Object setSourceMesh(const Py::Tuple& args); - //Py::Object getSourceMesh(const Py::Tuple& args); - //Py::Object setVertexAssociation(const Py::Tuple& args); - //Py::Object getSourceVertex(const Py::Tuple& args); - //Py::Object getTargetVertex(const Py::Tuple& args); - //Py::Object hasVertexAssociation(const Py::Tuple& args); - //Py::Object getStoreParams(const Py::Tuple& args); - //Py::Object restoreParams(const Py::Tuple& args); + // Py::Object setSource3DShape(const Py::Tuple& args); + // Py::Object getSource3DShape(const Py::Tuple& args); + // Py::Object setSourceMesh(const Py::Tuple& args); + // Py::Object getSourceMesh(const Py::Tuple& args); + // Py::Object setVertexAssociation(const Py::Tuple& args); + // Py::Object getSourceVertex(const Py::Tuple& args); + // Py::Object getTargetVertex(const Py::Tuple& args); + // Py::Object hasVertexAssociation(const Py::Tuple& args); + // Py::Object getStoreParams(const Py::Tuple& args); + // Py::Object restoreParams(const Py::Tuple& args); }; -class StdMeshers_ProjectionSource2DPy : public SMESH_HypothesisPy +class StdMeshers_ProjectionSource2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); StdMeshers_ProjectionSource2DPy(int hypId, int studyId, SMESH_Gen* gen); ~StdMeshers_ProjectionSource2DPy() override; - //Py::Object setSourceFace(const Py::Tuple& args); - //Py::Object getSourceFace(const Py::Tuple& args); - //Py::Object isCompoundSource(const Py::Tuple& args); - //Py::Object setSourceMesh(const Py::Tuple& args); - //Py::Object getSourceMesh(const Py::Tuple& args); - //Py::Object setVertexAssociation(const Py::Tuple& args); - //Py::Object getSourceVertex(const Py::Tuple& args); - //Py::Object getTargetVertex(const Py::Tuple& args); - //Py::Object hasVertexAssociation(const Py::Tuple& args); - //Py::Object getStoreParams(const Py::Tuple& args); - //Py::Object restoreParams(const Py::Tuple& args); + // Py::Object setSourceFace(const Py::Tuple& args); + // Py::Object getSourceFace(const Py::Tuple& args); + // Py::Object isCompoundSource(const Py::Tuple& args); + // Py::Object setSourceMesh(const Py::Tuple& args); + // Py::Object getSourceMesh(const Py::Tuple& args); + // Py::Object setVertexAssociation(const Py::Tuple& args); + // Py::Object getSourceVertex(const Py::Tuple& args); + // Py::Object getTargetVertex(const Py::Tuple& args); + // Py::Object hasVertexAssociation(const Py::Tuple& args); + // Py::Object getStoreParams(const Py::Tuple& args); + // Py::Object restoreParams(const Py::Tuple& args); }; -class StdMeshers_ProjectionSource1DPy : public SMESH_HypothesisPy +class StdMeshers_ProjectionSource1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); StdMeshers_ProjectionSource1DPy(int hypId, int studyId, SMESH_Gen* gen); ~StdMeshers_ProjectionSource1DPy() override; - //Py::Object setSourceEdge(const Py::Tuple& args); - //Py::Object getSourceEdge(const Py::Tuple& args); - //Py::Object isCompoundSource(const Py::Tuple& args); - //Py::Object setSourceMesh(const Py::Tuple& args); - //Py::Object getSourceMesh(const Py::Tuple& args); - //Py::Object setVertexAssociation(const Py::Tuple& args); - //Py::Object getSourceVertex(const Py::Tuple& args); - //Py::Object getTargetVertex(const Py::Tuple& args); - //Py::Object hasVertexAssociation(const Py::Tuple& args); - //Py::Object getStoreParams(const Py::Tuple& args); - //Py::Object restoreParams(const Py::Tuple& args); + // Py::Object setSourceEdge(const Py::Tuple& args); + // Py::Object getSourceEdge(const Py::Tuple& args); + // Py::Object isCompoundSource(const Py::Tuple& args); + // Py::Object setSourceMesh(const Py::Tuple& args); + // Py::Object getSourceMesh(const Py::Tuple& args); + // Py::Object setVertexAssociation(const Py::Tuple& args); + // Py::Object getSourceVertex(const Py::Tuple& args); + // Py::Object getTargetVertex(const Py::Tuple& args); + // Py::Object hasVertexAssociation(const Py::Tuple& args); + // Py::Object getStoreParams(const Py::Tuple& args); + // Py::Object restoreParams(const Py::Tuple& args); }; -class StdMeshers_Projection_3DPy : public SMESH_HypothesisPy +class StdMeshers_Projection_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -636,7 +649,7 @@ public: ~StdMeshers_Projection_3DPy() override; }; -class StdMeshers_Projection_2DPy : public SMESH_HypothesisPy +class StdMeshers_Projection_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -644,7 +657,7 @@ public: ~StdMeshers_Projection_2DPy() override; }; -class StdMeshers_Projection_1DPy : public SMESH_HypothesisPy +class StdMeshers_Projection_1DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -652,7 +665,7 @@ public: ~StdMeshers_Projection_1DPy() override; }; -class StdMeshers_Prism_3DPy : public SMESH_HypothesisPy +class StdMeshers_Prism_3DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -660,7 +673,7 @@ public: ~StdMeshers_Prism_3DPy() override; }; -class StdMeshers_NumberOfSegmentsPy : public SMESH_HypothesisPy +class StdMeshers_NumberOfSegmentsPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -670,7 +683,7 @@ public: Py::Object getNumSegm(const Py::Tuple& args); }; -class StdMeshers_NumberOfLayersPy : public SMESH_HypothesisPy +class StdMeshers_NumberOfLayersPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -680,7 +693,7 @@ public: Py::Object getNumLayers(const Py::Tuple& args); }; -class StdMeshers_MEFISTO_2DPy : public SMESH_HypothesisPy +class StdMeshers_MEFISTO_2DPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -688,7 +701,7 @@ public: ~StdMeshers_MEFISTO_2DPy() override; }; -class StdMeshers_MaxElementVolumePy : public SMESH_HypothesisPy +class StdMeshers_MaxElementVolumePy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -698,7 +711,7 @@ public: Py::Object getMaxVolume(const Py::Tuple& args); }; -class StdMeshers_LengthFromEdgesPy : public SMESH_HypothesisPy +class StdMeshers_LengthFromEdgesPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -708,7 +721,7 @@ public: Py::Object getMode(const Py::Tuple& args); }; -class StdMeshers_LayerDistributionPy : public SMESH_HypothesisPy +class StdMeshers_LayerDistributionPy: public SMESH_HypothesisPy { public: static void init_type(PyObject*); @@ -719,6 +732,6 @@ public: }; #endif -} // namespace Fem +} // namespace Fem -#endif // FEM_HYPOTHESISPY_H +#endif // FEM_HYPOTHESISPY_H diff --git a/src/Mod/Fem/App/PreCompiled.h b/src/Mod/Fem/App/PreCompiled.h index 17c6982089..a23b894be9 100644 --- a/src/Mod/Fem/App/PreCompiled.h +++ b/src/Mod/Fem/App/PreCompiled.h @@ -26,8 +26,8 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4290) -# pragma warning(disable : 4275) +#pragma warning(disable : 4290) +#pragma warning(disable : 4275) #endif #ifdef _PreComp_ @@ -56,19 +56,19 @@ #include // Salomesh +#include #include #include #include #include -#include +#include +#include +#include #include #include #include #include #include -#include -#include -#include #include #include @@ -78,40 +78,40 @@ #include #include #include +#include #include #include #include -#include #include #include #include #include -#include -#include -#include #include #include #include +#include +#include +#include +#include #include #include -#include #include #include #include #include #include #if SMESH_VERSION_MAJOR < 7 -# include +#include #endif #include // Opencascade #include -#include -#include #include +#include +#include #if OCC_VERSION_HEX < 0x070600 -# include +#include #endif #include #include @@ -123,20 +123,15 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -148,6 +143,11 @@ #include #include #include +#include +#include +#include +#include +#include // VTK #include @@ -190,10 +190,10 @@ // Netgen #ifdef FCWithNetgen -# include -# include -# include +#include +#include +#include #endif -#endif // _PreComp_ +#endif // _PreComp_ #endif diff --git a/src/Mod/Fem/App/PropertyPostDataObject.cpp b/src/Mod/Fem/App/PropertyPostDataObject.cpp index 42ea5b06a2..f416dd7aa2 100644 --- a/src/Mod/Fem/App/PropertyPostDataObject.cpp +++ b/src/Mod/Fem/App/PropertyPostDataObject.cpp @@ -23,21 +23,21 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -54,45 +54,48 @@ using namespace Fem; -TYPESYSTEM_SOURCE(Fem::PropertyPostDataObject , App::Property) +TYPESYSTEM_SOURCE(Fem::PropertyPostDataObject, App::Property) PropertyPostDataObject::PropertyPostDataObject() = default; PropertyPostDataObject::~PropertyPostDataObject() = default; -void PropertyPostDataObject::scaleDataObject(vtkDataObject *dataObject, double s) +void PropertyPostDataObject::scaleDataObject(vtkDataObject* dataObject, double s) { - auto scalePoints = [](vtkPoints *points, double s) { + auto scalePoints = [](vtkPoints* points, double s) { for (vtkIdType i = 0; i < points->GetNumberOfPoints(); i++) { double xyz[3]; points->GetPoint(i, xyz); - for (double & j : xyz) + for (double& j : xyz) { j *= s; + } points->SetPoint(i, xyz); } }; if (dataObject->GetDataObjectType() == VTK_POLY_DATA) { - vtkPolyData *dataSet = vtkPolyData::SafeDownCast(dataObject); + vtkPolyData* dataSet = vtkPolyData::SafeDownCast(dataObject); scalePoints(dataSet->GetPoints(), s); } else if (dataObject->GetDataObjectType() == VTK_STRUCTURED_GRID) { - vtkStructuredGrid *dataSet = vtkStructuredGrid::SafeDownCast(dataObject); + vtkStructuredGrid* dataSet = vtkStructuredGrid::SafeDownCast(dataObject); scalePoints(dataSet->GetPoints(), s); } else if (dataObject->GetDataObjectType() == VTK_UNSTRUCTURED_GRID) { - vtkUnstructuredGrid *dataSet = vtkUnstructuredGrid::SafeDownCast(dataObject); + vtkUnstructuredGrid* dataSet = vtkUnstructuredGrid::SafeDownCast(dataObject); scalePoints(dataSet->GetPoints(), s); } else if (dataObject->GetDataObjectType() == VTK_MULTIBLOCK_DATA_SET) { - vtkMultiBlockDataSet *dataSet = vtkMultiBlockDataSet::SafeDownCast(dataObject); - for (unsigned int i = 0; i < dataSet->GetNumberOfBlocks(); i++) + vtkMultiBlockDataSet* dataSet = vtkMultiBlockDataSet::SafeDownCast(dataObject); + for (unsigned int i = 0; i < dataSet->GetNumberOfBlocks(); i++) { scaleDataObject(dataSet->GetBlock(i), s); + } } else if (dataObject->GetDataObjectType() == VTK_MULTIPIECE_DATA_SET) { - vtkMultiPieceDataSet *dataSet = vtkMultiPieceDataSet::SafeDownCast(dataObject); - for (unsigned int i = 0; i < dataSet->GetNumberOfPieces(); i++) + vtkMultiPieceDataSet* dataSet = vtkMultiPieceDataSet::SafeDownCast(dataObject); + for (unsigned int i = 0; i < dataSet->GetNumberOfPieces(); i++) { scaleDataObject(dataSet->GetPiece(i), s); + } } } @@ -105,7 +108,7 @@ void PropertyPostDataObject::scale(double s) } } -void PropertyPostDataObject::setValue(const vtkSmartPointer &ds) +void PropertyPostDataObject::setValue(const vtkSmartPointer& ds) { aboutToSetValue(); @@ -120,7 +123,7 @@ void PropertyPostDataObject::setValue(const vtkSmartPointer &ds) hasSetValue(); } -const vtkSmartPointer &PropertyPostDataObject::getValue() const +const vtkSmartPointer& PropertyPostDataObject::getValue() const { return m_dataObject; } @@ -140,26 +143,26 @@ bool PropertyPostDataObject::isDataSet() int PropertyPostDataObject::getDataType() { - if (!m_dataObject) + if (!m_dataObject) { return -1; + } return m_dataObject->GetDataObjectType(); } -PyObject *PropertyPostDataObject::getPyObject() +PyObject* PropertyPostDataObject::getPyObject() { - //TODO: fetch the vtk python object from the data set and return it + // TODO: fetch the vtk python object from the data set and return it return Py::new_reference_to(Py::None()); } -void PropertyPostDataObject::setPyObject(PyObject * /*value*/) -{ -} +void PropertyPostDataObject::setPyObject(PyObject* /*value*/) +{} -App::Property *PropertyPostDataObject::Copy() const +App::Property* PropertyPostDataObject::Copy() const { - PropertyPostDataObject *prop = new PropertyPostDataObject(); + PropertyPostDataObject* prop = new PropertyPostDataObject(); if (m_dataObject) { prop->createDataObjectByExternalType(m_dataObject); @@ -204,10 +207,10 @@ void PropertyPostDataObject::createDataObjectByExternalType(vtkSmartPointer(from).m_dataObject; + m_dataObject = dynamic_cast(from).m_dataObject; hasSetValue(); } @@ -218,34 +221,35 @@ unsigned int PropertyPostDataObject::getMemSize() const void PropertyPostDataObject::getPaths(std::vector& /*paths*/) const { - /* paths.push_back(App::ObjectIdentifier(getContainer()) - << App::ObjectIdentifier::Component::SimpleComponent(getName()) - << App::ObjectIdentifier::Component::SimpleComponent( - App::ObjectIdentifier::String("ShapeType"))); - paths.push_back(App::ObjectIdentifier(getContainer()) - << App::ObjectIdentifier::Component::SimpleComponent(getName()) - << App::ObjectIdentifier::Component::SimpleComponent( - App::ObjectIdentifier::String("Orientation"))); - paths.push_back(App::ObjectIdentifier(getContainer()) - << App::ObjectIdentifier::Component::SimpleComponent(getName()) - << App::ObjectIdentifier::Component::SimpleComponent( - App::ObjectIdentifier::String("Length"))); - paths.push_back(App::ObjectIdentifier(getContainer()) - << App::ObjectIdentifier::Component::SimpleComponent(getName()) - << App::ObjectIdentifier::Component::SimpleComponent( - App::ObjectIdentifier::String("Area"))); - paths.push_back(App::ObjectIdentifier(getContainer()) - << App::ObjectIdentifier::Component::SimpleComponent(getName()) - << App::ObjectIdentifier::Component::SimpleComponent( - App::ObjectIdentifier::String("Volume"))); - */ + /* paths.push_back(App::ObjectIdentifier(getContainer()) + << App::ObjectIdentifier::Component::SimpleComponent(getName()) + << App::ObjectIdentifier::Component::SimpleComponent( + App::ObjectIdentifier::String("ShapeType"))); + paths.push_back(App::ObjectIdentifier(getContainer()) + << App::ObjectIdentifier::Component::SimpleComponent(getName()) + << App::ObjectIdentifier::Component::SimpleComponent( + App::ObjectIdentifier::String("Orientation"))); + paths.push_back(App::ObjectIdentifier(getContainer()) + << App::ObjectIdentifier::Component::SimpleComponent(getName()) + << App::ObjectIdentifier::Component::SimpleComponent( + App::ObjectIdentifier::String("Length"))); + paths.push_back(App::ObjectIdentifier(getContainer()) + << App::ObjectIdentifier::Component::SimpleComponent(getName()) + << App::ObjectIdentifier::Component::SimpleComponent( + App::ObjectIdentifier::String("Area"))); + paths.push_back(App::ObjectIdentifier(getContainer()) + << App::ObjectIdentifier::Component::SimpleComponent(getName()) + << App::ObjectIdentifier::Component::SimpleComponent( + App::ObjectIdentifier::String("Volume"))); + */ } -void PropertyPostDataObject::Save(Base::Writer &writer) const +void PropertyPostDataObject::Save(Base::Writer& writer) const { std::string extension; - if (!m_dataObject) + if (!m_dataObject) { return; + } switch (m_dataObject->GetDataObjectType()) { @@ -262,35 +266,35 @@ void PropertyPostDataObject::Save(Base::Writer &writer) const extension = "vtu"; break; case VTK_UNIFORM_GRID: - extension = "vti";//image data + extension = "vti"; // image data break; - //TODO:multi-datasets use multiple files, this needs to be implemented specially -// case VTK_COMPOSITE_DATA_SET: -// prop->m_dataObject = vtkCompositeDataSet::New(); -// break; -// case VTK_MULTIBLOCK_DATA_SET: -// prop->m_dataObject = vtkMultiBlockDataSet::New(); -// break; -// case VTK_MULTIPIECE_DATA_SET: -// prop->m_dataObject = vtkMultiPieceDataSet::New(); -// break; + // TODO:multi-datasets use multiple files, this needs to be implemented specially + // case VTK_COMPOSITE_DATA_SET: + // prop->m_dataObject = vtkCompositeDataSet::New(); + // break; + // case VTK_MULTIBLOCK_DATA_SET: + // prop->m_dataObject = vtkMultiBlockDataSet::New(); + // break; + // case VTK_MULTIPIECE_DATA_SET: + // prop->m_dataObject = vtkMultiPieceDataSet::New(); + // break; default: break; }; if (!writer.isForceXML()) { std::string file = "Data." + extension; - writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyPostDataObject::Restore(Base::XMLReader &reader) +void PropertyPostDataObject::Restore(Base::XMLReader& reader) { reader.readElement("Data"); - if (!reader.hasAttribute("file")) + if (!reader.hasAttribute("file")) { return; + } std::string file(reader.getAttribute("file")); @@ -300,12 +304,13 @@ void PropertyPostDataObject::Restore(Base::XMLReader &reader) } } -void PropertyPostDataObject::SaveDocFile(Base::Writer &writer) const +void PropertyPostDataObject::SaveDocFile(Base::Writer& writer) const { // If the shape is empty we simply store nothing. The file size will be 0 which // can be checked when reading in the data. - if (!m_dataObject) + if (!m_dataObject) { return; + } // create a temporary file and copy the content to the zip stream // once the tmp. filename is known use always the same because otherwise @@ -319,7 +324,7 @@ void PropertyPostDataObject::SaveDocFile(Base::Writer &writer) const #ifdef VTK_CELL_ARRAY_V2 // Looks like an invalid data object that causes a crash with vtk9 - vtkUnstructuredGrid *dataGrid = vtkUnstructuredGrid::SafeDownCast(m_dataObject); + vtkUnstructuredGrid* dataGrid = vtkUnstructuredGrid::SafeDownCast(m_dataObject); if (dataGrid && (dataGrid->GetPiece() < 0 || dataGrid->GetNumberOfPoints() <= 0)) { std::cerr << "PropertyPostDataObject::SaveDocFile: ignore empty vtkUnstructuredGrid\n"; return; @@ -331,11 +336,12 @@ void PropertyPostDataObject::SaveDocFile(Base::Writer &writer) const // not be created we should not abort. // We only print an error message but continue writing the next files to the // stream... - App::PropertyContainer *father = this->getContainer(); + App::PropertyContainer* father = this->getContainer(); if (father && father->isDerivedFrom(App::DocumentObject::getClassTypeId())) { - App::DocumentObject *obj = static_cast(father); + App::DocumentObject* obj = static_cast(father); Base::Console().Error("Dataset of '%s' cannot be written to vtk file '%s'\n", - obj->Label.getValue(), fi.filePath().c_str()); + obj->Label.getValue(), + fi.filePath().c_str()); } else { Base::Console().Error("Cannot save vtk file '%s'\n", fi.filePath().c_str()); @@ -348,7 +354,7 @@ void PropertyPostDataObject::SaveDocFile(Base::Writer &writer) const Base::ifstream file(fi, std::ios::in | std::ios::binary); if (file) { - std::streambuf *buf = file.rdbuf(); + std::streambuf* buf = file.rdbuf(); writer.Stream() << buf; } @@ -357,7 +363,7 @@ void PropertyPostDataObject::SaveDocFile(Base::Writer &writer) const fi.deleteFile(); } -void PropertyPostDataObject::RestoreDocFile(Base::Reader &reader) +void PropertyPostDataObject::RestoreDocFile(Base::Reader& reader) { Base::FileInfo xml(reader.getFileName()); // create a temporary file and copy the content from the zip stream @@ -367,7 +373,7 @@ void PropertyPostDataObject::RestoreDocFile(Base::Reader &reader) Base::ofstream file(fi, std::ios::out | std::ios::binary); unsigned long ulSize = 0; if (reader) { - std::streambuf *buf = file.rdbuf(); + std::streambuf* buf = file.rdbuf(); reader >> buf; file.flush(); ulSize = buf->pubseekoff(0, std::ios::cur, std::ios::in); @@ -381,16 +387,21 @@ void PropertyPostDataObject::RestoreDocFile(Base::Reader &reader) // TODO: read in of composite data structures need to be coded, // including replace of "GetOutputAsDataSet()" vtkSmartPointer xmlReader; - if (extension == "vtp") + if (extension == "vtp") { xmlReader = vtkSmartPointer::New(); - else if (extension == "vts") + } + else if (extension == "vts") { xmlReader = vtkSmartPointer::New(); - else if (extension == "vtr") + } + else if (extension == "vtr") { xmlReader = vtkSmartPointer::New(); - else if (extension == "vtu") + } + else if (extension == "vtu") { xmlReader = vtkSmartPointer::New(); - else if (extension == "vti") + } + else if (extension == "vti") { xmlReader = vtkSmartPointer::New(); + } xmlReader->SetFileName(fi.filePath().c_str()); xmlReader->Update(); @@ -400,11 +411,12 @@ void PropertyPostDataObject::RestoreDocFile(Base::Reader &reader) // not be read it's NOT an indication for an invalid input stream 'reader'. // We only print an error message but continue reading the next files from the // stream... - App::PropertyContainer *father = this->getContainer(); + App::PropertyContainer* father = this->getContainer(); if (father && father->isDerivedFrom(App::DocumentObject::getClassTypeId())) { - App::DocumentObject *obj = static_cast(father); + App::DocumentObject* obj = static_cast(father); Base::Console().Error("Dataset file '%s' with data of '%s' seems to be empty\n", - fi.filePath().c_str(), obj->Label.getValue()); + fi.filePath().c_str(), + obj->Label.getValue()); } else { Base::Console().Warning("Loaded Dataset file '%s' seems to be empty\n", diff --git a/src/Mod/Fem/App/PropertyPostDataObject.h b/src/Mod/Fem/App/PropertyPostDataObject.h index c950177647..afd8b0b8fb 100644 --- a/src/Mod/Fem/App/PropertyPostDataObject.h +++ b/src/Mod/Fem/App/PropertyPostDataObject.h @@ -36,7 +36,7 @@ namespace Fem /** The vtk data set property class. * @author Stefan Tröger */ -class FemExport PropertyPostDataObject : public App::Property +class FemExport PropertyPostDataObject: public App::Property { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -55,30 +55,30 @@ public: /// check if we hold a dataset or a dataobject (which would mean a composite data structure) bool isDataSet(); bool isComposite(); - int getDataType(); + int getDataType(); //@} /** @name Python interface */ //@{ PyObject* getPyObject() override; - void setPyObject(PyObject *value) override; + void setPyObject(PyObject* value) override; //@} /** @name Save/restore */ //@{ - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; - App::Property *Copy() const override; - void Paste(const App::Property &from) override; - unsigned int getMemSize () const override; + App::Property* Copy() const override; + void Paste(const App::Property& from) override; + unsigned int getMemSize() const override; //@} /// Get valid paths for this property; used by auto completer - void getPaths(std::vector & paths) const override; + void getPaths(std::vector& paths) const override; private: static void scaleDataObject(vtkDataObject*, double s); @@ -88,7 +88,7 @@ protected: vtkSmartPointer m_dataObject; }; -} //namespace FEM +} // namespace Fem -#endif // FEM_PROPERTYPOSTDATASET_H +#endif // FEM_PROPERTYPOSTDATASET_H diff --git a/src/Mod/Fem/Gui/AbaqusHighlighter.cpp b/src/Mod/Fem/Gui/AbaqusHighlighter.cpp index 159dbbf68a..3465c6e766 100644 --- a/src/Mod/Fem/Gui/AbaqusHighlighter.cpp +++ b/src/Mod/Fem/Gui/AbaqusHighlighter.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "AbaqusHighlighter.h" @@ -35,8 +35,7 @@ using namespace FemGui; */ AbaqusHighlighter::AbaqusHighlighter(QObject* parent) : SyntaxHighlighter(parent) -{ -} +{} /** Destroys this object. */ AbaqusHighlighter::~AbaqusHighlighter() = default; @@ -46,16 +45,26 @@ void AbaqusHighlighter::highlightBlock(const QString& text) // Find a syntax file for the Abaqus format here // http://notepad-plus.sourceforge.net/commun/userDefinedLang/userDefineLang_Abaqus.xml // - enum { NormalState = -1, Definition, BeforeKey, InideKey, BeforeValue, InsideValue, Text, Number }; + enum + { + NormalState = -1, + Definition, + BeforeKey, + InideKey, + BeforeValue, + InsideValue, + Text, + Number + }; int state = NormalState; int start = 0; - QColor keywordColor(102, 0, 227); // this->colorByType(SyntaxHighlighter::Keyword) - QColor defnameColor(0, 119, 255); // this->colorByType(SyntaxHighlighter::Defname) - QColor operateColor(153, 0, 102); // this->colorByType(SyntaxHighlighter::Operator) - QColor valueColor(0, 0, 0); // this->colorByType(SyntaxHighlighter::String) - QColor numberColor(0, 127, 127); // this->colorByType(SyntaxHighlighter::Number) + QColor keywordColor(102, 0, 227); // this->colorByType(SyntaxHighlighter::Keyword) + QColor defnameColor(0, 119, 255); // this->colorByType(SyntaxHighlighter::Defname) + QColor operateColor(153, 0, 102); // this->colorByType(SyntaxHighlighter::Operator) + QColor valueColor(0, 0, 0); // this->colorByType(SyntaxHighlighter::String) + QColor numberColor(0, 127, 127); // this->colorByType(SyntaxHighlighter::Number) QColor commentColor = this->colorByType(SyntaxHighlighter::Comment); for (int i = 0; i < text.length(); ++i) { diff --git a/src/Mod/Fem/Gui/AbaqusHighlighter.h b/src/Mod/Fem/Gui/AbaqusHighlighter.h index 38311646f5..26e7d6b4a1 100644 --- a/src/Mod/Fem/Gui/AbaqusHighlighter.h +++ b/src/Mod/Fem/Gui/AbaqusHighlighter.h @@ -26,22 +26,23 @@ #include -namespace FemGui { +namespace FemGui +{ /** * Syntax highlighter for Abaqus. * @author Werner Mayer */ -class AbaqusHighlighter : public Gui::SyntaxHighlighter +class AbaqusHighlighter: public Gui::SyntaxHighlighter { public: explicit AbaqusHighlighter(QObject* parent); ~AbaqusHighlighter() override; protected: - void highlightBlock(const QString &text) override; + void highlightBlock(const QString& text) override; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_ABAQUSHIGHLIGHTER_H +#endif // FEMGUI_ABAQUSHIGHLIGHTER_H diff --git a/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp b/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp index 221bf456f5..f91a693d5a 100644 --- a/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp +++ b/src/Mod/Fem/Gui/ActiveAnalysisObserver.cpp @@ -36,8 +36,9 @@ ActiveAnalysisObserver* ActiveAnalysisObserver::inst = nullptr; ActiveAnalysisObserver* ActiveAnalysisObserver::instance() { - if (!inst) + if (!inst) { inst = new ActiveAnalysisObserver(); + } return inst; } @@ -51,7 +52,8 @@ void ActiveAnalysisObserver::setActiveObject(Fem::FemAnalysis* fem) activeObject = fem; App::Document* doc = fem->getDocument(); activeDocument = Gui::Application::Instance->getDocument(doc); - activeView = static_cast(activeDocument->getViewProvider(activeObject)); + activeView = static_cast( + activeDocument->getViewProvider(activeObject)); attachDocument(doc); } else { @@ -72,8 +74,9 @@ bool ActiveAnalysisObserver::hasActiveObject() const void ActiveAnalysisObserver::highlightActiveObject(const Gui::HighlightMode& mode, bool on) { - if (activeDocument && activeView) + if (activeDocument && activeView) { activeDocument->signalHighlightObject(*activeView, mode, on, 0, 0); + } } void ActiveAnalysisObserver::slotDeletedDocument(const App::Document& Doc) diff --git a/src/Mod/Fem/Gui/ActiveAnalysisObserver.h b/src/Mod/Fem/Gui/ActiveAnalysisObserver.h index 99e7cd740d..8715cf1112 100644 --- a/src/Mod/Fem/Gui/ActiveAnalysisObserver.h +++ b/src/Mod/Fem/Gui/ActiveAnalysisObserver.h @@ -27,16 +27,21 @@ #include #include -namespace Gui { - class Document; - class ViewProviderDocumentObject; +namespace Gui +{ +class Document; +class ViewProviderDocumentObject; +} // namespace Gui + +namespace Fem +{ +class FemAnalysis; } -namespace Fem { class FemAnalysis; } +namespace FemGui +{ -namespace FemGui { - -class ActiveAnalysisObserver : public App::DocumentObserver +class ActiveAnalysisObserver: public App::DocumentObserver { public: static ActiveAnalysisObserver* instance(); @@ -55,11 +60,11 @@ private: private: static ActiveAnalysisObserver* inst; - Fem::FemAnalysis* activeObject{nullptr}; - Gui::ViewProviderDocumentObject* activeView{nullptr}; - Gui::Document* activeDocument{nullptr}; + Fem::FemAnalysis* activeObject {nullptr}; + Gui::ViewProviderDocumentObject* activeView {nullptr}; + Gui::Document* activeDocument {nullptr}; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEMGUI_ACTIVEANALYSISOBSERVER_H +#endif // FEMGUI_ACTIVEANALYSISOBSERVER_H diff --git a/src/Mod/Fem/Gui/AppFemGui.cpp b/src/Mod/Fem/Gui/AppFemGui.cpp index b78b69da81..d1dd8acf3f 100644 --- a/src/Mod/Fem/Gui/AppFemGui.cpp +++ b/src/Mod/Fem/Gui/AppFemGui.cpp @@ -25,8 +25,8 @@ #include #include #include -#include #include +#include #include "DlgSettingsFemCcxImp.h" #include "DlgSettingsFemElmerImp.h" @@ -39,21 +39,13 @@ #include "DlgSettingsFemZ88Imp.h" #include "PropertyFemMeshItem.h" #include "ViewProviderAnalysis.h" -#include "ViewProviderFemMesh.h" -#include "ViewProviderFemMeshShape.h" -#include "ViewProviderFemMeshShapeNetgen.h" -#include "ViewProviderSetElements.h" -#include "ViewProviderSetFaces.h" -#include "ViewProviderSetGeometry.h" -#include "ViewProviderSetNodes.h" -#include "ViewProviderSolver.h" #include "ViewProviderFemConstraint.h" #include "ViewProviderFemConstraintBearing.h" #include "ViewProviderFemConstraintContact.h" #include "ViewProviderFemConstraintDisplacement.h" #include "ViewProviderFemConstraintFixed.h" -#include "ViewProviderFemConstraintForce.h" #include "ViewProviderFemConstraintFluidBoundary.h" +#include "ViewProviderFemConstraintForce.h" #include "ViewProviderFemConstraintGear.h" #include "ViewProviderFemConstraintHeatflux.h" #include "ViewProviderFemConstraintInitialTemperature.h" @@ -64,7 +56,15 @@ #include "ViewProviderFemConstraintSpring.h" #include "ViewProviderFemConstraintTemperature.h" #include "ViewProviderFemConstraintTransform.h" +#include "ViewProviderFemMesh.h" +#include "ViewProviderFemMeshShape.h" +#include "ViewProviderFemMeshShapeNetgen.h" #include "ViewProviderResult.h" +#include "ViewProviderSetElements.h" +#include "ViewProviderSetFaces.h" +#include "ViewProviderSetGeometry.h" +#include "ViewProviderSetNodes.h" +#include "ViewProviderSolver.h" #include "Workbench.h" #ifdef FC_USE_VTK @@ -75,7 +75,7 @@ #endif - // use a different name to CreateCommand() +// use a different name to CreateCommand() void CreateFemCommands(); void loadFemResource() @@ -86,8 +86,9 @@ void loadFemResource() Gui::Translator::instance()->refresh(); } -namespace FemGui { - extern PyObject* initModule(); +namespace FemGui +{ +extern PyObject* initModule(); } @@ -105,6 +106,7 @@ PyMOD_INIT_FUNC(FemGui) // instantiating the commands CreateFemCommands(); + // clang-format off // addition objects FemGui::Workbench ::init(); @@ -184,6 +186,7 @@ PyMOD_INIT_FUNC(FemGui) // add resources and reloads the translators loadFemResource(); + // clang-format on PyMOD_Return(mod); } diff --git a/src/Mod/Fem/Gui/AppFemGuiPy.cpp b/src/Mod/Fem/Gui/AppFemGuiPy.cpp old mode 100755 new mode 100644 index 4f0382a446..045f222064 --- a/src/Mod/Fem/Gui/AppFemGuiPy.cpp +++ b/src/Mod/Fem/Gui/AppFemGuiPy.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -37,25 +37,27 @@ #include "ActiveAnalysisObserver.h" -namespace FemGui { -class Module : public Py::ExtensionModule +namespace FemGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("FemGui") + Module() + : Py::ExtensionModule("FemGui") { - add_varargs_method("setActiveAnalysis", &Module::setActiveAnalysis, - "setActiveAnalysis(AnalysisObject) -- Set the Analysis object in work." - ); - add_varargs_method("getActiveAnalysis", &Module::getActiveAnalysis, - "getActiveAnalysis() -- Returns the Analysis object in work." - ); - add_varargs_method("open", &Module::open, - "open(string) -- Opens an Abaqus file in a text editor." - ); - add_varargs_method("insert", &Module::open, - "insert(string,string) -- Opens an Abaqus file in a text editor." - ); - initialize("This module is the FemGui module."); // register with Python + add_varargs_method("setActiveAnalysis", + &Module::setActiveAnalysis, + "setActiveAnalysis(AnalysisObject) -- Set the Analysis object in work."); + add_varargs_method("getActiveAnalysis", + &Module::getActiveAnalysis, + "getActiveAnalysis() -- Returns the Analysis object in work."); + add_varargs_method("open", + &Module::open, + "open(string) -- Opens an Abaqus file in a text editor."); + add_varargs_method("insert", + &Module::open, + "insert(string,string) -- Opens an Abaqus file in a text editor."); + initialize("This module is the FemGui module."); // register with Python } private: @@ -74,30 +76,40 @@ private: Py::Object setActiveAnalysis(const Py::Tuple& args) { if (FemGui::ActiveAnalysisObserver::instance()->hasActiveObject()) { - FemGui::ActiveAnalysisObserver::instance()->highlightActiveObject(Gui::HighlightMode::Blue, false); + FemGui::ActiveAnalysisObserver::instance()->highlightActiveObject( + Gui::HighlightMode::Blue, + false); FemGui::ActiveAnalysisObserver::instance()->setActiveObject(nullptr); } PyObject* object = nullptr; - if (PyArg_ParseTuple(args.ptr(), "|O!", &(App::DocumentObjectPy::Type), &object) && object) { - App::DocumentObject* obj = static_cast(object)->getDocumentObjectPtr(); + if (PyArg_ParseTuple(args.ptr(), "|O!", &(App::DocumentObjectPy::Type), &object) + && object) { + App::DocumentObject* obj = + static_cast(object)->getDocumentObjectPtr(); if (!obj || !obj->getTypeId().isDerivedFrom(Fem::FemAnalysis::getClassTypeId())) { - throw Py::Exception(Base::PyExc_FC_GeneralError, "Active Analysis object have to be of type Fem::FemAnalysis!"); + throw Py::Exception(Base::PyExc_FC_GeneralError, + "Active Analysis object have to be of type Fem::FemAnalysis!"); } // get the gui document of the Analysis Item - FemGui::ActiveAnalysisObserver::instance()->setActiveObject(static_cast(obj)); - FemGui::ActiveAnalysisObserver::instance()->highlightActiveObject(Gui::HighlightMode::Blue, true); + FemGui::ActiveAnalysisObserver::instance()->setActiveObject( + static_cast(obj)); + FemGui::ActiveAnalysisObserver::instance()->highlightActiveObject( + Gui::HighlightMode::Blue, + true); } return Py::None(); } Py::Object getActiveAnalysis(const Py::Tuple& args) { - if (!PyArg_ParseTuple(args.ptr(), "")) + if (!PyArg_ParseTuple(args.ptr(), "")) { throw Py::Exception(); + } if (FemGui::ActiveAnalysisObserver::instance()->hasActiveObject()) { - return Py::asObject(FemGui::ActiveAnalysisObserver::instance()->getActiveObject()->getPyObject()); + return Py::asObject( + FemGui::ActiveAnalysisObserver::instance()->getActiveObject()->getPyObject()); } return Py::None(); } @@ -105,8 +117,9 @@ private: { char* Name; const char* DocName; - if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &DocName)) + if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &DocName)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -123,14 +136,14 @@ private: } } - if ( (ext == QLatin1String("inp")) - || (ext == QLatin1String("sif")) - || (ext == QLatin1String("txt")) ) { + if ((ext == QLatin1String("inp")) || (ext == QLatin1String("sif")) + || (ext == QLatin1String("txt"))) { Gui::TextEditor* editor = new Gui::TextEditor(); editor->setWindowIcon(Gui::BitmapFactory().pixmap(":/icons/fem-solver-inp-editor.svg")); Gui::EditorView* edit = new Gui::EditorView(editor, Gui::getMainWindow()); - if (ext == QLatin1String("inp")) + if (ext == QLatin1String("inp")) { editor->setSyntaxHighlighter(new FemGui::AbaqusHighlighter(editor)); + } edit->setDisplayName(Gui::EditorView::FileName); edit->open(fileName); edit->resize(400, 300); @@ -150,4 +163,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace FemGui +} // namespace FemGui diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 58e28dcdfc..8d3a15bb00 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -22,14 +22,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include @@ -82,11 +82,12 @@ bool getConstraintPrerequisits(Fem::FemAnalysis** Analysis) return false; } -//OvG: Visibility automation show parts and hide meshes on activation of a constraint +// OvG: Visibility automation show parts and hide meshes on activation of a constraint std::string gethideMeshShowPartStr(std::string showConstr = "") { return "for amesh in App.activeDocument().Objects:\n\ - if \"" + showConstr + "\" == amesh.Name:\n\ + if \"" + + showConstr + "\" == amesh.Name:\n\ amesh.ViewObject.Visibility = True\n\ elif \"Mesh\" in amesh.TypeId:\n\ aparttoshow = amesh.Name.replace(\"_Mesh\",\"\")\n\ @@ -142,12 +143,14 @@ void CmdFemAddPart::activated(int) Part::Feature *base = static_cast(selection[0].getObject()); std::string AnalysisName = getUniqueObjectName("FemAnalysis"); - std::string MeshName = getUniqueObjectName((std::string(base->getNameInDocument()) +"_Mesh").c_str()); + std::string MeshName = getUniqueObjectName((std::string(base->getNameInDocument()) ++"_Mesh").c_str()); openCommand(QT_TRANSLATE_NOOP("Command", "Create FEM analysis")); doCommand(Doc,"App.activeDocument().addObject('Fem::FemAnalysis','%s')",AnalysisName.c_str()); doCommand(Doc,"App.activeDocument().addObject('Fem::FemMeshShapeNetgenObject','%s')",MeshName.c_str()); - doCommand(Doc,"App.activeDocument().ActiveObject.Shape = App.activeDocument().%s",base->getNameInDocument()); + doCommand(Doc,"App.activeDocument().ActiveObject.Shape = +App.activeDocument().%s",base->getNameInDocument()); doCommand(Doc,"App.activeDocument().%s.addObject(App.activeDocument().%s)",AnalysisName.c_str(),MeshName.c_str()); addModule(Gui,"FemGui"); doCommand(Gui,"FemGui.setActiveAnalysis(App.activeDocument().%s)",AnalysisName.c_str()); @@ -176,33 +179,36 @@ DEF_STD_CMD_A(CmdFemConstraintBearing) CmdFemConstraintBearing::CmdFemConstraintBearing() : Command("FEM_ConstraintBearing") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Bearing constraint"); - sToolTipText = QT_TR_NOOP("Creates a bearing constraint"); - sWhatsThis = "FEM_ConstraintBearing"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintBearing"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Bearing constraint"); + sToolTipText = QT_TR_NOOP("Creates a bearing constraint"); + sWhatsThis = "FEM_ConstraintBearing"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintBearing"; } void CmdFemConstraintBearing::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintBearing"); openCommand(QT_TRANSLATE_NOOP("Command", "Make bearing constraint")); - doCommand( - Doc, "App.activeDocument().addObject(\"Fem::ConstraintBearing\",\"%s\")", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Fem::ConstraintBearing\",\"%s\")", + FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -221,41 +227,45 @@ DEF_STD_CMD_A(CmdFemConstraintContact) CmdFemConstraintContact::CmdFemConstraintContact() : Command("FEM_ConstraintContact") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Contact constraint"); - sToolTipText = QT_TR_NOOP("Creates a contact constraint between faces"); - sWhatsThis = "FEM_ConstraintContact"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintContact"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Contact constraint"); + sToolTipText = QT_TR_NOOP("Creates a contact constraint between faces"); + sWhatsThis = "FEM_ConstraintContact"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintContact"; } void CmdFemConstraintContact::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintContact"); openCommand(QT_TRANSLATE_NOOP("Command", "Make contact constraint on a face")); - doCommand( - Doc, "App.activeDocument().addObject(\"Fem::ConstraintContact\",\"%s\")", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Fem::ConstraintContact\",\"%s\")", + FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.Slope = 1000000.00", - FeatName.c_str());//OvG: set default not equal to 0 + FeatName.c_str()); // OvG: set default not equal to 0 doCommand(Doc, "App.activeDocument().%s.Friction = 0.0", - FeatName.c_str());//OvG: set default not equal to 0 - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + FeatName.c_str()); // OvG: set default not equal to 0 + doCommand(Doc, + "App.activeDocument().%s.Scale = 1", + FeatName.c_str()); // OvG: set initial scale to 1 doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -276,9 +286,8 @@ CmdFemConstraintDisplacement::CmdFemConstraintDisplacement() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint displacement"); - sToolTipText = - QT_TR_NOOP("Creates a displacement boundary condition for a geometric entity"); + sMenuText = QT_TR_NOOP("Displacement boundary condition"); + sToolTipText = QT_TR_NOOP("Creates a displacement boundary condition for a geometric entity"); sWhatsThis = "FEM_ConstraintDisplacement"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintDisplacement"; @@ -288,8 +297,9 @@ void CmdFemConstraintDisplacement::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintDisplacement"); @@ -297,14 +307,15 @@ void CmdFemConstraintDisplacement::activated(int) doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintDisplacement\",\"%s\")", FeatName.c_str()); - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + // OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -323,35 +334,38 @@ DEF_STD_CMD_A(CmdFemConstraintFixed) CmdFemConstraintFixed::CmdFemConstraintFixed() : Command("FEM_ConstraintFixed") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint fixed"); - sToolTipText = QT_TR_NOOP("Creates a fixed boundary condition for a geometric entity"); - sWhatsThis = "FEM_ConstraintFixed"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintFixed"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Fixed boundary condition"); + sToolTipText = QT_TR_NOOP("Creates a fixed boundary condition for a geometric entity"); + sWhatsThis = "FEM_ConstraintFixed"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintFixed"; } void CmdFemConstraintFixed::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintFixed"); openCommand(QT_TRANSLATE_NOOP("Command", "Make fixed boundary condition for geometry")); - doCommand( - Doc, "App.activeDocument().addObject(\"Fem::ConstraintFixed\",\"%s\")", FeatName.c_str()); - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + doCommand(Doc, + "App.activeDocument().addObject(\"Fem::ConstraintFixed\",\"%s\")", + FeatName.c_str()); + // OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -384,8 +398,9 @@ void CmdFemConstraintFluidBoundary::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintFluidBoundary"); @@ -393,15 +408,17 @@ void CmdFemConstraintFluidBoundary::activated(int) doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintFluidBoundary\",\"%s\")", FeatName.c_str()); - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 - //BoundaryValue is already the default value, zero is acceptable + doCommand(Doc, + "App.activeDocument().%s.Scale = 1", + FeatName.c_str()); // OvG: set initial scale to 1 + // BoundaryValue is already the default value, zero is acceptable doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); @@ -421,7 +438,7 @@ CmdFemConstraintForce::CmdFemConstraintForce() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint force"); + sMenuText = QT_TR_NOOP("Force load"); sToolTipText = QT_TR_NOOP("Creates a force load applied to a geometric entity"); sWhatsThis = "FEM_ConstraintForce"; sStatusTip = sToolTipText; @@ -432,28 +449,32 @@ void CmdFemConstraintForce::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintForce"); openCommand(QT_TRANSLATE_NOOP("Command", "Make force load on geometry")); - doCommand( - Doc, "App.activeDocument().addObject(\"Fem::ConstraintForce\",\"%s\")", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Fem::ConstraintForce\",\"%s\")", + FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.Force = 1.0", - FeatName.c_str());//OvG: set default not equal to 0 + FeatName.c_str()); // OvG: set default not equal to 0 doCommand(Doc, "App.activeDocument().%s.Reversed = False", - FeatName.c_str());//OvG: set default to False - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + FeatName.c_str()); // OvG: set default to False + doCommand(Doc, + "App.activeDocument().%s.Scale = 1", + FeatName.c_str()); // OvG: set initial scale to 1 doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -472,33 +493,36 @@ DEF_STD_CMD_A(CmdFemConstraintGear) CmdFemConstraintGear::CmdFemConstraintGear() : Command("FEM_ConstraintGear") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Gear constraint"); - sToolTipText = QT_TR_NOOP("Creates a gear constraint"); - sWhatsThis = "FEM_ConstraintGear"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintGear"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Gear constraint"); + sToolTipText = QT_TR_NOOP("Creates a gear constraint"); + sWhatsThis = "FEM_ConstraintGear"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintGear"; } void CmdFemConstraintGear::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintGear"); openCommand(QT_TRANSLATE_NOOP("Command", "Make gear constraint")); - doCommand( - Doc, "App.activeDocument().addObject(\"Fem::ConstraintGear\",\"%s\")", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Fem::ConstraintGear\",\"%s\")", + FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.Diameter = 100.0", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -517,21 +541,22 @@ DEF_STD_CMD_A(CmdFemConstraintHeatflux) CmdFemConstraintHeatflux::CmdFemConstraintHeatflux() : Command("FEM_ConstraintHeatflux") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Heat flux load"); - sToolTipText = QT_TR_NOOP("Creates a heat flux load acting on a face"); - sWhatsThis = "FEM_ConstraintHeatflux"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintHeatflux"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Heat flux load"); + sToolTipText = QT_TR_NOOP("Creates a heat flux load acting on a face"); + sWhatsThis = "FEM_ConstraintHeatflux"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintHeatflux"; } void CmdFemConstraintHeatflux::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintHeatflux"); @@ -541,18 +566,20 @@ void CmdFemConstraintHeatflux::activated(int) FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.AmbientTemp = 300.0", - FeatName.c_str());//OvG: set default not equal to 0 + FeatName.c_str()); // OvG: set default not equal to 0 doCommand(Doc, "App.activeDocument().%s.FilmCoef = 10.0", - FeatName.c_str());//OvG: set default not equal to 0 - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + FeatName.c_str()); // OvG: set default not equal to 0 + doCommand(Doc, + "App.activeDocument().%s.Scale = 1", + FeatName.c_str()); // OvG: set initial scale to 1 doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr().c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr().c_str()); updateActive(); @@ -584,8 +611,9 @@ void CmdFemConstraintInitialTemperature::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintInitialTemperature"); @@ -593,14 +621,16 @@ void CmdFemConstraintInitialTemperature::activated(int) doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintInitialTemperature\",\"%s\")", FeatName.c_str()); - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + doCommand(Doc, + "App.activeDocument().%s.Scale = 1", + FeatName.c_str()); // OvG: set initial scale to 1 doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr().c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr().c_str()); updateActive(); @@ -619,21 +649,22 @@ DEF_STD_CMD_A(CmdFemConstraintPlaneRotation) CmdFemConstraintPlaneRotation::CmdFemConstraintPlaneRotation() : Command("FEM_ConstraintPlaneRotation") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Plane multi-point constraint"); - sToolTipText = QT_TR_NOOP("Creates a plane multi-point constraint for a face"); - sWhatsThis = "FEM_ConstraintPlaneRotation"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintPlaneRotation"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Plane multi-point constraint"); + sToolTipText = QT_TR_NOOP("Creates a plane multi-point constraint for a face"); + sWhatsThis = "FEM_ConstraintPlaneRotation"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintPlaneRotation"; } void CmdFemConstraintPlaneRotation::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintPlaneRotation"); @@ -641,14 +672,16 @@ void CmdFemConstraintPlaneRotation::activated(int) doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintPlaneRotation\",\"%s\")", FeatName.c_str()); - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + doCommand(Doc, + "App.activeDocument().%s.Scale = 1", + FeatName.c_str()); // OvG: set initial scale to 1 doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -667,21 +700,22 @@ DEF_STD_CMD_A(CmdFemConstraintPressure) CmdFemConstraintPressure::CmdFemConstraintPressure() : Command("FEM_ConstraintPressure") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint pressure"); - sToolTipText = QT_TR_NOOP("Creates a pressure load acting on a face"); - sWhatsThis = "FEM_ConstraintPressure"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintPressure"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Pressure load"); + sToolTipText = QT_TR_NOOP("Creates a pressure load acting on a face"); + sWhatsThis = "FEM_ConstraintPressure"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintPressure"; } void CmdFemConstraintPressure::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintPressure"); @@ -691,18 +725,19 @@ void CmdFemConstraintPressure::activated(int) FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.Pressure = 0.1", - FeatName.c_str());//OvG: set default not equal to 0 + FeatName.c_str()); // OvG: set default not equal to 0 doCommand(Doc, "App.activeDocument().%s.Reversed = False", - FeatName.c_str());//OvG: set default to False - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + FeatName.c_str()); // OvG: set default to False + // OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -721,41 +756,43 @@ DEF_STD_CMD_A(CmdFemConstraintSpring) CmdFemConstraintSpring::CmdFemConstraintSpring() : Command("FEM_ConstraintSpring") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Spring"); - sToolTipText = QT_TR_NOOP("Creates a spring acting on a face"); - sWhatsThis = "FEM_ConstraintSpring"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintSpring"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Spring"); + sToolTipText = QT_TR_NOOP("Creates a spring acting on a face"); + sWhatsThis = "FEM_ConstraintSpring"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintSpring"; } void CmdFemConstraintSpring::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintSpring"); openCommand(QT_TRANSLATE_NOOP("Command", "Make spring on face")); - doCommand( - Doc, "App.activeDocument().addObject(\"Fem::ConstraintSpring\",\"%s\")", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Fem::ConstraintSpring\",\"%s\")", + FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.NormalStiffness = 1.0", - FeatName.c_str());//OvG: set default not equal to 0 + FeatName.c_str()); // OvG: set default not equal to 0 doCommand(Doc, "App.activeDocument().%s.TangentialStiffness = 0.0", - FeatName.c_str());//OvG: set default to False - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + FeatName.c_str()); // OvG: set default to False + // OvG: set initial scale to 1 + doCommand(Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -774,27 +811,29 @@ DEF_STD_CMD_A(CmdFemConstraintPulley) CmdFemConstraintPulley::CmdFemConstraintPulley() : Command("FEM_ConstraintPulley") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Pulley constraint"); - sToolTipText = QT_TR_NOOP("Creates a pulley constraint"); - sWhatsThis = "FEM_ConstraintPulley"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintPulley"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Pulley constraint"); + sToolTipText = QT_TR_NOOP("Creates a pulley constraint"); + sWhatsThis = "FEM_ConstraintPulley"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintPulley"; } void CmdFemConstraintPulley::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintPulley"); openCommand(QT_TRANSLATE_NOOP("Command", "Make pulley constraint")); - doCommand( - Doc, "App.activeDocument().addObject(\"Fem::ConstraintPulley\",\"%s\")", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject(\"Fem::ConstraintPulley\",\"%s\")", + FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.Diameter = 300.0", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.OtherDiameter = 100.0", FeatName.c_str()); doCommand(Doc, "App.activeDocument().%s.CenterDistance = 500.0", FeatName.c_str()); @@ -805,7 +844,8 @@ void CmdFemConstraintPulley::activated(int) Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -826,9 +866,8 @@ CmdFemConstraintTemperature::CmdFemConstraintTemperature() { sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint temperature"); - sToolTipText = QT_TR_NOOP( - "Creates a temperature/concentrated heat flux load acting on a face"); + sMenuText = QT_TR_NOOP("Temperature boundary condition"); + sToolTipText = QT_TR_NOOP("Creates a temperature/concentrated heat flux load acting on a face"); sWhatsThis = "FEM_ConstraintTemperature"; sStatusTip = sToolTipText; sPixmap = "FEM_ConstraintTemperature"; @@ -838,8 +877,9 @@ void CmdFemConstraintTemperature::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintTemperature"); @@ -847,14 +887,16 @@ void CmdFemConstraintTemperature::activated(int) doCommand(Doc, "App.activeDocument().addObject(\"Fem::ConstraintTemperature\",\"%s\")", FeatName.c_str()); - doCommand( - Doc, "App.activeDocument().%s.Scale = 1", FeatName.c_str());//OvG: set initial scale to 1 + doCommand(Doc, + "App.activeDocument().%s.Scale = 1", + FeatName.c_str()); // OvG: set initial scale to 1 doCommand(Doc, "App.activeDocument().%s.addObject(App.activeDocument().%s)", Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr().c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr().c_str()); updateActive(); @@ -873,21 +915,22 @@ DEF_STD_CMD_A(CmdFemConstraintTransform) CmdFemConstraintTransform::CmdFemConstraintTransform() : Command("FEM_ConstraintTransform") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Constraint transform"); - sToolTipText = QT_TR_NOOP("Create a local coordinate system on a face"); - sWhatsThis = "FEM_ConstraintTransform"; - sStatusTip = sToolTipText; - sPixmap = "FEM_ConstraintTransform"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Local coordinate system"); + sToolTipText = QT_TR_NOOP("Create a local coordinate system on a face"); + sWhatsThis = "FEM_ConstraintTransform"; + sStatusTip = sToolTipText; + sPixmap = "FEM_ConstraintTransform"; } void CmdFemConstraintTransform::activated(int) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } std::string FeatName = getUniqueObjectName("ConstraintTransform"); @@ -904,7 +947,8 @@ void CmdFemConstraintTransform::activated(int) Analysis->getNameInDocument(), FeatName.c_str()); - doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str());//OvG: Hide meshes and show parts + // OvG: Hide meshes and show parts + doCommand(Doc, "%s", gethideMeshShowPartStr(FeatName).c_str()); updateActive(); @@ -928,8 +972,9 @@ void DefineNodesCallback(void* ud, SoEventCallback* n) { Fem::FemAnalysis* Analysis; - if (getConstraintPrerequisits(&Analysis)) + if (getConstraintPrerequisits(&Analysis)) { return; + } // show the wait cursor because this could take quite some time Gui::WaitCursor wc; @@ -942,23 +987,27 @@ void DefineNodesCallback(void* ud, SoEventCallback* n) Gui::SelectionRole role; std::vector clPoly = view->getGLPolygon(&role); - if (clPoly.size() < 3) + if (clPoly.size() < 3) { return; - if (clPoly.front() != clPoly.back()) + } + if (clPoly.front() != clPoly.back()) { clPoly.push_back(clPoly.front()); + } SoCamera* cam = view->getSoRenderManager()->getCamera(); SbViewVolume vv = cam->getViewVolume(); Gui::ViewVolumeProjection proj(vv); Base::Polygon2d polygon; - for (auto it : clPoly) + for (auto it : clPoly) { polygon.Add(Base::Vector2d(it[0], it[1])); + } std::vector docObj = Gui::Selection().getObjectsOfType(Fem::FemMeshObject::getClassTypeId()); - if (docObj.size() != 1) + if (docObj.size() != 1) { return; + } const SMESHDS_Mesh* data = static_cast(docObj[0])->FemMesh.getValue().getSMesh()->GetMeshDS(); @@ -971,42 +1020,48 @@ void DefineNodesCallback(void* ud, SoEventCallback* n) const SMDS_MeshNode* aNode = aNodeIter->next(); Base::Vector3f vec(aNode->X(), aNode->Y(), aNode->Z()); pt2d = proj(vec); - if (polygon.Contains(Base::Vector2d(pt2d.x, pt2d.y))) + if (polygon.Contains(Base::Vector2d(pt2d.x, pt2d.y))) { IntSet.insert(aNode->GetID()); + } } - std::stringstream set; + std::stringstream set; set << "["; - for (std::set::const_iterator it = IntSet.begin(); it != IntSet.end(); ++it) - if (it == IntSet.begin()) + for (std::set::const_iterator it = IntSet.begin(); it != IntSet.end(); ++it) { + if (it == IntSet.begin()) { set << *it; - else + } + else { set << "," << *it; + } + } set << "]"; Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Place robot")); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.addObject('Fem::FemSetNodesObject','NodeSet')"); - Gui::Command::doCommand( - Gui::Command::Doc, "App.ActiveDocument.ActiveObject.Nodes = %s", set.str().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.ActiveObject.Nodes = %s", + set.str().c_str()); Gui::Command::doCommand(Gui::Command::Doc, "App.activeDocument().%s.addObject(App.activeDocument().NodeSet)", Analysis->getNameInDocument()); // Gui::Command::updateActive(); Gui::Command::commitCommand(); - //std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); - //if (!views.empty()) { - // Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Cut")); - // for (std::vector::iterator it = views.begin(); it != views.end(); ++it) { - // ViewProviderMesh* that = static_cast(*it); - // if (that->getEditingMode() > -1) { - // that->finishEditing(); - // that->cutMesh(clPoly, *view, clip_inner); - // } - // } + // std::vector views = + // view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); if (!views.empty()) { + // Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", + // "Cut")); for (std::vector::iterator it = views.begin(); it != + // views.end(); ++it) { + // ViewProviderMesh* that = static_cast(*it); + // if (that->getEditingMode() > -1) { + // that->finishEditing(); + // that->cutMesh(clPoly, *view, clip_inner); + // } + // } // Gui::Application::Instance->activeDocument()->commitCommand(); @@ -1015,17 +1070,16 @@ void DefineNodesCallback(void* ud, SoEventCallback* n) } - CmdFemDefineNodesSet::CmdFemDefineNodesSet() : Command("FEM_DefineNodesSet") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Node set by poly"); - sToolTipText = QT_TR_NOOP("Create node set by Poly"); - sWhatsThis = "FEM_DefineNodesSet"; - sStatusTip = QT_TR_NOOP("Create node set by Poly"); - sPixmap = "FEM_CreateNodesSet"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Node set by poly"); + sToolTipText = QT_TR_NOOP("Create node set by Poly"); + sWhatsThis = "FEM_DefineNodesSet"; + sStatusTip = QT_TR_NOOP("Create node set by Poly"); + sPixmap = "FEM_CreateNodesSet"; } void CmdFemDefineNodesSet::activated(int) @@ -1049,17 +1103,18 @@ void CmdFemDefineNodesSet::activated(int) } } - //Gui::ViewProvider* pVP = getActiveGuiDocument()->getViewProvider(*it); - //if (pVP->isVisible()) - // pVP->startEditing(); + // Gui::ViewProvider* pVP = getActiveGuiDocument()->getViewProvider(*it); + // if (pVP->isVisible()) + // pVP->startEditing(); } } bool CmdFemDefineNodesSet::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Fem::FemMeshObject::getClassTypeId()) != 1) + if (getSelection().countObjectsOfType(Fem::FemMeshObject::getClassTypeId()) != 1) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -1077,13 +1132,13 @@ DEF_STD_CMD_A(CmdFemCreateNodesSet) CmdFemCreateNodesSet::CmdFemCreateNodesSet() : Command("FEM_CreateNodesSet") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Nodes set"); - sToolTipText = QT_TR_NOOP("Creates a FEM mesh nodes set"); - sWhatsThis = "FEM_CreateNodesSet"; - sStatusTip = sToolTipText; - sPixmap = "FEM_CreateNodesSet"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Nodes set"); + sToolTipText = QT_TR_NOOP("Creates a FEM mesh nodes set"); + sWhatsThis = "FEM_CreateNodesSet"; + sStatusTip = sToolTipText; + sPixmap = "FEM_CreateNodesSet"; } void CmdFemCreateNodesSet::activated(int) @@ -1104,8 +1159,9 @@ void CmdFemCreateNodesSet::activated(int) std::string FeatName = getUniqueObjectName("NodesSet"); openCommand(QT_TRANSLATE_NOOP("Command", "Create nodes set")); - doCommand( - Doc, "App.activeDocument().addObject('Fem::FemSetNodesObject','%s')", FeatName.c_str()); + doCommand(Doc, + "App.activeDocument().addObject('Fem::FemSetNodesObject','%s')", + FeatName.c_str()); doCommand(Gui, "App.activeDocument().%s.FemMesh = App.activeDocument().%s", FeatName.c_str(), @@ -1146,14 +1202,18 @@ CmdFemCompEmConstraints::CmdFemCompEmConstraints() void CmdFemCompEmConstraints::activated(int iMsg) { Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); - if (iMsg == 0) + if (iMsg == 0) { rcCmdMgr.runCommandByName("FEM_ConstraintElectrostaticPotential"); - else if (iMsg == 1) + } + else if (iMsg == 1) { rcCmdMgr.runCommandByName("FEM_ConstraintCurrentDensity"); - else if (iMsg == 2) + } + else if (iMsg == 2) { rcCmdMgr.runCommandByName("FEM_ConstraintMagnetization"); - else + } + else { return; + } // Since the default icon is reset when enabling/disabling the command we have // to explicitly set the icon of the used command. @@ -1191,8 +1251,9 @@ void CmdFemCompEmConstraints::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); @@ -1205,9 +1266,11 @@ void CmdFemCompEmConstraints::languageChange() QAction* cmd0 = a[0]; cmd0->setText(QApplication::translate("FEM_ConstraintElectrostaticPotential", ConstraintElectrostaticPotential->getMenuText())); - cmd0->setToolTip(QApplication::translate("FEM_ConstraintElectrostaticPotential", + cmd0->setToolTip( + QApplication::translate("FEM_ConstraintElectrostaticPotential", ConstraintElectrostaticPotential->getToolTipText())); - cmd0->setStatusTip(QApplication::translate("FEM_ConstraintElectrostaticPotential", + cmd0->setStatusTip( + QApplication::translate("FEM_ConstraintElectrostaticPotential", ConstraintElectrostaticPotential->getStatusTip())); } @@ -1255,8 +1318,7 @@ CmdFemCompEmEquations::CmdFemCompEmEquations() sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Electromagnetic equations"); - sToolTipText = QT_TR_NOOP( - "Electromagnetic equations for the Elmer solver"); + sToolTipText = QT_TR_NOOP("Electromagnetic equations for the Elmer solver"); sWhatsThis = "FEM_CompEmEquations"; sStatusTip = sToolTipText; } @@ -1264,16 +1326,21 @@ CmdFemCompEmEquations::CmdFemCompEmEquations() void CmdFemCompEmEquations::activated(int iMsg) { Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); - if (iMsg == 0) + if (iMsg == 0) { rcCmdMgr.runCommandByName("FEM_EquationElectrostatic"); - else if (iMsg == 1) + } + else if (iMsg == 1) { rcCmdMgr.runCommandByName("FEM_EquationElectricforce"); - else if (iMsg == 2) + } + else if (iMsg == 2) { rcCmdMgr.runCommandByName("FEM_EquationMagnetodynamic"); - else if (iMsg == 3) + } + else if (iMsg == 3) { rcCmdMgr.runCommandByName("FEM_EquationMagnetodynamic2D"); - else + } + else { return; + } // Since the default icon is reset when enabling/disabling the command we have // to explicitly set the icon of the used command. @@ -1313,8 +1380,9 @@ void CmdFemCompEmEquations::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); @@ -1343,8 +1411,7 @@ void CmdFemCompEmEquations::languageChange() EquationElectricforce->getStatusTip())); } - Gui::Command* EquationMagnetodynamic = - rcCmdMgr.getCommandByName("FEM_EquationMagnetodynamic"); + Gui::Command* EquationMagnetodynamic = rcCmdMgr.getCommandByName("FEM_EquationMagnetodynamic"); if (EquationMagnetodynamic) { QAction* cmd2 = a[2]; cmd2->setText(QApplication::translate("FEM_EquationMagnetodynamic", @@ -1371,18 +1438,21 @@ void CmdFemCompEmEquations::languageChange() bool CmdFemCompEmEquations::isActive() { // only if there is an active analysis - if (!FemGui::ActiveAnalysisObserver::instance()->hasActiveObject()) + if (!FemGui::ActiveAnalysisObserver::instance()->hasActiveObject()) { return false; + } // only activate if a single Elmer object is selected - auto results = getSelection().getSelectionEx( - nullptr, App::DocumentObject::getClassTypeId(), Gui::ResolveMode::FollowLink); + auto results = getSelection().getSelectionEx(nullptr, + App::DocumentObject::getClassTypeId(), + Gui::ResolveMode::FollowLink); if (results.size() == 1) { auto object = results.begin()->getObject(); // FIXME: this is not unique since the Ccx solver object has the same type std::string Type = "Fem::FemSolverObjectPython"; - if (Type.compare(object->getTypeId().getName()) == 0) + if (Type.compare(object->getTypeId().getName()) == 0) { return true; + } } return false; } @@ -1408,12 +1478,15 @@ CmdFemCompMechEquations::CmdFemCompMechEquations() void CmdFemCompMechEquations::activated(int iMsg) { Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); - if (iMsg == 0) + if (iMsg == 0) { rcCmdMgr.runCommandByName("FEM_EquationElasticity"); - else if (iMsg == 1) + } + else if (iMsg == 1) { rcCmdMgr.runCommandByName("FEM_EquationDeformation"); - else + } + else { return; + } // Since the default icon is reset when enabling/disabling the command we have // to explicitly set the icon of the used command. @@ -1449,8 +1522,9 @@ void CmdFemCompMechEquations::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); @@ -1460,12 +1534,12 @@ void CmdFemCompMechEquations::languageChange() Gui::Command* EquationElasticity = rcCmdMgr.getCommandByName("FEM_EquationElasticity"); if (EquationElasticity) { QAction* cmd1 = a[0]; - cmd1->setText(QApplication::translate("FEM_EquationElasticity", - EquationElasticity->getMenuText())); + cmd1->setText( + QApplication::translate("FEM_EquationElasticity", EquationElasticity->getMenuText())); cmd1->setToolTip(QApplication::translate("FEM_EquationElasticity", EquationElasticity->getToolTipText())); - cmd1->setStatusTip(QApplication::translate("FEM_EquationElasticity", - EquationElasticity->getStatusTip())); + cmd1->setStatusTip( + QApplication::translate("FEM_EquationElasticity", EquationElasticity->getStatusTip())); } Gui::Command* EquationDeformation = rcCmdMgr.getCommandByName("FEM_EquationDeformation"); @@ -1483,18 +1557,21 @@ void CmdFemCompMechEquations::languageChange() bool CmdFemCompMechEquations::isActive() { // only if there is an active analysis - if (!FemGui::ActiveAnalysisObserver::instance()->hasActiveObject()) + if (!FemGui::ActiveAnalysisObserver::instance()->hasActiveObject()) { return false; + } // only activate if a single Elmer object is selected - auto results = getSelection().getSelectionEx( - nullptr, App::DocumentObject::getClassTypeId(), Gui::ResolveMode::FollowLink); + auto results = getSelection().getSelectionEx(nullptr, + App::DocumentObject::getClassTypeId(), + Gui::ResolveMode::FollowLink); if (results.size() == 1) { auto object = results.begin()->getObject(); // FIXME: this is not unique since the Ccx solver object has the same type std::string Type = "Fem::FemSolverObjectPython"; - if (Type.compare(object->getTypeId().getName()) == 0) + if (Type.compare(object->getTypeId().getName()) == 0) { return true; + } } return false; } @@ -1509,7 +1586,8 @@ bool CmdFemCompMechEquations::isActive() //================================================================================================ // helper vtk post processing -void setupFilter(Gui::Command* cmd, std::string Name) { +void setupFilter(Gui::Command* cmd, std::string Name) +{ // In the isActive() functions it is already assured that the filters are // only active on allowed objects // For the case the clip filter is set by Python code, we check that the input @@ -1563,7 +1641,8 @@ void setupFilter(Gui::Command* cmd, std::string Name) { } if (!pipeline) { - QMessageBox::warning(Gui::getMainWindow(), + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("setupFilter", "Error: no post processing object selected."), qApp->translate("setupFilter", "The filter could not be set up.")); return; @@ -1571,25 +1650,35 @@ void setupFilter(Gui::Command* cmd, std::string Name) { // create the object and add it to the pipeline cmd->openCommand(QT_TRANSLATE_NOOP("Command", "Create filter")); - cmd->doCommand(Gui::Command::Doc, "App.activeDocument().addObject('Fem::FemPost%sFilter','%s')", Name.c_str(), FeatName.c_str()); + cmd->doCommand(Gui::Command::Doc, + "App.activeDocument().addObject('Fem::FemPost%sFilter','%s')", + Name.c_str(), + FeatName.c_str()); // add it as subobject to the pipeline - cmd->doCommand(Gui::Command::Doc, "__list__ = App.ActiveDocument.%s.Filter", pipeline->getNameInDocument()); + cmd->doCommand(Gui::Command::Doc, + "__list__ = App.ActiveDocument.%s.Filter", + pipeline->getNameInDocument()); cmd->doCommand(Gui::Command::Doc, "__list__.append(App.ActiveDocument.%s)", FeatName.c_str()); - cmd->doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Filter = __list__", pipeline->getNameInDocument()); + cmd->doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Filter = __list__", + pipeline->getNameInDocument()); cmd->doCommand(Gui::Command::Doc, "del __list__"); // set display to assure the user sees the new object - cmd->doCommand(Gui::Command::Doc, "App.activeDocument().ActiveObject.ViewObject.DisplayMode = \"Surface\""); + cmd->doCommand(Gui::Command::Doc, + "App.activeDocument().ActiveObject.ViewObject.DisplayMode = \"Surface\""); // Set SelectionStyle to BoundBox because the idea is that the user gets the useful result // from the colors. The default would be to highlight the shape but then the colors are changed // by every highlighting leading to confusions for the user. - cmd->doCommand(Gui::Command::Doc, "App.activeDocument().ActiveObject.ViewObject.SelectionStyle = \"BoundBox\""); + cmd->doCommand(Gui::Command::Doc, + "App.activeDocument().ActiveObject.ViewObject.SelectionStyle = \"BoundBox\""); // in case selObject is no pipeline we must set it as input object auto objFilter = App::GetApplication().getActiveDocument()->getActiveObject(); auto femFilter = static_cast(objFilter); - if (!selectionIsPipeline) + if (!selectionIsPipeline) { femFilter->Input.setValue(selObject); + } cmd->updateActive(); // open the dialog to edit the filter @@ -1603,11 +1692,13 @@ std::string Plot() "Thickness [mm]", "Plot X-Axis Label") .toStdString(); - auto yAxisLabel = QCoreApplication::translate( - "CmdFemPostLinearizedStressesFilter", "Stress [MPa]", "Plot Y-Axis Label") + auto yAxisLabel = QCoreApplication::translate("CmdFemPostLinearizedStressesFilter", + "Stress [MPa]", + "Plot Y-Axis Label") .toStdString(); - auto titleLabel = QCoreApplication::translate( - "CmdFemPostLinearizedStressesFilter", "Linearized Stresses", "Plot title") + auto titleLabel = QCoreApplication::translate("CmdFemPostLinearizedStressesFilter", + "Linearized Stresses", + "Plot title") .toStdString(); auto legendEntryA = QCoreApplication::translate("CmdFemPostLinearizedStressesFilter", "Membrane", @@ -1617,8 +1708,9 @@ std::string Plot() "Membrane and Bending", "Plot legend item label") .toStdString(); - auto legendEntryC = QCoreApplication::translate( - "CmdFemPostLinearizedStressesFilter", "Total", "Plot legend item label") + auto legendEntryC = QCoreApplication::translate("CmdFemPostLinearizedStressesFilter", + "Total", + "Plot legend item label") .toStdString(); std::ostringstream oss; @@ -1714,25 +1806,32 @@ void CmdFemPostClipFilter::activated(int) bool CmdFemPostClipFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // only activate if a result is either a post pipeline or a possible filter - if (getSelection().getObjectsOfType().size() == 1) + if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else - return false; + } + return false; } @@ -1742,13 +1841,13 @@ DEF_STD_CMD_A(CmdFemPostCutFilter) CmdFemPostCutFilter::CmdFemPostCutFilter() : Command("FEM_PostFilterCutFunction") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Function cut filter"); - sToolTipText = QT_TR_NOOP("Cut the data along an implicit function"); - sWhatsThis = "FEM_PostFilterCutFunction"; - sStatusTip = sToolTipText; - sPixmap = "FEM_PostFilterCutFunction"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Function cut filter"); + sToolTipText = QT_TR_NOOP("Cut the data along an implicit function"); + sWhatsThis = "FEM_PostFilterCutFunction"; + sStatusTip = sToolTipText; + sPixmap = "FEM_PostFilterCutFunction"; } void CmdFemPostCutFilter::activated(int) @@ -1759,25 +1858,32 @@ void CmdFemPostCutFilter::activated(int) bool CmdFemPostCutFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // only activate if a result is either a post pipeline or a possible filter - if (getSelection().getObjectsOfType().size() == 1) + if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else - return false; + } + return false; } @@ -1787,13 +1893,13 @@ DEF_STD_CMD_A(CmdFemPostDataAlongLineFilter) CmdFemPostDataAlongLineFilter::CmdFemPostDataAlongLineFilter() : Command("FEM_PostFilterDataAlongLine") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Line clip filter"); - sToolTipText = QT_TR_NOOP("Define/create a clip filter which clips a field along a line"); - sWhatsThis = "FEM_PostFilterDataAlongLine"; - sStatusTip = sToolTipText; - sPixmap = "FEM_PostFilterDataAlongLine"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Line clip filter"); + sToolTipText = QT_TR_NOOP("Define/create a clip filter which clips a field along a line"); + sWhatsThis = "FEM_PostFilterDataAlongLine"; + sStatusTip = sToolTipText; + sPixmap = "FEM_PostFilterDataAlongLine"; } void CmdFemPostDataAlongLineFilter::activated(int) @@ -1804,23 +1910,29 @@ void CmdFemPostDataAlongLineFilter::activated(int) bool CmdFemPostDataAlongLineFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // only activate if a result is either a post pipeline or a possible filter - if (getSelection().getObjectsOfType().size() == 1) + if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else - return false; + } + return false; } @@ -1830,42 +1942,47 @@ DEF_STD_CMD_A(CmdFemPostDataAtPointFilter) CmdFemPostDataAtPointFilter::CmdFemPostDataAtPointFilter() : Command("FEM_PostFilterDataAtPoint") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Data at point clip filter"); - sToolTipText = QT_TR_NOOP("Define/create a clip filter which clips a field data at point"); - sWhatsThis = "FEM_PostFilterDataAtPoint"; - sStatusTip = sToolTipText; - sPixmap = "FEM_PostFilterDataAtPoint"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Data at point clip filter"); + sToolTipText = QT_TR_NOOP("Define/create a clip filter which clips a field data at point"); + sWhatsThis = "FEM_PostFilterDataAtPoint"; + sStatusTip = sToolTipText; + sPixmap = "FEM_PostFilterDataAtPoint"; } void CmdFemPostDataAtPointFilter::activated(int) { setupFilter(this, "DataAtPoint"); - } bool CmdFemPostDataAtPointFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // only activate if a result is either a post pipeline or a possible filter - if (getSelection().getObjectsOfType().size() == 1) + if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else - return false; + } + return false; } @@ -1875,13 +1992,13 @@ DEF_STD_CMD_A(CmdFemPostLinearizedStressesFilter) CmdFemPostLinearizedStressesFilter::CmdFemPostLinearizedStressesFilter() : Command("FEM_PostFilterLinearizedStresses") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Stress linearization plot"); - sToolTipText = QT_TR_NOOP("Define/create stress linearization plots"); - sWhatsThis = "FEM_PostFilterLinearizedStresses"; - sStatusTip = sToolTipText; - sPixmap = "FEM_PostFilterLinearizedStresses"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Stress linearization plot"); + sToolTipText = QT_TR_NOOP("Define/create stress linearization plots"); + sWhatsThis = "FEM_PostFilterLinearizedStresses"; + sStatusTip = sToolTipText; + sPixmap = "FEM_PostFilterLinearizedStresses"; } void CmdFemPostLinearizedStressesFilter::activated(int) @@ -1894,15 +2011,13 @@ void CmdFemPostLinearizedStressesFilter::activated(int) static_cast( DataAlongLineFilter.Result[0][0].getObject()); std::string FieldName = DataAlongLine->PlotData.getValue(); - if ( - (FieldName == "Tresca Stress") - || (FieldName == "von Mises Stress") + if ((FieldName == "Tresca Stress") || (FieldName == "von Mises Stress") || (FieldName == "Major Principal Stress") || (FieldName == "Intermediate Principal Stress") || (FieldName == "Minor Principal Stress") // names need to match with names in FemVTKTools.cpp, this is not failsafe, // but at the moment there is no better way for test on a stress result in vtk pipeline - ) { + ) { // TODO FIXME only works if the data along the line object has the name DataAlongLine // we should get the selected data along the line object App::DocumentObjectT objT(DataAlongLine); @@ -1933,8 +2048,9 @@ void CmdFemPostLinearizedStressesFilter::activated(int) bool CmdFemPostLinearizedStressesFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // we purposely allow it also not non-along line filters because we issue an error message that // also explains what the feature is for and how it is set up @@ -1966,23 +2082,29 @@ void CmdFemPostScalarClipFilter::activated(int) bool CmdFemPostScalarClipFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // only activate if a result is either a post pipeline or a possible other filter - if (getSelection().getObjectsOfType().size() == 1) + if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else - return false; + } + return false; } @@ -1992,13 +2114,13 @@ DEF_STD_CMD_A(CmdFemPostWarpVectorFilter) CmdFemPostWarpVectorFilter::CmdFemPostWarpVectorFilter() : Command("FEM_PostFilterWarp") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Warp filter"); - sToolTipText = QT_TR_NOOP("Warp the geometry along a vector field by a certain factor"); - sWhatsThis = "FEM_PostFilterWarp"; - sStatusTip = sToolTipText; - sPixmap = "FEM_PostFilterWarp"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Warp filter"); + sToolTipText = QT_TR_NOOP("Warp the geometry along a vector field by a certain factor"); + sWhatsThis = "FEM_PostFilterWarp"; + sStatusTip = sToolTipText; + sPixmap = "FEM_PostFilterWarp"; } void CmdFemPostWarpVectorFilter::activated(int) @@ -2009,23 +2131,29 @@ void CmdFemPostWarpVectorFilter::activated(int) bool CmdFemPostWarpVectorFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // only activate if a result is either a post pipeline or a possible other filter - if (getSelection().getObjectsOfType().size() == 1) + if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else - return false; + } + return false; } @@ -2038,8 +2166,7 @@ CmdFemPostContoursFilter::CmdFemPostContoursFilter() sAppModule = "Fem"; sGroup = QT_TR_NOOP("Fem"); sMenuText = QT_TR_NOOP("Contours filter"); - sToolTipText = - QT_TR_NOOP("Define/create a contours filter which displays iso contours"); + sToolTipText = QT_TR_NOOP("Define/create a contours filter which displays iso contours"); sWhatsThis = "FEM_PostFilterContours"; sStatusTip = sToolTipText; sPixmap = "FEM_PostFilterContours"; @@ -2053,23 +2180,29 @@ void CmdFemPostContoursFilter::activated(int) bool CmdFemPostContoursFilter::isActive() { // only allow one object - if (getSelection().getSelection().size() > 1) + if (getSelection().getSelection().size() > 1) { return false; + } // only activate if a result is either a post pipeline or a possible other filter - if (getSelection().getObjectsOfType().size() == 1) + if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else if (getSelection().getObjectsOfType().size() == 1) + } + else if (getSelection().getObjectsOfType().size() == 1) { return true; - else - return false; + } + return false; } @@ -2079,29 +2212,34 @@ DEF_STD_CMD_ACL(CmdFemPostFunctions) CmdFemPostFunctions::CmdFemPostFunctions() : Command("FEM_PostCreateFunctions") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Filter functions"); - sToolTipText = QT_TR_NOOP("Functions for use in postprocessing filter..."); - sWhatsThis = "FEM_PostCreateFunctions"; - sStatusTip = sToolTipText; - eType = eType|ForEdit; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Filter functions"); + sToolTipText = QT_TR_NOOP("Functions for use in postprocessing filter..."); + sWhatsThis = "FEM_PostCreateFunctions"; + sStatusTip = sToolTipText; + eType = eType | ForEdit; } void CmdFemPostFunctions::activated(int iMsg) { std::string name; - if (iMsg == 0) + if (iMsg == 0) { name = "Plane"; - else if (iMsg == 1) + } + else if (iMsg == 1) { name = "Sphere"; - else if (iMsg == 2) + } + else if (iMsg == 2) { name = "Cylinder"; - else if (iMsg == 3) + } + else if (iMsg == 3) { name = "Box"; - else + } + else { return; + } // create the object std::vector pipelines = @@ -2127,8 +2265,9 @@ void CmdFemPostFunctions::activated(int iMsg) provider = static_cast( getDocument()->getObject(FuncName.c_str())); } - else + else { provider = static_cast(pipeline->Functions.getValue()); + } // build the object std::string FeatName = getUniqueObjectName(name.c_str()); @@ -2141,13 +2280,13 @@ void CmdFemPostFunctions::activated(int iMsg) doCommand(Doc, "App.ActiveDocument.%s.Functions = __list__", provider->getNameInDocument()); doCommand(Doc, "del __list__"); - //set the default values, for this get the bounding box + // set the default values, for this get the bounding box vtkBoundingBox box = pipeline->getBoundingBox(); double center[3]; box.GetCenter(center); - if (iMsg == 0) { // Plane + if (iMsg == 0) { // Plane doCommand(Doc, "App.ActiveDocument.%s.Origin = App.Vector(%f, %f, %f)", FeatName.c_str(), @@ -2155,7 +2294,7 @@ void CmdFemPostFunctions::activated(int iMsg) center[1], center[2]); } - else if (iMsg == 1) { // Sphere + else if (iMsg == 1) { // Sphere doCommand(Doc, "App.ActiveDocument.%s.Center = App.Vector(%f, %f, %f)", FeatName.c_str(), @@ -2167,7 +2306,7 @@ void CmdFemPostFunctions::activated(int iMsg) FeatName.c_str(), box.GetDiagonalLength() / 2); } - else if (iMsg == 2) { // Cylinder + else if (iMsg == 2) { // Cylinder doCommand(Doc, "App.ActiveDocument.%s.Center = App.Vector(%f, %f, %f)", FeatName.c_str(), @@ -2177,23 +2316,17 @@ void CmdFemPostFunctions::activated(int iMsg) doCommand(Doc, "App.ActiveDocument.%s.Radius = %f", FeatName.c_str(), - box.GetDiagonalLength() / 3.6); // make cylinder a bit higher than the box + box.GetDiagonalLength() / 3.6); // make cylinder a bit higher than the box } - else if (iMsg == 3) { // Box + else if (iMsg == 3) { // Box doCommand(Doc, "App.ActiveDocument.%s.Center = App.Vector(%f, %f, %f)", FeatName.c_str(), center[0] + box.GetLength(0) / 2, center[1] + box.GetLength(1) / 2, center[2]); - doCommand(Doc, - "App.ActiveDocument.%s.Length = %f", - FeatName.c_str(), - box.GetLength(0)); - doCommand(Doc, - "App.ActiveDocument.%s.Width = %f", - FeatName.c_str(), - box.GetLength(1)); + doCommand(Doc, "App.ActiveDocument.%s.Length = %f", FeatName.c_str(), box.GetLength(0)); + doCommand(Doc, "App.ActiveDocument.%s.Width = %f", FeatName.c_str(), box.GetLength(1)); doCommand(Doc, "App.ActiveDocument.%s.Height = %f", FeatName.c_str(), @@ -2202,14 +2335,15 @@ void CmdFemPostFunctions::activated(int iMsg) } this->updateActive(); - //most of the times functions are added inside of a filter, make sure this still works - if (!Gui::Application::Instance->activeDocument()->getInEdit()) + // most of the times functions are added inside of a filter, make sure this still works + if (!Gui::Application::Instance->activeDocument()->getInEdit()) { doCommand(Gui, "Gui.activeDocument().setEdit('%s')", FeatName.c_str()); + } } else { QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("CmdFemPostClipFilter", "Wrong selection"), - qApp->translate("CmdFemPostClipFilter", "Select a pipeline, please.")); + qApp->translate("CmdFemPostClipFilter", "Wrong selection"), + qApp->translate("CmdFemPostClipFilter", "Select a pipeline, please.")); } // Since the default icon is reset when enabling/disabling the command we have @@ -2253,42 +2387,49 @@ void CmdFemPostFunctions::languageChange() { Command::languageChange(); - if (!_pcAction) + if (!_pcAction) { return; + } Gui::ActionGroup* pcAction = qobject_cast(_pcAction); QList a = pcAction->actions(); QAction* cmd = a[0]; cmd->setText(QApplication::translate("CmdFemPostFunctions", "Plane")); - cmd->setToolTip(QApplication::translate( - "FEM_PostCreateFunctions", "Create a plane function, defined by its origin and normal")); + cmd->setToolTip( + QApplication::translate("FEM_PostCreateFunctions", + "Create a plane function, defined by its origin and normal")); cmd->setStatusTip(cmd->toolTip()); cmd = a[1]; cmd->setText(QApplication::translate("CmdFemPostFunctions", "Sphere")); - cmd->setToolTip(QApplication::translate( - "FEM_PostCreateFunctions", "Create a sphere function, defined by its center and radius")); + cmd->setToolTip( + QApplication::translate("FEM_PostCreateFunctions", + "Create a sphere function, defined by its center and radius")); cmd->setStatusTip(cmd->toolTip()); cmd = a[2]; cmd->setText(QApplication::translate("CmdFemPostFunctions", "Cylinder")); cmd->setToolTip(QApplication::translate( - "FEM_PostCreateFunctions", "Create a cylinder function, defined by its center, axis and radius")); + "FEM_PostCreateFunctions", + "Create a cylinder function, defined by its center, axis and radius")); cmd->setStatusTip(cmd->toolTip()); cmd = a[3]; cmd->setText(QApplication::translate("CmdFemPostFunctions", "Box")); cmd->setToolTip(QApplication::translate( - "FEM_PostCreateFunctions", "Create a box function, defined by its center, length, width and height")); + "FEM_PostCreateFunctions", + "Create a box function, defined by its center, length, width and height")); cmd->setStatusTip(cmd->toolTip()); } bool CmdFemPostFunctions::isActive() { - if (getActiveGuiDocument()) + if (getActiveGuiDocument()) { return true; - else + } + else { return false; + } } @@ -2315,10 +2456,12 @@ void CmdFemPostApllyChanges::activated(int iMsg) bool CmdFemPostApllyChanges::isActive() { - if (getActiveGuiDocument()) + if (getActiveGuiDocument()) { return true; - else + } + else { return false; + } } Gui::Action* CmdFemPostApllyChanges::createAction() @@ -2337,13 +2480,13 @@ DEF_STD_CMD_A(CmdFemPostPipelineFromResult) CmdFemPostPipelineFromResult::CmdFemPostPipelineFromResult() : Command("FEM_PostPipelineFromResult") { - sAppModule = "Fem"; - sGroup = QT_TR_NOOP("Fem"); - sMenuText = QT_TR_NOOP("Post pipeline from result"); - sToolTipText = QT_TR_NOOP("Creates a post processing pipeline from a result object"); - sWhatsThis = "FEM_PostPipelineFromResult"; - sStatusTip = sToolTipText; - sPixmap = "FEM_PostPipelineFromResult"; + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Post pipeline from result"); + sToolTipText = QT_TR_NOOP("Creates a post processing pipeline from a result object"); + sWhatsThis = "FEM_PostPipelineFromResult"; + sStatusTip = sToolTipText; + sPixmap = "FEM_PostPipelineFromResult"; } void CmdFemPostPipelineFromResult::activated(int) @@ -2391,15 +2534,19 @@ void CmdFemPostPipelineFromResult::activated(int) } // create the pipeline object openCommand(QT_TRANSLATE_NOOP("Command", "Create pipeline from result")); - if (foundAnalysis) + if (foundAnalysis) { pcAnalysis->addObject("Fem::FemPostPipeline", FeatName.c_str()); - else + } + else { doCommand(Doc, "App.activeDocument().addObject('Fem::FemPostPipeline','%s')", FeatName.c_str()); + } // load the contents of the result object to the pipeline - doCommand(Doc, "App.activeDocument().ActiveObject.load(" - "App.activeDocument().getObject(\"%s\"))", results[0]->getNameInDocument()); + doCommand(Doc, + "App.activeDocument().ActiveObject.load(" + "App.activeDocument().getObject(\"%s\"))", + results[0]->getNameInDocument()); // set display to assure the user sees the new object doCommand(Doc, "App.activeDocument().ActiveObject.ViewObject.DisplayMode = \"Surface\""); // Set SelectionStyle to BoundBox because the idea is that the user gets the useful result @@ -2410,10 +2557,10 @@ void CmdFemPostPipelineFromResult::activated(int) commitCommand(); this->updateActive(); - } else { - QMessageBox::warning(Gui::getMainWindow(), + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("CmdFemPostPipelineFromResult", "Wrong selection type"), qApp->translate("CmdFemPostPipelineFromResult", "Select a result object, please.")); } @@ -2437,10 +2584,10 @@ void CreateFemCommands() Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); // part, analysis, solver - //rcCmdMgr.addCommand(new CmdFemAddPart()); // not implemented as GUI menu or click icon - //rcCmdMgr.addCommand(new CmdFemCreateAnalysis()); // Analysis is created in python - //rcCmdMgr.addCommand(new CmdFemCreateSolver()); // Solver will be extended and created - // in python + // rcCmdMgr.addCommand(new CmdFemAddPart()); // not implemented as GUI menu or click icon + // rcCmdMgr.addCommand(new CmdFemCreateAnalysis()); // Analysis is created in python + // rcCmdMgr.addCommand(new CmdFemCreateSolver()); // Solver will be extended and created + // in python // constraints rcCmdMgr.addCommand(new CmdFemConstraintBearing()); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp index 4db1e0d727..a5030ffd0a 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.cpp @@ -25,8 +25,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -49,8 +49,10 @@ DlgSettingsFemCcxImp::DlgSettingsFemCcxImp(QWidget* parent) int processor_count = QThread::idealThreadCount(); ui->sb_ccx_numcpu->setMaximum(processor_count); - connect(ui->fc_ccx_binary_path, &Gui::PrefFileChooser::fileNameChanged, - this, &DlgSettingsFemCcxImp::onfileNameChanged); + connect(ui->fc_ccx_binary_path, + &Gui::PrefFileChooser::fileNameChanged, + this, + &DlgSettingsFemCcxImp::onfileNameChanged); } DlgSettingsFemCcxImp::~DlgSettingsFemCcxImp() = default; @@ -62,18 +64,18 @@ void DlgSettingsFemCcxImp::saveSettings() hGrp->SetInt("Solver", ui->cmb_solver->currentIndex()); hGrp->SetInt("AnalysisType", ui->cb_analysis_type->currentIndex()); - ui->sb_ccx_numcpu->onSave(); //Number of CPUs + ui->sb_ccx_numcpu->onSave(); // Number of CPUs ui->cmb_solver->onSave(); ui->cb_ccx_non_lin_geom->onSave(); ui->cb_use_iterations_param->onSave(); ui->cb_static->onSave(); - ui->sb_ccx_max_iterations->onSave(); //Max number of iterations - ui->dsb_ccx_initial_time_step->onSave(); //Initial time step - ui->dsb_ccx_analysis_time->onSave(); //Analysis time + ui->sb_ccx_max_iterations->onSave(); // Max number of iterations + ui->dsb_ccx_initial_time_step->onSave(); // Initial time step + ui->dsb_ccx_analysis_time->onSave(); // Analysis time ui->cb_analysis_type->onSave(); - ui->cb_BeamShellOutput->onSave(); //Beam shell output 3d or 2d + ui->cb_BeamShellOutput->onSave(); // Beam shell output 3d or 2d ui->sb_eigenmode_number->onSave(); ui->dsb_eigenmode_high_limit->onSave(); ui->dsb_eigenmode_low_limit->onSave(); @@ -87,18 +89,18 @@ void DlgSettingsFemCcxImp::saveSettings() void DlgSettingsFemCcxImp::loadSettings() { - ui->sb_ccx_numcpu->onRestore(); //Number of CPUs + ui->sb_ccx_numcpu->onRestore(); // Number of CPUs ui->cmb_solver->onRestore(); ui->cb_ccx_non_lin_geom->onRestore(); ui->cb_use_iterations_param->onRestore(); ui->cb_static->onRestore(); - ui->sb_ccx_max_iterations->onRestore(); //Max number of iterations - ui->dsb_ccx_initial_time_step->onRestore(); //Initial time step - ui->dsb_ccx_analysis_time->onRestore(); //Analysis time + ui->sb_ccx_max_iterations->onRestore(); // Max number of iterations + ui->dsb_ccx_initial_time_step->onRestore(); // Initial time step + ui->dsb_ccx_analysis_time->onRestore(); // Analysis time ui->cb_analysis_type->onRestore(); - ui->cb_BeamShellOutput->onRestore(); //Beam shell output 3d or 2d + ui->cb_BeamShellOutput->onRestore(); // Beam shell output 3d or 2d ui->sb_eigenmode_number->onRestore(); ui->dsb_eigenmode_high_limit->onRestore(); ui->dsb_eigenmode_low_limit->onRestore(); @@ -112,11 +114,13 @@ void DlgSettingsFemCcxImp::loadSettings() ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Fem/Ccx"); int index = hGrp->GetInt("Solver", 0); - if (index > -1) + if (index > -1) { ui->cmb_solver->setCurrentIndex(index); + } index = hGrp->GetInt("AnalysisType", 0); - if (index > -1) + if (index > -1) { ui->cb_analysis_type->setCurrentIndex(index); + } } /** @@ -137,9 +141,11 @@ void DlgSettingsFemCcxImp::changeEvent(QEvent* e) void DlgSettingsFemCcxImp::onfileNameChanged(QString FileName) { if (!QFileInfo::exists(FileName)) { - QMessageBox::critical(this, tr("File does not exist"), - tr("The specified executable \n'%1'\n does not exist!\n" - "Specify another file please.").arg(FileName)); + QMessageBox::critical(this, + tr("File does not exist"), + tr("The specified executable\n'%1'\n does not exist!\n" + "Specify another file please.") + .arg(FileName)); } } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.h b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.h index 5d53a0c6b2..792602a75a 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemCcxImp.h @@ -1,4 +1,4 @@ - /************************************************************************** +/************************************************************************** * Copyright (c) 2015 FreeCAD Developers * * Author: Przemo Firszt * * Author: Bernd Hahnebach * @@ -26,18 +26,19 @@ #ifndef FEMGUI_DLGSETTINGSFEMCCXIMP_H #define FEMGUI_DLGSETTINGSFEMCCXIMP_H -#include #include +#include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemCcxImp; -class DlgSettingsFemCcxImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemCcxImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemCcxImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemCcxImp(QWidget* parent = nullptr); ~DlgSettingsFemCcxImp() override; protected Q_SLOTS: @@ -46,12 +47,12 @@ protected Q_SLOTS: protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMCCXIMP_H +#endif // FEMGUI_DLGSETTINGSFEMCCXIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp index 0eca7982bb..40b40466e7 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.cpp @@ -24,8 +24,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include "DlgSettingsFemElmerImp.h" @@ -44,14 +44,22 @@ DlgSettingsFemElmerImp::DlgSettingsFemElmerImp(QWidget* parent) processor_count = QThread::idealThreadCount(); ui->sb_elmer_num_cores->setMaximum(processor_count); - connect(ui->fc_grid_binary_path, &Gui::PrefFileChooser::fileNameChanged, - this, &DlgSettingsFemElmerImp::onfileNameChanged); - connect(ui->fc_elmer_binary_path, &Gui::PrefFileChooser::fileNameChanged, - this, &DlgSettingsFemElmerImp::onfileNameChanged); - connect(ui->fc_elmer_binary_path, &Gui::PrefFileChooser::fileNameChanged, - this, &DlgSettingsFemElmerImp::onfileNameChangedMT); - connect(ui->sb_elmer_num_cores, qOverload(&Gui::PrefSpinBox::valueChanged), - this, &DlgSettingsFemElmerImp::onCoresValueChanged); + connect(ui->fc_grid_binary_path, + &Gui::PrefFileChooser::fileNameChanged, + this, + &DlgSettingsFemElmerImp::onfileNameChanged); + connect(ui->fc_elmer_binary_path, + &Gui::PrefFileChooser::fileNameChanged, + this, + &DlgSettingsFemElmerImp::onfileNameChanged); + connect(ui->fc_elmer_binary_path, + &Gui::PrefFileChooser::fileNameChanged, + this, + &DlgSettingsFemElmerImp::onfileNameChangedMT); + connect(ui->sb_elmer_num_cores, + qOverload(&Gui::PrefSpinBox::valueChanged), + this, + &DlgSettingsFemElmerImp::onCoresValueChanged); } DlgSettingsFemElmerImp::~DlgSettingsFemElmerImp() = default; @@ -96,9 +104,11 @@ void DlgSettingsFemElmerImp::changeEvent(QEvent* e) void DlgSettingsFemElmerImp::onfileNameChanged(QString FileName) { if (!QFileInfo::exists(FileName)) { - QMessageBox::critical(this, tr("File does not exist"), - tr("The specified executable \n'%1'\n does not exist!\n" - "Specify another file please.").arg(FileName)); + QMessageBox::critical(this, + tr("File does not exist"), + tr("The specified executable\n'%1'\n does not exist!\n" + "Specify another file please.") + .arg(FileName)); } } @@ -106,15 +116,17 @@ void DlgSettingsFemElmerImp::onfileNameChangedMT(QString FileName) { ui->sb_elmer_num_cores->setMaximum(processor_count); - if (ui->sb_elmer_num_cores->value() == 1) + if (ui->sb_elmer_num_cores->value() == 1) { return; + } #if defined(FC_OS_WIN32) // name ends with "_mpi.exe" if (!FileName.endsWith(QLatin1String("_mpi.exe"))) { - QMessageBox::warning(this, tr("FEM Elmer: Not suitable for multithreading"), - tr("Wrong Elmer setting: You use more than one CPU core.\n" - "Therefore an executable with the suffix '_mpi.exe' is required.")); + QMessageBox::warning(this, + tr("FEM Elmer: Not suitable for multithreading"), + tr("Wrong Elmer setting: You use more than one CPU core.\n" + "Therefore an executable with the suffix '_mpi.exe' is required.")); ui->sb_elmer_num_cores->setValue(1); ui->sb_elmer_num_cores->setMaximum(1); return; @@ -122,9 +134,10 @@ void DlgSettingsFemElmerImp::onfileNameChangedMT(QString FileName) #elif defined(FC_OS_LINUX) || defined(FC_OS_CYGWIN) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD) // name ends with "_mpi" if (!FileName.endsWith(QLatin1String("_mpi"))) { - QMessageBox::warning(this, tr("FEM Elmer: Not suitable for multithreading"), - tr("Wrong Elmer setting: You use more than one CPU core.\n" - "Therefore an executable with the suffix '_mpi' is required.")); + QMessageBox::warning(this, + tr("FEM Elmer: Not suitable for multithreading"), + tr("Wrong Elmer setting: You use more than one CPU core.\n" + "Therefore an executable with the suffix '_mpi' is required.")); ui->sb_elmer_num_cores->setValue(1); ui->sb_elmer_num_cores->setMaximum(1); return; diff --git a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.h b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.h index ed089d3ffe..a5b5e11a9b 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemElmerImp.h @@ -1,4 +1,4 @@ - /************************************************************************** +/************************************************************************** * Copyright (c) 2016 FreeCAD Developers * * Author: Bernd Hahnebach * * Based on src/Mod/Fem/Gui/DlgSettingsFemCcx.h * @@ -25,18 +25,19 @@ #ifndef FEMGUI_DLGSETTINGSFEMELMERIMP_H #define FEMGUI_DLGSETTINGSFEMELMERIMP_H -#include #include +#include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemElmerImp; -class DlgSettingsFemElmerImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemElmerImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemElmerImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemElmerImp(QWidget* parent = nullptr); ~DlgSettingsFemElmerImp() override; protected Q_SLOTS: @@ -47,13 +48,13 @@ protected Q_SLOTS: protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; int processor_count; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMELMERIMP_H +#endif // FEMGUI_DLGSETTINGSFEMELMERIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.cpp index 56f549faad..fe290d2baf 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.cpp @@ -33,8 +33,8 @@ using namespace FemGui; DlgSettingsFemExportAbaqusImp::DlgSettingsFemExportAbaqusImp(QWidget* parent) - : PreferencePage(parent), - ui(new Ui_DlgSettingsFemExportAbaqus) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemExportAbaqus) { ui->setupUi(this); } @@ -46,8 +46,8 @@ DlgSettingsFemExportAbaqusImp::~DlgSettingsFemExportAbaqusImp() = default; void DlgSettingsFemExportAbaqusImp::saveSettings() { - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Fem/Abaqus"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Fem/Abaqus"); hGrp->SetInt("AbaqusElementChoice", ui->comboBoxElemChoiceParam->currentIndex()); ui->comboBoxElemChoiceParam->onSave(); @@ -59,16 +59,18 @@ void DlgSettingsFemExportAbaqusImp::loadSettings() ui->comboBoxElemChoiceParam->onRestore(); ui->checkBoxWriteGroups->onRestore(); - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Fem/Abaqus"); - int index = hGrp->GetInt("AbaqusElementChoice", 0); - if (index > -1) ui->comboBoxElemChoiceParam->setCurrentIndex(index); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Fem/Abaqus"); + int index = hGrp->GetInt("AbaqusElementChoice", 0); + if (index > -1) { + ui->comboBoxElemChoiceParam->setCurrentIndex(index); + } } /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsFemExportAbaqusImp::changeEvent(QEvent *e) +void DlgSettingsFemExportAbaqusImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { int c_index = ui->comboBoxElemChoiceParam->currentIndex(); diff --git a/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.h b/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.h index 60330bd774..7a70486224 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemExportAbaqusImp.h @@ -30,26 +30,27 @@ #include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemExportAbaqus; -class DlgSettingsFemExportAbaqusImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemExportAbaqusImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemExportAbaqusImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemExportAbaqusImp(QWidget* parent = nullptr); ~DlgSettingsFemExportAbaqusImp() override; protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMEXPORTABAQUSIMP_H +#endif // FEMGUI_DLGSETTINGSFEMEXPORTABAQUSIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp index 0aa8b80c33..1cf03d90bf 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.cpp @@ -43,17 +43,22 @@ DlgSettingsFemGeneralImp::DlgSettingsFemGeneralImp(QWidget* parent) ui->cmb_def_solver->clear(); std::vector Solvers = {"None"}; - if (!Fem::Tools::checkIfBinaryExists("CCX", "ccx", "ccx").empty()) + if (!Fem::Tools::checkIfBinaryExists("CCX", "ccx", "ccx").empty()) { Solvers.emplace_back("CalculiX"); - if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver").empty()) + } + if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver").empty()) { Solvers.emplace_back("Elmer"); + } // also check the multi-CPU Elmer build - else if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver_mpi").empty()) + else if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver_mpi").empty()) { Solvers.emplace_back("Elmer"); - if (!Fem::Tools::checkIfBinaryExists("Mystran", "mystran", "mystran").empty()) + } + if (!Fem::Tools::checkIfBinaryExists("Mystran", "mystran", "mystran").empty()) { Solvers.emplace_back("Mystran"); - if (!Fem::Tools::checkIfBinaryExists("Z88", "z88", "z88r").empty()) + } + if (!Fem::Tools::checkIfBinaryExists("Z88", "z88", "z88r").empty()) { Solvers.emplace_back("Z88"); + } QStringList solversList; for (auto item : Solvers) { @@ -66,8 +71,9 @@ DlgSettingsFemGeneralImp::DlgSettingsFemGeneralImp(QWidget* parent) ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Fem/General"); auto DefaultSolver = hGrp->GetInt("DefaultSolver", 0); - if (!DefaultSolver && ui->cmb_def_solver->count() == 2) + if (!DefaultSolver && ui->cmb_def_solver->count() == 2) { ui->cmb_def_solver->setCurrentIndex(1); + } } DlgSettingsFemGeneralImp::~DlgSettingsFemGeneralImp() = default; diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.h b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.h index 23f5d57b85..df5fc3678a 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.h @@ -1,4 +1,4 @@ - /************************************************************************** +/************************************************************************** * Copyright (c) 2015 FreeCAD Developers * * Author: Przemo Firszt * * Based on src/Mod/Raytracing/Gui/DlgSettingsRayImp.h * @@ -25,29 +25,30 @@ #ifndef FEMGUI_DLGSETTINGSFEMGENERALIMP_H #define FEMGUI_DLGSETTINGSFEMGENERALIMP_H -#include #include +#include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemGeneralImp; -class DlgSettingsFemGeneralImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemGeneralImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemGeneralImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemGeneralImp(QWidget* parent = nullptr); ~DlgSettingsFemGeneralImp() override; protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMGENERALIMP_H +#endif // FEMGUI_DLGSETTINGSFEMGENERALIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp index a22faac6bb..2ff0868086 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "DlgSettingsFemGmshImp.h" @@ -39,8 +39,10 @@ DlgSettingsFemGmshImp::DlgSettingsFemGmshImp(QWidget* parent) { ui->setupUi(this); - connect(ui->fc_gmsh_binary_path, &Gui::PrefFileChooser::fileNameChanged, - this, &DlgSettingsFemGmshImp::onfileNameChanged); + connect(ui->fc_gmsh_binary_path, + &Gui::PrefFileChooser::fileNameChanged, + this, + &DlgSettingsFemGmshImp::onfileNameChanged); } DlgSettingsFemGmshImp::~DlgSettingsFemGmshImp() = default; @@ -73,9 +75,11 @@ void DlgSettingsFemGmshImp::changeEvent(QEvent* e) void DlgSettingsFemGmshImp::onfileNameChanged(QString FileName) { if (!QFileInfo::exists(FileName)) { - QMessageBox::critical(this, tr("File does not exist"), - tr("The specified executable \n'%1'\n does not exist!\n" - "Specify another file please.").arg(FileName)); + QMessageBox::critical(this, + tr("File does not exist"), + tr("The specified executable\n'%1'\n does not exist!\n" + "Specify another file please.") + .arg(FileName)); } } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h index 7d9b6cf1a5..18a04590cc 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemGmshImp.h @@ -1,4 +1,4 @@ - /************************************************************************** +/************************************************************************** * Copyright (c) 2016 FreeCAD Developers * * Author: Bernd Hahnebach * * Based on src/Mod/Fem/Gui/DlgSettingsFemCcx.h * @@ -25,18 +25,19 @@ #ifndef FEMGUI_DLGSETTINGSFEMGMSHIMP_H #define FEMGUI_DLGSETTINGSFEMGMSHIMP_H -#include #include +#include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemGmshImp; -class DlgSettingsFemGmshImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemGmshImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemGmshImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemGmshImp(QWidget* parent = nullptr); ~DlgSettingsFemGmshImp() override; protected Q_SLOTS: @@ -45,12 +46,12 @@ protected Q_SLOTS: protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMGMSHIMP_H +#endif // FEMGUI_DLGSETTINGSFEMGMSHIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp index 9c4ee914a5..fb23e50f71 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.cpp @@ -33,8 +33,8 @@ using namespace FemGui; DlgSettingsFemInOutVtkImp::DlgSettingsFemInOutVtkImp(QWidget* parent) - : PreferencePage(parent), - ui(new Ui_DlgSettingsFemInOutVtk) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsFemInOutVtk) { ui->setupUi(this); } @@ -61,7 +61,9 @@ void DlgSettingsFemInOutVtkImp::loadSettings() "User parameter:BaseApp/Preferences/Mod/Fem/InOutVtk"); int index = hGrp->GetInt("ImportObject", 0); // 0 is standard on first initialize, 0 .. vtk res obj, 1 .. FEM mesh obj, 2 .. FreeCAD res obj - if (index > -1) ui->comboBoxVtkImportObject->setCurrentIndex(index); + if (index > -1) { + ui->comboBoxVtkImportObject->setCurrentIndex(index); + } } /** diff --git a/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.h b/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.h index 897cd9837a..316c68327c 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemInOutVtkImp.h @@ -30,26 +30,27 @@ #include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemInOutVtk; -class DlgSettingsFemInOutVtkImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemInOutVtkImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemInOutVtkImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemInOutVtkImp(QWidget* parent = nullptr); ~DlgSettingsFemInOutVtkImp() override; protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMINOUTVTKIMP_H +#endif // FEMGUI_DLGSETTINGSFEMINOUTVTKIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.h b/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.h index 829901fa84..9a72a3eca0 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemMaterialImp.h @@ -1,4 +1,4 @@ - /************************************************************************** +/************************************************************************** * Copyright (c) 2018 FreeCAD Developers * * Author: Bernd Hahnebach * * Based on src/Mod/Fem/Gui/DlgSettingsFemElmer.h * @@ -25,30 +25,31 @@ #ifndef FEMGUI_DLGSETTINGSFEMMATERIALIMP_H #define FEMGUI_DLGSETTINGSFEMMATERIALIMP_H -#include #include +#include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemMaterialImp; -class DlgSettingsFemMaterialImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemMaterialImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemMaterialImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemMaterialImp(QWidget* parent = nullptr); ~DlgSettingsFemMaterialImp() override; protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMMATERIALIMP_H +#endif // FEMGUI_DLGSETTINGSFEMMATERIALIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp index 0d8ec13ae4..39840d1870 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "DlgSettingsFemMystranImp.h" @@ -39,8 +39,10 @@ DlgSettingsFemMystranImp::DlgSettingsFemMystranImp(QWidget* parent) { ui->setupUi(this); - connect(ui->fc_mystran_binary_path, &Gui::PrefFileChooser::fileNameChanged, - this, &DlgSettingsFemMystranImp::onfileNameChanged); + connect(ui->fc_mystran_binary_path, + &Gui::PrefFileChooser::fileNameChanged, + this, + &DlgSettingsFemMystranImp::onfileNameChanged); } DlgSettingsFemMystranImp::~DlgSettingsFemMystranImp() = default; @@ -75,9 +77,11 @@ void DlgSettingsFemMystranImp::changeEvent(QEvent* e) void DlgSettingsFemMystranImp::onfileNameChanged(QString FileName) { if (!QFileInfo::exists(FileName)) { - QMessageBox::critical(this, tr("File does not exist"), - tr("The specified executable \n'%1'\n does not exist!\n" - "Specify another file please.").arg(FileName)); + QMessageBox::critical(this, + tr("File does not exist"), + tr("The specified executable\n'%1'\n does not exist!\n" + "Specify another file please.") + .arg(FileName)); } } diff --git a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.h b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.h index 5aa0c53d9b..e00f3f6bdb 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemMystranImp.h @@ -1,4 +1,4 @@ - /************************************************************************** +/************************************************************************** * Copyright (c) 2021 FreeCAD Developers * * Author: Bernd Hahnebach * * Based on src/Mod/Fem/Gui/DlgSettingsFemGeneralImp.h * @@ -25,19 +25,20 @@ #ifndef FEMGUI_DLGSETTINGSFEMMYSTRANIMP_H #define FEMGUI_DLGSETTINGSFEMMYSTRANIMP_H -#include #include +#include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemMystranImp; -class DlgSettingsFemMystranImp : public Gui::Dialog::PreferencePage +class DlgSettingsFemMystranImp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemMystranImp( QWidget* parent = nullptr ); + explicit DlgSettingsFemMystranImp(QWidget* parent = nullptr); ~DlgSettingsFemMystranImp() override; protected Q_SLOTS: @@ -46,12 +47,12 @@ protected Q_SLOTS: protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMMYSTRANIMP_H +#endif // FEMGUI_DLGSETTINGSFEMMYSTRANIMP_H diff --git a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp index c16f8bfcac..46afdac3f6 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp +++ b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -41,8 +41,10 @@ DlgSettingsFemZ88Imp::DlgSettingsFemZ88Imp(QWidget* parent) { ui->setupUi(this); - connect(ui->fc_z88_binary_path, &Gui::PrefFileChooser::fileNameChanged, - this, &DlgSettingsFemZ88Imp::onfileNameChanged); + connect(ui->fc_z88_binary_path, + &Gui::PrefFileChooser::fileNameChanged, + this, + &DlgSettingsFemZ88Imp::onfileNameChanged); } DlgSettingsFemZ88Imp::~DlgSettingsFemZ88Imp() = default; @@ -72,14 +74,17 @@ void DlgSettingsFemZ88Imp::loadSettings() ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/Fem/Z88"); int index = hGrp->GetInt("Solver", 0); - if (index > -1) + if (index > -1) { ui->cmb_solver->setCurrentIndex(index); + } int places = hGrp->GetInt("MaxGS", 100000000); - if (places > -1) + if (places > -1) { ui->sb_Z88_MaxGS->setValue(places); + } places = hGrp->GetInt("MaxKOI", 2800000); - if (places > -1) + if (places > -1) { ui->sb_Z88_MaxKOI->setValue(places); + } } /** @@ -98,8 +103,9 @@ void DlgSettingsFemZ88Imp::changeEvent(QEvent* e) void DlgSettingsFemZ88Imp::onfileNameChanged(QString FileName) { if (!QFileInfo::exists(FileName)) { - QMessageBox::critical(this, tr("File does not exist"), - tr("The specified z88r executable \n'%1'\n does not exist!\n" + QMessageBox::critical(this, + tr("File does not exist"), + tr("The specified z88r executable\n'%1'\n does not exist!\n" "Specify another file please.") .arg(FileName)); return; @@ -110,14 +116,14 @@ void DlgSettingsFemZ88Imp::onfileNameChanged(QString FileName) auto strName = FileName.toStdString(); #if defined(FC_OS_WIN32) if (strName.substr(strName.length() - 8) != "z88r.exe") { - QMessageBox::critical(this, tr("Wrong file"), - tr("You must specify the path to the z88r.exe!")); + QMessageBox::critical(this, + tr("Wrong file"), + tr("You must specify the path to the z88r.exe!")); return; } #elif defined(FC_OS_LINUX) || defined(FC_OS_CYGWIN) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD) if (strName.substr(strName.length() - 4) != "z88r") { - QMessageBox::critical(this, tr("Wrong file"), - tr("You must specify the path to the z88r!")); + QMessageBox::critical(this, tr("Wrong file"), tr("You must specify the path to the z88r!")); return; } #endif diff --git a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.h b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.h index 1b82c033e8..9097756226 100644 --- a/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.h +++ b/src/Mod/Fem/Gui/DlgSettingsFemZ88Imp.h @@ -1,4 +1,4 @@ - /************************************************************************** +/************************************************************************** * Copyright (c) 2016 FreeCAD Developers * * Author: Bernd Hahnebach * * Based on src/Mod/Fem/Gui/DlgSettingsFemCcx.h * @@ -25,19 +25,20 @@ #ifndef FEMGUI_DLGSETTINGSFEMZ88IMP_H #define FEMGUI_DLGSETTINGSFEMZ88IMP_H -#include #include +#include -namespace FemGui { +namespace FemGui +{ class Ui_DlgSettingsFemZ88Imp; -class DlgSettingsFemZ88Imp : public Gui::Dialog::PreferencePage +class DlgSettingsFemZ88Imp: public Gui::Dialog::PreferencePage { Q_OBJECT public: - explicit DlgSettingsFemZ88Imp( QWidget* parent = nullptr ); + explicit DlgSettingsFemZ88Imp(QWidget* parent = nullptr); ~DlgSettingsFemZ88Imp() override; protected Q_SLOTS: @@ -46,12 +47,12 @@ protected Q_SLOTS: protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_DLGSETTINGSFEMZ88IMP_H +#endif // FEMGUI_DLGSETTINGSFEMZ88IMP_H diff --git a/src/Mod/Fem/Gui/FemSelectionGate.cpp b/src/Mod/Fem/Gui/FemSelectionGate.cpp index 0f8ce2411b..06c5730ca9 100644 --- a/src/Mod/Fem/Gui/FemSelectionGate.cpp +++ b/src/Mod/Fem/Gui/FemSelectionGate.cpp @@ -28,23 +28,22 @@ using namespace FemGui; using namespace Gui; -bool FemSelectionGate::allow(App::Document* /*pDoc*/, App::DocumentObject* /*pObj*/, const char* sSubName) +bool FemSelectionGate::allow(App::Document* /*pDoc*/, + App::DocumentObject* /*pObj*/, + const char* sSubName) { - if (!sSubName || sSubName[0] == '\0') + if (!sSubName || sSubName[0] == '\0') { return false; + } - if (sSubName[0] == 'E' && - sSubName[1] == 'l' && - sSubName[2] == 'e' && - sSubName[3] == 'm' && - (Type == Element || Type == NodeElement)) + if (sSubName[0] == 'E' && sSubName[1] == 'l' && sSubName[2] == 'e' && sSubName[3] == 'm' + && (Type == Element || Type == NodeElement)) { return true; - if (sSubName[0] == 'N' && - sSubName[1] == 'o' && - sSubName[2] == 'd' && - sSubName[3] == 'e' && - (Type == Node || Type == NodeElement)) + } + if (sSubName[0] == 'N' && sSubName[1] == 'o' && sSubName[2] == 'd' && sSubName[3] == 'e' + && (Type == Node || Type == NodeElement)) { return true; + } return false; } diff --git a/src/Mod/Fem/Gui/FemSelectionGate.h b/src/Mod/Fem/Gui/FemSelectionGate.h index 1c39f47117..08f874978a 100644 --- a/src/Mod/Fem/Gui/FemSelectionGate.h +++ b/src/Mod/Fem/Gui/FemSelectionGate.h @@ -25,22 +25,24 @@ #include -namespace FemGui { - -class FemSelectionGate : public Gui::SelectionFilterGate +namespace FemGui { - public: - enum ElemType { - Nothing , - Node , - Element , + +class FemSelectionGate: public Gui::SelectionFilterGate +{ +public: + enum ElemType + { + Nothing, + Node, + Element, NodeElement }; explicit FemSelectionGate(ElemType type) - : Gui::SelectionFilterGate(nullPointer()),Type(type) - { - } + : Gui::SelectionFilterGate(nullPointer()) + , Type(type) + {} ElemType Type; @@ -48,6 +50,6 @@ class FemSelectionGate : public Gui::SelectionFilterGate bool allow(App::Document* pDoc, App::DocumentObject* pObj, const char* sSubName) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_FemSelectionGate_H +#endif // GUI_FemSelectionGate_H diff --git a/src/Mod/Fem/Gui/FemSettings.cpp b/src/Mod/Fem/Gui/FemSettings.cpp index 61d83144a8..a8f6fb350f 100644 --- a/src/Mod/Fem/Gui/FemSettings.cpp +++ b/src/Mod/Fem/Gui/FemSettings.cpp @@ -32,7 +32,8 @@ using namespace FemGui; FemSettings::FemSettings() { - pGroup = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Fem"); + pGroup = + App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Fem"); } void FemSettings::setPostAutoRecompute(bool on) diff --git a/src/Mod/Fem/Gui/FemSettings.h b/src/Mod/Fem/Gui/FemSettings.h index 03da65edb0..ffa0498c29 100644 --- a/src/Mod/Fem/Gui/FemSettings.h +++ b/src/Mod/Fem/Gui/FemSettings.h @@ -26,7 +26,8 @@ #include -namespace FemGui { +namespace FemGui +{ class FemSettings { @@ -39,6 +40,6 @@ private: ParameterGrp::handle pGroup; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEMGUI_SETTINGS_H +#endif // FEMGUI_SETTINGS_H diff --git a/src/Mod/Fem/Gui/PreCompiled.h b/src/Mod/Fem/Gui/PreCompiled.h index d8132644f4..423ea9eb4c 100644 --- a/src/Mod/Fem/Gui/PreCompiled.h +++ b/src/Mod/Fem/Gui/PreCompiled.h @@ -26,8 +26,8 @@ #include #ifdef _MSC_VER -# pragma warning(disable : 4005) -# pragma warning(disable : 4290) +#pragma warning(disable : 4005) +#pragma warning(disable : 4290) #endif #ifdef _PreComp_ @@ -54,9 +54,9 @@ #include #ifdef FC_OS_WIN32 -# define WIN32_LEAN_AND_MEAN -# define NOMINMAX -# include +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#include #endif // OCC @@ -66,7 +66,6 @@ #include #include -#include #include #include #include @@ -78,12 +77,13 @@ #include #include #include -#include #include +#include #include #include #include #include +#include // inventor #include @@ -95,10 +95,10 @@ #include #include #include -#include -#include #include #include +#include +#include #include #include #include @@ -106,8 +106,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -148,8 +148,8 @@ // Salomesh #include -#include #include +#include // VTK #include @@ -158,6 +158,6 @@ #include #include -#endif //_PreComp_ +#endif //_PreComp_ -#endif // FEMGUI_PRECOMPILED_H +#endif // FEMGUI_PRECOMPILED_H diff --git a/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp b/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp index b7a70b96bd..71f1228ce5 100644 --- a/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp +++ b/src/Mod/Fem/Gui/PropertyFemMeshItem.cpp @@ -23,8 +23,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -39,38 +39,38 @@ PROPERTYITEM_SOURCE(FemGui::PropertyFemMeshItem) PropertyFemMeshItem::PropertyFemMeshItem() { - m_n = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_n = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_n->setParent(this); m_n->setPropertyName(QLatin1String("Nodes")); this->appendChild(m_n); - m_e = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_e = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_e->setParent(this); m_e->setPropertyName(QLatin1String("Edges")); this->appendChild(m_e); - m_f = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_f = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_f->setParent(this); m_f->setPropertyName(QLatin1String("Faces")); this->appendChild(m_f); - m_p = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_p = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_p->setParent(this); m_p->setPropertyName(QLatin1String("Polygons")); this->appendChild(m_p); - m_v = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_v = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_v->setParent(this); m_v->setPropertyName(QLatin1String("Volumes")); this->appendChild(m_v); - m_h = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_h = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_h->setParent(this); m_h->setPropertyName(QLatin1String("Polyhedrons")); this->appendChild(m_h); - m_g = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_g = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_g->setParent(this); m_g->setPropertyName(QLatin1String("Groups")); this->appendChild(m_g); @@ -128,7 +128,9 @@ void PropertyFemMeshItem::setValue(const QVariant& value) Q_UNUSED(value); } -QWidget* PropertyFemMeshItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const +QWidget* PropertyFemMeshItem::createEditor(QWidget* parent, + const QObject* receiver, + const char* method) const { Q_UNUSED(parent); Q_UNUSED(receiver); diff --git a/src/Mod/Fem/Gui/PropertyFemMeshItem.h b/src/Mod/Fem/Gui/PropertyFemMeshItem.h index 2609c634bf..e90fcb86c8 100644 --- a/src/Mod/Fem/Gui/PropertyFemMeshItem.h +++ b/src/Mod/Fem/Gui/PropertyFemMeshItem.h @@ -25,13 +25,14 @@ #include -namespace FemGui { +namespace FemGui +{ /** * Display data of an FEM mesh. * \author Werner Mayer */ -class PropertyFemMeshItem : public Gui::PropertyEditor::PropertyItem +class PropertyFemMeshItem: public Gui::PropertyEditor::PropertyItem { Q_OBJECT Q_PROPERTY(int Nodes READ countNodes CONSTANT) @@ -43,9 +44,10 @@ class PropertyFemMeshItem : public Gui::PropertyEditor::PropertyItem Q_PROPERTY(int Groups READ countGroups CONSTANT) PROPERTYITEM_HEADER - QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; - void setEditorData(QWidget *editor, const QVariant& data) const override; - QVariant editorData(QWidget *editor) const override; + QWidget* + createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; + void setEditorData(QWidget* editor, const QVariant& data) const override; + QVariant editorData(QWidget* editor) const override; int countNodes() const; int countEdges() const; @@ -74,8 +76,7 @@ private: Gui::PropertyEditor::PropertyIntegerItem* m_g; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEMGUI_PROPERTY_FEMMESH_ITEM_H - +#endif // FEMGUI_PROPERTY_FEMMESH_ITEM_H diff --git a/src/Mod/Fem/Gui/Resources/icons/fem-solver-inp-editor.svg b/src/Mod/Fem/Gui/Resources/icons/fem-solver-inp-editor.svg index 76ac6f8c00..b0f6b44965 100644 --- a/src/Mod/Fem/Gui/Resources/icons/fem-solver-inp-editor.svg +++ b/src/Mod/Fem/Gui/Resources/icons/fem-solver-inp-editor.svg @@ -103,7 +103,7 @@ - + diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem.ts b/src/Mod/Fem/Gui/Resources/translations/Fem.ts index 625154c108..046b7e6a24 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem.ts @@ -1022,7 +1022,7 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1120,7 +1120,7 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1231,7 +1231,7 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1368,7 +1368,7 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1546,7 +1546,7 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1646,7 +1646,7 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts index 9be19e927c..b2c87825f1 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_be.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Абмежаванне падшыпніка Creates a bearing constraint - Creates a bearing constraint + Стварыць абмежаванне падшыпніка @@ -24,17 +24,17 @@ Fem - МКЭ + Fem Contact constraint - Contact constraint + Абмежаванне кантакту Creates a contact constraint between faces - Creates a contact constraint between faces + Стварыць абмежаванне кантакту паміж гранямі @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + Стварыць межавую ўмову зрушэння для геаметрычнай сутнасці @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Стварыць фіксаваную межавую ўмову для геаметрычнай сутнасці @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Стварыць сілавую нагрузку, якая прыкладзеная да геаметрычнай сутнасці @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Абмежаванне шасцерні Creates a gear constraint - Creates a gear constraint + Стварыць абмежаванне шасцерні @@ -137,12 +137,12 @@ Heat flux load - Heat flux load + Нагрузка на цеплавы паток Creates a heat flux load acting on a face - Creates a heat flux load acting on a face + Стварыць нагрузку цеплавога патоку, якая дзейнічае на грань @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + Пачатковая тэмпература Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + Стварае пачатковую тэмпературу, якая дзейнічае на цела @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + Абмежаванне шматкропкавай плоскасці Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Стварыць абмежаванне шматкропкавай плоскасці для грані @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Стварыць нагрузку ціску, якая дзейнічае на грань @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Абмежаванне шківу Creates a pulley constraint - Creates a pulley constraint + Стварыць абмежаванне шківу @@ -227,12 +227,12 @@ Spring - Spring + Спружына Creates a spring acting on a face - Creates a spring acting on a face + Стварыць спружыну, якая дзейнічае на грань @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + Стварыць тэмпературную нагрузку/канцэнтраваны цеплавы паток, якія дзейнічаюць на грань @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Стварыць лакальную сістэму каардынат на грані @@ -591,77 +591,77 @@ Create fluid boundary condition - Стварыць умову мяжы вадкасці + Стварыць межавую щмову вадкасці Make bearing constraint - Make bearing constraint + Зрабіць абмежаванне падшыпніка Make contact constraint on a face - Make contact constraint on a face + Зрабіць абмежаванне кантакту на грані Make displacement boundary condition on face - Make displacement boundary condition on face + Зрабіць межавую ўмову зрушэння на грані Make fixed boundary condition for geometry - Make fixed boundary condition for geometry + Зрабіць фіксаваную межавую ўмову для геаметрыі Make force load on geometry - Make force load on geometry + Зрабіць сілавую нагрузку на геаметрыю Make gear constraint - Make gear constraint + Зрабіць абмежаванне шасцерні Make heat flux load on face - Make heat flux load on face + Зрабіць нагрузку на цеплавы паток Make initial temperature condition on body - Make initial temperature condition on body + Зрабіць пачатковы тэмпературны рэжым на целе Make plane multi-point constraint on face - Make plane multi-point constraint on face + Зрабіць абмежаванне шматкропкавай плоскасці на грані Make pressure load on face - Make pressure load on face + Зрабіць нагрузку ціскам на грань Make spring on face - Make spring on face + Зрабіць спружыну на грані Make pulley constraint - Make pulley constraint + Зрабіць абмежаванне шківу Make temperature boundary condition on face - Make temperature boundary condition on face + Зрабіць межавую ўмову тэмпературы на грані Make local coordinate system on face - Make local coordinate system on face + Зрабіць лакальную сістэму каардынат на грані @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Двайковы файл + Двайковы файл '%1' не існуе! Калі ласка, пакажыце іншы файл. @@ -1123,11 +1123,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Двайковы файл + Двайковы файл '%1' не існуе! Калі ласка, пакажыце іншы файл. @@ -1217,10 +1217,8 @@ not belonging to faces and faces not belonging to volumes. Every analysis feature and, if there are different materials, material consists of two mesh groups, faces and nodes where the constraint or material is applied. - Mesh groups are exported too. -Every analysis feature and, if there are different materials, -material consists of two mesh groups, faces and nodes where -the constraint or material is applied. + Суполкі паліганальных сетак таксама экспартуюцца. +Кожны элемент аналізу і, калі існуюць розныя матэрыялы, матэрыял складаецца з двух суполак паліганальных сетак, граняў і вузлоў, да якіх ужываецца абмежаванне ці матэрыял. @@ -1247,8 +1245,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Дазволіць праграме кіраваць (ствараць, выдаляць) працоўнымі каталогамі для ўсіх сродкаў рашэння. Ужывайце часовыя каталогі. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1321,13 +1319,12 @@ with the last used dialog settings All analysis features are hidden in the model view when the results dialog is opened - All analysis features are hidden in the model view -when the results dialog is opened + Усе элементы аналізу схаваныя ў выглядзе мадэлі пры адкрыцці дыялогавага акна вынікаў Hide analysis features when open result dialog - Hide analysis features when open result dialog + Хаваць элементы аналізу пры адкрыцці дыялогавага акна вынікаў @@ -1385,11 +1382,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Двайковы файл + Двайковы файл '%1' не існуе! Калі ласка, пакажыце іншы файл. @@ -1573,11 +1570,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Двайковы файл + Двайковы файл '%1' не існуе! Калі ласка, пакажыце іншы файл. @@ -1680,11 +1677,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - Паказаны двайковы файл z88r + Паказаны двайковы файл z88r '%1' не існуе! Калі ласка, пакажыце іншы файл. @@ -1865,7 +1862,7 @@ Specify another file please. Input error - Input error + Памылка ўводу @@ -1881,7 +1878,7 @@ Specify another file please. Analysis feature parameters - Analysis feature parameters + Налады элементаў аналізу @@ -2037,7 +2034,7 @@ Specify another file please. Only one type of selection (vertex,face or edge) per analysis feature allowed! - Only one type of selection (vertex,face or edge) per analysis feature allowed! + Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага элементу аналіза! @@ -2066,7 +2063,7 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага элементу аналіза! @@ -2195,7 +2192,7 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага элементу аналіза! @@ -2224,7 +2221,7 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Дапускаецца толькі адзін тып выбару (вяршыня, грань ці рабро) для кожнага элементу аналіза! @@ -2312,7 +2309,7 @@ Specify another file please. Only one face can be selected for a plane multi-point constraint! - Only one face can be selected for a plane multi-point constraint! + Для шматкропкавага абмежавання плоскасці можа быць абраная толькі адна грань! @@ -2436,7 +2433,7 @@ Specify another file please. Analysis feature update error - Analysis feature update error + Памылка абнаўлення элементаў аналізу @@ -2467,17 +2464,18 @@ Specify another file please. Only one face for rectangular local coordinate system! - Only one face for rectangular local coordinate system! + Толькі адна грань для прастакутнай лакальнай сістэмы каардынат! Only one face for local coordinate system! - Only one face for local coordinate system! + Толькі адна грань для лакальнай сістэмы каардынат! Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface - Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Можна абраць толькі пераўтваральныя грані! +Спачатку дадайце межавую ўмову зрушэння да паверхні, потым прымяніце абмежаванне да паверхні @@ -3054,7 +3052,7 @@ Specify another file please. Analysis feature properties - Analysis feature properties + Уласцівасці элементаў аналізу @@ -3121,17 +3119,17 @@ with a harmonic/oscillating driving force Whether the boundary condition defines a constant potential - Whether the boundary condition defines a constant potential + Калі межавая ўмова вызначае пастаянны патэнцыял Whether the boundary condition defines a farfield potential - Whether the boundary condition defines a farfield potential + Калі межавая ўмова вызначае патэнцыял дальняга полю Whether the boundary condition is for the electric force - Whether the boundary condition is for the electric force + Калі межавая ўмова для электрастатычнай сілы @@ -3394,7 +3392,7 @@ Note: has no effect if a solid was selected Current density: - Бягучая шчыльнасць току: + Шчыльнасць току: @@ -3690,17 +3688,17 @@ Note: for 2D only setting for x is possible, Contact constraint - Contact constraint + Абмежаванне кантакту Displacement boundary condition - Displacement boundary condition + Межавая ўмову зрушэння Fixed boundary condition - Fixed boundary condition + Фіксаваная межавая ўмова @@ -3710,37 +3708,37 @@ Note: for 2D only setting for x is possible, Force load - Force load + Сілавая нагрузка Heat flux load - Heat flux load + Нагрузка на цеплавы паток Plane multi-point constraint - Plane multi-point constraint + Абмежаванне шматкропкавай плоскасці Pressure load - Pressure load + Нагрузка ціску Temperature boundary condition - Temperature boundary condition + Межавая ўмова тэмпературы Local coordinate system - Local coordinate system + Лакальная сістэма каардынат Edit analysis feature - Edit analysis feature + Змяніць элемент аналізу @@ -4091,7 +4089,7 @@ For possible variables, see the description box below. Analysis features - Analysis features + Элементы аналізу @@ -4119,7 +4117,7 @@ For possible variables, see the description box below. Box - Box + Каробка @@ -4260,7 +4258,7 @@ For possible variables, see the description box below. Distance - Адлегласць + Distance @@ -4580,7 +4578,7 @@ normal vector of the face is used as direction Task Fem Heat flux Load - Task Fem Heat flux Load + Задача МКЭ нагрузкі цеплавым патокам @@ -5223,72 +5221,72 @@ used for the Elmer solver Electrostatic boundary conditions - Electrostatic boundary conditions + Электрастатычныя межавыя ўмовы &Electrostatic boundary conditions - &Electrostatic boundary conditions + &Электрастатычныя межавыя ўмовы Fluid boundary conditions - Fluid boundary conditions + Межавыя ўмовы вадкасці &Fluid boundary conditions - &Fluid boundary conditions + &Межавыя ўмовы вадкасці Electromagnetic boundary conditions - Electromagnetic boundary conditions + Электрамагнетычныя межавыя ўмовы &Electromagnetic boundary conditions - &Electromagnetic boundary conditions + &Электрамагнетычныя межавыя ўмовы Geometrical analysis features - Geometrical analysis features + Геаметрычныя элементы аналізу &Geometrical analysis features - &Geometrical analysis features + &Геаметрычныя элементы аналізу Mechanical boundary conditions and loads - Mechanical boundary conditions and loads + Механічныя межавыя ўмовы і нагрузкі &Mechanical boundary conditions and loads - &Mechanical boundary conditions and loads + &Механічныя межавыя ўмовы і нагрузкі Thermal boundary conditions and loads - Thermal boundary conditions and loads + Цеплавыя межавыя ўмовы і нагрузкі &Thermal boundary conditions and loads - &Thermal boundary conditions and loads + &Цеплавыя межавыя ўмовы і нагрузкі Analysis features without solver - Analysis features without solver + Элементы аналізу без сродку рашэння &Analysis features without solver - &Analysis features without solver + &Элементы аналізу без сродку рашэння @@ -5303,7 +5301,7 @@ used for the Elmer solver Mesh - Mesh + Паліганальная сетка @@ -5403,7 +5401,7 @@ used for the Elmer solver Removes all clipping planes - Removes all clipping planes + Выдаліць усе плоскасці перасеку @@ -5555,12 +5553,12 @@ used for the Elmer solver Open FEM examples - Адчыніць прыклады МКЭ + Адчыняе прыклады МКЭ Opens the FEM examples - Opens the FEM examples + Адчыніць прыклады МКЭ @@ -5638,7 +5636,7 @@ used for the Elmer solver Converts the surface of a FEM mesh to a mesh - Converts the surface of a FEM mesh to a mesh + Пераўтварае паверхню паліганальнай сеткі МКЭ у паліганальную сетку @@ -5664,7 +5662,7 @@ used for the Elmer solver Clears the Mesh of a FEM mesh object - Clears the Mesh of a FEM mesh object + Ачышчае паліганальную сетку аб'екта паліганальнай сеткі МКЭ @@ -5677,7 +5675,7 @@ used for the Elmer solver Displays FEM mesh information - Displays FEM mesh information + Адлюстроўвае інфармацыю аб паліганальнай сетцы МКЭ @@ -5690,7 +5688,7 @@ used for the Elmer solver Creates a FEM mesh from a shape by Gmsh mesher - Creates a FEM mesh from a shape by Gmsh mesher + Стварае паліганальную сетку МКЭ ад фігуры, якая створаная стваральнікам паліганальных сетак Gmsh @@ -5716,7 +5714,7 @@ used for the Elmer solver Creates a FEM mesh from a solid or face shape by Netgen internal mesher - Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Стварае паліганальную сетку МКЭ з суцэльнага цела ці грані фігуры з дапамогай унутранага стваральніка паліганальных сетак Netgen @@ -6083,7 +6081,7 @@ Please select a result type first. Electromagnetic boundary conditions - Electromagnetic boundary conditions + Электрамагнетычныя межавыя ўмовы @@ -6257,7 +6255,7 @@ Please select a result type first. Fem - Fem + МКЭ @@ -6288,12 +6286,12 @@ Please select a result type first. Body heat source - Body heat source + Крыніца цяпла цела Creates a body heat source - Creates a body heat source + Стварае крыніцу цяпла цела @@ -6301,12 +6299,12 @@ Please select a result type first. Centrifugal load - Centrifugal load + Цэнтрабежная нагрузка Creates a centrifugal load - Creates a centrifugal load + Стварае цэнтрабежную нагрузку @@ -6314,12 +6312,12 @@ Please select a result type first. Current density boundary condition - Current density boundary condition + Межавае ўмова шчыльнасці току Creates a current density boundary condition - Creates a current density boundary condition + Стварае межавую ўмову шчыльнасці току @@ -6327,12 +6325,12 @@ Please select a result type first. Electrostatic potential boundary condition - Electrostatic potential boundary condition + Межавая ўмова электрастатычнага патэнцыялу Creates an electrostatic potential boundary condition - Creates an electrostatic potential boundary condition + Стварае межавую ўмову электрастатычнага патэнцыялу @@ -6340,12 +6338,12 @@ Please select a result type first. Flow velocity boundary condition - Flow velocity boundary condition + Межавая ўмова хуткасці патоку Creates a flow velocity boundary condition - Creates a flow velocity boundary condition + Стварае межавую ўмову хуткасці патоку @@ -6353,12 +6351,12 @@ Please select a result type first. Initial flow velocity condition - Initial flow velocity condition + Пачатковае ўмова хуткасці патоку Creates initial flow velocity condition - Creates initial flow velocity condition + Стварае пачатковую ўмову хуткасці патоку @@ -6366,12 +6364,12 @@ Please select a result type first. Initial pressure condition - Initial pressure condition + Пачатковая ўмова ціску Creates an initial pressure condition - Creates an initial pressure condition + Стварае пачатковую ўмову ціску @@ -6379,12 +6377,12 @@ Please select a result type first. Magnetization boundary condition - Magnetization boundary condition + Межавае ўмова намагнічанасці Creates a magnetization boundary condition - Creates a magnetization boundary condition + Стварае межавую ўмову намагнічанасці @@ -6392,12 +6390,12 @@ Please select a result type first. Section print feature - Section print feature + Функцыя друку перасеку Creates a section print feature - Creates a section print feature + Стварае функцыю друку перасеку @@ -6405,12 +6403,12 @@ Please select a result type first. Gravity load - Gravity load + Гравітацыйная нагрузка Creates a gravity load - Creates a gravity load + Стварае гравітацыйную нагрузку @@ -6418,12 +6416,12 @@ Please select a result type first. Tie constraint - Tie constraint + Абмежаванне сувязі Creates a tie constraint - Creates a tie constraint + Стварае абмежаванне сувязі diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts index 90dce6ba36..a176b90167 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ca.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts index 0675cbef48..3cb24aaee5 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_cs.ts @@ -1023,7 +1023,7 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,7 +1125,7 @@ budou sloučeny, aby byly hranice objemu neviditelné. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Nechte aplikaci spravovat (vytvářet, mazat) pracovní adresáře pro všechny řešitele. Použijte dočasné adresáře. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,7 +1391,7 @@ přidání nádoby na analýzu - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,7 +1583,7 @@ Pokud není zaškrtnuto, budou seřazeny podle jména. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,7 +1695,7 @@ iterativní řešitel a zobrazí se chybová zpráva - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. @@ -3260,12 +3260,12 @@ Poznámka: nemá žádný účinek, pokud bylo vybráno těleso Capacity Body: Enabled by 'Calculate Capacity Matrix' in Electrostatic equation - Kapacita těla: + Kapacita tělesa: Counter of the body (or face) with a capacitance - Pult těla (nebo obličeje) s kapacitou + Čítač tělesa (nebo plochy) s kapacitou @@ -4278,7 +4278,7 @@ Možné proměnné naleznete v popisném poli níže. Distance - Vzdálenost + Distance @@ -5328,7 +5328,7 @@ používá se pro řešič Elmer Mesh - Mesh + Síť @@ -5348,7 +5348,7 @@ používá se pro řešič Elmer Results - Results + Výsledky @@ -6317,12 +6317,12 @@ Nejprve prosím vyberte typ výsledku. Body heat source - Body heat source + Zdroj tepla tělesa Creates a body heat source - Creates a body heat source + Vytvoří zdroj tepla tělesa diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts index a8090ceeea..7111163939 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_de.ts @@ -227,12 +227,12 @@ Spring - Spring + Feder Creates a spring acting on a face - Creates a spring acting on a face + Erstellt eine Feder, die auf eine Fläche wirkt @@ -1022,11 +1022,14 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Die angegebene ausführbare Datei '%1' existiert nicht. Bitte gib einen anderen Dateinamen an. + Die angegebene ausführbare Datei +'%1' + existiert nicht! +Bitte eine andere Datei angeben. @@ -1121,11 +1124,11 @@ verarbeiteten Mesh-Volume-Bereiche werden zusammengeführt, um die Volume-Grenze - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Die angegebene ausführbare Datei + Die angegebene ausführbare Datei '%1' existiert nicht! Bitte eine andere Datei angeben. @@ -1246,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Lasse die Anwendung die Arbeitsverzeichnisse für alle Solver verwalten (erstellen, löschen). Es werden temporäre Verzeichnisse verwenden. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1381,15 +1384,18 @@ adding an analysis container File does not exist - Datei nicht gefunden + Datei existiert nicht - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Die angegebene ausführbare Datei '%1' existiert nicht. Bitte gib einen anderen Dateinamen an. + Die angegebene ausführbare Datei +'%1' + existiert nicht! +Bitte eine andere Datei angeben. @@ -1569,11 +1575,14 @@ Wenn deaktiviert, werden sie nach ihrem Namen sortiert. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Die angegebene ausführbare Datei '%1' existiert nicht. Bitte gib einen anderen Dateinamen an. + Die angegebene ausführbare Datei +'%1' + existiert nicht! +Bitte eine andere Datei angeben. @@ -1662,7 +1671,7 @@ You might need to increase this when using an iterative solver and you get the error message that "MAXKOI" needs to be increased. Maximale Plätze im Zufallsvektor. -(Anzahl der Knoten pro Element multipliziert +(Anzahl der Knoten pro Element multipliziert mit Anzahl der Finiten Elementen) Eventuell ist eine Erweiterung der Plätze nötig, wenn ein @@ -1672,11 +1681,11 @@ iterativen Löser eingesetzt wird und die Fehlermeldung File does not exist - Datei existiert nicht + Datei nicht gefunden - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. @@ -2027,7 +2036,7 @@ Bitte eine andere Datei angeben. Selected object is not a part! - Ausgewähltes Objekt ist kein Part! + Ausgewähltes Objekt ist kein Teil! @@ -2056,7 +2065,7 @@ Bitte eine andere Datei angeben. Selected object is not a part! - Ausgewähltes Objekt ist kein Teilobjekt! + Ausgewähltes Objekt ist kein Part! @@ -2149,17 +2158,17 @@ Bitte eine andere Datei angeben. Only one planar face or edge can be selected! - Nur eine flache Fläche oder Kante kann ausgewählt werden! + Es kann nur eine ebene Fläche oder eine Kante ausgewählt werden! Only planar faces can be picked for 3D - Nur flache Flächen können für 3D ausgewählt werden + Es können nur ebene Flächen für 3D ausgewählt werden Only planar edges can be picked for 2D - Nur flache Kanten können für 2D ausgewählt werden + Es können nur ebene Flächen für 2D ausgewählt werden @@ -2185,7 +2194,7 @@ Bitte eine andere Datei angeben. Selected object is not a part! - Ausgewähltes Objekt ist kein Teil! + Ausgewähltes Objekt ist kein Teilobjekt! @@ -3370,7 +3379,7 @@ Hinweis: hat keinen Effekt, wenn ein Volumen ausgewählt wurde Label - Bezeichnung + Beschriftung @@ -4048,7 +4057,7 @@ Siehe das nachfolgende Beschreibungsfeld für mögliche Variablen. x - х + x @@ -4253,7 +4262,7 @@ Siehe das nachfolgende Beschreibungsfeld für mögliche Variablen. Location - Ort + Lage @@ -4576,7 +4585,7 @@ Normalenvektors der Fläche wird als Richtung verwendet Reverse direction - Richtung umkehren + Umgekehrte Richtung @@ -4919,7 +4928,7 @@ für den Löser Elmer verwendet werden x - x + х @@ -6195,7 +6204,7 @@ Bitte wählen Sie zuerst einen Ergebnistyp. x - х + x @@ -6248,7 +6257,7 @@ Bitte wählen Sie zuerst einen Ergebnistyp. Center - Zentrum + Mitte @@ -6414,12 +6423,12 @@ Bitte wählen Sie zuerst einen Ergebnistyp. Gravity load - Gravity load + Schwerkraft-Last Creates a gravity load - Creates a gravity load + Erstellt eine aus der Schwerkraft resultierende Last diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts index aef65e215f..283d754b7e 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_el.ts @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1124,11 +1124,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Αφήστε την εφαρμογή να διαχειριστεί (δημιουργία, διαγραφή) τους καταλόγους εργασίας για όλους τους λύτες. Χρησιμοποιήστε προσωρινούς καταλόγους. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1390,11 +1390,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1582,11 +1582,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1677,11 +1677,11 @@ You might need to increase this when using an iterative solver and you get the error message that "MAXKOI" needs to be increased. Μέγιστες θέσεις σε τυχαίο διάνυσμα. -(αριθμός κόμπων ανά στοιχείο επί τον +(αριθμός κόμπων ανά στοιχείο επί τον αριθμό των πεπερασμένων στοιχείων) Ίσως, χρειαστεί να το αυξήσετε όταν χρησιμοποιείτε -έναν επαναληπτικό λύτη όταν λαμβάνετε το μήνυμα +έναν επαναληπτικό λύτη όταν λαμβάνετε το μήνυμα σφάλματος ότι πρέπει να αυξηθεί το "MAXKOI". @@ -1691,11 +1691,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts index 26fbe7e17f..3a862cf12f 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_es-AR.ts @@ -11,7 +11,7 @@ Bearing constraint - Bearing constraint + Restricción de rodamiento @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Crea una condición límite fija para una entidad geométrica @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Crea una carga de fuerza aplicada a una entidad geométrica @@ -137,7 +137,7 @@ Heat flux load - Heat flux load + Carga de flujo calorífico @@ -155,7 +155,7 @@ Initial temperature - Initial temperature + Temperatura Inicial @@ -178,7 +178,7 @@ Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Crea una restricción plano de multipunto para una cara @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Crea una carga de presión actuando sobre una cara @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + restricción de polea Creates a pulley constraint - Creates a pulley constraint + Crear una restriccíón de polea @@ -227,12 +227,12 @@ Spring - Spring + Resorte Creates a spring acting on a face - Creates a spring acting on a face + Crea un resorte que actúa sobre una cara @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1124,11 +1124,11 @@ se fusionarán para que los límites de volumen sean invisibles. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Permitir que la apliación administre (crear, eliminar) el directorio funcionando para todos los solucionadores. Usar directorios temporales. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1347,7 +1347,7 @@ when the results dialog is opened Default solver to be added when adding an analysis container - Solver por defecto a ser añadido al + Solver por defecto a ser añadido al añadir un contenedor de análisis @@ -1390,11 +1390,11 @@ añadir un contenedor de análisis - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1582,11 +1582,11 @@ Si no están marcadas, serán ordenadas por su nombre. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1694,11 +1694,11 @@ de que "MAXKOI" necesita ser aumentado. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - El ejecutable z88r especificado + El ejecutable z88r especificado '%1' no existe! Especifique otro archivo, por favor. @@ -3732,7 +3732,7 @@ Nota: para 2D solo la configuración para x es posible, Heat flux load - Heat flux load + Carga de flujo calorífico @@ -4108,7 +4108,7 @@ Para posibles variables, vea el cuadro de descripción a continuación. Analysis features - Analysis features + Funciones de análisis @@ -4389,7 +4389,7 @@ para el solver Elmer surface force (and thus displacement) generated by the flow (Option only applies for Elmer solver) - La solución de flujo se utiliza para determinar + La solución de flujo se utiliza para determinar la fuerza de superficie (y por lo tanto el desplazamiento) generada por el flujo (la opción solo se aplica para el solver Elmer) @@ -5519,7 +5519,7 @@ usada por el solver Elmer Creates a FEM equation for elasticity (stress) - Crea una ecuación FEM para + Crea una ecuación FEM para elasticidad (estrés) @@ -6094,7 +6094,7 @@ Por favor, primero seleccione un tipo de resultado. Creates a FEM equation for 2D magnetodynamic forces - Crea una ecuación FEM + Crea una ecuación FEM para fuerzas magnetodinámicas 2D @@ -6123,7 +6123,7 @@ para fuerzas magnetodinámicas 2D Creates a FEM equation for magnetodynamic forces - Crea una ecuación FEM para + Crea una ecuación FEM para fuerzas magnetodinámicas @@ -6205,7 +6205,7 @@ fuerzas magnetodinámicas Creates a FEM equation for deformation (nonlinear elasticity) - Crea una ecuación FEM para + Crea una ecuación FEM para deformación (elasticidad no lineal) @@ -6394,7 +6394,7 @@ deformación (elasticidad no lineal) Initial pressure condition - Initial pressure condition + Condición de presión inicial @@ -6433,12 +6433,12 @@ deformación (elasticidad no lineal) Gravity load - Gravity load + Carga de gravedad Creates a gravity load - Creates a gravity load + Crea una carga de gravedad diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts index ad0f0998a6..ee7f74ee6d 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_es-ES.ts @@ -11,7 +11,7 @@ Bearing constraint - Bearing constraint + Restricción de rodamiento @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Crea una condición límite fija para una entidad geométrica @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Crea una carga de fuerza aplicada a una entidad geométrica @@ -137,7 +137,7 @@ Heat flux load - Heat flux load + Carga de flujo calorífico @@ -155,7 +155,7 @@ Initial temperature - Initial temperature + Temperatura Inicial @@ -178,7 +178,7 @@ Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Crea una restricción plano de multipunto para una cara @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Crea una carga de presión actuando sobre una cara @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + restricción de polea Creates a pulley constraint - Creates a pulley constraint + Crear una restriccíón de polea @@ -227,12 +227,12 @@ Spring - Spring + Resorte Creates a spring acting on a face - Creates a spring acting on a face + Crea un resorte que actúa sobre una cara @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1124,11 +1124,11 @@ se fusionarán para que los límites de volumen sean invisibles. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Permitir que la apliación administre (crear, eliminar) el directorio funcionando para todos los solucionadores. Usar directorios temporales. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1347,7 +1347,7 @@ when the results dialog is opened Default solver to be added when adding an analysis container - Solver por defecto a ser añadido al + Solver por defecto a ser añadido al añadir un contenedor de análisis @@ -1390,11 +1390,11 @@ añadir un contenedor de análisis - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1582,11 +1582,11 @@ Si no están marcadas, serán ordenadas por su nombre. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - El ejecutable especificado + El ejecutable especificado '%1' no existe! Por favor, especifique otro archivo. @@ -1694,11 +1694,11 @@ de que "MAXKOI" necesita ser aumentado. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - El ejecutable z88r especificado + El ejecutable z88r especificado '%1' no existe! Especifique otro archivo, por favor. @@ -3732,7 +3732,7 @@ Nota: para 2D solo la configuración para x es posible, Heat flux load - Heat flux load + Carga de flujo calorífico @@ -4108,7 +4108,7 @@ Para posibles variables, vea el cuadro de descripción a continuación. Analysis features - Analysis features + Funciones de análisis @@ -4389,7 +4389,7 @@ para el solver Elmer surface force (and thus displacement) generated by the flow (Option only applies for Elmer solver) - La solución de flujo se utiliza para determinar + La solución de flujo se utiliza para determinar la fuerza de superficie (y por lo tanto el desplazamiento) generada por el flujo (la opción solo se aplica para el solver Elmer) @@ -5519,7 +5519,7 @@ usada por el solver Elmer Creates a FEM equation for elasticity (stress) - Crea una ecuación FEM para + Crea una ecuación FEM para elasticidad (estrés) @@ -6094,7 +6094,7 @@ Por favor, primero seleccione un tipo de resultado. Creates a FEM equation for 2D magnetodynamic forces - Crea una ecuación FEM + Crea una ecuación FEM para fuerzas magnetodinámicas 2D @@ -6123,7 +6123,7 @@ para fuerzas magnetodinámicas 2D Creates a FEM equation for magnetodynamic forces - Crea una ecuación FEM para + Crea una ecuación FEM para fuerzas magnetodinámicas @@ -6205,7 +6205,7 @@ fuerzas magnetodinámicas Creates a FEM equation for deformation (nonlinear elasticity) - Crea una ecuación FEM para + Crea una ecuación FEM para deformación (elasticidad no lineal) @@ -6394,7 +6394,7 @@ deformación (elasticidad no lineal) Initial pressure condition - Initial pressure condition + Condición de presión inicial @@ -6433,12 +6433,12 @@ deformación (elasticidad no lineal) Gravity load - Gravity load + Carga de gravedad Creates a gravity load - Creates a gravity load + Crea una carga de gravedad diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts index 96d2a3ef6a..0bcf01dc7f 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_eu.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Kojinete-murrizketa Creates a bearing constraint - Creates a bearing constraint + Kojinete-murrizketa sortzen du @@ -29,12 +29,12 @@ Contact constraint - Contact constraint + Kontaktu-murrizketa Creates a contact constraint between faces - Creates a contact constraint between faces + Aurpegien arteko kontaktu-murrizketa sortzen du @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + Desplazamenduaren muga-baldintza bat sortzen du entitate geometriko baterako @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Muga finkoaren baldintza bat sortzen du entitate geometriko baterako @@ -83,12 +83,12 @@ Fluid boundary condition - Jariakin-mugen baldintza + Jariakinen muga-baldintza Create fluid boundary condition on face entity for Computional Fluid Dynamics - Sortu jariakin-mugen baldintza aurpegi-entitatean, Ordenagailu bidezko Jariakinen Dinamikarako + Sortu jariakinen muga-baldintza aurpegi-entitatean, Ordenagailu bidezko Jariakinen Dinamikarako @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Entitate geometriko bati aplikatutako indar-karga bat sortzen du @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Engranaje-murrizketa Creates a gear constraint - Creates a gear constraint + Engranaje-murrizketa sortzen du @@ -137,12 +137,12 @@ Heat flux load - Heat flux load + Bero-fluxuaren karga Creates a heat flux load acting on a face - Creates a heat flux load acting on a face + Aurpegi batean eragiten duen bero-fluxuaren karga bat sortzen du @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + Hasierako tenperatura Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + Hasierako tenperatura bat sortzen du gorputz baterako @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + Planoaren puntu anitzeko murrizketa Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Planoaren puntu anitzeko murrizketa bat sortzen du aurpegi baterako @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Aurpegi batean eragiten duen presio-karga bat sortzen du @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Polea-murrizketa Creates a pulley constraint - Creates a pulley constraint + Polea-murrizketa sortzen du @@ -227,12 +227,12 @@ Spring - Spring + Malgukia Creates a spring acting on a face - Creates a spring acting on a face + Aurpegi batean eragiten duen malguki bat sortzen du @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + Aurpegi batean eragiten duen tenperaturaren/bero-fluxu kontzentratuaren karga bat sortzen du @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Sortu koordenatuen sistema lokala aurpegi batean @@ -591,77 +591,77 @@ Create fluid boundary condition - Sortu jariakin-mugen baldintza + Sortu jariakinen muga-baldintza Make bearing constraint - Make bearing constraint + Sortu kojinete-murrizketa Make contact constraint on a face - Make contact constraint on a face + Sortu kontaktu-murrizketa aurpegi batean Make displacement boundary condition on face - Make displacement boundary condition on face + Sortu desplazamenduaren muga-baldintza aurpegian Make fixed boundary condition for geometry - Make fixed boundary condition for geometry + Sortu muga finkoaren baldintza geometriarako Make force load on geometry - Make force load on geometry + Sortu indar-karga geometrian Make gear constraint - Make gear constraint + Sortu engranaje-murrizketa Make heat flux load on face - Make heat flux load on face + Sortu bero-fluxuaren karga aurpegian Make initial temperature condition on body - Make initial temperature condition on body + Sortu hasierako tenperatura-baldintza gorputzean Make plane multi-point constraint on face - Make plane multi-point constraint on face + Sortu planoaren puntu anitzeko murrizketa aurpegian Make pressure load on face - Make pressure load on face + Sortu presio-karga aurpegian Make spring on face - Make spring on face + Sortu malgukia aurpegian Make pulley constraint - Make pulley constraint + Sortu polea-murrizketa Make temperature boundary condition on face - Make temperature boundary condition on face + Sortu tenperaturaren muga-baldintza aurpegian Make local coordinate system on face - Make local coordinate system on face + Sortu koordenatuen sistema lokala aurpegian @@ -1023,11 +1023,11 @@ hasierako tenperatura: - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Zehaztutako exekutagarria: + Zehaztutako exekutagarria: '%1' ez da existitzen. Zehaztu beste fitxategi bat. @@ -1125,11 +1125,11 @@ fusionatuko dira bolumenaren mugak ikusgai izan daitezen. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Zehaztutako exekutagarria: + Zehaztutako exekutagarria: '%1' ez da existitzen. Zehaztu beste fitxategi bat. @@ -1221,10 +1221,10 @@ aurpegienak ez diren ertzak eta bolumenenak ez diren aurpegiak soilik. - Mesh groups are exported too. -Every analysis feature and, if there are different materials, -material consists of two mesh groups, faces and nodes where -the constraint or material is applied. + Amaraun-taldeak ere esportatzen dira. +Analisi-elementu guztiak eta, material desberdinak badaude, material +guztiak ere, bi amaraun-taldez, aurpegiz eta nodoz osatuta daude, +non murrizketa edo materiala aplikatzen den. @@ -1251,8 +1251,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Utzi aplikazioari ebazle guztien laneko direktorioak kudeatzen (sortzen, ezabatzen). Erabili aldi baterako direktorioak. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1327,13 +1327,13 @@ azken ezarpenekin irekiko da All analysis features are hidden in the model view when the results dialog is opened - All analysis features are hidden in the model view -when the results dialog is opened + Emaitzen elkarrizketa-koadroa irekitzen denean, +analisi-elementu guztiak ezkutatuta daude eredu-bistan Hide analysis features when open result dialog - Hide analysis features when open result dialog + Ezkutatu analisi-elementuak emaitzen elkarrizketa-koadroa irekitzean @@ -1392,11 +1392,11 @@ gehituko den ebazle lehenetsia - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Zehaztutako exekutagarria: + Zehaztutako exekutagarria: '%1' ez da existitzen. Zehaztu beste fitxategi bat. @@ -1584,11 +1584,11 @@ Hau ez badago markatuta, izenaren arabera ordenatuko dira. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Zehaztutako exekutagarria: + Zehaztutako exekutagarria: '%1' ez da existitzen. Zehaztu beste fitxategi bat. @@ -1696,11 +1696,11 @@ mezu bat jaso daiteke. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - Zehaztutako z88r exekutagarria: + Zehaztutako z88r exekutagarria: '%1' ez da existitzen. Zehaztu beste fitxategi bat. @@ -1897,7 +1897,7 @@ Zehaztu beste fitxategi bat. Analysis feature parameters - Analysis feature parameters + Analisi-elementuaren parametroak @@ -2053,7 +2053,7 @@ Zehaztu beste fitxategi bat. Only one type of selection (vertex,face or edge) per analysis feature allowed! - Only one type of selection (vertex,face or edge) per analysis feature allowed! + Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da analisi-elementu bakoitzeko @@ -2082,7 +2082,7 @@ Zehaztu beste fitxategi bat. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da analisi-elementu bakoitzeko @@ -2211,7 +2211,7 @@ Zehaztu beste fitxategi bat. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da analisi-elementu bakoitzeko @@ -2240,7 +2240,7 @@ Zehaztu beste fitxategi bat. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Hautapen mota bakarra (erpina, aurpegia edo ertza) onartzen da analisi-elementu bakoitzeko @@ -2328,7 +2328,7 @@ Zehaztu beste fitxategi bat. Only one face can be selected for a plane multi-point constraint! - Only one face can be selected for a plane multi-point constraint! + Aurpegi bakarra hautatu daiteke planoaren puntu anitzeko murrizketa baterako! @@ -2452,7 +2452,7 @@ Zehaztu beste fitxategi bat. Analysis feature update error - Analysis feature update error + Analisi-elementuaren eguneratze-errorea @@ -2483,17 +2483,17 @@ Zehaztu beste fitxategi bat. Only one face for rectangular local coordinate system! - Only one face for rectangular local coordinate system! + Aurpegi bakar bat koordenatuen sistema lokal laukizuzen bakoizeko! Only one face for local coordinate system! - Only one face for local coordinate system! + Aurpegi bakar bat koordenatuen sistema lokal bakoizeko! Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface - Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Aurpegi transformagarriak soilik hautatu daitezke! Aplikatu desplazamenduaren muga-baldintza gainazalari lehenengo, gero aplikatu koordenatu-sistema gainazalari @@ -3070,7 +3070,7 @@ Zehaztu beste fitxategi bat. Analysis feature properties - Analysis feature properties + Analisi-elementuaren propietateak @@ -3138,17 +3138,17 @@ duten ekuazioetan soilik erabiltzen da Whether the boundary condition defines a constant potential - Whether the boundary condition defines a constant potential + Muga-baldintzak potentzial-konstante bat definitzen duen ala ez Whether the boundary condition defines a farfield potential - Whether the boundary condition defines a farfield potential + Muga-baldintzak urruneko eremuko potentzial bat definitzen duen ala ez Whether the boundary condition is for the electric force - Whether the boundary condition is for the electric force + Muga-baldintza indar elektrikorako den ala ez @@ -3709,57 +3709,57 @@ Oharra: 2D kasuetan soilik, X-en ezarpena posible da, Contact constraint - Contact constraint + Kontaktu-murrizketa Displacement boundary condition - Displacement boundary condition + Desplazamenduaren muga-baldintza Fixed boundary condition - Fixed boundary condition + Muga finkoaren baldintza Fluid boundary condition - Jariakin-mugen baldintza + Jariakinen muga-baldintza Force load - Force load + Indar-karga Heat flux load - Heat flux load + Bero-fluxuaren karga Plane multi-point constraint - Plane multi-point constraint + Planoaren puntu anitzeko murrizketa Pressure load - Pressure load + Presio-karga Temperature boundary condition - Temperature boundary condition + Tenperaturaren muga-baldintza Local coordinate system - Local coordinate system + Koordenatuen sistema lokala Edit analysis feature - Edit analysis feature + Editatu analisi-elementua @@ -4110,7 +4110,7 @@ Balizko aldagaietarako, ikusi beheko deskribapen-koadroa. Analysis features - Analysis features + Analisi-elementuak @@ -4605,7 +4605,7 @@ norabidea erabiliko da norabide gisa Task Fem Heat flux Load - Task Fem Heat flux Load + FEM ataza bero-fluxuaren karga @@ -5249,72 +5249,72 @@ Elmer ebazlean Electrostatic boundary conditions - Electrostatic boundary conditions + Muga-baldintza elektrostatikoak &Electrostatic boundary conditions - &Electrostatic boundary conditions + Muga-baldintza elektro&statikoak Fluid boundary conditions - Fluid boundary conditions + Jariakinen muga-baldintzak &Fluid boundary conditions - &Fluid boundary conditions + &Jariakinen muga-baldintzak Electromagnetic boundary conditions - Electromagnetic boundary conditions + Muga-baldintza elektromagnetikoak &Electromagnetic boundary conditions - &Electromagnetic boundary conditions + Muga-baldintza elektro&magnetikoak Geometrical analysis features - Geometrical analysis features + Analisi-elementu geometrikoak &Geometrical analysis features - &Geometrical analysis features + Analisi-elementu &geometrikoak Mechanical boundary conditions and loads - Mechanical boundary conditions and loads + Muga-baldintza eta karga mekanikoak &Mechanical boundary conditions and loads - &Mechanical boundary conditions and loads + &Muga-baldintza eta karga mekanikoak Thermal boundary conditions and loads - Thermal boundary conditions and loads + Muga-baldintza eta karga termikoak &Thermal boundary conditions and loads - &Thermal boundary conditions and loads + Muga-baldintza eta karga &termikoak Analysis features without solver - Analysis features without solver + Ebazlerik gabeko analisi-elementuak &Analysis features without solver - &Analysis features without solver + &Ebazlerik gabeko analisi-elementuak @@ -5429,7 +5429,7 @@ Elmer ebazlean Removes all clipping planes - Removes all clipping planes + Ebaketa-plano guztiak kentzen ditu @@ -5521,7 +5521,7 @@ Elmer ebazlean Creates a FEM equation for elasticity (stress) - FEM ekuazio bat sortzen du + FEM ekuazio bat sortzen du elastikotasunerako (estreserako) @@ -5587,7 +5587,7 @@ elastikotasunerako (estreserako) Opens the FEM examples - Opens the FEM examples + FEM adibideak irekitzen ditu @@ -5665,7 +5665,7 @@ elastikotasunerako (estreserako) Converts the surface of a FEM mesh to a mesh - Converts the surface of a FEM mesh to a mesh + FEM amaraun baten azalera amaraun bihurtzen du @@ -5691,7 +5691,7 @@ elastikotasunerako (estreserako) Clears the Mesh of a FEM mesh object - Clears the Mesh of a FEM mesh object + FEM amaraun-objektu baten amarauna garbitzen du @@ -5704,7 +5704,7 @@ elastikotasunerako (estreserako) Displays FEM mesh information - Displays FEM mesh information + FEM amaraunaren informazioa bistaratzen du @@ -5717,7 +5717,7 @@ elastikotasunerako (estreserako) Creates a FEM mesh from a shape by Gmsh mesher - Creates a FEM mesh from a shape by Gmsh mesher + FEM amaraun bat sortzen du forma batetik abiatuz, Gmsh sare-sortzailea erabiliz @@ -5743,7 +5743,7 @@ elastikotasunerako (estreserako) Creates a FEM mesh from a solid or face shape by Netgen internal mesher - Creates a FEM mesh from a solid or face shape by Netgen internal mesher + FEM amaraun bat sortzen du solido batetik edo aurpegi-forma batetik, Netgen barneko amaraun-sortzailea erabiliz @@ -6111,7 +6111,7 @@ Hasteko, hautatu emaitza mota bat. Electromagnetic boundary conditions - Electromagnetic boundary conditions + Muga-baldintza elektromagnetikoak @@ -6318,12 +6318,12 @@ deformaziorako (elastikotasun ez linealerako) Body heat source - Body heat source + Gorputz-beroaren iturburua Creates a body heat source - Creates a body heat source + Gorputz-beroaren iturburu bat sortzen du @@ -6331,12 +6331,12 @@ deformaziorako (elastikotasun ez linealerako) Centrifugal load - Centrifugal load + Karga zentrifugoa Creates a centrifugal load - Creates a centrifugal load + Karga zentrifukoa sortzen du @@ -6344,12 +6344,12 @@ deformaziorako (elastikotasun ez linealerako) Current density boundary condition - Current density boundary condition + Uneko dentsitatearen muga-baldintza Creates a current density boundary condition - Creates a current density boundary condition + Uneko dentsitatearen muga-baldintza sortzen du @@ -6357,12 +6357,12 @@ deformaziorako (elastikotasun ez linealerako) Electrostatic potential boundary condition - Electrostatic potential boundary condition + Potentzial elektrostatikoaren muga-baldintza Creates an electrostatic potential boundary condition - Creates an electrostatic potential boundary condition + Potentzial elektrostatikoaren muga-baldintza sortzen du @@ -6370,12 +6370,12 @@ deformaziorako (elastikotasun ez linealerako) Flow velocity boundary condition - Flow velocity boundary condition + Fluxu-abiaduraren muga-baldintza Creates a flow velocity boundary condition - Creates a flow velocity boundary condition + Fluxu-abiaduraren muga-baldintza sortzen du @@ -6383,12 +6383,12 @@ deformaziorako (elastikotasun ez linealerako) Initial flow velocity condition - Initial flow velocity condition + Hasierako fluxu-abiaduraren baldintza Creates initial flow velocity condition - Creates initial flow velocity condition + Hasierako fluxu-abiaduraren baldintza sortzen du @@ -6396,12 +6396,12 @@ deformaziorako (elastikotasun ez linealerako) Initial pressure condition - Initial pressure condition + Hasierako presio-baldintza Creates an initial pressure condition - Creates an initial pressure condition + Hasierako presioaren baldintza sortzen du @@ -6409,12 +6409,12 @@ deformaziorako (elastikotasun ez linealerako) Magnetization boundary condition - Magnetization boundary condition + Magnetizazioaren muga-baldintza Creates a magnetization boundary condition - Creates a magnetization boundary condition + Magnetizazioaren muga-baldintza sortzen du @@ -6422,12 +6422,12 @@ deformaziorako (elastikotasun ez linealerako) Section print feature - Section print feature + Sekzio-inprimatzearen elementua Creates a section print feature - Creates a section print feature + Sekzio-inprimatzearen elementu bat sortzen du @@ -6435,12 +6435,12 @@ deformaziorako (elastikotasun ez linealerako) Gravity load - Gravity load + Grabitate-karga Creates a gravity load - Creates a gravity load + Grabitate-karga bat sortzen du @@ -6448,12 +6448,12 @@ deformaziorako (elastikotasun ez linealerako) Tie constraint - Tie constraint + Lokarri-murrizketa Creates a tie constraint - Creates a tie constraint + Lokarri-murrizketa sortzen du diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts index 8c057f3c48..47f4cab21d 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_fi.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_fil.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_fil.ts index 57e1c2dd3a..1621018682 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_fil.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_fil.ts @@ -1003,11 +1003,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1083,11 +1083,11 @@ Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1306,11 +1306,11 @@ constraint or material is applied. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1498,11 +1498,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1610,11 +1610,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts index 3846b4501c..7a6ce787cf 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_fr.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Contrainte de roulement Creates a bearing constraint - Creates a bearing constraint + Créer une contrainte de roulement @@ -29,12 +29,12 @@ Contact constraint - Contact constraint + Contrainte de contact Creates a contact constraint between faces - Creates a contact constraint between faces + Créer une contrainte de contact entre les faces @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + Créer une condition limite de déplacement pour une entité géométrique @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Créer une condition de limite fixe pour une entité géométrique @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Créer une charge de force appliquée à une entité géométrique @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Contrainte d'engrenage Creates a gear constraint - Creates a gear constraint + Créer une contrainte d'engrenage @@ -137,12 +137,12 @@ Heat flux load - Heat flux load + Charge de flux de chaleur Creates a heat flux load acting on a face - Creates a heat flux load acting on a face + Créer une charge de flux de chaleur agissant sur une face @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + Température initiale Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + Créer une température initiale agissant sur un corps @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + Contrainte multi-points de plan Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Créer une contrainte multi-points de plan pour une face @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Créer une charge de pression agissant sur une face @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Contrainte de poulie Creates a pulley constraint - Creates a pulley constraint + Créer une contrainte de poulie @@ -227,12 +227,12 @@ Spring - Spring + Ressort Creates a spring acting on a face - Creates a spring acting on a face + Créer un ressort agissant sur une face @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + Créer une charge de température/flux de chaleur concentrée agissant sur une face @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Créer un système de coordonnées sur une face @@ -596,72 +596,72 @@ Make bearing constraint - Make bearing constraint + Faire une contrainte de roulement Make contact constraint on a face - Make contact constraint on a face + Faire une contrainte de contact sur une face Make displacement boundary condition on face - Make displacement boundary condition on face + Faire une condition limite de déplacement sur une face Make fixed boundary condition for geometry - Make fixed boundary condition for geometry + Faire une condition limite fixe pour la géométrie Make force load on geometry - Make force load on geometry + Faire une force d'effort sur la géométrie Make gear constraint - Make gear constraint + Faire une contrainte d'engrenage Make heat flux load on face - Make heat flux load on face + Faire une charge de flux de chaleur sur une face Make initial temperature condition on body - Make initial temperature condition on body + Faire une condition de température initiale sur le corps Make plane multi-point constraint on face - Make plane multi-point constraint on face + Faire une contrainte multi-points de plan sur une face Make pressure load on face - Make pressure load on face + Faire une charge de pression sur une face Make spring on face - Make spring on face + Faire un ressort sur une face Make pulley constraint - Make pulley constraint + Faire une contrainte de poulie Make temperature boundary condition on face - Make temperature boundary condition on face + Faire une condition limite de température sur une face Make local coordinate system on face - Make local coordinate system on face + Faire un système local de coordonnées sur une face @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - L'exécutable + L'exécutable '%1' spécifié n'existe pas ! Veuillez spécifiez un autre fichier. @@ -1127,11 +1127,13 @@ Remarque : pour utiliser le multithreading, spécifier ici la variante exécutab - The specified executable + The specified executable '%1' does not exist! Specify another file please. - L'exécutable '%1' spécifié n'existe pas ! + L'exécutable +'%1' + spécifié n'existe pas ! Veuillez spécifiez un autre fichier. @@ -1189,7 +1191,7 @@ FEM : seuls les éléments FEM seront exportés. Cela signifie uniquement les ar element parameter: All: all elements, highest: highest elements only, FEM: FEM elements only (only edges not belonging to faces and faces not belonging to volumes) paramètre d'élément : -Tout : tous les éléments, +Tout : tous les éléments, Le plus haut : éléments les plus élevés seulement FEM : éléments FEM seulement (uniquement les arêtes n'appartenant pas aux faces et faces n'appartenant pas aux volumes) @@ -1219,10 +1221,15 @@ FEM : éléments FEM seulement (uniquement les arêtes n'appartenant pas aux fac Every analysis feature and, if there are different materials, material consists of two mesh groups, faces and nodes where the constraint or material is applied. - Mesh groups are exported too. -Every analysis feature and, if there are different materials, -material consists of two mesh groups, faces and nodes where -the constraint or material is applied. + Les groupes de maillage sont également exportés. +Toutes les fonctionnalités d'analyses et, s'il y a des matériaux différents, +matériau se compose de deux groupes de mailles, faces et noeuds où +la contrainte ou le matériau est appliqué. + +Les groupes de maillages sont également exportés. +Chaque fonction d'analyse et matériau, s'il y a différents matériaux, +se compose de deux groupes de maillages, de faces et de nœuds +où la contrainte ou le matériau est appliqué. @@ -1249,8 +1256,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Laisser l'application gérer (créer, supprimer) les répertoires de travail pour tous les solveurs. Utiliser des répertoires temporaires. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1327,13 +1334,13 @@ derniers paramètres de la boîte de dialogue utilisés All analysis features are hidden in the model view when the results dialog is opened - All analysis features are hidden in the model view -when the results dialog is opened + Toutes les fonctions d'analyse sont cachées dans la vue du +modèle lorsque la boîte de dialogue des résultats est ouverte Hide analysis features when open result dialog - Hide analysis features when open result dialog + Masquer les fonctions d'analyse lors de l'ouverture de la boîte de dialogue des résultats @@ -1391,7 +1398,7 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1579,13 +1586,11 @@ Si elles ne sont pas cochées, elles seront triées par leur nom. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - L'exécutable -'%1' - spécifié n'existe pas ! + L'exécutable '%1' spécifié n'existe pas ! Veuillez spécifiez un autre fichier. @@ -1689,11 +1694,11 @@ indiquant que "MAXKOI" doit être augmenté. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - L'exécutable z88r + L'exécutable z88r '%1' spécifié n'existe pas! Veuillez spécifier un autre fichier. @@ -1890,7 +1895,7 @@ Veuillez spécifier un autre fichier. Analysis feature parameters - Analysis feature parameters + Paramètres des fonctions d'analyse @@ -2035,18 +2040,18 @@ Veuillez spécifier un autre fichier. Nothing selected! - Rien n'a été sélectionné ! + Aucune sélection ! Selected object is not a part! - L'objet sélectionné n'est pas une pièce ! + L'élément sélectionné n'est pas une part ! Only one type of selection (vertex,face or edge) per analysis feature allowed! - Only one type of selection (vertex,face or edge) per analysis feature allowed! + Un seul type de sélection (sommet, face ou arête) est autorisé par fonction d'analyse ! @@ -2075,7 +2080,7 @@ Veuillez spécifier un autre fichier. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Un seul type de sélection (sommet, face ou arête) est autorisé par fonction d'analyse ! @@ -2204,7 +2209,7 @@ Veuillez spécifier un autre fichier. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Un seul type de sélection (sommet, face ou arête) est autorisé par fonction d'analyse ! @@ -2233,13 +2238,13 @@ Veuillez spécifier un autre fichier. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Un seul type de sélection (sommet, face ou arête) est autorisé par fonction d'analyse ! Wrong selection - Sélection invalide + Sélection incorrecte @@ -2321,7 +2326,7 @@ Veuillez spécifier un autre fichier. Only one face can be selected for a plane multi-point constraint! - Only one face can be selected for a plane multi-point constraint! + Une seule face peut être sélectionnée pour une contrainte multi-points de plan ! @@ -2431,13 +2436,13 @@ Veuillez spécifier un autre fichier. Nothing selected! - Aucune sélection ! + Rien n'a été sélectionné ! Selected object is not a part! - L'élément sélectionné n'est pas une part ! + L'objet sélectionné n'est pas une pièce ! @@ -2445,7 +2450,7 @@ Veuillez spécifier un autre fichier. Analysis feature update error - Analysis feature update error + Erreur de la mise à jour de la fonction d'analyse @@ -2476,17 +2481,17 @@ Veuillez spécifier un autre fichier. Only one face for rectangular local coordinate system! - Only one face for rectangular local coordinate system! + Une seule face pour le système de coordonnées locales rectangulaires ! Only one face for local coordinate system! - Only one face for local coordinate system! + Une seule face pour le système de coordonnées locales ! Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface - Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Seules les faces transformables peuvent être sélectionnées ! Appliquer d'abord les conditions limites de déplacement à la surface, puis appliquer le système de coordonnées locales à la surface. @@ -3063,7 +3068,7 @@ Veuillez spécifier un autre fichier. Analysis feature properties - Analysis feature properties + Propriétés de la fonction d'analyse @@ -3131,17 +3136,17 @@ avec une force motrice harmonique ou oscillante Whether the boundary condition defines a constant potential - Whether the boundary condition defines a constant potential + Si la condition aux limites définit un potentiel constant Whether the boundary condition defines a farfield potential - Whether the boundary condition defines a farfield potential + Si la condition aux limites définit un potentiel de champ lointain Whether the boundary condition is for the electric force - Whether the boundary condition is for the electric force + Si la condition aux limites est pour la force électrique @@ -3702,17 +3707,17 @@ Remarque : pour la 2D, seul le réglage en x est possible, Contact constraint - Contact constraint + Contrainte de contact Displacement boundary condition - Displacement boundary condition + Condition limite de déplacement Fixed boundary condition - Fixed boundary condition + Condition limite fixe @@ -3722,37 +3727,37 @@ Remarque : pour la 2D, seul le réglage en x est possible, Force load - Force load + Charge d'effort Heat flux load - Heat flux load + Charge de flux de chaleur Plane multi-point constraint - Plane multi-point constraint + Contrainte multi-points de plan Pressure load - Pressure load + Charge de pression Temperature boundary condition - Temperature boundary condition + Condition limite de température Local coordinate system - Local coordinate system + Système de coordonnées locales Edit analysis feature - Edit analysis feature + Éditer la fonction d'analyse @@ -3770,7 +3775,7 @@ Remarque : pour la 2D, seul le réglage en x est possible, None - Aucun + Rien @@ -4103,7 +4108,7 @@ Pour les variables possibles, voir la zone de description ci-dessous. Analysis features - Analysis features + Fonctions d'analyse @@ -4596,7 +4601,7 @@ vecteur normal de la face est utilisée comme sens Task Fem Heat flux Load - Task Fem Heat flux Load + Tâche de la charge du flux de chaleur @@ -5239,72 +5244,72 @@ used for the Elmer solver Electrostatic boundary conditions - Electrostatic boundary conditions + Conditions limites des potentielles électrostatiques &Electrostatic boundary conditions - &Electrostatic boundary conditions + Conditions limites des &potentielles électrostatiques Fluid boundary conditions - Fluid boundary conditions + Conditions limites de fluide &Fluid boundary conditions - &Fluid boundary conditions + Conditions limites des &fluides Electromagnetic boundary conditions - Electromagnetic boundary conditions + Conditions limites électromagnétiques &Electromagnetic boundary conditions - &Electromagnetic boundary conditions + Conditions limites &électromagnétiques Geometrical analysis features - Geometrical analysis features + Fonctions d'analyse géométrique &Geometrical analysis features - &Geometrical analysis features + Fonctions d'analyse &géométrique Mechanical boundary conditions and loads - Mechanical boundary conditions and loads + Conditions limites et charges mécaniques &Mechanical boundary conditions and loads - &Mechanical boundary conditions and loads + Conditions limites et charges &mécaniques Thermal boundary conditions and loads - Thermal boundary conditions and loads + Conditions limites et charges thermiques &Thermal boundary conditions and loads - &Thermal boundary conditions and loads + Conditions limites et charges &thermiques Analysis features without solver - Analysis features without solver + Fonctions d'analyse sans solveur &Analysis features without solver - &Analysis features without solver + Fonctions d'&analyse sans solveur @@ -5419,7 +5424,7 @@ used for the Elmer solver Removes all clipping planes - Removes all clipping planes + Supprimer tous les plans de coupe @@ -5576,7 +5581,7 @@ used for the Elmer solver Opens the FEM examples - Opens the FEM examples + Ouvrir des exemples FEM @@ -5654,7 +5659,7 @@ used for the Elmer solver Converts the surface of a FEM mesh to a mesh - Converts the surface of a FEM mesh to a mesh + Convertir la surface d'un maillage FEM en maillage @@ -5680,7 +5685,7 @@ used for the Elmer solver Clears the Mesh of a FEM mesh object - Clears the Mesh of a FEM mesh object + Effacer le maillage d'un objet de type maillage FEM @@ -5693,7 +5698,7 @@ used for the Elmer solver Displays FEM mesh information - Displays FEM mesh information + Afficher les informations du maillage FEM @@ -5706,7 +5711,7 @@ used for the Elmer solver Creates a FEM mesh from a shape by Gmsh mesher - Creates a FEM mesh from a shape by Gmsh mesher + Créer un maillage FEM à partir d'une forme avec le mailleur Gmsh @@ -5732,7 +5737,7 @@ used for the Elmer solver Creates a FEM mesh from a solid or face shape by Netgen internal mesher - Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Créer un maillage FEM à partir d'un solide ou d'une face par le mailleur interne Netgen @@ -6099,7 +6104,7 @@ Veuillez d'abord sélectionner un type de résultat. Electromagnetic boundary conditions - Electromagnetic boundary conditions + Conditions limites électromagnétiques @@ -6304,12 +6309,12 @@ Veuillez d'abord sélectionner un type de résultat. Body heat source - Body heat source + Source de chaleur du corps Creates a body heat source - Creates a body heat source + Créer une source de chaleur pour le corps @@ -6317,12 +6322,12 @@ Veuillez d'abord sélectionner un type de résultat. Centrifugal load - Centrifugal load + Charge centrifuge Creates a centrifugal load - Creates a centrifugal load + Créer une charge centrifuge @@ -6330,12 +6335,12 @@ Veuillez d'abord sélectionner un type de résultat. Current density boundary condition - Current density boundary condition + Condition limite de densité actuelle Creates a current density boundary condition - Creates a current density boundary condition + Créer une condition limite de densité de courant @@ -6343,12 +6348,12 @@ Veuillez d'abord sélectionner un type de résultat. Electrostatic potential boundary condition - Electrostatic potential boundary condition + Condition limite de potentielle électrostatique Creates an electrostatic potential boundary condition - Creates an electrostatic potential boundary condition + Créer une condition limite de potentielle électrostatique @@ -6356,12 +6361,12 @@ Veuillez d'abord sélectionner un type de résultat. Flow velocity boundary condition - Flow velocity boundary condition + Condition limite de la vitesse d'écoulement Creates a flow velocity boundary condition - Creates a flow velocity boundary condition + Créer une condition limite de vitesse d'écoulement @@ -6369,12 +6374,12 @@ Veuillez d'abord sélectionner un type de résultat. Initial flow velocity condition - Initial flow velocity condition + Condition de vitesse d'écoulement initial Creates initial flow velocity condition - Creates initial flow velocity condition + Créer une condition de vitesse d'écoulement initial @@ -6382,12 +6387,12 @@ Veuillez d'abord sélectionner un type de résultat. Initial pressure condition - Initial pressure condition + Condition de pression initiale Creates an initial pressure condition - Creates an initial pressure condition + Créer une condition de pression initiale @@ -6395,12 +6400,12 @@ Veuillez d'abord sélectionner un type de résultat. Magnetization boundary condition - Magnetization boundary condition + Condition limite de magnétisation Creates a magnetization boundary condition - Creates a magnetization boundary condition + Créer une condition limite de magnétisation @@ -6408,12 +6413,12 @@ Veuillez d'abord sélectionner un type de résultat. Section print feature - Section print feature + Fonction d'affichage de variables de sortie Creates a section print feature - Creates a section print feature + Créer une fonction d'affichage de variables de sortie @@ -6421,12 +6426,12 @@ Veuillez d'abord sélectionner un type de résultat. Gravity load - Gravity load + Charge de gravité Creates a gravity load - Creates a gravity load + Créer une charge de gravité @@ -6434,12 +6439,12 @@ Veuillez d'abord sélectionner un type de résultat. Tie constraint - Tie constraint + Contrainte de liaison Creates a tie constraint - Creates a tie constraint + Créer une contrainte de liaison diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts index 4b0ada9b76..27d3c1415c 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_gl.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts index d9bbcc3182..2b659cc93e 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_hr.ts @@ -1023,7 +1023,7 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1127,7 +1127,7 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1255,8 +1255,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Neka aplikacija upravlja (stvara, briše) radne direktorije za sve rješavače. Koristit će se privremeni direktoriji. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1321,7 +1321,7 @@ dok ne budu prepisani novim pokretanjem rješavača The results dialog will be opened with the last used dialog settings - Rezultati će se otvoriti u dijalogu + Rezultati će se otvoriti u dijalogu sa posljednjim korištenim postavkama dijaloga @@ -1355,7 +1355,7 @@ when the results dialog is opened Default solver to be added when adding an analysis container - Zadani alat za rješavanje koji će biti dodan kada + Zadani alat za rješavanje koji će biti dodan kada se dodaje kontejner za analizu @@ -1398,7 +1398,7 @@ se dodaje kontejner za analizu - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1461,7 +1461,7 @@ Objekt FreeCAD rezultata: Uvezeni podaci bit će pretvoreni u FreeCAD FEM objekt FreeCAD result object - FreeCAD Objekt rezultata + FreeCAD Objekt rezultata @@ -1585,7 +1585,7 @@ Ako nije označeno, one će biti sortirane po imenima. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1664,8 +1664,8 @@ You might need to increase this when using the Cholesky solver and you get the error message that "MAXGS" needs to be increased. Maksimalan broj mjesta u matrici krutosti. -Možda ćete to morati povećati kada koristite -Choleskyov rješavač i dobijete poruku o pogrešci +Možda ćete to morati povećati kada koristite +Choleskyov rješavač i dobijete poruku o pogrešci da se "MAXGS" mora povećati." @@ -1682,12 +1682,12 @@ da se "MAXGS" mora povećati." You might need to increase this when using an iterative solver and you get the error message that "MAXKOI" needs to be increased. - Maksimalan broj mjesta u vektoru koincidencije. + Maksimalan broj mjesta u vektoru koincidencije. (broj čvorova po elementu množeno sa broj konačnih elementa) -Možda ćete to morati povećati kada koristite -iterativni rješavač i dobijete poruku o pogrešci +Možda ćete to morati povećati kada koristite +iterativni rješavač i dobijete poruku o pogrešci da se "MAXKOI" mora povećati @@ -1697,7 +1697,7 @@ da se "MAXKOI" mora povećati - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. @@ -3134,7 +3134,7 @@ Navedi drugu datoteku. Imaginary part is only used for equations with a harmonic/oscillating driving force - Imaginarni dio se koristi samo za jednadžbe + Imaginarni dio se koristi samo za jednadžbe s harmoničnim/oscilirajućim pogonskim silom. @@ -3192,14 +3192,14 @@ s harmoničnim/oscilirajućim pogonskim silom. Real part of potential x-component Note: has no effect if a solid was selected - Realni dio potencijalne x-komponente + Realni dio potencijalne x-komponente Napomena: nema utjecaja ako je odabrano volumensko tijelo Imaginary part of potential x-component Note: has no effect if a solid was selected - Imaginarni dio potencijalne x-komponente + Imaginarni dio potencijalne x-komponente Napomena: nema utjecaja ako je odabrano volumensko tijelo @@ -3213,14 +3213,14 @@ Napomena: nema utjecaja ako je odabrano volumensko tijelo Real part of potential y-component Note: has no effect if a solid was selected - Realni dio potencijalne -komponente + Realni dio potencijalne -komponente Napomena: nema utjecaja ako je odabrano volumensko tijelo Imaginary part of potential y-component Note: has no effect if a solid was selected - Imaginarni dio potencijalne y-komponente + Imaginarni dio potencijalne y-komponente Napomena: nema utjecaja ako je odabrano volumensko tijelo @@ -3234,14 +3234,14 @@ Napomena: nema utjecaja ako je odabrano volumensko tijelo Real part of potential z-component Note: has no effect if a solid was selected - Realni dio potencijalne z-komponente + Realni dio potencijalne z-komponente Napomena: nema utjecaja ako je odabrano volumensko tijelo Imaginary part of potential z-component Note: has no effect if a solid was selected - Imaginarni dio potencijalne z-komponente + Imaginarni dio potencijalne z-komponente Napomena: nema utjecaja ako je odabrano volumensko tijelo @@ -4394,9 +4394,9 @@ for the Elmer solver surface force (and thus displacement) generated by the flow (Option only applies for Elmer solver) - Rješavanje protoka se koristi + Rješavanje protoka se koristi za određivanje površinske sile - (i time pomaka) generirane strujom + (i time pomaka) generirane strujom (Opcija vrijedi samo za Elmerov rješavač) @@ -4499,7 +4499,7 @@ za određivanje površinske sile The direction of the edge or the direction of the normal vector of the face is used as direction - Smjer ruba ili smjer normalnog + Smjer ruba ili smjer normalnog vektora površine koristi se kao smjer @@ -4594,7 +4594,7 @@ vektora površine koristi se kao smjer The direction of the edge or the direction of the normal vector of the face is used as direction - Smjer ruba ili smjer normalnog + Smjer ruba ili smjer normalnog vektora površine koristi se kao smjer @@ -4757,7 +4757,7 @@ vektora površine koristi se kao smjer What stiffness should be used for the Elmer solver - Koja krutost bi se trebala + Koja krutost bi se trebala koristiti za Elmerov rješavač @@ -5524,7 +5524,7 @@ koristiti za Elmerov rješavač Creates a FEM equation for elasticity (stress) - Stvara FEM jednadžbe za + Stvara FEM jednadžbe za elastičnost (naprezanje) diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts index 1e823cbc3b..ca800992ef 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_hu.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Csapágy kényszerítés Creates a bearing constraint - Creates a bearing constraint + Létrehoz egy csapágy kényszerítést @@ -24,17 +24,17 @@ Fem - Végeselemes analízis Vem + Végeselemes analízis FEM Contact constraint - Contact constraint + Kapcsolat kényszerítés Creates a contact constraint between faces - Creates a contact constraint between faces + Érintkezési kényszerítést hoz létre a felületek közt @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + Kiszorítási peremfeltételt hoz létre egy geometriai egységhez @@ -60,7 +60,7 @@ Fem - Vem + Végeselemes analízis Vem @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Rögzített peremfeltételt hoz létre egy geometriai egységhez @@ -78,7 +78,7 @@ Fem - Végeselemes analízis Vem + Vem @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Létrehoz egy geometriai egységre alkalmazott erőterhelést @@ -114,17 +114,17 @@ Fem - Vem + Végeselemes analízis Vem Gear constraint - Gear constraint + Fogaskerék kényszerítés Creates a gear constraint - Creates a gear constraint + Létrehoz egy fogaskerék kényszerítést @@ -137,7 +137,7 @@ Heat flux load - Heat flux load + Hőáram terhelés @@ -341,7 +341,7 @@ Fem - Végeselemes analízis Vem + Vem @@ -369,7 +369,7 @@ Fem - Vem + Végeselemes analízis Vem @@ -423,7 +423,7 @@ Fem - Végeselemes analízis Vem + Vem @@ -497,7 +497,7 @@ Fem - Vem + Végeselemes analízis Vem @@ -573,7 +573,7 @@ Fem - Végeselemes analízis FEM + Vem @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - A megadott végrehajtható fájl + A megadott végrehajtható fájl '%1' nem létezik! Kérjük, adjon meg egy másik fájlt. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - A megadott végrehajtható fájl + A megadott végrehajtható fájl '%1' nem létezik! Kérjük, adjon meg egy másik fájlt. @@ -1247,8 +1247,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Lehetővé teszi az alkalmazás számára az összes megoldó munkakönyvtárainak kezelését (létrehozását, törlését). Használjon ideiglenes könyvtárakat. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1388,11 +1388,11 @@ elemzési konténer hozzáadásakor - The specified executable + The specified executable '%1' does not exist! Specify another file please. - A megadott végrehajtható fájl + A megadott végrehajtható fájl '%1' nem létezik! Kérjük, adjon meg egy másik fájlt. @@ -1575,11 +1575,11 @@ Ha le van tiltva, név szerint vannak rendezve. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - A megadott végrehajtható fájl + A megadott végrehajtható fájl '%1' nem létezik! Kérjük, adjon meg egy másik fájlt. @@ -1674,8 +1674,8 @@ that "MAXKOI" needs to be increased. (csomópontok száma elemenként szorozva véges elemek száma) -Előfordulhat, hogy növelnie kell ezt a paramétert, ha -egy iteratív megoldó használata esetén a "MAXKOI" paraméter +Előfordulhat, hogy növelnie kell ezt a paramétert, ha +egy iteratív megoldó használata esetén a "MAXKOI" paraméter értékét növelni kell hibaüzenet jelenik meg. @@ -1685,11 +1685,11 @@ egy iteratív megoldó használata esetén a "MAXKOI" paraméter - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - A megadott z88r végrehajtható + A megadott z88r végrehajtható '%1' nem létezik! Kérjük, adjon meg egy másik fájlt. @@ -1716,7 +1716,7 @@ Kérjük, adjon meg egy másik fájlt. Nodes set - Csomópontok beállítása + Csomópontok beálítása @@ -1724,7 +1724,7 @@ Kérjük, adjon meg egy másik fájlt. Nodes set - Csomópontok beálítása + Csomópontok beállítása @@ -3698,7 +3698,7 @@ Megjegyzés: 2D esetén csak az x beállítása lehetséges, Contact constraint - Contact constraint + Kapcsolat kényszerítés @@ -3723,7 +3723,7 @@ Megjegyzés: 2D esetén csak az x beállítása lehetséges, Heat flux load - Heat flux load + Hőáram terhelés diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts index 1afbecda7c..404a3d2105 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_id.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts index a666fa9b3a..0b574f8a37 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_it.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Vincolo del cuscinetto Creates a bearing constraint - Creates a bearing constraint + Crea un vincolo cuscinetto @@ -29,12 +29,12 @@ Contact constraint - Contact constraint + Vincolo contatto Creates a contact constraint between faces - Creates a contact constraint between faces + Crea un vincolo di contatto tra le facce @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Crea una forza di carico applicata a un'entità geometrica @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Vincolo dell'ingranaggio Creates a gear constraint - Creates a gear constraint + Crea vincolo ingranaggio @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + Temperatura iniziale Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + Crea una temperatura iniziale che agisce su un corpo @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + Vincolo piano multipunto Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Crea un vincolo piano multi-punto per una faccia @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Crea un carico di pressione che agisce su una faccia @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Vincolo puleggia Creates a pulley constraint - Creates a pulley constraint + Crea un vincolo puleggia @@ -227,12 +227,12 @@ Spring - Spring + Molla Creates a spring acting on a face - Creates a spring acting on a face + Crea una molla che agisce su una faccia @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + Crea un carico di flusso termico concentrato che agisce su una faccia @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Crea un sistema di coordinate locali su una faccia @@ -596,7 +596,7 @@ Make bearing constraint - Make bearing constraint + Crea vincolo cuscinetto @@ -646,7 +646,7 @@ Make spring on face - Make spring on face + Crea molla su faccia @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - L'eseguibile specificato + L'eseguibile specificato '%1' non esiste! Specificare un altro file, per favore. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - L'eseguibile specificato + L'eseguibile specificato '%1' non esiste! Specificare un altro file, per favore. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Lascia che l'applicazione gestisca (creare, eliminare) le cartelle di lavoro per tutti i risolutori. Usa cartelle temporanee. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - L'eseguibile specificato + L'eseguibile specificato '%1' non esiste! Specificare un altro file, per favore. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - L'eseguibile specificato + L'eseguibile specificato '%1' non esiste! Specificare un altro file, per favore. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - L'eseguibile z88r specificato + L'eseguibile z88r specificato '%1' non esiste! Specificare un altro file, per favore. @@ -3189,14 +3189,14 @@ con una forza motrice armonica/oscillante Real part of potential x-component Note: has no effect if a solid was selected - Parte reale componente x del potenziale + Parte reale componente x del potenziale Nota: non ha effetto se è stato selezionato un solido Imaginary part of potential x-component Note: has no effect if a solid was selected - Parte immaginaria componente x del potenziale + Parte immaginaria componente x del potenziale Nota: non ha effetto se è stato selezionato un solido @@ -3210,14 +3210,14 @@ Nota: non ha effetto se è stato selezionato un solido Real part of potential y-component Note: has no effect if a solid was selected - Parte reale componente y del potenziale + Parte reale componente y del potenziale Nota: non ha effetto se è stato selezionato un solido Imaginary part of potential y-component Note: has no effect if a solid was selected - Parte immaginaria componente y del potenziale + Parte immaginaria componente y del potenziale Nota: non ha effetto se è stato selezionato un solido @@ -3231,14 +3231,14 @@ Nota: non ha effetto se è stato selezionato un solido Real part of potential z-component Note: has no effect if a solid was selected - Parte reale componente z del potenziale + Parte reale componente z del potenziale Nota: non ha effetto se è stato selezionato un solido Imaginary part of potential z-component Note: has no effect if a solid was selected - Parte immaginaria componente z del potenziale + Parte immaginaria componente z del potenziale Nota: non ha effetto se è stato selezionato un solido @@ -3708,7 +3708,7 @@ Note: for 2D only setting for x is possible, Contact constraint - Contact constraint + Vincolo contatto @@ -3738,7 +3738,7 @@ Note: for 2D only setting for x is possible, Plane multi-point constraint - Plane multi-point constraint + Vincolo piano multipunto diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts index 27ce436a9e..2f4248d78a 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ja.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - 指定された実行可能ファイル + 指定された実行可能ファイル '%1' が存在しません! 別のファイルを指定してください。 @@ -1124,11 +1124,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - 指定された実行可能ファイル + 指定された実行可能ファイル '%1' が存在しません! 別のファイルを指定してください。 @@ -1247,8 +1247,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - アプリケーションにすべてのソルバーの作業ディレクトリを管理 (作成、削除) させます。一時ディレクトリを使用してください。 + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1387,11 +1387,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - 指定された実行可能ファイル + 指定された実行可能ファイル '%1' が存在しません! 別のファイルを指定してください。 @@ -1573,11 +1573,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - 指定された実行可能ファイル + 指定された実行可能ファイル '%1' が存在しません! 別のファイルを指定してください。 @@ -1682,11 +1682,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. @@ -3501,7 +3501,7 @@ Note: for 2D only setting for x is possible, 0 mm - 0 mm + 0 mm @@ -5302,7 +5302,7 @@ used for the Elmer solver Mesh - Mesh + メッシュ diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts index af0c38e73c..60d6d2281d 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ka.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + საკისრის შეზღუდვა Creates a bearing constraint - Creates a bearing constraint + საკისრის შეზღუდვის შექმნა @@ -24,17 +24,17 @@ Fem - სემ + Fem Contact constraint - Contact constraint + კონტაქტის შეზღუდვა Creates a contact constraint between faces - Creates a contact constraint between faces + შექნის კონტაქტის შეზღუდვას ზედაპირებს შორის @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + შექმნის ჩანაცვლების სასაზღვრე პირობას გეომეტრიული ობიექტისთვის @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + შექმნის ფიქსირებულ სასაზღვრე პირობას გეომეტრიული ობიექტისთვის @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + შექმნის ძალის დატვირთვას, რომელიც გეომეტრიულ ობიექტს აწვება @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + კბილანის შეზღუდვა Creates a gear constraint - Creates a gear constraint + კბილანის შეზღუდვის შექმნა @@ -137,12 +137,12 @@ Heat flux load - Heat flux load + დატვირთვა სითბურ ნაკადზე Creates a heat flux load acting on a face - Creates a heat flux load acting on a face + ზედაპირზე მოქმედი სითბოს ნაკადის დატვირთვის შექმნა @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + საწყისი ტემპერატურა Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + სხეულზე მოქმედი საწყისი ტემპერატურის შექმნა @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + ზედაპირის მრავალწერტილიანი შეზღუდვა Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + შექმნის სიბრტყის მრავალწერტილიანი შეზღუდვას ზედაპირისთვის @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + ზედაპირზე მოქმედი წნევის დატვირთვის შექმნა @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + ბორბლის შეზღუდვა Creates a pulley constraint - Creates a pulley constraint + ბორბლის შეზღუდვის შექმნა @@ -227,12 +227,12 @@ Spring - Spring + ზამბარა Creates a spring acting on a face - Creates a spring acting on a face + ზედაპირზე მოქმედი ზამბარის შექმნა @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + შექმნის ტემპერატურის/კონცენტრირებული სითბოს ნაკადის დატვირთვას, რომელიც ზედაპირზე მოქმედებს @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + შექმენით ლოკალური კოორდინატების სისტემა ზედაპირზე @@ -596,72 +596,72 @@ Make bearing constraint - Make bearing constraint + საკისრის შეზღუდვის შექმნა Make contact constraint on a face - Make contact constraint on a face + შექმენით კონტაქტის შეზღუდვა ზედაპირზე Make displacement boundary condition on face - Make displacement boundary condition on face + შექმენით გამოძევების სასაზღვრე პირობა ზედაპირზე Make fixed boundary condition for geometry - Make fixed boundary condition for geometry + შექმენით ფიქსირებული სასაზღვრო პირობა გეომეტრიისთვის Make force load on geometry - Make force load on geometry + გეომეტრიაზე ძალოვანი დატვირთვის შექმნა Make gear constraint - Make gear constraint + კბილანის შეზღუდვის შექმნა Make heat flux load on face - Make heat flux load on face + ზედაპირზე სითბოს ნაკადის დატვირთვის შექმნა Make initial temperature condition on body - Make initial temperature condition on body + შექმენით საწყისი ტემპერატურის პირობა სხეულზე Make plane multi-point constraint on face - Make plane multi-point constraint on face + შექმენით სიბრტყის მრავალწერტილიანი შეზღუდვა ზედაპირზე Make pressure load on face - Make pressure load on face + წნევით დატვირთვის შექმნა ზედაპირზე Make spring on face - Make spring on face + ზამბარის შექმნა ზედაპირზე Make pulley constraint - Make pulley constraint + ბორბლის შეზღუდვის შექმნა Make temperature boundary condition on face - Make temperature boundary condition on face + შექმენით დროებით სასაზღვრე პირობა ზედაპირზე Make local coordinate system on face - Make local coordinate system on face + შექმენით ლოკალური კოორდინატების სისტემა ზედაპირზე @@ -769,7 +769,7 @@ Insert component's initial temperature: - შეიყვანეთ კომპონენტის + შეიყვანეთ კომპონენტის საწყისი ტემპერატურა: @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - მითითებული გამშვები ფაილი + მითითებული გამშვები ფაილი '%1' არ არსებობს! მიუთითეთ სხვა ფაილი. @@ -1054,7 +1054,7 @@ Specify another file please. Search in known binary directories - ცნობილ ბინარულ საქაღალდეებში ძებნა + გამშვები ფაილების ცნობილ საქაღალდეებში ძებნა @@ -1125,13 +1125,13 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. მითითებული გამშვები ფაილი '%1' -არ არ არსებობს! + არ არსებობს! მიუთითეთ სხვა ფაილი. @@ -1219,10 +1219,10 @@ not belonging to faces and faces not belonging to volumes. Every analysis feature and, if there are different materials, material consists of two mesh groups, faces and nodes where the constraint or material is applied. - Mesh groups are exported too. -Every analysis feature and, if there are different materials, -material consists of two mesh groups, faces and nodes where -the constraint or material is applied. + გაიტანება ბადის ჯგუფებიც. +ყველა ანალიზის ფუნქცია და თუ არსებობს სხვადასხვა მასალები, +მასალა შედგება ორი ბადის ჯგუფისგან, ზედაპირებისგან ან უჯრედებისგან, +სადაც შეზღუდვა ან მასალა გადატარდება. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - ნება მიეცით აპლიკაციას მართოს (შექმნას, წაშალოს) ყველა ამომხსნელის დროებითი საქაღალდეები. დროებითი საქაღალდეების გამოყენება. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1325,13 +1325,13 @@ with the last used dialog settings All analysis features are hidden in the model view when the results dialog is opened - All analysis features are hidden in the model view -when the results dialog is opened + როცა შედეგების ფანჯარა იხსნება, +მოდელის ხედში ყველა ანალიზის თვისება დამალულია Hide analysis features when open result dialog - Hide analysis features when open result dialog + ანალიზის თვისებების დამალვა შედეგის დიალოგური ფანჯრის გახსნისას @@ -1390,7 +1390,7 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1577,13 +1577,13 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - მითითებული გამშვები ფაილი + მითითებული გამშვები ფაილი '%1' - არ არსებობს! +არ არ არსებობს! მიუთითეთ სხვა ფაილი. @@ -1602,7 +1602,7 @@ Specify another file please. Search in known binary directories - გამშვები ფაილების ცნობილ საქაღალდეებში ძებნა + ცნობილ ბინარულ საქაღალდეებში ძებნა @@ -1675,11 +1675,11 @@ You might need to increase this when using an iterative solver and you get the error message that "MAXKOI" needs to be increased. მაქსიმალური ადგილები დამთხვევის ვექტორში -(თითოეული ელემენტის კვანძების რიცხვი +(თითოეული ელემენტის კვანძების რიცხვი გამრავლებული სასრული ელემენტების რიცხვზე). -შეიძლება დაგჭირდეთ ამისი გაზრდა, თუ იყენებთ -იტერაციულ ამომხსნელს და დაინახავთ +შეიძლება დაგჭირდეთ ამისი გაზრდა, თუ იყენებთ +იტერაციულ ამომხსნელს და დაინახავთ შეცდომას, რომ საჭიროა "MAXKOI"-ის გაზრდა. @@ -1689,11 +1689,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - მითითებული z88r-ის გამშვები ფაილი + მითითებული z88r-ის გამშვები ფაილი '%1' არ არსებობს! მიუთითეთ სხვა ფაილი. @@ -1874,7 +1874,7 @@ Specify another file please. Input error - Input error + შეყვანის შეცდომა @@ -1890,7 +1890,7 @@ Specify another file please. Analysis feature parameters - Analysis feature parameters + ანალიზის თვისების მორგება @@ -1968,7 +1968,7 @@ Specify another file please. Selection error - მონიშნულის შეცდომა + მონიშვნის შეცდომა @@ -2046,7 +2046,7 @@ Specify another file please. Only one type of selection (vertex,face or edge) per analysis feature allowed! - Only one type of selection (vertex,face or edge) per analysis feature allowed! + ერთ ანალიზის თვისებას, მხოლოდ ერთი მონიშნული ტიპი (წვერო, ზედაპირი ან წიბო) შეიძლება, ჰქონდეს! @@ -2075,7 +2075,7 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + ერთ ანალიზის თვისებას, მხოლოდ ერთი მონიშნული ტიპი (წვერო, ზედაპირი ან წიბო) შეიძლება, ჰქონდეს! @@ -2204,7 +2204,7 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + ერთ ანალიზის თვისებას, მხოლოდ ერთი მონიშნული ტიპი (წვერო, ზედაპირი ან წიბო) შეიძლება, ჰქონდეს! @@ -2233,13 +2233,13 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + ერთ ანალიზის თვისებას, მხოლოდ ერთი მონიშნული ტიპი (წვერო, ზედაპირი ან წიბო) შეიძლება, ჰქონდეს! Wrong selection - არასწორი არჩევანი + არასწორი მონიშნული @@ -2321,7 +2321,7 @@ Specify another file please. Only one face can be selected for a plane multi-point constraint! - Only one face can be selected for a plane multi-point constraint! + სიბრტყის მრავალწერტილიან შეზღუდვად მხოლოდ ერთი ზედაპირი შეგიძლიათ აირჩიოთ! @@ -2445,7 +2445,7 @@ Specify another file please. Analysis feature update error - Analysis feature update error + ანალიზის თვისების განახლების შეცდომა @@ -2464,7 +2464,7 @@ Specify another file please. Selection error - მონიშვნის შეცდომა + მონიშნულის შეცდომა @@ -2476,17 +2476,17 @@ Specify another file please. Only one face for rectangular local coordinate system! - Only one face for rectangular local coordinate system! + მხოლოდ ერთი ზედაპირი ოთხკუთხედი ლოკალური კოორდინატების სისტემისთვის! Only one face for local coordinate system! - Only one face for local coordinate system! + მხოლოდ ერთი ზედაპირი ლოკალური კოორდინატების სისტემისთვის! Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface - Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + შესაძლებელია მხოლოდ გარდაქმნადი ზედაპირების არჩევა! ჯერ გამოიყენეთ გადაადგილების სასაზღვრე პირობა, შემდეგ კი ზედაპირზე ლოკალური კოორდინატების სისტემა გამოიყენეთ @@ -3063,7 +3063,7 @@ Specify another file please. Analysis feature properties - Analysis feature properties + ანალიზის თვისების მორგება @@ -3125,23 +3125,23 @@ Specify another file please. Imaginary part is only used for equations with a harmonic/oscillating driving force - წარმოდგენითი ნაწილი მხოლოდ ჰარმონიული/რხევადი + წარმოდგენითი ნაწილი მხოლოდ ჰარმონიული/რხევადი მამოძრავებელი ძალის მქონე ტოლობებთან ერთად გამოიყენება Whether the boundary condition defines a constant potential - Whether the boundary condition defines a constant potential + განსაზღვრავს თუ არა სასაზღვრე პირობა მუდმივ პოტენციალს Whether the boundary condition defines a farfield potential - Whether the boundary condition defines a farfield potential + განსაზღვრავს თუ არა სასაზღვრე პირობა შორი ველის პოტენციალს Whether the boundary condition is for the electric force - Whether the boundary condition is for the electric force + არის თუ არა სასაზღვრე პირობა ელექტრული ძალისთვის @@ -3702,17 +3702,17 @@ Note: for 2D only setting for x is possible, Contact constraint - Contact constraint + კონტაქტის შეზღუდვა Displacement boundary condition - Displacement boundary condition + ჩანაცვლების საზღვრის პირობა Fixed boundary condition - Fixed boundary condition + დამაგრებული სასაზღვრო პირობა @@ -3722,37 +3722,37 @@ Note: for 2D only setting for x is possible, Force load - Force load + ძალოვანი დატვირთვა Heat flux load - Heat flux load + დატვირთვა სითბურ ნაკადზე Plane multi-point constraint - Plane multi-point constraint + ზედაპირის მრავალწერტილიანი შეზღუდვა Pressure load - Pressure load + წნევით დატვირთვა Temperature boundary condition - Temperature boundary condition + ტემპერატურის შემზღუდავი პირობა Local coordinate system - Local coordinate system + ლოკალური კოორდინატების სისტემა Edit analysis feature - Edit analysis feature + ანალიზის თვისების ჩასწორება @@ -4103,7 +4103,7 @@ For possible variables, see the description box below. Analysis features - Analysis features + ანალიზის თვისებები @@ -4131,7 +4131,7 @@ For possible variables, see the description box below. Box - Box + ყუთი @@ -4272,7 +4272,7 @@ For possible variables, see the description box below. Distance - დაშორება + Distance @@ -4420,7 +4420,7 @@ generated by the flow Select multiple face(s), click Add or Remove - მონიშნეთ ზედაპირ(ებ)-ი და დააწკაპუნეთ დამატებაზე ან წაშლაზე + აირჩიეთ ერთზე მეტი ზედაპირი. დააწკაპუნეთ დამატებას ან წაშლას @@ -4596,7 +4596,7 @@ normal vector of the face is used as direction Task Fem Heat flux Load - Task Fem Heat flux Load + სემ-ის ამოცანა - სითბური ნაკადით დატვირთვა @@ -4759,7 +4759,7 @@ used for the Elmer solver Select multiple face(s), click Add or Remove - აირჩიეთ ერთზე მეტი ზედაპირი. დააწკაპუნეთ დამატებას ან წაშლას + მონიშნეთ ზედაპირ(ებ)-ი და დააწკაპუნეთ დამატებაზე ან წაშლაზე @@ -5240,72 +5240,72 @@ used for the Elmer solver Electrostatic boundary conditions - Electrostatic boundary conditions + ელექტროსტატიკური სასაზღვრო პირობები &Electrostatic boundary conditions - &Electrostatic boundary conditions + &ელექტროსტატიკური სასაზღვრო პირობები Fluid boundary conditions - Fluid boundary conditions + სითხის სასაზღვრო პირობები &Fluid boundary conditions - &Fluid boundary conditions + &სითხის სასაზღვრო პირობები Electromagnetic boundary conditions - Electromagnetic boundary conditions + ელექტრომაგნიტური სასაზღვრო პირობები &Electromagnetic boundary conditions - &Electromagnetic boundary conditions + &ელექტრომაგნიტური სასაზღვრო პირობები Geometrical analysis features - Geometrical analysis features + გეომეტრიული ანალიზის ფუნქციები &Geometrical analysis features - &Geometrical analysis features + &გეომეტრიული ანალიზის ფუნქციები Mechanical boundary conditions and loads - Mechanical boundary conditions and loads + მექანიკური სასაზღვრო პირობები და დატვირთვები &Mechanical boundary conditions and loads - &Mechanical boundary conditions and loads + &მექანიკური სასაზღვრო პირობები და დატვირთვები Thermal boundary conditions and loads - Thermal boundary conditions and loads + თერმული სასაზღვრო პირობები და დატვირთვები &Thermal boundary conditions and loads - &Thermal boundary conditions and loads + &თერმული სასაზღვრო პირობები და დატვირთვები Analysis features without solver - Analysis features without solver + ანალიზის თვისებები ამომხსნელის გარეშე &Analysis features without solver - &Analysis features without solver + &ანალიზის თვისებები ამომხსნელის გარეშე @@ -5320,7 +5320,7 @@ used for the Elmer solver Mesh - Mesh + ბადე @@ -5420,7 +5420,7 @@ used for the Elmer solver Removes all clipping planes - Removes all clipping planes + ყველა წაკვეთის სიბრტყის წაშლა @@ -5578,7 +5578,7 @@ used for the Elmer solver Opens the FEM examples - Opens the FEM examples + სემ მაგალითების გახსნა @@ -5656,7 +5656,7 @@ used for the Elmer solver Converts the surface of a FEM mesh to a mesh - Converts the surface of a FEM mesh to a mesh + გადაიყვანს სემ ბადის ზედაპირს ბადედ @@ -5682,7 +5682,7 @@ used for the Elmer solver Clears the Mesh of a FEM mesh object - Clears the Mesh of a FEM mesh object + ბადის ან სემ ბადის ობიექტის გასუფთავება @@ -5695,7 +5695,7 @@ used for the Elmer solver Displays FEM mesh information - Displays FEM mesh information + სემ ბადის ინფორმაციის ჩვენება @@ -5708,7 +5708,7 @@ used for the Elmer solver Creates a FEM mesh from a shape by Gmsh mesher - Creates a FEM mesh from a shape by Gmsh mesher + მოხაზულობიდან Gmsh-ის მეშვეობით სემ ბადის შექმნა @@ -5734,7 +5734,7 @@ used for the Elmer solver Creates a FEM mesh from a solid or face shape by Netgen internal mesher - Creates a FEM mesh from a solid or face shape by Netgen internal mesher + შექმნის სემ ბადის მყარი სხეულისაგან ან ზედაპირის მოხაზულობისგან Netgen შიდა მეშერით @@ -5918,7 +5918,7 @@ used for the Elmer solver Remove - მოცილება + წაშლა @@ -6102,7 +6102,7 @@ Please select a result type first. Electromagnetic boundary conditions - Electromagnetic boundary conditions + ელექტრომაგნიტური სასაზღვრო პირობები @@ -6278,7 +6278,7 @@ Please select a result type first. Fem - Fem + სემ @@ -6309,12 +6309,12 @@ Please select a result type first. Body heat source - Body heat source + სხეულის სითბოს წყარო Creates a body heat source - Creates a body heat source + სხეულის სითბოს წყაროს შექმნა @@ -6322,12 +6322,12 @@ Please select a result type first. Centrifugal load - Centrifugal load + ცენტრიფუგული დატვირთვა Creates a centrifugal load - Creates a centrifugal load + ცენტრიფუგული დატვირთვს შექმნა @@ -6335,12 +6335,12 @@ Please select a result type first. Current density boundary condition - Current density boundary condition + დინების სიმკვრივის სასაზღვრო პირობა Creates a current density boundary condition - Creates a current density boundary condition + შექმნის დინების სიმკვრივის სასაზღვრო პირობას @@ -6348,12 +6348,12 @@ Please select a result type first. Electrostatic potential boundary condition - Electrostatic potential boundary condition + ელექტროსტატიკური პოტენციალის სასაზღვრო პირობები Creates an electrostatic potential boundary condition - Creates an electrostatic potential boundary condition + ქმნის ელექტროსტატიკური პოტენციალის სასაზღვრო პირობებს @@ -6361,12 +6361,12 @@ Please select a result type first. Flow velocity boundary condition - Flow velocity boundary condition + დინების სიჩქარის საზღვრის პირობა Creates a flow velocity boundary condition - Creates a flow velocity boundary condition + შექმნის დინების სიჩქარის საზღვრის პირობას @@ -6374,12 +6374,12 @@ Please select a result type first. Initial flow velocity condition - Initial flow velocity condition + საწყისი დინების სიჩქარის პირობა Creates initial flow velocity condition - Creates initial flow velocity condition + ქმნის საწყისი დინების სიჩქარის პირობას @@ -6387,12 +6387,12 @@ Please select a result type first. Initial pressure condition - Initial pressure condition + საწყისი წნევის პირობა Creates an initial pressure condition - Creates an initial pressure condition + ქმნის საწყის წნევის პირობას @@ -6400,12 +6400,12 @@ Please select a result type first. Magnetization boundary condition - Magnetization boundary condition + დამაგნიტების საზღვრის პირობები Creates a magnetization boundary condition - Creates a magnetization boundary condition + შექმნის დამაგნიტების საზღვრის პირობას @@ -6413,12 +6413,12 @@ Please select a result type first. Section print feature - Section print feature + დანაყოფის ბეჭდვის ფუნქცია Creates a section print feature - Creates a section print feature + სექციის ბეჭდვის ფუნქციის შექმნა @@ -6426,12 +6426,12 @@ Please select a result type first. Gravity load - Gravity load + გრავიტაციული დატვირთვა Creates a gravity load - Creates a gravity load + შექმნის გრავიტაციის დატვირთვას @@ -6439,12 +6439,12 @@ Please select a result type first. Tie constraint - Tie constraint + გადაბმის შეზღუდვა Creates a tie constraint - Creates a tie constraint + სემ შეზღუდვის შექმნა diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts index a45eafd951..5f52539347 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ko.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_lt.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_lt.ts index 9e452f04b9..7ebfe77a57 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_lt.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_lt.ts @@ -1003,11 +1003,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1083,11 +1083,11 @@ Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1306,11 +1306,11 @@ constraint or material is applied. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1498,11 +1498,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1610,11 +1610,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts index b1ab35040c..9ccfaca56f 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_nl.ts @@ -155,7 +155,7 @@ Initial temperature - Initial temperature + Initiële temperatuur @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Het gespecificeerde uitvoerbare bestand + Het gespecificeerde uitvoerbare bestand '%1' bestaat niet! Geef een ander bestand op. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Het gespecificeerde uitvoerbare bestand + Het gespecificeerde uitvoerbare bestand '%1' bestaat niet! Geef een ander bestand op. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Het gespecificeerde uitvoerbare bestand + Het gespecificeerde uitvoerbare bestand '%1' bestaat niet! Geef een ander bestand op. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Het gespecificeerde uitvoerbare bestand + Het gespecificeerde uitvoerbare bestand '%1' bestaat niet! Geef een ander bestand op. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts index 3c75b014e4..e622fc4300 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_pl.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Wiązanie łożyska Creates a bearing constraint - Creates a bearing constraint + Tworzy wiązanie łożyska @@ -29,12 +29,12 @@ Contact constraint - Contact constraint + Kontakt Creates a contact constraint between faces - Creates a contact constraint between faces + Tworzy wiązanie styku między powierzchniami @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + Definiuje warunek brzegowy przemieszczenia dla obiektu geometrycznego @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Definiuje warunek brzegowy utwierdzenia dla obiektu geometrycznego @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Tworzy obciążenie siłą przyłożone do obiektu geometrycznego @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Wiązanie koła zębatego Creates a gear constraint - Creates a gear constraint + Tworzy wiązanie koła zębatego @@ -137,12 +137,12 @@ Heat flux load - Heat flux load + Obciążenie strumieniem ciepła Creates a heat flux load acting on a face - Creates a heat flux load acting on a face + Tworzy obciążenie strumieniem ciepła działające na powierzchni @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + Temperatura początkowa Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + Tworzy temperaturę początkową oddziałującą na ciało @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + Wiązanie MPC typu płaszczyzna Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Definiuje wiązanie MPC typu płaszczyzna dla powierzchni @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Definiuje obciążenie ciśnieniem działające na powierzchni @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Wiązanie koła pasowego Creates a pulley constraint - Creates a pulley constraint + Definiuje więz koła pasowego @@ -227,12 +227,12 @@ Spring - Spring + Sprężyna Creates a spring acting on a face - Creates a spring acting on a face + Definiuje sprężynę działającą na powierzchni @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + Definiuje obciążenie temperaturą / skupionym strumieniem ciepła na powierzchni @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Definiuje lokalny układ współrzędnych na powierzchni @@ -596,72 +596,72 @@ Make bearing constraint - Make bearing constraint + Utwórz wiązanie łożyska Make contact constraint on a face - Make contact constraint on a face + Utwórz kontakt na powierzchni Make displacement boundary condition on face - Make displacement boundary condition on face + Utwórz warunek brzegowy przemieszczenia na powierzchni Make fixed boundary condition for geometry - Make fixed boundary condition for geometry + Utwórz warunek brzegowy utwierdzenia dla geometrii Make force load on geometry - Make force load on geometry + Utwórz obciążenie siłą na geometrii Make gear constraint - Make gear constraint + Utwórz wiązanie koła zębatego Make heat flux load on face - Make heat flux load on face + Utwórz obciążenie strumieniem ciepła na powierzchni Make initial temperature condition on body - Make initial temperature condition on body + Utwórz warunek początkowy temperatury ciała Make plane multi-point constraint on face - Make plane multi-point constraint on face + Utwórz więz MPC typu płaszczyzna na powierzchni Make pressure load on face - Make pressure load on face + Utwórz obciążenie ciśnieniem na powierzchni Make spring on face - Make spring on face + Utwórz sprężynę na powierzchni Make pulley constraint - Make pulley constraint + Utwórz wiązanie koła pasowego Make temperature boundary condition on face - Make temperature boundary condition on face + Utwórz warunek brzegowy temperatury na powierzchni Make local coordinate system on face - Make local coordinate system on face + Utwórz lokalny układ współrzędnych na powierzchni @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Wskazany plik wykonywalny + Wskazany plik wykonywalny '%1' nie istnieje! Wybierz inny plik. @@ -1124,11 +1124,11 @@ zostaną połączone, aby uczynić granice objętości niewidocznymi. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Wskazany plik wykonywalny + Wskazany plik wykonywalny '%1' nie istnieje! Wybierz inny plik. @@ -1217,10 +1217,10 @@ MES: Tylko elementy MES zostaną wyeksportowane. Oznacza to tylko krawędzie nie Every analysis feature and, if there are different materials, material consists of two mesh groups, faces and nodes where the constraint or material is applied. - Mesh groups are exported too. -Every analysis feature and, if there are different materials, -material consists of two mesh groups, faces and nodes where -the constraint or material is applied. + Grupy siatki są eksportowane. +Każdy element analizy i, jeśli istnieją różne materiały, +materiał składa się z dwóch grup siatek, ścian i węzłów, +w których zastosowano wiązanie lub materiał. @@ -1247,8 +1247,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Pozwól aplikacji zarządzać (tworzyć, usuwać) katalogami roboczymi dla wszystkich solverów. Użyj katalogów tymczasowych. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1323,13 +1323,13 @@ z ostatnio użytymi ustawieniami All analysis features are hidden in the model view when the results dialog is opened - All analysis features are hidden in the model view -when the results dialog is opened + Wszystkie cechy analizy są ukryte w widoku modelu +gdy okno dialogowe wyników jest otwarte Hide analysis features when open result dialog - Hide analysis features when open result dialog + Ukryj cechy analizy, gdy okno wyników jest otwarte @@ -1388,11 +1388,11 @@ tworzeniu nowej analizy - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Wskazany plik wykonywalny + Wskazany plik wykonywalny '%1' nie istnieje! Wybierz inny plik. @@ -1427,7 +1427,7 @@ FreeCAD result object: The imported data will be converted into a FreeCAD FEM Result object. Note: this setting needs the exact result component names and thus it only works properly with VTK files exported from FreeCAD. - Obiekt wyników VTK: Obiekt wyników FreeCAD MES VTK zostanie zaimportowany + Obiekt wyników VTK: Obiekt wyników FreeCAD MES VTK zostanie zaimportowany (równe obiektowi, który został wyeksportowany). Obiekt siatki MES: Wyniki w pliku VTK zostaną pominięte, tylko dane siatki będą zaimportowane i obiekt siatki FreeCAD MES zostanie utworzony. @@ -1578,11 +1578,11 @@ Jeśli ta opcja nie jest zaznaczone, będą posortowane według nazw. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Wskazany plik wykonywalny + Wskazany plik wykonywalny '%1' nie istnieje! Wybierz inny plik. @@ -1690,11 +1690,11 @@ iteracyjnego solvera, gdy pojawi się komunikat o błędzie, - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - Wskazany plik wykonywalny z88r + Wskazany plik wykonywalny z88r '%1' nie istnieje! Wybierz inny plik. @@ -1721,7 +1721,7 @@ Wybierz inny plik. Nodes set - Zbiór węzłów + Zestaw węzłów @@ -1883,7 +1883,7 @@ Wybierz inny plik. Nodes set - Zestaw węzłów + Zbiór węzłów @@ -1891,7 +1891,7 @@ Wybierz inny plik. Analysis feature parameters - Analysis feature parameters + Parametry cech analizy @@ -1969,7 +1969,7 @@ Wybierz inny plik. Selection error - Błąd zaznaczenia + Błąd selekcji @@ -2008,7 +2008,7 @@ Wybierz inny plik. Only faces can be picked - Można wybrać tylko ściany + Można wybrać tylko powierzchnie @@ -2030,7 +2030,7 @@ Wybierz inny plik. Selection error - Błąd wyboru + Błąd zaznaczenia @@ -2047,7 +2047,7 @@ Wybierz inny plik. Only one type of selection (vertex,face or edge) per analysis feature allowed! - Only one type of selection (vertex,face or edge) per analysis feature allowed! + Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na cechę analizy! @@ -2076,7 +2076,7 @@ Wybierz inny plik. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na cechę analizy! @@ -2205,7 +2205,7 @@ Wybierz inny plik. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na cechę analizy! @@ -2234,13 +2234,13 @@ Wybierz inny plik. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Dozwolony jest tylko jeden typ wyboru (wierzchołek, powierzchnia lub krawędź) na cechę analizy! Wrong selection - Niewłaściwy wybór + Nieprawidłowy wybór @@ -2255,12 +2255,12 @@ Wybierz inny plik. Selection error - Błąd w zaznaczeniu + Błąd wyboru Only planar faces can be picked - Wybrać można tylko płaskie ściany + Mogą być użyte tylko powierzchnie płaskie @@ -2283,7 +2283,7 @@ Wybierz inny plik. Selection error - Błąd wyboru + Błąd w zaznaczeniu @@ -2322,7 +2322,7 @@ Wybierz inny plik. Only one face can be selected for a plane multi-point constraint! - Only one face can be selected for a plane multi-point constraint! + Tylko jedna powierzchnia może być wybrana do wiązania MPC typu płaszczyzna! @@ -2344,7 +2344,7 @@ Wybierz inny plik. Only planar faces can be picked - Mogą być użyte tylko powierzchnie płaskie + Wybrać można tylko płaskie ściany @@ -2446,7 +2446,7 @@ Wybierz inny plik. Analysis feature update error - Analysis feature update error + Błąd aktualizacji cechy analizy @@ -2465,7 +2465,7 @@ Wybierz inny plik. Selection error - Błąd selekcji + Błąd wyboru @@ -2477,17 +2477,17 @@ Wybierz inny plik. Only one face for rectangular local coordinate system! - Only one face for rectangular local coordinate system! + Tylko jedna powierzchnia dla prostokątnego lokalnego układu współrzędnych! Only one face for local coordinate system! - Only one face for local coordinate system! + Tylko jedna powierzchnia dla lokalnego układu współrzędnych! Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface - Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Można wybrać tylko powierzchnie przekształcalne! Najpierw zastosuj warunek brzegowy przemieszczenia do powierzchni, a następnie zastosuj do niej lokalny układ współrzędnych @@ -2498,7 +2498,7 @@ Wybierz inny plik. Only faces can be picked - Można wybrać tylko powierzchnie + Można wybrać tylko ściany @@ -3064,7 +3064,7 @@ Wybierz inny plik. Analysis feature properties - Analysis feature properties + Właściwości cech analizy @@ -3132,17 +3132,17 @@ z harmoniczną / oscylującą siłą napędzającą Whether the boundary condition defines a constant potential - Whether the boundary condition defines a constant potential + Czy warunek brzegowy definiuje stały potencjał Whether the boundary condition defines a farfield potential - Whether the boundary condition defines a farfield potential + Czy warunek brzegowy definiuje potencjał pola dalekiego Whether the boundary condition is for the electric force - Whether the boundary condition is for the electric force + Czy warunek brzegowy dotyczy siły elektrycznej @@ -3703,17 +3703,17 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, Contact constraint - Contact constraint + Kontakt Displacement boundary condition - Displacement boundary condition + Warunek brzegowy przemieszczenia Fixed boundary condition - Fixed boundary condition + Warunek brzegowy utwierdzenia @@ -3723,37 +3723,37 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, Force load - Force load + Obciążenie siłą Heat flux load - Heat flux load + Obciążenie strumieniem ciepła Plane multi-point constraint - Plane multi-point constraint + Wiązanie MPC typu płaszczyzna Pressure load - Pressure load + Obciążenie ciśnieniem Temperature boundary condition - Temperature boundary condition + Warunek brzegowy temperatury Local coordinate system - Local coordinate system + Lokalny układ współrzędnych Edit analysis feature - Edit analysis feature + Edytuj cechę analizy @@ -3771,7 +3771,7 @@ Uwaga: w 2D tylko ustawienie dla x jest możliwe, None - Brak + Żadne @@ -4104,7 +4104,7 @@ Aby uzyskać możliwe zmienne, zobacz pole opisu poniżej. Analysis features - Analysis features + Cechy analizy @@ -4268,7 +4268,7 @@ Aby uzyskać możliwe zmienne, zobacz pole opisu poniżej. Location - Położenie + Umiejscowienie @@ -4597,7 +4597,7 @@ normal vector of the face is used as direction Task Fem Heat flux Load - Task Fem Heat flux Load + Obciążenie strumieniem ciepła @@ -5241,72 +5241,73 @@ użyta przez solver Elmer Electrostatic boundary conditions - Electrostatic boundary conditions + Warunki brzegowe elektrostatyczne &Electrostatic boundary conditions - &Electrostatic boundary conditions + Warunki brzegowe &elektrostatyczne Fluid boundary conditions - Fluid boundary conditions + Warunki brzegowe dla płynu &Fluid boundary conditions - &Fluid boundary conditions + Warunki brzegowe dla &płynu Electromagnetic boundary conditions - Electromagnetic boundary conditions + Warunki brzegowe elektromagnetyczne &Electromagnetic boundary conditions - &Electromagnetic boundary conditions + Warunki brzegowe &elektromagnetyczne + Geometrical analysis features - Geometrical analysis features + Geometryczne cechy analizy &Geometrical analysis features - &Geometrical analysis features + Geometryczne &cechy analizy Mechanical boundary conditions and loads - Mechanical boundary conditions and loads + Warunki brzegowe i obciążenia mechaniczne &Mechanical boundary conditions and loads - &Mechanical boundary conditions and loads + Warunki brzegowe i obciążenia &mechaniczne Thermal boundary conditions and loads - Thermal boundary conditions and loads + Warunki brzegowe i obciążenia termiczne &Thermal boundary conditions and loads - &Thermal boundary conditions and loads + Warunki brzegowe i obciążenia &termiczne Analysis features without solver - Analysis features without solver + Cechy analizy bez solvera &Analysis features without solver - &Analysis features without solver + &Cechy analizy bez solvera @@ -5316,7 +5317,7 @@ użyta przez solver Elmer &Overwrite Constants - &Nadpisz stałe + Nadpisz &stałe @@ -5421,7 +5422,7 @@ użyta przez solver Elmer Removes all clipping planes - Removes all clipping planes + Usuwa wszystkie płaszczyzny cięcia @@ -5579,7 +5580,7 @@ sprężystość (naprężenia) Opens the FEM examples - Opens the FEM examples + Otwiera przykłady MES @@ -5657,7 +5658,7 @@ sprężystość (naprężenia) Converts the surface of a FEM mesh to a mesh - Converts the surface of a FEM mesh to a mesh + Konwertuje powierzchnię siatki MES na siatkę @@ -5683,7 +5684,7 @@ sprężystość (naprężenia) Clears the Mesh of a FEM mesh object - Clears the Mesh of a FEM mesh object + Czyści siatkę obiektu siatki MES @@ -5696,7 +5697,7 @@ sprężystość (naprężenia) Displays FEM mesh information - Displays FEM mesh information + Wyświetla informacje o siatce MES @@ -5709,7 +5710,7 @@ sprężystość (naprężenia) Creates a FEM mesh from a shape by Gmsh mesher - Creates a FEM mesh from a shape by Gmsh mesher + Tworzy siatkę MES z kształtu przy użyciu generatora siatki Gmsh @@ -5735,7 +5736,7 @@ sprężystość (naprężenia) Creates a FEM mesh from a solid or face shape by Netgen internal mesher - Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Tworzy siatkę MES z bryły lub powierzchni przy użyciu wewnętrznego generatora siatki Netgen @@ -5879,7 +5880,7 @@ sprężystość (naprężenia) Edit - Edycja + Edytuj @@ -6103,7 +6104,7 @@ sił magnetodynamicznych 2D Electromagnetic boundary conditions - Electromagnetic boundary conditions + Warunki brzegowe elektromagnetyczne @@ -6261,7 +6262,7 @@ deformacji (sprężystość nieliniowa) Center - Środek + Wyśrodkowane @@ -6310,12 +6311,12 @@ deformacji (sprężystość nieliniowa) Body heat source - Body heat source + Objętościowe źródło ciepła Creates a body heat source - Creates a body heat source + Tworzy objętościowe źródło ciepła @@ -6323,12 +6324,12 @@ deformacji (sprężystość nieliniowa) Centrifugal load - Centrifugal load + Obciążenie siłą odśrodkową Creates a centrifugal load - Creates a centrifugal load + Tworzy obciążenie siłą odśrodkową @@ -6336,12 +6337,12 @@ deformacji (sprężystość nieliniowa) Current density boundary condition - Current density boundary condition + Warunek brzegowy gęstości prądu Creates a current density boundary condition - Creates a current density boundary condition + Tworzy warunek brzegowy gęstości prądu @@ -6349,12 +6350,12 @@ deformacji (sprężystość nieliniowa) Electrostatic potential boundary condition - Electrostatic potential boundary condition + Warunek brzegowy potencjału elektrostatycznego Creates an electrostatic potential boundary condition - Creates an electrostatic potential boundary condition + Tworzy warunek brzegowy potencjału elektrostatycznego @@ -6362,12 +6363,12 @@ deformacji (sprężystość nieliniowa) Flow velocity boundary condition - Flow velocity boundary condition + Warunek brzegowy prędkości przepływu Creates a flow velocity boundary condition - Creates a flow velocity boundary condition + Tworzy warunek brzegowy prędkości przepływu @@ -6375,12 +6376,12 @@ deformacji (sprężystość nieliniowa) Initial flow velocity condition - Initial flow velocity condition + Warunek początkowy prędkości przepływu Creates initial flow velocity condition - Creates initial flow velocity condition + Tworzy warunek początkowy prędkości przepływu @@ -6388,12 +6389,12 @@ deformacji (sprężystość nieliniowa) Initial pressure condition - Initial pressure condition + Warunek początkowy ciśnienia Creates an initial pressure condition - Creates an initial pressure condition + Tworzy warunek początkowy ciśnienia @@ -6401,12 +6402,12 @@ deformacji (sprężystość nieliniowa) Magnetization boundary condition - Magnetization boundary condition + Warunek brzegowy magnetyzacji Creates a magnetization boundary condition - Creates a magnetization boundary condition + Tworzy warunek brzegowy magnetyzacji @@ -6414,12 +6415,12 @@ deformacji (sprężystość nieliniowa) Section print feature - Section print feature + Funkcja zapisu wyników z przekroju Creates a section print feature - Creates a section print feature + Tworzy funkcję zapisu wyników z przekroju @@ -6427,12 +6428,12 @@ deformacji (sprężystość nieliniowa) Gravity load - Gravity load + Obciążenie grawitacją Creates a gravity load - Creates a gravity load + Tworzy obciążenie grawitacją @@ -6440,12 +6441,12 @@ deformacji (sprężystość nieliniowa) Tie constraint - Tie constraint + Wiązanie tie Creates a tie constraint - Creates a tie constraint + Tworzy wiązanie tie diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts index 5cd2903e14..fc9921d002 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-BR.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Restrição de rolamento Creates a bearing constraint - Creates a bearing constraint + Cria uma restrição de rolamento @@ -29,12 +29,12 @@ Contact constraint - Contact constraint + Restrição de contato Creates a contact constraint between faces - Creates a contact constraint between faces + Cria uma restrição de contato entre faces @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + Cria uma condição de limite de deslocamento para uma entidade geométrica @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Cria uma condição de limite fixo para uma entidade geométrica @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Cria uma carregamento de força aplicado a uma entidade geométrica @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Restrição de engrenagem Creates a gear constraint - Creates a gear constraint + Cria uma restrição de engrenagem @@ -137,12 +137,12 @@ Heat flux load - Heat flux load + Carregamento de fluxo de calor Creates a heat flux load acting on a face - Creates a heat flux load acting on a face + Cria um carregamento de fluxo de calor atuando em uma face @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + Temperatura inicial Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + Cria uma temperatura inicial agindo em um corpo @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + Restrição de plano multipontos Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Cria uma restrição de plano multipontos para uma face @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Cria um carregamento de pressão agindo em uma face @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Restrição de polia Creates a pulley constraint - Creates a pulley constraint + Cria uma restrição de polia @@ -227,12 +227,12 @@ Spring - Spring + Mola Creates a spring acting on a face - Creates a spring acting on a face + Cria uma mola agindo em uma face @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + Cria um carregamento de temperatura/fluxo de calor concentrado agindo em uma face @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Cria um sistema de coordenadas locais em uma face @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - O executável especificado + O executável especificado '%1' não existe! Especifique outro arquivo, por favor. @@ -1124,11 +1124,11 @@ serão mescladas para tornar os limites de volume invisíveis. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - O executável especificado + O executável especificado '%1' não existe! Especifique outro arquivo, por favor. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Permita que o aplicativo gerencie (criar, excluir) os diretórios de trabalho para todos os solver. Use diretórios temporários. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1390,11 +1390,11 @@ adicionar um recipiente de análise - The specified executable + The specified executable '%1' does not exist! Specify another file please. - O executável especificado + O executável especificado '%1' não existe! Especifique outro arquivo, por favor. @@ -1435,8 +1435,8 @@ exported from FreeCAD. Objeto de malha FEM: O resultado no arquivo VTK será omitido, apenas os dados da malha serão importados e o objeto de malha FEM FreeCAD será criado. -Objeto resultado FreeCAD: Os dados importados serão convertidos em um -objeto resultado FEM FreeCAD. Nota: esta configuração precisa do componente nome +Objeto resultado FreeCAD: Os dados importados serão convertidos em um +objeto resultado FEM FreeCAD. Nota: esta configuração precisa do componente nome exato, então só funciona com arquivos VTK própriamente exportados do FreeCAD. @@ -1581,11 +1581,11 @@ Se desmarcado, eles serão classificados por seus nomes. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - O executável especificado + O executável especificado '%1' não existe! Especifique outro arquivo, por favor. @@ -1693,11 +1693,11 @@ que "MAXKOI" precisa ser aumentada. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - O executável z88r especificado + O executável z88r especificado '%1' não existe! Especifique outro arquivo, por favor. @@ -3129,7 +3129,7 @@ Especifique outro arquivo, por favor. Imaginary part is only used for equations with a harmonic/oscillating driving force - Parte imaginária é usada apenas para equações + Parte imaginária é usada apenas para equações com forças atuantes harmônicas/oscilantes @@ -3706,7 +3706,7 @@ Nota: para configuração apenas 2D para x é possível, Contact constraint - Contact constraint + Restrição de contato @@ -3731,12 +3731,12 @@ Nota: para configuração apenas 2D para x é possível, Heat flux load - Heat flux load + Carregamento de fluxo de calor Plane multi-point constraint - Plane multi-point constraint + Restrição de plano multipontos diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts index ca0f3943ac..8ae150cd42 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_pt-PT.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts index f63f340639..1069c03d46 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ro.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Fișierul executabil specificat + Fișierul executabil specificat '%1' nu există! Specificați un alt fișier. @@ -1125,11 +1125,11 @@ vor fi unite pentru a face limitele de volum invizibile. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Fișierul executabil specificat + Fișierul executabil specificat '%1' nu există! Specificați un alt fișier. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Fișierul executabil specificat + Fișierul executabil specificat '%1' nu există! Specificați un alt fișier. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Fișierul executabil specificat + Fișierul executabil specificat '%1' nu există! Specificați un alt fișier. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts index d520696518..41343c0b8d 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_ru.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Шарнирное ограничение Creates a bearing constraint - Creates a bearing constraint + Создать шарнирное ограничение @@ -24,17 +24,17 @@ Fem - Мкэ (метод конечных элементов) + МКЭ (метод конечных элементов) Contact constraint - Contact constraint + Контактное ограничение Creates a contact constraint between faces - Creates a contact constraint between faces + Создает ограничение контакта между гранями @@ -42,7 +42,7 @@ Fem - МКЭ (метод конечных элементов) + Мкэ (метод конечных элементов) @@ -52,7 +52,7 @@ Creates a displacement boundary condition for a geometric entity - Creates a displacement boundary condition for a geometric entity + Создает условие для границы смещения для геометрического объекта @@ -70,7 +70,7 @@ Creates a fixed boundary condition for a geometric entity - Creates a fixed boundary condition for a geometric entity + Создает фиксированное граничное условие для геометрического объекта @@ -106,7 +106,7 @@ Creates a force load applied to a geometric entity - Creates a force load applied to a geometric entity + Создает силовую нагрузку, приложенную к геометрическому объекту @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Ограничение передачи Creates a gear constraint - Creates a gear constraint + Создает ограничение передачи @@ -137,12 +137,12 @@ Heat flux load - Heat flux load + Нагрузка на тепловой поток Creates a heat flux load acting on a face - Creates a heat flux load acting on a face + Создает нагрузку теплового потока, воздействующую на поверхность @@ -155,12 +155,12 @@ Initial temperature - Initial temperature + Исходная температура Creates an initial temperature acting on a body - Creates an initial temperature acting on a body + Создает исходную температуру, воздействующую на тело @@ -173,12 +173,12 @@ Plane multi-point constraint - Plane multi-point constraint + Плоскостное многоточечное ограничение Creates a plane multi-point constraint for a face - Creates a plane multi-point constraint for a face + Создает плоскостное многоточечное ограничение для грани @@ -196,7 +196,7 @@ Creates a pressure load acting on a face - Creates a pressure load acting on a face + Создает прижимную нагрузку, действующую на поверхность @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Ограничение шкива Creates a pulley constraint - Creates a pulley constraint + Создает ограничение на шкив @@ -227,12 +227,12 @@ Spring - Spring + Пружина Creates a spring acting on a face - Creates a spring acting on a face + Создает пружину, действующую на грань @@ -250,7 +250,7 @@ Creates a temperature/concentrated heat flux load acting on a face - Creates a temperature/concentrated heat flux load acting on a face + Создает температурную нагрузку/концентрированный тепловой поток, воздействующий на поверхность @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Создайте локальную систему координат на грани @@ -497,7 +497,7 @@ Fem - Мкэ (метод конечных элементов) + МКЭ (метод конечных элементов) @@ -513,7 +513,7 @@ Wrong selection - Неправильный выбор + Неправильное выделение @@ -596,72 +596,72 @@ Make bearing constraint - Make bearing constraint + Создайте ограничение несущей способности Make contact constraint on a face - Make contact constraint on a face + Установите ограничение контакта на грани Make displacement boundary condition on face - Make displacement boundary condition on face + Создайте граничное условие смещения на грани Make fixed boundary condition for geometry - Make fixed boundary condition for geometry + Создайте фиксированное граничное условие для геометрии Make force load on geometry - Make force load on geometry + Создавайте силовую нагрузку на геометрию Make gear constraint - Make gear constraint + Установите ограничение передачи Make heat flux load on face - Make heat flux load on face + Создайте нагрузку теплового потока на грань Make initial temperature condition on body - Make initial temperature condition on body + Установите начальный температурный режим на теле Make plane multi-point constraint on face - Make plane multi-point constraint on face + Создайте плоскостное многоточечное ограничение на грани Make pressure load on face - Make pressure load on face + Приложите прижимную нагрузку на грань Make spring on face - Make spring on face + Создайте пружину на грани Make pulley constraint - Make pulley constraint + Создайте ограничение шкива Make temperature boundary condition on face - Make temperature boundary condition on face + Создайте граничное условие температуры на поверхности Make local coordinate system on face - Make local coordinate system on face + Создайте локальную систему координат на грани @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Указанный исполняемый + Указанный исполняемый '%1' не существует! Укажите другой файл, пожалуйста. @@ -1124,11 +1124,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Указанный исполняемый + Указанный исполняемый '%1' не существует! Укажите другой файл, пожалуйста. @@ -1217,10 +1217,10 @@ not belonging to faces and faces not belonging to volumes. Every analysis feature and, if there are different materials, material consists of two mesh groups, faces and nodes where the constraint or material is applied. - Mesh groups are exported too. -Every analysis feature and, if there are different materials, -material consists of two mesh groups, faces and nodes where -the constraint or material is applied. + Группы ячеек также экспортируются. +Каждый объект анализа и, если имеются разные материалы, +материал состоит из двух групп ячеек, граней и узлов, к которым +применяется ограничение или материал. @@ -1247,8 +1247,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Позволить приложению управлять рабочими каталогами (создавать, удалять) для всех решателей. Использовать временные каталоги. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1323,13 +1323,13 @@ with the last used dialog settings All analysis features are hidden in the model view when the results dialog is opened - All analysis features are hidden in the model view -when the results dialog is opened + Все функции анализа скрыты в представлении модели +при открытии диалогового окна результатов Hide analysis features when open result dialog - Hide analysis features when open result dialog + Скрывать функции анализа при открытии диалогового окна результатов @@ -1388,11 +1388,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Указанный исполняемый + Указанный исполняемый '%1' не существует! Укажите другой файл, пожалуйста. @@ -1574,11 +1574,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Указанный исполняемый + Указанный исполняемый '%1' не существует! Укажите другой файл, пожалуйста. @@ -1685,11 +1685,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - Указанный исполняемый файл z88r + Указанный исполняемый файл z88r '%1' не существует! Укажите другой файл, пожалуйста. @@ -1886,7 +1886,7 @@ Specify another file please. Analysis feature parameters - Analysis feature parameters + Параметры объекта анализа @@ -2042,7 +2042,7 @@ Specify another file please. Only one type of selection (vertex,face or edge) per analysis feature allowed! - Only one type of selection (vertex,face or edge) per analysis feature allowed! + Допускается только один тип выделения (вершина, грань или ребро) для каждого объекта анализа! @@ -2071,7 +2071,7 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Допускается только один тип выделения (вершина, грань или ребро) для каждого объекта анализа! @@ -2149,7 +2149,7 @@ Specify another file please. Wrong selection - Неправильное выделение + Неправильный выбор @@ -2200,7 +2200,7 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Допускается только один тип выделения (вершина, грань или ребро) для каждого объекта анализа! @@ -2229,13 +2229,13 @@ Specify another file please. Only one type of selection (vertex, face or edge) per analysis feature allowed! - Only one type of selection (vertex, face or edge) per analysis feature allowed! + Допускается только один тип выделения (вершина, грань или ребро) для каждого объекта анализа! Wrong selection - Неправильный выбор + Неправильное выделение @@ -2317,7 +2317,7 @@ Specify another file please. Only one face can be selected for a plane multi-point constraint! - Only one face can be selected for a plane multi-point constraint! + Для многоточечного ограничения плоскости может быть выбрана только одна грань! @@ -2441,7 +2441,7 @@ Specify another file please. Analysis feature update error - Analysis feature update error + Ошибка обновления функции анализа @@ -2472,17 +2472,17 @@ Specify another file please. Only one face for rectangular local coordinate system! - Only one face for rectangular local coordinate system! + Только одна грань для прямоугольной локальной системы координат! Only one face for local coordinate system! - Only one face for local coordinate system! + Только одна грань для локальной системы координат! Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface - Only transformable faces can be selected! Apply displacement boundary condition to surface first then apply local coordinate system to surface + Можно выбрать только трансформируемые грани! Сначала примените граничное условие смещения к поверхности, затем примените к поверхности локальную систему координат @@ -3059,7 +3059,7 @@ Specify another file please. Analysis feature properties - Analysis feature properties + Свойства объекта анализа @@ -3127,17 +3127,17 @@ with a harmonic/oscillating driving force Whether the boundary condition defines a constant potential - Whether the boundary condition defines a constant potential + Определяет ли граничное условие постоянный потенциал Whether the boundary condition defines a farfield potential - Whether the boundary condition defines a farfield potential + Определяет ли граничное условие потенциал дальнего поля Whether the boundary condition is for the electric force - Whether the boundary condition is for the electric force + Является ли граничное условие для электрической силы @@ -3409,7 +3409,7 @@ Note: if a face was selected this will be the value in normal face direction settings for y and z will be ignored Действительная часть x-компоненты комплексного потенциала -Примечание: если была выбрана грань, то это будет значение +Примечание: если была выбрана грань, то это будет значение в направлении перпендикулярном грани параметры для y и z будут проигнорированы @@ -3420,7 +3420,7 @@ Note: if a face was selected this will be the value in normal face direction settings for y and z will be ignored Мнимая часть x-компоненты комплексного потенциала -Примечание: если была выбрана грань, то это будет значение +Примечание: если была выбрана грань, то это будет значение в направлении перпендикулярном грани параметры для y и z будут проигнорированы @@ -3429,7 +3429,7 @@ Note: if a face was selected this will be the value Real part of potential y-component Note: for 2D only setting for x is possible, setting for y will be ignored - Действительная часть y-компоненты комплексного потенциала + Действительная часть y-компоненты комплексного потенциала Примечание: для 2D возможна настройка только для x, настройка для y будет проигнорирована @@ -3438,7 +3438,7 @@ Note: for 2D only setting for x is possible, Imaginary part of potential y-component Note: for 2D only setting for x is possible, setting for y will be ignored - Мнимая часть y-компоненты комплексного потенциала + Мнимая часть y-компоненты комплексного потенциала Примечание: для 2D возможна настройка только для x, настройка для y будет проигнорирована @@ -3627,7 +3627,7 @@ Note: for 2D only setting for x is possible, FEM - Метод конечных элементов + МКЭ @@ -3698,17 +3698,17 @@ Note: for 2D only setting for x is possible, Contact constraint - Contact constraint + Контактное ограничение Displacement boundary condition - Displacement boundary condition + Граничное условие смещения Fixed boundary condition - Fixed boundary condition + Фиксированное граничное условие @@ -3718,37 +3718,37 @@ Note: for 2D only setting for x is possible, Force load - Force load + Силовая нагрузка Heat flux load - Heat flux load + Нагрузка на тепловой поток Plane multi-point constraint - Plane multi-point constraint + Плоскостное многоточечное ограничение Pressure load - Pressure load + Нагрузка давлением Temperature boundary condition - Temperature boundary condition + Граничное условие температуры Local coordinate system - Local coordinate system + Локальная система координат Edit analysis feature - Edit analysis feature + Редактировать функцию анализа @@ -4058,7 +4058,7 @@ For possible variables, see the description box below. x - + x @@ -4099,7 +4099,7 @@ For possible variables, see the description box below. Analysis features - Analysis features + Функции анализа @@ -4127,7 +4127,7 @@ For possible variables, see the description box below. Box - Куб + Коробка @@ -4326,7 +4326,7 @@ For possible variables, see the description box below. Remove - Убрать + Удалить @@ -4586,7 +4586,7 @@ normal vector of the face is used as direction Reverse direction - В обратном направлении + Развернуть направление @@ -4594,7 +4594,7 @@ normal vector of the face is used as direction Task Fem Heat flux Load - Task Fem Heat flux Load + Задача МКЭ - нагрузка тепловым потоком @@ -4609,7 +4609,7 @@ normal vector of the face is used as direction Remove - Удалить + Убрать @@ -4866,7 +4866,7 @@ used for the Elmer solver x - x + @@ -5059,7 +5059,7 @@ used for the Elmer solver Wireframe - Каркасная сетка + Каркас @@ -5198,7 +5198,7 @@ used for the Elmer solver FEM - МКЭ + Метод конечных элементов @@ -5238,72 +5238,72 @@ used for the Elmer solver Electrostatic boundary conditions - Electrostatic boundary conditions + Электростатические граничные условия &Electrostatic boundary conditions - &Electrostatic boundary conditions + &Электростатические граничные условия Fluid boundary conditions - Fluid boundary conditions + Граничные условия жидкости &Fluid boundary conditions - &Fluid boundary conditions + &Граничные условия жидкости Electromagnetic boundary conditions - Electromagnetic boundary conditions + Электромагнитные граничные условия &Electromagnetic boundary conditions - &Electromagnetic boundary conditions + &Электромагнитные граничные условия Geometrical analysis features - Geometrical analysis features + Особенности геометрического анализа &Geometrical analysis features - &Geometrical analysis features + &Особенности геометрического анализа Mechanical boundary conditions and loads - Mechanical boundary conditions and loads + Механические граничные условия и нагрузки &Mechanical boundary conditions and loads - &Mechanical boundary conditions and loads + &Механические граничные условия и нагрузки Thermal boundary conditions and loads - Thermal boundary conditions and loads + Тепловые граничные условия и нагрузки &Thermal boundary conditions and loads - &Thermal boundary conditions and loads + &Тепловые граничные условия и нагрузки Analysis features without solver - Analysis features without solver + Возможности анализа без решателя &Analysis features without solver - &Analysis features without solver + &Возможности анализа без решателя @@ -5318,7 +5318,7 @@ used for the Elmer solver Mesh - Сеть + Полигональная сетка @@ -5418,7 +5418,7 @@ used for the Elmer solver Removes all clipping planes - Removes all clipping planes + Удаляет все плоскости отсечения @@ -5575,7 +5575,7 @@ used for the Elmer solver Opens the FEM examples - Opens the FEM examples + Открывает примеры МКЭ @@ -5653,7 +5653,7 @@ used for the Elmer solver Converts the surface of a FEM mesh to a mesh - Converts the surface of a FEM mesh to a mesh + Преобразует поверхность сетки МКЭ в полигональную сетку @@ -5679,7 +5679,7 @@ used for the Elmer solver Clears the Mesh of a FEM mesh object - Clears the Mesh of a FEM mesh object + Очистить сетку объекта сетки МКЭ @@ -5692,7 +5692,7 @@ used for the Elmer solver Displays FEM mesh information - Displays FEM mesh information + Отображение информации о FEM сетке @@ -5705,7 +5705,7 @@ used for the Elmer solver Creates a FEM mesh from a shape by Gmsh mesher - Creates a FEM mesh from a shape by Gmsh mesher + Создать сетку МКЭ из фигуры с помощью генератора сетки Gmsh @@ -5731,7 +5731,7 @@ used for the Elmer solver Creates a FEM mesh from a solid or face shape by Netgen internal mesher - Creates a FEM mesh from a solid or face shape by Netgen internal mesher + Создает сетку FEM из твердого тела или формы грани с помощью внутренней сетки Netgen @@ -6059,7 +6059,7 @@ Please select a result type first. Nodes - Узлов + Узлы @@ -6093,13 +6093,13 @@ Please select a result type first. Fem - МКЭ (метод конечных элементов) + Мкэ (метод конечных элементов) Electromagnetic boundary conditions - Electromagnetic boundary conditions + Электромагнитные граничные условия @@ -6306,12 +6306,12 @@ Please select a result type first. Body heat source - Body heat source + Источник тепла тела Creates a body heat source - Creates a body heat source + Создает источник тепла тела @@ -6319,12 +6319,12 @@ Please select a result type first. Centrifugal load - Centrifugal load + Центробежная нагрузка Creates a centrifugal load - Creates a centrifugal load + Создает центрифужную нагрузку @@ -6332,12 +6332,12 @@ Please select a result type first. Current density boundary condition - Current density boundary condition + Граничные условия плотности потока Creates a current density boundary condition - Creates a current density boundary condition + Создает граничное условие плотности потока @@ -6345,12 +6345,12 @@ Please select a result type first. Electrostatic potential boundary condition - Electrostatic potential boundary condition + Граничное условие электростатического потенциала Creates an electrostatic potential boundary condition - Creates an electrostatic potential boundary condition + Создает граничное условие электростатического потенциала @@ -6358,12 +6358,12 @@ Please select a result type first. Flow velocity boundary condition - Flow velocity boundary condition + Условие для границы скорости потока Creates a flow velocity boundary condition - Creates a flow velocity boundary condition + Создает условия для границы скорости потока @@ -6371,12 +6371,12 @@ Please select a result type first. Initial flow velocity condition - Initial flow velocity condition + Начальное условие скорости потока Creates initial flow velocity condition - Creates initial flow velocity condition + Создает начальное условие скорости потока @@ -6384,12 +6384,12 @@ Please select a result type first. Initial pressure condition - Initial pressure condition + Начальное давление Creates an initial pressure condition - Creates an initial pressure condition + Создает начальное давление @@ -6397,12 +6397,12 @@ Please select a result type first. Magnetization boundary condition - Magnetization boundary condition + Граничные условия намагничивания Creates a magnetization boundary condition - Creates a magnetization boundary condition + Создает условия для границы намагничивания @@ -6410,12 +6410,12 @@ Please select a result type first. Section print feature - Section print feature + Функция печати раздела Creates a section print feature - Creates a section print feature + Создает функцию печати раздела @@ -6423,12 +6423,12 @@ Please select a result type first. Gravity load - Gravity load + Гравитационная нагрузка Creates a gravity load - Creates a gravity load + Создает гравитацию нагрузки @@ -6436,12 +6436,12 @@ Please select a result type first. Tie constraint - Tie constraint + Ограничение связи Creates a tie constraint - Creates a tie constraint + Создает ограничение связи diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sk.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sk.ts index b28f36829c..f29f05ac7c 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sk.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sk.ts @@ -1002,11 +1002,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1082,11 +1082,11 @@ Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1305,11 +1305,11 @@ constraint or material is applied. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1497,11 +1497,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1609,11 +1609,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts index c1112e091a..c417c5f2f0 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sl.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts index 895d006789..f267a4b139 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sr-CS.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Ograničenje ležaja Creates a bearing constraint - Creates a bearing constraint + Pravi ograničenje ležaja @@ -24,17 +24,17 @@ Fem - MKE + Fem Contact constraint - Contact constraint + Kontaktno ograničenje Creates a contact constraint between faces - Creates a contact constraint between faces + Pravi kontaktno ograničenje između sve stranice @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Ograničenje zupčanika Creates a gear constraint - Creates a gear constraint + Pravi ograničenje zupčanika @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Ograničenje remenice Creates a pulley constraint - Creates a pulley constraint + Pravi ograničenje remenice @@ -227,7 +227,7 @@ Spring - Spring + Opruga @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Napravi lokalni koordinatni sistem na stranici @@ -596,12 +596,12 @@ Make bearing constraint - Make bearing constraint + Napravi ograničenje ležaja Make contact constraint on a face - Make contact constraint on a face + Napravi kontaktno ograničenje na stranici @@ -621,7 +621,7 @@ Make gear constraint - Make gear constraint + Napravi ograničenje zupčanika @@ -1022,7 +1022,7 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1124,7 +1124,7 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1390,7 +1390,7 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1581,7 +1581,7 @@ Ako nije čekirano, biće sortirani po imenima. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1693,7 +1693,7 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. @@ -3706,7 +3706,7 @@ Note: for 2D only setting for x is possible, Contact constraint - Contact constraint + Kontaktno ograničenje @@ -4276,7 +4276,7 @@ Za moguće promenljive, pogledaj okvir za opis ispod. Distance - Rastojanje + Distance @@ -6102,7 +6102,7 @@ Please select a result type first. Fem - Fem + MKE diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts index 018781a8af..c5696f11a1 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sr.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Ограничење лежаја Creates a bearing constraint - Creates a bearing constraint + Прави ограничење лежаја @@ -24,17 +24,17 @@ Fem - МКЕ + Fem Contact constraint - Contact constraint + Контактно ограничење Creates a contact constraint between faces - Creates a contact constraint between faces + Прави контактно ограничење између две странице @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Ограничење зупчаника Creates a gear constraint - Creates a gear constraint + Прави ограничење зупчаника @@ -209,12 +209,12 @@ Pulley constraint - Pulley constraint + Ограничење ременице Creates a pulley constraint - Creates a pulley constraint + Прави ограничење ременице @@ -227,7 +227,7 @@ Spring - Spring + Ограничење опруге @@ -268,7 +268,7 @@ Create a local coordinate system on a face - Create a local coordinate system on a face + Направи локални координатни систем на страници @@ -596,12 +596,12 @@ Make bearing constraint - Make bearing constraint + Направи ограничење лежаја Make contact constraint on a face - Make contact constraint on a face + Направи контактно ограничење на страници @@ -621,7 +621,7 @@ Make gear constraint - Make gear constraint + Направи ограничење зупчаника @@ -1022,7 +1022,7 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1124,7 +1124,7 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1390,7 +1390,7 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1581,7 +1581,7 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1693,7 +1693,7 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. @@ -3706,7 +3706,7 @@ Note: for 2D only setting for x is possible, Contact constraint - Contact constraint + Контактно ограничење @@ -4276,7 +4276,7 @@ For possible variables, see the description box below. Distance - Растојање + Distance @@ -6284,7 +6284,7 @@ Please select a result type first. Fem - Fem + МКЕ diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts index d4f3a59576..6bcadd59c0 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_sv-SE.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts index dd8562ca03..ed37462e9a 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_tr.ts @@ -11,12 +11,12 @@ Bearing constraint - Bearing constraint + Rulman kısıtlaması Creates a bearing constraint - Creates a bearing constraint + Rulman kısıtı oluşturma @@ -29,12 +29,12 @@ Contact constraint - Contact constraint + Temas kısıtlaması Creates a contact constraint between faces - Creates a contact constraint between faces + Yüzeyler arasında temas temas kısıtlaması oluştur @@ -119,12 +119,12 @@ Gear constraint - Gear constraint + Dişli kısıtlaması Creates a gear constraint - Creates a gear constraint + Dişli kısıtlaması oluşturma @@ -227,12 +227,12 @@ Spring - Spring + Yay Creates a spring acting on a face - Creates a spring acting on a face + Yüzeyde yay davranışı oluştur @@ -596,12 +596,12 @@ Make bearing constraint - Make bearing constraint + Rulman kısıtlaması yap Make contact constraint on a face - Make contact constraint on a face + Yüzeyde temas kısıtlaması oluştur @@ -646,12 +646,12 @@ Make spring on face - Make spring on face + Yüzeyde yay yap Make pulley constraint - Make pulley constraint + Makara kısıtlaması olştur @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Belirtilen uygulama + Belirtilen uygulama '%1' mevcut değil! Lütfen başka bir dosya belirtin. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Belirtilen uygulama + Belirtilen uygulama '%1' mevcut değil! Lütfen başka bir dosya belirtin. @@ -1248,8 +1248,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Uygulamanın, tüm çözücüler için çalışma dizinlerini yönetmesine (oluştur, sil) izin ver. Geçici dizinleri kullan. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1389,11 +1389,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Belirtilen uygulama + Belirtilen uygulama '%1' mevcut değil! Lütfen başka bir dosya belirtin. @@ -1576,11 +1576,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - Belirtilen uygulama + Belirtilen uygulama '%1' mevcut değil! Lütfen başka bir dosya belirtin. @@ -1688,11 +1688,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. @@ -3701,7 +3701,7 @@ Note: for 2D only setting for x is possible, Contact constraint - Contact constraint + Temas kısıtlaması diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts index 073b831918..f2c67c5964 100755 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_uk.ts @@ -1022,11 +1022,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1124,11 +1124,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1249,8 +1249,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1390,11 +1390,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1582,11 +1582,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1696,11 +1696,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts index e15682ee7c..b47613cbf3 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_val-ES.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_vi.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_vi.ts index e81e9c6ecf..af978e5a05 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_vi.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_vi.ts @@ -1002,11 +1002,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1104,11 +1104,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1323,11 +1323,11 @@ Mọi ràng buộc và, nếu có vật liệu khác nhau, vật liệu chứa h - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1515,11 +1515,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1627,11 +1627,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts index b04b1dcdc1..a639048ecf 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-CN.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - 让应用程序自行管理(创建或删除)求解器的工作目录。使用临时目录。 + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts index 4accc6cca3..05a3c2d61b 100644 --- a/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts +++ b/src/Mod/Fem/Gui/Resources/translations/Fem_zh-TW.ts @@ -1023,11 +1023,11 @@ - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1125,11 +1125,11 @@ will be merged to make the volume boundaries invisible. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1250,8 +1250,8 @@ the constraint or material is applied. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. - Let the application manage (create, delete) the working directories for all solver. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. + Let the application manage (create, delete) the working directories for all solvers. Use temporary directories. @@ -1391,11 +1391,11 @@ adding an analysis container - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1583,11 +1583,11 @@ If unchecked, they will be sorted by their name. - The specified executable + The specified executable '%1' does not exist! Specify another file please. - The specified executable + The specified executable '%1' does not exist! Specify another file please. @@ -1695,11 +1695,11 @@ that "MAXKOI" needs to be increased. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. - The specified z88r executable + The specified z88r executable '%1' does not exist! Specify another file please. diff --git a/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp b/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp index e5a8260965..f702628af2 100644 --- a/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp +++ b/src/Mod/Fem/Gui/TaskAnalysisInfo.cpp @@ -32,9 +32,9 @@ using namespace FemGui; using namespace Gui; TaskAnalysisInfo::TaskAnalysisInfo(Fem::FemAnalysis* pcObject, QWidget* parent) - : TaskBox(Gui::BitmapFactory().pixmap("FEM_Analysis"), tr("Nodes set"), true, parent), - pcObject(pcObject), - ui(new Ui_TaskAnalysisInfo) + : TaskBox(Gui::BitmapFactory().pixmap("FEM_Analysis"), tr("Nodes set"), true, parent) + , pcObject(pcObject) + , ui(new Ui_TaskAnalysisInfo) { // we need a separate container widget to add all controls to proxy = new QWidget(this); diff --git a/src/Mod/Fem/Gui/TaskAnalysisInfo.h b/src/Mod/Fem/Gui/TaskAnalysisInfo.h index c127315c7c..485ae0dc6f 100644 --- a/src/Mod/Fem/Gui/TaskAnalysisInfo.h +++ b/src/Mod/Fem/Gui/TaskAnalysisInfo.h @@ -29,43 +29,48 @@ class Ui_TaskAnalysisInfo; class SoEventCallback; -namespace Base { - class Polygon2d; +namespace Base +{ +class Polygon2d; } -namespace App { - class Property; +namespace App +{ +class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; class ViewVolumeProjection; +} // namespace Gui + +namespace Fem +{ +class FemAnalysis; } -namespace Fem{ - class FemAnalysis; -} - -namespace FemGui { +namespace FemGui +{ class ViewProviderFemMesh; -class TaskAnalysisInfo : public Gui::TaskView::TaskBox +class TaskAnalysisInfo: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskAnalysisInfo(Fem::FemAnalysis *pcObject,QWidget *parent = nullptr); + explicit TaskAnalysisInfo(Fem::FemAnalysis* pcObject, QWidget* parent = nullptr); ~TaskAnalysisInfo() override; protected: - Fem::FemAnalysis *pcObject; + Fem::FemAnalysis* pcObject; private: QWidget* proxy; std::unique_ptr ui; }; -} //namespace FEMGUI_TaskAnalysisInfo_H +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskAnalysisInfo_H +#endif // GUI_TASKVIEW_TaskAnalysisInfo_H diff --git a/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp b/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp index 56459bbeaf..e72b3e78b4 100644 --- a/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp +++ b/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp @@ -22,13 +22,13 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include +#include +#include +#include #endif #include #include @@ -43,10 +43,10 @@ #include #include -#include "TaskCreateNodeSet.h" -#include "ui_TaskCreateNodeSet.h" #include "FemSelectionGate.h" +#include "TaskCreateNodeSet.h" #include "ViewProviderFemMesh.h" +#include "ui_TaskCreateNodeSet.h" using namespace FemGui; @@ -54,10 +54,10 @@ using namespace Gui; TaskCreateNodeSet::TaskCreateNodeSet(Fem::FemSetNodesObject* pcObject, QWidget* parent) - : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), tr("Nodes set"), true, parent), - pcObject(pcObject), - selectionMode(none), - ui(new Ui_TaskCreateNodeSet) + : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), tr("Nodes set"), true, parent) + , pcObject(pcObject) + , selectionMode(none) + , ui(new Ui_TaskCreateNodeSet) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -85,7 +85,6 @@ TaskCreateNodeSet::TaskCreateNodeSet(Fem::FemSetNodesObject* pcObject, QWidget* MeshViewProvider->setHighlightNodes(tempSet); ui->groupBox_AngleSearch->setEnabled(false); - } void TaskCreateNodeSet::Poly() @@ -139,23 +138,27 @@ void TaskCreateNodeSet::DefineNodesCallback(void* ud, SoEventCallback* n) Gui::SelectionRole role; std::vector clPoly = view->getGLPolygon(&role); - if (clPoly.size() < 3) + if (clPoly.size() < 3) { return; - if (clPoly.front() != clPoly.back()) + } + if (clPoly.front() != clPoly.back()) { clPoly.push_back(clPoly.front()); + } SoCamera* cam = view->getSoRenderManager()->getCamera(); SbViewVolume vv = cam->getViewVolume(); Gui::ViewVolumeProjection proj(vv); Base::Polygon2d polygon; - for (auto it : clPoly) + for (auto it : clPoly) { polygon.Add(Base::Vector2d(it[0], it[1])); + } taskBox->DefineNodes(polygon, proj, role == Gui::SelectionRole::Inner ? true : false); } void TaskCreateNodeSet::DefineNodes(const Base::Polygon2d& polygon, - const Gui::ViewVolumeProjection& proj, bool inner) + const Gui::ViewVolumeProjection& proj, + bool inner) { const SMESHDS_Mesh* data = pcObject->FemMesh.getValue() ->FemMesh.getValue() @@ -165,15 +168,17 @@ void TaskCreateNodeSet::DefineNodes(const Base::Polygon2d& polygon, SMDS_NodeIteratorPtr aNodeIter = data->nodesIterator(); Base::Vector3f pt2d; - if (!ui->checkBox_Add->isChecked()) + if (!ui->checkBox_Add->isChecked()) { tempSet.clear(); + } while (aNodeIter->more()) { const SMDS_MeshNode* aNode = aNodeIter->next(); Base::Vector3f vec(aNode->X(), aNode->Y(), aNode->Z()); pt2d = proj(vec); - if (polygon.Contains(Base::Vector2d(pt2d.x, pt2d.y)) == inner) + if (polygon.Contains(Base::Vector2d(pt2d.x, pt2d.y)) == inner) { tempSet.insert(aNode->GetID()); + } } MeshViewProvider->setHighlightNodes(tempSet); @@ -181,8 +186,9 @@ void TaskCreateNodeSet::DefineNodes(const Base::Polygon2d& polygon, void TaskCreateNodeSet::onSelectionChanged(const Gui::SelectionChanges& msg) { - if (selectionMode == none) + if (selectionMode == none) { return; + } if (msg.Type == Gui::SelectionChanges::AddSelection) { std::string subName(msg.pSubName); diff --git a/src/Mod/Fem/Gui/TaskCreateNodeSet.h b/src/Mod/Fem/Gui/TaskCreateNodeSet.h index 16c24f3e95..c1057fd9b5 100644 --- a/src/Mod/Fem/Gui/TaskCreateNodeSet.h +++ b/src/Mod/Fem/Gui/TaskCreateNodeSet.h @@ -30,33 +30,37 @@ class Ui_TaskCreateNodeSet; class SoEventCallback; -namespace Base { +namespace Base +{ class Polygon2d; } -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; class ViewVolumeProjection; -} +} // namespace Gui -namespace FemGui { +namespace FemGui +{ class ViewProviderFemMesh; -class TaskCreateNodeSet : public Gui::TaskView::TaskBox, public Gui::SelectionObserver +class TaskCreateNodeSet: public Gui::TaskView::TaskBox, public Gui::SelectionObserver { Q_OBJECT public: - explicit TaskCreateNodeSet(Fem::FemSetNodesObject *pcObject,QWidget *parent = nullptr); + explicit TaskCreateNodeSet(Fem::FemSetNodesObject* pcObject, QWidget* parent = nullptr); ~TaskCreateNodeSet() override; std::set tempSet; - ViewProviderFemMesh * MeshViewProvider; + ViewProviderFemMesh* MeshViewProvider; private Q_SLOTS: void Poly(); @@ -64,19 +68,23 @@ private Q_SLOTS: void SwitchMethod(int Value); protected: - Fem::FemSetNodesObject *pcObject; - static void DefineNodesCallback(void * ud, SoEventCallback * n); - void DefineNodes(const Base::Polygon2d &polygon,const Gui::ViewVolumeProjection &proj,bool); + Fem::FemSetNodesObject* pcObject; + static void DefineNodesCallback(void* ud, SoEventCallback* n); + void DefineNodes(const Base::Polygon2d& polygon, const Gui::ViewVolumeProjection& proj, bool); protected: void onSelectionChanged(const Gui::SelectionChanges& msg) override; - enum selectionModes { none, PickElement} selectionMode; + enum selectionModes + { + none, + PickElement + } selectionMode; private: QWidget* proxy; std::unique_ptr ui; }; -} //namespace PartDesignGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskCreateNodeSet_H +#endif // GUI_TASKVIEW_TaskCreateNodeSet_H diff --git a/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp b/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp index 351f14dcda..a1f8d6a8f0 100644 --- a/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp +++ b/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp @@ -29,8 +29,8 @@ #include #include -#include "TaskDlgAnalysis.h" #include "TaskAnalysisInfo.h" +#include "TaskDlgAnalysis.h" #include "TaskDriver.h" @@ -42,10 +42,11 @@ using namespace FemGui; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TaskDlgAnalysis::TaskDlgAnalysis(Fem::FemAnalysis* obj) - : TaskDialog(), FemAnalysis(obj) + : TaskDialog() + , FemAnalysis(obj) { - driver = new TaskDriver(obj); - info = new TaskAnalysisInfo(obj); + driver = new TaskDriver(obj); + info = new TaskAnalysisInfo(obj); Content.push_back(driver); Content.push_back(info); @@ -58,27 +59,26 @@ TaskDlgAnalysis::~TaskDlgAnalysis() = default; void TaskDlgAnalysis::open() { - //select->activate(); - //Edge2TaskObject->execute(); - //param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges,Edge2TaskObject->NbrOfCluster); - + // select->activate(); + // Edge2TaskObject->execute(); + // param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges,Edge2TaskObject->NbrOfCluster); } bool TaskDlgAnalysis::accept() { - //try { - // FemSetNodesObject->Nodes.setValues(param->tempSet); - // FemSetNodesObject->recompute(); - // //Gui::Document* doc = Gui::Application::Instance->activeDocument(); - // //if(doc) - // // doc->resetEdit(); - // param->MeshViewProvider->resetHighlightNodes(); - // FemSetNodesObject->Label.setValue(name->name); - // Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + // try { + // FemSetNodesObject->Nodes.setValues(param->tempSet); + // FemSetNodesObject->recompute(); + // //Gui::Document* doc = Gui::Application::Instance->activeDocument(); + // //if(doc) + // // doc->resetEdit(); + // param->MeshViewProvider->resetHighlightNodes(); + // FemSetNodesObject->Label.setValue(name->name); + // Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); // return true; //} - //catch (const Base::Exception& e) { + // catch (const Base::Exception& e) { // Base::Console().Warning("TaskDlgAnalysis::accept(): %s\n", e.what()); //} @@ -87,20 +87,18 @@ bool TaskDlgAnalysis::accept() bool TaskDlgAnalysis::reject() { - //FemSetNodesObject->execute(); - // //Gui::Document* doc = Gui::Application::Instance->activeDocument(); - // //if(doc) - // // doc->resetEdit(); - //param->MeshViewProvider->resetHighlightNodes(); - //Gui::Command::abortCommand(); - //Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + // FemSetNodesObject->execute(); + // //Gui::Document* doc = Gui::Application::Instance->activeDocument(); + // //if(doc) + // // doc->resetEdit(); + // param->MeshViewProvider->resetHighlightNodes(); + // Gui::Command::abortCommand(); + // Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); return true; } void TaskDlgAnalysis::helpRequested() -{ - -} +{} #include "moc_TaskDlgAnalysis.cpp" diff --git a/src/Mod/Fem/Gui/TaskDlgAnalysis.h b/src/Mod/Fem/Gui/TaskDlgAnalysis.h index 57852c1493..cc8eb0f697 100644 --- a/src/Mod/Fem/Gui/TaskDlgAnalysis.h +++ b/src/Mod/Fem/Gui/TaskDlgAnalysis.h @@ -27,21 +27,23 @@ #include -namespace Fem{ - class FemAnalysis; +namespace Fem +{ +class FemAnalysis; } -namespace FemGui { - class TaskAnalysisInfo ; - class TaskDriver; +namespace FemGui +{ +class TaskAnalysisInfo; +class TaskDriver; /// simulation dialog for the TaskView -class TaskDlgAnalysis : public Gui::TaskView::TaskDialog +class TaskDlgAnalysis: public Gui::TaskView::TaskDialog { Q_OBJECT public: - explicit TaskDlgAnalysis(Fem::FemAnalysis *); + explicit TaskDlgAnalysis(Fem::FemAnalysis*); ~TaskDlgAnalysis() override; public: @@ -56,17 +58,18 @@ public: /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Apply; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply; + } protected: - TaskAnalysisInfo *info; - TaskDriver *driver; + TaskAnalysisInfo* info; + TaskDriver* driver; - Fem::FemAnalysis *FemAnalysis; + Fem::FemAnalysis* FemAnalysis; }; +} // namespace FemGui -} //namespace FemGui - -#endif // FEMGUI_TaskDlgAnalysis_H +#endif // FEMGUI_TaskDlgAnalysis_H diff --git a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp index 382a48a32e..ac507e7198 100644 --- a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp +++ b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp @@ -41,10 +41,11 @@ using namespace FemGui; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TaskDlgCreateNodeSet::TaskDlgCreateNodeSet(Fem::FemSetNodesObject* obj) - : TaskDialog(), FemSetNodesObject(obj) + : TaskDialog() + , FemSetNodesObject(obj) { - name = new TaskObjectName(obj); - param = new TaskCreateNodeSet(obj); + name = new TaskObjectName(obj); + param = new TaskCreateNodeSet(obj); Content.push_back(name); Content.push_back(param); @@ -57,10 +58,9 @@ TaskDlgCreateNodeSet::~TaskDlgCreateNodeSet() = default; void TaskDlgCreateNodeSet::open() { - //select->activate(); - //Edge2TaskObject->execute(); - //param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges,Edge2TaskObject->NbrOfCluster); - + // select->activate(); + // Edge2TaskObject->execute(); + // param->setEdgeAndClusterNbr(Edge2TaskObject->NbrOfEdges,Edge2TaskObject->NbrOfCluster); } bool TaskDlgCreateNodeSet::accept() @@ -68,9 +68,9 @@ bool TaskDlgCreateNodeSet::accept() try { FemSetNodesObject->Nodes.setValues(param->tempSet); FemSetNodesObject->recomputeFeature(); - //Gui::Document* doc = Gui::Application::Instance->activeDocument(); - //if(doc) - // doc->resetEdit(); + // Gui::Document* doc = Gui::Application::Instance->activeDocument(); + // if(doc) + // doc->resetEdit(); param->MeshViewProvider->resetHighlightNodes(); FemSetNodesObject->Label.setValue(name->name); Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); @@ -87,9 +87,9 @@ bool TaskDlgCreateNodeSet::accept() bool TaskDlgCreateNodeSet::reject() { FemSetNodesObject->execute(); - //Gui::Document* doc = Gui::Application::Instance->activeDocument(); - //if(doc) - // doc->resetEdit(); + // Gui::Document* doc = Gui::Application::Instance->activeDocument(); + // if(doc) + // doc->resetEdit(); param->MeshViewProvider->resetHighlightNodes(); Gui::Command::abortCommand(); Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); @@ -98,8 +98,6 @@ bool TaskDlgCreateNodeSet::reject() } void TaskDlgCreateNodeSet::helpRequested() -{ - -} +{} #include "moc_TaskDlgCreateNodeSet.cpp" diff --git a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.h b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.h index 3f4d34cc76..9a01e222ec 100644 --- a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.h +++ b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.h @@ -31,19 +31,26 @@ // forward -namespace Gui { namespace TaskView { class TaskSelectLinkProperty;}} +namespace Gui +{ +namespace TaskView +{ +class TaskSelectLinkProperty; +} +} // namespace Gui -namespace FemGui { +namespace FemGui +{ /// simulation dialog for the TaskView -class TaskDlgCreateNodeSet : public Gui::TaskView::TaskDialog +class TaskDlgCreateNodeSet: public Gui::TaskView::TaskDialog { Q_OBJECT public: - explicit TaskDlgCreateNodeSet(Fem::FemSetNodesObject *); + explicit TaskDlgCreateNodeSet(Fem::FemSetNodesObject*); ~TaskDlgCreateNodeSet() override; public: @@ -58,17 +65,18 @@ public: /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } protected: - TaskCreateNodeSet *param; - TaskObjectName *name; + TaskCreateNodeSet* param; + TaskObjectName* name; - Fem::FemSetNodesObject *FemSetNodesObject; + Fem::FemSetNodesObject* FemSetNodesObject; }; +} // namespace FemGui -} //namespace RobotGui - -#endif // ROBOTGUI_TASKDLGSIMULATE_H +#endif // ROBOTGUI_TASKDLGSIMULATE_H diff --git a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp index f0a0046078..ead81c60ee 100644 --- a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp +++ b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp @@ -23,14 +23,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include #include #include -#include #include +#include #include #include #include @@ -48,7 +48,9 @@ using namespace FemGui; //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TaskDlgMeshShapeNetgen::TaskDlgMeshShapeNetgen(FemGui::ViewProviderFemMeshShapeNetgen* obj) - : TaskDialog(), param(nullptr), ViewProviderFemMeshShapeNetgen(obj) + : TaskDialog() + , param(nullptr) + , ViewProviderFemMeshShapeNetgen(obj) { FemMeshShapeNetgenObject = dynamic_cast(obj->getObject()); if (FemMeshShapeNetgenObject) { @@ -74,8 +76,7 @@ void TaskDlgMeshShapeNetgen::open() void TaskDlgMeshShapeNetgen::clicked(int button) { try { - if (QDialogButtonBox::Apply == button && param->touched) - { + if (QDialogButtonBox::Apply == button && param->touched) { Gui::WaitCursor wc; // May throw an exception which we must handle here FemMeshShapeNetgenObject->execute(); @@ -91,13 +92,14 @@ void TaskDlgMeshShapeNetgen::clicked(int button) bool TaskDlgMeshShapeNetgen::accept() { try { - if (param->touched) - { + if (param->touched) { Gui::WaitCursor wc; bool ret = FemMeshShapeNetgenObject->recomputeFeature(); if (!ret) { wc.restoreCursor(); - QMessageBox::critical(Gui::getMainWindow(), tr("Meshing failure"), + QMessageBox::critical( + Gui::getMainWindow(), + tr("Meshing failure"), QString::fromStdString(FemMeshShapeNetgenObject->getStatusString())); return true; } @@ -109,7 +111,7 @@ bool TaskDlgMeshShapeNetgen::accept() Gui::Application::Instance->hideViewProvider(obj); } - //FemSetNodesObject->Label.setValue(name->name); + // FemSetNodesObject->Label.setValue(name->name); Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); Gui::Command::commitCommand(); @@ -124,11 +126,11 @@ bool TaskDlgMeshShapeNetgen::accept() bool TaskDlgMeshShapeNetgen::reject() { - //FemSetNodesObject->execute(); - // //Gui::Document* doc = Gui::Application::Instance->activeDocument(); - // //if(doc) - // // doc->resetEdit(); - //param->MeshViewProvider->resetHighlightNodes(); + // FemSetNodesObject->execute(); + // //Gui::Document* doc = Gui::Application::Instance->activeDocument(); + // //if(doc) + // // doc->resetEdit(); + // param->MeshViewProvider->resetHighlightNodes(); Gui::Command::abortCommand(); Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); @@ -136,8 +138,6 @@ bool TaskDlgMeshShapeNetgen::reject() } void TaskDlgMeshShapeNetgen::helpRequested() -{ - -} +{} #include "moc_TaskDlgMeshShapeNetgen.cpp" diff --git a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.h b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.h index 792b4ee461..58be0b6211 100644 --- a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.h +++ b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.h @@ -26,23 +26,25 @@ #include -namespace Fem { - class FemMeshShapeNetgenObject; +namespace Fem +{ +class FemMeshShapeNetgenObject; } -namespace FemGui { +namespace FemGui +{ class TaskTetParameter; class ViewProviderFemMeshShapeNetgen; /// simulation dialog for the TaskView -class TaskDlgMeshShapeNetgen : public Gui::TaskView::TaskDialog +class TaskDlgMeshShapeNetgen: public Gui::TaskView::TaskDialog { Q_OBJECT public: - explicit TaskDlgMeshShapeNetgen(FemGui::ViewProviderFemMeshShapeNetgen *); + explicit TaskDlgMeshShapeNetgen(FemGui::ViewProviderFemMeshShapeNetgen*); ~TaskDlgMeshShapeNetgen() override; public: @@ -59,17 +61,18 @@ public: /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel|QDialogButtonBox::Apply; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Apply; + } protected: - TaskTetParameter *param; + TaskTetParameter* param; - Fem::FemMeshShapeNetgenObject *FemMeshShapeNetgenObject; - FemGui::ViewProviderFemMeshShapeNetgen *ViewProviderFemMeshShapeNetgen; + Fem::FemMeshShapeNetgenObject* FemMeshShapeNetgenObject; + FemGui::ViewProviderFemMeshShapeNetgen* ViewProviderFemMeshShapeNetgen; }; +} // namespace FemGui -} //namespace FemGui - -#endif // FEMGUI_TaskDlgMeshShapeNetgen_H +#endif // FEMGUI_TaskDlgMeshShapeNetgen_H diff --git a/src/Mod/Fem/Gui/TaskDriver.cpp b/src/Mod/Fem/Gui/TaskDriver.cpp index eed9c8ef52..5b05e3c655 100644 --- a/src/Mod/Fem/Gui/TaskDriver.cpp +++ b/src/Mod/Fem/Gui/TaskDriver.cpp @@ -32,9 +32,9 @@ using namespace FemGui; using namespace Gui; TaskDriver::TaskDriver(Fem::FemAnalysis* pcObject, QWidget* parent) - : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), tr("Nodes set"), true, parent), - pcObject(pcObject), - ui(new Ui_TaskDriver) + : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), tr("Nodes set"), true, parent) + , pcObject(pcObject) + , ui(new Ui_TaskDriver) { // we need a separate container widget to add all controls to proxy = new QWidget(this); diff --git a/src/Mod/Fem/Gui/TaskDriver.h b/src/Mod/Fem/Gui/TaskDriver.h index 58fc8435ff..cdcb8e03ca 100644 --- a/src/Mod/Fem/Gui/TaskDriver.h +++ b/src/Mod/Fem/Gui/TaskDriver.h @@ -28,43 +28,47 @@ class Ui_TaskDriver; class SoEventCallback; -namespace Base { +namespace Base +{ class Polygon2d; } -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; class ViewVolumeProjection; -} +} // namespace Gui -namespace Fem{ - class FemAnalysis; +namespace Fem +{ +class FemAnalysis; } - -namespace FemGui { +namespace FemGui +{ -class TaskDriver : public Gui::TaskView::TaskBox +class TaskDriver: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskDriver(Fem::FemAnalysis *pcObject,QWidget *parent = nullptr); + explicit TaskDriver(Fem::FemAnalysis* pcObject, QWidget* parent = nullptr); ~TaskDriver() override; protected: - Fem::FemAnalysis *pcObject; + Fem::FemAnalysis* pcObject; private: QWidget* proxy; std::unique_ptr ui; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEMGUI_TaskDriver_H +#endif // FEMGUI_TaskDriver_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraint.cpp b/src/Mod/Fem/Gui/TaskFemConstraint.cpp index 398b455b8a..93aee4b5a0 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraint.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraint.cpp @@ -24,12 +24,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include // OvG conversion between string and int etc. +#include +#include +#include +#include +#include // OvG conversion between string and int etc. +#include #endif #include @@ -52,8 +52,13 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraint */ -TaskFemConstraint::TaskFemConstraint(ViewProviderFemConstraint *ConstraintView,QWidget *parent,const char* pixmapname) - : TaskBox(Gui::BitmapFactory().pixmap(pixmapname),tr("Analysis feature parameters"),true, parent) +TaskFemConstraint::TaskFemConstraint(ViewProviderFemConstraint* ConstraintView, + QWidget* parent, + const char* pixmapname) + : TaskBox(Gui::BitmapFactory().pixmap(pixmapname), + tr("Analysis feature parameters"), + true, + parent) , proxy(nullptr) , deleteAction(nullptr) , ConstraintView(ConstraintView) @@ -68,8 +73,9 @@ TaskFemConstraint::TaskFemConstraint(ViewProviderFemConstraint *ConstraintView,Q // Hide the shaft wizard table widget to make more space ConstraintView->wizardSubLayout->itemAt(0)->widget()->hide(); QGridLayout* buttons = ConstraintView->wizardSubLayout->findChild(); - for (int b = 0; b < buttons->count(); b++) + for (int b = 0; b < buttons->count(); b++) { buttons->itemAt(b)->widget()->hide(); + } // Show this dialog for the FEM constraint ConstraintView->wizardWidget->addWidget(this); @@ -81,18 +87,24 @@ TaskFemConstraint::TaskFemConstraint(ViewProviderFemConstraint *ConstraintView,Q buttonBox->addButton(okButton, QDialogButtonBox::AcceptRole); buttonBox->addButton(cancelButton, QDialogButtonBox::RejectRole); QObject::connect(okButton, &QPushButton::clicked, this, &TaskFemConstraint::onButtonWizOk); - QObject::connect(cancelButton, &QPushButton::clicked, this, &TaskFemConstraint::onButtonWizCancel); + QObject::connect(cancelButton, + &QPushButton::clicked, + this, + &TaskFemConstraint::onButtonWizCancel); ConstraintView->wizardWidget->addWidget(buttonBox); } } -void TaskFemConstraint::keyPressEvent(QKeyEvent *ke) +void TaskFemConstraint::keyPressEvent(QKeyEvent* ke) { - if ((ConstraintView->wizardWidget) && (ConstraintView->wizardSubLayout)) + if ((ConstraintView->wizardWidget) && (ConstraintView->wizardSubLayout)) { // Prevent from closing this dialog AND the shaft wizard dialog - // TODO: This should trigger an update in the shaft wizard but its difficult to access a python dialog from here... - if (ke->key() == Qt::Key_Return) + // TODO: This should trigger an update in the shaft wizard but its difficult to access a + // python dialog from here... + if (ke->key() == Qt::Key_Return) { return; + } + } TaskBox::keyPressEvent(ke); } @@ -103,14 +115,15 @@ const std::string TaskFemConstraint::getReferences(const std::vector::const_iterator i = items.begin(); i != items.end(); i++) { int pos = i->find_last_of(":"); std::string objStr = "App.ActiveDocument." + i->substr(0, pos); - std::string refStr = "\"" + i->substr(pos+1) + "\""; + std::string refStr = "\"" + i->substr(pos + 1) + "\""; result = result + (i != items.begin() ? ", " : "") + "(" + objStr + "," + refStr + ")"; } return result; } -const std::string TaskFemConstraint::getScale() const //OvG: Return pre-calculated scale for constraint display +const std::string +TaskFemConstraint::getScale() const // OvG: Return pre-calculated scale for constraint display { std::string result; Fem::Constraint* pcConstraint = static_cast(ConstraintView->getObject()); @@ -118,7 +131,8 @@ const std::string TaskFemConstraint::getScale() const //OvG: Return pre-calculat return result; } -void TaskFemConstraint::setSelection(QListWidgetItem* item) { +void TaskFemConstraint::setSelection(QListWidgetItem* item) +{ // highlights the list item in the model // get the document name @@ -138,7 +152,8 @@ void TaskFemConstraint::setSelection(QListWidgetItem* item) { Gui::Selection().addSelection(docName.c_str(), objName.c_str(), ItemName.c_str(), 0, 0, 0); } -void TaskFemConstraint::onReferenceDeleted(const int row) { +void TaskFemConstraint::onReferenceDeleted(const int row) +{ Fem::Constraint* pcConstraint = static_cast(ConstraintView->getObject()); std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); @@ -148,11 +163,14 @@ void TaskFemConstraint::onReferenceDeleted(const int row) { pcConstraint->References.setValues(Objects, SubElements); } -void TaskFemConstraint::onButtonReference(const bool pressed) { - if (pressed) +void TaskFemConstraint::onButtonReference(const bool pressed) +{ + if (pressed) { selectionMode = selref; - else + } + else { selectionMode = selnone; + } Gui::Selection().clearSelection(); } @@ -170,26 +188,31 @@ void TaskFemConstraint::onButtonWizOk() // Show the wizard shaft dialog again ConstraintView->wizardSubLayout->itemAt(0)->widget()->show(); QGridLayout* buttons = ConstraintView->wizardSubLayout->findChild(); - for (int b = 0; b < buttons->count(); b++) + for (int b = 0; b < buttons->count(); b++) { buttons->itemAt(b)->widget()->show(); + } - Gui::Application::Instance->activeDocument()->resetEdit(); // Reaches ViewProviderFemConstraint::unsetEdit() eventually + Gui::Application::Instance->activeDocument() + ->resetEdit(); // Reaches ViewProviderFemConstraint::unsetEdit() eventually } void TaskFemConstraint::onButtonWizCancel() { Fem::Constraint* pcConstraint = static_cast(ConstraintView->getObject()); - if (pcConstraint) + if (pcConstraint) { pcConstraint->getDocument()->removeObject(pcConstraint->getNameInDocument()); + } onButtonWizOk(); } -const QString TaskFemConstraint::makeRefText(const std::string& objName, const std::string& subName) const +const QString TaskFemConstraint::makeRefText(const std::string& objName, + const std::string& subName) const { return QString::fromUtf8((objName + ":" + subName).c_str()); } -const QString TaskFemConstraint::makeRefText(const App::DocumentObject* obj, const std::string& subName) const +const QString TaskFemConstraint::makeRefText(const App::DocumentObject* obj, + const std::string& subName) const { return QString::fromUtf8((std::string(obj->getNameInDocument()) + ":" + subName).c_str()); } @@ -208,11 +231,11 @@ void TaskFemConstraint::createDeleteAction(QListWidget* parentList) parentList->setContextMenuPolicy(Qt::ActionsContextMenu); } -bool TaskFemConstraint::KeyEvent(QEvent *e) +bool TaskFemConstraint::KeyEvent(QEvent* e) { // in case another instance takes key events, accept the overridden key even if (e && e->type() == QEvent::ShortcutOverride) { - QKeyEvent * kevent = static_cast(e); + QKeyEvent* kevent = static_cast(e); if (kevent->modifiers() == Qt::NoModifier) { if (deleteAction && kevent->key() == Qt::Key_Delete) { kevent->accept(); @@ -222,10 +245,11 @@ bool TaskFemConstraint::KeyEvent(QEvent *e) } // if we have a Del key, trigger the deleteAction else if (e && e->type() == QEvent::KeyPress) { - QKeyEvent * kevent = static_cast(e); + QKeyEvent* kevent = static_cast(e); if (kevent->key() == Qt::Key_Delete) { - if (deleteAction && deleteAction->isEnabled()) + if (deleteAction && deleteAction->isEnabled()) { deleteAction->trigger(); + } return true; } } @@ -243,7 +267,11 @@ bool TaskFemConstraint::KeyEvent(QEvent *e) void TaskDlgFemConstraint::open() { ConstraintView->setVisible(true); - Gui::Command::runCommand(Gui::Command::Doc,ViewProviderFemConstraint::gethideMeshShowPartStr((static_cast(ConstraintView->getObject()))->getNameInDocument()).c_str()); //OvG: Hide meshes and show parts + Gui::Command::runCommand( + Gui::Command::Doc, + ViewProviderFemConstraint::gethideMeshShowPartStr( + (static_cast(ConstraintView->getObject()))->getNameInDocument()) + .c_str()); // OvG: Hide meshes and show parts } bool TaskDlgFemConstraint::accept() @@ -254,16 +282,23 @@ bool TaskDlgFemConstraint::accept() std::string refs = parameter->getReferences(); if (!refs.empty()) { - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.References = [%s]", name.c_str(), refs.c_str()); - } else { - QMessageBox::warning(parameter, tr("Input error"), tr("You must specify at least one reference")); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.References = [%s]", + name.c_str(), + refs.c_str()); + } + else { + QMessageBox::warning(parameter, + tr("Input error"), + tr("You must specify at least one reference")); return false; } - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()"); - if (!ConstraintView->getObject()->isValid()) + Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); + if (!ConstraintView->getObject()->isValid()) { throw Base::RuntimeError(ConstraintView->getObject()->getStatusString()); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + } + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); Gui::Command::commitCommand(); } catch (const Base::Exception& e) { @@ -278,7 +313,7 @@ bool TaskDlgFemConstraint::reject() { // roll back the changes Gui::Command::abortCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); return true; } diff --git a/src/Mod/Fem/Gui/TaskFemConstraint.h b/src/Mod/Fem/Gui/TaskFemConstraint.h index a3e9064b82..cbe061647e 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraint.h +++ b/src/Mod/Fem/Gui/TaskFemConstraint.h @@ -37,17 +37,23 @@ class QAction; class QListWidget; class QListWidgetItem; -namespace FemGui { +namespace FemGui +{ -class TaskFemConstraint : public Gui::TaskView::TaskBox, public Gui::SelectionObserver +class TaskFemConstraint: public Gui::TaskView::TaskBox, public Gui::SelectionObserver { Q_OBJECT public: - explicit TaskFemConstraint(ViewProviderFemConstraint *ConstraintView,QWidget *parent = nullptr,const char* pixmapname = ""); + explicit TaskFemConstraint(ViewProviderFemConstraint* ConstraintView, + QWidget* parent = nullptr, + const char* pixmapname = ""); ~TaskFemConstraint() override = default; - virtual const std::string getReferences() const {return std::string();} + virtual const std::string getReferences() const + { + return std::string(); + } const std::string getReferences(const std::vector& items) const; const std::string getScale() const; @@ -60,34 +66,44 @@ protected Q_SLOTS: void onButtonWizCancel(); protected: - void changeEvent(QEvent *e) override { TaskBox::changeEvent(e); } + void changeEvent(QEvent* e) override + { + TaskBox::changeEvent(e); + } const QString makeRefText(const std::string& objName, const std::string& subName) const; const QString makeRefText(const App::DocumentObject* obj, const std::string& subName) const; - void keyPressEvent(QKeyEvent * ke) override; + void keyPressEvent(QKeyEvent* ke) override; void createDeleteAction(QListWidget* parentList); - bool KeyEvent(QEvent *e); - void onSelectionChanged(const Gui::SelectionChanges&) override {} + bool KeyEvent(QEvent* e); + void onSelectionChanged(const Gui::SelectionChanges&) override + {} protected: QWidget* proxy; QAction* deleteAction; Gui::WeakPtrT ConstraintView; - enum {seldir, selref, selloc, selnone} selectionMode; + enum + { + seldir, + selref, + selloc, + selnone + } selectionMode; private: - // This seems to be the only way to access the widgets again in order to remove them from the dialog + // This seems to be the only way to access the widgets again in order to remove them from the + // dialog QDialogButtonBox* buttonBox; QPushButton* okButton; QPushButton* cancelButton; }; /// simulation dialog for the TaskView -class TaskDlgFemConstraint : public Gui::TaskView::TaskDialog +class TaskDlgFemConstraint: public Gui::TaskView::TaskDialog { Q_OBJECT public: - /// is called the TaskView when the dialog is opened void open() override; /* @@ -99,20 +115,26 @@ public: /// is called by the framework if the dialog is rejected (Cancel) bool reject() override; bool isAllowedAlterDocument() const override - { return false; } + { + return false; + } /// returns for Close and Help button QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } ViewProviderFemConstraint* getConstraintView() const - { return ConstraintView; } + { + return ConstraintView; + } protected: - ViewProviderFemConstraint *ConstraintView; - TaskFemConstraint *parameter; + ViewProviderFemConstraint* ConstraintView; + TaskFemConstraint* parameter; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraint_H +#endif // GUI_TASKVIEW_TaskFemConstraint_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp index 114f2e8c5d..deedc32b87 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintBearing.cpp @@ -24,11 +24,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -39,8 +39,8 @@ #include #include -#include "ui_TaskFemConstraintBearing.h" #include "TaskFemConstraintBearing.h" +#include "ui_TaskFemConstraintBearing.h" using namespace FemGui; @@ -49,9 +49,10 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintBearing */ TaskFemConstraintBearing::TaskFemConstraintBearing(ViewProviderFemConstraint* ConstraintView, - QWidget* parent, const char* pixmapname) - : TaskFemConstraint(ConstraintView, parent, pixmapname), - ui(new Ui_TaskFemConstraintBearing) + QWidget* parent, + const char* pixmapname) + : TaskFemConstraint(ConstraintView, parent, pixmapname) + , ui(new Ui_TaskFemConstraintBearing) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -86,28 +87,34 @@ TaskFemConstraintBearing::TaskFemConstraintBearing(ViewProviderFemConstraint* Co std::vector SubElements = pcConstraint->References.getSubValues(); std::vector locStrings = pcConstraint->Location.getSubValues(); QString loc; - if (!locStrings.empty()) + if (!locStrings.empty()) { loc = makeRefText(pcConstraint->Location.getValue(), locStrings.front()); + } bool axialfree = pcConstraint->AxialFree.getValue(); // Fill data into dialog elements ui->spinDistance->setValue(distance); ui->listReferences->clear(); - for (std::size_t i = 0; i < Objects.size(); i++) + for (std::size_t i = 0; i < Objects.size(); i++) { ui->listReferences->addItem(makeRefText(Objects[i], SubElements[i])); - if (!Objects.empty()) + } + if (!Objects.empty()) { ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); + } ui->lineLocation->setText(loc); ui->checkAxial->setChecked(axialfree); - connect(ui->spinDistance, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintBearing::onDistanceChanged); - connect(ui->buttonReference, &QPushButton::pressed, - this, [=]{onButtonReference(true);}); - connect(ui->buttonLocation, &QPushButton::pressed, - this, [=]{onButtonLocation(true);}); - connect(ui->checkAxial, &QCheckBox::toggled, - this, &TaskFemConstraintBearing::onCheckAxial); + connect(ui->spinDistance, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintBearing::onDistanceChanged); + connect(ui->buttonReference, &QPushButton::pressed, this, [=] { + onButtonReference(true); + }); + connect(ui->buttonLocation, &QPushButton::pressed, this, [=] { + onButtonLocation(true); + }); + connect(ui->checkAxial, &QCheckBox::toggled, this, &TaskFemConstraintBearing::onCheckAxial); // Hide unwanted ui elements ui->labelDiameter->setVisible(false); @@ -134,15 +141,18 @@ void TaskFemConstraintBearing::onSelectionChanged(const Gui::SelectionChanges& m { if (msg.Type == Gui::SelectionChanges::AddSelection) { // Don't allow selection in other document - if (strcmp(msg.pDocName, ConstraintView->getObject()->getDocument()->getName()) != 0) + if (strcmp(msg.pDocName, ConstraintView->getObject()->getDocument()->getName()) != 0) { return; + } - if (!msg.pSubName || msg.pSubName[0] == '\0') + if (!msg.pSubName || msg.pSubName[0] == '\0') { return; + } std::string subName(msg.pSubName); - if (selectionMode == selnone) + if (selectionMode == selnone) { return; + } Fem::ConstraintBearing* pcConstraint = static_cast(ConstraintView->getObject()); @@ -170,8 +180,9 @@ void TaskFemConstraintBearing::onSelectionChanged(const Gui::SelectionChanges& m // Only cylindrical faces allowed BRepAdaptor_Surface surface(TopoDS::Face(ref)); if (surface.GetType() != GeomAbs_Cylinder) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only cylindrical faces can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only cylindrical faces can be picked")); return; } @@ -187,21 +198,24 @@ void TaskFemConstraintBearing::onSelectionChanged(const Gui::SelectionChanges& m else if (selectionMode == selloc) { if (subName.substr(0, 4) == "Face") { if (!Fem::Tools::isPlanar(TopoDS::Face(ref))) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only planar faces can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only planar faces can be picked")); return; } } else if (subName.substr(0, 4) == "Edge") { if (!Fem::Tools::isLinear(TopoDS::Edge(ref))) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only linear edges can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only linear edges can be picked")); return; } } else { - QMessageBox::warning( - this, tr("Selection error"), tr("Only faces and edges can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only faces and edges can be picked")); return; } std::vector references(1, subName); @@ -223,17 +237,20 @@ void TaskFemConstraintBearing::onDistanceChanged(double l) pcConstraint->Dist.setValue(l); } -void TaskFemConstraintBearing::onReferenceDeleted() { +void TaskFemConstraintBearing::onReferenceDeleted() +{ int row = ui->listReferences->currentIndex().row(); TaskFemConstraint::onReferenceDeleted(row); ui->listReferences->model()->removeRow(row); ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); } -void TaskFemConstraintBearing::onButtonLocation(const bool pressed) { +void TaskFemConstraintBearing::onButtonLocation(const bool pressed) +{ if (pressed) { selectionMode = selloc; - } else { + } + else { selectionMode = selnone; } ui->buttonLocation->setChecked(pressed); @@ -257,16 +274,18 @@ const std::string TaskFemConstraintBearing::getReferences() const int rows = ui->listReferences->model()->rowCount(); std::vector items; - for (int r = 0; r < rows; r++) + for (int r = 0; r < rows; r++) { items.push_back(ui->listReferences->item(r)->text().toStdString()); + } return TaskFemConstraint::getReferences(items); } const std::string TaskFemConstraintBearing::getLocationName() const { std::string loc = ui->lineLocation->text().toStdString(); - if (loc.empty()) + if (loc.empty()) { return ""; + } int pos = loc.find_last_of(":"); return loc.substr(0, pos).c_str(); @@ -275,11 +294,12 @@ const std::string TaskFemConstraintBearing::getLocationName() const const std::string TaskFemConstraintBearing::getLocationObject() const { std::string loc = ui->lineLocation->text().toStdString(); - if (loc.empty()) + if (loc.empty()) { return ""; + } int pos = loc.find_last_of(":"); - return loc.substr(pos+1).c_str(); + return loc.substr(pos + 1).c_str(); } bool TaskFemConstraintBearing::getAxial() const @@ -289,12 +309,12 @@ bool TaskFemConstraintBearing::getAxial() const TaskFemConstraintBearing::~TaskFemConstraintBearing() = default; -bool TaskFemConstraintBearing::event(QEvent *e) +bool TaskFemConstraintBearing::event(QEvent* e) { return TaskFemConstraint::KeyEvent(e); } -void TaskFemConstraintBearing::changeEvent(QEvent *e) +void TaskFemConstraintBearing::changeEvent(QEvent* e) { TaskBox::changeEvent(e); if (e->type() == QEvent::LanguageChange) { @@ -347,8 +367,9 @@ bool TaskDlgFemConstraintBearing::accept() buf.toStdString().c_str()); } else { - Gui::Command::doCommand( - Gui::Command::Doc, "App.ActiveDocument.%s.Location = None", name.c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Location = None", + name.c_str()); } Gui::Command::doCommand(Gui::Command::Doc, diff --git a/src/Mod/Fem/Gui/TaskFemConstraintBearing.h b/src/Mod/Fem/Gui/TaskFemConstraintBearing.h index ffa0f9094b..61d6c65f69 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintBearing.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintBearing.h @@ -24,8 +24,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintBearing_H #define GUI_TASKVIEW_TaskFemConstraintBearing_H -#include #include +#include #include "TaskFemConstraint.h" #include "ViewProviderFemConstraintBearing.h" @@ -33,17 +33,20 @@ class Ui_TaskFemConstraintBearing; -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace FemGui { +namespace FemGui +{ -class TaskFemConstraintBearing : public TaskFemConstraint +class TaskFemConstraintBearing: public TaskFemConstraint { Q_OBJECT @@ -66,8 +69,8 @@ private Q_SLOTS: void onCheckAxial(bool); protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void onSelectionChanged(const Gui::SelectionChanges& msg) override; protected: @@ -75,18 +78,18 @@ protected: }; /// simulation dialog for the TaskView -class TaskDlgFemConstraintBearing : public TaskDlgFemConstraint +class TaskDlgFemConstraintBearing: public TaskDlgFemConstraint { Q_OBJECT public: TaskDlgFemConstraintBearing() = default; - explicit TaskDlgFemConstraintBearing(ViewProviderFemConstraintBearing *ConstraintView); + explicit TaskDlgFemConstraintBearing(ViewProviderFemConstraintBearing* ConstraintView); /// is called by the framework if the dialog is accepted (Ok) bool accept() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintBearing_H +#endif // GUI_TASKVIEW_TaskFemConstraintBearing_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp b/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp index 13c4dd6842..cc15da6dbb 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintContact.cpp @@ -26,14 +26,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif +#include "Mod/Fem/App/FemConstraintContact.h" #include #include -#include "Mod/Fem/App/FemConstraintContact.h" #include #include "TaskFemConstraintContact.h" @@ -47,36 +47,44 @@ using namespace Gui; TaskFemConstraintContact::TaskFemConstraintContact(ViewProviderFemConstraintContact* ConstraintView, QWidget* parent) - : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintContact"), - ui(new Ui_TaskFemConstraintContact) + : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintContact") + , ui(new Ui_TaskFemConstraintContact) { proxy = new QWidget(this); ui->setupUi(proxy); QMetaObject::connectSlotsByName(this); QAction* actionSlave = new QAction(tr("Delete"), ui->lw_referencesSlave); - connect(actionSlave, &QAction::triggered, - this, &TaskFemConstraintContact::onReferenceDeletedSlave); + connect(actionSlave, + &QAction::triggered, + this, + &TaskFemConstraintContact::onReferenceDeletedSlave); QAction* actionMaster = new QAction(tr("Delete"), ui->lw_referencesMaster); - connect(actionMaster, &QAction::triggered, - this, &TaskFemConstraintContact::onReferenceDeletedMaster); + connect(actionMaster, + &QAction::triggered, + this, + &TaskFemConstraintContact::onReferenceDeletedMaster); ui->lw_referencesSlave->addAction(actionSlave); ui->lw_referencesSlave->setContextMenuPolicy(Qt::ActionsContextMenu); - connect(ui->lw_referencesSlave, &QListWidget::currentItemChanged, - this, &TaskFemConstraintContact::setSelection); + connect(ui->lw_referencesSlave, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintContact::setSelection); ui->lw_referencesMaster->addAction(actionMaster); ui->lw_referencesMaster->setContextMenuPolicy(Qt::ActionsContextMenu); - connect(ui->lw_referencesMaster, &QListWidget::currentItemChanged, - this, &TaskFemConstraintContact::setSelection); + connect(ui->lw_referencesMaster, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintContact::setSelection); this->groupLayout()->addWidget(proxy); -/* Note: */ + /* Note: */ // Get the feature data Fem::ConstraintContact* pcConstraint = static_cast(ConstraintView->getObject()); @@ -91,33 +99,42 @@ TaskFemConstraintContact::TaskFemConstraintContact(ViewProviderFemConstraintCont ui->spSlope->setValue(slope); ui->spFriction->setValue(friction); -/* */ + /* */ ui->lw_referencesMaster->clear(); ui->lw_referencesSlave->clear(); // QMessageBox::warning(this, tr("Objects.size"), QString::number(Objects.size())); if (Objects.size() == 1) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one face in object! - moved to master face")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one face in object! - moved to master face")); ui->lw_referencesMaster->addItem(makeRefText(Objects[0], SubElements[0])); } - if (Objects.size() == 2 ) { + if (Objects.size() == 2) { ui->lw_referencesMaster->addItem(makeRefText(Objects[1], SubElements[1])); ui->lw_referencesSlave->addItem(makeRefText(Objects[0], SubElements[0])); } // Selection buttons - connect(ui->btnAddSlave, &QToolButton::clicked, - this, &TaskFemConstraintContact::addToSelectionSlave); - connect(ui->btnRemoveSlave, &QToolButton::clicked, - this, &TaskFemConstraintContact::removeFromSelectionSlave); + connect(ui->btnAddSlave, + &QToolButton::clicked, + this, + &TaskFemConstraintContact::addToSelectionSlave); + connect(ui->btnRemoveSlave, + &QToolButton::clicked, + this, + &TaskFemConstraintContact::removeFromSelectionSlave); - connect(ui->btnAddMaster, &QToolButton::clicked, - this, &TaskFemConstraintContact::addToSelectionMaster); - connect(ui->btnRemoveMaster, &QToolButton::clicked, - this, &TaskFemConstraintContact::removeFromSelectionMaster); + connect(ui->btnAddMaster, + &QToolButton::clicked, + this, + &TaskFemConstraintContact::addToSelectionMaster); + connect(ui->btnRemoveMaster, + &QToolButton::clicked, + this, + &TaskFemConstraintContact::removeFromSelectionMaster); updateUI(); } @@ -141,7 +158,8 @@ void TaskFemConstraintContact::updateUI() void TaskFemConstraintContact::addToSelectionSlave() { int rows = ui->lw_referencesSlave->model()->rowCount(); - std::vector selection = Gui::Selection().getSelectionEx();//gets vector of selected objects of active document + std::vector selection = + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (rows == 1) { QMessageBox::warning( this, @@ -150,13 +168,14 @@ void TaskFemConstraintContact::addToSelectionSlave() Gui::Selection().clearSelection(); return; } - if (selection.empty()){ + if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; } if ((rows == 0) && (selection.size() >= 2)) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one slave face for a contact constraint!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one slave face for a contact constraint!")); Gui::Selection().clearSelection(); return; } @@ -165,7 +184,7 @@ void TaskFemConstraintContact::addToSelectionSlave() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -174,12 +193,13 @@ void TaskFemConstraintContact::addToSelectionSlave() App::DocumentObject* obj = it.getObject(); if (subNames.size() != 1) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one slave face for a contact constraint!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one slave face for a contact constraint!")); Gui::Selection().clearSelection(); return; } - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; if (subName.substr(0, 4) != "Face") { QMessageBox::warning(this, tr("Selection error"), tr("Only faces can be picked")); @@ -190,13 +210,13 @@ void TaskFemConstraintContact::addToSelectionSlave() itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } @@ -226,7 +246,7 @@ void TaskFemConstraintContact::removeFromSelectionSlave() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -234,19 +254,19 @@ void TaskFemConstraintContact::removeFromSelectionSlave() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -271,7 +291,7 @@ void TaskFemConstraintContact::addToSelectionMaster() { int rows = ui->lw_referencesMaster->model()->rowCount(); std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (rows == 1) { QMessageBox::warning( this, @@ -285,8 +305,9 @@ void TaskFemConstraintContact::addToSelectionMaster() return; } if ((rows == 0) && (selection.size() >= 2)) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one master for a contact constraint!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one master for a contact constraint!")); Gui::Selection().clearSelection(); return; } @@ -295,7 +316,7 @@ void TaskFemConstraintContact::addToSelectionMaster() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -303,12 +324,13 @@ void TaskFemConstraintContact::addToSelectionMaster() const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); if (subNames.size() != 1) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one master face for a contact constraint!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one master face for a contact constraint!")); Gui::Selection().clearSelection(); return; } - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; if (subName.substr(0, 4) != "Face") { QMessageBox::warning(this, tr("Selection error"), tr("Only faces can be picked")); @@ -319,13 +341,13 @@ void TaskFemConstraintContact::addToSelectionMaster() itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } @@ -345,7 +367,7 @@ void TaskFemConstraintContact::addToSelectionMaster() void TaskFemConstraintContact::removeFromSelectionMaster() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -355,7 +377,7 @@ void TaskFemConstraintContact::removeFromSelectionMaster() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -363,19 +385,19 @@ void TaskFemConstraintContact::removeFromSelectionMaster() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -396,11 +418,13 @@ void TaskFemConstraintContact::removeFromSelectionMaster() updateUI(); } -void TaskFemConstraintContact::onReferenceDeletedSlave() { +void TaskFemConstraintContact::onReferenceDeletedSlave() +{ TaskFemConstraintContact::removeFromSelectionSlave(); } -void TaskFemConstraintContact::onReferenceDeletedMaster() { +void TaskFemConstraintContact::onReferenceDeletedMaster() +{ TaskFemConstraintContact::removeFromSelectionMaster(); } @@ -430,9 +454,8 @@ double TaskFemConstraintContact::get_Friction() const return ui->spFriction->value(); } -void TaskFemConstraintContact::changeEvent(QEvent *) -{ -} +void TaskFemConstraintContact::changeEvent(QEvent*) +{} //************************************************************************** // TaskDialog @@ -461,7 +484,7 @@ void TaskDlgFemConstraintContact::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -481,11 +504,11 @@ bool TaskDlgFemConstraintContact::accept() "App.ActiveDocument.%s.Friction = %f", name.c_str(), parameterContact->get_Friction()); - std::string scale = parameterContact->getScale();// OvG: determine modified scale + std::string scale = parameterContact->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); @@ -498,7 +521,7 @@ bool TaskDlgFemConstraintContact::accept() bool TaskDlgFemConstraintContact::reject() { Gui::Command::abortCommand(); - Gui::Command::doCommand(Gui::Command::Gui,"Gui.activeDocument().resetEdit()"); + Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); Gui::Command::updateActive(); return true; diff --git a/src/Mod/Fem/Gui/TaskFemConstraintContact.h b/src/Mod/Fem/Gui/TaskFemConstraintContact.h index 96319c4e46..cc7891a667 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintContact.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintContact.h @@ -26,8 +26,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintContact_H #define GUI_TASKVIEW_TaskFemConstraintContact_H -#include #include +#include #include "TaskFemConstraint.h" #include "ViewProviderFemConstraintContact.h" @@ -35,8 +35,9 @@ class Ui_TaskFemConstraintContact; -namespace FemGui { -class TaskFemConstraintContact : public TaskFemConstraint +namespace FemGui +{ +class TaskFemConstraintContact: public TaskFemConstraint { Q_OBJECT @@ -45,8 +46,8 @@ public: QWidget* parent = nullptr); ~TaskFemConstraintContact() override; const std::string getReferences() const override; - double get_Slope()const; - double get_Friction()const; + double get_Slope() const; + double get_Friction() const; private Q_SLOTS: void onReferenceDeletedSlave(); @@ -57,25 +58,25 @@ private Q_SLOTS: void removeFromSelectionMaster(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: - //void onSelectionChanged(const Gui::SelectionChanges& msg); + // void onSelectionChanged(const Gui::SelectionChanges& msg); void updateUI(); std::unique_ptr ui; }; -class TaskDlgFemConstraintContact : public TaskDlgFemConstraint +class TaskDlgFemConstraintContact: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintContact(ViewProviderFemConstraintContact *ConstraintView); + explicit TaskDlgFemConstraintContact(ViewProviderFemConstraintContact* ConstraintView); void open() override; bool accept() override; bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintContact_H +#endif // GUI_TASKVIEW_TaskFemConstraintContact_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp index eb636db99f..7dc9a18368 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.cpp @@ -26,9 +26,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -45,9 +45,10 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintDisplacement */ TaskFemConstraintDisplacement::TaskFemConstraintDisplacement( - ViewProviderFemConstraintDisplacement* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintDisplacement"), - ui(new Ui_TaskFemConstraintDisplacement) + ViewProviderFemConstraintDisplacement* ConstraintView, + QWidget* parent) + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintDisplacement") + , ui(new Ui_TaskFemConstraintDisplacement) { proxy = new QWidget(this); ui->setupUi(proxy); @@ -55,13 +56,19 @@ TaskFemConstraintDisplacement::TaskFemConstraintDisplacement( // create a context menu for the listview of the references createDeleteAction(ui->lw_references); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintDisplacement::onReferenceDeleted); + connect(deleteAction, + &QAction::triggered, + this, + &TaskFemConstraintDisplacement::onReferenceDeleted); - connect(ui->lw_references, &QListWidget::currentItemChanged, - this, &TaskFemConstraintDisplacement::setSelection); - connect(ui->lw_references, &QListWidget::itemClicked, - this, &TaskFemConstraintDisplacement::setSelection); + connect(ui->lw_references, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintDisplacement::setSelection); + connect(ui->lw_references, + &QListWidget::itemClicked, + this, + &TaskFemConstraintDisplacement::setSelection); this->groupLayout()->addWidget(proxy); @@ -124,16 +131,21 @@ TaskFemConstraintDisplacement::TaskFemConstraintDisplacement( // Connect check box values displacements connect(ui->dispxfix, &QCheckBox::toggled, this, &TaskFemConstraintDisplacement::fixx); - connect(ui->DisplacementXFormulaCB, &QCheckBox::toggled, - this, &TaskFemConstraintDisplacement::formulaX); + connect(ui->DisplacementXFormulaCB, + &QCheckBox::toggled, + this, + &TaskFemConstraintDisplacement::formulaX); connect(ui->dispyfix, &QCheckBox::toggled, this, &TaskFemConstraintDisplacement::fixy); - connect(ui->DisplacementYFormulaCB, &QCheckBox::toggled, - this, &TaskFemConstraintDisplacement::formulaY); + connect(ui->DisplacementYFormulaCB, + &QCheckBox::toggled, + this, + &TaskFemConstraintDisplacement::formulaY); connect(ui->dispzfix, &QCheckBox::toggled, this, &TaskFemConstraintDisplacement::fixz); - connect(ui->DisplacementZFormulaCB, &QCheckBox::toggled, - this, &TaskFemConstraintDisplacement::formulaZ); - connect(ui->FlowForceCB, &QCheckBox::toggled, - this, &TaskFemConstraintDisplacement::flowForce); + connect(ui->DisplacementZFormulaCB, + &QCheckBox::toggled, + this, + &TaskFemConstraintDisplacement::formulaZ); + connect(ui->FlowForceCB, &QCheckBox::toggled, this, &TaskFemConstraintDisplacement::flowForce); // Connect to check box values for rotations connect(ui->rotxfix, &QCheckBox::toggled, this, &TaskFemConstraintDisplacement::rotfixx); connect(ui->rotyfix, &QCheckBox::toggled, this, &TaskFemConstraintDisplacement::rotfixy); @@ -257,8 +269,9 @@ void TaskFemConstraintDisplacement::flowForce(bool state) void TaskFemConstraintDisplacement::rotfixx(bool state) { - if (state) + if (state) { ui->spinxRotation->setValue(0); + } ui->spinxRotation->setEnabled(!state); } @@ -270,8 +283,9 @@ void TaskFemConstraintDisplacement::formulaRotx(bool state) void TaskFemConstraintDisplacement::rotfixy(bool state) { - if (state) + if (state) { ui->spinyRotation->setValue(0); + } ui->spinyRotation->setEnabled(!state); } @@ -283,8 +297,9 @@ void TaskFemConstraintDisplacement::formulaRoty(bool state) void TaskFemConstraintDisplacement::rotfixz(bool state) { - if (state) + if (state) { ui->spinzRotation->setValue(0); + } ui->spinzRotation->setEnabled(!state); } @@ -297,7 +312,7 @@ void TaskFemConstraintDisplacement::formulaRotz(bool state) void TaskFemConstraintDisplacement::addToSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -307,43 +322,46 @@ void TaskFemConstraintDisplacement::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; } const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } // limit constraint such that only vertexes or faces or edges can be used depending on // what was selected first std::string searchStr; - if (subName.find("Vertex") != std::string::npos) + if (subName.find("Vertex") != std::string::npos) { searchStr = "Vertex"; - else if (subName.find("Edge") != std::string::npos) + } + else if (subName.find("Edge") != std::string::npos) { searchStr = "Edge"; - else + } + else { searchStr = "Face"; - for (const auto & SubElement : SubElements) { + } + for (const auto& SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { - QString msg = tr( - "Only one type of selection (vertex,face or edge) per analysis feature allowed!"); + QString msg = tr("Only one type of selection (vertex,face or edge) per " + "analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -365,7 +383,7 @@ void TaskFemConstraintDisplacement::addToSelection() void TaskFemConstraintDisplacement::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -375,7 +393,7 @@ void TaskFemConstraintDisplacement::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -383,19 +401,19 @@ void TaskFemConstraintDisplacement::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -421,8 +439,8 @@ void TaskFemConstraintDisplacement::removeFromSelection() void TaskFemConstraintDisplacement::onReferenceDeleted() { - TaskFemConstraintDisplacement::removeFromSelection();// OvG: On right-click face is - // automatically selected, so just remove + TaskFemConstraintDisplacement::removeFromSelection(); // OvG: On right-click face is + // automatically selected, so just remove } const std::string TaskFemConstraintDisplacement::getReferences() const @@ -583,10 +601,12 @@ void TaskFemConstraintDisplacement::changeEvent(QEvent*) void TaskFemConstraintDisplacement::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -616,7 +636,7 @@ void TaskDlgFemConstraintDisplacement::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -627,74 +647,100 @@ bool TaskDlgFemConstraintDisplacement::accept() static_cast(parameter); try { - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.xDisplacement = \"%s\"", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.xDisplacement = \"%s\"", name.c_str(), parameterDisplacement->get_spinxDisplacement().c_str()); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.xDisplacementFormula = \"%s\"", - name.c_str(), parameterDisplacement->get_xFormula().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.yDisplacement = \"%s\"", + name.c_str(), + parameterDisplacement->get_xFormula().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.yDisplacement = \"%s\"", name.c_str(), parameterDisplacement->get_spinyDisplacement().c_str()); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.yDisplacementFormula = \"%s\"", - name.c_str(), parameterDisplacement->get_yFormula().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.zDisplacement = \"%s\"", + name.c_str(), + parameterDisplacement->get_yFormula().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.zDisplacement = \"%s\"", name.c_str(), parameterDisplacement->get_spinzDisplacement().c_str()); Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.zDisplacementFormula = \"%s\"", - name.c_str(), parameterDisplacement->get_zFormula().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.xRotation = \"%s\"", - name.c_str(), parameterDisplacement->get_spinxRotation().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.yRotation = \"%s\"", - name.c_str(), parameterDisplacement->get_spinyRotation().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.zRotation = \"%s\"", + name.c_str(), + parameterDisplacement->get_zFormula().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.xRotation = \"%s\"", + name.c_str(), + parameterDisplacement->get_spinxRotation().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.yRotation = \"%s\"", + name.c_str(), + parameterDisplacement->get_spinyRotation().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.zRotation = \"%s\"", name.c_str(), parameterDisplacement->get_spinzRotation().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.xFree = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.xFree = %s", name.c_str(), parameterDisplacement->get_dispxfree() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.xFix = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.xFix = %s", name.c_str(), parameterDisplacement->get_dispxfix() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.hasXFormula = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.hasXFormula = %s", name.c_str(), parameterDisplacement->get_hasDispXFormula() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.yFree = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.yFree = %s", name.c_str(), parameterDisplacement->get_dispyfree() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.yFix = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.yFix = %s", name.c_str(), parameterDisplacement->get_dispyfix() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.hasYFormula = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.hasYFormula = %s", name.c_str(), parameterDisplacement->get_hasDispYFormula() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.zFree = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.zFree = %s", name.c_str(), parameterDisplacement->get_dispzfree() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.zFix = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.zFix = %s", name.c_str(), parameterDisplacement->get_dispzfix() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.hasZFormula = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.hasZFormula = %s", name.c_str(), parameterDisplacement->get_hasDispZFormula() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.rotxFree = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.rotxFree = %s", name.c_str(), parameterDisplacement->get_rotxfree() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.rotxFix = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.rotxFix = %s", name.c_str(), parameterDisplacement->get_rotxfix() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.rotyFree = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.rotyFree = %s", name.c_str(), parameterDisplacement->get_rotyfree() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.rotyFix = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.rotyFix = %s", name.c_str(), parameterDisplacement->get_rotyfix() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.rotzFree = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.rotzFree = %s", name.c_str(), parameterDisplacement->get_rotzfree() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.rotzFix = %s", + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.rotzFix = %s", name.c_str(), parameterDisplacement->get_rotzfix() ? "True" : "False"); Gui::Command::doCommand(Gui::Command::Doc, @@ -703,11 +749,11 @@ bool TaskDlgFemConstraintDisplacement::accept() parameterDisplacement->get_useFlowSurfaceForce() ? "True" : "False"); - std::string scale = parameterDisplacement->getScale();// OvG: determine modified scale + std::string scale = parameterDisplacement->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.h b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.h index e62b123c2e..d5b07a09cc 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintDisplacement.h @@ -26,8 +26,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintDisplacement_H #define GUI_TASKVIEW_TaskFemConstraintDisplacement_H -#include #include +#include #include #include @@ -39,8 +39,9 @@ class Ui_TaskFemConstraintDisplacement; -namespace FemGui { -class TaskFemConstraintDisplacement : public TaskFemConstraintOnBoundary +namespace FemGui +{ +class TaskFemConstraintDisplacement: public TaskFemConstraintOnBoundary { Q_OBJECT @@ -96,8 +97,8 @@ private Q_SLOTS: void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -105,7 +106,7 @@ private: std::unique_ptr ui; }; -class TaskDlgFemConstraintDisplacement : public TaskDlgFemConstraint +class TaskDlgFemConstraintDisplacement: public TaskDlgFemConstraint { Q_OBJECT @@ -117,6 +118,6 @@ public: bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintDisplacement_H +#endif // GUI_TASKVIEW_TaskFemConstraintDisplacement_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp index 30d2466248..76c0bb1f76 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFixed.cpp @@ -24,9 +24,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -45,21 +45,24 @@ using namespace Gui; TaskFemConstraintFixed::TaskFemConstraintFixed(ViewProviderFemConstraintFixed* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintFixed"), - ui(new Ui_TaskFemConstraintFixed) -{ //Note change "Fixed" in line above to new constraint name + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintFixed") + , ui(new Ui_TaskFemConstraintFixed) +{ // Note change "Fixed" in line above to new constraint name proxy = new QWidget(this); ui->setupUi(proxy); QMetaObject::connectSlotsByName(this); // create a context menu for the listview of the references createDeleteAction(ui->lw_references); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintFixed::onReferenceDeleted); - connect(ui->lw_references, &QListWidget::currentItemChanged, - this, &TaskFemConstraintFixed::setSelection); - connect(ui->lw_references, &QListWidget::itemClicked, - this, &TaskFemConstraintFixed::setSelection); + connect(deleteAction, &QAction::triggered, this, &TaskFemConstraintFixed::onReferenceDeleted); + connect(ui->lw_references, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintFixed::setSelection); + connect(ui->lw_references, + &QListWidget::itemClicked, + this, + &TaskFemConstraintFixed::setSelection); this->groupLayout()->addWidget(proxy); @@ -81,7 +84,7 @@ TaskFemConstraintFixed::TaskFemConstraintFixed(ViewProviderFemConstraintFixed* C ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); } - //Selection buttons + // Selection buttons buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd); buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove); @@ -112,7 +115,7 @@ void TaskFemConstraintFixed::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -120,36 +123,39 @@ void TaskFemConstraintFixed::addToSelection() std::vector subNames = it.getSubNames(); App::DocumentObject* obj = ConstraintView->getObject()->getDocument()->getObject(it.getFeatName()); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } // limit constraint such that only vertexes or faces or edges can be used depending // on what was selected first std::string searchStr; - if (subName.find("Vertex") != std::string::npos) + if (subName.find("Vertex") != std::string::npos) { searchStr = "Vertex"; - else if (subName.find("Edge") != std::string::npos) + } + else if (subName.find("Edge") != std::string::npos) { searchStr = "Edge"; - else + } + else { searchStr = "Face"; - for (const auto & SubElement : SubElements) { + } + for (const auto& SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { - QString msg = tr( - "Only one type of selection (vertex, face or edge) per analysis feature allowed!"); + QString msg = tr("Only one type of selection (vertex, face or edge) per " + "analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -181,7 +187,7 @@ void TaskFemConstraintFixed::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -189,19 +195,19 @@ void TaskFemConstraintFixed::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -213,7 +219,7 @@ void TaskFemConstraintFixed::removeFromSelection() SubElements.erase(SubElements.begin() + itemsToDel.back()); itemsToDel.pop_back(); } - //Update UI + // Update UI { QSignalBlocker block(ui->lw_references); ui->lw_references->clear(); @@ -225,7 +231,8 @@ void TaskFemConstraintFixed::removeFromSelection() updateUI(); } -void TaskFemConstraintFixed::onReferenceDeleted() { +void TaskFemConstraintFixed::onReferenceDeleted() +{ TaskFemConstraintFixed::removeFromSelection(); } @@ -245,15 +252,16 @@ bool TaskFemConstraintFixed::event(QEvent* e) } void TaskFemConstraintFixed::changeEvent(QEvent*) -{ -} +{} void TaskFemConstraintFixed::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -282,7 +290,7 @@ void TaskDlgFemConstraintFixed::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -291,11 +299,11 @@ bool TaskDlgFemConstraintFixed::accept() std::string name = ConstraintView->getObject()->getNameInDocument(); const TaskFemConstraintFixed* parameters = static_cast(parameter); - std::string scale = parameters->getScale(); //OvG: determine modified scale + std::string scale = parameters->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale return TaskDlgFemConstraint::accept(); } diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFixed.h b/src/Mod/Fem/Gui/TaskFemConstraintFixed.h index 8bc939b842..80b939e0c5 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFixed.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintFixed.h @@ -24,8 +24,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintFixed_H #define GUI_TASKVIEW_TaskFemConstraintFixed_H -#include #include +#include #include "TaskFemConstraintOnBoundary.h" #include "ViewProviderFemConstraintFixed.h" @@ -33,8 +33,9 @@ class Ui_TaskFemConstraintFixed; -namespace FemGui { -class TaskFemConstraintFixed : public TaskFemConstraintOnBoundary +namespace FemGui +{ +class TaskFemConstraintFixed: public TaskFemConstraintOnBoundary { Q_OBJECT @@ -50,8 +51,8 @@ private Q_SLOTS: void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -59,17 +60,17 @@ private: std::unique_ptr ui; }; -class TaskDlgFemConstraintFixed : public TaskDlgFemConstraint +class TaskDlgFemConstraintFixed: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintFixed(ViewProviderFemConstraintFixed *ConstraintView); + explicit TaskDlgFemConstraintFixed(ViewProviderFemConstraintFixed* ConstraintView); void open() override; bool accept() override; bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintFixed_H +#endif // GUI_TASKVIEW_TaskFemConstraintFixed_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp index fe8b0c1703..8caed56810 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp @@ -25,11 +25,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -39,15 +39,15 @@ #include #include #include -#include #include +#include #include #include #include +#include "ActiveAnalysisObserver.h" #include "TaskFemConstraintFluidBoundary.h" #include "ui_TaskFemConstraintFluidBoundary.h" -#include "ActiveAnalysisObserver.h" using namespace FemGui; @@ -57,18 +57,18 @@ using namespace Fem; // also defined in FemConstrainFluidBoundary and foamcasebuilder/basicbuilder.py, please update // simultaneously the second (index 1) is the default enum, as index 0 causes compiling error static // const char* BoundaryTypes[] = {"inlet","wall","outlet","freestream", "interface", NULL}; -static const char* WallSubtypes[] = { - "unspecific", "fixed", "slip", "partialSlip", "moving", "rough", nullptr}; +static const char* WallSubtypes[] = + {"unspecific", "fixed", "slip", "partialSlip", "moving", "rough", nullptr}; static const char* InletSubtypes[] = {"unspecific", "totalPressure", "uniformVelocity", "volumetricFlowRate", "massFlowRate", nullptr}; -static const char* OutletSubtypes[] = { - "unspecific", "totalPressure", "staticPressure", "uniformVelocity", "outFlow", nullptr}; -static const char* InterfaceSubtypes[] = { - "unspecific", "symmetry", "wedge", "cyclic", "empty", "coupled", nullptr}; +static const char* OutletSubtypes[] = + {"unspecific", "totalPressure", "staticPressure", "uniformVelocity", "outFlow", nullptr}; +static const char* InterfaceSubtypes[] = + {"unspecific", "symmetry", "wedge", "cyclic", "empty", "coupled", nullptr}; static const char* FreestreamSubtypes[] = {"unspecific", "freestream", nullptr}; static const char* InterfaceSubtypeHelpTexts[] = { @@ -105,17 +105,19 @@ static const char* ThermalBoundaryHelpTexts[] = {"fixed Temperature [K]", // enable & disable quantityUI once valueType is selected // internal function not declared in header file -void initComboBox(QComboBox* combo, const std::vector& textItems, +void initComboBox(QComboBox* combo, + const std::vector& textItems, const std::string& sItem) { combo->blockSignals(true); - int iItem = 1;// the first one is "unspecific" (index 0) + int iItem = 1; // the first one is "unspecific" (index 0) combo->clear(); for (unsigned int it = 0; it < textItems.size(); it++) { combo->insertItem(it, Base::Tools::fromStdString(textItems[it])); - if (sItem == textItems[it]) + if (sItem == textItems[it]) { iItem = it; + } } combo->setCurrentIndex(iItem); combo->blockSignals(false); @@ -123,10 +125,11 @@ void initComboBox(QComboBox* combo, const std::vector& textItems, /* TRANSLATOR FemGui::TaskFemConstraintFluidBoundary */ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( - ViewProviderFemConstraintFluidBoundary* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintFluidBoundary"), - ui(new Ui_TaskFemConstraintFluidBoundary), - dimension(-1) + ViewProviderFemConstraintFluidBoundary* ConstraintView, + QWidget* parent) + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintFluidBoundary") + , ui(new Ui_TaskFemConstraintFluidBoundary) + , dimension(-1) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -135,8 +138,10 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( // create a context menu for the listview of the references createDeleteAction(ui->listReferences); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintFluidBoundary::onReferenceDeleted); + connect(deleteAction, + &QAction::triggered, + this, + &TaskFemConstraintFluidBoundary::onReferenceDeleted); // setup ranges ui->spinBoundaryValue->setMinimum(-FLOAT_MAX); @@ -152,25 +157,40 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( ui->spinHTCoeffValue->setMinimum(0.0); ui->spinHTCoeffValue->setMaximum(FLOAT_MAX); - connect(ui->comboBoundaryType, qOverload(&QComboBox::currentIndexChanged), - this, &TaskFemConstraintFluidBoundary::onBoundaryTypeChanged); - connect(ui->comboSubtype, qOverload(&QComboBox::currentIndexChanged), - this, &TaskFemConstraintFluidBoundary::onSubtypeChanged); - connect(ui->spinBoundaryValue, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintFluidBoundary::onBoundaryValueChanged); + connect(ui->comboBoundaryType, + qOverload(&QComboBox::currentIndexChanged), + this, + &TaskFemConstraintFluidBoundary::onBoundaryTypeChanged); + connect(ui->comboSubtype, + qOverload(&QComboBox::currentIndexChanged), + this, + &TaskFemConstraintFluidBoundary::onSubtypeChanged); + connect(ui->spinBoundaryValue, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintFluidBoundary::onBoundaryValueChanged); - connect(ui->comboTurbulenceSpecification, qOverload(&QComboBox::currentIndexChanged), - this, &TaskFemConstraintFluidBoundary::onTurbulenceSpecificationChanged); - connect(ui->comboThermalBoundaryType, qOverload(&QComboBox::currentIndexChanged), - this, &TaskFemConstraintFluidBoundary::onThermalBoundaryTypeChanged); + connect(ui->comboTurbulenceSpecification, + qOverload(&QComboBox::currentIndexChanged), + this, + &TaskFemConstraintFluidBoundary::onTurbulenceSpecificationChanged); + connect(ui->comboThermalBoundaryType, + qOverload(&QComboBox::currentIndexChanged), + this, + &TaskFemConstraintFluidBoundary::onThermalBoundaryTypeChanged); - connect(ui->buttonDirection, &QPushButton::pressed, - this, [=]{onButtonDirection(true);}); - connect(ui->checkReverse, &QCheckBox::toggled, - this, &TaskFemConstraintFluidBoundary::onCheckReverse); + connect(ui->buttonDirection, &QPushButton::pressed, this, [=] { + onButtonDirection(true); + }); + connect(ui->checkReverse, + &QCheckBox::toggled, + this, + &TaskFemConstraintFluidBoundary::onCheckReverse); - connect(ui->listReferences, &QListWidget::itemClicked, - this, &TaskFemConstraintFluidBoundary::setSelection); + connect(ui->listReferences, + &QListWidget::itemClicked, + this, + &TaskFemConstraintFluidBoundary::setSelection); this->groupLayout()->addWidget(proxy); @@ -181,7 +201,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( ui->buttonDirection->blockSignals(true); ui->checkReverse->blockSignals(true); - //Selection buttons + // Selection buttons buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd); buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove); @@ -198,7 +218,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( std::vector fem = aDoc->getObjectsOfType(Fem::FemAnalysis::getClassTypeId()); if (!fem.empty()) { - pcAnalysis = static_cast(fem[0]);// get the first + pcAnalysis = static_cast(fem[0]); // get the first } } @@ -206,34 +226,39 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( if (pcAnalysis) { std::vector fem = pcAnalysis->Group.getValues(); for (auto it : fem) { - if (it->getTypeId().isDerivedFrom(Fem::FemMeshObject::getClassTypeId())) + if (it->getTypeId().isDerivedFrom(Fem::FemMeshObject::getClassTypeId())) { pcMesh = static_cast(it); + } } } else { Base::Console().Log("FemAnalysis object is not activated or no FemAnalysis in the active " "document, mesh dimension is unknown\n"); - dimension = -1;// unknown dimension of mesh + dimension = -1; // unknown dimension of mesh } if (pcMesh) { - App::Property* prop = pcMesh->getPropertyByName("Shape");// PropertyLink + App::Property* prop = pcMesh->getPropertyByName("Shape"); // PropertyLink if (prop && prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { App::PropertyLink* pcLink = static_cast(prop); Part::Feature* pcPart = dynamic_cast(pcLink->getValue()); - if (pcPart) {// deduct dimension from part_obj.Shape.ShapeType + if (pcPart) { // deduct dimension from part_obj.Shape.ShapeType const TopoDS_Shape& pShape = pcPart->Shape.getShape().getShape(); const TopAbs_ShapeEnum shapeType = pShape.IsNull() ? TopAbs_SHAPE : pShape.ShapeType(); if (shapeType == TopAbs_SOLID - || shapeType == TopAbs_COMPSOLID)// COMPSOLID is solids connected by faces + || shapeType == TopAbs_COMPSOLID) { // COMPSOLID is solids connected by faces dimension = 3; - else if (shapeType == TopAbs_FACE || shapeType == TopAbs_SHELL) + } + else if (shapeType == TopAbs_FACE || shapeType == TopAbs_SHELL) { dimension = 2; - else if (shapeType == TopAbs_EDGE || shapeType == TopAbs_WIRE) + } + else if (shapeType == TopAbs_EDGE || shapeType == TopAbs_WIRE) { dimension = 1; - else + } + else { dimension = - -1;// Vertex (0D) can not make mesh, Compound type might contain any types + -1; // Vertex (0D) can not make mesh, Compound type might contain any types + } } } } @@ -242,8 +267,9 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( if (pcAnalysis) { std::vector fem = pcAnalysis->Group.getValues(); for (auto it : fem) { - if (it->getTypeId().isDerivedFrom(Fem::FemSolverObject::getClassTypeId())) + if (it->getTypeId().isDerivedFrom(Fem::FemSolverObject::getClassTypeId())) { pcSolver = static_cast(it); + } } } @@ -266,7 +292,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( updateThermalBoundaryUI(); } else { - ui->tabThermalBoundary->setEnabled(false);// could be hidden + ui->tabThermalBoundary->setEnabled(false); // could be hidden // Base::Console().Message("retrieve solver property HeatTransferring as false\n"); } } @@ -307,7 +333,8 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( ui->tabWidget->setCurrentIndex(0); ui->labelHelpText->setText(tr("select boundary type, faces and set value")); - initComboBox(ui->comboBoundaryType, pcConstraint->BoundaryType.getEnumVector(), + initComboBox(ui->comboBoundaryType, + pcConstraint->BoundaryType.getEnumVector(), pcConstraint->BoundaryType.getValueAsString()); updateBoundaryTypeUI(); std::vector subtypes = pcConstraint->Subtype.getEnumVector(); @@ -318,8 +345,9 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( std::vector SubElements = pcConstraint->References.getSubValues(); std::vector dirStrings = pcConstraint->Direction.getSubValues(); QString dir; - if (!dirStrings.empty()) + if (!dirStrings.empty()) { dir = makeRefText(pcConstraint->Direction.getValue(), dirStrings.front()); + } // Fill data into dialog elements double f = pcConstraint->BoundaryValue.getValue(); @@ -327,12 +355,14 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( ui->spinBoundaryValue->setMaximum(FLOAT_MAX); ui->spinBoundaryValue->setValue(f); ui->listReferences->clear(); - for (std::size_t i = 0; i < Objects.size(); i++) + for (std::size_t i = 0; i < Objects.size(); i++) { ui->listReferences->addItem(makeRefText(Objects[i], SubElements[i])); - if (!Objects.empty()) + } + if (!Objects.empty()) { ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); + } ui->lineDirection->setText(dir.isEmpty() ? tr("") : dir); - ui->checkReverse->setVisible(true); // it is still useful to swap direction of an edge + ui->checkReverse->setVisible(true); // it is still useful to swap direction of an edge ui->listReferences->blockSignals(false); ui->spinBoundaryValue->blockSignals(false); @@ -374,27 +404,26 @@ void TaskFemConstraintFluidBoundary::updateBoundaryTypeUI() else if (boundaryType == "inlet") { ui->tabBasicBoundary->setEnabled(true); pcConstraint->Subtype.setEnums(InletSubtypes); - ui->labelBoundaryValue->setText(QString::fromUtf8("Pressure [Pa]")); // default to pressure - pcConstraint->Reversed.setValue(true); // inlet must point into volume + ui->labelBoundaryValue->setText(QString::fromUtf8("Pressure [Pa]")); // default to pressure + pcConstraint->Reversed.setValue(true); // inlet must point into volume } else if (boundaryType == "outlet") { ui->tabBasicBoundary->setEnabled(true); pcConstraint->Subtype.setEnums(OutletSubtypes); ui->labelBoundaryValue->setText(QString::fromUtf8("Pressure [Pa]")); - pcConstraint->Reversed.setValue(false); // outlet must point outward + pcConstraint->Reversed.setValue(false); // outlet must point outward } else { Base::Console().Error("Error: Fluid boundary type `%s` is not defined\n", boundaryType.c_str()); } - //std::string subtypeLabel = boundaryType + std::string(" type"); - //ui->labelSubtype->setText(QString::fromUtf8(subtypeLabel)); // too long to show in UI + // std::string subtypeLabel = boundaryType + std::string(" type"); + // ui->labelSubtype->setText(QString::fromUtf8(subtypeLabel)); // too long to show in UI ui->tabWidget->setCurrentIndex(0); // activate the basic pressure-momentum setting tab std::vector subtypes = pcConstraint->Subtype.getEnumVector(); initComboBox(ui->comboSubtype, subtypes, "default to the second subtype"); updateSubtypeUI(); - } @@ -435,7 +464,7 @@ void TaskFemConstraintFluidBoundary::updateSubtypeUI() if (subtype == "moving") { ui->labelBoundaryValue->setText(QString::fromUtf8("moving speed (m/s)")); ui->tabBasicBoundary->setEnabled(true); - ui->buttonDirection->setEnabled(false); // moving speed must be parallel to wall + ui->buttonDirection->setEnabled(false); // moving speed must be parallel to wall ui->lineDirection->setEnabled(false); } else if (subtype == "slip") { @@ -455,7 +484,7 @@ void TaskFemConstraintFluidBoundary::updateSubtypeUI() } else if (boundaryType == "interface") { ui->tabBasicBoundary->setEnabled(false); - //show help text + // show help text int iInterface = ui->comboSubtype->currentIndex(); ui->labelHelpText->setText(tr(InterfaceSubtypeHelpTexts[iInterface])); } @@ -544,7 +573,7 @@ void TaskFemConstraintFluidBoundary::onBoundaryTypeChanged() pcConstraint->BoundaryType.setValue(ui->comboBoundaryType->currentIndex()); updateBoundaryTypeUI(); - ConstraintView->updateData(&pcConstraint->BoundaryType);// force a 3D redraw + ConstraintView->updateData(&pcConstraint->BoundaryType); // force a 3D redraw // update view provider once BoundaryType changed, updateData() may be just enough // FreeCAD.getDocument(pcConstraint->Document.getName()).recompute(); @@ -558,13 +587,13 @@ void TaskFemConstraintFluidBoundary::onBoundaryTypeChanged() void TaskFemConstraintFluidBoundary::onSubtypeChanged() { - updateSubtypeUI();// todo: change color for different kind of subtype, - // Fem::ConstraintFluidBoundary::onChanged() and viewProvider + updateSubtypeUI(); // todo: change color for different kind of subtype, + // Fem::ConstraintFluidBoundary::onChanged() and viewProvider } void TaskFemConstraintFluidBoundary::onBoundaryValueChanged(double) { - //left empty for future extension + // left empty for future extension } void TaskFemConstraintFluidBoundary::onTurbulenceSpecificationChanged() { @@ -585,8 +614,8 @@ void TaskFemConstraintFluidBoundary::onThermalBoundaryTypeChanged() void TaskFemConstraintFluidBoundary::onReferenceDeleted() { - TaskFemConstraintFluidBoundary::removeFromSelection();// On right-click face is automatically - // selected, so just remove + TaskFemConstraintFluidBoundary::removeFromSelection(); // On right-click face is automatically + // selected, so just remove } void TaskFemConstraintFluidBoundary::onButtonDirection(const bool pressed) @@ -611,16 +640,18 @@ void TaskFemConstraintFluidBoundary::onButtonDirection(const bool pressed) // we can only handle part objects if (!selectionElement.isObjectTypeOf(Part::Feature::getClassTypeId())) { - QMessageBox::warning( - this, tr("Wrong selection"), tr("Selected object is not a part object!")); + QMessageBox::warning(this, + tr("Wrong selection"), + tr("Selected object is not a part object!")); return; } // get the names of the subobjects const std::vector& subNames = selectionElement.getSubNames(); if (subNames.size() != 1) { - QMessageBox::warning( - this, tr("Wrong selection"), tr("Only one planar face or edge can be selected!")); + QMessageBox::warning(this, + tr("Wrong selection"), + tr("Only one planar face or edge can be selected!")); return; } @@ -634,15 +665,17 @@ void TaskFemConstraintFluidBoundary::onButtonDirection(const bool pressed) if (subNamesElement.substr(0, 4) == "Face") { if (!Fem::Tools::isPlanar(TopoDS::Face(ref))) { - QMessageBox::warning( - this, tr("Wrong selection"), tr("Only planar faces can be picked for 3D")); + QMessageBox::warning(this, + tr("Wrong selection"), + tr("Only planar faces can be picked for 3D")); return; } } - else if (subNamesElement.substr(0, 4) == "Edge") {// 2D or 3D can use edge as direction vector + else if (subNamesElement.substr(0, 4) == "Edge") { // 2D or 3D can use edge as direction vector if (!Fem::Tools::isLinear(TopoDS::Edge(ref))) { - QMessageBox::warning( - this, tr("Wrong selection"), tr("Only planar edges can be picked for 2D")); + QMessageBox::warning(this, + tr("Wrong selection"), + tr("Only planar edges can be picked for 2D")); return; } } @@ -744,16 +777,18 @@ const std::string TaskFemConstraintFluidBoundary::getReferences() const int rows = ui->listReferences->model()->rowCount(); std::vector items; - for (int r = 0; r < rows; r++) + for (int r = 0; r < rows; r++) { items.push_back(ui->listReferences->item(r)->text().toStdString()); + } return TaskFemConstraint::getReferences(items); } const std::string TaskFemConstraintFluidBoundary::getDirectionName() const { std::string dir = ui->lineDirection->text().toStdString(); - if (dir.empty()) + if (dir.empty()) { return ""; + } int pos = dir.find_last_of(":"); return dir.substr(0, pos).c_str(); @@ -762,8 +797,9 @@ const std::string TaskFemConstraintFluidBoundary::getDirectionName() const const std::string TaskFemConstraintFluidBoundary::getDirectionObject() const { std::string dir = ui->lineDirection->text().toStdString(); - if (dir.empty()) + if (dir.empty()) { return ""; + } int pos = dir.find_last_of(":"); return dir.substr(pos + 1).c_str(); @@ -779,7 +815,7 @@ TaskFemConstraintFluidBoundary::~TaskFemConstraintFluidBoundary() = default; void TaskFemConstraintFluidBoundary::addToSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -789,44 +825,47 @@ void TaskFemConstraintFluidBoundary::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; } const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } // limit constraint such that only vertexes or faces or edges can be used depending on // what was selected first std::string searchStr; - if (subName.find("Vertex") != std::string::npos) + if (subName.find("Vertex") != std::string::npos) { searchStr = "Vertex"; - else if (subName.find("Edge") != std::string::npos) + } + else if (subName.find("Edge") != std::string::npos) { searchStr = "Edge"; - else + } + else { searchStr = "Face"; + } - for (const auto & SubElement : SubElements) { + for (const auto& SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { - QString msg = tr( - "Only one type of selection (vertex, face or edge) per analysis feature allowed!"); + QString msg = tr("Only one type of selection (vertex, face or edge) per " + "analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -848,7 +887,7 @@ void TaskFemConstraintFluidBoundary::addToSelection() void TaskFemConstraintFluidBoundary::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -858,7 +897,7 @@ void TaskFemConstraintFluidBoundary::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -866,19 +905,19 @@ void TaskFemConstraintFluidBoundary::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -921,7 +960,7 @@ void TaskFemConstraintFluidBoundary::changeEvent(QEvent* e) TaskBox::changeEvent(e); if (e->type() == QEvent::LanguageChange) { ui->spinBoundaryValue->blockSignals(true); - //more ui widget? those UI are does not support tr yet! + // more ui widget? those UI are does not support tr yet! ui->retranslateUi(proxy); ui->spinBoundaryValue->blockSignals(false); @@ -930,10 +969,12 @@ void TaskFemConstraintFluidBoundary::changeEvent(QEvent* e) void TaskFemConstraintFluidBoundary::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -999,18 +1040,19 @@ bool TaskDlgFemConstraintFluidBoundary::accept() buf.toStdString().c_str()); } else { - Gui::Command::doCommand( - Gui::Command::Doc, "App.ActiveDocument.%s.Direction = None", name.c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Direction = None", + name.c_str()); } // Reverse control is done at BoundaryType selection, this UI is hidden from user // Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %s", // name.c_str(), boundary->getReverse() ? "True" : "False"); - std::string scale = boundary->getScale();// OvG: determine modified scale + std::string scale = boundary->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale // solver specific setting, physical model selection const Fem::FemSolverObject* pcSolver = boundary->getFemSolver(); @@ -1043,7 +1085,7 @@ bool TaskDlgFemConstraintFluidBoundary::accept() } if (pTurbulenceModel && std::string(pTurbulenceModel->getValueAsString()) - != "laminar") {// Invisic and DNS flow also does not need this + != "laminar") { // Invisic and DNS flow also does not need this // update turbulence and thermal boundary settings, only if those models are // activated Gui::Command::doCommand(Gui::Command::Doc, diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.h b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.h index 24135a80b1..66141fb441 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.h @@ -23,8 +23,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintFluidBoundary_H #define GUI_TASKVIEW_TaskFemConstraintFluidBoundary_H -#include #include +#include #include @@ -34,17 +34,20 @@ class Ui_TaskFemConstraintFluidBoundary; -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace FemGui { +namespace FemGui +{ -class TaskFemConstraintFluidBoundary : public TaskFemConstraintOnBoundary +class TaskFemConstraintFluidBoundary: public TaskFemConstraintOnBoundary { Q_OBJECT @@ -83,13 +86,13 @@ private Q_SLOTS: void onThermalBoundaryTypeChanged(); void onReferenceDeleted(); void onButtonDirection(const bool pressed = true); - void onCheckReverse(bool); // consider removing this slot as the UI is hidden + void onCheckReverse(bool); // consider removing this slot as the UI is hidden void addToSelection() override; void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -108,7 +111,7 @@ private: }; /// simulation dialog for the TaskView -class TaskDlgFemConstraintFluidBoundary : public TaskDlgFemConstraint +class TaskDlgFemConstraintFluidBoundary: public TaskDlgFemConstraint { Q_OBJECT @@ -122,6 +125,6 @@ public: bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintFluidBoundary_H +#endif // GUI_TASKVIEW_TaskFemConstraintFluidBoundary_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp index d8c3097231..da3a74d901 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.cpp @@ -24,10 +24,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -49,8 +49,8 @@ using namespace Gui; TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintForce"), - ui(new Ui_TaskFemConstraintForce) + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintForce") + , ui(new Ui_TaskFemConstraintForce) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -59,16 +59,20 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce* C // create a context menu for the listview of the references createDeleteAction(ui->listReferences); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintForce::onReferenceDeleted); - connect(ui->spinForce, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &TaskFemConstraintForce::onForceChanged); - connect(ui->buttonDirection, &QToolButton::clicked, - this, &TaskFemConstraintForce::onButtonDirection); - connect(ui->checkReverse, &QCheckBox::toggled, - this, &TaskFemConstraintForce::onCheckReverse); - connect(ui->listReferences, &QListWidget::itemClicked, - this, &TaskFemConstraintForce::setSelection); + connect(deleteAction, &QAction::triggered, this, &TaskFemConstraintForce::onReferenceDeleted); + connect(ui->spinForce, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &TaskFemConstraintForce::onForceChanged); + connect(ui->buttonDirection, + &QToolButton::clicked, + this, + &TaskFemConstraintForce::onButtonDirection); + connect(ui->checkReverse, &QCheckBox::toggled, this, &TaskFemConstraintForce::onCheckReverse); + connect(ui->listReferences, + &QListWidget::itemClicked, + this, + &TaskFemConstraintForce::setSelection); this->groupLayout()->addWidget(proxy); @@ -86,8 +90,9 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce* C std::vector SubElements = pcConstraint->References.getSubValues(); std::vector dirStrings = pcConstraint->Direction.getSubValues(); QString dir; - if (!dirStrings.empty()) + if (!dirStrings.empty()) { dir = makeRefText(pcConstraint->Direction.getValue(), dirStrings.front()); + } bool reversed = pcConstraint->Reversed.getValue(); // Fill data into dialog elements @@ -95,10 +100,12 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce* C ui->spinForce->setMaximum(FLOAT_MAX); ui->spinForce->setValue(f); ui->listReferences->clear(); - for (std::size_t i = 0; i < Objects.size(); i++) + for (std::size_t i = 0; i < Objects.size(); i++) { ui->listReferences->addItem(makeRefText(Objects[i], SubElements[i])); - if (!Objects.empty()) + } + if (!Objects.empty()) { ui->listReferences->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); + } ui->lineDirection->setText(dir.isEmpty() ? QString() : dir); ui->checkReverse->setChecked(reversed); @@ -107,7 +114,7 @@ TaskFemConstraintForce::TaskFemConstraintForce(ViewProviderFemConstraintForce* C ui->buttonDirection->blockSignals(false); ui->checkReverse->blockSignals(false); - //Selection buttons + // Selection buttons buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd); buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove); @@ -126,7 +133,7 @@ void TaskFemConstraintForce::updateUI() void TaskFemConstraintForce::addToSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -136,44 +143,47 @@ void TaskFemConstraintForce::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; } const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } // limit constraint such that only vertexes or faces or edges can be used depending on // what was selected first std::string searchStr; - if (subName.find("Vertex") != std::string::npos) + if (subName.find("Vertex") != std::string::npos) { searchStr = "Vertex"; - else if (subName.find("Edge") != std::string::npos) + } + else if (subName.find("Edge") != std::string::npos) { searchStr = "Edge"; - else + } + else { searchStr = "Face"; + } - for (const auto & SubElement : SubElements) { + for (const auto& SubElement : SubElements) { if (SubElement.find(searchStr) == std::string::npos) { - QString msg = tr( - "Only one type of selection (vertex, face or edge) per analysis feature allowed!"); + QString msg = tr("Only one type of selection (vertex, face or edge) per " + "analysis feature allowed!"); QMessageBox::warning(this, tr("Selection error"), msg); addMe = false; break; @@ -195,7 +205,7 @@ void TaskFemConstraintForce::addToSelection() void TaskFemConstraintForce::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -205,7 +215,7 @@ void TaskFemConstraintForce::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -213,19 +223,19 @@ void TaskFemConstraintForce::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -258,8 +268,8 @@ void TaskFemConstraintForce::onForceChanged(double f) void TaskFemConstraintForce::onReferenceDeleted() { - TaskFemConstraintForce::removeFromSelection();// OvG: On right-click face is automatically - // selected, so just remove + TaskFemConstraintForce::removeFromSelection(); // OvG: On right-click face is automatically + // selected, so just remove } std::pair @@ -276,8 +286,8 @@ TaskFemConstraintForce::getDirection(const std::vector& se // Line or Plane Base::Type line = Base::Type::fromName("PartDesign::Line"); Base::Type plane = Base::Type::fromName("PartDesign::Plane"); - if (selectionElement.isObjectTypeOf(App::Line::getClassTypeId()) || - selectionElement.isObjectTypeOf(App::Plane::getClassTypeId())) { + if (selectionElement.isObjectTypeOf(App::Line::getClassTypeId()) + || selectionElement.isObjectTypeOf(App::Plane::getClassTypeId())) { link = std::make_pair(selectionElement.getObject(), std::string()); } else if (selectionElement.isObjectTypeOf(line)) { @@ -359,16 +369,18 @@ const std::string TaskFemConstraintForce::getReferences() const int rows = ui->listReferences->model()->rowCount(); std::vector items; - for (int r = 0; r < rows; r++) + for (int r = 0; r < rows; r++) { items.push_back(ui->listReferences->item(r)->text().toStdString()); + } return TaskFemConstraint::getReferences(items); } const std::string TaskFemConstraintForce::getDirectionName() const { std::string dir = ui->lineDirection->text().toStdString(); - if (dir.empty()) + if (dir.empty()) { return ""; + } int pos = dir.find_last_of(":"); return dir.substr(0, pos).c_str(); @@ -377,8 +389,9 @@ const std::string TaskFemConstraintForce::getDirectionName() const const std::string TaskFemConstraintForce::getDirectionObject() const { std::string dir = ui->lineDirection->text().toStdString(); - if (dir.empty()) + if (dir.empty()) { return ""; + } int pos = dir.find_last_of(":"); return dir.substr(pos + 1).c_str(); @@ -408,10 +421,12 @@ void TaskFemConstraintForce::changeEvent(QEvent* e) void TaskFemConstraintForce::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -441,7 +456,7 @@ void TaskDlgFemConstraintForce::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -455,14 +470,17 @@ bool TaskDlgFemConstraintForce::accept() // Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "FEM force constraint changed")); if (parameterForce->getForce() <= 0) { - QMessageBox::warning( - parameter, tr("Input error"), tr("Please specify a force greater than 0")); + QMessageBox::warning(parameter, + tr("Input error"), + tr("Please specify a force greater than 0")); return false; } else { QByteArray num = QByteArray::number(parameterForce->getForce()); - Gui::Command::doCommand( - Gui::Command::Doc, "App.ActiveDocument.%s.Force = %s", name.c_str(), num.data()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Force = %s", + name.c_str(), + num.data()); } std::string dirname = parameterForce->getDirectionName().data(); @@ -479,8 +497,9 @@ bool TaskDlgFemConstraintForce::accept() buf.toStdString().c_str()); } else { - Gui::Command::doCommand( - Gui::Command::Doc, "App.ActiveDocument.%s.Direction = None", name.c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Direction = None", + name.c_str()); } Gui::Command::doCommand(Gui::Command::Doc, @@ -488,11 +507,11 @@ bool TaskDlgFemConstraintForce::accept() name.c_str(), parameterForce->getReverse() ? "True" : "False"); - scale = parameterForce->getScale();// OvG: determine modified scale + scale = parameterForce->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintForce.h b/src/Mod/Fem/Gui/TaskFemConstraintForce.h index e48efba508..1791766e3a 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintForce.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintForce.h @@ -24,8 +24,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintForce_H #define GUI_TASKVIEW_TaskFemConstraintForce_H -#include #include +#include #include "TaskFemConstraintOnBoundary.h" #include "ViewProviderFemConstraintForce.h" @@ -33,18 +33,21 @@ class Ui_TaskFemConstraintForce; -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class SelectionObject; class ViewProvider; -} +} // namespace Gui -namespace FemGui { +namespace FemGui +{ -class TaskFemConstraintForce : public TaskFemConstraintOnBoundary +class TaskFemConstraintForce: public TaskFemConstraintOnBoundary { Q_OBJECT @@ -67,8 +70,8 @@ private Q_SLOTS: void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -81,12 +84,12 @@ private: }; /// simulation dialog for the TaskView -class TaskDlgFemConstraintForce : public TaskDlgFemConstraint +class TaskDlgFemConstraintForce: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintForce(ViewProviderFemConstraintForce *ConstraintView); + explicit TaskDlgFemConstraintForce(ViewProviderFemConstraintForce* ConstraintView); /// is called by the framework if the dialog is accepted (Ok) void open() override; @@ -94,6 +97,6 @@ public: bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintForce_H +#endif // GUI_TASKVIEW_TaskFemConstraintForce_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp b/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp index b9c1c23554..f815e5d994 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintGear.cpp @@ -24,8 +24,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -45,19 +45,27 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintGear */ -TaskFemConstraintGear::TaskFemConstraintGear(ViewProviderFemConstraint *ConstraintView,QWidget *parent, const char *pixmapname) +TaskFemConstraintGear::TaskFemConstraintGear(ViewProviderFemConstraint* ConstraintView, + QWidget* parent, + const char* pixmapname) : TaskFemConstraintBearing(ConstraintView, parent, pixmapname) { - connect(ui->spinDiameter, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintGear::onDiameterChanged); - connect(ui->spinForce, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintGear::onForceChanged); - connect(ui->spinForceAngle, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintGear::onForceAngleChanged); - connect(ui->buttonDirection, &QPushButton::pressed, - this, [=]{onButtonDirection(true);}); - connect(ui->checkReversed, &QCheckBox::toggled, - this, &TaskFemConstraintGear::onCheckReversed); + connect(ui->spinDiameter, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintGear::onDiameterChanged); + connect(ui->spinForce, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintGear::onForceChanged); + connect(ui->spinForceAngle, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintGear::onForceAngleChanged); + connect(ui->buttonDirection, &QPushButton::pressed, this, [=] { + onButtonDirection(true); + }); + connect(ui->checkReversed, &QCheckBox::toggled, this, &TaskFemConstraintGear::onCheckReversed); // Temporarily prevent unnecessary feature recomputes ui->spinDiameter->blockSignals(true); @@ -66,14 +74,16 @@ TaskFemConstraintGear::TaskFemConstraintGear(ViewProviderFemConstraint *Constrai ui->checkReversed->blockSignals(true); // Get the feature data - Fem::ConstraintGear* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintGear* pcConstraint = + static_cast(ConstraintView->getObject()); double dia = pcConstraint->Diameter.getValue(); double force = pcConstraint->Force.getValue(); double angle = pcConstraint->ForceAngle.getValue(); std::vector dirStrings = pcConstraint->Direction.getSubValues(); QString dir; - if (!dirStrings.empty()) + if (!dirStrings.empty()) { dir = makeRefText(pcConstraint->Direction.getValue(), dirStrings.front()); + } bool reversed = pcConstraint->Reversed.getValue(); // Fill data into dialog elements @@ -113,37 +123,48 @@ void TaskFemConstraintGear::onSelectionChanged(const Gui::SelectionChanges& msg) if (msg.Type == Gui::SelectionChanges::AddSelection) { // Don't allow selection in other document - if (strcmp(msg.pDocName, ConstraintView->getObject()->getDocument()->getName()) != 0) + if (strcmp(msg.pDocName, ConstraintView->getObject()->getDocument()->getName()) != 0) { return; + } - if (!msg.pSubName || msg.pSubName[0] == '\0') + if (!msg.pSubName || msg.pSubName[0] == '\0') { return; + } std::string subName(msg.pSubName); - if (selectionMode == selnone) + if (selectionMode == selnone) { return; + } - std::vector references(1,subName); - Fem::ConstraintGear* pcConstraint = static_cast(ConstraintView->getObject()); - App::DocumentObject* obj = ConstraintView->getObject()->getDocument()->getObject(msg.pObjectName); + std::vector references(1, subName); + Fem::ConstraintGear* pcConstraint = + static_cast(ConstraintView->getObject()); + App::DocumentObject* obj = + ConstraintView->getObject()->getDocument()->getObject(msg.pObjectName); Part::Feature* feat = static_cast(obj); TopoDS_Shape ref = feat->Shape.getShape().getSubShape(subName.c_str()); if (selectionMode == seldir) { - if (subName.substr(0,4) == "Face") { + if (subName.substr(0, 4) == "Face") { if (!Fem::Tools::isPlanar(TopoDS::Face(ref))) { - QMessageBox::warning(this, tr("Selection error"), tr("Only planar faces can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only planar faces can be picked")); return; } } - else if (subName.substr(0,4) == "Edge") { + else if (subName.substr(0, 4) == "Edge") { if (!Fem::Tools::isLinear(TopoDS::Edge(ref))) { - QMessageBox::warning(this, tr("Selection error"), tr("Only linear edges can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only linear edges can be picked")); return; } } else { - QMessageBox::warning(this, tr("Selection error"), tr("Only faces and edges can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only faces and edges can be picked")); return; } pcConstraint->Direction.setValue(obj, references); @@ -159,26 +180,31 @@ void TaskFemConstraintGear::onSelectionChanged(const Gui::SelectionChanges& msg) void TaskFemConstraintGear::onDiameterChanged(double l) { - Fem::ConstraintGear* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintGear* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->Diameter.setValue(l); } void TaskFemConstraintGear::onForceChanged(double f) { - Fem::ConstraintGear* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintGear* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->Force.setValue(f); } void TaskFemConstraintGear::onForceAngleChanged(double a) { - Fem::ConstraintGear* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintGear* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->ForceAngle.setValue(a); } -void TaskFemConstraintGear::onButtonDirection(const bool pressed) { +void TaskFemConstraintGear::onButtonDirection(const bool pressed) +{ if (pressed) { selectionMode = seldir; - } else { + } + else { selectionMode = selnone; } ui->buttonDirection->setChecked(pressed); @@ -187,7 +213,8 @@ void TaskFemConstraintGear::onButtonDirection(const bool pressed) { void TaskFemConstraintGear::onCheckReversed(const bool pressed) { - Fem::ConstraintGear* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintGear* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->Reversed.setValue(pressed); } @@ -204,8 +231,9 @@ double TaskFemConstraintGear::getForceAngle() const const std::string TaskFemConstraintGear::getDirectionName() const { std::string dir = ui->lineDirection->text().toStdString(); - if (dir.empty()) + if (dir.empty()) { return ""; + } int pos = dir.find_last_of(":"); return dir.substr(0, pos).c_str(); @@ -214,11 +242,12 @@ const std::string TaskFemConstraintGear::getDirectionName() const const std::string TaskFemConstraintGear::getDirectionObject() const { std::string dir = ui->lineDirection->text().toStdString(); - if (dir.empty()) + if (dir.empty()) { return ""; + } int pos = dir.find_last_of(":"); - return dir.substr(pos+1).c_str(); + return dir.substr(pos + 1).c_str(); } bool TaskFemConstraintGear::getReverse() const @@ -231,7 +260,7 @@ double TaskFemConstraintGear::getDiameter() const return ui->spinDiameter->value(); } -void TaskFemConstraintGear::changeEvent(QEvent *e) +void TaskFemConstraintGear::changeEvent(QEvent* e) { TaskBox::changeEvent(e); if (e->type() == QEvent::LanguageChange) { @@ -252,7 +281,7 @@ void TaskFemConstraintGear::changeEvent(QEvent *e) // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgFemConstraintGear::TaskDlgFemConstraintGear(ViewProviderFemConstraintGear *ConstraintView) +TaskDlgFemConstraintGear::TaskDlgFemConstraintGear(ViewProviderFemConstraintGear* ConstraintView) { this->ConstraintView = ConstraintView; assert(ConstraintView); @@ -266,10 +295,11 @@ TaskDlgFemConstraintGear::TaskDlgFemConstraintGear(ViewProviderFemConstraintGear bool TaskDlgFemConstraintGear::accept() { std::string name = ConstraintView->getObject()->getNameInDocument(); - const TaskFemConstraintGear* parameterGear = static_cast(parameter); + const TaskFemConstraintGear* parameterGear = + static_cast(parameter); try { - //Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "FEM force constraint changed")); + // Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "FEM force constraint changed")); std::string dirname = parameterGear->getDirectionName().data(); std::string dirobj = parameterGear->getDirectionObject().data(); @@ -277,15 +307,33 @@ bool TaskDlgFemConstraintGear::accept() QString buf = QString::fromUtf8("(App.ActiveDocument.%1,[\"%2\"])"); buf = buf.arg(QString::fromStdString(dirname)); buf = buf.arg(QString::fromStdString(dirobj)); - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Direction = %s", name.c_str(), buf.toStdString().c_str()); - } else { - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Direction = None", name.c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Direction = %s", + name.c_str(), + buf.toStdString().c_str()); + } + else { + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Direction = None", + name.c_str()); } - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Reversed = %s", name.c_str(), parameterGear->getReverse() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Diameter = %f",name.c_str(), parameterGear->getDiameter()); - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Force = %f",name.c_str(), parameterGear->getForce()); - Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.ForceAngle = %f",name.c_str(), parameterGear->getForceAngle()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Reversed = %s", + name.c_str(), + parameterGear->getReverse() ? "True" : "False"); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Diameter = %f", + name.c_str(), + parameterGear->getDiameter()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Force = %f", + name.c_str(), + parameterGear->getForce()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.ForceAngle = %f", + name.c_str(), + parameterGear->getForceAngle()); } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintGear.h b/src/Mod/Fem/Gui/TaskFemConstraintGear.h index c8f12ad7d8..6b2f205cd1 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintGear.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintGear.h @@ -27,15 +27,17 @@ #include "TaskFemConstraintBearing.h" #include "ViewProviderFemConstraintGear.h" -namespace FemGui { +namespace FemGui +{ -class TaskFemConstraintGear : public TaskFemConstraintBearing +class TaskFemConstraintGear: public TaskFemConstraintBearing { Q_OBJECT public: - explicit TaskFemConstraintGear(ViewProviderFemConstraint *ConstraintView,QWidget *parent = nullptr, - const char* pixmapname = "FEM_ConstraintGear"); + explicit TaskFemConstraintGear(ViewProviderFemConstraint* ConstraintView, + QWidget* parent = nullptr, + const char* pixmapname = "FEM_ConstraintGear"); double getDiameter() const; double getForce() const; @@ -52,24 +54,23 @@ private Q_SLOTS: void onCheckReversed(bool); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; void onSelectionChanged(const Gui::SelectionChanges& msg) override; }; /// simulation dialog for the TaskView -class TaskDlgFemConstraintGear : public TaskDlgFemConstraintBearing +class TaskDlgFemConstraintGear: public TaskDlgFemConstraintBearing { Q_OBJECT public: TaskDlgFemConstraintGear() = default; - explicit TaskDlgFemConstraintGear(ViewProviderFemConstraintGear *ConstraintView); + explicit TaskDlgFemConstraintGear(ViewProviderFemConstraintGear* ConstraintView); /// is called by the framework if the dialog is accepted (Ok) bool accept() override; - }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintGear_H +#endif // GUI_TASKVIEW_TaskFemConstraintGear_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp index 9f05ca7f64..5a5cb9aa47 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.cpp @@ -26,9 +26,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -45,9 +45,10 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintHeatflux */ TaskFemConstraintHeatflux::TaskFemConstraintHeatflux( - ViewProviderFemConstraintHeatflux* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintHeatflux"), - ui(new Ui_TaskFemConstraintHeatflux) + ViewProviderFemConstraintHeatflux* ConstraintView, + QWidget* parent) + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintHeatflux") + , ui(new Ui_TaskFemConstraintHeatflux) { proxy = new QWidget(this); ui->setupUi(proxy); @@ -55,28 +56,36 @@ TaskFemConstraintHeatflux::TaskFemConstraintHeatflux( // create a context menu for the listview of the references createDeleteAction(ui->lw_references); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintHeatflux::onReferenceDeleted); + connect(deleteAction, + &QAction::triggered, + this, + &TaskFemConstraintHeatflux::onReferenceDeleted); - connect(ui->rb_convection, &QRadioButton::clicked, - this, &TaskFemConstraintHeatflux::Conv); - connect(ui->rb_dflux, &QRadioButton::clicked, - this, &TaskFemConstraintHeatflux::Flux); + connect(ui->rb_convection, &QRadioButton::clicked, this, &TaskFemConstraintHeatflux::Conv); + connect(ui->rb_dflux, &QRadioButton::clicked, this, &TaskFemConstraintHeatflux::Flux); - connect(ui->if_heatflux, qOverload(&InputField::valueChanged), - this, &TaskFemConstraintHeatflux::onHeatFluxChanged); - connect(ui->if_ambienttemp, qOverload(&InputField::valueChanged), - this, &TaskFemConstraintHeatflux::onAmbientTempChanged); - connect(ui->if_filmcoef, qOverload(&InputField::valueChanged), - this, &TaskFemConstraintHeatflux::onFilmCoefChanged); - connect(ui->lw_references, &QListWidget::itemClicked, - this, &TaskFemConstraintHeatflux::setSelection); + connect(ui->if_heatflux, + qOverload(&InputField::valueChanged), + this, + &TaskFemConstraintHeatflux::onHeatFluxChanged); + connect(ui->if_ambienttemp, + qOverload(&InputField::valueChanged), + this, + &TaskFemConstraintHeatflux::onAmbientTempChanged); + connect(ui->if_filmcoef, + qOverload(&InputField::valueChanged), + this, + &TaskFemConstraintHeatflux::onFilmCoefChanged); + connect(ui->lw_references, + &QListWidget::itemClicked, + this, + &TaskFemConstraintHeatflux::setSelection); this->groupLayout()->addWidget(proxy); // Temporarily prevent unnecessary feature recomputes ui->if_ambienttemp->blockSignals(true); - //ui->if_facetemp->blockSignals(true); + // ui->if_facetemp->blockSignals(true); ui->if_filmcoef->blockSignals(true); ui->lw_references->blockSignals(true); ui->btnAdd->blockSignals(true); @@ -121,12 +130,12 @@ TaskFemConstraintHeatflux::TaskFemConstraintHeatflux( ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); } - //Selection buttons + // Selection buttons buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd); buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove); ui->if_ambienttemp->blockSignals(false); - //ui->if_facetemp->blockSignals(false); + // ui->if_facetemp->blockSignals(false); ui->if_filmcoef->blockSignals(false); ui->lw_references->blockSignals(false); ui->btnAdd->blockSignals(false); @@ -150,14 +159,14 @@ void TaskFemConstraintHeatflux::onAmbientTempChanged(double val) { Fem::ConstraintHeatflux* pcConstraint = static_cast(ConstraintView->getObject()); - pcConstraint->AmbientTemp.setValue(val);//[K] + pcConstraint->AmbientTemp.setValue(val); //[K] } void TaskFemConstraintHeatflux::onFilmCoefChanged(double val) { Fem::ConstraintHeatflux* pcConstraint = static_cast(ConstraintView->getObject()); - pcConstraint->FilmCoef.setValue(val);// [W]/[[m^2]/[K]] + pcConstraint->FilmCoef.setValue(val); // [W]/[[m^2]/[K]] } void TaskFemConstraintHeatflux::onHeatFluxChanged(double val) @@ -203,7 +212,7 @@ void TaskFemConstraintHeatflux::Flux() void TaskFemConstraintHeatflux::addToSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -213,7 +222,7 @@ void TaskFemConstraintHeatflux::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -222,10 +231,11 @@ void TaskFemConstraintHeatflux::addToSelection() App::DocumentObject* obj = it.getObject(); if (!subNames.empty()) { - for (const auto & subName : subNames) { + for (const auto& subName : subNames) { if (subName.substr(0, 4) != "Face") { - QMessageBox::warning( - this, tr("Selection error"), tr("Selection must only consist of faces!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Selection must only consist of faces!")); return; } } @@ -234,20 +244,20 @@ void TaskFemConstraintHeatflux::addToSelection() // fix me, if an object is selected completely, getSelectionEx does not return any // SubElements } - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } @@ -267,7 +277,7 @@ void TaskFemConstraintHeatflux::addToSelection() void TaskFemConstraintHeatflux::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -278,7 +288,7 @@ void TaskFemConstraintHeatflux::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -287,10 +297,11 @@ void TaskFemConstraintHeatflux::removeFromSelection() const App::DocumentObject* obj = it.getObject(); if (!subNames.empty()) { - for (const auto & subName : subNames) { + for (const auto& subName : subNames) { if (subName.substr(0, 4) != "Face") { - QMessageBox::warning( - this, tr("Selection error"), tr("Selection must only consist of faces!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Selection must only consist of faces!")); return; } } @@ -299,19 +310,19 @@ void TaskFemConstraintHeatflux::removeFromSelection() // fix me, if an object is selected completely, getSelectionEx does not return any // SubElements } - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -365,7 +376,8 @@ double TaskFemConstraintHeatflux::getFilmCoef() const return filmcoef_in_units; } -std::string TaskFemConstraintHeatflux::get_constraint_type() const { +std::string TaskFemConstraintHeatflux::get_constraint_type() const +{ std::string type; if (ui->rb_convection->isChecked()) { type = "\"Convection\""; @@ -395,10 +407,12 @@ void TaskFemConstraintHeatflux::changeEvent(QEvent* e) void TaskFemConstraintHeatflux::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -428,7 +442,7 @@ void TaskDlgFemConstraintHeatflux::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -451,11 +465,11 @@ bool TaskDlgFemConstraintHeatflux::accept() name.c_str(), parameterHeatflux->getFilmCoef()); - scale = parameterHeatflux->getScale();// OvG: determine modified scale + scale = parameterHeatflux->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.h b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.h index e83786ea93..3d50623086 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintHeatflux.h @@ -26,8 +26,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintHeatflux_H #define GUI_TASKVIEW_TaskFemConstraintHeatflux_H -#include #include +#include #include "TaskFemConstraintOnBoundary.h" #include "ViewProviderFemConstraintHeatflux.h" @@ -35,8 +35,9 @@ class Ui_TaskFemConstraintHeatflux; -namespace FemGui { -class TaskFemConstraintHeatflux : public TaskFemConstraintOnBoundary +namespace FemGui +{ +class TaskFemConstraintHeatflux: public TaskFemConstraintOnBoundary { Q_OBJECT @@ -62,8 +63,8 @@ private Q_SLOTS: void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -71,17 +72,17 @@ private: std::unique_ptr ui; }; -class TaskDlgFemConstraintHeatflux : public TaskDlgFemConstraint +class TaskDlgFemConstraintHeatflux: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintHeatflux(ViewProviderFemConstraintHeatflux *ConstraintView); + explicit TaskDlgFemConstraintHeatflux(ViewProviderFemConstraintHeatflux* ConstraintView); void open() override; bool accept() override; bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintHeatflux_H +#endif // GUI_TASKVIEW_TaskFemConstraintHeatflux_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.cpp b/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.cpp index 3c0b56a688..640b86cd32 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.cpp @@ -26,8 +26,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -43,9 +43,10 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintInitialTemperature */ TaskFemConstraintInitialTemperature::TaskFemConstraintInitialTemperature( - ViewProviderFemConstraintInitialTemperature* ConstraintView, QWidget* parent) - : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintInitialTemperature"), - ui(new Ui_TaskFemConstraintInitialTemperature) + ViewProviderFemConstraintInitialTemperature* ConstraintView, + QWidget* parent) + : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintInitialTemperature") + , ui(new Ui_TaskFemConstraintInitialTemperature) { proxy = new QWidget(this); ui->setupUi(proxy); @@ -102,7 +103,7 @@ void TaskDlgFemConstraintInitialTemperature::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -118,11 +119,11 @@ bool TaskDlgFemConstraintInitialTemperature::accept() name.c_str(), parameterTemperature->get_temperature().c_str()); - std::string scale = parameterTemperature->getScale();// OvG: determine modified scale + std::string scale = parameterTemperature->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); @@ -131,8 +132,9 @@ bool TaskDlgFemConstraintInitialTemperature::accept() try { Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()"); - if (!ConstraintView->getObject()->isValid()) + if (!ConstraintView->getObject()->isValid()) { throw Base::RuntimeError(ConstraintView->getObject()->getStatusString()); + } Gui::Command::doCommand(Gui::Command::Gui, "Gui.activeDocument().resetEdit()"); Gui::Command::commitCommand(); } diff --git a/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.h b/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.h index 459ab7d718..ce5b554021 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintInitialTemperature.h @@ -26,8 +26,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintInitialTemperature_H #define GUI_TASKVIEW_TaskFemConstraintInitialTemperature_H -#include #include +#include #include "TaskFemConstraint.h" #include "ViewProviderFemConstraintInitialTemperature.h" @@ -35,25 +35,27 @@ class Ui_TaskFemConstraintInitialTemperature; -namespace FemGui { -class TaskFemConstraintInitialTemperature : public TaskFemConstraint +namespace FemGui +{ +class TaskFemConstraintInitialTemperature: public TaskFemConstraint { Q_OBJECT public: explicit TaskFemConstraintInitialTemperature( - ViewProviderFemConstraintInitialTemperature* ConstraintView, QWidget* parent = nullptr); + ViewProviderFemConstraintInitialTemperature* ConstraintView, + QWidget* parent = nullptr); ~TaskFemConstraintInitialTemperature() override; std::string get_temperature() const; protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -class TaskDlgFemConstraintInitialTemperature : public TaskDlgFemConstraint +class TaskDlgFemConstraintInitialTemperature: public TaskDlgFemConstraint { Q_OBJECT @@ -65,6 +67,6 @@ public: bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintInitialTemperature_H +#endif // GUI_TASKVIEW_TaskFemConstraintInitialTemperature_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.cpp b/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.cpp index c8c880e8ca..ebc93875c2 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.cpp @@ -30,7 +30,9 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintOnBoundary */ -TaskFemConstraintOnBoundary::TaskFemConstraintOnBoundary(ViewProviderFemConstraint* ConstraintView, QWidget* parent, const char* pixmapname) +TaskFemConstraintOnBoundary::TaskFemConstraintOnBoundary(ViewProviderFemConstraint* ConstraintView, + QWidget* parent, + const char* pixmapname) : TaskFemConstraint(ConstraintView, parent, pixmapname) , selChangeMode(SelectionChangeModes::none) { @@ -39,29 +41,32 @@ TaskFemConstraintOnBoundary::TaskFemConstraintOnBoundary(ViewProviderFemConstrai buttonGroup = new ButtonGroup(this); buttonGroup->setExclusive(true); - connect(buttonGroup, qOverload(&QButtonGroup::buttonToggled), - this, &TaskFemConstraintOnBoundary::onButtonToggled); + connect(buttonGroup, + qOverload(&QButtonGroup::buttonToggled), + this, + &TaskFemConstraintOnBoundary::onButtonToggled); } TaskFemConstraintOnBoundary::~TaskFemConstraintOnBoundary() { - if (!ConstraintView.expired()) + if (!ConstraintView.expired()) { ConstraintView->highlightReferences(false); + } } -void TaskFemConstraintOnBoundary::onButtonToggled(QAbstractButton *button, bool checked) +void TaskFemConstraintOnBoundary::onButtonToggled(QAbstractButton* button, bool checked) { auto mode = static_cast(buttonGroup->id(button)); Gui::Selection().clearSelection(); - if (checked) - { + if (checked) { selChangeMode = mode; ConstraintView->highlightReferences(true); } else { - if (selChangeMode == mode) + if (selChangeMode == mode) { selChangeMode = SelectionChangeModes::none; + } } } @@ -69,18 +74,19 @@ void TaskFemConstraintOnBoundary::onSelectionChanged(const Gui::SelectionChanges { if (msg.Type == Gui::SelectionChanges::AddSelection) { switch (selChangeMode) { - case SelectionChangeModes::refAdd: - // TODO: Optimize to just perform actions on the newly selected item. Suggestion from PartDesign: - // ui->lw_references->addItem(makeRefText(msg.pObjectName, msg.pSubName)); - this->addToSelection(); - break; - case SelectionChangeModes::refRemove: - this->removeFromSelection(); - break; - case SelectionChangeModes::none: - return; - default: - return; + case SelectionChangeModes::refAdd: + // TODO: Optimize to just perform actions on the newly selected item. Suggestion + // from PartDesign: ui->lw_references->addItem(makeRefText(msg.pObjectName, + // msg.pSubName)); + this->addToSelection(); + break; + case SelectionChangeModes::refRemove: + this->removeFromSelection(); + break; + case SelectionChangeModes::none: + return; + default: + return; } ConstraintView->highlightReferences(true); } diff --git a/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.h b/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.h index 6367fa9ba7..e369bced23 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintOnBoundary.h @@ -27,14 +27,15 @@ #include #include -#include #include +#include #include #include "TaskFemConstraint.h" -namespace FemGui { +namespace FemGui +{ /** @brief Taskbox for FEM constraints that apply on subsets of the domain boundary * @@ -42,29 +43,36 @@ namespace FemGui { * that apply on subsets of the boundary (faces/edges/vertices), where one or * more boundary entities need to be selected. */ -class TaskFemConstraintOnBoundary : public TaskFemConstraint +class TaskFemConstraintOnBoundary: public TaskFemConstraint { Q_OBJECT public: - explicit TaskFemConstraintOnBoundary(ViewProviderFemConstraint *ConstraintView, QWidget *parent = nullptr, const char* pixmapname = ""); + explicit TaskFemConstraintOnBoundary(ViewProviderFemConstraint* ConstraintView, + QWidget* parent = nullptr, + const char* pixmapname = ""); ~TaskFemConstraintOnBoundary() override; protected Q_SLOTS: - void onButtonToggled(QAbstractButton *button, bool checked); + void onButtonToggled(QAbstractButton* button, bool checked); virtual void addToSelection() = 0; virtual void removeFromSelection() = 0; protected: - enum class SelectionChangeModes {none, refAdd, refRemove}; + enum class SelectionChangeModes + { + none, + refAdd, + refRemove + }; void onSelectionChanged(const Gui::SelectionChanges&) override; virtual void clearButtons(const SelectionChangeModes notThis) = 0; protected: enum SelectionChangeModes selChangeMode; - Gui::ButtonGroup *buttonGroup; + Gui::ButtonGroup* buttonGroup; }; -} // namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintOnBoundary_H +#endif // GUI_TASKVIEW_TaskFemConstraintOnBoundary_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp index c8608e1c8c..a5419a4049 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.cpp @@ -26,10 +26,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -50,22 +50,29 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintPlaneRotation */ TaskFemConstraintPlaneRotation::TaskFemConstraintPlaneRotation( - ViewProviderFemConstraintPlaneRotation* ConstraintView, QWidget* parent) - : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintPlaneRotation"), - ui(new Ui_TaskFemConstraintPlaneRotation) -{ //Note change "planerotation" in line above to new constraint name + ViewProviderFemConstraintPlaneRotation* ConstraintView, + QWidget* parent) + : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintPlaneRotation") + , ui(new Ui_TaskFemConstraintPlaneRotation) +{ // Note change "planerotation" in line above to new constraint name proxy = new QWidget(this); ui->setupUi(proxy); QMetaObject::connectSlotsByName(this); // create a context menu for the listview of the references createDeleteAction(ui->lw_references); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintPlaneRotation::onReferenceDeleted); - connect(ui->lw_references, &QListWidget::currentItemChanged, - this, &TaskFemConstraintPlaneRotation::setSelection); - connect(ui->lw_references, &QListWidget::itemClicked, - this, &TaskFemConstraintPlaneRotation::setSelection); + connect(deleteAction, + &QAction::triggered, + this, + &TaskFemConstraintPlaneRotation::onReferenceDeleted); + connect(ui->lw_references, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintPlaneRotation::setSelection); + connect(ui->lw_references, + &QListWidget::itemClicked, + this, + &TaskFemConstraintPlaneRotation::setSelection); this->groupLayout()->addWidget(proxy); @@ -88,10 +95,14 @@ TaskFemConstraintPlaneRotation::TaskFemConstraintPlaneRotation( } // Selection buttons - connect(ui->btnAdd, &QToolButton::clicked, - this, &TaskFemConstraintPlaneRotation::addToSelection); - connect(ui->btnRemove, &QToolButton::clicked, - this, &TaskFemConstraintPlaneRotation::removeFromSelection); + connect(ui->btnAdd, + &QToolButton::clicked, + this, + &TaskFemConstraintPlaneRotation::addToSelection); + connect(ui->btnRemove, + &QToolButton::clicked, + this, + &TaskFemConstraintPlaneRotation::removeFromSelection); updateUI(); } @@ -111,15 +122,17 @@ void TaskFemConstraintPlaneRotation::addToSelection() { int rows = ui->lw_references->model()->rowCount(); if (rows == 1) { - QMessageBox::warning(this, - tr("Selection error"), - tr("Only one face can be selected for a plane multi-point constraint!")); + QMessageBox::warning( + this, + tr("Selection error"), + tr("Only one face can be selected for a plane multi-point constraint!")); Gui::Selection().clearSelection(); return; } else { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection() + .getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -129,29 +142,32 @@ void TaskFemConstraintPlaneRotation::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { - QMessageBox::warning( - this, tr("Selection error"), tr("Selected object is not a part!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Selected object is not a part!")); return; } const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); if (subNames.size() == 1) { - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; if ((subName.substr(0, 4) != "Face")) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only faces can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only faces can be picked")); return; } Part::Feature* feat = static_cast(obj); TopoDS_Shape ref = feat->Shape.getShape().getSubShape(subName.c_str()); if ((subName.substr(0, 4) == "Face")) { if (!Fem::Tools::isPlanar(TopoDS::Face(ref))) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only planar faces can be picked")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only planar faces can be picked")); return; } } @@ -160,13 +176,13 @@ void TaskFemConstraintPlaneRotation::addToSelection() itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection - // that matches one in old list + subName)) { // for every sub element in selection + // that matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old - // list then it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old + // list then it was added before so don't add addMe = false; } } @@ -196,7 +212,7 @@ void TaskFemConstraintPlaneRotation::addToSelection() void TaskFemConstraintPlaneRotation::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -206,7 +222,7 @@ void TaskFemConstraintPlaneRotation::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -214,19 +230,19 @@ void TaskFemConstraintPlaneRotation::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -250,7 +266,8 @@ void TaskFemConstraintPlaneRotation::removeFromSelection() updateUI(); } -void TaskFemConstraintPlaneRotation::onReferenceDeleted() { +void TaskFemConstraintPlaneRotation::onReferenceDeleted() +{ TaskFemConstraintPlaneRotation::removeFromSelection(); } @@ -270,8 +287,7 @@ bool TaskFemConstraintPlaneRotation::event(QEvent* e) } void TaskFemConstraintPlaneRotation::changeEvent(QEvent*) -{ -} +{} //************************************************************************** // TaskDialog @@ -300,7 +316,7 @@ void TaskDlgFemConstraintPlaneRotation::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -309,11 +325,11 @@ bool TaskDlgFemConstraintPlaneRotation::accept() std::string name = ConstraintView->getObject()->getNameInDocument(); const TaskFemConstraintPlaneRotation* parameters = static_cast(parameter); - std::string scale = parameters->getScale();// OvG: determine modified scale + std::string scale = parameters->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale return TaskDlgFemConstraint::accept(); } diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.h b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.h index 1ad2707fcb..1a55a0e27e 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintPlaneRotation.h @@ -26,8 +26,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintPlaneRotation_H #define GUI_TASKVIEW_TaskFemConstraintPlaneRotation_H -#include #include +#include #include "TaskFemConstraint.h" #include "ViewProviderFemConstraintPlaneRotation.h" @@ -35,8 +35,9 @@ class Ui_TaskFemConstraintPlaneRotation; -namespace FemGui { -class TaskFemConstraintPlaneRotation : public TaskFemConstraint +namespace FemGui +{ +class TaskFemConstraintPlaneRotation: public TaskFemConstraint { Q_OBJECT @@ -52,15 +53,15 @@ private Q_SLOTS: void removeFromSelection(); protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; private: void updateUI(); std::unique_ptr ui; }; -class TaskDlgFemConstraintPlaneRotation : public TaskDlgFemConstraint +class TaskDlgFemConstraintPlaneRotation: public TaskDlgFemConstraint { Q_OBJECT @@ -72,6 +73,6 @@ public: bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintPlaneRotation_H +#endif // GUI_TASKVIEW_TaskFemConstraintPlaneRotation_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp index c17312ae44..dec2df4f65 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintPressure.cpp @@ -24,9 +24,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -43,25 +43,34 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintPressure */ TaskFemConstraintPressure::TaskFemConstraintPressure( - ViewProviderFemConstraintPressure* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintPressure"), - ui(new Ui_TaskFemConstraintPressure) -{ //Note change "pressure" in line above to new constraint name + ViewProviderFemConstraintPressure* ConstraintView, + QWidget* parent) + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintPressure") + , ui(new Ui_TaskFemConstraintPressure) +{ // Note change "pressure" in line above to new constraint name proxy = new QWidget(this); ui->setupUi(proxy); QMetaObject::connectSlotsByName(this); // create a context menu for the listview of the references createDeleteAction(ui->lw_references); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintPressure::onReferenceDeleted); - connect(ui->lw_references, &QListWidget::currentItemChanged, - this, &TaskFemConstraintPressure::setSelection); - connect(ui->lw_references, &QListWidget::itemClicked, - this, &TaskFemConstraintPressure::setSelection); + connect(deleteAction, + &QAction::triggered, + this, + &TaskFemConstraintPressure::onReferenceDeleted); + connect(ui->lw_references, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintPressure::setSelection); + connect(ui->lw_references, + &QListWidget::itemClicked, + this, + &TaskFemConstraintPressure::setSelection); - connect(ui->checkBoxReverse, &QCheckBox::toggled, - this, &TaskFemConstraintPressure::onCheckReverse); + connect(ui->checkBoxReverse, + &QCheckBox::toggled, + this, + &TaskFemConstraintPressure::onCheckReverse); this->groupLayout()->addWidget(proxy); @@ -91,7 +100,7 @@ TaskFemConstraintPressure::TaskFemConstraintPressure( ui->lw_references->setCurrentRow(0, QItemSelectionModel::ClearAndSelect); } - //Selection buttons + // Selection buttons buttonGroup->addButton(ui->btnAdd, (int)SelectionChangeModes::refAdd); buttonGroup->addButton(ui->btnRemove, (int)SelectionChangeModes::refRemove); @@ -119,7 +128,7 @@ void TaskFemConstraintPressure::onCheckReverse(const bool pressed) void TaskFemConstraintPressure::addToSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -129,7 +138,7 @@ void TaskFemConstraintPressure::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -137,7 +146,7 @@ void TaskFemConstraintPressure::addToSelection() const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; if (subName.substr(0, 4) != "Face") { QMessageBox::warning(this, tr("Selection error"), tr("Only faces can be picked")); @@ -148,13 +157,13 @@ void TaskFemConstraintPressure::addToSelection() itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } @@ -174,7 +183,7 @@ void TaskFemConstraintPressure::addToSelection() void TaskFemConstraintPressure::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -184,7 +193,7 @@ void TaskFemConstraintPressure::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -192,19 +201,19 @@ void TaskFemConstraintPressure::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -228,7 +237,8 @@ void TaskFemConstraintPressure::removeFromSelection() updateUI(); } -void TaskFemConstraintPressure::onReferenceDeleted() { +void TaskFemConstraintPressure::onReferenceDeleted() +{ TaskFemConstraintPressure::removeFromSelection(); } @@ -261,15 +271,16 @@ bool TaskFemConstraintPressure::event(QEvent* e) } void TaskFemConstraintPressure::changeEvent(QEvent*) -{ -} +{} void TaskFemConstraintPressure::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -299,7 +310,7 @@ void TaskDlgFemConstraintPressure::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -319,11 +330,11 @@ bool TaskDlgFemConstraintPressure::accept() "App.ActiveDocument.%s.Reversed = %s", name.c_str(), parameterPressure->get_Reverse() ? "True" : "False"); - std::string scale = parameterPressure->getScale();// OvG: determine modified scale + std::string scale = parameterPressure->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPressure.h b/src/Mod/Fem/Gui/TaskFemConstraintPressure.h index fd27a34fa0..d540829388 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPressure.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintPressure.h @@ -26,8 +26,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintPressure_H #define GUI_TASKVIEW_TaskFemConstraintPressure_H -#include #include +#include #include "TaskFemConstraintOnBoundary.h" #include "ViewProviderFemConstraintPressure.h" @@ -35,8 +35,9 @@ class Ui_TaskFemConstraintPressure; -namespace FemGui { -class TaskFemConstraintPressure : public TaskFemConstraintOnBoundary +namespace FemGui +{ +class TaskFemConstraintPressure: public TaskFemConstraintOnBoundary { Q_OBJECT @@ -45,8 +46,8 @@ public: QWidget* parent = nullptr); ~TaskFemConstraintPressure() override; const std::string getReferences() const override; - double get_Pressure()const; - bool get_Reverse()const; + double get_Pressure() const; + bool get_Reverse() const; private Q_SLOTS: void onReferenceDeleted(); @@ -55,8 +56,8 @@ private Q_SLOTS: void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -64,17 +65,17 @@ private: std::unique_ptr ui; }; -class TaskDlgFemConstraintPressure : public TaskDlgFemConstraint +class TaskDlgFemConstraintPressure: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintPressure(ViewProviderFemConstraintPressure *ConstraintView); + explicit TaskDlgFemConstraintPressure(ViewProviderFemConstraintPressure* ConstraintView); void open() override; bool accept() override; bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintPressure_H +#endif // GUI_TASKVIEW_TaskFemConstraintPressure_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPulley.cpp b/src/Mod/Fem/Gui/TaskFemConstraintPulley.cpp index ec0d9b6d8d..a15cf6b11d 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPulley.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintPulley.cpp @@ -24,7 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -40,17 +40,26 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintPulley */ -TaskFemConstraintPulley::TaskFemConstraintPulley(ViewProviderFemConstraintPulley* ConstraintView, QWidget* parent) +TaskFemConstraintPulley::TaskFemConstraintPulley(ViewProviderFemConstraintPulley* ConstraintView, + QWidget* parent) : TaskFemConstraintGear(ConstraintView, parent, "FEM_ConstraintPulley") { - connect(ui->spinOtherDiameter, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintPulley::onOtherDiameterChanged); - connect(ui->spinCenterDistance, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintPulley::onCenterDistanceChanged); - connect(ui->checkIsDriven, &QCheckBox::toggled, - this, &TaskFemConstraintPulley::onCheckIsDriven); - connect(ui->spinTensionForce, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskFemConstraintPulley::onTensionForceChanged); + connect(ui->spinOtherDiameter, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintPulley::onOtherDiameterChanged); + connect(ui->spinCenterDistance, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintPulley::onCenterDistanceChanged); + connect(ui->checkIsDriven, + &QCheckBox::toggled, + this, + &TaskFemConstraintPulley::onCheckIsDriven); + connect(ui->spinTensionForce, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskFemConstraintPulley::onTensionForceChanged); // Temporarily prevent unnecessary feature recomputes ui->spinOtherDiameter->blockSignals(true); @@ -59,7 +68,8 @@ TaskFemConstraintPulley::TaskFemConstraintPulley(ViewProviderFemConstraintPulley ui->spinTensionForce->blockSignals(true); // Get the feature data - Fem::ConstraintPulley* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintPulley* pcConstraint = + static_cast(ConstraintView->getObject()); double otherdia = pcConstraint->OtherDiameter.getValue(); double centerdist = pcConstraint->CenterDistance.getValue(); bool isdriven = pcConstraint->IsDriven.getValue(); @@ -100,25 +110,29 @@ TaskFemConstraintPulley::TaskFemConstraintPulley(ViewProviderFemConstraintPulley void TaskFemConstraintPulley::onOtherDiameterChanged(double l) { - Fem::ConstraintPulley* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintPulley* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->OtherDiameter.setValue(l); } void TaskFemConstraintPulley::onCenterDistanceChanged(double l) { - Fem::ConstraintPulley* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintPulley* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->CenterDistance.setValue(l); } void TaskFemConstraintPulley::onTensionForceChanged(double force) { - Fem::ConstraintPulley* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintPulley* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->TensionForce.setValue(force); } void TaskFemConstraintPulley::onCheckIsDriven(const bool pressed) { - Fem::ConstraintPulley* pcConstraint = static_cast(ConstraintView->getObject()); + Fem::ConstraintPulley* pcConstraint = + static_cast(ConstraintView->getObject()); pcConstraint->IsDriven.setValue(pressed); } @@ -168,7 +182,8 @@ void TaskFemConstraintPulley::changeEvent(QEvent* e) // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgFemConstraintPulley::TaskDlgFemConstraintPulley(ViewProviderFemConstraintPulley* ConstraintView) +TaskDlgFemConstraintPulley::TaskDlgFemConstraintPulley( + ViewProviderFemConstraintPulley* ConstraintView) { this->ConstraintView = ConstraintView; assert(ConstraintView); @@ -186,21 +201,38 @@ void TaskDlgFemConstraintPulley::open() QString msg = QObject::tr("Constraint pulley"); Gui::Command::openCommand((const char*)msg.toUtf8()); ConstraintView->setVisible(true); - Gui::Command::doCommand(Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr((static_cast(ConstraintView->getObject()))->getNameInDocument()).c_str()); //OvG: Hide meshes and show parts + Gui::Command::doCommand( + Gui::Command::Doc, + ViewProviderFemConstraint::gethideMeshShowPartStr( + (static_cast(ConstraintView->getObject()))->getNameInDocument()) + .c_str()); // OvG: Hide meshes and show parts } } bool TaskDlgFemConstraintPulley::accept() { std::string name = ConstraintView->getObject()->getNameInDocument(); - const TaskFemConstraintPulley* parameterPulley = static_cast(parameter); + const TaskFemConstraintPulley* parameterPulley = + static_cast(parameter); try { - //Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "FEM pulley constraint changed")); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.OtherDiameter = %f", name.c_str(), parameterPulley->getOtherDiameter()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.CenterDistance = %f", name.c_str(), parameterPulley->getCenterDistance()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.IsDriven = %s", name.c_str(), parameterPulley->getIsDriven() ? "True" : "False"); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.TensionForce = %f", name.c_str(), parameterPulley->getTensionForce()); + // Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "FEM pulley constraint changed")); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.OtherDiameter = %f", + name.c_str(), + parameterPulley->getOtherDiameter()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.CenterDistance = %f", + name.c_str(), + parameterPulley->getCenterDistance()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.IsDriven = %s", + name.c_str(), + parameterPulley->getIsDriven() ? "True" : "False"); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.TensionForce = %f", + name.c_str(), + parameterPulley->getTensionForce()); } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintPulley.h b/src/Mod/Fem/Gui/TaskFemConstraintPulley.h index 7ca20d7e0d..c7ac7b0685 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintPulley.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintPulley.h @@ -27,14 +27,16 @@ #include "TaskFemConstraintGear.h" #include "ViewProviderFemConstraintPulley.h" -namespace FemGui { +namespace FemGui +{ -class TaskFemConstraintPulley : public TaskFemConstraintGear +class TaskFemConstraintPulley: public TaskFemConstraintGear { Q_OBJECT public: - explicit TaskFemConstraintPulley(ViewProviderFemConstraintPulley *ConstraintView,QWidget *parent = nullptr); + explicit TaskFemConstraintPulley(ViewProviderFemConstraintPulley* ConstraintView, + QWidget* parent = nullptr); double getOtherDiameter() const; double getCenterDistance() const; @@ -49,22 +51,22 @@ private Q_SLOTS: void onCheckIsDriven(bool); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; }; /// simulation dialog for the TaskView -class TaskDlgFemConstraintPulley : public TaskDlgFemConstraintGear +class TaskDlgFemConstraintPulley: public TaskDlgFemConstraintGear { Q_OBJECT public: - explicit TaskDlgFemConstraintPulley(ViewProviderFemConstraintPulley *ConstraintView); + explicit TaskDlgFemConstraintPulley(ViewProviderFemConstraintPulley* ConstraintView); /// is called by the framework if the dialog is accepted (Ok) bool accept() override; void open() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintPulley_H +#endif // GUI_TASKVIEW_TaskFemConstraintPulley_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintSpring.cpp b/src/Mod/Fem/Gui/TaskFemConstraintSpring.cpp index c3e4264db2..85eee0271a 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintSpring.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintSpring.cpp @@ -24,9 +24,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -45,8 +45,8 @@ using namespace Gui; TaskFemConstraintSpring::TaskFemConstraintSpring(ViewProviderFemConstraintSpring* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintSpring"), - ui(new Ui_TaskFemConstraintSpring) + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintSpring") + , ui(new Ui_TaskFemConstraintSpring) { proxy = new QWidget(this); ui->setupUi(proxy); @@ -56,10 +56,14 @@ TaskFemConstraintSpring::TaskFemConstraintSpring(ViewProviderFemConstraintSpring createDeleteAction(ui->lw_references); connect(deleteAction, &QAction::triggered, this, &TaskFemConstraintSpring::onReferenceDeleted); - connect(ui->lw_references, &QListWidget::currentItemChanged, - this, &TaskFemConstraintSpring::setSelection); - connect(ui->lw_references, &QListWidget::itemClicked, - this, &TaskFemConstraintSpring::setSelection); + connect(ui->lw_references, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintSpring::setSelection); + connect(ui->lw_references, + &QListWidget::itemClicked, + this, + &TaskFemConstraintSpring::setSelection); this->groupLayout()->addWidget(proxy); @@ -74,7 +78,7 @@ TaskFemConstraintSpring::TaskFemConstraintSpring(ViewProviderFemConstraintSpring // Fill data into dialog elements ui->if_norm->setUnit(pcConstraint->NormalStiffness.getUnit()); ui->if_norm->setMinimum( - 0);// TODO fix this ------------------------------------------------------------------- + 0); // TODO fix this ------------------------------------------------------------------- ui->if_norm->setMaximum(FLOAT_MAX); Base::Quantity ns = Base::Quantity((pcConstraint->NormalStiffness.getValue()), Base::Unit::Stiffness); @@ -82,7 +86,7 @@ TaskFemConstraintSpring::TaskFemConstraintSpring(ViewProviderFemConstraintSpring ui->if_tan->setUnit(pcConstraint->TangentialStiffness.getUnit()); ui->if_tan->setMinimum( - 0);// TODO fix this ------------------------------------------------------------------- + 0); // TODO fix this ------------------------------------------------------------------- ui->if_tan->setMaximum(FLOAT_MAX); Base::Quantity ts = Base::Quantity((pcConstraint->TangentialStiffness.getValue()), Base::Unit::Stiffness); @@ -126,7 +130,7 @@ void TaskFemConstraintSpring::updateUI() void TaskFemConstraintSpring::addToSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -136,7 +140,7 @@ void TaskFemConstraintSpring::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -144,7 +148,7 @@ void TaskFemConstraintSpring::addToSelection() const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; if (subName.substr(0, 4) != "Face") { QMessageBox::warning(this, tr("Selection error"), tr("Only faces can be picked")); @@ -155,13 +159,13 @@ void TaskFemConstraintSpring::addToSelection() itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } @@ -181,7 +185,7 @@ void TaskFemConstraintSpring::addToSelection() void TaskFemConstraintSpring::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -191,7 +195,7 @@ void TaskFemConstraintSpring::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -199,19 +203,19 @@ void TaskFemConstraintSpring::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -235,7 +239,8 @@ void TaskFemConstraintSpring::removeFromSelection() updateUI(); } -void TaskFemConstraintSpring::onReferenceDeleted() { +void TaskFemConstraintSpring::onReferenceDeleted() +{ TaskFemConstraintSpring::removeFromSelection(); } @@ -270,15 +275,16 @@ bool TaskFemConstraintSpring::event(QEvent* e) } void TaskFemConstraintSpring::changeEvent(QEvent*) -{ -} +{} void TaskFemConstraintSpring::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -308,7 +314,7 @@ void TaskDlgFemConstraintSpring::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -334,11 +340,11 @@ bool TaskDlgFemConstraintSpring::accept() "App.ActiveDocument.%s.ElmerStiffness = '%s'", name.c_str(), parameterStiffness->getElmerStiffness().c_str()); - std::string scale = parameterStiffness->getScale();// OvG: determine modified scale + std::string scale = parameterStiffness->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintSpring.h b/src/Mod/Fem/Gui/TaskFemConstraintSpring.h index 2bd95d68d2..9802c10d66 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintSpring.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintSpring.h @@ -24,8 +24,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintSpring_H #define GUI_TASKVIEW_TaskFemConstraintSpring_H -#include #include +#include #include "TaskFemConstraintOnBoundary.h" #include "ViewProviderFemConstraintSpring.h" @@ -33,8 +33,9 @@ class Ui_TaskFemConstraintSpring; -namespace FemGui { -class TaskFemConstraintSpring : public TaskFemConstraintOnBoundary +namespace FemGui +{ +class TaskFemConstraintSpring: public TaskFemConstraintOnBoundary { Q_OBJECT @@ -53,8 +54,8 @@ private Q_SLOTS: void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -62,17 +63,17 @@ private: std::unique_ptr ui; }; -class TaskDlgFemConstraintSpring : public TaskDlgFemConstraint +class TaskDlgFemConstraintSpring: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintSpring(ViewProviderFemConstraintSpring *ConstraintView); + explicit TaskDlgFemConstraintSpring(ViewProviderFemConstraintSpring* ConstraintView); void open() override; bool accept() override; bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintSpring_H +#endif // GUI_TASKVIEW_TaskFemConstraintSpring_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp index cd87620454..7538833a80 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.cpp @@ -26,9 +26,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -47,9 +47,10 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintTemperature */ TaskFemConstraintTemperature::TaskFemConstraintTemperature( - ViewProviderFemConstraintTemperature* ConstraintView, QWidget* parent) - : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintTemperature"), - ui(new Ui_TaskFemConstraintTemperature) + ViewProviderFemConstraintTemperature* ConstraintView, + QWidget* parent) + : TaskFemConstraintOnBoundary(ConstraintView, parent, "FEM_ConstraintTemperature") + , ui(new Ui_TaskFemConstraintTemperature) { proxy = new QWidget(this); ui->setupUi(proxy); @@ -94,8 +95,10 @@ TaskFemConstraintTemperature::TaskFemConstraintTemperature( // create a context menu for the listview of the references createDeleteAction(ui->lw_references); - connect( - deleteAction, &QAction::triggered, this, &TaskFemConstraintTemperature::onReferenceDeleted); + connect(deleteAction, + &QAction::triggered, + this, + &TaskFemConstraintTemperature::onReferenceDeleted); connect(ui->lw_references, &QListWidget::currentItemChanged, @@ -145,7 +148,7 @@ void TaskFemConstraintTemperature::Flux() void TaskFemConstraintTemperature::addToSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -155,7 +158,7 @@ void TaskFemConstraintTemperature::addToSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -163,20 +166,20 @@ void TaskFemConstraintTemperature::addToSelection() std::vector subNames = it.getSubNames(); App::DocumentObject* obj = ConstraintView->getObject()->getDocument()->getObject(it.getFeatName()); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } @@ -196,7 +199,7 @@ void TaskFemConstraintTemperature::addToSelection() void TaskFemConstraintTemperature::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -206,7 +209,7 @@ void TaskFemConstraintTemperature::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -214,19 +217,19 @@ void TaskFemConstraintTemperature::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -250,7 +253,8 @@ void TaskFemConstraintTemperature::removeFromSelection() updateUI(); } -void TaskFemConstraintTemperature::onReferenceDeleted() { +void TaskFemConstraintTemperature::onReferenceDeleted() +{ TaskFemConstraintTemperature::removeFromSelection(); } @@ -304,10 +308,12 @@ void TaskFemConstraintTemperature::changeEvent(QEvent*) void TaskFemConstraintTemperature::clearButtons(const SelectionChangeModes notThis) { - if (notThis != SelectionChangeModes::refAdd) + if (notThis != SelectionChangeModes::refAdd) { ui->btnAdd->setChecked(false); - if (notThis != SelectionChangeModes::refRemove) + } + if (notThis != SelectionChangeModes::refRemove) { ui->btnRemove->setChecked(false); + } } //************************************************************************** @@ -337,7 +343,7 @@ void TaskDlgFemConstraintTemperature::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -351,24 +357,26 @@ bool TaskDlgFemConstraintTemperature::accept() try { Gui::Command::doCommand(Gui::Command::Doc, - "App.ActiveDocument.%s.ConstraintType = %s", - name.c_str(), - parameterTemperature->get_constraint_type().c_str()); - if (type == "Temperature") + "App.ActiveDocument.%s.ConstraintType = %s", + name.c_str(), + parameterTemperature->get_constraint_type().c_str()); + if (type == "Temperature") { Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Temperature = \"%s\"", name.c_str(), parameterTemperature->get_temperature().c_str()); - else if (type == "CFlux") + } + else if (type == "CFlux") { Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.CFlux = \"%s\"", name.c_str(), parameterTemperature->get_cflux().c_str()); - std::string scale = parameterTemperature->getScale();// OvG: determine modified scale + } + std::string scale = parameterTemperature->getScale(); // OvG: determine modified scale Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", name.c_str(), - scale.c_str());// OvG: implement modified scale + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.h b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.h index 6eb642d78d..fe57160456 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTemperature.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintTemperature.h @@ -26,8 +26,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintTemperature_H #define GUI_TASKVIEW_TaskFemConstraintTemperature_H -#include #include +#include #include #include @@ -38,13 +38,15 @@ class Ui_TaskFemConstraintTemperature; -namespace FemGui { -class TaskFemConstraintTemperature : public TaskFemConstraintOnBoundary +namespace FemGui +{ +class TaskFemConstraintTemperature: public TaskFemConstraintOnBoundary { Q_OBJECT public: - explicit TaskFemConstraintTemperature(ViewProviderFemConstraintTemperature *ConstraintView,QWidget *parent = nullptr); + explicit TaskFemConstraintTemperature(ViewProviderFemConstraintTemperature* ConstraintView, + QWidget* parent = nullptr); ~TaskFemConstraintTemperature() override; const std::string getReferences() const override; std::string get_temperature() const; @@ -59,8 +61,8 @@ private Q_SLOTS: void removeFromSelection() override; protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; void clearButtons(const SelectionChangeModes notThis) override; private: @@ -68,17 +70,17 @@ private: std::unique_ptr ui; }; -class TaskDlgFemConstraintTemperature : public TaskDlgFemConstraint +class TaskDlgFemConstraintTemperature: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintTemperature(ViewProviderFemConstraintTemperature *ConstraintView); + explicit TaskDlgFemConstraintTemperature(ViewProviderFemConstraintTemperature* ConstraintView); void open() override; bool accept() override; bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintTemperature_H +#endif // GUI_TASKVIEW_TaskFemConstraintTemperature_H diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp index 6ff3e9bf65..08a0b49824 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintTransform.cpp @@ -27,11 +27,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -49,9 +49,10 @@ using namespace Gui; /* TRANSLATOR FemGui::TaskFemConstraintTransform */ TaskFemConstraintTransform::TaskFemConstraintTransform( - ViewProviderFemConstraintTransform* ConstraintView, QWidget* parent) - : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintTransform"), - ui(new Ui_TaskFemConstraintTransform) + ViewProviderFemConstraintTransform* ConstraintView, + QWidget* parent) + : TaskFemConstraint(ConstraintView, parent, "FEM_ConstraintTransform") + , ui(new Ui_TaskFemConstraintTransform) { proxy = new QWidget(this); ui->setupUi(proxy); @@ -59,30 +60,46 @@ TaskFemConstraintTransform::TaskFemConstraintTransform( // create a context menu for the listview of the references createDeleteAction(ui->lw_Rect); - connect(deleteAction, &QAction::triggered, - this, &TaskFemConstraintTransform::onReferenceDeleted); + connect(deleteAction, + &QAction::triggered, + this, + &TaskFemConstraintTransform::onReferenceDeleted); // highlight seletcted list items in the model - connect(ui->lw_Rect, &QListWidget::currentItemChanged, - this, &TaskFemConstraintTransform::setSelection); - connect(ui->lw_Rect, &QListWidget::itemClicked, - this, &TaskFemConstraintTransform::setSelection); - connect(ui->lw_displobj_rect, &QListWidget::currentItemChanged, - this, &TaskFemConstraintTransform::setSelection); - connect(ui->lw_displobj_rect, &QListWidget::itemClicked, - this, &TaskFemConstraintTransform::setSelection); + connect(ui->lw_Rect, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintTransform::setSelection); + connect(ui->lw_Rect, + &QListWidget::itemClicked, + this, + &TaskFemConstraintTransform::setSelection); + connect(ui->lw_displobj_rect, + &QListWidget::currentItemChanged, + this, + &TaskFemConstraintTransform::setSelection); + connect(ui->lw_displobj_rect, + &QListWidget::itemClicked, + this, + &TaskFemConstraintTransform::setSelection); this->groupLayout()->addWidget(proxy); connect(ui->rb_rect, &QRadioButton::clicked, this, &TaskFemConstraintTransform::Rect); connect(ui->rb_cylin, &QRadioButton::clicked, this, &TaskFemConstraintTransform::Cyl); - connect(ui->sp_X, qOverload(&QuantitySpinBox::valueChanged), - this, &TaskFemConstraintTransform::x_Changed); - connect(ui->sp_Y, qOverload(&QuantitySpinBox::valueChanged), - this, &TaskFemConstraintTransform::y_Changed); - connect(ui->sp_Z, qOverload(&QuantitySpinBox::valueChanged), - this, &TaskFemConstraintTransform::z_Changed); + connect(ui->sp_X, + qOverload(&QuantitySpinBox::valueChanged), + this, + &TaskFemConstraintTransform::x_Changed); + connect(ui->sp_Y, + qOverload(&QuantitySpinBox::valueChanged), + this, + &TaskFemConstraintTransform::y_Changed); + connect(ui->sp_Z, + qOverload(&QuantitySpinBox::valueChanged), + this, + &TaskFemConstraintTransform::z_Changed); // Get the feature data Fem::ConstraintTransform* pcConstraint = @@ -262,22 +279,24 @@ void TaskFemConstraintTransform::addToSelection() { int rows = ui->lw_Rect->model()->rowCount(); std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; } if (rows == 1) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one face for rectangular local coordinate system!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one face for rectangular local coordinate system!")); Gui::Selection().clearSelection(); return; } if ((rows == 0) && (selection.size() >= 2)) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one face for rectangular local coordinate system!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one face for rectangular local coordinate system!")); Gui::Selection().clearSelection(); return; } @@ -289,7 +308,7 @@ void TaskFemConstraintTransform::addToSelection() std::vector ObjDispl = pcConstraint->RefDispl.getValues(); std::vector SubElemDispl = pcConstraint->RefDispl.getSubValues(); - for (auto & it : selection) {// for every selected object + for (auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -297,12 +316,13 @@ void TaskFemConstraintTransform::addToSelection() const std::vector& subNames = it.getSubNames(); App::DocumentObject* obj = it.getObject(); if (subNames.size() != 1) { - QMessageBox::warning( - this, tr("Selection error"), tr("Only one face for local coordinate system!")); + QMessageBox::warning(this, + tr("Selection error"), + tr("Only one face for local coordinate system!")); Gui::Selection().clearSelection(); return; } - for (const auto & subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element bool addMe = true; if (subName.substr(0, 4) != "Face") { QMessageBox::warning(this, tr("Selection error"), tr("Only faces can be picked")); @@ -326,13 +346,13 @@ void TaskFemConstraintTransform::addToSelection() itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so don't add + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so don't add addMe = false; } } @@ -358,7 +378,8 @@ void TaskFemConstraintTransform::addToSelection() this, tr("Selection error"), tr("Only transformable faces can be selected! Apply displacement boundary " - "condition to surface first then apply local coordinate system to surface")); + "condition to surface first then apply local coordinate system to " + "surface")); Gui::Selection().clearSelection(); return; } @@ -375,7 +396,7 @@ void TaskFemConstraintTransform::addToSelection() double l = normal.z; // about Z-axis double about_z; - double mag_norm_z = sqrt(n * n + m * m);// normal vector mapped onto XY plane + double mag_norm_z = sqrt(n * n + m * m); // normal vector mapped onto XY plane if (mag_norm_z == 0) { about_z = 0; } @@ -395,7 +416,7 @@ void TaskFemConstraintTransform::addToSelection() about_x = 0; } else { - about_x = -(acos(l_p / mag_norm_x) * 180 / M_PI);// rotation to the Z axis + about_x = -(acos(l_p / mag_norm_x) * 180 / M_PI); // rotation to the Z axis } ui->sp_X->setValue(round(about_x)); ui->sp_Z->setValue(round(about_z)); @@ -405,7 +426,7 @@ void TaskFemConstraintTransform::addToSelection() void TaskFemConstraintTransform::removeFromSelection() { std::vector selection = - Gui::Selection().getSelectionEx();// gets vector of selected objects of active document + Gui::Selection().getSelectionEx(); // gets vector of selected objects of active document if (selection.empty()) { QMessageBox::warning(this, tr("Selection error"), tr("Nothing selected!")); return; @@ -415,7 +436,7 @@ void TaskFemConstraintTransform::removeFromSelection() std::vector Objects = pcConstraint->References.getValues(); std::vector SubElements = pcConstraint->References.getSubValues(); std::vector itemsToDel; - for (const auto & it : selection) {// for every selected object + for (const auto& it : selection) { // for every selected object if (!it.isObjectTypeOf(Part::Feature::getClassTypeId())) { QMessageBox::warning(this, tr("Selection error"), tr("Selected object is not a part!")); return; @@ -423,19 +444,19 @@ void TaskFemConstraintTransform::removeFromSelection() const std::vector& subNames = it.getSubNames(); const App::DocumentObject* obj = it.getObject(); - for (const auto& subName : subNames) {// for every selected sub element + for (const auto& subName : subNames) { // for every selected sub element for (std::vector::iterator itr = std::find(SubElements.begin(), SubElements.end(), subName); itr != SubElements.end(); itr = std::find(++itr, SubElements.end(), - subName)) {// for every sub element in selection that - // matches one in old list + subName)) { // for every sub element in selection that + // matches one in old list if (obj == Objects[std::distance( SubElements.begin(), - itr)]) {// if selected sub element's object equals the one in old list then - // it was added before so mark for deletion + itr)]) { // if selected sub element's object equals the one in old list + // then it was added before so mark for deletion itemsToDel.push_back(std::distance(SubElements.begin(), itr)); } } @@ -469,7 +490,8 @@ const std::string TaskFemConstraintTransform::getReferences() const return TaskFemConstraint::getReferences(items); } -void TaskFemConstraintTransform::onReferenceDeleted() { +void TaskFemConstraintTransform::onReferenceDeleted() +{ TaskFemConstraintTransform::removeFromSelection(); } @@ -480,7 +502,8 @@ std::string TaskFemConstraintTransform::getSurfaceReferences(std::string showCon doc = FreeCAD.ActiveDocument\n\ for obj in doc.Objects:\n\ if obj.isDerivedFrom(\"Fem::FemAnalysis\"):\n\ - if doc." + showConstr + " in obj.Group:\n\ + if doc." + + showConstr + " in obj.Group:\n\ analysis = obj\n\ A = []\n\ i = 0\n\ @@ -501,11 +524,15 @@ for member in analysis.Group:\n\ ss.append(member)\n\ i = i+1\n\ if i>0:\n\ - doc." + showConstr + ".RefDispl = [x]\n\ - doc." + showConstr + ".NameDispl = ss\n\ + doc." + + showConstr + ".RefDispl = [x]\n\ + doc." + + showConstr + ".NameDispl = ss\n\ else:\n\ - doc." + showConstr + ".RefDispl = None\n\ - doc." + showConstr + ".NameDispl = []\n"; + doc." + + showConstr + ".RefDispl = None\n\ + doc." + + showConstr + ".NameDispl = []\n"; } std::string TaskFemConstraintTransform::get_X_rot() const @@ -521,7 +548,8 @@ std::string TaskFemConstraintTransform::get_Z_rot() const return ui->sp_Z->value().getSafeUserString().toStdString(); } -std::string TaskFemConstraintTransform::get_transform_type() const { +std::string TaskFemConstraintTransform::get_transform_type() const +{ std::string transform; if (ui->rb_rect->isChecked()) { transform = "\"Rectangular\""; @@ -537,8 +565,8 @@ bool TaskFemConstraintTransform::event(QEvent* e) return TaskFemConstraint::KeyEvent(e); } -void TaskFemConstraintTransform::changeEvent(QEvent*) { -} +void TaskFemConstraintTransform::changeEvent(QEvent*) +{} //************************************************************************** // TaskDialog @@ -567,7 +595,7 @@ void TaskDlgFemConstraintTransform::open() Gui::Command::Doc, ViewProviderFemConstraint::gethideMeshShowPartStr( (static_cast(ConstraintView->getObject()))->getNameInDocument()) - .c_str());// OvG: Hide meshes and show parts + .c_str()); // OvG: Hide meshes and show parts } } @@ -579,17 +607,27 @@ bool TaskDlgFemConstraintTransform::accept() static_cast(parameter); try { - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.X_rot = \"%s\"", - name.c_str(), parameters->get_X_rot().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Y_rot = \"%s\"", - name.c_str(), parameters->get_Y_rot().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Z_rot = \"%s\"", - name.c_str(), parameters->get_Z_rot().c_str()); - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.TransformType = %s", - name.c_str(), parameters->get_transform_type().c_str()); - std::string scale = parameters->getScale();// OvG: determine modified scale - Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.Scale = %s", - name.c_str(), scale.c_str());// OvG: implement modified scale + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.X_rot = \"%s\"", + name.c_str(), + parameters->get_X_rot().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Y_rot = \"%s\"", + name.c_str(), + parameters->get_Y_rot().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Z_rot = \"%s\"", + name.c_str(), + parameters->get_Z_rot().c_str()); + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.TransformType = %s", + name.c_str(), + parameters->get_transform_type().c_str()); + std::string scale = parameters->getScale(); // OvG: determine modified scale + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.Scale = %s", + name.c_str(), + scale.c_str()); // OvG: implement modified scale } catch (const Base::Exception& e) { QMessageBox::warning(parameter, tr("Input error"), QString::fromLatin1(e.what())); diff --git a/src/Mod/Fem/Gui/TaskFemConstraintTransform.h b/src/Mod/Fem/Gui/TaskFemConstraintTransform.h index 504da18f31..a570128e9d 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintTransform.h +++ b/src/Mod/Fem/Gui/TaskFemConstraintTransform.h @@ -27,8 +27,8 @@ #ifndef GUI_TASKVIEW_TaskFemConstraintTransform_H #define GUI_TASKVIEW_TaskFemConstraintTransform_H -#include #include +#include #include "TaskFemConstraint.h" #include "ViewProviderFemConstraintTransform.h" @@ -36,8 +36,9 @@ class Ui_TaskFemConstraintTransform; -namespace FemGui { -class TaskFemConstraintTransform : public TaskFemConstraint +namespace FemGui +{ +class TaskFemConstraintTransform: public TaskFemConstraint { Q_OBJECT @@ -63,8 +64,8 @@ private Q_SLOTS: void z_Changed(int z); protected: - bool event(QEvent *e) override; - void changeEvent(QEvent *e) override; + bool event(QEvent* e) override; + void changeEvent(QEvent* e) override; const QString makeText(const App::DocumentObject* obj) const; private: @@ -72,17 +73,17 @@ private: std::unique_ptr ui; }; -class TaskDlgFemConstraintTransform : public TaskDlgFemConstraint +class TaskDlgFemConstraintTransform: public TaskDlgFemConstraint { Q_OBJECT public: - explicit TaskDlgFemConstraintTransform(ViewProviderFemConstraintTransform *ConstraintView); + explicit TaskDlgFemConstraintTransform(ViewProviderFemConstraintTransform* ConstraintView); void open() override; bool accept() override; bool reject() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskFemConstraintTransform_H +#endif // GUI_TASKVIEW_TaskFemConstraintTransform_H diff --git a/src/Mod/Fem/Gui/TaskObjectName.cpp b/src/Mod/Fem/Gui/TaskObjectName.cpp index 8c725cab19..91560721f6 100644 --- a/src/Mod/Fem/Gui/TaskObjectName.cpp +++ b/src/Mod/Fem/Gui/TaskObjectName.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -37,13 +37,10 @@ using namespace FemGui; using namespace Gui; -TaskObjectName::TaskObjectName(App::DocumentObject *pcObject,QWidget *parent) - : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), - tr("TaskObjectName"), - true, - parent), - pcObject(pcObject), - ui(new Ui_TaskObjectName) +TaskObjectName::TaskObjectName(App::DocumentObject* pcObject, QWidget* parent) + : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), tr("TaskObjectName"), true, parent) + , pcObject(pcObject) + , ui(new Ui_TaskObjectName) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -52,20 +49,23 @@ TaskObjectName::TaskObjectName(App::DocumentObject *pcObject,QWidget *parent) this->groupLayout()->addWidget(proxy); - QObject::connect( - ui->lineEdit_ObjectName, &QLineEdit::textChanged, this, &TaskObjectName::TextChanged); + QObject::connect(ui->lineEdit_ObjectName, + &QLineEdit::textChanged, + this, + &TaskObjectName::TextChanged); - if (strcmp(pcObject->Label.getValue(),"") != 0) + if (strcmp(pcObject->Label.getValue(), "") != 0) { ui->lineEdit_ObjectName->setText(QString::fromUtf8(pcObject->Label.getValue())); - else + } + else { ui->lineEdit_ObjectName->setText(QString::fromLatin1(pcObject->getNameInDocument())); - + } } -void TaskObjectName::TextChanged (const QString & text) +void TaskObjectName::TextChanged(const QString& text) { name = text.toUtf8().constData(); - //pcObject->Label.setValue(text.toUtf8()); + // pcObject->Label.setValue(text.toUtf8()); } TaskObjectName::~TaskObjectName() = default; diff --git a/src/Mod/Fem/Gui/TaskObjectName.h b/src/Mod/Fem/Gui/TaskObjectName.h index c812798745..17b087dc54 100644 --- a/src/Mod/Fem/Gui/TaskObjectName.h +++ b/src/Mod/Fem/Gui/TaskObjectName.h @@ -28,43 +28,44 @@ class Ui_TaskObjectName; -namespace App { +namespace App +{ class Property; class DocumentObject; -} +} // namespace App -namespace Gui { +namespace Gui +{ class ViewProvider; } -namespace FemGui { +namespace FemGui +{ - -class TaskObjectName : public Gui::TaskView::TaskBox +class TaskObjectName: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskObjectName(App::DocumentObject *pcObject,QWidget *parent = nullptr); + explicit TaskObjectName(App::DocumentObject* pcObject, QWidget* parent = nullptr); ~TaskObjectName() override; std::string name; private Q_SLOTS: - void TextChanged ( const QString &); + void TextChanged(const QString&); protected: - App::DocumentObject *pcObject; + App::DocumentObject* pcObject; private: - private: QWidget* proxy; std::unique_ptr ui; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskObjectName_H +#endif // GUI_TASKVIEW_TaskObjectName_H diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index 26b7d36f40..0ee9fe1a65 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -23,21 +23,22 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include -# include +#include -# include -# include -# include -# include +#include +#include +#include +#include #endif - +// clang-format off #include #include +// clang-format on #include #include @@ -47,22 +48,21 @@ #include #include #include -#include - #include +#include #include #include "ui_TaskPostClip.h" +#include "ui_TaskPostContours.h" #include "ui_TaskPostCut.h" #include "ui_TaskPostDataAlongLine.h" #include "ui_TaskPostDataAtPoint.h" #include "ui_TaskPostDisplay.h" #include "ui_TaskPostScalarClip.h" -#include "ui_TaskPostContours.h" #include "ui_TaskPostWarpVector.h" -#include "TaskPostBoxes.h" #include "FemSettings.h" +#include "TaskPostBoxes.h" #include "ViewProviderFemPostFilter.h" #include "ViewProviderFemPostFunction.h" #include "ViewProviderFemPostObject.h" @@ -73,8 +73,9 @@ using namespace Gui; // *************************************************************************** // point marker -PointMarker::PointMarker(Gui::View3DInventorViewer* iv, std::string ObjName) : view(iv), - vp(new ViewProviderPointMarker) +PointMarker::PointMarker(Gui::View3DInventorViewer* iv, std::string ObjName) + : view(iv) + , vp(new ViewProviderPointMarker) { view->addViewProvider(vp); m_name = ObjName; @@ -152,8 +153,9 @@ ViewProviderPointMarker::~ViewProviderPointMarker() // *************************************************************************** // data marker -DataMarker::DataMarker(Gui::View3DInventorViewer* iv, std::string ObjName) : view(iv), - vp(new ViewProviderDataMarker) +DataMarker::DataMarker(Gui::View3DInventorViewer* iv, std::string ObjName) + : view(iv) + , vp(new ViewProviderDataMarker) { view->addViewProvider(vp); m_name = ObjName; @@ -170,7 +172,6 @@ void DataMarker::addPoint(const SbVec3f& pt) int ct = countPoints(); vp->pCoords->point.set1Value(ct, pt); vp->pMarker->numPoints = ct + 1; - } int DataMarker::countPoints() const @@ -236,11 +237,13 @@ ViewProviderDataMarker::~ViewProviderDataMarker() // *************************************************************************** // main task dialog -TaskPostBox::TaskPostBox(Gui::ViewProviderDocumentObject* view, const QPixmap& icon, - const QString& title, QWidget* parent) - : TaskBox(icon, title, true, parent), - m_object(view->getObject()), - m_view(view) +TaskPostBox::TaskPostBox(Gui::ViewProviderDocumentObject* view, + const QPixmap& icon, + const QString& title, + QWidget* parent) + : TaskBox(icon, title, true, parent) + , m_object(view->getObject()) + , m_view(view) {} TaskPostBox::~TaskPostBox() = default; @@ -260,8 +263,9 @@ void TaskPostBox::recompute() { if (autoApply()) { App::Document* doc = getDocument(); - if (doc) + if (doc) { doc->recompute(); + } } } @@ -286,8 +290,8 @@ void TaskPostBox::updateEnumerationList(App::PropertyEnumeration& prop, QComboBo // *************************************************************************** // simulation dialog for the TaskView TaskDlgPost::TaskDlgPost(Gui::ViewProviderDocumentObject* view) - : TaskDialog(), - m_view(view) + : TaskDialog() + , m_view(view) { assert(view); } @@ -297,15 +301,18 @@ TaskDlgPost::~TaskDlgPost() = default; QDialogButtonBox::StandardButtons TaskDlgPost::getStandardButtons() const { - //check if we only have gui task boxes + // check if we only have gui task boxes bool guionly = true; - for (auto it : m_boxes) + for (auto it : m_boxes) { guionly = guionly && it->isGuiTaskOnly(); + } - if (!guionly) + if (!guionly) { return QDialogButtonBox::Apply | QDialogButtonBox::Ok | QDialogButtonBox::Cancel; - else + } + else { return QDialogButtonBox::Ok; + } } void TaskDlgPost::connectSlots() @@ -327,8 +334,10 @@ void TaskDlgPost::connectSlots() int indexSlot = dlg->metaObject()->indexOfSlot( QMetaObject::normalizedSignature("slotAddedFunction()")); if (indexSlot >= 0) { - connect(sender, sender->metaObject()->method(indexSignal), - dlg, dlg->metaObject()->method(indexSlot)); + connect(sender, + sender->metaObject()->method(indexSignal), + dlg, + dlg->metaObject()->method(indexSlot)); } } } @@ -349,16 +358,18 @@ void TaskDlgPost::open() void TaskDlgPost::clicked(int button) { - if (button == QDialogButtonBox::Apply) + if (button == QDialogButtonBox::Apply) { recompute(); + } } bool TaskDlgPost::accept() { try { std::vector::iterator it = m_boxes.begin(); - for (; it != m_boxes.end(); ++it) + for (; it != m_boxes.end(); ++it) { (*it)->applyPythonCode(); + } } catch (const Base::Exception& e) { QMessageBox::warning(nullptr, tr("Input error"), QString::fromLatin1(e.what())); @@ -386,19 +397,23 @@ void TaskDlgPost::recompute() } } -void TaskDlgPost::modifyStandardButtons(QDialogButtonBox* box) { +void TaskDlgPost::modifyStandardButtons(QDialogButtonBox* box) +{ - if (box->button(QDialogButtonBox::Apply)) + if (box->button(QDialogButtonBox::Apply)) { box->button(QDialogButtonBox::Apply)->setDefault(true); + } } // *************************************************************************** // box to set the coloring TaskPostDisplay::TaskPostDisplay(Gui::ViewProviderDocumentObject* view, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_ResultShow"), tr("Result display options"), - parent), - ui(new Ui_TaskPostDisplay) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_ResultShow"), + tr("Result display options"), + parent) + , ui(new Ui_TaskPostDisplay) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -425,14 +440,22 @@ TaskPostDisplay::~TaskPostDisplay() = default; void TaskPostDisplay::setupConnections() { - connect(ui->Representation, qOverload(&QComboBox::activated), - this, &TaskPostDisplay::onRepresentationActivated); - connect(ui->Field, qOverload(&QComboBox::activated), - this, &TaskPostDisplay::onFieldActivated); - connect(ui->VectorMode, qOverload(&QComboBox::activated), - this, &TaskPostDisplay::onVectorModeActivated); - connect(ui->Transparency, &QSlider::valueChanged, - this, &TaskPostDisplay::onTransparencyValueChanged); + connect(ui->Representation, + qOverload(&QComboBox::activated), + this, + &TaskPostDisplay::onRepresentationActivated); + connect(ui->Field, + qOverload(&QComboBox::activated), + this, + &TaskPostDisplay::onFieldActivated); + connect(ui->VectorMode, + qOverload(&QComboBox::activated), + this, + &TaskPostDisplay::onVectorModeActivated); + connect(ui->Transparency, + &QSlider::valueChanged, + this, + &TaskPostDisplay::onTransparencyValueChanged); } void TaskPostDisplay::slotAddedFunction() @@ -458,7 +481,8 @@ void TaskPostDisplay::onVectorModeActivated(int i) getTypedView()->VectorMode.setValue(i); } -void TaskPostDisplay::onTransparencyValueChanged(int i) { +void TaskPostDisplay::onTransparencyValueChanged(int i) +{ getTypedView()->Transparency.setValue(i); ui->Transparency->setToolTip(QString::number(i) + QString::fromLatin1(" %")); @@ -473,12 +497,14 @@ void TaskPostDisplay::applyPythonCode() // *************************************************************************** // functions TaskPostFunction::TaskPostFunction(ViewProviderDocumentObject* view, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("fem-post-geo-plane"), tr("Implicit function"), + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("fem-post-geo-plane"), + tr("Implicit function"), parent) { assert(view->isDerivedFrom(ViewProviderFemPostFunction::getClassTypeId())); - //we load the views widget + // we load the views widget FunctionWidget* w = getTypedView()->createControlWidget(); w->setParent(this); w->setViewProvider(getTypedView()); @@ -489,7 +515,7 @@ TaskPostFunction::~TaskPostFunction() = default; void TaskPostFunction::applyPythonCode() { - //we apply the views widgets python code + // we apply the views widgets python code } @@ -501,13 +527,15 @@ void TaskPostFunction::applyPythonCode() // *************************************************************************** // data along line filter TaskPostDataAlongLine::TaskPostDataAlongLine(ViewProviderDocumentObject* view, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_PostFilterDataAlongLine"), - tr("Data along a line options"), parent), - ui(new Ui_TaskPostDataAlongLine) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_PostFilterDataAlongLine"), + tr("Data along a line options"), + parent) + , ui(new Ui_TaskPostDataAlongLine) { assert(view->isDerivedFrom(ViewProviderFemPostDataAlongLine::getClassTypeId())); - //we load the views widget + // we load the views widget proxy = new QWidget(this); ui->setupUi(proxy); @@ -558,7 +586,7 @@ TaskPostDataAlongLine::TaskPostDataAlongLine(ViewProviderDocumentObject* view, Q setupConnectionsStep2(); - //update all fields + // update all fields updateEnumerationList(getTypedView()->DisplayMode, ui->Representation); updateEnumerationList(getTypedView()->Field, ui->Field); @@ -691,7 +719,11 @@ void TaskPostDataAlongLine::onCreatePlotClicked() recompute(); } -void TaskPostDataAlongLine::onChange(double x1, double y1, double z1, double x2, double y2, +void TaskPostDataAlongLine::onChange(double x1, + double y1, + double z1, + double x2, + double y2, double z2) { // call point1Changed only once @@ -861,13 +893,15 @@ plt.show()\n"; // *************************************************************************** // data at point filter TaskPostDataAtPoint::TaskPostDataAtPoint(ViewProviderDocumentObject* view, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_PostFilterDataAtPoint"), - tr("Data at point options"), parent), - ui(new Ui_TaskPostDataAtPoint) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_PostFilterDataAtPoint"), + tr("Data at point options"), + parent) + , ui(new Ui_TaskPostDataAtPoint) { assert(view->isDerivedFrom(ViewProviderFemPostDataAtPoint::getClassTypeId())); - //we load the views widget + // we load the views widget proxy = new QWidget(this); ui->setupUi(proxy); setupConnections(); @@ -926,8 +960,9 @@ TaskPostDataAtPoint::TaskPostDataAtPoint(ViewProviderDocumentObject* view, QWidg TaskPostDataAtPoint::~TaskPostDataAtPoint() { App::Document* doc = getDocument(); - if (doc) + if (doc) { doc->recompute(); + } } void TaskPostDataAtPoint::setupConnections() @@ -1112,7 +1147,7 @@ void TaskPostDataAtPoint::onFieldActivated(int i) static_cast(getObject())->Unit.setValue("A/m^2"); } else if ((FieldName == "Displacement") || (FieldName == "Displacement Magnitude") - || (FieldName.find("displacement", 0) == 0)) {// Elmer name + || (FieldName.find("displacement", 0) == 0)) { // Elmer name static_cast(getObject())->Unit.setValue("m"); } else if (FieldName == "electric energy density") { @@ -1225,11 +1260,14 @@ std::string TaskPostDataAtPoint::toString(double val) const // *************************************************************************** // clip filter -TaskPostClip::TaskPostClip(ViewProviderDocumentObject* view, App::PropertyLink* function, +TaskPostClip::TaskPostClip(ViewProviderDocumentObject* view, + App::PropertyLink* function, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_PostFilterClipRegion"), - tr("Clip region, choose implicit function"), parent), - ui(new Ui_TaskPostClip) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_PostFilterClipRegion"), + tr("Clip region, choose implicit function"), + parent) + , ui(new Ui_TaskPostClip) { assert(view->isDerivedFrom(ViewProviderFemPostClip::getClassTypeId())); assert(function); @@ -1237,27 +1275,28 @@ TaskPostClip::TaskPostClip(ViewProviderDocumentObject* view, App::PropertyLink* fwidget = nullptr; - //we load the views widget + // we load the views widget proxy = new QWidget(this); ui->setupUi(proxy); setupConnections(); this->groupLayout()->addWidget(proxy); - //the layout for the container widget + // the layout for the container widget QVBoxLayout* layout = new QVBoxLayout(); ui->Container->setLayout(layout); - //fill up the combo box with possible functions + // fill up the combo box with possible functions collectImplicitFunctions(); - //add the function creation command + // add the function creation command Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); Gui::Command* cmd = rcCmdMgr.getCommandByName("FEM_PostCreateFunctions"); - if (cmd && cmd->getAction()) + if (cmd && cmd->getAction()) { cmd->getAction()->addTo(ui->CreateButton); + } ui->CreateButton->setPopupMode(QToolButton::InstantPopup); - //load the default values + // load the default values ui->CutCells->setChecked( static_cast(getObject())->CutCells.getValue()); ui->InsideOut->setChecked( @@ -1276,14 +1315,8 @@ void TaskPostClip::setupConnections() qOverload(&QComboBox::currentIndexChanged), this, &TaskPostClip::onFunctionBoxCurrentIndexChanged); - connect(ui->InsideOut, - &QCheckBox::toggled, - this, - &TaskPostClip::onInsideOutToggled); - connect(ui->CutCells, - &QCheckBox::toggled, - this, - &TaskPostClip::onCutCellsToggled); + connect(ui->InsideOut, &QCheckBox::toggled, this, &TaskPostClip::onInsideOutToggled); + connect(ui->CutCells, &QCheckBox::toggled, this, &TaskPostClip::onCutCellsToggled); } void TaskPostClip::applyPythonCode() @@ -1295,7 +1328,8 @@ void TaskPostClip::collectImplicitFunctions() pipelines = getDocument()->getObjectsOfType(); if (!pipelines.empty()) { Fem::FemPostPipeline* pipeline = pipelines.front(); - if (pipeline->Functions.getValue() && pipeline->Functions.getValue()->getTypeId() + if (pipeline->Functions.getValue() + && pipeline->Functions.getValue()->getTypeId() == Fem::FemPostFunctionProvider::getClassTypeId()) { ui->FunctionBox->clear(); @@ -1308,8 +1342,9 @@ void TaskPostClip::collectImplicitFunctions() ->Functions.getValues(); for (std::size_t i = 0; i < funcs.size(); ++i) { items.push_back(QString::fromLatin1(funcs[i]->getNameInDocument())); - if (currentFunction == funcs[i]) + if (currentFunction == funcs[i]) { currentItem = i; + } } ui->FunctionBox->addItems(items); ui->FunctionBox->setCurrentIndex(currentItem); @@ -1325,8 +1360,9 @@ void TaskPostClip::onCreateButtonTriggered(QAction*) // if a new function was successfully added use it int indexCount = ui->FunctionBox->count(); - if (indexCount > currentItem + 1) + if (indexCount > currentItem + 1) { ui->FunctionBox->setCurrentIndex(indexCount - 1); + } // When the first function ever was added, a signal must be emitted if (numFuncs == 0) { @@ -1338,33 +1374,38 @@ void TaskPostClip::onCreateButtonTriggered(QAction*) void TaskPostClip::onFunctionBoxCurrentIndexChanged(int idx) { - //set the correct property + // set the correct property std::vector pipelines; pipelines = getDocument()->getObjectsOfType(); if (!pipelines.empty()) { Fem::FemPostPipeline* pipeline = pipelines.front(); - if (pipeline->Functions.getValue() && pipeline->Functions.getValue()->getTypeId() + if (pipeline->Functions.getValue() + && pipeline->Functions.getValue()->getTypeId() == Fem::FemPostFunctionProvider::getClassTypeId()) { const std::vector& funcs = static_cast(pipeline->Functions.getValue()) ->Functions.getValues(); - if (idx >= 0) + if (idx >= 0) { static_cast(getObject())->Function.setValue(funcs[idx]); - else + } + else { static_cast(getObject())->Function.setValue(nullptr); + } } } - //load the correct view + // load the correct view Fem::FemPostFunction* fobj = static_cast( static_cast(getObject())->Function.getValue()); Gui::ViewProvider* view = nullptr; - if (fobj) + if (fobj) { view = Gui::Application::Instance->getViewProvider(fobj); + } - if (fwidget) + if (fwidget) { fwidget->deleteLater(); + } if (view) { fwidget = static_cast(view)->createControlWidget(); @@ -1391,9 +1432,11 @@ void TaskPostClip::onInsideOutToggled(bool val) // *************************************************************************** // contours filter TaskPostContours::TaskPostContours(ViewProviderDocumentObject* view, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_PostFilterContours"), - tr("Contours filter options"), parent), - ui(new Ui_TaskPostContours) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_PostFilterContours"), + tr("Contours filter options"), + parent) + , ui(new Ui_TaskPostContours) { assert(view->isDerivedFrom(ViewProviderFemPostContours::getClassTypeId())); @@ -1449,7 +1492,6 @@ void TaskPostContours::updateFields() else { getTypedView()->Field.setValue("None"); } - } void TaskPostContours::onFieldsChanged(int idx) @@ -1484,8 +1526,9 @@ void TaskPostContours::onVectorModeChanged(int idx) // first to get the possible VectorModes of that field updateFields(); // now we can set the VectorMode - if (!static_cast(getObject())->NoColor.getValue()) + if (!static_cast(getObject())->NoColor.getValue()) { getTypedView()->VectorMode.setValue(idx); + } } } @@ -1518,11 +1561,14 @@ void TaskPostContours::onNoColorChanged(bool state) // *************************************************************************** // cut filter -TaskPostCut::TaskPostCut(ViewProviderDocumentObject* view, App::PropertyLink* function, +TaskPostCut::TaskPostCut(ViewProviderDocumentObject* view, + App::PropertyLink* function, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_PostFilterCutFunction"), - tr("Function cut, choose implicit function"), parent), - ui(new Ui_TaskPostCut) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_PostFilterCutFunction"), + tr("Function cut, choose implicit function"), + parent) + , ui(new Ui_TaskPostCut) { assert(view->isDerivedFrom(ViewProviderFemPostCut::getClassTypeId())); assert(function); @@ -1530,24 +1576,25 @@ TaskPostCut::TaskPostCut(ViewProviderDocumentObject* view, App::PropertyLink* fu fwidget = nullptr; - //we load the views widget + // we load the views widget proxy = new QWidget(this); ui->setupUi(proxy); setupConnections(); this->groupLayout()->addWidget(proxy); - //the layout for the container widget + // the layout for the container widget QVBoxLayout* layout = new QVBoxLayout(); ui->Container->setLayout(layout); - //fill up the combo box with possible functions + // fill up the combo box with possible functions collectImplicitFunctions(); - //add the function creation command + // add the function creation command Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); Gui::Command* cmd = rcCmdMgr.getCommandByName("FEM_PostCreateFunctions"); - if (cmd && cmd->getAction()) + if (cmd && cmd->getAction()) { cmd->getAction()->addTo(ui->CreateButton); + } ui->CreateButton->setPopupMode(QToolButton::InstantPopup); } @@ -1555,10 +1602,7 @@ TaskPostCut::~TaskPostCut() = default; void TaskPostCut::setupConnections() { - connect(ui->CreateButton, - &QToolButton::triggered, - this, - &TaskPostCut::onCreateButtonTriggered); + connect(ui->CreateButton, &QToolButton::triggered, this, &TaskPostCut::onCreateButtonTriggered); connect(ui->FunctionBox, qOverload(&QComboBox::currentIndexChanged), this, @@ -1588,8 +1632,9 @@ void TaskPostCut::collectImplicitFunctions() ->Functions.getValues(); for (std::size_t i = 0; i < funcs.size(); ++i) { items.push_back(QString::fromLatin1(funcs[i]->getNameInDocument())); - if (currentFunction == funcs[i]) + if (currentFunction == funcs[i]) { currentItem = i; + } } ui->FunctionBox->addItems(items); ui->FunctionBox->setCurrentIndex(currentItem); @@ -1605,8 +1650,9 @@ void TaskPostCut::onCreateButtonTriggered(QAction*) // if a new function was successfully added use it int indexCount = ui->FunctionBox->count(); - if (indexCount > currentItem + 1) + if (indexCount > currentItem + 1) { ui->FunctionBox->setCurrentIndex(indexCount - 1); + } // When the first function ever was added, a signal must be emitted if (numFuncs == 0) { @@ -1618,7 +1664,7 @@ void TaskPostCut::onCreateButtonTriggered(QAction*) void TaskPostCut::onFunctionBoxCurrentIndexChanged(int idx) { - //set the correct property + // set the correct property std::vector pipelines; pipelines = getDocument()->getObjectsOfType(); if (!pipelines.empty()) { @@ -1630,22 +1676,26 @@ void TaskPostCut::onFunctionBoxCurrentIndexChanged(int idx) const std::vector& funcs = static_cast(pipeline->Functions.getValue()) ->Functions.getValues(); - if (idx >= 0) + if (idx >= 0) { static_cast(getObject())->Function.setValue(funcs[idx]); - else + } + else { static_cast(getObject())->Function.setValue(nullptr); + } } } - //load the correct view + // load the correct view Fem::FemPostFunction* fobj = static_cast( static_cast(getObject())->Function.getValue()); Gui::ViewProvider* view = nullptr; - if (fobj) + if (fobj) { view = Gui::Application::Instance->getViewProvider(fobj); + } - if (fwidget) + if (fwidget) { fwidget->deleteLater(); + } if (view) { fwidget = static_cast(view)->createControlWidget(); @@ -1660,19 +1710,21 @@ void TaskPostCut::onFunctionBoxCurrentIndexChanged(int idx) // *************************************************************************** // scalar clip filter TaskPostScalarClip::TaskPostScalarClip(ViewProviderDocumentObject* view, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_PostFilterClipScalar"), - tr("Scalar clip options"), parent), - ui(new Ui_TaskPostScalarClip) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_PostFilterClipScalar"), + tr("Scalar clip options"), + parent) + , ui(new Ui_TaskPostScalarClip) { assert(view->isDerivedFrom(ViewProviderFemPostScalarClip::getClassTypeId())); - //we load the views widget + // we load the views widget proxy = new QWidget(this); ui->setupUi(proxy); setupConnections(); this->groupLayout()->addWidget(proxy); - //load the default values + // load the default values updateEnumerationList(getTypedObject()->Scalars, ui->Scalar); ui->InsideOut->setChecked( static_cast(getObject())->InsideOut.getValue()); @@ -1697,18 +1749,16 @@ TaskPostScalarClip::TaskPostScalarClip(ViewProviderDocumentObject* view, QWidget ui->Slider->blockSignals(true); ui->Slider->setValue(slider_value); ui->Slider->blockSignals(false); - Base::Console().Log( - "init: scalar_factor, slider_value: %f, %i: \n", scalar_factor, slider_value); + Base::Console().Log("init: scalar_factor, slider_value: %f, %i: \n", + scalar_factor, + slider_value); } TaskPostScalarClip::~TaskPostScalarClip() = default; void TaskPostScalarClip::setupConnections() { - connect(ui->Slider, - &QSlider::valueChanged, - this, - &TaskPostScalarClip::onSliderValueChanged); + connect(ui->Slider, &QSlider::valueChanged, this, &TaskPostScalarClip::onSliderValueChanged); connect(ui->Value, qOverload(&QDoubleSpinBox::valueChanged), this, @@ -1717,10 +1767,7 @@ void TaskPostScalarClip::setupConnections() qOverload(&QComboBox::currentIndexChanged), this, &TaskPostScalarClip::onScalarCurrentIndexChanged); - connect(ui->InsideOut, - &QCheckBox::toggled, - this, - &TaskPostScalarClip::onInsideOutToggled); + connect(ui->InsideOut, &QCheckBox::toggled, this, &TaskPostScalarClip::onInsideOutToggled); } void TaskPostScalarClip::applyPythonCode() @@ -1763,7 +1810,7 @@ void TaskPostScalarClip::onSliderValueChanged(int v) value.setValue(val); recompute(); - //don't forget to sync the spinbox + // don't forget to sync the spinbox ui->Value->blockSignals(true); ui->Value->setValue(val); ui->Value->blockSignals(false); @@ -1776,7 +1823,7 @@ void TaskPostScalarClip::onValueValueChanged(double v) value.setValue(v); recompute(); - //don't forget to sync the slider + // don't forget to sync the slider ui->Slider->blockSignals(true); ui->Slider->setValue( int(((v - value.getConstraints()->LowerBound) @@ -1795,9 +1842,11 @@ void TaskPostScalarClip::onInsideOutToggled(bool val) // *************************************************************************** // warp vector filter TaskPostWarpVector::TaskPostWarpVector(ViewProviderDocumentObject* view, QWidget* parent) - : TaskPostBox(view, Gui::BitmapFactory().pixmap("FEM_PostFilterWarp"), tr("Warp options"), - parent), - ui(new Ui_TaskPostWarpVector) + : TaskPostBox(view, + Gui::BitmapFactory().pixmap("FEM_PostFilterWarp"), + tr("Warp options"), + parent) + , ui(new Ui_TaskPostWarpVector) { assert(view->isDerivedFrom(ViewProviderFemPostWarpVector::getClassTypeId())); @@ -1810,7 +1859,7 @@ TaskPostWarpVector::TaskPostWarpVector(ViewProviderDocumentObject* view, QWidget // load the default values for warp display updateEnumerationList(getTypedObject()->Vector, ui->Vector); double warp_factor = static_cast(getObject()) - ->Factor.getValue();// get the standard warp factor + ->Factor.getValue(); // get the standard warp factor // set spinbox warp_factor, don't forget to sync the slider ui->Value->blockSignals(true); @@ -1846,10 +1895,7 @@ TaskPostWarpVector::~TaskPostWarpVector() = default; void TaskPostWarpVector::setupConnections() { - connect(ui->Slider, - &QSlider::valueChanged, - this, - &TaskPostWarpVector::onSliderValueChanged); + connect(ui->Slider, &QSlider::valueChanged, this, &TaskPostWarpVector::onSliderValueChanged); connect(ui->Value, qOverload(&QDoubleSpinBox::valueChanged), this, diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.h b/src/Mod/Fem/Gui/TaskPostBoxes.h index 8ab3fc0b17..b4c6e1baae 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.h +++ b/src/Mod/Fem/Gui/TaskPostBoxes.h @@ -24,9 +24,9 @@ #define GUI_TASKVIEW_TaskPostDisplay_H #include -#include #include #include +#include #include "ViewProviderFemPostFunction.h" @@ -57,7 +57,7 @@ namespace FemGui // *************************************************************************** // point marker class ViewProviderPointMarker; -class PointMarker : public QObject +class PointMarker: public QObject { Q_OBJECT @@ -75,13 +75,13 @@ protected: void customEvent(QEvent* e) override; private: - Gui::View3DInventorViewer *view; - ViewProviderPointMarker *vp; + Gui::View3DInventorViewer* view; + ViewProviderPointMarker* vp; std::string m_name; std::string ObjectInvisible(); }; -class FemGuiExport ViewProviderPointMarker : public Gui::ViewProviderDocumentObject +class FemGuiExport ViewProviderPointMarker: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderPointMarker); @@ -90,7 +90,7 @@ public: ~ViewProviderPointMarker() override; protected: - SoCoordinate3 * pCoords; + SoCoordinate3* pCoords; friend class PointMarker; }; @@ -98,7 +98,7 @@ protected: // *************************************************************************** // data marker class ViewProviderDataMarker; -class DataMarker : public QObject +class DataMarker: public QObject { Q_OBJECT @@ -116,14 +116,14 @@ protected: void customEvent(QEvent* e) override; private: - Gui::View3DInventorViewer *view; - ViewProviderDataMarker *vp; + Gui::View3DInventorViewer* view; + ViewProviderDataMarker* vp; std::string m_name; std::string ObjectInvisible(); }; -class FemGuiExport ViewProviderDataMarker : public Gui::ViewProviderDocumentObject +class FemGuiExport ViewProviderDataMarker: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderDataMarker); @@ -132,41 +132,48 @@ public: ~ViewProviderDataMarker() override; protected: - SoCoordinate3 * pCoords; - SoMarkerSet * pMarker; + SoCoordinate3* pCoords; + SoMarkerSet* pMarker; friend class DataMarker; }; // *************************************************************************** // main task dialog -class TaskPostBox : public Gui::TaskView::TaskBox +class TaskPostBox: public Gui::TaskView::TaskBox { Q_OBJECT public: - TaskPostBox(Gui::ViewProviderDocumentObject* view, const QPixmap& icon, const QString& title, + TaskPostBox(Gui::ViewProviderDocumentObject* view, + const QPixmap& icon, + const QString& title, QWidget* parent = nullptr); ~TaskPostBox() override; virtual void applyPythonCode() = 0; - virtual bool isGuiTaskOnly() { + virtual bool isGuiTaskOnly() + { return false; - } // return true if only gui properties are manipulated + } // return true if only gui properties are manipulated protected: - App::DocumentObject* getObject() const { + App::DocumentObject* getObject() const + { return *m_object; } template - T* getTypedObject() const { + T* getTypedObject() const + { return m_object.get(); } - Gui::ViewProviderDocumentObject* getView() const { + Gui::ViewProviderDocumentObject* getView() const + { return *m_view; } template - T* getTypedView() const { + T* getTypedView() const + { return m_view.get(); } @@ -179,23 +186,24 @@ protected: private: App::DocumentObjectWeakPtrT m_object; - Gui::ViewProviderWeakPtrT m_view; + Gui::ViewProviderWeakPtrT m_view; }; // *************************************************************************** // simulation dialog for the TaskView -class TaskDlgPost : public Gui::TaskView::TaskDialog +class TaskDlgPost: public Gui::TaskView::TaskDialog { Q_OBJECT public: - explicit TaskDlgPost(Gui::ViewProviderDocumentObject *view); + explicit TaskDlgPost(Gui::ViewProviderDocumentObject* view); ~TaskDlgPost() override; void connectSlots(); void appendBox(TaskPostBox* box); - Gui::ViewProviderDocumentObject* getView() const { + Gui::ViewProviderDocumentObject* getView() const + { return *m_view; } @@ -210,7 +218,9 @@ public: bool reject() override; /// is called by the framework if the user presses the help button bool isAllowedAlterDocument() const override - { return false; } + { + return false; + } void modifyStandardButtons(QDialogButtonBox*) override; /// returns for Close and Help button @@ -220,23 +230,26 @@ protected: void recompute(); protected: - Gui::ViewProviderWeakPtrT m_view; - std::vector m_boxes; + Gui::ViewProviderWeakPtrT m_view; + std::vector m_boxes; }; // *************************************************************************** // box to set the coloring -class TaskPostDisplay : public TaskPostBox +class TaskPostDisplay: public TaskPostBox { Q_OBJECT public: - explicit TaskPostDisplay(Gui::ViewProviderDocumentObject* view, QWidget *parent = nullptr); + explicit TaskPostDisplay(Gui::ViewProviderDocumentObject* view, QWidget* parent = nullptr); ~TaskPostDisplay() override; void applyPythonCode() override; - bool isGuiTaskOnly() override {return true;} + bool isGuiTaskOnly() override + { + return true; + } private: void setupConnections(); @@ -254,7 +267,7 @@ private: // *************************************************************************** // functions -class TaskPostFunction : public TaskPostBox +class TaskPostFunction: public TaskPostBox { Q_OBJECT @@ -337,12 +350,13 @@ private: // *************************************************************************** // clip filter -class TaskPostClip : public TaskPostBox +class TaskPostClip: public TaskPostBox { Q_OBJECT public: - TaskPostClip(Gui::ViewProviderDocumentObject* view, App::PropertyLink* function, + TaskPostClip(Gui::ViewProviderDocumentObject* view, + App::PropertyLink* function, QWidget* parent = nullptr); ~TaskPostClip() override; @@ -361,7 +375,7 @@ Q_SIGNALS: private: void collectImplicitFunctions(); - //App::PropertyLink* m_functionProperty; + // App::PropertyLink* m_functionProperty; QWidget* proxy; std::unique_ptr ui; FunctionWidget* fwidget; @@ -401,7 +415,8 @@ class TaskPostCut: public TaskPostBox Q_OBJECT public: - TaskPostCut(Gui::ViewProviderDocumentObject* view, App::PropertyLink* function, + TaskPostCut(Gui::ViewProviderDocumentObject* view, + App::PropertyLink* function, QWidget* parent = nullptr); ~TaskPostCut() override; @@ -418,7 +433,7 @@ Q_SIGNALS: private: void collectImplicitFunctions(); - //App::PropertyLink* m_functionProperty; + // App::PropertyLink* m_functionProperty; QWidget* proxy; std::unique_ptr ui; FunctionWidget* fwidget; @@ -427,7 +442,7 @@ private: // *************************************************************************** // scalar clip filter -class TaskPostScalarClip : public TaskPostBox +class TaskPostScalarClip: public TaskPostBox { Q_OBJECT @@ -452,7 +467,7 @@ private: // *************************************************************************** // warp vector filter -class TaskPostWarpVector : public TaskPostBox +class TaskPostWarpVector: public TaskPostBox { Q_OBJECT @@ -475,6 +490,6 @@ private: std::unique_ptr ui; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_TASKVIEW_TaskPostDisplay_H +#endif // GUI_TASKVIEW_TaskPostDisplay_H diff --git a/src/Mod/Fem/Gui/TaskTetParameter.cpp b/src/Mod/Fem/Gui/TaskTetParameter.cpp index 3451a5f0fc..52b06a233c 100644 --- a/src/Mod/Fem/Gui/TaskTetParameter.cpp +++ b/src/Mod/Fem/Gui/TaskTetParameter.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -37,9 +37,9 @@ using namespace FemGui; using namespace Gui; TaskTetParameter::TaskTetParameter(Fem::FemMeshShapeNetgenObject* pcObject, QWidget* parent) - : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), tr("Tet Parameter"), true, parent), - pcObject(pcObject), - ui(new Ui_TaskTetParameter) + : TaskBox(Gui::BitmapFactory().pixmap("FEM_CreateNodesSet"), tr("Tet Parameter"), true, parent) + , pcObject(pcObject) + , ui(new Ui_TaskTetParameter) { // we need a separate container widget to add all controls to proxy = new QWidget(this); @@ -56,25 +56,41 @@ TaskTetParameter::TaskTetParameter(Fem::FemMeshShapeNetgenObject* pcObject, QWid ui->spinBox_SegsPerRadius->setValue(pcObject->NbSegsPerRadius.getValue()); ui->checkBox_Optimize->setChecked(pcObject->Optimize.getValue()); - QObject::connect(ui->doubleSpinBox_MaxSize, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskTetParameter::maxSizeValueChanged); - QObject::connect(ui->comboBox_Fineness, qOverload(&QComboBox::activated), - this, &TaskTetParameter::SwitchMethod); - QObject::connect(ui->checkBox_SecondOrder, &QCheckBox::stateChanged, - this, &TaskTetParameter::setQuadric); - QObject::connect(ui->doubleSpinBox_GrowthRate, qOverload(&QDoubleSpinBox::valueChanged), - this, &TaskTetParameter::setGrowthRate); - QObject::connect(ui->spinBox_SegsPerEdge, qOverload(&QSpinBox::valueChanged), - this, &TaskTetParameter::setSegsPerEdge); - QObject::connect(ui->spinBox_SegsPerRadius, qOverload(&QSpinBox::valueChanged), - this, &TaskTetParameter::setSegsPerRadius); - QObject::connect(ui->checkBox_Optimize, &QCheckBox::stateChanged, - this, &TaskTetParameter::setOptimize); + QObject::connect(ui->doubleSpinBox_MaxSize, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskTetParameter::maxSizeValueChanged); + QObject::connect(ui->comboBox_Fineness, + qOverload(&QComboBox::activated), + this, + &TaskTetParameter::SwitchMethod); + QObject::connect(ui->checkBox_SecondOrder, + &QCheckBox::stateChanged, + this, + &TaskTetParameter::setQuadric); + QObject::connect(ui->doubleSpinBox_GrowthRate, + qOverload(&QDoubleSpinBox::valueChanged), + this, + &TaskTetParameter::setGrowthRate); + QObject::connect(ui->spinBox_SegsPerEdge, + qOverload(&QSpinBox::valueChanged), + this, + &TaskTetParameter::setSegsPerEdge); + QObject::connect(ui->spinBox_SegsPerRadius, + qOverload(&QSpinBox::valueChanged), + this, + &TaskTetParameter::setSegsPerRadius); + QObject::connect(ui->checkBox_Optimize, + &QCheckBox::stateChanged, + this, + &TaskTetParameter::setOptimize); - if(pcObject->FemMesh.getValue().getInfo().numNode == 0) + if (pcObject->FemMesh.getValue().getInfo().numNode == 0) { touched = true; - else + } + else { touched = false; + } setInfo(); } @@ -106,7 +122,7 @@ void TaskTetParameter::maxSizeValueChanged(double Value) void TaskTetParameter::setQuadric(int s) { - pcObject->SecondOrder.setValue(s!=0); + pcObject->SecondOrder.setValue(s != 0); touched = true; } @@ -114,14 +130,12 @@ void TaskTetParameter::setGrowthRate(double v) { pcObject->GrowthRate.setValue(v); touched = true; - } void TaskTetParameter::setSegsPerEdge(int v) { pcObject->NbSegsPerEdge.setValue(v); touched = true; - } void TaskTetParameter::setSegsPerRadius(int v) @@ -132,7 +146,7 @@ void TaskTetParameter::setSegsPerRadius(int v) void TaskTetParameter::setOptimize(int v) { - pcObject->Optimize.setValue(v!=0); + pcObject->Optimize.setValue(v != 0); touched = true; } @@ -140,10 +154,10 @@ void TaskTetParameter::setOptimize(int v) void TaskTetParameter::setInfo() { Fem::FemMesh::FemMeshInfo info = pcObject->FemMesh.getValue().getInfo(); - //Base::BoundBox3d bndBox = pcObject->FemMesh.getValue().getBoundBox(); - ui->lineEdit_InfoNodes ->setText(QString::number(info.numNode)); - ui->lineEdit_InfoTriangle ->setText(QString::number(info.numFaces)); - ui->lineEdit_InfoTet ->setText(QString::number(info.numTetr)); + // Base::BoundBox3d bndBox = pcObject->FemMesh.getValue().getBoundBox(); + ui->lineEdit_InfoNodes->setText(QString::number(info.numNode)); + ui->lineEdit_InfoTriangle->setText(QString::number(info.numFaces)); + ui->lineEdit_InfoTet->setText(QString::number(info.numTetr)); } diff --git a/src/Mod/Fem/Gui/TaskTetParameter.h b/src/Mod/Fem/Gui/TaskTetParameter.h index 9de4878727..08809f6543 100644 --- a/src/Mod/Fem/Gui/TaskTetParameter.h +++ b/src/Mod/Fem/Gui/TaskTetParameter.h @@ -30,32 +30,37 @@ class Ui_TaskTetParameter; class SoEventCallback; -namespace Base { +namespace Base +{ class Polygon2d; } -namespace App { +namespace App +{ class Property; } -namespace Gui { +namespace Gui +{ class ViewProvider; class ViewVolumeProjection; -} -namespace Fem{ - class FemMeshShapeNetgenObject; +} // namespace Gui +namespace Fem +{ +class FemMeshShapeNetgenObject; } -namespace FemGui { +namespace FemGui +{ class ViewProviderFemMeshShapeNetgen; -class TaskTetParameter : public Gui::TaskView::TaskBox +class TaskTetParameter: public Gui::TaskView::TaskBox { Q_OBJECT public: - explicit TaskTetParameter(Fem::FemMeshShapeNetgenObject *pcObject,QWidget *parent = nullptr); + explicit TaskTetParameter(Fem::FemMeshShapeNetgenObject* pcObject, QWidget* parent = nullptr); ~TaskTetParameter() override; void setInfo(); @@ -71,13 +76,13 @@ private Q_SLOTS: void setOptimize(int v); protected: - Fem::FemMeshShapeNetgenObject *pcObject; + Fem::FemMeshShapeNetgenObject* pcObject; private: QWidget* proxy; std::unique_ptr ui; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEMGUI_TaskTetParameter_H +#endif // FEMGUI_TaskTetParameter_H diff --git a/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp b/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp index 8833bc0c36..b1b9c051e2 100644 --- a/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp +++ b/src/Mod/Fem/Gui/ViewProviderAnalysis.cpp @@ -23,12 +23,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #include @@ -50,11 +50,11 @@ #include #include #ifdef FC_USE_VTK -# include +#include #endif -#include "ViewProviderAnalysis.h" #include "TaskDlgAnalysis.h" +#include "ViewProviderAnalysis.h" using namespace FemGui; @@ -70,13 +70,13 @@ ViewProviderFemHighlighter::~ViewProviderFemHighlighter() annotate->unref(); } -void ViewProviderFemHighlighter::attach(ViewProviderFemAnalysis *view) +void ViewProviderFemHighlighter::attach(ViewProviderFemAnalysis* view) { - SoGroup *root = view->getRoot(); + SoGroup* root = view->getRoot(); root->addChild(annotate); } -void ViewProviderFemHighlighter::highlightView(Gui::ViewProviderDocumentObject *view) +void ViewProviderFemHighlighter::highlightView(Gui::ViewProviderDocumentObject* view) { annotate->removeAllChildren(); @@ -99,18 +99,18 @@ ViewProviderFemAnalysis::ViewProviderFemAnalysis() ViewProviderFemAnalysis::~ViewProviderFemAnalysis() = default; -void ViewProviderFemAnalysis::attach(App::DocumentObject *obj) +void ViewProviderFemAnalysis::attach(App::DocumentObject* obj) { Gui::ViewProviderDocumentObjectGroup::attach(obj); extension.attach(this); // activate analysis if currently active workbench is FEM - auto *workbench = Gui::WorkbenchManager::instance()->active(); + auto* workbench = Gui::WorkbenchManager::instance()->active(); if (workbench->name() == "FemWorkbench") { doubleClicked(); } } -void ViewProviderFemAnalysis::highlightView(Gui::ViewProviderDocumentObject *view) +void ViewProviderFemAnalysis::highlightView(Gui::ViewProviderDocumentObject* view) { extension.highlightView(view); } @@ -130,12 +130,12 @@ bool ViewProviderFemAnalysis::doubleClicked() // necessary for the workflow with new files to add a solver as next object std::vector selVector {}; selVector.push_back(this->getObject()); - auto *docName = this->getObject()->getDocument()->getName(); + auto* docName = this->getObject()->getDocument()->getName(); Gui::Selection().setSelection(docName, selVector); return true; } -std::vector ViewProviderFemAnalysis::claimChildren() const +std::vector ViewProviderFemAnalysis::claimChildren() const { return Gui::ViewProviderDocumentObjectGroup::claimChildren(); } @@ -155,46 +155,46 @@ void ViewProviderFemAnalysis::show() Gui::ViewProviderDocumentObjectGroup::show(); } -void ViewProviderFemAnalysis::setupContextMenu(QMenu *menu, QObject *, const char *) +void ViewProviderFemAnalysis::setupContextMenu(QMenu* menu, QObject*, const char*) { - Gui::ActionFunction *func = new Gui::ActionFunction(menu); - QAction *act = menu->addAction(tr("Activate analysis")); - func->trigger(act, [this](){ + Gui::ActionFunction* func = new Gui::ActionFunction(menu); + QAction* act = menu->addAction(tr("Activate analysis")); + func->trigger(act, [this]() { this->doubleClicked(); }); } bool ViewProviderFemAnalysis::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this pad the object // unsets and sets its edit mode without closing the task panel - //Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - //TaskDlgAnalysis *anaDlg = qobject_cast(dlg); - //if (padDlg && anaDlg->getPadView() != this) - // padDlg = 0; // another pad left open its task panel - //if (dlg && !padDlg) { - // QMessageBox msgBox; - // msgBox.setText(QObject::tr("A dialog is already open in the task panel")); - // msgBox.setInformativeText(QObject::tr("Do you want to close this dialog?")); - // msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); - // msgBox.setDefaultButton(QMessageBox::Yes); - // int ret = msgBox.exec(); - // if (ret == QMessageBox::Yes) - // Gui::Control().closeDialog(); - // else - // return false; - //} + // Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); + // TaskDlgAnalysis *anaDlg = qobject_cast(dlg); + // if (padDlg && anaDlg->getPadView() != this) + // padDlg = 0; // another pad left open its task panel + // if (dlg && !padDlg) { + // QMessageBox msgBox; + // msgBox.setText(QObject::tr("A dialog is already open in the task panel")); + // msgBox.setInformativeText(QObject::tr("Do you want to close this dialog?")); + // msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); + // msgBox.setDefaultButton(QMessageBox::Yes); + // int ret = msgBox.exec(); + // if (ret == QMessageBox::Yes) + // Gui::Control().closeDialog(); + // else + // return false; + // } // start the edit dialog -// if (padDlg) -// Gui::Control().showDialog(padDlg); -// else + // if (padDlg) + // Gui::Control().showDialog(padDlg); + // else - //Fem::FemAnalysis* pcAna = static_cast(this->getObject()); - //Gui::Control().showDialog(new TaskDlgAnalysis(pcAna)); - //return true; + // Fem::FemAnalysis* pcAna = static_cast(this->getObject()); + // Gui::Control().showDialog(new TaskDlgAnalysis(pcAna)); + // return true; return false; } else { @@ -218,35 +218,46 @@ bool ViewProviderFemAnalysis::canDragObjects() const return true; } -bool ViewProviderFemAnalysis::canDragObject(App::DocumentObject *obj) const +bool ViewProviderFemAnalysis::canDragObject(App::DocumentObject* obj) const { - if (!obj) + if (!obj) { return false; - if (obj->getTypeId().isDerivedFrom(Fem::FemMeshObject::getClassTypeId())) + } + if (obj->getTypeId().isDerivedFrom(Fem::FemMeshObject::getClassTypeId())) { return true; - else if (obj->getTypeId().isDerivedFrom(Fem::FemSolverObject::getClassTypeId())) + } + else if (obj->getTypeId().isDerivedFrom(Fem::FemSolverObject::getClassTypeId())) { return true; - else if (obj->getTypeId().isDerivedFrom(Fem::FemResultObject::getClassTypeId())) + } + else if (obj->getTypeId().isDerivedFrom(Fem::FemResultObject::getClassTypeId())) { return true; - else if (obj->getTypeId().isDerivedFrom(Fem::Constraint::getClassTypeId())) + } + else if (obj->getTypeId().isDerivedFrom(Fem::Constraint::getClassTypeId())) { return true; - else if (obj->getTypeId().isDerivedFrom(Fem::FemSetObject::getClassTypeId())) + } + else if (obj->getTypeId().isDerivedFrom(Fem::FemSetObject::getClassTypeId())) { return true; - else if (obj->getTypeId().isDerivedFrom(Base::Type::fromName("Fem::FeaturePython"))) + } + else if (obj->getTypeId().isDerivedFrom(Base::Type::fromName("Fem::FeaturePython"))) { return true; - else if (obj->getTypeId().isDerivedFrom(App::MaterialObject::getClassTypeId())) + } + else if (obj->getTypeId().isDerivedFrom(App::MaterialObject::getClassTypeId())) { return true; - else if (obj->getTypeId().isDerivedFrom(App::TextDocument::getClassTypeId())) + } + else if (obj->getTypeId().isDerivedFrom(App::TextDocument::getClassTypeId())) { return true; + } #ifdef FC_USE_VTK - else if (obj->getTypeId().isDerivedFrom(Fem::FemPostObject::getClassTypeId())) + else if (obj->getTypeId().isDerivedFrom(Fem::FemPostObject::getClassTypeId())) { return true; + } #endif - else + else { return false; + } } -void ViewProviderFemAnalysis::dragObject(App::DocumentObject *obj) +void ViewProviderFemAnalysis::dragObject(App::DocumentObject* obj) { ViewProviderDocumentObjectGroup::dragObject(obj); } @@ -256,17 +267,17 @@ bool ViewProviderFemAnalysis::canDropObjects() const return true; } -bool ViewProviderFemAnalysis::canDropObject(App::DocumentObject *obj) const +bool ViewProviderFemAnalysis::canDropObject(App::DocumentObject* obj) const { return canDragObject(obj); } -void ViewProviderFemAnalysis::dropObject(App::DocumentObject *obj) +void ViewProviderFemAnalysis::dropObject(App::DocumentObject* obj) { ViewProviderDocumentObjectGroup::dropObject(obj); } -bool ViewProviderFemAnalysis::onDelete(const std::vector &) +bool ViewProviderFemAnalysis::onDelete(const std::vector&) { // warn the user if the object has unselected children auto objs = claimChildren(); @@ -274,7 +285,8 @@ bool ViewProviderFemAnalysis::onDelete(const std::vector &) } bool ViewProviderFemAnalysis::checkSelectedChildren(const std::vector objs, - Gui::Document* docGui, std::string objectName) + Gui::Document* docGui, + std::string objectName) { // warn the user if the object has unselected children if (!objs.empty()) { @@ -290,37 +302,47 @@ bool ViewProviderFemAnalysis::checkSelectedChildren(const std::vectortranslate("Std_Delete", - ("The " + objectName + " is not empty, therefore the\nfollowing " - "referencing objects might be lost:").c_str()); + ("The " + objectName + + " is not empty, therefore the\nfollowing " + "referencing objects might be lost:") + .c_str()); bodyMessageStream << '\n'; - for (auto ObjIterator : objs) + for (auto ObjIterator : objs) { bodyMessageStream << '\n' << QString::fromUtf8(ObjIterator->Label.getValue()); + } bodyMessageStream << "\n\n" << QObject::tr("Are you sure you want to continue?"); // show and evaluate the dialog - int DialogResult = QMessageBox::warning(Gui::getMainWindow(), - qApp->translate("Std_Delete", "Object dependencies"), bodyMessage, - QMessageBox::Yes, QMessageBox::No); - if (DialogResult == QMessageBox::Yes) + int DialogResult = + QMessageBox::warning(Gui::getMainWindow(), + qApp->translate("Std_Delete", "Object dependencies"), + bodyMessage, + QMessageBox::Yes, + QMessageBox::No); + if (DialogResult == QMessageBox::Yes) { return true; - else + } + else { return false; + } } else { return true; } } -bool ViewProviderFemAnalysis::canDelete(App::DocumentObject *obj) const +bool ViewProviderFemAnalysis::canDelete(App::DocumentObject* obj) const { // deletions of objects from a FemAnalysis don't necessarily destroy anything // thus we can pass this action @@ -339,4 +361,4 @@ PROPERTY_SOURCE_TEMPLATE(FemGui::ViewProviderFemAnalysisPython, FemGui::ViewProv // explicit template instantiation template class FemGuiExport ViewProviderPythonFeatureT; -} // namespace Gui +} // namespace Gui diff --git a/src/Mod/Fem/Gui/ViewProviderAnalysis.h b/src/Mod/Fem/Gui/ViewProviderAnalysis.h index 4f62db2a8d..011d0ad903 100644 --- a/src/Mod/Fem/Gui/ViewProviderAnalysis.h +++ b/src/Mod/Fem/Gui/ViewProviderAnalysis.h @@ -37,7 +37,7 @@ class ViewProviderFemHighlighter public: /// Constructor ViewProviderFemHighlighter(); - ~ViewProviderFemHighlighter(); + ~ViewProviderFemHighlighter(); void attach(ViewProviderFemAnalysis*); void highlightView(Gui::ViewProviderDocumentObject*); @@ -46,7 +46,7 @@ private: SoSeparator* annotate; }; -class FemGuiExport ViewProviderFemAnalysis : public Gui::ViewProviderDocumentObjectGroup +class FemGuiExport ViewProviderFemAnalysis: public Gui::ViewProviderDocumentObjectGroup { Q_DECLARE_TR_FUNCTIONS(FemGui::ViewProviderFemAnalysis) PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderAnalysis); @@ -61,13 +61,14 @@ public: void attach(App::DocumentObject*) override; bool doubleClicked() override; - std::vector claimChildren()const override; + std::vector claimChildren() const override; /// handling when object is deleted bool onDelete(const std::vector&) override; /// warning on deletion when there are children static bool checkSelectedChildren(const std::vector objs, - Gui::Document* docGui, std::string objectName); + Gui::Document* docGui, + std::string objectName); /// asks the view provider if the given object can be deleted bool canDelete(App::DocumentObject* obj) const override; @@ -76,7 +77,8 @@ public: /// list of all possible display modes std::vector getDisplayModes() const override; /// shows solid in the tree - bool isShow() const override { + bool isShow() const override + { return Visibility.getValue(); } /// Hide the object in the view @@ -112,7 +114,7 @@ private: using ViewProviderFemAnalysisPython = Gui::ViewProviderPythonFeatureT; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderAnalysis_H +#endif // FEM_ViewProviderAnalysis_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp index 18fd18e0f1..82fee78652 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraint.cpp @@ -24,20 +24,20 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include "Gui/Command.h" @@ -45,8 +45,8 @@ #include "Gui/Document.h" #include "Gui/MainWindow.h" -#include "ViewProviderFemConstraint.h" #include "TaskFemConstraint.h" +#include "ViewProviderFemConstraint.h" using namespace FemGui; @@ -123,23 +123,25 @@ std::vector ViewProviderFemConstraint::getDisplayModes() const void ViewProviderFemConstraint::setDisplayMode(const char* ModeName) { - if (strcmp(ModeName, "Base") == 0) + if (strcmp(ModeName, "Base") == 0) { setDisplayMaskMode("Base"); + } ViewProviderDocumentObject::setDisplayMode(ModeName); } -std::vector ViewProviderFemConstraint::claimChildren()const +std::vector ViewProviderFemConstraint::claimChildren() const { return {}; } -void ViewProviderFemConstraint::setupContextMenu(QMenu *menu, QObject *receiver, const char *member) +void ViewProviderFemConstraint::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { - QAction *act; + QAction* act; act = menu->addAction(QObject::tr("Edit analysis feature"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); - ViewProviderDocumentObject::setupContextMenu(menu, receiver, - member);// clazy:exclude=skipped-base-method + ViewProviderDocumentObject::setupContextMenu(menu, + receiver, + member); // clazy:exclude=skipped-base-method } void ViewProviderFemConstraint::onChanged(const App::Property* prop) @@ -148,26 +150,27 @@ void ViewProviderFemConstraint::onChanged(const App::Property* prop) updateData(prop); } else if (prop == &TextColor) { - const App::Color &c = TextColor.getValue(); + const App::Color& c = TextColor.getValue(); pTextColor->rgb.setValue(c.r, c.g, c.b); } else if (prop == &FaceColor) { - const App::Color &c = FaceColor.getValue(); + const App::Color& c = FaceColor.getValue(); pMaterials->rgb.setValue(c.r, c.g, c.b); } else if (prop == &FontSize) { pFont->size = FontSize.getValue(); } else { - ViewProviderDocumentObject::onChanged(prop);// clazy:exclude=skipped-base-method + ViewProviderDocumentObject::onChanged(prop); // clazy:exclude=skipped-base-method } } -//OvG: Visibility automation show parts and hide meshes on activation of a constraint +// OvG: Visibility automation show parts and hide meshes on activation of a constraint std::string ViewProviderFemConstraint::gethideMeshShowPartStr(const std::string showConstr) { return "for amesh in App.activeDocument().Objects:\n\ - if \""+showConstr+"\" == amesh.Name:\n\ + if \"" + + showConstr + "\" == amesh.Name:\n\ amesh.ViewObject.Visibility = True\n\ elif \"Mesh\" in amesh.TypeId:\n\ amesh.ViewObject.Visibility = False\n"; @@ -180,7 +183,8 @@ std::string ViewProviderFemConstraint::gethideMeshShowPartStr() bool ViewProviderFemConstraint::setEdit(int ModNum) { - Gui::Command::doCommand(Gui::Command::Doc, "%s", + Gui::Command::doCommand(Gui::Command::Doc, + "%s", ViewProviderFemConstraint::gethideMeshShowPartStr().c_str()); return Gui::ViewProviderGeometryObject::setEdit(ModNum); } @@ -261,29 +265,34 @@ void getLocalCoordinateSystem(const SbVec3f& z, SbVec3f& y, SbVec3f& x) */ #define PLACEMENT_CHILDREN 2 -void ViewProviderFemConstraint::createPlacement(SoSeparator *sep, const SbVec3f &base, - const SbRotation &r) +void ViewProviderFemConstraint::createPlacement(SoSeparator* sep, + const SbVec3f& base, + const SbRotation& r) { - SoTranslation *trans = new SoTranslation(); + SoTranslation* trans = new SoTranslation(); trans->translation.setValue(base); sep->addChild(trans); - SoRotation *rot = new SoRotation(); + SoRotation* rot = new SoRotation(); rot->rotation.setValue(r); sep->addChild(rot); } -void ViewProviderFemConstraint::updatePlacement(const SoSeparator *sep, const int idx, - const SbVec3f &base, const SbRotation &r) +void ViewProviderFemConstraint::updatePlacement(const SoSeparator* sep, + const int idx, + const SbVec3f& base, + const SbRotation& r) { - SoTranslation *trans = static_cast(sep->getChild(idx)); + SoTranslation* trans = static_cast(sep->getChild(idx)); trans->translation.setValue(base); - SoRotation *rot = static_cast(sep->getChild(idx + 1)); + SoRotation* rot = static_cast(sep->getChild(idx + 1)); rot->rotation.setValue(r); } #define CONE_CHILDREN 2 -void ViewProviderFemConstraint::createCone(SoSeparator* sep, const double height, const double radius) +void ViewProviderFemConstraint::createCone(SoSeparator* sep, + const double height, + const double radius) { // Adjust cone so that the tip is on base SoTranslation* trans = new SoTranslation(); @@ -303,23 +312,26 @@ SoSeparator* ViewProviderFemConstraint::createCone(const double height, const do return sep; } -void ViewProviderFemConstraint::updateCone(const SoNode *node, const int idx, const double height, +void ViewProviderFemConstraint::updateCone(const SoNode* node, + const int idx, + const double height, const double radius) { - const SoSeparator *sep = static_cast(node); - SoTranslation *trans = static_cast(sep->getChild(idx)); + const SoSeparator* sep = static_cast(node); + SoTranslation* trans = static_cast(sep->getChild(idx)); trans->translation.setValue(SbVec3f(0, -height / 2, 0)); - SoCone *cone = static_cast(sep->getChild(idx + 1)); + SoCone* cone = static_cast(sep->getChild(idx + 1)); cone->height.setValue(height); cone->bottomRadius.setValue(radius); } #define CYLINDER_CHILDREN 1 -void ViewProviderFemConstraint::createCylinder(SoSeparator *sep, const double height, +void ViewProviderFemConstraint::createCylinder(SoSeparator* sep, + const double height, const double radius) { - SoCylinder *cyl = new SoCylinder(); + SoCylinder* cyl = new SoCylinder(); cyl->height.setValue(height); cyl->radius.setValue(radius); sep->addChild(cyl); @@ -333,40 +345,47 @@ SoSeparator* ViewProviderFemConstraint::createCylinder(const double height, cons return sep; } -void ViewProviderFemConstraint::updateCylinder(const SoNode *node, const int idx, - const double height, const double radius) +void ViewProviderFemConstraint::updateCylinder(const SoNode* node, + const int idx, + const double height, + const double radius) { - const SoSeparator *sep = static_cast(node); - SoCylinder *cyl = static_cast(sep->getChild(idx)); + const SoSeparator* sep = static_cast(node); + SoCylinder* cyl = static_cast(sep->getChild(idx)); cyl->height.setValue(height); cyl->radius.setValue(radius); } #define CUBE_CHILDREN 1 -void ViewProviderFemConstraint::createCube(SoSeparator *sep, const double width, - const double length, const double height) +void ViewProviderFemConstraint::createCube(SoSeparator* sep, + const double width, + const double length, + const double height) { - SoCube *cube = new SoCube(); + SoCube* cube = new SoCube(); cube->width.setValue(width); cube->depth.setValue(length); cube->height.setValue(height); sep->addChild(cube); } -SoSeparator *ViewProviderFemConstraint::createCube(const double width, const double length, - const double height) +SoSeparator* +ViewProviderFemConstraint::createCube(const double width, const double length, const double height) { - SoSeparator *sep = new SoSeparator(); + SoSeparator* sep = new SoSeparator(); createCube(sep, width, length, height); return sep; } -void ViewProviderFemConstraint::updateCube(const SoNode *node, const int idx, const double width, - const double length, const double height) +void ViewProviderFemConstraint::updateCube(const SoNode* node, + const int idx, + const double width, + const double length, + const double height) { - const SoSeparator *sep = static_cast(node); - SoCube *cube = static_cast(sep->getChild(idx)); + const SoSeparator* sep = static_cast(node); + SoCube* cube = static_cast(sep->getChild(idx)); cube->width.setValue(width); cube->depth.setValue(length); cube->height.setValue(height); @@ -374,7 +393,9 @@ void ViewProviderFemConstraint::updateCube(const SoNode *node, const int idx, co #define ARROW_CHILDREN (CONE_CHILDREN + PLACEMENT_CHILDREN + CYLINDER_CHILDREN) -void ViewProviderFemConstraint::createArrow(SoSeparator* sep, const double length, const double radius) +void ViewProviderFemConstraint::createArrow(SoSeparator* sep, + const double length, + const double radius) { createCone(sep, radius, radius / 2); createPlacement(sep, SbVec3f(0, -radius / 2 - (length - radius) / 2, 0), SbRotation()); @@ -388,19 +409,25 @@ SoSeparator* ViewProviderFemConstraint::createArrow(const double length, const d return sep; } -void ViewProviderFemConstraint::updateArrow(const SoNode *node, const int idx, const double length, +void ViewProviderFemConstraint::updateArrow(const SoNode* node, + const int idx, + const double length, const double radius) { - const SoSeparator *sep = static_cast(node); + const SoSeparator* sep = static_cast(node); updateCone(sep, idx, radius, radius / 2); - updatePlacement(sep, idx + CONE_CHILDREN, SbVec3f(0, -radius / 2 - (length - radius) / 2, 0), + updatePlacement(sep, + idx + CONE_CHILDREN, + SbVec3f(0, -radius / 2 - (length - radius) / 2, 0), SbRotation()); updateCylinder(sep, idx + CONE_CHILDREN + PLACEMENT_CHILDREN, length - radius, radius / 5); } #define SPRING_CHILDREN (CUBE_CHILDREN + PLACEMENT_CHILDREN + CYLINDER_CHILDREN) -void ViewProviderFemConstraint::createSpring(SoSeparator* sep, const double length, const double width) +void ViewProviderFemConstraint::createSpring(SoSeparator* sep, + const double length, + const double width) { createCube(sep, width, width, length / 2); createPlacement(sep, SbVec3f(0, -length / 2, 0), SbRotation()); @@ -414,10 +441,12 @@ SoSeparator* ViewProviderFemConstraint::createSpring(const double length, const return sep; } -void ViewProviderFemConstraint::updateSpring(const SoNode *node, const int idx, const double length, +void ViewProviderFemConstraint::updateSpring(const SoNode* node, + const int idx, + const double length, const double width) { - const SoSeparator *sep = static_cast(node); + const SoSeparator* sep = static_cast(node); updateCube(sep, idx, width, width, length / 2); updatePlacement(sep, idx + CUBE_CHILDREN, SbVec3f(0, -length / 2, 0), SbRotation()); updateCylinder(sep, idx + CUBE_CHILDREN + PLACEMENT_CHILDREN, length / 2, width / 4); @@ -425,99 +454,121 @@ void ViewProviderFemConstraint::updateSpring(const SoNode *node, const int idx, #define FIXED_CHILDREN (CONE_CHILDREN + PLACEMENT_CHILDREN + CUBE_CHILDREN) -void ViewProviderFemConstraint::createFixed(SoSeparator *sep, const double height, - const double width, const bool gap) +void ViewProviderFemConstraint::createFixed(SoSeparator* sep, + const double height, + const double width, + const bool gap) { createCone(sep, height - width / 4, height - width / 4); createPlacement( - sep, SbVec3f(0, -(height - width / 4) / 2 - width / 8 - (gap ? 1.0 : 0.1) * width / 8, 0), + sep, + SbVec3f(0, -(height - width / 4) / 2 - width / 8 - (gap ? 1.0 : 0.1) * width / 8, 0), SbRotation()); createCube(sep, width, width, width / 4); } -SoSeparator *ViewProviderFemConstraint::createFixed(const double height, const double width, - const bool gap) +SoSeparator* +ViewProviderFemConstraint::createFixed(const double height, const double width, const bool gap) { - SoSeparator *sep = new SoSeparator(); + SoSeparator* sep = new SoSeparator(); createFixed(sep, height, width, gap); return sep; } -void ViewProviderFemConstraint::updateFixed(const SoNode *node, const int idx, const double height, - const double width, const bool gap) +void ViewProviderFemConstraint::updateFixed(const SoNode* node, + const int idx, + const double height, + const double width, + const bool gap) { - const SoSeparator *sep = static_cast(node); + const SoSeparator* sep = static_cast(node); updateCone(sep, idx, height - width / 4, height - width / 4); updatePlacement( - sep, idx + CONE_CHILDREN, + sep, + idx + CONE_CHILDREN, SbVec3f(0, -(height - width / 4) / 2 - width / 8 - (gap ? 1.0 : 0.0) * width / 8, 0), SbRotation()); updateCube(sep, idx + CONE_CHILDREN + PLACEMENT_CHILDREN, width, width, width / 4); } -void ViewProviderFemConstraint::createDisplacement(SoSeparator *sep, const double height, - const double width, const bool gap) +void ViewProviderFemConstraint::createDisplacement(SoSeparator* sep, + const double height, + const double width, + const bool gap) { createCone(sep, height, width); - createPlacement(sep, SbVec3f(0, -(height) / 2 - width / 8 - (gap ? 1.0 : 0.1) * width / 8, 0), + createPlacement(sep, + SbVec3f(0, -(height) / 2 - width / 8 - (gap ? 1.0 : 0.1) * width / 8, 0), SbRotation()); } -SoSeparator *ViewProviderFemConstraint::createDisplacement(const double height, const double width, +SoSeparator* ViewProviderFemConstraint::createDisplacement(const double height, + const double width, const bool gap) { - SoSeparator *sep = new SoSeparator(); + SoSeparator* sep = new SoSeparator(); createDisplacement(sep, height, width, gap); return sep; } -void ViewProviderFemConstraint::updateDisplacement(const SoNode *node, const int idx, - const double height, const double width, +void ViewProviderFemConstraint::updateDisplacement(const SoNode* node, + const int idx, + const double height, + const double width, const bool gap) { - const SoSeparator *sep = static_cast(node); + const SoSeparator* sep = static_cast(node); updateCone(sep, idx, height, width); - updatePlacement(sep, idx + CONE_CHILDREN, + updatePlacement(sep, + idx + CONE_CHILDREN, SbVec3f(0, -(height) / 2 - width / 8 - (gap ? 1.0 : 0.0) * width / 8, 0), SbRotation()); } -void ViewProviderFemConstraint::createRotation(SoSeparator *sep, const double height, - const double width, const bool gap) +void ViewProviderFemConstraint::createRotation(SoSeparator* sep, + const double height, + const double width, + const bool gap) { createCylinder(sep, width / 2, height / 2); - createPlacement(sep, SbVec3f(0, -(height)*2 - width / 8 - (gap ? 1.0 : 0.1) * width / 8, 0), + createPlacement(sep, + SbVec3f(0, -(height)*2 - width / 8 - (gap ? 1.0 : 0.1) * width / 8, 0), SbRotation()); } -SoSeparator *ViewProviderFemConstraint::createRotation(const double height, const double width, - const bool gap) +SoSeparator* +ViewProviderFemConstraint::createRotation(const double height, const double width, const bool gap) { - SoSeparator *sep = new SoSeparator(); + SoSeparator* sep = new SoSeparator(); createRotation(sep, height, width, gap); return sep; } -void ViewProviderFemConstraint::updateRotation(const SoNode *node, const int idx, - const double height, const double width, +void ViewProviderFemConstraint::updateRotation(const SoNode* node, + const int idx, + const double height, + const double width, const bool gap) { - const SoSeparator *sep = static_cast(node); + const SoSeparator* sep = static_cast(node); updateCylinder(sep, idx, height / 2, width / 2); - updatePlacement(sep, idx + CYLINDER_CHILDREN, + updatePlacement(sep, + idx + CYLINDER_CHILDREN, SbVec3f(0, -(height)*2 - width / 8 - (gap ? 1.0 : 0.0) * width / 8, 0), SbRotation()); } -QObject *ViewProviderFemConstraint::findChildByName(const QObject *parent, const QString &name) +QObject* ViewProviderFemConstraint::findChildByName(const QObject* parent, const QString& name) { for (auto o : parent->children()) { - if (o->objectName() == name) + if (o->objectName() == name) { return o; + } if (!o->children().empty()) { - QObject *result = findChildByName(o, name); - if (result) + QObject* result = findChildByName(o, name); + if (result) { return result; + } } } @@ -526,30 +577,38 @@ QObject *ViewProviderFemConstraint::findChildByName(const QObject *parent, const void ViewProviderFemConstraint::checkForWizard() { - wizardWidget= nullptr; + wizardWidget = nullptr; wizardSubLayout = nullptr; Gui::MainWindow* mw = Gui::getMainWindow(); - if (!mw) + if (!mw) { return; + } QDockWidget* dw = mw->findChild(QString::fromLatin1("Combo View")); - if (!dw) + if (!dw) { return; + } QWidget* cw = dw->findChild(QString::fromLatin1("Combo View")); - if (!cw) + if (!cw) { return; + } QTabWidget* tw = cw->findChild(QString::fromLatin1("combiTab")); - if (!tw) + if (!tw) { return; - QStackedWidget *sw = - tw->findChild(QString::fromLatin1("qt_tabwidget_stackedwidget")); - if (!sw) + } + QStackedWidget* sw = + tw->findChild(QString::fromLatin1("qt_tabwidget_stackedwidget")); + if (!sw) { return; + } QScrollArea* sa = sw->findChild(); - if (!sa) + if (!sa) { return; - QWidget* wd = sa->widget(); // This is the reason why we cannot use findChildByName() right away!!! - if (!wd) + } + QWidget* wd = + sa->widget(); // This is the reason why we cannot use findChildByName() right away!!! + if (!wd) { return; + } QObject* wiz = findChildByName(wd, QString::fromLatin1("ShaftWizard")); if (wiz) { wizardWidget = static_cast(wiz); @@ -560,11 +619,12 @@ void ViewProviderFemConstraint::checkForWizard() // Python feature ----------------------------------------------------------------------- -namespace Gui { +namespace Gui +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(FemGui::ViewProviderFemConstraintPython, FemGui::ViewProviderFemConstraint) /// @endcond // explicit template instantiation template class FemGuiExport ViewProviderPythonFeatureT; -} +} // namespace Gui diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraint.h b/src/Mod/Fem/Gui/ViewProviderFemConstraint.h index 9d485b25e6..e3843fb0fe 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraint.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraint.h @@ -44,7 +44,7 @@ namespace FemGui class TaskFemConstraint; -class FemGuiExport ViewProviderFemConstraint : public Gui::ViewProviderGeometryObject +class FemGuiExport ViewProviderFemConstraint: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraint); @@ -54,26 +54,27 @@ public: ~ViewProviderFemConstraint() override; // Display properties - App::PropertyColor TextColor; - App::PropertyColor FaceColor; - App::PropertyColor ShapeColor; - App::PropertyInteger FontSize; - App::PropertyFloat DistFactor; - App::PropertyBool Mirror; + App::PropertyColor TextColor; + App::PropertyColor FaceColor; + App::PropertyColor ShapeColor; + App::PropertyInteger FontSize; + App::PropertyFloat DistFactor; + App::PropertyBool Mirror; - void attach(App::DocumentObject *) override; - void updateData(const App::Property *prop) override + void attach(App::DocumentObject*) override; + void updateData(const App::Property* prop) override { Gui::ViewProviderGeometryObject::updateData(prop); } std::vector getDisplayModes() const override; - void setDisplayMode(const char *ModeName) override; + void setDisplayMode(const char* ModeName) override; - std::vector claimChildren()const override; + std::vector claimChildren() const override; void setupContextMenu(QMenu*, QObject*, const char*) override; /// Highlight the references that have been selected - virtual void highlightReferences(const bool /* on */) {} + virtual void highlightReferences(const bool /* on */) + {} static std::string gethideMeshShowPartStr(); static std::string gethideMeshShowPartStr(const std::string showConstr); @@ -83,57 +84,75 @@ protected: bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; - static void createPlacement(SoSeparator *sep, const SbVec3f &base, const SbRotation &r); - static void updatePlacement(const SoSeparator *sep, const int idx, const SbVec3f &base, - const SbRotation &r); - static void createCone(SoSeparator *sep, const double height, const double radius); - static SoSeparator *createCone(const double height, const double radius); - static void updateCone(const SoNode *node, const int idx, const double height, - const double radius); - static void createCylinder(SoSeparator *sep, const double height, const double radius); - static SoSeparator *createCylinder(const double height, const double radius); - static void updateCylinder(const SoNode *node, const int idx, const double height, - const double radius); - static void createCube(SoSeparator *sep, const double width, const double length, + static void createPlacement(SoSeparator* sep, const SbVec3f& base, const SbRotation& r); + static void updatePlacement(const SoSeparator* sep, + const int idx, + const SbVec3f& base, + const SbRotation& r); + static void createCone(SoSeparator* sep, const double height, const double radius); + static SoSeparator* createCone(const double height, const double radius); + static void + updateCone(const SoNode* node, const int idx, const double height, const double radius); + static void createCylinder(SoSeparator* sep, const double height, const double radius); + static SoSeparator* createCylinder(const double height, const double radius); + static void + updateCylinder(const SoNode* node, const int idx, const double height, const double radius); + static void + createCube(SoSeparator* sep, const double width, const double length, const double height); + static SoSeparator* createCube(const double width, const double length, const double height); + static void updateCube(const SoNode* node, + const int idx, + const double width, + const double length, const double height); - static SoSeparator *createCube(const double width, const double length, const double height); - static void updateCube(const SoNode *node, const int idx, const double width, - const double length, const double height); - static void createArrow(SoSeparator *sep, const double length, const double radius); - static SoSeparator *createArrow(const double length, const double radius); - static void updateArrow(const SoNode *node, const int idx, const double length, - const double radius); - static void createSpring(SoSeparator *sep, const double length, const double width); - static SoSeparator *createSpring(const double length, const double width); - static void updateSpring(const SoNode *node, const int idx, const double length, - const double width); - static void createFixed(SoSeparator *sep, const double height, const double width, + static void createArrow(SoSeparator* sep, const double length, const double radius); + static SoSeparator* createArrow(const double length, const double radius); + static void + updateArrow(const SoNode* node, const int idx, const double length, const double radius); + static void createSpring(SoSeparator* sep, const double length, const double width); + static SoSeparator* createSpring(const double length, const double width); + static void + updateSpring(const SoNode* node, const int idx, const double length, const double width); + static void + createFixed(SoSeparator* sep, const double height, const double width, const bool gap = false); + static SoSeparator* + createFixed(const double height, const double width, const bool gap = false); + static void updateFixed(const SoNode* node, + const int idx, + const double height, + const double width, const bool gap = false); - static SoSeparator *createFixed(const double height, const double width, - const bool gap = false); - static void updateFixed(const SoNode *node, const int idx, const double height, - const double width, const bool gap = false); - static void createDisplacement(SoSeparator *sep, const double height, const double width, + static void createDisplacement(SoSeparator* sep, + const double height, + const double width, const bool gap = false); - static SoSeparator *createDisplacement(const double height, const double width, - const bool gap = false); - static void updateDisplacement(const SoNode *node, const int idx, const double height, - const double width, const bool gap = false); - static void createRotation(SoSeparator *sep, const double height, const double width, + static SoSeparator* + createDisplacement(const double height, const double width, const bool gap = false); + static void updateDisplacement(const SoNode* node, + const int idx, + const double height, + const double width, + const bool gap = false); + static void createRotation(SoSeparator* sep, + const double height, + const double width, + const bool gap = false); + static SoSeparator* + createRotation(const double height, const double width, const bool gap = false); + static void updateRotation(const SoNode* node, + const int idx, + const double height, + const double width, const bool gap = false); - static SoSeparator *createRotation(const double height, const double width, - const bool gap = false); - static void updateRotation(const SoNode *node, const int idx, const double height, - const double width, const bool gap = false); private: - SoFontStyle * pFont; - SoText2 * pLabel; - SoBaseColor * pTextColor; - SoBaseColor * pMaterials; + SoFontStyle* pFont; + SoText2* pLabel; + SoBaseColor* pTextColor; + SoBaseColor* pMaterials; protected: - SoSeparator * pShapeSep; + SoSeparator* pShapeSep; // Shaft design wizard integration protected: @@ -149,7 +168,7 @@ protected: using ViewProviderFemConstraintPython = Gui::ViewProviderPythonFeatureT; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINT_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINT_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp index 0a25230f65..4da4bbcfe9 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp @@ -24,17 +24,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif -#include #include "Gui/Control.h" -#include -#include "ViewProviderFemConstraintBearing.h" #include "TaskFemConstraintBearing.h" +#include "ViewProviderFemConstraintBearing.h" +#include +#include using namespace FemGui; @@ -52,14 +52,15 @@ ViewProviderFemConstraintBearing::~ViewProviderFemConstraintBearing() = default; bool ViewProviderFemConstraintBearing::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintBearing *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintBearing* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { // This case will occur in the ShaftWizard application checkForWizard(); @@ -71,15 +72,19 @@ bool ViewProviderFemConstraintBearing::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; - } else if (constraintDialog) { + } + } + else if (constraintDialog) { // Another FemConstraint* dialog is already open inside the Shaft Wizard // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintBearing(this); return true; } @@ -89,25 +94,28 @@ bool ViewProviderFemConstraintBearing::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintBearing(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } void ViewProviderFemConstraintBearing::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintBearing *pcConstraint = static_cast(this->getObject()); + Fem::ConstraintBearing* pcConstraint = static_cast(this->getObject()); - if (prop == &pcConstraint->References) - Base::Console().Error("\n"); // enable a breakpoint here + if (prop == &pcConstraint->References) { + Base::Console().Error("\n"); // enable a breakpoint here + } if (prop == &pcConstraint->BasePoint) { // Remove and recreate the symbol @@ -126,7 +134,8 @@ void ViewProviderFemConstraintBearing::updateData(const App::Property* prop) createPlacement(pShapeSep, b, rot); pShapeSep->addChild( createFixed(radius / 2, radius / 2 * 1.5, pcConstraint->AxialFree.getValue())); - } else if (prop == &pcConstraint->AxialFree) { + } + else if (prop == &pcConstraint->AxialFree) { if (pShapeSep->getNumChildren() > 0) { // Change the symbol Base::Vector3d normal = pcConstraint->NormalDirection.getValue(); diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.h index 345bc114b5..6ee1753bc0 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.h @@ -30,7 +30,7 @@ namespace FemGui { -class FemGuiExport ViewProviderFemConstraintBearing : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintBearing: public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintBearing); @@ -45,7 +45,7 @@ protected: bool setEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTBEARING_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTBEARING_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.cpp index d305504169..44dd3cff81 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.cpp @@ -26,17 +26,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include "Mod/Fem/App/FemConstraintContact.h" -#include -#include "ViewProviderFemConstraintContact.h" #include "TaskFemConstraintContact.h" +#include "ViewProviderFemConstraintContact.h" +#include using namespace FemGui; @@ -46,28 +46,31 @@ PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintContact, FemGui::ViewProviderFe ViewProviderFemConstraintContact::ViewProviderFemConstraintContact() { sPixmap = "FEM_ConstraintContact"; - //Note change "Contact" in line above to new constraint name, make sure it is the same as in taskFem* cpp file + // Note change "Contact" in line above to new constraint name, make sure it is the same as in + // taskFem* cpp file ADD_PROPERTY(FaceColor, (0.2f, 0.3f, 0.2f)); } ViewProviderFemConstraintContact::~ViewProviderFemConstraintContact() = default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintContact::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintContact *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintContact* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintContact(this); return true; } @@ -77,14 +80,16 @@ bool ViewProviderFemConstraintContact::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintContact(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } @@ -92,60 +97,64 @@ bool ViewProviderFemConstraintContact::setEdit(int ModNum) #define LENGTH (1.5) #define WIDTH (0.5) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - +// so disable void ViewProviderFemConstraintContact::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes Fem::ConstraintContact* pcConstraint = static_cast(this->getObject()); - float scaledlength = LENGTH * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + float scaledlength = + LENGTH * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledheight = HEIGHT * pcConstraint->Scale.getValue(); float scaledwidth = WIDTH * pcConstraint->Scale.getValue(); if (prop == &pcConstraint->Points) { const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); // Points and Normals are always updated together Gui::coinRemoveAllChildren(pShapeSep); - for (const auto & point : points) { - //Define base and normal directions + for (const auto& point : points) { + // Define base and normal directions SbVec3f base(point.x, point.y, point.z); - SbVec3f dir(n->x, n->y, n->z);//normal + SbVec3f dir(n->x, n->y, n->z); // normal - ///Visual indication - //define separator + /// Visual indication + // define separator SoSeparator* sep = new SoSeparator(); - //first move to correct position + // first move to correct position SoTranslation* trans = new SoTranslation(); SbVec3f newPos = base + scaledheight * dir * 0.12f; trans->translation.setValue(newPos); sep->addChild(trans); - //adjust orientation - SoRotation *rot = new SoRotation(); + // adjust orientation + SoRotation* rot = new SoRotation(); rot->rotation.setValue(SbRotation(SbVec3f(0, 1, 0), dir)); sep->addChild(rot); - //define color of shape - SoMaterial *myMaterial = new SoMaterial; - myMaterial->diffuseColor.set1Value(0, SbColor(1, 1, 1));//RGB - //myMaterial->diffuseColor.set1Value(1,SbColor(0,0,1));//possible to adjust sides separately + // define color of shape + SoMaterial* myMaterial = new SoMaterial; + myMaterial->diffuseColor.set1Value(0, SbColor(1, 1, 1)); // RGB + // myMaterial->diffuseColor.set1Value(1,SbColor(0,0,1));//possible to adjust sides + // separately sep->addChild(myMaterial); - //draw a cube - SoCube *cbe = new SoCube(); + // draw a cube + SoCube* cbe = new SoCube(); cbe->depth.setValue(scaledlength * 0.5); cbe->height.setValue(scaledheight * 0.25); cbe->width.setValue(scaledwidth * 0.75); sep->addChild(cbe); - //translate position - SoTranslation *trans2 = new SoTranslation(); + // translate position + SoTranslation* trans2 = new SoTranslation(); trans2->translation.setValue(SbVec3f(0, 0, 0)); sep->addChild(trans2); diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.h index b64ebba804..abc4669af3 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintContact.h @@ -28,9 +28,10 @@ #include "ViewProviderFemConstraint.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintContact : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintContact: public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintContact); @@ -42,6 +43,6 @@ public: protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTContact_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTContact_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp index fa4af6f115..0a4a8449ad 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.cpp @@ -26,16 +26,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include "Mod/Fem/App/FemConstraintDisplacement.h" -#include -#include "ViewProviderFemConstraintDisplacement.h" #include "TaskFemConstraintDisplacement.h" +#include "ViewProviderFemConstraintDisplacement.h" +#include using namespace FemGui; @@ -58,16 +58,18 @@ bool ViewProviderFemConstraintDisplacement::setEdit(int ModNum) // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintDisplacement *constrDlg = - qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintDisplacement* constrDlg = + qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintDisplacement(this); return true; } @@ -77,27 +79,29 @@ bool ViewProviderFemConstraintDisplacement::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintDisplacement(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define HEIGHT (4) #define WIDTH (0.3) -//#define USE_MULTIPLE_COPY -//OvG: MULTICOPY fails to update scaled display on initial drawing - so disable +// #define USE_MULTIPLE_COPY +// OvG: MULTICOPY fails to update scaled display on initial drawing - so disable void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintDisplacement *pcConstraint = - static_cast(this->getObject()); + Fem::ConstraintDisplacement* pcConstraint = + static_cast(this->getObject()); // OvG: Calculate scaled values once only float scaledwidth = WIDTH * pcConstraint->Scale.getValue(); float scaledheight = HEIGHT * pcConstraint->Scale.getValue(); @@ -109,7 +113,7 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop bool rotzFree = pcConstraint->rotzFree.getValue(); #ifdef USE_MULTIPLE_COPY - //OvG: always need access to cp for scaling + // OvG: always need access to cp for scaling SoMultipleCopy* cpx = new SoMultipleCopy(); SoMultipleCopy* cpy = new SoMultipleCopy(); SoMultipleCopy* cpz = new SoMultipleCopy(); @@ -119,22 +123,22 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop if (pShapeSep->getNumChildren() == 0) { // Set up the nodes cpx->matrix.setNum(0); - cpx->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); //OvG: Scaling + cpx->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); // OvG: Scaling cpy->matrix.setNum(0); - cpy->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); //OvG: Scaling + cpy->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); // OvG: Scaling cpz->matrix.setNum(0); - cpz->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); //OvG: Scaling + cpz->addChild((SoNode*)createDisplacement(scaledheight, scaledwidth)); // OvG: Scaling cprotx->matrix.setNum(0); - cprotx->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); //OvG: Scaling + cprotx->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); // OvG: Scaling cproty->matrix.setNum(0); - cproty->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); //OvG: Scaling + cproty->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); // OvG: Scaling cprotz->matrix.setNum(0); - cprotz->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); //OvG: Scaling + cprotz->addChild((SoNode*)createRotation(scaledheight, scaledwidth)); // OvG: Scaling pShapeSep->addChild(cpx); pShapeSep->addChild(cpy); @@ -148,8 +152,9 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop if (prop == &pcConstraint->Points) { const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); #ifdef USE_MULTIPLE_COPY @@ -188,19 +193,19 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop Gui::coinRemoveAllChildren(pShapeSep); #endif - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); - SbVec3f dirx(1, 0, 0); //OvG: Make relevant to global axes - SbVec3f diry(0, 1, 0); //OvG: Make relevant to global axes - SbVec3f dirz(0, 0, 1); //OvG: Make relevant to global axes - SbRotation rotx(SbVec3f(0, -1, 0), dirx);//OvG Tri-cones + SbVec3f dirx(1, 0, 0); // OvG: Make relevant to global axes + SbVec3f diry(0, 1, 0); // OvG: Make relevant to global axes + SbVec3f dirz(0, 0, 1); // OvG: Make relevant to global axes + SbRotation rotx(SbVec3f(0, -1, 0), dirx); // OvG Tri-cones SbRotation roty(SbVec3f(0, -1, 0), diry); SbRotation rotz(SbVec3f(0, -1, 0), dirz); #ifdef USE_MULTIPLE_COPY SbMatrix mx; SbMatrix my; SbMatrix mz; - //OvG: Translation indication + // OvG: Translation indication if (!xFree) { SbMatrix mx; mx.setTransform(base, rotx, SbVec3f(1, 1, 1)); @@ -220,7 +225,7 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop idz++; } - //OvG: Rotation indication + // OvG: Rotation indication if (!rotxFree) { SbMatrix mrotx; mrotx.setTransform(base, rotx, SbVec3f(1, 1, 1)); @@ -240,43 +245,43 @@ void ViewProviderFemConstraintDisplacement::updateData(const App::Property* prop idrotz++; } #else - //OvG: Translation indication + // OvG: Translation indication if (!xFree) { - SoSeparator *sepx = new SoSeparator(); + SoSeparator* sepx = new SoSeparator(); createPlacement(sepx, base, rotx); - createDisplacement(sepx, scaledheight, scaledwidth);//OvG: Scaling + createDisplacement(sepx, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sepx); } if (!yFree) { - SoSeparator *sepy = new SoSeparator(); + SoSeparator* sepy = new SoSeparator(); createPlacement(sepy, base, roty); - createDisplacement(sepy, scaledheight, scaledwidth);//OvG: Scaling + createDisplacement(sepy, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sepy); } if (!zFree) { - SoSeparator *sepz = new SoSeparator(); + SoSeparator* sepz = new SoSeparator(); createPlacement(sepz, base, rotz); - createDisplacement(sepz, scaledheight, scaledwidth);//OvG: Scaling + createDisplacement(sepz, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sepz); } - //OvG: Rotation indication + // OvG: Rotation indication if (!rotxFree) { - SoSeparator *sepx = new SoSeparator(); + SoSeparator* sepx = new SoSeparator(); createPlacement(sepx, base, rotx); - createRotation(sepx, scaledheight, scaledwidth);//OvG: Scaling + createRotation(sepx, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sepx); } if (!rotyFree) { - SoSeparator *sepy = new SoSeparator(); + SoSeparator* sepy = new SoSeparator(); createPlacement(sepy, base, roty); - createRotation(sepy, scaledheight, scaledwidth);//OvG: Scaling + createRotation(sepy, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sepy); } if (!rotzFree) { - SoSeparator *sepz = new SoSeparator(); + SoSeparator* sepz = new SoSeparator(); createPlacement(sepz, base, rotz); - createRotation(sepz, scaledheight, scaledwidth);//OvG: Scaling + createRotation(sepz, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sepz); } #endif diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.h index f2935093c6..4d02516a96 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintDisplacement.h @@ -28,9 +28,11 @@ #include "ViewProviderFemConstraintOnBoundary.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintDisplacement : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintDisplacement + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintDisplacement); @@ -43,6 +45,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTDISPLACEMENT_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTDISPLACEMENT_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp index 3b661afb86..3a3ebcaa11 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.cpp @@ -24,18 +24,18 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif -#include #include "Gui/Control.h" +#include -#include "ViewProviderFemConstraintFixed.h" #include "TaskFemConstraintFixed.h" +#include "ViewProviderFemConstraintFixed.h" using namespace FemGui; @@ -52,14 +52,15 @@ ViewProviderFemConstraintFixed::~ViewProviderFemConstraintFixed() = default; bool ViewProviderFemConstraintFixed::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintFixed *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintFixed* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { // This case will occur in the ShaftWizard application checkForWizard(); @@ -71,15 +72,19 @@ bool ViewProviderFemConstraintFixed::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; - } else if (constraintDialog) { + } + } + else if (constraintDialog) { // Another FemConstraint* dialog is already open inside the Shaft Wizard // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintFixed(this); return true; } @@ -89,35 +94,40 @@ bool ViewProviderFemConstraintFixed::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintFixed(this)); + } return true; - } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + } + else { + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define WIDTH (2) #define HEIGHT (1) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - +// so disable void ViewProviderFemConstraintFixed::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintFixed *pcConstraint = static_cast(this->getObject()); - float scaledwidth = WIDTH * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + Fem::ConstraintFixed* pcConstraint = static_cast(this->getObject()); + float scaledwidth = + WIDTH * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledheight = HEIGHT * pcConstraint->Scale.getValue(); #ifdef USE_MULTIPLE_COPY - //OvG: always need access to cp for scaling + // OvG: always need access to cp for scaling SoMultipleCopy* cp = new SoMultipleCopy(); if (pShapeSep->getNumChildren() == 0) { // Set up the nodes cp->matrix.setNum(0); - cp->addChild((SoNode*)createFixed(scaledheight, scaledwidth)); //OvG: Scaling + cp->addChild((SoNode*)createFixed(scaledheight, scaledwidth)); // OvG: Scaling pShapeSep->addChild(cp); } #endif @@ -125,8 +135,9 @@ void ViewProviderFemConstraintFixed::updateData(const App::Property* prop) if (prop == &pcConstraint->Points) { const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); #ifdef USE_MULTIPLE_COPY @@ -139,7 +150,7 @@ void ViewProviderFemConstraintFixed::updateData(const App::Property* prop) Gui::coinRemoveAllChildren(pShapeSep); #endif - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); SbVec3f dir(n->x, n->y, n->z); SbRotation rot(SbVec3f(0, -1, 0), dir); @@ -151,7 +162,7 @@ void ViewProviderFemConstraintFixed::updateData(const App::Property* prop) #else SoSeparator* sep = new SoSeparator(); createPlacement(sep, base, rot); - createFixed(sep, scaledheight, scaledwidth); //OvG: Scaling + createFixed(sep, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sep); #endif n++; diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.h index ad32899fc3..9eafbcdafb 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintFixed.h @@ -30,7 +30,8 @@ namespace FemGui { -class FemGuiExport ViewProviderFemConstraintFixed : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintFixed + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintFixed); @@ -45,7 +46,7 @@ protected: bool setEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTFIXED_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTFIXED_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.cpp index c3035cc3b6..dc8fe2dd2a 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.cpp @@ -24,24 +24,25 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif -#include #include "Gui/Control.h" +#include -#include "ViewProviderFemConstraintFluidBoundary.h" #include "TaskFemConstraintFluidBoundary.h" +#include "ViewProviderFemConstraintFluidBoundary.h" using namespace FemGui; -PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintFluidBoundary, FemGui::ViewProviderFemConstraintOnBoundary) +PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintFluidBoundary, + FemGui::ViewProviderFemConstraintOnBoundary) ViewProviderFemConstraintFluidBoundary::ViewProviderFemConstraintFluidBoundary() @@ -53,14 +54,15 @@ ViewProviderFemConstraintFluidBoundary::~ViewProviderFemConstraintFluidBoundary( bool ViewProviderFemConstraintFluidBoundary::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint, // object unsets and sets its edit mode without closing the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintFluidBoundary *constrDlg = - qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintFluidBoundary* constrDlg = + qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { // This case will occur in the ShaftWizard application checkForWizard(); @@ -72,15 +74,19 @@ bool ViewProviderFemConstraintFluidBoundary::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; - } else if (constraintDialog) { + } + } + else if (constraintDialog) { // Another FemConstraint* dialog is already open inside the Shaft Wizard // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintFluidBoundary(this); return true; } @@ -90,57 +96,68 @@ bool ViewProviderFemConstraintFluidBoundary::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintFluidBoundary(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } -//Rendering: Combination of ConstraintFixed and ConstraintForce +// Rendering: Combination of ConstraintFixed and ConstraintForce #define ARROWLENGTH (4) #define ARROWHEADRADIUS (ARROWLENGTH / 3.0f) #define WIDTH (2) #define HEIGHT (1) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - +// so disable void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintFluidBoundary* pcConstraint = static_cast(this->getObject()); - float scaledwidth = WIDTH * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + Fem::ConstraintFluidBoundary* pcConstraint = + static_cast(this->getObject()); + float scaledwidth = + WIDTH * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledheight = HEIGHT * pcConstraint->Scale.getValue(); - float scaledheadradius = ARROWHEADRADIUS * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + float scaledheadradius = + ARROWHEADRADIUS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledlength = ARROWLENGTH * pcConstraint->Scale.getValue(); std::string boundaryType = pcConstraint->BoundaryType.getValueAsString(); if (prop == &pcConstraint->BoundaryType) { - if (boundaryType == "wall") + if (boundaryType == "wall") { FaceColor.setValue(0.0, 1.0, 1.0); - else if (boundaryType == "interface") + } + else if (boundaryType == "interface") { FaceColor.setValue(0.0, 1.0, 0.0); - else if (boundaryType == "freestream") + } + else if (boundaryType == "freestream") { FaceColor.setValue(1.0, 1.0, 0.0); - else if (boundaryType == "inlet") + } + else if (boundaryType == "inlet") { FaceColor.setValue(1.0, 0.0, 0.0); - else //(boundaryType == "outlet") + } + else { //(boundaryType == "outlet") FaceColor.setValue(0.0, 0.0, 1.0); + } } - if (boundaryType == "inlet" || boundaryType == "outlet"){ + if (boundaryType == "inlet" || boundaryType == "outlet") { #ifdef USE_MULTIPLE_COPY - //OvG: need access to cp for scaling + // OvG: need access to cp for scaling SoMultipleCopy* cp = new SoMultipleCopy(); if (pShapeSep->getNumChildren() == 0) { // Set up the nodes cp->matrix.setNum(0); - cp->addChild((SoNode*)createArrow(scaledlength , scaledheadradius)); //OvG: Scaling + cp->addChild((SoNode*)createArrow(scaledlength, scaledheadradius)); // OvG: Scaling pShapeSep->addChild(cp); } #endif @@ -162,25 +179,28 @@ void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* pro // Get default direction (on first call to method) Base::Vector3d forceDirection = pcConstraint->DirectionVector.getValue(); - if (forceDirection.Length() < Precision::Confusion()) + if (forceDirection.Length() < Precision::Confusion()) { forceDirection = normal; + } SbVec3f dir(forceDirection.x, forceDirection.y, forceDirection.z); SbRotation rot(SbVec3f(0, 1, 0), dir); - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); - if (forceDirection.GetAngle(normal) < M_PI_2) // Move arrow so it doesn't disappear inside the solid - base = base + dir * scaledlength; //OvG: Scaling + if (forceDirection.GetAngle(normal) + < M_PI_2) { // Move arrow so it doesn't disappear inside the solid + base = base + dir * scaledlength; // OvG: Scaling + } #ifdef USE_MULTIPLE_COPY SbMatrix m; - m.setTransform(base, rot, SbVec3f(1,1,1)); + m.setTransform(base, rot, SbVec3f(1, 1, 1)); matrices[idx] = m; idx++; #else SoSeparator* sep = new SoSeparator(); createPlacement(sep, base, rot); - createArrow(sep, scaledlength, scaledheadradius); //OvG: Scaling + createArrow(sep, scaledlength, scaledheadradius); // OvG: Scaling pShapeSep->addChild(sep); #endif } @@ -195,8 +215,9 @@ void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* pro Base::Vector3d forceDirection = pcConstraint->DirectionVector.getValue(); if (forceDirection.Length() < Precision::Confusion()) { forceDirection = normal; - if (boundaryType == "inlet") - forceDirection = - normal; + if (boundaryType == "inlet") { + forceDirection = -normal; + } } SbVec3f dir(forceDirection.x, forceDirection.y, forceDirection.z); @@ -211,10 +232,11 @@ void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* pro #endif int idx = 0; - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); - if (forceDirection.GetAngle(normal) < M_PI_2) - base = base + dir * scaledlength; //OvG: Scaling + if (forceDirection.GetAngle(normal) < M_PI_2) { + base = base + dir * scaledlength; // OvG: Scaling + } #ifdef USE_MULTIPLE_COPY SbMatrix m; m.setTransform(base, rot, SbVec3f(1, 1, 1)); @@ -222,7 +244,7 @@ void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* pro #else SoSeparator* sep = static_cast(pShapeSep->getChild(idx)); updatePlacement(sep, 0, base, rot); - updateArrow(sep, 2, scaledlength, scaledheadradius); //OvG: Scaling + updateArrow(sep, 2, scaledlength, scaledheadradius); // OvG: Scaling #endif idx++; } @@ -231,15 +253,15 @@ void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* pro #endif } } - else{// not inlet or outlet boundary type + else { // not inlet or outlet boundary type #ifdef USE_MULTIPLE_COPY - //OvG: always need access to cp for scaling + // OvG: always need access to cp for scaling SoMultipleCopy* cp = new SoMultipleCopy(); if (pShapeSep->getNumChildren() == 0) { // Set up the nodes cp->matrix.setNum(0); - cp->addChild((SoNode*)createFixed(scaledheight, scaledwidth)); //OvG: Scaling + cp->addChild((SoNode*)createFixed(scaledheight, scaledwidth)); // OvG: Scaling pShapeSep->addChild(cp); } #endif @@ -247,8 +269,9 @@ void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* pro if (prop == &pcConstraint->Points) { const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); #ifdef USE_MULTIPLE_COPY @@ -261,19 +284,19 @@ void ViewProviderFemConstraintFluidBoundary::updateData(const App::Property* pro Gui::coinRemoveAllChildren(pShapeSep); #endif - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); SbVec3f dir(n->x, n->y, n->z); SbRotation rot(SbVec3f(0, -1, 0), dir); #ifdef USE_MULTIPLE_COPY SbMatrix m; - m.setTransform(base, rot, SbVec3f(1,1,1)); + m.setTransform(base, rot, SbVec3f(1, 1, 1)); matrices[idx] = m; idx++; #else SoSeparator* sep = new SoSeparator(); createPlacement(sep, base, rot); - createFixed(sep, scaledheight, scaledwidth); //OvG: Scaling + createFixed(sep, scaledheight, scaledwidth); // OvG: Scaling pShapeSep->addChild(sep); #endif n++; diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.h index b33f3439bf..31e4100bb6 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintFluidBoundary.h @@ -30,7 +30,8 @@ namespace FemGui { -class FemGuiExport ViewProviderFemConstraintFluidBoundary : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintFluidBoundary + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintFluidBoundary); @@ -40,12 +41,12 @@ public: ~ViewProviderFemConstraintFluidBoundary() override; void updateData(const App::Property*) override; - //virtual void onChanged(const App::Property*); //no further property for viewProvider + // virtual void onChanged(const App::Property*); //no further property for viewProvider protected: bool setEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMConstraintFluidBoundary_H +#endif // GUI_VIEWPROVIDERFEMConstraintFluidBoundary_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp index 7749c039e2..d6614dbbc0 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.cpp @@ -24,19 +24,19 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif -#include #include "Gui/Control.h" +#include -#include "ViewProviderFemConstraintForce.h" #include "TaskFemConstraintForce.h" +#include "ViewProviderFemConstraintForce.h" using namespace FemGui; @@ -53,14 +53,15 @@ ViewProviderFemConstraintForce::~ViewProviderFemConstraintForce() = default; bool ViewProviderFemConstraintForce::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintForce *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintForce* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { // This case will occur in the ShaftWizard application checkForWizard(); @@ -72,15 +73,19 @@ bool ViewProviderFemConstraintForce::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; - } else if (constraintDialog) { + } + } + else if (constraintDialog) { // Another FemConstraint* dialog is already open inside the Shaft Wizard // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintForce(this); return true; } @@ -90,36 +95,40 @@ bool ViewProviderFemConstraintForce::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintForce(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define ARROWLENGTH (4) #define ARROWHEADRADIUS (ARROWLENGTH / 3.0f) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so +// disable void ViewProviderFemConstraintForce::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes Fem::ConstraintForce* pcConstraint = static_cast(this->getObject()); - float scaledheadradius = ARROWHEADRADIUS * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + float scaledheadradius = + ARROWHEADRADIUS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledlength = ARROWLENGTH * pcConstraint->Scale.getValue(); #ifdef USE_MULTIPLE_COPY - //OvG: need access to cp for scaling + // OvG: need access to cp for scaling SoMultipleCopy* cp = new SoMultipleCopy(); if (pShapeSep->getNumChildren() == 0) { // Set up the nodes cp->matrix.setNum(0); - cp->addChild((SoNode*)createArrow(scaledlength , scaledheadradius)); //OvG: Scaling + cp->addChild((SoNode*)createArrow(scaledlength, scaledheadradius)); // OvG: Scaling pShapeSep->addChild(cp); } #endif @@ -141,17 +150,19 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop) // Get default direction (on first call to method) Base::Vector3d forceDirection = pcConstraint->DirectionVector.getValue(); - if (forceDirection.Length() < Precision::Confusion()) + if (forceDirection.Length() < Precision::Confusion()) { forceDirection = normal; + } SbVec3f dir(forceDirection.x, forceDirection.y, forceDirection.z); - SbRotation rot(SbVec3f(0,1,0), dir); + SbRotation rot(SbVec3f(0, 1, 0), dir); - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); if (forceDirection.GetAngle(normal) - < M_PI_2)// Move arrow so it doesn't disappear inside the solid - base = base + dir * scaledlength; //OvG: Scaling + < M_PI_2) { // Move arrow so it doesn't disappear inside the solid + base = base + dir * scaledlength; // OvG: Scaling + } #ifdef USE_MULTIPLE_COPY SbMatrix m; m.setTransform(base, rot, SbVec3f(1, 1, 1)); @@ -160,7 +171,7 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop) #else SoSeparator* sep = new SoSeparator(); createPlacement(sep, base, rot); - createArrow(sep, scaledlength, scaledheadradius); //OvG: Scaling + createArrow(sep, scaledlength, scaledheadradius); // OvG: Scaling pShapeSep->addChild(sep); #endif } @@ -173,8 +184,9 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop) // Re-orient all arrows Base::Vector3d normal = pcConstraint->NormalDirection.getValue(); Base::Vector3d forceDirection = pcConstraint->DirectionVector.getValue(); - if (forceDirection.Length() < Precision::Confusion()) + if (forceDirection.Length() < Precision::Confusion()) { forceDirection = normal; + } SbVec3f dir(forceDirection.x, forceDirection.y, forceDirection.z); SbRotation rot(SbVec3f(0, 1, 0), dir); @@ -188,10 +200,11 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop) #endif int idx = 0; - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); - if (forceDirection.GetAngle(normal) < M_PI_2) - base = base + dir * scaledlength; //OvG: Scaling + if (forceDirection.GetAngle(normal) < M_PI_2) { + base = base + dir * scaledlength; // OvG: Scaling + } #ifdef USE_MULTIPLE_COPY SbMatrix m; m.setTransform(base, rot, SbVec3f(1, 1, 1)); @@ -199,7 +212,7 @@ void ViewProviderFemConstraintForce::updateData(const App::Property* prop) #else SoSeparator* sep = static_cast(pShapeSep->getChild(idx)); updatePlacement(sep, 0, base, rot); - updateArrow(sep, 2, scaledlength, scaledheadradius); //OvG: Scaling + updateArrow(sep, 2, scaledlength, scaledheadradius); // OvG: Scaling #endif idx++; } diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.h index da72e2c6c5..8008780a93 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintForce.h @@ -30,7 +30,8 @@ namespace FemGui { -class FemGuiExport ViewProviderFemConstraintForce : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintForce + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintForce); @@ -49,7 +50,7 @@ private: Base::Vector3f forceDirection; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTFORCE_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTFORCE_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp index 48624fa391..e0f860f73f 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp @@ -24,20 +24,20 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif -#include #include "Gui/Control.h" +#include #include -#include "ViewProviderFemConstraintGear.h" #include "TaskFemConstraintGear.h" +#include "ViewProviderFemConstraintGear.h" using namespace FemGui; @@ -54,14 +54,15 @@ ViewProviderFemConstraintGear::~ViewProviderFemConstraintGear() = default; bool ViewProviderFemConstraintGear::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintGear *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintGear* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { // This case will occur in the ShaftWizard application checkForWizard(); @@ -73,15 +74,19 @@ bool ViewProviderFemConstraintGear::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; - } else if (constraintDialog) { + } + } + else if (constraintDialog) { // Another FemConstraint* dialog is already open inside the Shaft Wizard // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintGear(this); return true; } @@ -91,15 +96,17 @@ bool ViewProviderFemConstraintGear::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintGear(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } @@ -116,54 +123,67 @@ void ViewProviderFemConstraintGear::updateData(const App::Property* prop) Base::Vector3d base = pcConstraint->BasePoint.getValue(); Base::Vector3d axis = pcConstraint->Axis.getValue(); Base::Vector3d direction = pcConstraint->DirectionVector.getValue(); - if (direction.Length() < Precision::Confusion()) + if (direction.Length() < Precision::Confusion()) { direction = Base::Vector3d(0, 1, 0); + } double radius = pcConstraint->Radius.getValue(); double dia = pcConstraint->Diameter.getValue(); - if (dia < 2 * radius) + if (dia < 2 * radius) { dia = 2 * radius; + } double angle = pcConstraint->ForceAngle.getValue() / 180 * M_PI; SbVec3f b(base.x, base.y, base.z); SbVec3f ax(axis.x, axis.y, axis.z); SbVec3f dir(direction.x, direction.y, direction.z); - //Base::Console().Error("DirectionVector: %f, %f, %f\n", direction.x, direction.y, direction.z); + // Base::Console().Error("DirectionVector: %f, %f, %f\n", direction.x, direction.y, + // direction.z); - createPlacement(pShapeSep, b, SbRotation(SbVec3f(0,1,0), ax)); - pShapeSep->addChild(createCylinder(pcConstraint->Height.getValue() * 0.8, dia/2)); - createPlacement(pShapeSep, SbVec3f(dia/2 * sin(angle), 0, dia/2 * cos(angle)), SbRotation(ax, dir)); - pShapeSep->addChild(createArrow(dia/2, dia/8)); + createPlacement(pShapeSep, b, SbRotation(SbVec3f(0, 1, 0), ax)); + pShapeSep->addChild(createCylinder(pcConstraint->Height.getValue() * 0.8, dia / 2)); + createPlacement(pShapeSep, + SbVec3f(dia / 2 * sin(angle), 0, dia / 2 * cos(angle)), + SbRotation(ax, dir)); + pShapeSep->addChild(createArrow(dia / 2, dia / 8)); } - } else if (prop == &pcConstraint->Diameter) { + } + else if (prop == &pcConstraint->Diameter) { if (pShapeSep->getNumChildren() > 0) { // Change the symbol Base::Vector3d axis = pcConstraint->Axis.getValue(); Base::Vector3d direction = pcConstraint->DirectionVector.getValue(); - if (direction.Length() < Precision::Confusion()) + if (direction.Length() < Precision::Confusion()) { direction = Base::Vector3d(0, 1, 0); + } double dia = pcConstraint->Diameter.getValue(); double radius = pcConstraint->Radius.getValue(); - if (dia < 2 * radius) + if (dia < 2 * radius) { dia = 2 * radius; + } double angle = pcConstraint->ForceAngle.getValue() / 180 * M_PI; SbVec3f ax(axis.x, axis.y, axis.z); SbVec3f dir(direction.x, direction.y, direction.z); const SoSeparator* sep = static_cast(pShapeSep->getChild(2)); - updateCylinder(sep, 0, pcConstraint->Height.getValue() * 0.8, dia/2); - updatePlacement(pShapeSep, 3, SbVec3f(dia/2 * sin(angle), 0, dia/2 * cos(angle)), SbRotation(ax, dir)); + updateCylinder(sep, 0, pcConstraint->Height.getValue() * 0.8, dia / 2); + updatePlacement(pShapeSep, + 3, + SbVec3f(dia / 2 * sin(angle), 0, dia / 2 * cos(angle)), + SbRotation(ax, dir)); sep = static_cast(pShapeSep->getChild(5)); - updateArrow(sep, 0, dia/2, dia/8); + updateArrow(sep, 0, dia / 2, dia / 8); } - } else if ((prop == &pcConstraint->DirectionVector) || (prop == &pcConstraint->ForceAngle)) { + } + else if ((prop == &pcConstraint->DirectionVector) || (prop == &pcConstraint->ForceAngle)) { // Note: "Reversed" also triggers "DirectionVector" if (pShapeSep->getNumChildren() > 0) { // Re-orient the symbol Base::Vector3d axis = pcConstraint->Axis.getValue(); Base::Vector3d direction = pcConstraint->DirectionVector.getValue(); - if (direction.Length() < Precision::Confusion()) - direction = Base::Vector3d(0,1,0); + if (direction.Length() < Precision::Confusion()) { + direction = Base::Vector3d(0, 1, 0); + } double dia = pcConstraint->Diameter.getValue(); double angle = pcConstraint->ForceAngle.getValue() / 180 * M_PI; @@ -179,10 +199,14 @@ void ViewProviderFemConstraintGear::updateData(const App::Property* prop) Base::Console().Error("Matrix: %f, %f, %f, %f\n", m[0][0], m[1][0], m[2][0], m[3][0]); // Note: In spite of the fact that the rotation matrix takes on 3 different values if 3 // normal directions are chosen, the resulting arrow will only point in two different - // directions when ax = (1,0,0) (but for ax=(0,1,0) it points in 3 different directions!) + // directions when ax = (1,0,0) (but for ax=(0,1,0) it points in 3 different + directions!) */ - updatePlacement(pShapeSep, 3, SbVec3f(dia/2 * sin(angle), 0, dia/2 * cos(angle)), SbRotation(ax, dir)); + updatePlacement(pShapeSep, + 3, + SbVec3f(dia / 2 * sin(angle), 0, dia / 2 * cos(angle)), + SbRotation(ax, dir)); } } diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.h index 1656034bcd..d5ee8f8f62 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.h @@ -30,7 +30,7 @@ namespace FemGui { -class FemGuiExport ViewProviderFemConstraintGear : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintGear: public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintGear); @@ -45,7 +45,7 @@ protected: bool setEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTGear_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTGear_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.cpp index f4592da203..f876fc5e82 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.cpp @@ -26,24 +26,25 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif -#include #include "Mod/Fem/App/FemConstraintHeatflux.h" +#include -#include "ViewProviderFemConstraintHeatflux.h" #include "TaskFemConstraintHeatflux.h" +#include "ViewProviderFemConstraintHeatflux.h" using namespace FemGui; -PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintHeatflux, FemGui::ViewProviderFemConstraintOnBoundary) +PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintHeatflux, + FemGui::ViewProviderFemConstraintOnBoundary) ViewProviderFemConstraintHeatflux::ViewProviderFemConstraintHeatflux() { @@ -53,22 +54,24 @@ ViewProviderFemConstraintHeatflux::ViewProviderFemConstraintHeatflux() ViewProviderFemConstraintHeatflux::~ViewProviderFemConstraintHeatflux() = default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintHeatflux::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintHeatflux *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintHeatflux* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintHeatflux(this); return true; } @@ -78,100 +81,107 @@ bool ViewProviderFemConstraintHeatflux::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintHeatflux(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define HEIGHT (1.5) #define RADIUS (0.3) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - +// so disable void ViewProviderFemConstraintHeatflux::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintHeatflux* pcConstraint = static_cast(this->getObject()); - float scaledradius = RADIUS * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + Fem::ConstraintHeatflux* pcConstraint = + static_cast(this->getObject()); + float scaledradius = + RADIUS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledheight = HEIGHT * pcConstraint->Scale.getValue(); - //float ambienttemp = pcConstraint->AmbientTemp.getValue(); - // //float facetemp = pcConstraint->FaceTemp.getValue(); - //float filmcoef = pcConstraint->FilmCoef.getValue(); + // float ambienttemp = pcConstraint->AmbientTemp.getValue(); + // //float facetemp = pcConstraint->FaceTemp.getValue(); + // float filmcoef = pcConstraint->FilmCoef.getValue(); if (prop == &pcConstraint->Points) { const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); // Note: Points and Normals are always updated together Gui::coinRemoveAllChildren(pShapeSep); - for (const auto & point : points) { - //Define base and normal directions + for (const auto& point : points) { + // Define base and normal directions SbVec3f base(point.x, point.y, point.z); - SbVec3f dir(n->x, n->y, n->z);//normal + SbVec3f dir(n->x, n->y, n->z); // normal - ///Temperature indication - //define separator + /// Temperature indication + // define separator SoSeparator* sep = new SoSeparator(); - ///draw a temp gauge,with sphere and a cylinder - //first move to correct position - SoTranslation *trans = new SoTranslation(); + /// draw a temp gauge,with sphere and a cylinder + // first move to correct position + SoTranslation* trans = new SoTranslation(); SbVec3f newPos = base + scaledradius * dir * 0.7f; trans->translation.setValue(newPos); sep->addChild(trans); - //adjust orientation - SoRotation *rot = new SoRotation(); + // adjust orientation + SoRotation* rot = new SoRotation(); rot->rotation.setValue(SbRotation(SbVec3f(0, 1, 0), dir)); sep->addChild(rot); - //define color of shape - SoMaterial *myMaterial = new SoMaterial; - myMaterial->diffuseColor.set1Value(0, SbColor(0.65f, 0.1f, 0.25f));//RGB - //myMaterial->diffuseColor.set1Value(1,SbColor(.1,.1,.1));//possible to adjust sides separately + // define color of shape + SoMaterial* myMaterial = new SoMaterial; + myMaterial->diffuseColor.set1Value(0, SbColor(0.65f, 0.1f, 0.25f)); // RGB + // myMaterial->diffuseColor.set1Value(1,SbColor(.1,.1,.1));//possible to adjust sides + // separately sep->addChild(myMaterial); - //draw a sphere - SoSphere *sph = new SoSphere(); + // draw a sphere + SoSphere* sph = new SoSphere(); sph->radius.setValue(scaledradius * 0.75); sep->addChild(sph); - //translate position - SoTranslation *trans2 = new SoTranslation(); + // translate position + SoTranslation* trans2 = new SoTranslation(); trans2->translation.setValue(SbVec3f(0, scaledheight * 0.375, 0)); sep->addChild(trans2); - //draw a cylinder - SoCylinder *cyl = new SoCylinder(); + // draw a cylinder + SoCylinder* cyl = new SoCylinder(); cyl->height.setValue(scaledheight * 0.5); cyl->radius.setValue(scaledradius * 0.375); sep->addChild(cyl); - //translate position - SoTranslation *trans3 = new SoTranslation(); + // translate position + SoTranslation* trans3 = new SoTranslation(); trans3->translation.setValue(SbVec3f(0, scaledheight * 0.375, 0)); sep->addChild(trans3); - //define color of shape - SoMaterial *myMaterial2 = new SoMaterial; - myMaterial2->diffuseColor.set1Value(0, SbColor(1, 1, 1));//RGB + // define color of shape + SoMaterial* myMaterial2 = new SoMaterial; + myMaterial2->diffuseColor.set1Value(0, SbColor(1, 1, 1)); // RGB sep->addChild(myMaterial2); - //draw a cylinder - SoCylinder *cyl2 = new SoCylinder(); + // draw a cylinder + SoCylinder* cyl2 = new SoCylinder(); cyl2->height.setValue(scaledheight * 0.25); cyl2->radius.setValue(scaledradius * 0.375); sep->addChild(cyl2); - //translate position - SoTranslation *trans4 = new SoTranslation(); + // translate position + SoTranslation* trans4 = new SoTranslation(); trans4->translation.setValue(SbVec3f(0, -scaledheight * 0.375, 0)); sep->addChild(trans4); - //draw a cylinder - SoCylinder *cyl3 = new SoCylinder(); + // draw a cylinder + SoCylinder* cyl3 = new SoCylinder(); cyl3->height.setValue(scaledheight * 0.05); cyl3->radius.setValue(scaledradius * 1); sep->addChild(cyl3); diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.h index cf8bb01742..2dc2724638 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintHeatflux.h @@ -28,9 +28,11 @@ #include "ViewProviderFemConstraintOnBoundary.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintHeatflux : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintHeatflux + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintHeatflux); @@ -43,6 +45,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTHEATFLUX_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTHEATFLUX_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.cpp index d5a9a072d5..46018961e3 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.cpp @@ -25,16 +25,17 @@ #include "PreCompiled.h" -#include #include "Mod/Fem/App/FemConstraintInitialTemperature.h" +#include -#include "ViewProviderFemConstraintInitialTemperature.h" #include "TaskFemConstraintInitialTemperature.h" +#include "ViewProviderFemConstraintInitialTemperature.h" using namespace FemGui; -PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintInitialTemperature, FemGui::ViewProviderFemConstraint) +PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintInitialTemperature, + FemGui::ViewProviderFemConstraint) ViewProviderFemConstraintInitialTemperature::ViewProviderFemConstraintInitialTemperature() { @@ -42,25 +43,28 @@ ViewProviderFemConstraintInitialTemperature::ViewProviderFemConstraintInitialTem ADD_PROPERTY(FaceColor, (0.2f, 0.3f, 0.2f)); } -ViewProviderFemConstraintInitialTemperature::~ViewProviderFemConstraintInitialTemperature() = default; +ViewProviderFemConstraintInitialTemperature::~ViewProviderFemConstraintInitialTemperature() = + default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintInitialTemperature::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintInitialTemperature *constrDlg = - qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintInitialTemperature* constrDlg = + qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintInitialTemperature(this); return true; } @@ -70,14 +74,16 @@ bool ViewProviderFemConstraintInitialTemperature::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintInitialTemperature(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.h index b80a2b3097..f30a62666e 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintInitialTemperature.h @@ -28,9 +28,11 @@ #include "ViewProviderFemConstraint.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintInitialTemperature : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintInitialTemperature + : public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintInitialTemperature); @@ -43,6 +45,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTInitialTemperature_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTInitialTemperature_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.cpp index 90bf634ce6..30a09fb79d 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.cpp @@ -23,13 +23,13 @@ #include "PreCompiled.h" -#include #include "Mod/Fem/App/FemConstraint.h" +#include #include #include -#include "ViewProviderFemConstraintOnBoundary.h" #include "TaskFemConstraintOnBoundary.h" +#include "ViewProviderFemConstraintOnBoundary.h" using namespace FemGui; @@ -47,10 +47,14 @@ void ViewProviderFemConstraintOnBoundary::highlightReferences(const bool on) for (auto& subSet : subSets) { Part::Feature* base = dynamic_cast(subSet.first); - if (!base) continue; + if (!base) { + continue; + } PartGui::ViewProviderPart* vp = dynamic_cast( Gui::Application::Instance->getViewProvider(base)); - if (!vp) continue; + if (!vp) { + continue; + } // if somehow the subnames are empty, clear any existing colors if (on && !subSet.second.empty()) { @@ -59,40 +63,46 @@ void ViewProviderFemConstraintOnBoundary::highlightReferences(const bool on) // It is a requirement but we should keep safeguards. if (subSet.second[0].find("Vertex") != std::string::npos) { // make sure original colors are remembered - if (originalPointColors[base].empty()) + if (originalPointColors[base].empty()) { originalPointColors[base] = vp->PointColorArray.getValues(); + } std::vector colors = originalPointColors[base]; // go through the subelements with constraint and recolor them // TODO: Replace `ShapeColor` with anything more appropriate - PartGui::ReferenceHighlighter highlighter( - base->Shape.getValue(), colors.empty() ? ShapeColor.getValue() : colors[0]); + PartGui::ReferenceHighlighter highlighter(base->Shape.getValue(), + colors.empty() ? ShapeColor.getValue() + : colors[0]); highlighter.getVertexColors(subSet.second, colors); vp->PointColorArray.setValues(colors); } else if (subSet.second[0].find("Edge") != std::string::npos) { // make sure original colors are remembered - if (originalLineColors[base].empty()) + if (originalLineColors[base].empty()) { originalLineColors[base] = vp->LineColorArray.getValues(); + } std::vector colors = originalLineColors[base]; // go through the subelements with constraint and recolor them // TODO: Replace `ShapeColor` with anything more appropriate - PartGui::ReferenceHighlighter highlighter( - base->Shape.getValue(), colors.empty() ? ShapeColor.getValue() : colors[0]); + PartGui::ReferenceHighlighter highlighter(base->Shape.getValue(), + colors.empty() ? ShapeColor.getValue() + : colors[0]); highlighter.getEdgeColors(subSet.second, colors); vp->LineColorArray.setValues(colors); } else if (subSet.second[0].find("Face") != std::string::npos) { // make sure original colors are remembered - if (originalFaceColors[base].empty()) + if (originalFaceColors[base].empty()) { originalFaceColors[base] = vp->DiffuseColor.getValues(); + } std::vector colors = originalFaceColors[base]; // go through the subelements with constraint and recolor them // TODO: Replace `FaceColor` with anything more appropriate - PartGui::ReferenceHighlighter highlighter( - base->Shape.getValue(), colors.empty() ? FaceColor.getValue() : colors[0]); + PartGui::ReferenceHighlighter highlighter(base->Shape.getValue(), + colors.empty() ? FaceColor.getValue() + : colors[0]); highlighter.getFaceColors(subSet.second, colors); vp->DiffuseColor.setValues(colors); } @@ -117,34 +127,45 @@ void ViewProviderFemConstraintOnBoundary::highlightReferences(const bool on) // there is nothing selected but previous selection may have highlighting // reset that highlighting here for (auto& ogPair : originalPointColors) { - if (ogPair.second.empty()) continue; + if (ogPair.second.empty()) { + continue; + } PartGui::ViewProviderPart* vp = dynamic_cast( Gui::Application::Instance->getViewProvider(ogPair.first)); - if (!vp) continue; + if (!vp) { + continue; + } vp->PointColorArray.setValues(ogPair.second); ogPair.second.clear(); } for (auto& ogPair : originalLineColors) { - if (ogPair.second.empty()) continue; + if (ogPair.second.empty()) { + continue; + } PartGui::ViewProviderPart* vp = dynamic_cast( Gui::Application::Instance->getViewProvider(ogPair.first)); - if (!vp) continue; + if (!vp) { + continue; + } vp->LineColorArray.setValues(ogPair.second); ogPair.second.clear(); } for (auto& ogPair : originalFaceColors) { - if (ogPair.second.empty()) continue; + if (ogPair.second.empty()) { + continue; + } PartGui::ViewProviderPart* vp = dynamic_cast( Gui::Application::Instance->getViewProvider(ogPair.first)); - if (!vp) continue; + if (!vp) { + continue; + } vp->DiffuseColor.setValues(ogPair.second); ogPair.second.clear(); } } } - diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.h index f4ac82f8c5..004e0e81ad 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintOnBoundary.h @@ -28,9 +28,10 @@ #include "ViewProviderFemConstraint.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintOnBoundary : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintOnBoundary: public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintOnBoundary); @@ -41,11 +42,11 @@ public: void highlightReferences(const bool on) override; private: - std::map< Part::Feature*, std::vector > originalPointColors; - std::map< Part::Feature*, std::vector > originalLineColors; - std::map< Part::Feature*, std::vector > originalFaceColors; + std::map> originalPointColors; + std::map> originalLineColors; + std::map> originalFaceColors; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTONBOUNDARY_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTONBOUNDARY_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.cpp index 9e0effc171..ea2cf874ae 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.cpp @@ -26,19 +26,19 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif -#include #include "Mod/Fem/App/FemConstraintPlaneRotation.h" +#include -#include "ViewProviderFemConstraintPlaneRotation.h" #include "TaskFemConstraintPlaneRotation.h" +#include "ViewProviderFemConstraintPlaneRotation.h" using namespace FemGui; @@ -48,29 +48,32 @@ PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintPlaneRotation, FemGui::ViewProv ViewProviderFemConstraintPlaneRotation::ViewProviderFemConstraintPlaneRotation() { sPixmap = "FEM_ConstraintPlaneRotation"; - //Note change "planerotation" in line above to new constraint name, make sure it is the same as in taskFem* cpp file + // Note change "planerotation" in line above to new constraint name, make sure it is the same as + // in taskFem* cpp file ADD_PROPERTY(FaceColor, (0.2f, 0.3f, 0.2f)); } ViewProviderFemConstraintPlaneRotation::~ViewProviderFemConstraintPlaneRotation() = default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintPlaneRotation::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintPlaneRotation *constrDlg = - qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintPlaneRotation* constrDlg = + qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintPlaneRotation(this); return true; } @@ -80,99 +83,105 @@ bool ViewProviderFemConstraintPlaneRotation::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintPlaneRotation(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define HEIGHT (0.5) #define RADIUS (5) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - +// so disable void ViewProviderFemConstraintPlaneRotation::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintPlaneRotation *pcConstraint = - static_cast(this->getObject()); - float scaledradius = RADIUS * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + Fem::ConstraintPlaneRotation* pcConstraint = + static_cast(this->getObject()); + float scaledradius = + RADIUS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledheight = HEIGHT * pcConstraint->Scale.getValue(); if (prop == &pcConstraint->Points) { const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); // Points and Normals are always updated together Gui::coinRemoveAllChildren(pShapeSep); - for (const auto & point : points) { - //Define base and normal directions + for (const auto& point : points) { + // Define base and normal directions SbVec3f base(point.x, point.y, point.z); - SbVec3f dir(n->x, n->y, n->z);//normal + SbVec3f dir(n->x, n->y, n->z); // normal - /* Note: - * This next part draws a temperature gauge in 3D to indicate the constraint visually. - * This serves as an example. Change or remove as needs be. - * It is possible to draw almost any basic 3D shape. See inventor's documentation - * This gets drawn at every point. - * */ + /* Note: + * This next part draws a temperature gauge in 3D to indicate the constraint visually. + * This serves as an example. Change or remove as needs be. + * It is possible to draw almost any basic 3D shape. See inventor's documentation + * This gets drawn at every point. + * */ - ///Visual indication - //define separator + /// Visual indication + // define separator SoSeparator* sep = new SoSeparator(); - ///draw a temp gauge,with sphere and a cylinder - //first move to correct position - SoTranslation *trans = new SoTranslation(); + /// draw a temp gauge,with sphere and a cylinder + // first move to correct position + SoTranslation* trans = new SoTranslation(); SbVec3f newPos = base + scaledradius * dir * 0.08f; trans->translation.setValue(newPos); sep->addChild(trans); - //adjust orientation - SoRotation *rot = new SoRotation(); + // adjust orientation + SoRotation* rot = new SoRotation(); rot->rotation.setValue(SbRotation(SbVec3f(1, 0, 0), dir)); sep->addChild(rot); - //define color of shape - SoMaterial *myMaterial = new SoMaterial; - myMaterial->diffuseColor.set1Value(0, SbColor(0, 1, 0)); //RGB - //myMaterial->diffuseColor.set1Value(1,SbColor(0,0,1));//possible to adjust sides separately + // define color of shape + SoMaterial* myMaterial = new SoMaterial; + myMaterial->diffuseColor.set1Value(0, SbColor(0, 1, 0)); // RGB + // myMaterial->diffuseColor.set1Value(1,SbColor(0,0,1));//possible to adjust sides + // separately sep->addChild(myMaterial); - //draw a sphere - //SoSphere* sph = new SoSphere(); - //sph->radius.setValue(scaledradius*0.75); - //sep->addChild(sph); - //translate position - //SoTranslation* trans2 = new SoTranslation(); - //trans2->translation.setValue(SbVec3f(0,scaledheight*0.375,0)); - //sep->addChild(trans2); - //draw a cylinder - SoCylinder *cyl = new SoCylinder(); + // draw a sphere + // SoSphere* sph = new SoSphere(); + // sph->radius.setValue(scaledradius*0.75); + // sep->addChild(sph); + // translate position + // SoTranslation* trans2 = new SoTranslation(); + // trans2->translation.setValue(SbVec3f(0,scaledheight*0.375,0)); + // sep->addChild(trans2); + // draw a cylinder + SoCylinder* cyl = new SoCylinder(); cyl->height.setValue(scaledheight * 0.5); cyl->radius.setValue(scaledradius * 0.375); sep->addChild(cyl); - //translate position - //SoTranslation* trans3 = new SoTranslation(); - //trans3->translation.setValue(SbVec3f(0,scaledheight*0.05,0)); - //sep->addChild(trans3); - //define color of shape - SoMaterial *myMaterial2 = new SoMaterial; - myMaterial2->diffuseColor.set1Value(0, SbColor(1, 1, 1)); //RGB + // translate position + // SoTranslation* trans3 = new SoTranslation(); + // trans3->translation.setValue(SbVec3f(0,scaledheight*0.05,0)); + // sep->addChild(trans3); + // define color of shape + SoMaterial* myMaterial2 = new SoMaterial; + myMaterial2->diffuseColor.set1Value(0, SbColor(1, 1, 1)); // RGB sep->addChild(myMaterial2); - //draw a cylinder - //SoCylinder* cyl2 = new SoCylinder(); - //cyl2->height.setValue(scaledheight*0.25); - //cyl2->radius.setValue(scaledradius*0.375); - //sep->addChild(cyl2); + // draw a cylinder + // SoCylinder* cyl2 = new SoCylinder(); + // cyl2->height.setValue(scaledheight*0.25); + // cyl2->radius.setValue(scaledradius*0.375); + // sep->addChild(cyl2); pShapeSep->addChild(sep); diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.h index 9a6579c537..e86d8472c1 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintPlaneRotation.h @@ -28,9 +28,10 @@ #include "ViewProviderFemConstraint.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintPlaneRotation : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintPlaneRotation: public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintPlaneRotation); @@ -43,6 +44,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTPLANEROTATION_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTPLANEROTATION_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.cpp index 8595a4f9a3..089edd28af 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.cpp @@ -24,22 +24,23 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif -#include #include "Mod/Fem/App/FemConstraintPressure.h" +#include -#include "ViewProviderFemConstraintPressure.h" #include "TaskFemConstraintPressure.h" +#include "ViewProviderFemConstraintPressure.h" using namespace FemGui; -PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintPressure, FemGui::ViewProviderFemConstraintOnBoundary) +PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintPressure, + FemGui::ViewProviderFemConstraintOnBoundary) ViewProviderFemConstraintPressure::ViewProviderFemConstraintPressure() { @@ -49,22 +50,24 @@ ViewProviderFemConstraintPressure::ViewProviderFemConstraintPressure() ViewProviderFemConstraintPressure::~ViewProviderFemConstraintPressure() = default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintPressure::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintPressure *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintPressure* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintPressure(this); return true; } @@ -74,36 +77,40 @@ bool ViewProviderFemConstraintPressure::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintPressure(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define ARROWLENGTH (4) -#define ARROWHEADRADIUS (ARROWLENGTH/3.0f) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so disable +#define ARROWHEADRADIUS (ARROWLENGTH / 3.0f) +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so +// disable void ViewProviderFemConstraintPressure::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintPressure *pcConstraint = - static_cast(this->getObject()); - float scaledheadradius = ARROWHEADRADIUS * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + Fem::ConstraintPressure* pcConstraint = + static_cast(this->getObject()); + float scaledheadradius = + ARROWHEADRADIUS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledlength = ARROWLENGTH * pcConstraint->Scale.getValue(); #ifdef USE_MULTIPLE_COPY - //OvG: always need access to cp for scaling + // OvG: always need access to cp for scaling SoMultipleCopy* cp = new SoMultipleCopy(); if (pShapeSep->getNumChildren() == 0) { // Set up the nodes cp->matrix.setNum(0); - cp->addChild((SoNode*)createArrow(scaledlength , scaledheadradius)); //OvG: Scaling + cp->addChild((SoNode*)createArrow(scaledlength, scaledheadradius)); // OvG: Scaling pShapeSep->addChild(cp); } #endif @@ -117,7 +124,7 @@ void ViewProviderFemConstraintPressure::updateData(const App::Property* prop) std::vector::const_iterator n = normals.begin(); #ifdef USE_MULTIPLE_COPY - cp = static_cast(pShapeSep->getChild(0)); //OvG: Use top cp + cp = static_cast(pShapeSep->getChild(0)); // OvG: Use top cp cp->matrix.setNum(points.size()); SbMatrix* matrices = cp->matrix.startEditing(); int idx = 0; @@ -126,14 +133,15 @@ void ViewProviderFemConstraintPressure::updateData(const App::Property* prop) Gui::coinRemoveAllChildren(pShapeSep); #endif - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); SbVec3f dir(n->x, n->y, n->z); double rev; if (pcConstraint->Reversed.getValue()) { - base = base + dir * scaledlength; //OvG: Scaling + base = base + dir * scaledlength; // OvG: Scaling rev = 1; - } else { + } + else { rev = -1; } SbRotation rot(SbVec3f(0, rev, 0), dir); @@ -145,7 +153,7 @@ void ViewProviderFemConstraintPressure::updateData(const App::Property* prop) #else SoSeparator* sep = new SoSeparator(); createPlacement(sep, base, rot); - createArrow(sep, scaledlength , scaledheadradius); //OvG: Scaling + createArrow(sep, scaledlength, scaledheadradius); // OvG: Scaling pShapeSep->addChild(sep); #endif n++; diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.h index 870b45eebf..6b1c9ebcc3 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintPressure.h @@ -26,9 +26,11 @@ #include "ViewProviderFemConstraintOnBoundary.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintPressure : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintPressure + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintPressure); @@ -41,6 +43,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTPRESSURE_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTPRESSURE_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp index 5ce1c629d6..dc206ebc22 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.cpp @@ -24,17 +24,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include "Gui/Control.h" -#include -#include "ViewProviderFemConstraintPulley.h" #include "TaskFemConstraintPulley.h" +#include "ViewProviderFemConstraintPulley.h" +#include using namespace FemGui; @@ -51,14 +51,15 @@ ViewProviderFemConstraintPulley::~ViewProviderFemConstraintPulley() = default; bool ViewProviderFemConstraintPulley::setEdit(int ModNum) { - if (ModNum == ViewProvider::Default ) { + if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintPulley *constrDlg = qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintPulley* constrDlg = qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { // This case will occur in the ShaftWizard application checkForWizard(); @@ -70,15 +71,19 @@ bool ViewProviderFemConstraintPulley::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; - } else if (constraintDialog) { + } + } + else if (constraintDialog) { // Another FemConstraint* dialog is already open inside the Shaft Wizard // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintPulley(this); return true; } @@ -88,15 +93,17 @@ bool ViewProviderFemConstraintPulley::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintPulley(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } @@ -115,8 +122,9 @@ void ViewProviderFemConstraintPulley::updateData(const App::Property* prop) Base::Vector3d axis = pcConstraint->Axis.getValue(); double radius = pcConstraint->Radius.getValue(); double dia = pcConstraint->Diameter.getValue(); - if (dia < 2 * radius) + if (dia < 2 * radius) { dia = 2 * radius; + } double forceAngle = pcConstraint->ForceAngle.getValue() / 180 * M_PI; double beltAngle = pcConstraint->BeltAngle.getValue(); double rat1 = 0.8, rat2 = 0.2; @@ -130,29 +138,33 @@ void ViewProviderFemConstraintPulley::updateData(const App::Property* prop) SbVec3f b(base.x, base.y, base.z); SbVec3f ax(axis.x, axis.y, axis.z); - createPlacement(pShapeSep, b, SbRotation(SbVec3f(0, 1, 0), ax));// child 0 and 1 + createPlacement(pShapeSep, b, SbRotation(SbVec3f(0, 1, 0), ax)); // child 0 and 1 pShapeSep->addChild( - createCylinder(pcConstraint->Height.getValue() * 0.8, dia / 2));// child 2 - SoSeparator *sep = new SoSeparator(); + createCylinder(pcConstraint->Height.getValue() * 0.8, dia / 2)); // child 2 + SoSeparator* sep = new SoSeparator(); createPlacement(sep, - SbVec3f(dia / 2 * sin(forceAngle + beltAngle), 0, + SbVec3f(dia / 2 * sin(forceAngle + beltAngle), + 0, dia / 2 * cos(forceAngle + beltAngle)), SbRotation(SbVec3f(0, 1, 0), - SbVec3f(sin(forceAngle + beltAngle + M_PI_2), 0, + SbVec3f(sin(forceAngle + beltAngle + M_PI_2), + 0, cos(forceAngle + beltAngle + M_PI_2)))); createPlacement(sep, SbVec3f(0, dia / 8 + dia / 2 * rat1, 0), SbRotation()); sep->addChild(createArrow(dia / 8 + dia / 2 * rat1, dia / 8)); - pShapeSep->addChild(sep);// child 3 + pShapeSep->addChild(sep); // child 3 sep = new SoSeparator(); createPlacement(sep, - SbVec3f(-dia / 2 * sin(forceAngle - beltAngle), 0, + SbVec3f(-dia / 2 * sin(forceAngle - beltAngle), + 0, -dia / 2 * cos(forceAngle - beltAngle)), SbRotation(SbVec3f(0, 1, 0), - SbVec3f(-sin(forceAngle - beltAngle - M_PI_2), 0, + SbVec3f(-sin(forceAngle - beltAngle - M_PI_2), + 0, -cos(forceAngle - beltAngle - M_PI_2)))); createPlacement(sep, SbVec3f(0, dia / 8 + dia / 2 * rat2, 0), SbRotation()); sep->addChild(createArrow(dia / 8 + dia / 2 * rat2, dia / 8)); - pShapeSep->addChild(sep);// child 4 + pShapeSep->addChild(sep); // child 4 } } else if (prop == &pcConstraint->Diameter) { @@ -160,8 +172,9 @@ void ViewProviderFemConstraintPulley::updateData(const App::Property* prop) // Change the symbol double radius = pcConstraint->Radius.getValue(); double dia = pcConstraint->Diameter.getValue(); - if (dia < 2 * radius) + if (dia < 2 * radius) { dia = 2 * radius; + } double forceAngle = pcConstraint->ForceAngle.getValue() / 180 * M_PI; double beltAngle = pcConstraint->BeltAngle.getValue(); double rat1 = 0.8, rat2 = 0.2; @@ -172,27 +185,33 @@ void ViewProviderFemConstraintPulley::updateData(const App::Property* prop) rat2 = f2 / (f1 + f2); } - const SoSeparator *sep = static_cast(pShapeSep->getChild(2)); + const SoSeparator* sep = static_cast(pShapeSep->getChild(2)); updateCylinder(sep, 0, pcConstraint->Height.getValue() * 0.8, dia / 2); - sep = static_cast(pShapeSep->getChild(3)); - updatePlacement(sep, 0, - SbVec3f(dia / 2 * sin(forceAngle + beltAngle), 0, + sep = static_cast(pShapeSep->getChild(3)); + updatePlacement(sep, + 0, + SbVec3f(dia / 2 * sin(forceAngle + beltAngle), + 0, dia / 2 * cos(forceAngle + beltAngle)), SbRotation(SbVec3f(0, 1, 0), - SbVec3f(sin(forceAngle + beltAngle + M_PI_2), 0, + SbVec3f(sin(forceAngle + beltAngle + M_PI_2), + 0, cos(forceAngle + beltAngle + M_PI_2)))); updatePlacement(sep, 2, SbVec3f(0, dia / 8 + dia / 2 * rat1, 0), SbRotation()); - const SoSeparator *subsep = static_cast(sep->getChild(4)); + const SoSeparator* subsep = static_cast(sep->getChild(4)); updateArrow(subsep, 0, dia / 8 + dia / 2 * rat1, dia / 8); - sep = static_cast(pShapeSep->getChild(4)); - updatePlacement(sep, 0, - SbVec3f(-dia / 2 * sin(forceAngle - beltAngle), 0, + sep = static_cast(pShapeSep->getChild(4)); + updatePlacement(sep, + 0, + SbVec3f(-dia / 2 * sin(forceAngle - beltAngle), + 0, -dia / 2 * cos(forceAngle - beltAngle)), SbRotation(SbVec3f(0, 1, 0), - SbVec3f(-sin(forceAngle - beltAngle - M_PI_2), 0, + SbVec3f(-sin(forceAngle - beltAngle - M_PI_2), + 0, -cos(forceAngle - beltAngle - M_PI_2)))); updatePlacement(sep, 2, SbVec3f(0, dia / 8 + dia / 2 * rat2, 0), SbRotation()); - subsep = static_cast(sep->getChild(4)); + subsep = static_cast(sep->getChild(4)); updateArrow(subsep, 0, dia / 8 + dia / 2 * rat2, dia / 8); } } @@ -200,24 +219,31 @@ void ViewProviderFemConstraintPulley::updateData(const App::Property* prop) if (pShapeSep->getNumChildren() > 0) { double radius = pcConstraint->Radius.getValue(); double dia = pcConstraint->Diameter.getValue(); - if (dia < 2 * radius) + if (dia < 2 * radius) { dia = 2 * radius; + } double forceAngle = pcConstraint->ForceAngle.getValue() / 180 * M_PI; double beltAngle = pcConstraint->BeltAngle.getValue(); - const SoSeparator *sep = static_cast(pShapeSep->getChild(3)); - updatePlacement(sep, 0, - SbVec3f(dia / 2 * sin(forceAngle + beltAngle), 0, + const SoSeparator* sep = static_cast(pShapeSep->getChild(3)); + updatePlacement(sep, + 0, + SbVec3f(dia / 2 * sin(forceAngle + beltAngle), + 0, dia / 2 * cos(forceAngle + beltAngle)), SbRotation(SbVec3f(0, 1, 0), - SbVec3f(sin(forceAngle + beltAngle + M_PI_2), 0, + SbVec3f(sin(forceAngle + beltAngle + M_PI_2), + 0, cos(forceAngle + beltAngle + M_PI_2)))); - sep = static_cast(pShapeSep->getChild(4)); - updatePlacement(sep, 0, - SbVec3f(-dia / 2 * sin(forceAngle - beltAngle), 0, + sep = static_cast(pShapeSep->getChild(4)); + updatePlacement(sep, + 0, + SbVec3f(-dia / 2 * sin(forceAngle - beltAngle), + 0, -dia / 2 * cos(forceAngle - beltAngle)), SbRotation(SbVec3f(0, 1, 0), - SbVec3f(-sin(forceAngle - beltAngle - M_PI_2), 0, + SbVec3f(-sin(forceAngle - beltAngle - M_PI_2), + 0, -cos(forceAngle - beltAngle - M_PI_2)))); } } @@ -225,8 +251,9 @@ void ViewProviderFemConstraintPulley::updateData(const App::Property* prop) if (pShapeSep->getNumChildren() > 0) { double radius = pcConstraint->Radius.getValue(); double dia = pcConstraint->Diameter.getValue(); - if (dia < 2 * radius) + if (dia < 2 * radius) { dia = 2 * radius; + } double rat1 = 0.8, rat2 = 0.2; double f1 = pcConstraint->BeltForce1.getValue(); double f2 = pcConstraint->BeltForce2.getValue(); @@ -235,13 +262,13 @@ void ViewProviderFemConstraintPulley::updateData(const App::Property* prop) rat2 = f2 / (f1 + f2); } - const SoSeparator *sep = static_cast(pShapeSep->getChild(3)); + const SoSeparator* sep = static_cast(pShapeSep->getChild(3)); updatePlacement(sep, 2, SbVec3f(0, dia / 8 + dia / 2 * rat1, 0), SbRotation()); - const SoSeparator *subsep = static_cast(sep->getChild(4)); + const SoSeparator* subsep = static_cast(sep->getChild(4)); updateArrow(subsep, 0, dia / 8 + dia / 2 * rat1, dia / 8); - sep = static_cast(pShapeSep->getChild(4)); + sep = static_cast(pShapeSep->getChild(4)); updatePlacement(sep, 2, SbVec3f(0, dia / 8 + dia / 2 * rat2, 0), SbRotation()); - subsep = static_cast(sep->getChild(4)); + subsep = static_cast(sep->getChild(4)); updateArrow(subsep, 0, dia / 8 + dia / 2 * rat2, dia / 8); } } diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.h index 9749eafb56..9e1e5f373d 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintPulley.h @@ -30,7 +30,7 @@ namespace FemGui { -class FemGuiExport ViewProviderFemConstraintPulley : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintPulley: public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintPulley); @@ -45,7 +45,7 @@ protected: bool setEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTPulley_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTPulley_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.cpp index eda0792dae..33fca41ec0 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.cpp @@ -24,22 +24,23 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif -#include #include "Mod/Fem/App/FemConstraintSpring.h" +#include +#include "TaskFemConstraintSpring.h" //TODO do next #include "ViewProviderFemConstraintSpring.h" -#include "TaskFemConstraintSpring.h" //TODO do next using namespace FemGui; -PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintSpring, FemGui::ViewProviderFemConstraintOnBoundary) +PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintSpring, + FemGui::ViewProviderFemConstraintOnBoundary) ViewProviderFemConstraintSpring::ViewProviderFemConstraintSpring() { @@ -49,23 +50,25 @@ ViewProviderFemConstraintSpring::ViewProviderFemConstraintSpring() ViewProviderFemConstraintSpring::~ViewProviderFemConstraintSpring() = default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintSpring::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintSpring *constrDlg = - qobject_cast(dlg);// check this out too - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintSpring* constrDlg = + qobject_cast(dlg); // check this out too + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintSpring(this); return true; } @@ -75,35 +78,39 @@ bool ViewProviderFemConstraintSpring::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintSpring(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define WIDTH (1) #define LENGTH (2) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled arrows on initial drawing - so +// disable void ViewProviderFemConstraintSpring::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintSpring *pcConstraint = static_cast(this->getObject()); - float scaledwidth = WIDTH * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + Fem::ConstraintSpring* pcConstraint = static_cast(this->getObject()); + float scaledwidth = + WIDTH * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledlength = LENGTH * pcConstraint->Scale.getValue(); #ifdef USE_MULTIPLE_COPY - //OvG: always need access to cp for scaling + // OvG: always need access to cp for scaling SoMultipleCopy* cp = new SoMultipleCopy(); if (pShapeSep->getNumChildren() == 0) { // Set up the nodes cp->matrix.setNum(0); - cp->addChild((SoNode*)createSpring(scaledlength, scaledwidth)); //OvG: Scaling + cp->addChild((SoNode*)createSpring(scaledlength, scaledwidth)); // OvG: Scaling pShapeSep->addChild(cp); } #endif @@ -117,7 +124,7 @@ void ViewProviderFemConstraintSpring::updateData(const App::Property* prop) std::vector::const_iterator n = normals.begin(); #ifdef USE_MULTIPLE_COPY - cp = static_cast(pShapeSep->getChild(0)); //OvG: Use top cp + cp = static_cast(pShapeSep->getChild(0)); // OvG: Use top cp cp->matrix.setNum(points.size()); SbMatrix* matrices = cp->matrix.startEditing(); int idx = 0; @@ -126,19 +133,19 @@ void ViewProviderFemConstraintSpring::updateData(const App::Property* prop) Gui::coinRemoveAllChildren(pShapeSep); #endif - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); SbVec3f dir(n->x, n->y, n->z); SbRotation rot(SbVec3f(0, -1.0, 0), dir); #ifdef USE_MULTIPLE_COPY SbMatrix m; - m.setTransform(base, rot, SbVec3f(1,1,1)); + m.setTransform(base, rot, SbVec3f(1, 1, 1)); matrices[idx] = m; idx++; #else SoSeparator* sep = new SoSeparator(); createPlacement(sep, base, rot); - createSpring(sep, scaledlength , scaledwidth); //OvG: Scaling + createSpring(sep, scaledlength, scaledwidth); // OvG: Scaling pShapeSep->addChild(sep); #endif n++; diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.h index 4b72d705d4..aeff53484b 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintSpring.h @@ -26,9 +26,11 @@ #include "ViewProviderFemConstraintOnBoundary.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintSpring : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintSpring + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintSpring); @@ -41,6 +43,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTSPRING_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTSPRING_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.cpp index 505162f0cb..bc538feb68 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.cpp @@ -26,23 +26,24 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif -#include #include "Mod/Fem/App/FemConstraintTemperature.h" -#include "ViewProviderFemConstraintTemperature.h" #include "TaskFemConstraintTemperature.h" +#include "ViewProviderFemConstraintTemperature.h" +#include using namespace FemGui; -PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintTemperature, FemGui::ViewProviderFemConstraintOnBoundary) +PROPERTY_SOURCE(FemGui::ViewProviderFemConstraintTemperature, + FemGui::ViewProviderFemConstraintOnBoundary) ViewProviderFemConstraintTemperature::ViewProviderFemConstraintTemperature() { @@ -52,23 +53,25 @@ ViewProviderFemConstraintTemperature::ViewProviderFemConstraintTemperature() ViewProviderFemConstraintTemperature::~ViewProviderFemConstraintTemperature() = default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintTemperature::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintTemperature *constrDlg = - qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintTemperature* constrDlg = + qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintTemperature(this); return true; } @@ -78,90 +81,96 @@ bool ViewProviderFemConstraintTemperature::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintTemperature(this)); + } return true; } else { - return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method + return ViewProviderDocumentObject::setEdit(ModNum); // clazy:exclude=skipped-base-method } } #define HEIGHT (1.5) #define RADIUS (0.3) -//#define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - so disable +// #define USE_MULTIPLE_COPY //OvG: MULTICOPY fails to update scaled display on initial drawing - +// so disable void ViewProviderFemConstraintTemperature::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintTemperature *pcConstraint = - static_cast(this->getObject()); - float scaledradius = RADIUS * pcConstraint->Scale.getValue(); //OvG: Calculate scaled values once only + Fem::ConstraintTemperature* pcConstraint = + static_cast(this->getObject()); + float scaledradius = + RADIUS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledheight = HEIGHT * pcConstraint->Scale.getValue(); - //float temperature = pcConstraint->temperature.getValue(); + // float temperature = pcConstraint->temperature.getValue(); if (prop == &pcConstraint->Points) { const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); // Note: Points and Normals are always updated together Gui::coinRemoveAllChildren(pShapeSep); - for (const auto & point : points) { - //Define base and normal directions + for (const auto& point : points) { + // Define base and normal directions SbVec3f base(point.x, point.y, point.z); - SbVec3f dir(n->x, n->y, n->z);//normal + SbVec3f dir(n->x, n->y, n->z); // normal - ///Temperature indication - //define separator - SoSeparator *sep = new SoSeparator(); + /// Temperature indication + // define separator + SoSeparator* sep = new SoSeparator(); - ///draw a temp gauge,with sphere and a cylinder - //first move to correct position - SoTranslation *trans = new SoTranslation(); + /// draw a temp gauge,with sphere and a cylinder + // first move to correct position + SoTranslation* trans = new SoTranslation(); SbVec3f newPos = base + scaledradius * dir * 0.7f; trans->translation.setValue(newPos); sep->addChild(trans); - //adjust orientation - SoRotation *rot = new SoRotation(); + // adjust orientation + SoRotation* rot = new SoRotation(); rot->rotation.setValue(SbRotation(SbVec3f(0, 1, 0), dir)); sep->addChild(rot); - //define color of shape - SoMaterial *myMaterial = new SoMaterial; - myMaterial->diffuseColor.set1Value(0, SbColor(1, 0, 0)); //RGB - //myMaterial->diffuseColor.set1Value(1,SbColor(.1,.1,.1));//possible to adjust sides separately + // define color of shape + SoMaterial* myMaterial = new SoMaterial; + myMaterial->diffuseColor.set1Value(0, SbColor(1, 0, 0)); // RGB + // myMaterial->diffuseColor.set1Value(1,SbColor(.1,.1,.1));//possible to adjust sides + // separately sep->addChild(myMaterial); - //draw a sphere - SoSphere *sph = new SoSphere(); + // draw a sphere + SoSphere* sph = new SoSphere(); sph->radius.setValue(scaledradius * 0.75); sep->addChild(sph); - //translate position - SoTranslation *trans2 = new SoTranslation(); + // translate position + SoTranslation* trans2 = new SoTranslation(); trans2->translation.setValue(SbVec3f(0, scaledheight * 0.375, 0)); sep->addChild(trans2); - //draw a cylinder - SoCylinder *cyl = new SoCylinder(); + // draw a cylinder + SoCylinder* cyl = new SoCylinder(); cyl->height.setValue(scaledheight * 0.5); cyl->radius.setValue(scaledradius * 0.375); sep->addChild(cyl); - //translate position - SoTranslation *trans3 = new SoTranslation(); + // translate position + SoTranslation* trans3 = new SoTranslation(); trans3->translation.setValue(SbVec3f(0, scaledheight * 0.375, 0)); sep->addChild(trans3); - //define color of shape - SoMaterial *myMaterial2 = new SoMaterial; - myMaterial2->diffuseColor.set1Value(0, SbColor(1, 1, 1)); //RGB + // define color of shape + SoMaterial* myMaterial2 = new SoMaterial; + myMaterial2->diffuseColor.set1Value(0, SbColor(1, 1, 1)); // RGB sep->addChild(myMaterial2); - //draw a cylinder - SoCylinder *cyl2 = new SoCylinder(); + // draw a cylinder + SoCylinder* cyl2 = new SoCylinder(); cyl2->height.setValue(scaledheight * 0.25); cyl2->radius.setValue(scaledradius * 0.375); sep->addChild(cyl2); diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.h index 1dea8d6668..888d10b907 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintTemperature.h @@ -28,9 +28,11 @@ #include "ViewProviderFemConstraintOnBoundary.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintTemperature : public FemGui::ViewProviderFemConstraintOnBoundary +class FemGuiExport ViewProviderFemConstraintTemperature + : public FemGui::ViewProviderFemConstraintOnBoundary { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintTemperature); @@ -43,6 +45,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTTemperature_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTTemperature_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.cpp index ec47c6a238..ad903451f9 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.cpp @@ -27,16 +27,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif -#include #include "Mod/Fem/App/FemConstraintTransform.h" -#include "ViewProviderFemConstraintTransform.h" #include "TaskFemConstraintTransform.h" +#include "ViewProviderFemConstraintTransform.h" +#include using namespace FemGui; @@ -50,23 +50,25 @@ ViewProviderFemConstraintTransform::ViewProviderFemConstraintTransform() ViewProviderFemConstraintTransform::~ViewProviderFemConstraintTransform() = default; -//FIXME setEdit needs a careful review +// FIXME setEdit needs a careful review bool ViewProviderFemConstraintTransform::setEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // When double-clicking on the item for this constraint the // object unsets and sets its edit mode without closing // the task panel - Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); - TaskDlgFemConstraintTransform *constrDlg = - qobject_cast(dlg); - if (constrDlg && constrDlg->getConstraintView() != this) - constrDlg = nullptr; // another constraint left open its task panel + Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); + TaskDlgFemConstraintTransform* constrDlg = + qobject_cast(dlg); + if (constrDlg && constrDlg->getConstraintView() != this) { + constrDlg = nullptr; // another constraint left open its task panel + } if (dlg && !constrDlg) { if (constraintDialog) { // Ignore the request to open another dialog return false; - } else { + } + else { constraintDialog = new TaskFemConstraintTransform(this); return true; } @@ -76,10 +78,12 @@ bool ViewProviderFemConstraintTransform::setEdit(int ModNum) Gui::Selection().clearSelection(); // start the edit dialog - if (constrDlg) + if (constrDlg) { Gui::Control().showDialog(constrDlg); - else + } + else { Gui::Control().showDialog(new TaskDlgFemConstraintTransform(this)); + } return true; } else { @@ -97,157 +101,158 @@ bool ViewProviderFemConstraintTransform::setEdit(int ModNum) void ViewProviderFemConstraintTransform::updateData(const App::Property* prop) { // Gets called whenever a property of the attached object changes - Fem::ConstraintTransform *pcConstraint = - static_cast(this->getObject()); + Fem::ConstraintTransform* pcConstraint = + static_cast(this->getObject()); float scaledradiusaxis = - RADIUSAXIS * pcConstraint->Scale.getValue();//OvG: Calculate scaled values once only + RADIUSAXIS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledheightaxis = HEIGHTAXIS * pcConstraint->Scale.getValue(); float scaledheadradiusA = - ARROWHEADRADIUS * pcConstraint->Scale.getValue();//OvG: Calculate scaled values once only + ARROWHEADRADIUS * pcConstraint->Scale.getValue(); // OvG: Calculate scaled values once only float scaledlengthA = ARROWLENGTH * pcConstraint->Scale.getValue(); std::string transform_type = pcConstraint->TransformType.getValueAsString(); if (transform_type == "Rectangular") { - if (prop == &pcConstraint->Points) { - const std::vector& points = pcConstraint->Points.getValues(); - const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) - return; - std::vector::const_iterator n = normals.begin(); - - // Points and Normals are always updated together - Gui::coinRemoveAllChildren(pShapeSep); - - for (const auto & point : points) { - SbVec3f base(point.x, point.y, point.z); - SbVec3f basex(point.x, point.y, point.z); - SbVec3f basey(point.x, point.y, point.z); - - double x_axis_x = 1; - double x_axis_y = 0; - double x_axis_z = 0; - - double y_axis_x = 0; - double y_axis_y = 1; - double y_axis_z = 0; - - double z_axis_x = 0; - double z_axis_y = 0; - double z_axis_z = 1; - - double rot_x = (pcConstraint->X_rot.getValue() * (M_PI /180)); - double rot_y = (pcConstraint->Y_rot.getValue() * (M_PI /180)); - double rot_z = (pcConstraint->Z_rot.getValue() * (M_PI /180)); - - double x_axis_x_p; - double x_axis_y_p; - double x_axis_z_p; - - double y_axis_x_p; - double y_axis_y_p; - double y_axis_z_p; - - double z_axis_x_p; - double z_axis_y_p; - double z_axis_z_p; - - if (rot_x != 0) { - x_axis_z_p = x_axis_z * cos(rot_x) - x_axis_y * sin(rot_x); - x_axis_y_p = x_axis_y * cos(rot_x) + x_axis_z * sin(rot_x); - x_axis_z = x_axis_z_p; - x_axis_y = x_axis_y_p; - - y_axis_z_p = y_axis_z * cos(rot_x) - y_axis_y * sin(rot_x); - y_axis_y_p = y_axis_y * cos(rot_x) + y_axis_z * sin(rot_x); - y_axis_z = y_axis_z_p; - y_axis_y = y_axis_y_p; - - z_axis_z_p = z_axis_z * cos(rot_x) - z_axis_y * sin(rot_x); - z_axis_y_p = z_axis_y * cos(rot_x) + z_axis_z * sin(rot_x); - z_axis_z = z_axis_z_p; - z_axis_y = z_axis_y_p; + if (prop == &pcConstraint->Points) { + const std::vector& points = pcConstraint->Points.getValues(); + const std::vector& normals = pcConstraint->Normals.getValues(); + if (points.size() != normals.size()) { + return; } - if (rot_y != 0) { - x_axis_z_p = x_axis_z * cos(rot_y) + x_axis_x * sin(rot_y); - x_axis_x_p = x_axis_x * cos(rot_y) - x_axis_z * sin(rot_y); - x_axis_z = x_axis_z_p; - x_axis_x = x_axis_x_p; + std::vector::const_iterator n = normals.begin(); - y_axis_z_p = y_axis_z * cos(rot_y) + y_axis_x * sin(rot_y); - y_axis_x_p = y_axis_x * cos(rot_y) - y_axis_z * sin(rot_y); - y_axis_z = y_axis_z_p; - y_axis_x = y_axis_x_p; + // Points and Normals are always updated together + Gui::coinRemoveAllChildren(pShapeSep); - z_axis_z_p = z_axis_z * cos(rot_y) + z_axis_x * sin(rot_y); - z_axis_x_p = z_axis_x * cos(rot_y) - z_axis_z * sin(rot_y); - z_axis_z = z_axis_z_p; - z_axis_x = z_axis_x_p; + for (const auto& point : points) { + SbVec3f base(point.x, point.y, point.z); + SbVec3f basex(point.x, point.y, point.z); + SbVec3f basey(point.x, point.y, point.z); + + double x_axis_x = 1; + double x_axis_y = 0; + double x_axis_z = 0; + + double y_axis_x = 0; + double y_axis_y = 1; + double y_axis_z = 0; + + double z_axis_x = 0; + double z_axis_y = 0; + double z_axis_z = 1; + + double rot_x = (pcConstraint->X_rot.getValue() * (M_PI / 180)); + double rot_y = (pcConstraint->Y_rot.getValue() * (M_PI / 180)); + double rot_z = (pcConstraint->Z_rot.getValue() * (M_PI / 180)); + + double x_axis_x_p; + double x_axis_y_p; + double x_axis_z_p; + + double y_axis_x_p; + double y_axis_y_p; + double y_axis_z_p; + + double z_axis_x_p; + double z_axis_y_p; + double z_axis_z_p; + + if (rot_x != 0) { + x_axis_z_p = x_axis_z * cos(rot_x) - x_axis_y * sin(rot_x); + x_axis_y_p = x_axis_y * cos(rot_x) + x_axis_z * sin(rot_x); + x_axis_z = x_axis_z_p; + x_axis_y = x_axis_y_p; + + y_axis_z_p = y_axis_z * cos(rot_x) - y_axis_y * sin(rot_x); + y_axis_y_p = y_axis_y * cos(rot_x) + y_axis_z * sin(rot_x); + y_axis_z = y_axis_z_p; + y_axis_y = y_axis_y_p; + + z_axis_z_p = z_axis_z * cos(rot_x) - z_axis_y * sin(rot_x); + z_axis_y_p = z_axis_y * cos(rot_x) + z_axis_z * sin(rot_x); + z_axis_z = z_axis_z_p; + z_axis_y = z_axis_y_p; + } + if (rot_y != 0) { + x_axis_z_p = x_axis_z * cos(rot_y) + x_axis_x * sin(rot_y); + x_axis_x_p = x_axis_x * cos(rot_y) - x_axis_z * sin(rot_y); + x_axis_z = x_axis_z_p; + x_axis_x = x_axis_x_p; + + y_axis_z_p = y_axis_z * cos(rot_y) + y_axis_x * sin(rot_y); + y_axis_x_p = y_axis_x * cos(rot_y) - y_axis_z * sin(rot_y); + y_axis_z = y_axis_z_p; + y_axis_x = y_axis_x_p; + + z_axis_z_p = z_axis_z * cos(rot_y) + z_axis_x * sin(rot_y); + z_axis_x_p = z_axis_x * cos(rot_y) - z_axis_z * sin(rot_y); + z_axis_z = z_axis_z_p; + z_axis_x = z_axis_x_p; + } + if (rot_z != 0) { + x_axis_x_p = x_axis_x * cos(rot_z) + x_axis_y * sin(rot_z); + x_axis_y_p = x_axis_y * cos(rot_z) - x_axis_x * sin(rot_z); + x_axis_x = x_axis_x_p; + x_axis_y = x_axis_y_p; + + y_axis_x_p = y_axis_x * cos(rot_z) + y_axis_y * sin(rot_z); + y_axis_y_p = y_axis_y * cos(rot_z) - y_axis_x * sin(rot_z); + y_axis_x = y_axis_x_p; + y_axis_y = y_axis_y_p; + + z_axis_x_p = z_axis_x * cos(rot_z) + z_axis_y * sin(rot_z); + z_axis_y_p = z_axis_y * cos(rot_z) - z_axis_x * sin(rot_z); + z_axis_x = z_axis_x_p; + z_axis_y = z_axis_y_p; + } + + SbVec3f dirz(z_axis_x, z_axis_y, z_axis_z); + SbRotation rot(SbVec3f(0, 1, 0), dirz); + + SbVec3f dirx(x_axis_x, x_axis_y, x_axis_z); + SbRotation rotx(SbVec3f(0, 1, 0), dirx); + + SbVec3f diry(y_axis_x, y_axis_y, y_axis_z); + SbRotation roty(SbVec3f(0, 1, 0), diry); + + base = base + dirz * scaledlengthA * 0.75f; + basex = basex + dirx * scaledlengthA * 0.65f; + basey = basey + diry * scaledlengthA * 0.65f; + + SoSeparator* sep = new SoSeparator(); + + SoMaterial* myMaterial = new SoMaterial; + myMaterial->diffuseColor.set1Value(0, SbColor(0, 0, 1)); // RGB + sep->addChild(myMaterial); + + createPlacement(sep, base, rot); + createArrow(sep, scaledlengthA * 0.75, scaledheadradiusA * 0.9); // OvG: Scaling + pShapeSep->addChild(sep); + + SoSeparator* sepx = new SoSeparator(); + + SoMaterial* myMaterialx = new SoMaterial; + myMaterialx->diffuseColor.set1Value(0, SbColor(1, 0, 0)); // RGB + sepx->addChild(myMaterialx); + + createPlacement(sepx, basex, rotx); + createArrow(sepx, scaledlengthA * 0.65, scaledheadradiusA * 0.65); // OvG: Scaling + pShapeSep->addChild(sepx); + + SoSeparator* sepy = new SoSeparator(); + + SoMaterial* myMaterialy = new SoMaterial; + myMaterialy->diffuseColor.set1Value(0, SbColor(0, 1, 0)); // RGB + sepy->addChild(myMaterialy); + + createPlacement(sepy, basey, roty); + createArrow(sepy, scaledlengthA * 0.65, scaledheadradiusA * 0.65); // OvG: Scaling + pShapeSep->addChild(sepy); + + n++; } - if (rot_z != 0) { - x_axis_x_p = x_axis_x * cos(rot_z) + x_axis_y * sin(rot_z); - x_axis_y_p = x_axis_y * cos(rot_z) - x_axis_x * sin(rot_z); - x_axis_x = x_axis_x_p; - x_axis_y = x_axis_y_p; - - y_axis_x_p = y_axis_x * cos(rot_z) + y_axis_y * sin(rot_z); - y_axis_y_p = y_axis_y * cos(rot_z) - y_axis_x * sin(rot_z); - y_axis_x = y_axis_x_p; - y_axis_y = y_axis_y_p; - - z_axis_x_p = z_axis_x * cos(rot_z) + z_axis_y * sin(rot_z); - z_axis_y_p = z_axis_y * cos(rot_z) - z_axis_x * sin(rot_z); - z_axis_x = z_axis_x_p; - z_axis_y = z_axis_y_p; - } - - SbVec3f dirz(z_axis_x, z_axis_y ,z_axis_z); - SbRotation rot(SbVec3f(0, 1, 0), dirz); - - SbVec3f dirx(x_axis_x, x_axis_y ,x_axis_z); - SbRotation rotx(SbVec3f(0, 1, 0), dirx); - - SbVec3f diry(y_axis_x, y_axis_y ,y_axis_z); - SbRotation roty(SbVec3f(0, 1, 0), diry); - - base = base + dirz * scaledlengthA * 0.75f; - basex = basex + dirx * scaledlengthA * 0.65f; - basey = basey + diry * scaledlengthA * 0.65f; - - SoSeparator* sep = new SoSeparator(); - - SoMaterial* myMaterial = new SoMaterial; - myMaterial->diffuseColor.set1Value(0, SbColor(0, 0, 1)); //RGB - sep->addChild(myMaterial); - - createPlacement(sep, base, rot); - createArrow(sep, scaledlengthA * 0.75, scaledheadradiusA * 0.9); //OvG: Scaling - pShapeSep->addChild(sep); - - SoSeparator* sepx = new SoSeparator(); - - SoMaterial* myMaterialx = new SoMaterial; - myMaterialx->diffuseColor.set1Value(0, SbColor(1, 0, 0)); //RGB - sepx->addChild(myMaterialx); - - createPlacement(sepx, basex, rotx); - createArrow(sepx, scaledlengthA*0.65 , scaledheadradiusA*0.65); //OvG: Scaling - pShapeSep->addChild(sepx); - - SoSeparator* sepy = new SoSeparator(); - - SoMaterial* myMaterialy = new SoMaterial; - myMaterialy->diffuseColor.set1Value(0, SbColor(0, 1, 0)); //RGB - sepy->addChild(myMaterialy); - - createPlacement(sepy, basey, roty); - createArrow(sepy, scaledlengthA * 0.65, scaledheadradiusA * 0.65); //OvG: Scaling - pShapeSep->addChild(sepy); - - n++; } - } - } else if (transform_type == "Cylindrical") { + else if (transform_type == "Cylindrical") { // Points and Normals are always updated together Gui::coinRemoveAllChildren(pShapeSep); @@ -255,8 +260,9 @@ void ViewProviderFemConstraintTransform::updateData(const App::Property* prop) const std::vector& points = pcConstraint->Points.getValues(); const std::vector& normals = pcConstraint->Normals.getValues(); - if (points.size() != normals.size()) + if (points.size() != normals.size()) { return; + } std::vector::const_iterator n = normals.begin(); if (!points.empty()) { @@ -265,30 +271,30 @@ void ViewProviderFemConstraintTransform::updateData(const App::Property* prop) SbVec3f b(base.x, base.y, base.z); SbVec3f ax(axis.x, axis.y, axis.z); - SbRotation rots(SbVec3f(0,-1,0), ax); + SbRotation rots(SbVec3f(0, -1, 0), ax); - b = b - ax * scaledheightaxis/2; + b = b - ax * scaledheightaxis / 2; SoSeparator* sepAx = new SoSeparator(); SoMaterial* myMaterial = new SoMaterial; - myMaterial->diffuseColor.set1Value(0, SbColor(0, 0, 1));//RGB + myMaterial->diffuseColor.set1Value(0, SbColor(0, 0, 1)); // RGB sepAx->addChild(myMaterial); createPlacement(sepAx, b, rots); createArrow(sepAx, scaledheightaxis, scaledradiusaxis); pShapeSep->addChild(sepAx); } - for (const auto & point : points) { + for (const auto& point : points) { SbVec3f base(point.x, point.y, point.z); SbVec3f dir(n->x, n->y, n->z); - base = base + dir * scaledlengthA; //OvG: Scaling + base = base + dir * scaledlengthA; // OvG: Scaling SbRotation rot(SbVec3f(0, 1, 0), dir); SoSeparator* sep = new SoSeparator(); SoMaterial* myMaterials = new SoMaterial; - myMaterials->diffuseColor.set1Value(0, SbColor(1, 0, 0)); //RGB + myMaterials->diffuseColor.set1Value(0, SbColor(1, 0, 0)); // RGB sep->addChild(myMaterials); createPlacement(sep, base, rot); - createArrow(sep, scaledlengthA , scaledheadradiusA); //OvG: Scaling + createArrow(sep, scaledlengthA, scaledheadradiusA); // OvG: Scaling pShapeSep->addChild(sep); n++; } diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.h b/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.h index 5a66fc91ed..42beaeb1b0 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.h +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintTransform.h @@ -29,9 +29,10 @@ #include "ViewProviderFemConstraint.h" -namespace FemGui { +namespace FemGui +{ -class FemGuiExport ViewProviderFemConstraintTransform : public FemGui::ViewProviderFemConstraint +class FemGuiExport ViewProviderFemConstraintTransform: public FemGui::ViewProviderFemConstraint { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemConstraintTransform); @@ -44,6 +45,6 @@ protected: bool setEdit(int ModNum) override; }; -} +} // namespace FemGui -#endif // GUI_VIEWPROVIDERFEMCONSTRAINTTransform_H +#endif // GUI_VIEWPROVIDERFEMCONSTRAINTTransform_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp b/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp index 729b8cfd0e..0f02402c89 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp @@ -23,27 +23,27 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -# include +#include -# include -# include +#include +#include #endif #include @@ -60,26 +60,45 @@ using namespace FemGui; struct FemFace { - const SMDS_MeshNode *Nodes[8]; - unsigned long ElementNumber; + const SMDS_MeshNode* Nodes[8]; + unsigned long ElementNumber; const SMDS_MeshElement* Element; unsigned short Size; unsigned short FaceNo; bool hide; - Base::Vector3d getFirstNodePoint() { - return Base::Vector3d(Nodes[0]->X(),Nodes[0]->Y(),Nodes[0]->Z()); + Base::Vector3d getFirstNodePoint() + { + return Base::Vector3d(Nodes[0]->X(), Nodes[0]->Y(), Nodes[0]->Z()); } - Base::Vector3d set(short size,const SMDS_MeshElement* element,unsigned short id, short faceNo, - const SMDS_MeshNode* n1,const SMDS_MeshNode* n2,const SMDS_MeshNode* n3,const SMDS_MeshNode* n4=nullptr, - const SMDS_MeshNode* n5=nullptr,const SMDS_MeshNode* n6=nullptr,const SMDS_MeshNode* n7=nullptr,const SMDS_MeshNode* n8=nullptr); + Base::Vector3d set(short size, + const SMDS_MeshElement* element, + unsigned short id, + short faceNo, + const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4 = nullptr, + const SMDS_MeshNode* n5 = nullptr, + const SMDS_MeshNode* n6 = nullptr, + const SMDS_MeshNode* n7 = nullptr, + const SMDS_MeshNode* n8 = nullptr); - bool isSameFace (FemFace &face); + bool isSameFace(FemFace& face); }; -Base::Vector3d FemFace::set(short size,const SMDS_MeshElement* element,unsigned short id,short faceNo, - const SMDS_MeshNode* n1,const SMDS_MeshNode* n2,const SMDS_MeshNode* n3,const SMDS_MeshNode* n4, - const SMDS_MeshNode* n5,const SMDS_MeshNode* n6,const SMDS_MeshNode* n7,const SMDS_MeshNode* n8) +Base::Vector3d FemFace::set(short size, + const SMDS_MeshElement* element, + unsigned short id, + short faceNo, + const SMDS_MeshNode* n1, + const SMDS_MeshNode* n2, + const SMDS_MeshNode* n3, + const SMDS_MeshNode* n4, + const SMDS_MeshNode* n5, + const SMDS_MeshNode* n6, + const SMDS_MeshNode* n7, + const SMDS_MeshNode* n8) { Nodes[0] = n1; Nodes[1] = n2; @@ -90,58 +109,54 @@ Base::Vector3d FemFace::set(short size,const SMDS_MeshElement* element,unsigned Nodes[6] = n7; Nodes[7] = n8; - Element = element; - ElementNumber = id; - Size = size; - FaceNo = faceNo; - hide = false; + Element = element; + ElementNumber = id; + Size = size; + FaceNo = faceNo; + hide = false; // sorting the nodes for later easier comparison (bubble sort) - int i, j, flag = 1; // set flag to 1 to start first pass - const SMDS_MeshNode* temp; // holding variable + int i, j, flag = 1; // set flag to 1 to start first pass + const SMDS_MeshNode* temp; // holding variable - for(i = 1; (i <= size) && flag; i++) - { + for (i = 1; (i <= size) && flag; i++) { flag = 0; - for (j=0; j < (size -1); j++) - { - if (Nodes[j+1] > Nodes[j]) // ascending order simply changes to < + for (j = 0; j < (size - 1); j++) { + if (Nodes[j + 1] > Nodes[j]) // ascending order simply changes to < { - temp = Nodes[j]; // swap elements - Nodes[j] = Nodes[j+1]; - Nodes[j+1] = temp; - flag = 1; // indicates that a swap occurred. + temp = Nodes[j]; // swap elements + Nodes[j] = Nodes[j + 1]; + Nodes[j + 1] = temp; + flag = 1; // indicates that a swap occurred. } } } - return Base::Vector3d(Nodes[0]->X(),Nodes[0]->Y(),Nodes[0]->Z()); + return Base::Vector3d(Nodes[0]->X(), Nodes[0]->Y(), Nodes[0]->Z()); } -class FemFaceGridItem : public std::vector{ +class FemFaceGridItem: public std::vector +{ public: - //FemFaceGridItem(void){reserve(200);} + // FemFaceGridItem(void){reserve(200);} }; -bool FemFace::isSameFace (FemFace &face) +bool FemFace::isSameFace(FemFace& face) { // the same element can not have the same face - if(face.ElementNumber == ElementNumber) + if (face.ElementNumber == ElementNumber) { return false; - if(face.Size != Size) + } + if (face.Size != Size) { return false; + } // if the same face size just compare if the sorted nodes are the same - if( Nodes[0] == face.Nodes[0] && - Nodes[1] == face.Nodes[1] && - Nodes[2] == face.Nodes[2] && - Nodes[3] == face.Nodes[3] && - Nodes[4] == face.Nodes[4] && - Nodes[5] == face.Nodes[5] && - Nodes[6] == face.Nodes[6] && - Nodes[7] == face.Nodes[7] ){ - hide = true; - face.hide = true; - return true; + if (Nodes[0] == face.Nodes[0] && Nodes[1] == face.Nodes[1] && Nodes[2] == face.Nodes[2] + && Nodes[3] == face.Nodes[3] && Nodes[4] == face.Nodes[4] && Nodes[5] == face.Nodes[5] + && Nodes[6] == face.Nodes[6] && Nodes[7] == face.Nodes[7]) { + hide = true; + face.hide = true; + return true; } return false; @@ -152,39 +167,39 @@ bool FemFace::isSameFace (FemFace &face) class ViewProviderFemMesh::Private { public: - static const char *dm_face_wire; - static const char *dm_wire_node; - static const char *dm_face_wire_node; - static const char *dm_face; - static const char *dm_node; - static const char *dm_wire; + static const char* dm_face_wire; + static const char* dm_wire_node; + static const char* dm_face_wire_node; + static const char* dm_face; + static const char* dm_node; + static const char* dm_wire; }; -const char * ViewProviderFemMesh::Private::dm_face_wire = "Faces & Wireframe"; -const char * ViewProviderFemMesh::Private::dm_wire_node = "Wireframe & Nodes"; -const char * ViewProviderFemMesh::Private::dm_face_wire_node = "Faces, Wireframe & Nodes"; -const char * ViewProviderFemMesh::Private::dm_face = "Faces"; -const char * ViewProviderFemMesh::Private::dm_node = "Nodes"; -const char * ViewProviderFemMesh::Private::dm_wire = "Wireframe"; +const char* ViewProviderFemMesh::Private::dm_face_wire = "Faces & Wireframe"; +const char* ViewProviderFemMesh::Private::dm_wire_node = "Wireframe & Nodes"; +const char* ViewProviderFemMesh::Private::dm_face_wire_node = "Faces, Wireframe & Nodes"; +const char* ViewProviderFemMesh::Private::dm_face = "Faces"; +const char* ViewProviderFemMesh::Private::dm_node = "Nodes"; +const char* ViewProviderFemMesh::Private::dm_wire = "Wireframe"; PROPERTY_SOURCE(FemGui::ViewProviderFemMesh, Gui::ViewProviderGeometryObject) -App::PropertyFloatConstraint::Constraints ViewProviderFemMesh::floatRange = {1.0,64.0,1.0}; +App::PropertyFloatConstraint::Constraints ViewProviderFemMesh::floatRange = {1.0, 64.0, 1.0}; ViewProviderFemMesh::ViewProviderFemMesh() { sPixmap = "fem-femmesh-from-shape"; - ADD_PROPERTY(PointColor,(App::Color(0.7f,0.7f,0.7f))); - ADD_PROPERTY(PointSize,(5.0f)); + ADD_PROPERTY(PointColor, (App::Color(0.7f, 0.7f, 0.7f))); + ADD_PROPERTY(PointSize, (5.0f)); PointSize.setConstraints(&floatRange); - ADD_PROPERTY(LineWidth,(2.0f)); + ADD_PROPERTY(LineWidth, (2.0f)); LineWidth.setConstraints(&floatRange); - ShapeColor.setValue(App::Color(1.0f,0.7f,0.0f)); - ADD_PROPERTY(BackfaceCulling,(true)); + ShapeColor.setValue(App::Color(1.0f, 0.7f, 0.0f)); + ADD_PROPERTY(BackfaceCulling, (true)); ADD_PROPERTY(ShowInner, (false)); - ADD_PROPERTY(MaxFacesShowInner,(50000)); + ADD_PROPERTY(MaxFacesShowInner, (50000)); onlyEdges = false; @@ -222,7 +237,7 @@ ViewProviderFemMesh::ViewProviderFemMesh() pcPointMaterial = new SoMaterial; pcPointMaterial->ref(); - //PointMaterial.touch(); + // PointMaterial.touch(); DisplacementFactor = 0; } @@ -240,27 +255,27 @@ ViewProviderFemMesh::~ViewProviderFemMesh() pcAnoCoords->unref(); } -void ViewProviderFemMesh::attach(App::DocumentObject *pcObj) +void ViewProviderFemMesh::attach(App::DocumentObject* pcObj) { ViewProviderGeometryObject::attach(pcObj); // Move 'coords' before the switch - //pcRoot->insertChild(pcCoords,pcRoot->findChild(static_cast(pcModeSwitch))); + // pcRoot->insertChild(pcCoords,pcRoot->findChild(static_cast(pcModeSwitch))); // Annotation sets SoGroup* pcAnotRoot = new SoAnnotation(); - SoDrawStyle *pcAnoStyle = new SoDrawStyle(); + SoDrawStyle* pcAnoStyle = new SoDrawStyle(); pcAnoStyle->style = SoDrawStyle::POINTS; pcAnoStyle->pointSize = 5; - SoMaterial *pcAnoMaterial = new SoMaterial; - pcAnoMaterial->diffuseColor.setValue(0,1,0); - pcAnoMaterial->emissiveColor.setValue(0,1,0); + SoMaterial* pcAnoMaterial = new SoMaterial; + pcAnoMaterial->diffuseColor.setValue(0, 1, 0); + pcAnoMaterial->emissiveColor.setValue(0, 1, 0); pcAnotRoot->addChild(pcAnoMaterial); pcAnotRoot->addChild(pcAnoStyle); pcAnotRoot->addChild(pcAnoCoords); - SoPointSet *pointset = new SoPointSet; + SoPointSet* pointset = new SoPointSet; pcAnotRoot->addChild(pointset); // Faces @@ -281,7 +296,7 @@ void ViewProviderFemMesh::attach(App::DocumentObject *pcObj) pcWireRoot->addChild(pcDrawStyle); pcWireRoot->addChild(pcLightModel); SoBaseColor* color = new SoBaseColor(); - color->rgb.setValue(0.0f,0.0f,0.0f); + color->rgb.setValue(0.0f, 0.0f, 0.0f); pcWireRoot->addChild(color); pcWireRoot->addChild(pcLines); addDisplayMaskMode(pcWireRoot, Private::dm_wire); @@ -299,14 +314,14 @@ void ViewProviderFemMesh::attach(App::DocumentObject *pcObj) // because the group affects nodes that are rendered afterwards (#0003769) // Faces + Wireframe (Elements) - //SoPolygonOffset* offset = new SoPolygonOffset(); - //offset->styles = SoPolygonOffset::FILLED; - //offset->factor = 2.0f; - //offset->units = 1.0f; + // SoPolygonOffset* offset = new SoPolygonOffset(); + // offset->styles = SoPolygonOffset::FILLED; + // offset->factor = 2.0f; + // offset->units = 1.0f; SoGroup* pcFlatWireRoot = new SoGroup(); pcFlatWireRoot->addChild(pcWireRoot); - //pcFlatWireRoot->addChild(offset); + // pcFlatWireRoot->addChild(offset); pcFlatWireRoot->addChild(pcFlatRoot); addDisplayMaskMode(pcFlatWireRoot, Private::dm_face_wire); @@ -314,7 +329,7 @@ void ViewProviderFemMesh::attach(App::DocumentObject *pcObj) SoGroup* pcElemNodesRoot = new SoGroup(); pcElemNodesRoot->addChild(pcPointsRoot); pcElemNodesRoot->addChild(pcWireRoot); - //pcElemNodesRoot->addChild(offset); + // pcElemNodesRoot->addChild(offset); pcElemNodesRoot->addChild(pcFlatRoot); addDisplayMaskMode(pcElemNodesRoot, Private::dm_face_wire_node); @@ -349,7 +364,15 @@ void ViewProviderFemMesh::updateData(const App::Property* prop) ViewProviderFEMMeshBuilder builder; resetColorByNodeId(); resetDisplacementByNodeId(); - builder.createMesh(prop, pcCoords, pcFaces, pcLines, vFaceElementIdx, vNodeElementIdx, onlyEdges, ShowInner.getValue(), MaxFacesShowInner.getValue()); + builder.createMesh(prop, + pcCoords, + pcFaces, + pcLines, + vFaceElementIdx, + vNodeElementIdx, + onlyEdges, + ShowInner.getValue(), + MaxFacesShowInner.getValue()); } Gui::ViewProviderGeometryObject::updateData(prop); } @@ -361,23 +384,30 @@ void ViewProviderFemMesh::onChanged(const App::Property* prop) } else if (prop == &PointColor) { const App::Color& c = PointColor.getValue(); - pcPointMaterial->diffuseColor.setValue(c.r,c.g,c.b); + pcPointMaterial->diffuseColor.setValue(c.r, c.g, c.b); } else if (prop == &BackfaceCulling) { - if(BackfaceCulling.getValue()){ + if (BackfaceCulling.getValue()) { pShapeHints->shapeType = SoShapeHints::SOLID; - //pShapeHints->vertexOrdering = SoShapeHints::CLOCKWISE; - }else{ + // pShapeHints->vertexOrdering = SoShapeHints::CLOCKWISE; + } + else { pShapeHints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; - //pShapeHints->vertexOrdering = SoShapeHints::CLOCKWISE; + // pShapeHints->vertexOrdering = SoShapeHints::CLOCKWISE; } } - else if (prop == &ShowInner ) { + else if (prop == &ShowInner) { // recalc mesh with new settings ViewProviderFEMMeshBuilder builder; builder.createMesh(&(static_cast(this->pcObject)->FemMesh), - pcCoords, pcFaces, pcLines, vFaceElementIdx, vNodeElementIdx, - onlyEdges, ShowInner.getValue(), MaxFacesShowInner.getValue()); + pcCoords, + pcFaces, + pcLines, + vFaceElementIdx, + vNodeElementIdx, + onlyEdges, + ShowInner.getValue(), + MaxFacesShowInner.getValue()); } else if (prop == &LineWidth) { pcDrawStyle->lineWidth = LineWidth.getValue(); @@ -395,7 +425,7 @@ std::string ViewProviderFemMesh::getElement(const SoDetail* detail) const const SoFaceDetail* face_detail = static_cast(detail); unsigned long edx = vFaceElementIdx[face_detail->getFaceIndex()]; - str << "Elem" << (edx>>3) << "F"<< (edx&7)+1; + str << "Elem" << (edx >> 3) << "F" << (edx & 7) + 1; } // trigger on edges only if edge only mesh, otherwise you only hit edges and never faces.... else if (onlyEdges && detail->getTypeId() == SoLineDetail::getClassTypeId()) { @@ -431,24 +461,26 @@ SoDetail* ViewProviderFemMesh::getDetail(const char* subelement) const int index = -1; if (pos != std::string::npos) { index = std::atoi(element.substr(pos).c_str()); - element = element.substr(0,pos); + element = element.substr(0, pos); } SoDetail* detail = nullptr; - if (index < 0) + if (index < 0) { return detail; + } if (element == "Elem") { detail = new SoFaceDetail(); static_cast(detail)->setPartIndex(index - 1); } - //else if (element == "Edge") { - // detail = new SoLineDetail(); - // static_cast(detail)->setLineIndex(index - 1); - //} - //else if (element == "Vertex") { - // detail = new SoPointDetail(); - // static_cast(detail)->setCoordinateIndex(index + nodeset->startIndex.getValue() - 1); - //} + // else if (element == "Edge") { + // detail = new SoLineDetail(); + // static_cast(detail)->setLineIndex(index - 1); + // } + // else if (element == "Vertex") { + // detail = new SoPointDetail(); + // static_cast(detail)->setCoordinateIndex(index + + // nodeset->startIndex.getValue() - 1); + // } return detail; } @@ -468,24 +500,32 @@ std::set ViewProviderFemMesh::getHighlightNodes() const void ViewProviderFemMesh::setHighlightNodes(const std::set& HighlightedNodes) { if (!HighlightedNodes.empty()) { - const SMESHDS_Mesh* data = static_cast(this->pcObject)->FemMesh.getValue().getSMesh()->GetMeshDS(); + const SMESHDS_Mesh* data = static_cast(this->pcObject) + ->FemMesh.getValue() + .getSMesh() + ->GetMeshDS(); pcAnoCoords->point.setNum(HighlightedNodes.size()); SbVec3f* verts = pcAnoCoords->point.startEditing(); - int i=0; - for (std::set::const_iterator it=HighlightedNodes.begin();it!=HighlightedNodes.end();++it,i++){ - const SMDS_MeshNode *Node = data->FindNode(*it); - if (Node) - verts[i].setValue((float)Node->X(),(float)Node->Y(),(float)Node->Z()); - else - verts[i].setValue(0,0,0); + int i = 0; + for (std::set::const_iterator it = HighlightedNodes.begin(); + it != HighlightedNodes.end(); + ++it, i++) { + const SMDS_MeshNode* Node = data->FindNode(*it); + if (Node) { + verts[i].setValue((float)Node->X(), (float)Node->Y(), (float)Node->Z()); + } + else { + verts[i].setValue(0, 0, 0); + } } pcAnoCoords->point.finishEditing(); // save the node ids vHighlightedIdx.clear(); vHighlightedIdx.insert(vHighlightedIdx.end(), - HighlightedNodes.begin(), HighlightedNodes.end()); + HighlightedNodes.begin(), + HighlightedNodes.end()); } else { pcAnoCoords->point.setNum(0); @@ -499,41 +539,42 @@ void ViewProviderFemMesh::resetHighlightNodes() vHighlightedIdx.clear(); } -PyObject * ViewProviderFemMesh::getPyObject() +PyObject* ViewProviderFemMesh::getPyObject() { - if (PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new ViewProviderFemMeshPy(this),true); + PythonObject = Py::Object(new ViewProviderFemMeshPy(this), true); } return Py::new_reference_to(PythonObject); } -void ViewProviderFemMesh::setColorByNodeId(const std::map &NodeColorMap) +void ViewProviderFemMesh::setColorByNodeId(const std::map& NodeColorMap) { long endId = (--NodeColorMap.end())->first; - std::vector colorVec(endId+1,App::Color(0,1,0)); - for(const auto & it : NodeColorMap) + std::vector colorVec(endId + 1, App::Color(0, 1, 0)); + for (const auto& it : NodeColorMap) { colorVec[it.first] = it.second; + } setColorByNodeIdHelper(colorVec); - } -void ViewProviderFemMesh::setColorByNodeId(const std::vector &NodeIds,const std::vector &NodeColors) +void ViewProviderFemMesh::setColorByNodeId(const std::vector& NodeIds, + const std::vector& NodeColors) { long endId = *(std::max_element(NodeIds.begin(), NodeIds.end())); - std::vector colorVec(endId+1,App::Color(0,1,0)); - long i=0; - for(std::vector::const_iterator it=NodeIds.begin();it!=NodeIds.end();++it,i++) + std::vector colorVec(endId + 1, App::Color(0, 1, 0)); + long i = 0; + for (std::vector::const_iterator it = NodeIds.begin(); it != NodeIds.end(); ++it, i++) { colorVec[*it] = NodeColors[i]; + } setColorByNodeIdHelper(colorVec); - } -void ViewProviderFemMesh::setColorByNodeIdHelper(const std::vector &colorVec) +void ViewProviderFemMesh::setColorByNodeIdHelper(const std::vector& colorVec) { pcMatBinding->value = SoMaterialBinding::PER_VERTEX_INDEXED; @@ -541,11 +582,12 @@ void ViewProviderFemMesh::setColorByNodeIdHelper(const std::vector & pcShapeMaterial->diffuseColor.setNum(vNodeElementIdx.size()); SbColor* colors = pcShapeMaterial->diffuseColor.startEditing(); - long i=0; - for(std::vector::const_iterator it=vNodeElementIdx.begin() - ;it!=vNodeElementIdx.end() - ;++it,i++) - colors[i] = SbColor(colorVec[*it].r,colorVec[*it].g,colorVec[*it].b); + long i = 0; + for (std::vector::const_iterator it = vNodeElementIdx.begin(); + it != vNodeElementIdx.end(); + ++it, i++) { + colors[i] = SbColor(colorVec[*it].r, colorVec[*it].g, colorVec[*it].b); + } pcShapeMaterial->diffuseColor.finishEditing(); } @@ -555,45 +597,51 @@ void ViewProviderFemMesh::resetColorByNodeId() pcMatBinding->value = SoMaterialBinding::OVERALL; pcShapeMaterial->diffuseColor.setNum(0); const App::Color& c = ShapeColor.getValue(); - pcShapeMaterial->diffuseColor.setValue(c.r,c.g,c.b); - + pcShapeMaterial->diffuseColor.setValue(c.r, c.g, c.b); } -void ViewProviderFemMesh::setDisplacementByNodeId(const std::map &NodeDispMap) +void ViewProviderFemMesh::setDisplacementByNodeId(const std::map& NodeDispMap) { long startId = NodeDispMap.begin()->first; long endId = (--NodeDispMap.end())->first; - std::vector vecVec(endId-startId+2,Base::Vector3d()); + std::vector vecVec(endId - startId + 2, Base::Vector3d()); - for(const auto & it : NodeDispMap) - vecVec[it.first-startId] = it.second; + for (const auto& it : NodeDispMap) { + vecVec[it.first - startId] = it.second; + } - setDisplacementByNodeIdHelper(vecVec,startId); + setDisplacementByNodeIdHelper(vecVec, startId); } -void ViewProviderFemMesh::setDisplacementByNodeId(const std::vector &NodeIds,const std::vector &NodeDisps) +void ViewProviderFemMesh::setDisplacementByNodeId(const std::vector& NodeIds, + const std::vector& NodeDisps) { long startId = *(std::min_element(NodeIds.begin(), NodeIds.end())); - long endId = *(std::max_element(NodeIds.begin(), NodeIds.end())); + long endId = *(std::max_element(NodeIds.begin(), NodeIds.end())); - std::vector vecVec(endId-startId+2,Base::Vector3d()); + std::vector vecVec(endId - startId + 2, Base::Vector3d()); - long i=0; - for(std::vector::const_iterator it=NodeIds.begin();it!=NodeIds.end();++it,i++) - vecVec[*it-startId] = NodeDisps[i]; + long i = 0; + for (std::vector::const_iterator it = NodeIds.begin(); it != NodeIds.end(); ++it, i++) { + vecVec[*it - startId] = NodeDisps[i]; + } - setDisplacementByNodeIdHelper(vecVec,startId); + setDisplacementByNodeIdHelper(vecVec, startId); } -void ViewProviderFemMesh::setDisplacementByNodeIdHelper(const std::vector& DispVector,long startId) +void ViewProviderFemMesh::setDisplacementByNodeIdHelper( + const std::vector& DispVector, + long startId) { DisplacementVector.resize(vNodeElementIdx.size()); - int i=0; - for(std::vector::const_iterator it=vNodeElementIdx.begin();it!=vNodeElementIdx.end();++it,i++) - DisplacementVector[i] = DispVector[*it-startId]; + int i = 0; + for (std::vector::const_iterator it = vNodeElementIdx.begin(); + it != vNodeElementIdx.end(); + ++it, i++) { + DisplacementVector[i] = DispVector[*it - startId]; + } applyDisplacementToNodes(1.0); - } void ViewProviderFemMesh::resetDisplacementByNodeId() @@ -604,15 +652,16 @@ void ViewProviderFemMesh::resetDisplacementByNodeId() /// reaply the node displacement with a certain factor and do a redraw void ViewProviderFemMesh::applyDisplacementToNodes(double factor) { - if(DisplacementVector.empty()) + if (DisplacementVector.empty()) { return; + } - float x,y,z; + float x, y, z; // set the point coordinates long sz = pcCoords->point.getNum(); SbVec3f* verts = pcCoords->point.startEditing(); - for (long i=0;i < sz ;i++) { - verts[i].getValue(x,y,z); + for (long i = 0; i < sz; i++) { + verts[i].getValue(x, y, z); // undo old factor# Base::Vector3d oldDisp = DisplacementVector[i] * DisplacementFactor; x -= oldDisp.x; @@ -624,31 +673,33 @@ void ViewProviderFemMesh::applyDisplacementToNodes(double factor) y += newDisp.y; z += newDisp.z; // set the new value - verts[i].setValue(x,y,z); + verts[i].setValue(x, y, z); } pcCoords->point.finishEditing(); DisplacementFactor = factor; } -void ViewProviderFemMesh::setColorByElementId(const std::map &ElementColorMap) +void ViewProviderFemMesh::setColorByElementId(const std::map& ElementColorMap) { - pcMatBinding->value = SoMaterialBinding::PER_FACE ; + pcMatBinding->value = SoMaterialBinding::PER_FACE; // resizing and writing the color vector: pcShapeMaterial->diffuseColor.setNum(vFaceElementIdx.size()); SbColor* colors = pcShapeMaterial->diffuseColor.startEditing(); - int i=0; - for(std::vector::const_iterator it=vFaceElementIdx.begin() - ;it!=vFaceElementIdx.end() - ;++it,i++){ - unsigned long ElemIdx = ((*it)>>3); - const std::map::const_iterator pos = ElementColorMap.find(ElemIdx); - if(pos == ElementColorMap.end()) - colors[i] = SbColor(0,1,0); - else - colors[i] = SbColor(pos->second.r,pos->second.g,pos->second.b); + int i = 0; + for (std::vector::const_iterator it = vFaceElementIdx.begin(); + it != vFaceElementIdx.end(); + ++it, i++) { + unsigned long ElemIdx = ((*it) >> 3); + const std::map::const_iterator pos = ElementColorMap.find(ElemIdx); + if (pos == ElementColorMap.end()) { + colors[i] = SbColor(0, 1, 0); + } + else { + colors[i] = SbColor(pos->second.r, pos->second.g, pos->second.b); + } } pcShapeMaterial->diffuseColor.finishEditing(); @@ -659,17 +710,17 @@ void ViewProviderFemMesh::resetColorByElementId() pcMatBinding->value = SoMaterialBinding::OVERALL; pcShapeMaterial->diffuseColor.setNum(0); const App::Color& c = ShapeColor.getValue(); - pcShapeMaterial->diffuseColor.setValue(c.r,c.g,c.b); - + pcShapeMaterial->diffuseColor.setValue(c.r, c.g, c.b); } // ---------------------------------------------------------------------------- -void ViewProviderFEMMeshBuilder::buildNodes(const App::Property* prop, std::vector& nodes) const +void ViewProviderFEMMeshBuilder::buildNodes(const App::Property* prop, + std::vector& nodes) const { - SoCoordinate3 *pcPointsCoord=nullptr; - SoIndexedFaceSet *pcFaces=nullptr; - SoIndexedLineSet *pcLines=nullptr; + SoCoordinate3* pcPointsCoord = nullptr; + SoIndexedFaceSet* pcFaces = nullptr; + SoIndexedLineSet* pcLines = nullptr; if (nodes.empty()) { pcPointsCoord = new SoCoordinate3(); @@ -679,43 +730,53 @@ void ViewProviderFEMMeshBuilder::buildNodes(const App::Property* prop, std::vect nodes.push_back(pcFaces); } else if (nodes.size() == 2) { - if (nodes[0]->getTypeId() == SoCoordinate3::getClassTypeId()) + if (nodes[0]->getTypeId() == SoCoordinate3::getClassTypeId()) { pcPointsCoord = static_cast(nodes[0]); - if (nodes[1]->getTypeId() == SoIndexedFaceSet::getClassTypeId()) + } + if (nodes[1]->getTypeId() == SoIndexedFaceSet::getClassTypeId()) { pcFaces = static_cast(nodes[1]); + } } - if (pcPointsCoord && pcFaces && pcLines){ + if (pcPointsCoord && pcFaces && pcLines) { std::vector vFaceElementIdx; std::vector vNodeElementIdx; bool onlyEdges; - createMesh(prop, pcPointsCoord, pcFaces,pcLines,vFaceElementIdx,vNodeElementIdx,onlyEdges,false,0); + createMesh(prop, + pcPointsCoord, + pcFaces, + pcLines, + vFaceElementIdx, + vNodeElementIdx, + onlyEdges, + false, + 0); } } -inline void insEdgeVec(std::map > &map, int n1, int n2) +inline void insEdgeVec(std::map>& map, int n1, int n2) { - //FIXME: The if-else distinction doesn't make sense - //if (n1 &vFaceElementIdx, - std::vector &vNodeElementIdx, - bool &onlyEdges, + std::vector& vFaceElementIdx, + std::vector& vNodeElementIdx, + bool& onlyEdges, bool ShowInner, int MaxFacesShowInner) const { @@ -728,14 +789,15 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, int numNodes = data->NbNodes(); int numEdges = data->NbEdges(); - if (numFaces+numNodes+numEdges == 0) { + if (numFaces + numNodes + numEdges == 0) { coords->point.setNum(0); faces->coordIndex.setNum(0); lines->coordIndex.setNum(0); return; } Base::TimeInfo Start; - Base::Console().Log("Start: ViewProviderFEMMeshBuilder::createMesh() =================================\n"); + Base::Console().Log( + "Start: ViewProviderFEMMeshBuilder::createMesh() =================================\n"); const SMDS_MeshInfo& info = data->GetMeshInfo(); int numTria = info.NbTriangles(); @@ -748,59 +810,99 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, int numPris = info.NbPrisms(); - bool ShowFaces = (numFaces >0 && numVolu == 0); + bool ShowFaces = (numFaces > 0 && numVolu == 0); int numTries; - if(ShowFaces) - numTries = numTria+numQuad/*+numPoly*/+numTetr*4+numHexa*6+numPyrd*5+numPris*5; - else - numTries = numTetr*4+numHexa*6+numPyrd*5+numPris*5; - // It is not 100% sure that a prism in smesh is a pentahedron in any case, but it will be in most cases! - // See http://forum.freecad.org/viewtopic.php?f=18&t=13583#p109707 + if (ShowFaces) { + numTries = + numTria + numQuad /*+numPoly*/ + numTetr * 4 + numHexa * 6 + numPyrd * 5 + numPris * 5; + } + else { + numTries = numTetr * 4 + numHexa * 6 + numPyrd * 5 + numPris * 5; + } + // It is not 100% sure that a prism in smesh is a pentahedron in any case, but it will be in + // most cases! See http://forum.freecad.org/viewtopic.php?f=18&t=13583#p109707 - // corner case only edges (Beams) in the mesh. This need some special cases in building up visual + // corner case only edges (Beams) in the mesh. This need some special cases in building up + // visual onlyEdges = false; - if (numFaces <= 0 && numVolu <= 0 && numEdges > 0){ + if (numFaces <= 0 && numVolu <= 0 && numEdges > 0) { onlyEdges = true; } std::vector facesHelper(numTries); - Base::Console().Log(" %f: Start build up %i face helper\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo()),facesHelper.size()); + Base::Console().Log(" %f: Start build up %i face helper\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo()), + facesHelper.size()); Base::BoundBox3d BndBox; - int i=0; + int i = 0; - if (ShowFaces){ + if (ShowFaces) { SMDS_FaceIteratorPtr aFaceIter = data->facesIterator(); - for (;aFaceIter->more();) { + for (; aFaceIter->more();) { const SMDS_MeshFace* aFace = aFaceIter->next(); int num = aFace->NbNodes(); - switch(num){ - case 3: - //tria3 face = N1, N2, N3 - BndBox.Add(facesHelper[i++].set(3, aFace, aFace->GetID(), 0, aFace->GetNode(0), aFace->GetNode(1), aFace->GetNode(2))); - break; - case 4: - //quad4 face = N1, N2, N3, N4 - BndBox.Add(facesHelper[i++].set(4, aFace, aFace->GetID(), 0, aFace->GetNode(0), aFace->GetNode(1), aFace->GetNode(2), aFace->GetNode(3))); - break; - case 6: - //tria6 face = N1, N4, N2, N5, N3, N6 - BndBox.Add(facesHelper[i++].set(6, aFace, aFace->GetID(), 0, aFace->GetNode(0), aFace->GetNode(3), aFace->GetNode(1), aFace->GetNode(4), aFace->GetNode(2), aFace->GetNode(5))); - break; - case 8: - //quad8 face = N1, N5, N2, N6, N3, N7, N4, N8 - BndBox.Add(facesHelper[i++].set(8, aFace, aFace->GetID(), 0, aFace->GetNode(0), aFace->GetNode(4), aFace->GetNode(1), aFace->GetNode(5), aFace->GetNode(2), aFace->GetNode(6), aFace->GetNode(3), aFace->GetNode(7))); - break; - default: - //unknown face type - throw std::runtime_error("Node count not supported by ViewProviderFemMesh, [3|4|6|8] are allowed"); + switch (num) { + case 3: + // tria3 face = N1, N2, N3 + BndBox.Add(facesHelper[i++].set(3, + aFace, + aFace->GetID(), + 0, + aFace->GetNode(0), + aFace->GetNode(1), + aFace->GetNode(2))); + break; + case 4: + // quad4 face = N1, N2, N3, N4 + BndBox.Add(facesHelper[i++].set(4, + aFace, + aFace->GetID(), + 0, + aFace->GetNode(0), + aFace->GetNode(1), + aFace->GetNode(2), + aFace->GetNode(3))); + break; + case 6: + // tria6 face = N1, N4, N2, N5, N3, N6 + BndBox.Add(facesHelper[i++].set(6, + aFace, + aFace->GetID(), + 0, + aFace->GetNode(0), + aFace->GetNode(3), + aFace->GetNode(1), + aFace->GetNode(4), + aFace->GetNode(2), + aFace->GetNode(5))); + break; + case 8: + // quad8 face = N1, N5, N2, N6, N3, N7, N4, N8 + BndBox.Add(facesHelper[i++].set(8, + aFace, + aFace->GetID(), + 0, + aFace->GetNode(0), + aFace->GetNode(4), + aFace->GetNode(1), + aFace->GetNode(5), + aFace->GetNode(2), + aFace->GetNode(6), + aFace->GetNode(3), + aFace->GetNode(7))); + break; + default: + // unknown face type + throw std::runtime_error( + "Node count not supported by ViewProviderFemMesh, [3|4|6|8] are allowed"); } } } - else{ + else { // iterate all volumes SMDS_VolumeIteratorPtr aVolIter = data->volumesIterator(); @@ -809,164 +911,498 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, int num = aVol->NbNodes(); - switch (num){ - //tetra4 volume - case 4: - // face 1 = N1, N2, N3 - // face 2 = N1, N4, N2 - // face 3 = N2, N4, N3 - // face 4 = N3, N4, N1 - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(1), aVol->GetNode(2))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 2, aVol->GetNode(0), aVol->GetNode(3), aVol->GetNode(1))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 3, aVol->GetNode(1), aVol->GetNode(3), aVol->GetNode(2))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 4, aVol->GetNode(2), aVol->GetNode(3), aVol->GetNode(0))); - break; - //pyra5 volume - case 5: - // face 1 = N1, N2, N3, N4 - // face 2 = N1, N5, N2 - // face 3 = N2, N5, N3 - // face 4 = N3, N5, N4 - // face 5 = N4, N5, N1 - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(1), aVol->GetNode(2), aVol->GetNode(3))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 2, aVol->GetNode(0), aVol->GetNode(4), aVol->GetNode(1))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 3, aVol->GetNode(1), aVol->GetNode(4), aVol->GetNode(2))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 4, aVol->GetNode(2), aVol->GetNode(4), aVol->GetNode(3))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 5, aVol->GetNode(3), aVol->GetNode(4), aVol->GetNode(0))); - break; - //penta6 volume - case 6: - // face 1 = N1, N2, N3 - // face 2 = N4, N6, N5 - // face 3 = N1, N4, N5, N2 - // face 4 = N2, N5, N6, N3 - // face 5 = N3, N6, N4, N1 - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(1), aVol->GetNode(2))); - BndBox.Add(facesHelper[i++].set(3, aVol, aVol->GetID(), 2, aVol->GetNode(3), aVol->GetNode(5), aVol->GetNode(4))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 3, aVol->GetNode(0), aVol->GetNode(3), aVol->GetNode(4), aVol->GetNode(1))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 4, aVol->GetNode(1), aVol->GetNode(4), aVol->GetNode(5), aVol->GetNode(2))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 5, aVol->GetNode(2), aVol->GetNode(5), aVol->GetNode(3), aVol->GetNode(0))); - break; - //hexa8 volume - case 8: - // face 1 = N1, N2, N3, N4 - // face 2 = N5, N8, N7, N6 - // face 3 = N1, N5, N6, N2 - // face 4 = N2, N6, N7, N3 - // face 5 = N3, N7, N8, N4 - // face 6 = N4, N8, N5, N1 - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(1), aVol->GetNode(2), aVol->GetNode(3))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 2, aVol->GetNode(4), aVol->GetNode(7), aVol->GetNode(6), aVol->GetNode(5))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 3, aVol->GetNode(0), aVol->GetNode(4), aVol->GetNode(5), aVol->GetNode(1))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 4, aVol->GetNode(1), aVol->GetNode(5), aVol->GetNode(6), aVol->GetNode(2))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 5, aVol->GetNode(2), aVol->GetNode(6), aVol->GetNode(7), aVol->GetNode(3))); - BndBox.Add(facesHelper[i++].set(4, aVol, aVol->GetID(), 6, aVol->GetNode(3), aVol->GetNode(7), aVol->GetNode(4), aVol->GetNode(0))); - break; - //tetra10 volume - case 10: - // face 1 = N1, N5, N2, N6, N3, N7 - // face 2 = N1, N8, N4, N9, N2, N5 - // face 3 = N2, N9, N4, N10, N3, N6 - // face 4 = N3, N10, N4, N8, N1, N7 - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(4), aVol->GetNode(1), aVol->GetNode(5), aVol->GetNode(2), aVol->GetNode(6))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 2, aVol->GetNode(0), aVol->GetNode(7), aVol->GetNode(3), aVol->GetNode(8), aVol->GetNode(1), aVol->GetNode(4))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 3, aVol->GetNode(1), aVol->GetNode(8), aVol->GetNode(3), aVol->GetNode(9), aVol->GetNode(2), aVol->GetNode(5))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 4, aVol->GetNode(2), aVol->GetNode(9), aVol->GetNode(3), aVol->GetNode(7), aVol->GetNode(0), aVol->GetNode(6))); - break; - //pyra13 volume - case 13: - // face 1 = N1, N6, N2, N7, N3, N8, N4, N9 - // face 2 = N1, N10, N5, N11, N2, N6 - // face 3 = N2, N11, N5, N12, N3, N7 - // face 4 = N3, N12, N5, N13, N4, N8 - // face 5 = N4, N13, N5, N10, N1, N9 - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(5), aVol->GetNode(1), aVol->GetNode(6), aVol->GetNode(2), aVol->GetNode(7), aVol->GetNode(3), aVol->GetNode(8))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 2, aVol->GetNode(0), aVol->GetNode(9), aVol->GetNode(4), aVol->GetNode(10), aVol->GetNode(1), aVol->GetNode(5))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 3, aVol->GetNode(1), aVol->GetNode(10), aVol->GetNode(4), aVol->GetNode(11), aVol->GetNode(2), aVol->GetNode(6))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 4, aVol->GetNode(2), aVol->GetNode(11), aVol->GetNode(4), aVol->GetNode(12), aVol->GetNode(3), aVol->GetNode(7))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 5, aVol->GetNode(3), aVol->GetNode(12), aVol->GetNode(4), aVol->GetNode(9), aVol->GetNode(0), aVol->GetNode(8))); - break; - //penta15 volume - case 15: - // face 1 = N1, N7, N2, N8, N3, N9 - // face 2 = N4, N12, N6, N11, N5, N10 - // face 3 = N1, N13, N4, N10, N5, N14, N2, N7 - // face 4 = N2, N14, N5, N11, N6, N15, N3, N8 - // face 5 = N3, N15, N6, N12, N4, N13, N1, N9 - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(6), aVol->GetNode(1), aVol->GetNode(7), aVol->GetNode(2), aVol->GetNode(8))); - BndBox.Add(facesHelper[i++].set(6, aVol, aVol->GetID(), 2, aVol->GetNode(3), aVol->GetNode(11), aVol->GetNode(5), aVol->GetNode(10), aVol->GetNode(4), aVol->GetNode(9))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 3, aVol->GetNode(0), aVol->GetNode(12), aVol->GetNode(3), aVol->GetNode(9), aVol->GetNode(4), aVol->GetNode(13), aVol->GetNode(1), aVol->GetNode(6))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 4, aVol->GetNode(1), aVol->GetNode(13), aVol->GetNode(4), aVol->GetNode(10), aVol->GetNode(5), aVol->GetNode(14), aVol->GetNode(2), aVol->GetNode(7))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 5, aVol->GetNode(2), aVol->GetNode(14), aVol->GetNode(5), aVol->GetNode(11), aVol->GetNode(3), aVol->GetNode(12), aVol->GetNode(0), aVol->GetNode(8))); - break; - //hexa20 volume - case 20: - // face 1 = N1, N9, N2, N10, N3, N11, N4, N12 - // face 2 = N5, N16, N8, N15, N7, N14, N6, N13 - // face 3 = N1, N17, N5, N13, N6, N18, N2, N9 - // face 4 = N2, N18, N6, N14, N7, N19, N3, N10 - // face 5 = N3, N19, N7, N15, N8, N20, N4, N11 - // face 6 = N4, N20, N8, N16, N5, N17, N1, N12 - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 1, aVol->GetNode(0), aVol->GetNode(8), aVol->GetNode(1), aVol->GetNode(9), aVol->GetNode(2), aVol->GetNode(10), aVol->GetNode(3), aVol->GetNode(11))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 2, aVol->GetNode(4), aVol->GetNode(15), aVol->GetNode(7), aVol->GetNode(14), aVol->GetNode(6), aVol->GetNode(13), aVol->GetNode(5), aVol->GetNode(12))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 3, aVol->GetNode(0), aVol->GetNode(16), aVol->GetNode(4), aVol->GetNode(12), aVol->GetNode(5), aVol->GetNode(17), aVol->GetNode(1), aVol->GetNode(8))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 4, aVol->GetNode(1), aVol->GetNode(17), aVol->GetNode(5), aVol->GetNode(13), aVol->GetNode(6), aVol->GetNode(18), aVol->GetNode(2), aVol->GetNode(9))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 5, aVol->GetNode(2), aVol->GetNode(18), aVol->GetNode(6), aVol->GetNode(14), aVol->GetNode(7), aVol->GetNode(19), aVol->GetNode(3), aVol->GetNode(10))); - BndBox.Add(facesHelper[i++].set(8, aVol, aVol->GetID(), 6, aVol->GetNode(3), aVol->GetNode(19), aVol->GetNode(7), aVol->GetNode(15), aVol->GetNode(4), aVol->GetNode(16), aVol->GetNode(0), aVol->GetNode(11))); - break; - //unknown volume type - default: - throw std::runtime_error("Node count not supported by ViewProviderFemMesh, [4|5|6|8|10|13|15|20] are allowed"); + switch (num) { + // tetra4 volume + case 4: + // face 1 = N1, N2, N3 + // face 2 = N1, N4, N2 + // face 3 = N2, N4, N3 + // face 4 = N3, N4, N1 + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(1), + aVol->GetNode(2))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(0), + aVol->GetNode(3), + aVol->GetNode(1))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(1), + aVol->GetNode(3), + aVol->GetNode(2))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(2), + aVol->GetNode(3), + aVol->GetNode(0))); + break; + // pyra5 volume + case 5: + // face 1 = N1, N2, N3, N4 + // face 2 = N1, N5, N2 + // face 3 = N2, N5, N3 + // face 4 = N3, N5, N4 + // face 5 = N4, N5, N1 + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(1), + aVol->GetNode(2), + aVol->GetNode(3))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(0), + aVol->GetNode(4), + aVol->GetNode(1))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(1), + aVol->GetNode(4), + aVol->GetNode(2))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(2), + aVol->GetNode(4), + aVol->GetNode(3))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 5, + aVol->GetNode(3), + aVol->GetNode(4), + aVol->GetNode(0))); + break; + // penta6 volume + case 6: + // face 1 = N1, N2, N3 + // face 2 = N4, N6, N5 + // face 3 = N1, N4, N5, N2 + // face 4 = N2, N5, N6, N3 + // face 5 = N3, N6, N4, N1 + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(1), + aVol->GetNode(2))); + BndBox.Add(facesHelper[i++].set(3, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(3), + aVol->GetNode(5), + aVol->GetNode(4))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(0), + aVol->GetNode(3), + aVol->GetNode(4), + aVol->GetNode(1))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(1), + aVol->GetNode(4), + aVol->GetNode(5), + aVol->GetNode(2))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 5, + aVol->GetNode(2), + aVol->GetNode(5), + aVol->GetNode(3), + aVol->GetNode(0))); + break; + // hexa8 volume + case 8: + // face 1 = N1, N2, N3, N4 + // face 2 = N5, N8, N7, N6 + // face 3 = N1, N5, N6, N2 + // face 4 = N2, N6, N7, N3 + // face 5 = N3, N7, N8, N4 + // face 6 = N4, N8, N5, N1 + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(1), + aVol->GetNode(2), + aVol->GetNode(3))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(4), + aVol->GetNode(7), + aVol->GetNode(6), + aVol->GetNode(5))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(0), + aVol->GetNode(4), + aVol->GetNode(5), + aVol->GetNode(1))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(1), + aVol->GetNode(5), + aVol->GetNode(6), + aVol->GetNode(2))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 5, + aVol->GetNode(2), + aVol->GetNode(6), + aVol->GetNode(7), + aVol->GetNode(3))); + BndBox.Add(facesHelper[i++].set(4, + aVol, + aVol->GetID(), + 6, + aVol->GetNode(3), + aVol->GetNode(7), + aVol->GetNode(4), + aVol->GetNode(0))); + break; + // tetra10 volume + case 10: + // face 1 = N1, N5, N2, N6, N3, N7 + // face 2 = N1, N8, N4, N9, N2, N5 + // face 3 = N2, N9, N4, N10, N3, N6 + // face 4 = N3, N10, N4, N8, N1, N7 + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(4), + aVol->GetNode(1), + aVol->GetNode(5), + aVol->GetNode(2), + aVol->GetNode(6))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(0), + aVol->GetNode(7), + aVol->GetNode(3), + aVol->GetNode(8), + aVol->GetNode(1), + aVol->GetNode(4))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(1), + aVol->GetNode(8), + aVol->GetNode(3), + aVol->GetNode(9), + aVol->GetNode(2), + aVol->GetNode(5))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(2), + aVol->GetNode(9), + aVol->GetNode(3), + aVol->GetNode(7), + aVol->GetNode(0), + aVol->GetNode(6))); + break; + // pyra13 volume + case 13: + // face 1 = N1, N6, N2, N7, N3, N8, N4, N9 + // face 2 = N1, N10, N5, N11, N2, N6 + // face 3 = N2, N11, N5, N12, N3, N7 + // face 4 = N3, N12, N5, N13, N4, N8 + // face 5 = N4, N13, N5, N10, N1, N9 + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(5), + aVol->GetNode(1), + aVol->GetNode(6), + aVol->GetNode(2), + aVol->GetNode(7), + aVol->GetNode(3), + aVol->GetNode(8))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(0), + aVol->GetNode(9), + aVol->GetNode(4), + aVol->GetNode(10), + aVol->GetNode(1), + aVol->GetNode(5))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(1), + aVol->GetNode(10), + aVol->GetNode(4), + aVol->GetNode(11), + aVol->GetNode(2), + aVol->GetNode(6))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(2), + aVol->GetNode(11), + aVol->GetNode(4), + aVol->GetNode(12), + aVol->GetNode(3), + aVol->GetNode(7))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 5, + aVol->GetNode(3), + aVol->GetNode(12), + aVol->GetNode(4), + aVol->GetNode(9), + aVol->GetNode(0), + aVol->GetNode(8))); + break; + // penta15 volume + case 15: + // face 1 = N1, N7, N2, N8, N3, N9 + // face 2 = N4, N12, N6, N11, N5, N10 + // face 3 = N1, N13, N4, N10, N5, N14, N2, N7 + // face 4 = N2, N14, N5, N11, N6, N15, N3, N8 + // face 5 = N3, N15, N6, N12, N4, N13, N1, N9 + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(6), + aVol->GetNode(1), + aVol->GetNode(7), + aVol->GetNode(2), + aVol->GetNode(8))); + BndBox.Add(facesHelper[i++].set(6, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(3), + aVol->GetNode(11), + aVol->GetNode(5), + aVol->GetNode(10), + aVol->GetNode(4), + aVol->GetNode(9))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(0), + aVol->GetNode(12), + aVol->GetNode(3), + aVol->GetNode(9), + aVol->GetNode(4), + aVol->GetNode(13), + aVol->GetNode(1), + aVol->GetNode(6))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(1), + aVol->GetNode(13), + aVol->GetNode(4), + aVol->GetNode(10), + aVol->GetNode(5), + aVol->GetNode(14), + aVol->GetNode(2), + aVol->GetNode(7))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 5, + aVol->GetNode(2), + aVol->GetNode(14), + aVol->GetNode(5), + aVol->GetNode(11), + aVol->GetNode(3), + aVol->GetNode(12), + aVol->GetNode(0), + aVol->GetNode(8))); + break; + // hexa20 volume + case 20: + // face 1 = N1, N9, N2, N10, N3, N11, N4, N12 + // face 2 = N5, N16, N8, N15, N7, N14, N6, N13 + // face 3 = N1, N17, N5, N13, N6, N18, N2, N9 + // face 4 = N2, N18, N6, N14, N7, N19, N3, N10 + // face 5 = N3, N19, N7, N15, N8, N20, N4, N11 + // face 6 = N4, N20, N8, N16, N5, N17, N1, N12 + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 1, + aVol->GetNode(0), + aVol->GetNode(8), + aVol->GetNode(1), + aVol->GetNode(9), + aVol->GetNode(2), + aVol->GetNode(10), + aVol->GetNode(3), + aVol->GetNode(11))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 2, + aVol->GetNode(4), + aVol->GetNode(15), + aVol->GetNode(7), + aVol->GetNode(14), + aVol->GetNode(6), + aVol->GetNode(13), + aVol->GetNode(5), + aVol->GetNode(12))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 3, + aVol->GetNode(0), + aVol->GetNode(16), + aVol->GetNode(4), + aVol->GetNode(12), + aVol->GetNode(5), + aVol->GetNode(17), + aVol->GetNode(1), + aVol->GetNode(8))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 4, + aVol->GetNode(1), + aVol->GetNode(17), + aVol->GetNode(5), + aVol->GetNode(13), + aVol->GetNode(6), + aVol->GetNode(18), + aVol->GetNode(2), + aVol->GetNode(9))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 5, + aVol->GetNode(2), + aVol->GetNode(18), + aVol->GetNode(6), + aVol->GetNode(14), + aVol->GetNode(7), + aVol->GetNode(19), + aVol->GetNode(3), + aVol->GetNode(10))); + BndBox.Add(facesHelper[i++].set(8, + aVol, + aVol->GetID(), + 6, + aVol->GetNode(3), + aVol->GetNode(19), + aVol->GetNode(7), + aVol->GetNode(15), + aVol->GetNode(4), + aVol->GetNode(16), + aVol->GetNode(0), + aVol->GetNode(11))); + break; + // unknown volume type + default: + throw std::runtime_error("Node count not supported by ViewProviderFemMesh, " + "[4|5|6|8|10|13|15|20] are allowed"); } } } int FaceSize = facesHelper.size(); - if( FaceSize < MaxFacesShowInner){ - Base::Console().Log(" %f: Start eliminate internal faces SIMPLE\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + if (FaceSize < MaxFacesShowInner) { + Base::Console().Log(" %f: Start eliminate internal faces SIMPLE\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); // search for double (inside) faces and hide them - if(!ShowInner){ - for(int l=0; l< FaceSize;l++){ - if(! facesHelper[l].hide){ - for(int i=l+1; i Grid(NbrX*NbrY*NbrZ); + std::vector Grid(NbrX * NbrY * NbrZ); unsigned int iX = 0; unsigned int iY = 0; unsigned int iZ = 0; - for(int l=0; l< FaceSize;l++){ + for (int l = 0; l < FaceSize; l++) { Base::Vector3d point(facesHelper[l].getFirstNodePoint()); double x = (point.x - Xmin) / Xln; double y = (point.y - Ymin) / Yln; @@ -976,40 +1412,44 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, iY = y; iZ = z; - if(iX >= NbrX || iY >= NbrY || iZ >= NbrZ) + if (iX >= NbrX || iY >= NbrY || iZ >= NbrZ) { Base::Console().Log(" Outof range!\n"); + } - Grid[iX + iY*NbrX + iZ*NbrX*NbrY].push_back(&facesHelper[l]); + Grid[iX + iY * NbrX + iZ * NbrX * NbrY].push_back(&facesHelper[l]); } - unsigned int max =0, avg = 0; - for(const auto& it : Grid){ - for(size_t l=0; l< it.size();l++){ - if(! it[l]->hide){ - for(size_t i=l+1; iisSameFace(*(it[i])) ){ + unsigned int max = 0, avg = 0; + for (const auto& it : Grid) { + for (size_t l = 0; l < it.size(); l++) { + if (!it[l]->hide) { + for (size_t i = l + 1; i < it.size(); i++) { + if (it[l]->isSameFace(*(it[i]))) { break; } } } } - if(it.size() > max)max=it.size(); + if (it.size() > max) { + max = it.size(); + } avg += it.size(); } - avg = avg/Grid.size(); + avg = avg / Grid.size(); - Base::Console().Log(" VoxelSize: Max:%i ,Average:%i\n",max,avg); + Base::Console().Log(" VoxelSize: Max:%i ,Average:%i\n", max, avg); - } //if( FaceSize < 1000) + } // if( FaceSize < 1000) - Base::Console().Log(" %f: Start build up node map\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: Start build up node map\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); // sort out double nodes and build up index map std::map mapNodeIndex; // handling the corner case beams only, means no faces/triangles only nodes and edges - if (onlyEdges){ + if (onlyEdges) { SMDS_EdgeIteratorPtr aEdgeIte = data->edgesIterator(); for (; aEdgeIte->more();) { @@ -1017,31 +1457,34 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, int num = aEdge->NbNodes(); for (int i = 0; i < num; i++) { mapNodeIndex[aEdge->GetNode(i)] = 0; - } } - }else{ + } + else { for (int l = 0; l < FaceSize; l++) { if (!facesHelper[l].hide) { for (auto Node : facesHelper[l].Nodes) { - if (Node) + if (Node) { mapNodeIndex[Node] = 0; - else + } + else { break; + } } } } } - Base::Console().Log(" %f: Start set point vector\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: Start set point vector\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); // set the point coordinates coords->point.setNum(mapNodeIndex.size()); - vNodeElementIdx.resize(mapNodeIndex.size() ); - std::map::iterator it= mapNodeIndex.begin(); + vNodeElementIdx.resize(mapNodeIndex.size()); + std::map::iterator it = mapNodeIndex.begin(); SbVec3f* verts = coords->point.startEditing(); - for (int i=0;it != mapNodeIndex.end() ;++it,i++) { - verts[i].setValue((float)it->first->X(),(float)it->first->Y(),(float)it->first->Z()); + for (int i = 0; it != mapNodeIndex.end(); ++it, i++) { + verts[i].setValue((float)it->first->X(), (float)it->first->Y(), (float)it->first->Z()); it->second = i; // set selection idx vNodeElementIdx[i] = it->first->GetID(); @@ -1049,72 +1492,87 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, coords->point.finishEditing(); - // count triangle size - Base::Console().Log(" %f: Start count triangle size\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); - int triangleCount=0; - for (int l = 0; l < FaceSize; l++){ - if (!facesHelper[l].hide) - switch (facesHelper[l].Size){ - case 3:triangleCount++; break; // 3-node triangle face --> 1 triangle - case 4:triangleCount += 2; break; // 4-node quadrangle face --> 2 triangles - case 6:triangleCount += 4; break; // 6-node triangle face --> 4 triangles - case 8:triangleCount += 6; break; // 8-node quadrangle face --> 6 triangles - default: throw std::runtime_error("Face with unknown node count found, only display mode nodes is supported for this element (tiangleCount)"); + Base::Console().Log(" %f: Start count triangle size\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); + int triangleCount = 0; + for (int l = 0; l < FaceSize; l++) { + if (!facesHelper[l].hide) { + switch (facesHelper[l].Size) { + case 3: + triangleCount++; + break; // 3-node triangle face --> 1 triangle + case 4: + triangleCount += 2; + break; // 4-node quadrangle face --> 2 triangles + case 6: + triangleCount += 4; + break; // 6-node triangle face --> 4 triangles + case 8: + triangleCount += 6; + break; // 8-node quadrangle face --> 6 triangles + default: + throw std::runtime_error( + "Face with unknown node count found, only display mode nodes is supported " + "for this element (tiangleCount)"); + } } } - Base::Console().Log(" NumTriangles:%i\n",triangleCount); + Base::Console().Log(" NumTriangles:%i\n", triangleCount); // edge map collect and sort edges of the faces to be shown. - std::map > EdgeMap; + std::map> EdgeMap; // handling the corner case beams only, means no faces/triangles only nodes and edges - if (onlyEdges){ + if (onlyEdges) { SMDS_EdgeIteratorPtr aEdgeIte = data->edgesIterator(); for (; aEdgeIte->more();) { const SMDS_MeshEdge* aEdge = aEdgeIte->next(); int num = aEdge->NbNodes(); - switch (num){ - case 2: { // Seg2: N1, N2 - int nIdx0 = mapNodeIndex[aEdge->GetNode(0)]; - int nIdx1 = mapNodeIndex[aEdge->GetNode(1)]; - insEdgeVec(EdgeMap, nIdx0, nIdx1); - break; - } + switch (num) { + case 2: { // Seg2: N1, N2 + int nIdx0 = mapNodeIndex[aEdge->GetNode(0)]; + int nIdx1 = mapNodeIndex[aEdge->GetNode(1)]; + insEdgeVec(EdgeMap, nIdx0, nIdx1); + break; + } - case 3: { // Seg3: N1, N2, N3 (N3 is middle Node) - int nIdx0 = mapNodeIndex[aEdge->GetNode(0)]; - int nIdx1 = mapNodeIndex[aEdge->GetNode(1)]; - int nIdx2 = mapNodeIndex[aEdge->GetNode(2)]; - insEdgeVec(EdgeMap, nIdx0, nIdx2); - insEdgeVec(EdgeMap, nIdx2, nIdx1); - break; - } + case 3: { // Seg3: N1, N2, N3 (N3 is middle Node) + int nIdx0 = mapNodeIndex[aEdge->GetNode(0)]; + int nIdx1 = mapNodeIndex[aEdge->GetNode(1)]; + int nIdx2 = mapNodeIndex[aEdge->GetNode(2)]; + insEdgeVec(EdgeMap, nIdx0, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx1); + break; + } } } } - Base::Console().Log(" %f: Start build up triangle vector\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: Start build up triangle vector\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); // set the triangle face indices - faces->coordIndex.setNum(4*triangleCount); + faces->coordIndex.setNum(4 * triangleCount); vFaceElementIdx.resize(triangleCount); - int index=0,indexIdx=0; + int index = 0, indexIdx = 0; int32_t* indices = faces->coordIndex.startEditing(); - // iterate all non-hidden element faces, always assure CLOCKWISE triangle ordering to allow backface culling - for(int l=0; l< FaceSize;l++){ - if(! facesHelper[l].hide){ - switch( facesHelper[l].Element->NbNodes()){ + // iterate all non-hidden element faces, always assure CLOCKWISE triangle ordering to allow + // backface culling + for (int l = 0; l < FaceSize; l++) { + if (!facesHelper[l].hide) { + switch (facesHelper[l].Element->NbNodes()) { // 3 nodes case 3: // tria3 face - switch (facesHelper[l].FaceNo){ - case 0: { // tria3 face, 3-node triangle + switch (facesHelper[l].FaceNo) { + case 0: { // tria3 face, 3-node triangle // prefeche all node indexes of this face int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; - // create triangle number 1 ---------------------------------------------- - // fill in the node indexes in CLOCKWISE order + // create triangle number 1 + // ---------------------------------------------- fill in the node + // indexes in CLOCKWISE order indices[index++] = nIdx0; indices[index++] = nIdx1; indices[index++] = nIdx2; @@ -1124,24 +1582,27 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx0); // remember the element and face number for that triangle - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - break; } - default: assert(0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + break; + } + default: + assert(0); } break; // 4 nodes case 4: // quad4 face // tetra4 volume, four 3-node triangles - switch (facesHelper[l].FaceNo){ - case 0: { // quad4 face, 4-node quadrangle + switch (facesHelper[l].FaceNo) { + case 0: { // quad4 face, 4-node quadrangle // prefeche all node indexes of this face int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx3 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; - // create triangle number 1 ---------------------------------------------- - // fill in the node indexes in CLOCKWISE order + // create triangle number 1 + // ---------------------------------------------- fill in the node + // indexes in CLOCKWISE order indices[index++] = nIdx0; indices[index++] = nIdx1; indices[index++] = nIdx2; @@ -1150,17 +1611,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, insEdgeVec(EdgeMap, nIdx0, nIdx1); insEdgeVec(EdgeMap, nIdx1, nIdx2); // remember the element and face number for that triangle - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 2 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 2 + // ---------------------------------------------- indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx2, nIdx3); insEdgeVec(EdgeMap, nIdx3, nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - break; } - case 1: { // tetra4 volume: face 1, 3-node triangle + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + break; + } + case 1: { // tetra4 volume: face 1, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; @@ -1168,12 +1631,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - break; } - case 2: { // tetra4 volume: face 2, 3-node triangle + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + break; + } + case 2: { // tetra4 volume: face 2, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; @@ -1181,12 +1645,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); - break; } - case 3: { // tetra4 volume: face 3, 3-node triangle + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); + break; + } + case 3: { // tetra4 volume: face 3, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; @@ -1194,12 +1659,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); - break; } - case 4: { // tetra4 volume: face 4, 3-node triangle + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); + break; + } + case 4: { // tetra4 volume: face 4, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; @@ -1207,19 +1673,21 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); - break; } - default: assert(0); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); + break; + } + default: + assert(0); } break; // 5 nodes case 5: // pyra5 volume, one 4-node quadrangle and four 3-node triangles - switch (facesHelper[l].FaceNo){ - case 1: { // pyra5 volume: face 1, 4-node quadrangle + switch (facesHelper[l].FaceNo) { + case 1: { // pyra5 volume: face 1, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; @@ -1228,18 +1696,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - break; } - case 2: { // pyra5 volume: face 2, 3-node triangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + break; + } + case 2: { // pyra5 volume: face 2, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; @@ -1247,12 +1716,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); - break; } - case 3: { // pyra5 volume: face 3, 3-node triangle + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); + break; + } + case 3: { // pyra5 volume: face 3, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; @@ -1260,12 +1730,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); - break; } - case 4: { // pyra5 volume: face 4, 3-node triangle + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); + break; + } + case 4: { // pyra5 volume: face 4, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; @@ -1273,12 +1744,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); - break; } - case 5: { // pyra5 volume: face 5, 3-node triangle + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); + break; + } + case 5: { // pyra5 volume: face 5, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; @@ -1286,20 +1758,22 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); - break; } - default: assert(0); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); + break; + } + default: + assert(0); } break; // 6 nodes case 6: // tria6 face // penta6 volume, two 3-node triangle and three 4-node quadrangles - switch (facesHelper[l].FaceNo){ - case 0: { // tria6 face, 6-node triangle + switch (facesHelper[l].FaceNo) { + case 0: { // tria6 face, 6-node triangle // prefeche all node indexes of this face int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; @@ -1307,8 +1781,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, int nIdx3 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx4 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx5 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; - // create triangle number 1 ---------------------------------------------- - // fill in the node indexes in CLOCKWISE order + // create triangle number 1 + // ---------------------------------------------- fill in the node + // indexes in CLOCKWISE order indices[index++] = nIdx5; indices[index++] = nIdx0; indices[index++] = nIdx1; @@ -1317,31 +1792,35 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); // remember the element and face number for that triangle - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 2 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 2 + // ---------------------------------------------- indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 3 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 3 + // ---------------------------------------------- indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 4 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 4 + // ---------------------------------------------- indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; // this triangle has no edge (inner triangle). - break; } - case 1: { // penta6 volume: face 1, 3-node triangle + break; + } + case 1: { // penta6 volume: face 1, 3-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; @@ -1349,12 +1828,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - insEdgeVec(EdgeMap,nIdx2,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - break; } - case 2: { // penta6 volume: face 2, 3-node triangle + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + insEdgeVec(EdgeMap, nIdx2, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + break; + } + case 2: { // penta6 volume: face 2, 3-node triangle int nIdx3 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx5 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; int nIdx4 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1362,12 +1842,13 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx4; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx3,nIdx5); - insEdgeVec(EdgeMap,nIdx5,nIdx4); - insEdgeVec(EdgeMap,nIdx4,nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); - break; } - case 3: { // penta6 volume: face 3, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx3, nIdx5); + insEdgeVec(EdgeMap, nIdx5, nIdx4); + insEdgeVec(EdgeMap, nIdx4, nIdx3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); + break; + } + case 3: { // penta6 volume: face 3, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1376,18 +1857,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); - break; } - case 4: { // penta6 volume: face 4, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); + break; + } + case 4: { // penta6 volume: face 4, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; @@ -1396,18 +1878,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); - break; } - case 5: { // penta6 volume: face 5, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); + break; + } + case 5: { // penta6 volume: face 5, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; @@ -1416,26 +1899,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); - break; } - default: assert(0); + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); + break; + } + default: + assert(0); } break; // 8 nodes case 8: // quad8 face // hexa8 volume, six 4-node quadrangles - switch(facesHelper[l].FaceNo){ - case 0: { // quad8 face, 8-node quadrangle + switch (facesHelper[l].FaceNo) { + case 0: { // quad8 face, 8-node quadrangle // prefeche all node indexes of this face int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1445,8 +1930,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, int nIdx5 = mapNodeIndex[facesHelper[l].Element->GetNode(6)]; int nIdx6 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx7 = mapNodeIndex[facesHelper[l].Element->GetNode(7)]; - // create triangle number 1 ---------------------------------------------- - // fill in the node indexes in CLOCKWISE order + // create triangle number 1 + // ---------------------------------------------- fill in the node + // indexes in CLOCKWISE order indices[index++] = nIdx7; indices[index++] = nIdx0; indices[index++] = nIdx1; @@ -1455,45 +1941,51 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); // remember the element and face number for that triangle - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 2 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 2 + // ---------------------------------------------- indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 3 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 3 + // ---------------------------------------------- indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 4 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 4 + // ---------------------------------------------- indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - // create triangle number 5 ---------------------------------------------- + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + // create triangle number 5 + // ---------------------------------------------- indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; // this triangle has no edge (inner triangle) - // create triangle number 6 ---------------------------------------------- + // create triangle number 6 + // ---------------------------------------------- indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; // this triangle has no edge (inner triangle) - break; } - case 1: { // hexa8 volume: face 1, 4-node quadrangle + break; + } + case 1: { // hexa8 volume: face 1, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; @@ -1502,18 +1994,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); - break; } - case 2: { // hexa8 volume: face 2, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); + break; + } + case 2: { // hexa8 volume: face 2, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(7)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(6)]; @@ -1522,18 +2015,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); - break; } - case 3: { // hexa8 volume: face 3, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); + break; + } + case 3: { // hexa8 volume: face 3, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; @@ -1542,18 +2036,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); - break; } - case 4: { // hexa8 volume: face 4, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); + break; + } + case 4: { // hexa8 volume: face 4, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(6)]; @@ -1562,18 +2057,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); - break; } - case 5: { // hexa8 volume: face 5, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); + break; + } + case 5: { // hexa8 volume: face 5, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(6)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(7)]; @@ -1582,18 +2078,19 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); - break; } - case 6: { // hexa8 volume: face 6, 4-node quadrangle + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); + break; + } + case 6: { // hexa8 volume: face 6, 4-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(7)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1602,25 +2099,27 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx0,nIdx1); - insEdgeVec(EdgeMap,nIdx1,nIdx2); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,5); + insEdgeVec(EdgeMap, nIdx0, nIdx1); + insEdgeVec(EdgeMap, nIdx1, nIdx2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 5); indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = nIdx0; indices[index++] = SO_END_FACE_INDEX; - insEdgeVec(EdgeMap,nIdx2,nIdx3); - insEdgeVec(EdgeMap,nIdx3,nIdx0); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,5); - break; } - default: assert(0); + insEdgeVec(EdgeMap, nIdx2, nIdx3); + insEdgeVec(EdgeMap, nIdx3, nIdx0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 5); + break; + } + default: + assert(0); } break; // 10 nodes case 10: // tetra10 volume, four 6-node triangles - switch(facesHelper[l].FaceNo){ - case 1: { // tetra10 volume: face 1, 6-node triangle + switch (facesHelper[l].FaceNo) { + case 1: { // tetra10 volume: face 1, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; @@ -1633,27 +2132,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 2: { // tetra10 volume: face 2, 6-node triangle + break; + } + case 2: { // tetra10 volume: face 2, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(7)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; @@ -1666,27 +2166,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 3: { // tetra10 volume: face 3, 6-node triangle + break; + } + case 3: { // tetra10 volume: face 3, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(8)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; @@ -1699,27 +2200,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 4: { // tetra10 volume: face 4, 6-node triangle + break; + } + case 4: { // tetra10 volume: face 4, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(9)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; @@ -1732,34 +2234,36 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - default: assert(0); + break; + } + default: + assert(0); } break; // 13 nodes case 13: // pyra13 volume, four 6-node triangle and one 8-node quadrangles - switch(facesHelper[l].FaceNo){ - case 1: { // pyra13 volume: face 1, 8-node quadrangles + switch (facesHelper[l].FaceNo) { + case 1: { // pyra13 volume: face 1, 8-node quadrangles int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; @@ -1804,8 +2308,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 2: { // pyra13 volume: face 2, 6-node triangle + break; + } + case 2: { // pyra13 volume: face 2, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(9)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1818,27 +2323,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 3: { // pyra13 volume: face 3, 6-node triangle + break; + } + case 3: { // pyra13 volume: face 3, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(10)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1851,27 +2357,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 4: { // pyra13 volume: face 4, 6-node triangle + break; + } + case 4: { // pyra13 volume: face 4, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(11)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1884,27 +2391,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 5: { // pyra13 volume: face 5, 6-node triangle + break; + } + case 5: { // pyra13 volume: face 5, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(12)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -1917,34 +2425,36 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - default: assert(0); + break; + } + default: + assert(0); } break; // 15 nodes case 15: // penta15 volume, two 6-node triangles and three 8-node quadrangles - switch(facesHelper[l].FaceNo){ - case 1: { // penta15 volume: face 1, 6-node triangle + switch (facesHelper[l].FaceNo) { + case 1: { // penta15 volume: face 1, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(6)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; @@ -1957,27 +2467,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 2: { // penta15 volume: face 2, 6-node triangle + break; + } + case 2: { // penta15 volume: face 2, 6-node triangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(11)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; @@ -1990,27 +2501,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx1; indices[index++] = nIdx3; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; - break; } - case 3: { // penta15 volume: face 3, 8-node quadrangle + break; + } + case 3: { // penta15 volume: face 3, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(12)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; @@ -2025,28 +2537,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2055,8 +2567,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 4: { // penta15 volume: face 4, 8-node quadrangle + break; + } + case 4: { // penta15 volume: face 4, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(13)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -2071,28 +2584,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2101,8 +2614,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 5: { // penta15 volume: face 5, 8-node quadrangle + break; + } + case 5: { // penta15 volume: face 5, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(14)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; @@ -2117,28 +2631,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2147,15 +2661,17 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - default: assert(0); + break; + } + default: + assert(0); } break; // 20 nodes case 20: // hexa20 volume, six 8-node quadrangles - switch(facesHelper[l].FaceNo){ - case 1: { // hexa20 volume: face 1 + switch (facesHelper[l].FaceNo) { + case 1: { // hexa20 volume: face 1 int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(8)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; @@ -2170,28 +2686,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,0); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 0); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2200,8 +2716,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 2: { // hexa20 volume: face 2, 8-node quadrangle + break; + } + case 2: { // hexa20 volume: face 2, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(15)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(7)]; @@ -2216,28 +2733,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,1); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 1); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2246,8 +2763,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 3: { // hexa20 volume: face 3, 8-node quadrangle + break; + } + case 3: { // hexa20 volume: face 3, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(0)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(16)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(4)]; @@ -2262,28 +2780,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,2); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 2); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2292,8 +2810,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 4: { // hexa20 volume: face 4, 8-node quadrangle + break; + } + case 4: { // hexa20 volume: face 4, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(1)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(17)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(5)]; @@ -2308,28 +2827,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,3); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 3); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2338,8 +2857,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 5: { // hexa20 volume: face 5, 8-node quadrangle + break; + } + case 5: { // hexa20 volume: face 5, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(2)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(18)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(6)]; @@ -2354,28 +2874,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,4); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 4); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2384,8 +2904,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - case 6: { // hexa20 volume: face 6, 8-node quadrangle + break; + } + case 6: { // hexa20 volume: face 6, 8-node quadrangle int nIdx0 = mapNodeIndex[facesHelper[l].Element->GetNode(3)]; int nIdx1 = mapNodeIndex[facesHelper[l].Element->GetNode(19)]; int nIdx2 = mapNodeIndex[facesHelper[l].Element->GetNode(7)]; @@ -2400,28 +2921,28 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx7, nIdx0); insEdgeVec(EdgeMap, nIdx0, nIdx1); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,5); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 5); indices[index++] = nIdx1; indices[index++] = nIdx2; indices[index++] = nIdx3; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx1, nIdx2); insEdgeVec(EdgeMap, nIdx2, nIdx3); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,5); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 5); indices[index++] = nIdx3; indices[index++] = nIdx4; indices[index++] = nIdx5; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx3, nIdx4); insEdgeVec(EdgeMap, nIdx4, nIdx5); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,5); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 5); indices[index++] = nIdx5; indices[index++] = nIdx6; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; insEdgeVec(EdgeMap, nIdx5, nIdx6); insEdgeVec(EdgeMap, nIdx6, nIdx7); - vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber,5); + vFaceElementIdx[indexIdx++] = ElemFold(facesHelper[l].ElementNumber, 5); indices[index++] = nIdx7; indices[index++] = nIdx1; indices[index++] = nIdx3; @@ -2430,33 +2951,43 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, indices[index++] = nIdx5; indices[index++] = nIdx7; indices[index++] = SO_END_FACE_INDEX; - break; } - default: assert(0); + break; + } + default: + assert(0); } break; // not implemented elements - default: throw std::runtime_error("Element with unknown node count found (may be not implemented), only display mode nodes is supported for this element (NodeCount)"); + default: + throw std::runtime_error( + "Element with unknown node count found (may be not implemented), only " + "display mode nodes is supported for this element (NodeCount)"); } } } faces->coordIndex.finishEditing(); - Base::Console().Log(" %f: Start build up edge vector\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); + Base::Console().Log(" %f: Start build up edge vector\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); // std::map > EdgeMap; // count edges int EdgeSize = 0; - for(std::map >::const_iterator it= EdgeMap.begin();it!= EdgeMap.end();++it) + for (std::map>::const_iterator it = EdgeMap.begin(); it != EdgeMap.end(); + ++it) { EdgeSize += it->second.size(); + } // set the triangle face indices - lines->coordIndex.setNum(3*EdgeSize); - index=0; + lines->coordIndex.setNum(3 * EdgeSize); + index = 0; indices = lines->coordIndex.startEditing(); - for(std::map >::const_iterator it= EdgeMap.begin();it!= EdgeMap.end();++it){ - for(std::set::const_iterator it2=it->second.begin();it2!=it->second.end();++it2){ + for (std::map>::const_iterator it = EdgeMap.begin(); it != EdgeMap.end(); + ++it) { + for (std::set::const_iterator it2 = it->second.begin(); it2 != it->second.end(); + ++it2) { indices[index++] = it->first; indices[index++] = *it2; indices[index++] = -1; @@ -2464,21 +2995,22 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, } lines->coordIndex.finishEditing(); - Base::Console().Log(" NumEdges:%i\n",EdgeSize); - - Base::Console().Log(" %f: Finish =========================================================\n",Base::TimeInfo::diffTimeF(Start,Base::TimeInfo())); - + Base::Console().Log(" NumEdges:%i\n", EdgeSize); + Base::Console().Log( + " %f: Finish =========================================================\n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); } // Python feature ----------------------------------------------------------------------- -namespace Gui { +namespace Gui +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(FemGui::ViewProviderFemMeshPython, FemGui::ViewProviderFemMesh) /// @endcond // explicit template instantiation template class FemGuiExport ViewProviderPythonFeatureT; -} +} // namespace Gui diff --git a/src/Mod/Fem/Gui/ViewProviderFemMesh.h b/src/Mod/Fem/Gui/ViewProviderFemMesh.h index 31e76fed8f..cca87ee6c4 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMesh.h +++ b/src/Mod/Fem/Gui/ViewProviderFemMesh.h @@ -38,11 +38,11 @@ class SoMaterialBinding; namespace FemGui { -class ViewProviderFEMMeshBuilder : public Gui::ViewProviderBuilder +class ViewProviderFEMMeshBuilder: public Gui::ViewProviderBuilder { public: - ViewProviderFEMMeshBuilder()= default; - ~ViewProviderFEMMeshBuilder() override= default; + ViewProviderFEMMeshBuilder() = default; + ~ViewProviderFEMMeshBuilder() override = default; void buildNodes(const App::Property*, std::vector&) const override; void createMesh(const App::Property*, SoCoordinate3*, @@ -50,13 +50,12 @@ public: SoIndexedLineSet*, std::vector&, std::vector&, - bool &edgeOnly, + bool& edgeOnly, bool ShowInner, - int MaxFacesShowInner - ) const; + int MaxFacesShowInner) const; }; -class FemGuiExport ViewProviderFemMesh : public Gui::ViewProviderGeometryObject +class FemGuiExport ViewProviderFemMesh: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemMesh); @@ -71,23 +70,26 @@ public: App::PropertyColor PointColor; App::PropertyFloatConstraint PointSize; App::PropertyFloatConstraint LineWidth; - App::PropertyBool BackfaceCulling; - App::PropertyBool ShowInner; - App::PropertyInteger MaxFacesShowInner; + App::PropertyBool BackfaceCulling; + App::PropertyBool ShowInner; + App::PropertyInteger MaxFacesShowInner; - void attach(App::DocumentObject *pcObject) override; + void attach(App::DocumentObject* pcObject) override; void setDisplayMode(const char* ModeName) override; std::vector getDisplayModes() const override; void updateData(const App::Property*) override; - /** @name Selection handling - * This group of methods do the selection handling. - * Here you can define how the selection for your ViewProvider - * works. + /** @name Selection handling + * This group of methods do the selection handling. + * Here you can define how the selection for your ViewProvider + * works. */ //@{ /// indicates if the ViewProvider use the new Selection model - bool useNewSelectionModel() const override {return true;} + bool useNewSelectionModel() const override + { + return true; + } /// return a hit element to the selection path or 0 std::string getElement(const SoDetail*) const override; SoDetail* getDetail(const char*) const override; @@ -101,34 +103,39 @@ public: void resetHighlightNodes(); /** @name Postprocessing - * this interfaces apply post processing stuff to the View- - * Provider. They can override the positioning and the color - * color or certain elements. + * this interfaces apply post processing stuff to the View- + * Provider. They can override the positioning and the color + * color or certain elements. */ //@{ /// set the color for each node - void setColorByNodeId(const std::map &NodeColorMap); - void setColorByNodeId(const std::vector &NodeIds,const std::vector &NodeColors); + void setColorByNodeId(const std::map& NodeColorMap); + void setColorByNodeId(const std::vector& NodeIds, + const std::vector& NodeColors); /// reset the view of the node colors void resetColorByNodeId(); /// set the displacement for each node - void setDisplacementByNodeId(const std::map &NodeDispMap); - void setDisplacementByNodeId(const std::vector &NodeIds,const std::vector &NodeDisps); + void setDisplacementByNodeId(const std::map& NodeDispMap); + void setDisplacementByNodeId(const std::vector& NodeIds, + const std::vector& NodeDisps); /// reset the view of the node displacement void resetDisplacementByNodeId(); /// reaply the node displacement with a certain factor and do a redraw void applyDisplacementToNodes(double factor); /// set the color for each element - void setColorByElementId(const std::map &ElementColorMap); + void setColorByElementId(const std::map& ElementColorMap); /// reset the view of the element colors void resetColorByElementId(); //@} - const std::vector &getVisibleElementFaces()const{return vFaceElementIdx;} + const std::vector& getVisibleElementFaces() const + { + return vFaceElementIdx; + } - PyObject *getPyObject() override; + PyObject* getPyObject() override; private: static App::PropertyFloatConstraint::Constraints floatRange; @@ -139,26 +146,26 @@ protected: /// get called by the container whenever a property has been changed void onChanged(const App::Property* prop) override; - void setColorByNodeIdHelper(const std::vector &); - void setDisplacementByNodeIdHelper(const std::vector& DispVector,long startId); + void setColorByNodeIdHelper(const std::vector&); + void setDisplacementByNodeIdHelper(const std::vector& DispVector, long startId); /// index of elements to their triangles std::vector vFaceElementIdx; std::vector vNodeElementIdx; std::vector vHighlightedIdx; std::vector DisplacementVector; - double DisplacementFactor; + double DisplacementFactor; - SoMaterial * pcPointMaterial; - SoDrawStyle * pcPointStyle; + SoMaterial* pcPointMaterial; + SoDrawStyle* pcPointStyle; - SoDrawStyle * pcDrawStyle; - SoShapeHints * pShapeHints; - SoMaterialBinding * pcMatBinding; - SoCoordinate3 * pcCoords; - SoCoordinate3 * pcAnoCoords; - SoIndexedFaceSet * pcFaces; - SoIndexedLineSet * pcLines; + SoDrawStyle* pcDrawStyle; + SoShapeHints* pShapeHints; + SoMaterialBinding* pcMatBinding; + SoCoordinate3* pcCoords; + SoCoordinate3* pcAnoCoords; + SoIndexedFaceSet* pcFaces; + SoIndexedLineSet* pcLines; bool onlyEdges; @@ -169,7 +176,7 @@ private: using ViewProviderFemMeshPython = Gui::ViewProviderPythonFeatureT; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_VIEWPROVIDERFEMMESH_H +#endif // FEM_VIEWPROVIDERFEMMESH_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp b/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp index 4a0da8c83f..030e262dee 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp @@ -2,8 +2,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -11,9 +11,11 @@ #include #include "ViewProviderFemMesh.h" +// clang-format off // inclusion of the generated files (generated out of ViewProviderFemMeshPy.xml) #include "ViewProviderFemMeshPy.h" #include "ViewProviderFemMeshPy.cpp" +// clang-format off using namespace FemGui; @@ -28,8 +30,9 @@ std::string ViewProviderFemMeshPy::representation() const PyObject* ViewProviderFemMeshPy::applyDisplacement(PyObject* args) { double factor; - if (!PyArg_ParseTuple(args, "d", &factor)) + if (!PyArg_ParseTuple(args, "d", &factor)) { return nullptr; + } this->getViewProviderFemMeshPtr()->applyDisplacementToNodes(factor); @@ -39,23 +42,34 @@ PyObject* ViewProviderFemMeshPy::applyDisplacement(PyObject* args) App::Color calcColor(double value, double min, double max) { - if (max < 0) max = 0; - if (min > 0) min = 0; + if (max < 0) { + max = 0; + } + if (min > 0) { + min = 0; + } - if (value < min) + if (value < min) { return App::Color(0.0, 0.0, 1.0); - if (value > max) + } + if (value > max) { return App::Color(1.0, 0.0, 0.0); - if (value == 0.0) + } + if (value == 0.0) { return App::Color(0.0, 1.0, 0.0); - if (value > max / 2.0) + } + if (value > max / 2.0) { return App::Color(1.0, 1 - ((value - (max / 2.0)) / (max / 2.0)), 0.0); - if (value > 0.0) + } + if (value > 0.0) { return App::Color(value / (max / 2.0), 1.0, 0.0); - if (value < min / 2.0) + } + if (value < min / 2.0) { return App::Color(0.0, 1 - ((value - (min / 2.0)) / (min / 2.0)), 1.0); - if (value < 0.0) + } + if (value < 0.0) { return App::Color(0.0, 1.0, value / (min / 2.0)); + } return App::Color(0, 0, 0); } @@ -83,18 +97,23 @@ PyObject* ViewProviderFemMeshPy::setNodeColorByScalars(PyObject* args) PyObject* value_py = PyList_GetItem(values_py, i); double val = PyFloat_AsDouble(value_py); values.push_back(val); - if (val > max) + if (val > max) { max = val; - if (val < min) + } + if (val < min) { min = val; + } } long i = 0; - for (std::vector::const_iterator it = values.begin(); it != values.end(); ++it, i++) + for (std::vector::const_iterator it = values.begin(); it != values.end(); + ++it, i++) { node_colors[i] = calcColor(*it, min, max); + } this->getViewProviderFemMeshPtr()->setColorByNodeId(ids, node_colors); } else { - PyErr_SetString(PyExc_TypeError, "PyArg_ParseTuple failed. Invalid arguments used with setNodeByScalars"); + PyErr_SetString(PyExc_TypeError, + "PyArg_ParseTuple failed. Invalid arguments used with setNodeByScalars"); return nullptr; } Py_Return; @@ -103,8 +122,9 @@ PyObject* ViewProviderFemMeshPy::setNodeColorByScalars(PyObject* args) PyObject* ViewProviderFemMeshPy::resetNodeColor(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } this->getViewProviderFemMeshPtr()->resetColorByNodeId(); Py_Return; } @@ -133,7 +153,9 @@ PyObject* ViewProviderFemMeshPy::setNodeDisplacementByVectors(PyObject* args) this->getViewProviderFemMeshPtr()->setDisplacementByNodeId(ids, vectors); } else { - PyErr_SetString(PyExc_TypeError, "PyArg_ParseTuple failed. Invalid arguments used with setNodeDisplacementByVectors"); + PyErr_SetString( + PyExc_TypeError, + "PyArg_ParseTuple failed. Invalid arguments used with setNodeDisplacementByVectors"); return nullptr; } Py_Return; @@ -142,8 +164,9 @@ PyObject* ViewProviderFemMeshPy::setNodeDisplacementByVectors(PyObject* args) PyObject* ViewProviderFemMeshPy::resetNodeDisplacement(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } this->getViewProviderFemMeshPtr()->resetDisplacementByNodeId(); Py_Return; } @@ -151,7 +174,7 @@ PyObject* ViewProviderFemMeshPy::resetNodeDisplacement(PyObject* args) Py::Dict ViewProviderFemMeshPy::getNodeColor() const { - //return Py::List(); + // return Py::List(); throw Py::AttributeError("Not yet implemented"); } @@ -159,18 +182,21 @@ Py::Dict ViewProviderFemMeshPy::getNodeColor() const void ViewProviderFemMeshPy::setNodeColor(Py::Dict arg) { long size = arg.size(); - if (size == 0) + if (size == 0) { this->getViewProviderFemMeshPtr()->resetColorByNodeId(); + } else { Base::TimeInfo Start; - Base::Console().Log("Start: ViewProviderFemMeshPy::setNodeColor() =================================\n"); - //std::map NodeColorMap; + Base::Console().Log( + "Start: ViewProviderFemMeshPy::setNodeColor() =================================\n"); + // std::map NodeColorMap; - //for( Py::Dict::iterator it = arg.begin(); it!= arg.end();++it){ - // Py::Long id((*it).first); - // Py::Tuple color((*it).second); - // NodeColorMap[id] = App::Color(Py::Float(color[0]),Py::Float(color[1]),Py::Float(color[2]),0); - //} + // for( Py::Dict::iterator it = arg.begin(); it!= arg.end();++it){ + // Py::Long id((*it).first); + // Py::Tuple color((*it).second); + // NodeColorMap[id] = + // App::Color(Py::Float(color[0]),Py::Float(color[1]),Py::Float(color[2]),0); + // } std::vector NodeIds(size); std::vector NodeColors(size); @@ -179,35 +205,40 @@ void ViewProviderFemMeshPy::setNodeColor(Py::Dict arg) Py::Long id((*it).first); Py::Tuple color((*it).second); NodeIds[i] = id; - NodeColors[i] = App::Color(Py::Float(color[0]), Py::Float(color[1]), Py::Float(color[2]), 0); + NodeColors[i] = + App::Color(Py::Float(color[0]), Py::Float(color[1]), Py::Float(color[2]), 0); } - Base::Console().Log(" %f: Start ViewProviderFemMeshPy::setNodeColor() call \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); + Base::Console().Log(" %f: Start ViewProviderFemMeshPy::setNodeColor() call \n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); - //this->getViewProviderFemMeshPtr()->setColorByNodeId(NodeColorMap); + // this->getViewProviderFemMeshPtr()->setColorByNodeId(NodeColorMap); this->getViewProviderFemMeshPtr()->setColorByNodeId(NodeIds, NodeColors); - Base::Console().Log(" %f: Finish ViewProviderFemMeshPy::setNodeColor() call \n", Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); + Base::Console().Log(" %f: Finish ViewProviderFemMeshPy::setNodeColor() call \n", + Base::TimeInfo::diffTimeF(Start, Base::TimeInfo())); } } Py::Dict ViewProviderFemMeshPy::getElementColor() const { - //return Py::List(); + // return Py::List(); throw Py::AttributeError("Not yet implemented"); } void ViewProviderFemMeshPy::setElementColor(Py::Dict arg) { - if (arg.size() == 0) + if (arg.size() == 0) { this->getViewProviderFemMeshPtr()->resetColorByNodeId(); + } else { std::map NodeColorMap; for (Py::Dict::iterator it = arg.begin(); it != arg.end(); ++it) { Py::Long id((*it).first); Py::Tuple color((*it).second); - NodeColorMap[id] = App::Color(Py::Float(color[0]), Py::Float(color[1]), Py::Float(color[2]), 0); + NodeColorMap[id] = + App::Color(Py::Float(color[0]), Py::Float(color[1]), Py::Float(color[2]), 0); } this->getViewProviderFemMeshPtr()->setColorByElementId(NodeColorMap); } @@ -216,15 +247,16 @@ void ViewProviderFemMeshPy::setElementColor(Py::Dict arg) Py::Dict ViewProviderFemMeshPy::getNodeDisplacement() const { - //return Py::Dict(); + // return Py::Dict(); throw Py::AttributeError("Not yet implemented"); } -void ViewProviderFemMeshPy::setNodeDisplacement(Py::Dict arg) +void ViewProviderFemMeshPy::setNodeDisplacement(Py::Dict arg) { - if (arg.size() == 0) + if (arg.size() == 0) { this->getViewProviderFemMeshPtr()->resetColorByNodeId(); + } else { std::map NodeDispMap; Py::Type vType(Base::getTypeAsObject(&Base::VectorPy::Type)); @@ -256,15 +288,18 @@ Py::List ViewProviderFemMeshPy::getHighlightedNodes() const void ViewProviderFemMeshPy::setHighlightedNodes(Py::List arg) { ViewProviderFemMesh* vp = this->getViewProviderFemMeshPtr(); - const SMESHDS_Mesh* data = static_cast - (vp->getObject())->FemMesh.getValue().getSMesh()->GetMeshDS(); + const SMESHDS_Mesh* data = static_cast(vp->getObject()) + ->FemMesh.getValue() + .getSMesh() + ->GetMeshDS(); std::set res; for (Py::List::iterator it = arg.begin(); it != arg.end(); ++it) { long id = static_cast(Py::Long(*it)); const SMDS_MeshNode* node = data->FindNode(id); - if (node) + if (node) { res.insert(id); + } } this->getViewProviderFemMeshPtr()->setHighlightNodes(res); @@ -273,8 +308,9 @@ void ViewProviderFemMeshPy::setHighlightedNodes(Py::List arg) PyObject* ViewProviderFemMeshPy::resetHighlightedNodes(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } this->getViewProviderFemMeshPtr()->resetHighlightNodes(); Py_Return; } @@ -282,19 +318,22 @@ PyObject* ViewProviderFemMeshPy::resetHighlightedNodes(PyObject* args) Py::List ViewProviderFemMeshPy::getVisibleElementFaces() const { - const std::vector& visElmFc = this->getViewProviderFemMeshPtr()->getVisibleElementFaces(); + const std::vector& visElmFc = + this->getViewProviderFemMeshPtr()->getVisibleElementFaces(); std::vector trans; // sorting out double faces through higher order elements and null entries long elementOld = 0, faceOld = 0; for (unsigned long it : visElmFc) { - if (it == 0) + if (it == 0) { continue; + } long element = it >> 3; long face = (it & 7) + 1; - if (element == elementOld && face == faceOld) + if (element == elementOld && face == faceOld) { continue; + } trans.push_back(it); elementOld = element; @@ -303,7 +342,8 @@ Py::List ViewProviderFemMeshPy::getVisibleElementFaces() const Py::List result(trans.size()); int i = 0; - for (std::vector::const_iterator it = trans.begin(); it != trans.end(); ++it, i++) { + for (std::vector::const_iterator it = trans.begin(); it != trans.end(); + ++it, i++) { Py::Tuple tup(2); long element = *it >> 3; long face = (*it & 7) + 1; diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshShape.h b/src/Mod/Fem/Gui/ViewProviderFemMeshShape.h index 90905295f1..0cfe89e1bf 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshShape.h +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshShape.h @@ -29,7 +29,7 @@ namespace FemGui { -class FemGuiExport ViewProviderFemMeshShape : public ViewProviderFemMesh +class FemGuiExport ViewProviderFemMeshShape: public ViewProviderFemMesh { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemMeshShape); @@ -41,7 +41,7 @@ public: ~ViewProviderFemMeshShape() override; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderFemMeshShape_H +#endif // FEM_ViewProviderFemMeshShape_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.cpp b/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.cpp index d9d0bee6b8..d687985b00 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.cpp @@ -23,18 +23,18 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include #include #include -#include "ViewProviderFemMeshShapeNetgen.h" #include "TaskDlgMeshShapeNetgen.h" +#include "ViewProviderFemMeshShapeNetgen.h" using namespace FemGui; @@ -51,9 +51,11 @@ ViewProviderFemMeshShapeNetgen::ViewProviderFemMeshShapeNetgen() ViewProviderFemMeshShapeNetgen::~ViewProviderFemMeshShapeNetgen() = default; -void ViewProviderFemMeshShapeNetgen::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) +void ViewProviderFemMeshShapeNetgen::setupContextMenu(QMenu* menu, + QObject* receiver, + const char* member) { - QAction *act = menu->addAction(QObject::tr("Meshing"), receiver, member); + QAction* act = menu->addAction(QObject::tr("Meshing"), receiver, member); act->setData(QVariant((int)ViewProvider::Default)); } @@ -66,10 +68,13 @@ bool ViewProviderFemMeshShapeNetgen::setEdit(int ModNum) Gui::Control().showDialog(new TaskDlgMeshShapeNetgen(this)); return true; #else - QMessageBox::critical(Gui::getMainWindow(), - QCoreApplication::translate("FemGui::ViewProviderFemMeshShapeNetgen", "Meshing failure"), - QCoreApplication::translate("FemGui::ViewProviderFemMeshShapeNetgen", "The FEM module is built without NETGEN support. Meshing will not work!!!") - ); + QMessageBox::critical( + Gui::getMainWindow(), + QCoreApplication::translate("FemGui::ViewProviderFemMeshShapeNetgen", + "Meshing failure"), + QCoreApplication::translate( + "FemGui::ViewProviderFemMeshShapeNetgen", + "The FEM module is built without NETGEN support. Meshing will not work!!!")); return false; #endif } diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.h b/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.h index 8bdf0a90ed..b41ce2dc67 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.h +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshShapeNetgen.h @@ -28,7 +28,7 @@ namespace FemGui { -class FemGuiExport ViewProviderFemMeshShapeNetgen : public ViewProviderFemMeshShape +class FemGuiExport ViewProviderFemMeshShapeNetgen: public ViewProviderFemMeshShape { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemMeshShapeNetgen); @@ -39,14 +39,14 @@ public: /// destructor. ~ViewProviderFemMeshShapeNetgen() override; - void updateData(const App::Property*) override; + void updateData(const App::Property*) override; protected: void setupContextMenu(QMenu* menu, QObject* receiver, const char* member) override; bool setEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderFemMeshShapeNetgen_H +#endif // FEM_ViewProviderFemMeshShapeNetgen_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp index 33260c409e..a12b317363 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp @@ -24,8 +24,8 @@ #include -#include "ViewProviderFemPostFilter.h" #include "TaskPostBoxes.h" +#include "ViewProviderFemPostFilter.h" using namespace FemGui; @@ -48,7 +48,7 @@ ViewProviderFemPostDataAlongLine::~ViewProviderFemPostDataAlongLine() = default; void ViewProviderFemPostDataAlongLine::setupTaskDialog(TaskDlgPost* dlg) { - //add the function box + // add the function box dlg->appendBox(new TaskPostDataAlongLine(dlg->getView())); } @@ -78,7 +78,7 @@ ViewProviderFemPostDataAtPoint::~ViewProviderFemPostDataAtPoint() = default; void ViewProviderFemPostDataAtPoint::setupTaskDialog(TaskDlgPost* dlg) { - //add the function box + // add the function box dlg->appendBox(new TaskPostDataAtPoint(dlg->getView())); } @@ -87,20 +87,23 @@ void ViewProviderFemPostDataAtPoint::setupTaskDialog(TaskDlgPost* dlg) // clip filter PROPERTY_SOURCE(FemGui::ViewProviderFemPostClip, FemGui::ViewProviderFemPostObject) -ViewProviderFemPostClip::ViewProviderFemPostClip() { +ViewProviderFemPostClip::ViewProviderFemPostClip() +{ sPixmap = "FEM_PostFilterClipRegion"; } ViewProviderFemPostClip::~ViewProviderFemPostClip() = default; -void ViewProviderFemPostClip::setupTaskDialog(TaskDlgPost* dlg) { +void ViewProviderFemPostClip::setupTaskDialog(TaskDlgPost* dlg) +{ - //add the function box - dlg->appendBox(new TaskPostClip(dlg->getView(), + // add the function box + dlg->appendBox(new TaskPostClip( + dlg->getView(), &static_cast(dlg->getView()->getObject())->Function)); - //add the display options + // add the display options FemGui::ViewProviderFemPostObject::setupTaskDialog(dlg); } @@ -136,12 +139,12 @@ ViewProviderFemPostCut::~ViewProviderFemPostCut() = default; void ViewProviderFemPostCut::setupTaskDialog(TaskDlgPost* dlg) { - //add the function box + // add the function box dlg->appendBox(new TaskPostCut( dlg->getView(), &static_cast(dlg->getView()->getObject())->Function)); - //add the display options + // add the display options FemGui::ViewProviderFemPostObject::setupTaskDialog(dlg); } @@ -159,10 +162,10 @@ ViewProviderFemPostScalarClip::~ViewProviderFemPostScalarClip() = default; void ViewProviderFemPostScalarClip::setupTaskDialog(TaskDlgPost* dlg) { - //add the function box + // add the function box dlg->appendBox(new TaskPostScalarClip(dlg->getView())); - //add the display options + // add the display options FemGui::ViewProviderFemPostObject::setupTaskDialog(dlg); } @@ -180,9 +183,9 @@ ViewProviderFemPostWarpVector::~ViewProviderFemPostWarpVector() = default; void ViewProviderFemPostWarpVector::setupTaskDialog(TaskDlgPost* dlg) { - //add the function box + // add the function box dlg->appendBox(new TaskPostWarpVector(dlg->getView())); - //add the display options + // add the display options FemGui::ViewProviderFemPostObject::setupTaskDialog(dlg); } diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h index 33f326a965..5a2b00fe8f 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h @@ -36,7 +36,7 @@ namespace FemGui // *************************************************************************** // data along line filter -class FemGuiExport ViewProviderFemPostDataAlongLine : public ViewProviderFemPostObject +class FemGuiExport ViewProviderFemPostDataAlongLine: public ViewProviderFemPostObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostDataAlongLine); @@ -60,7 +60,7 @@ public: /// constructor. ViewProviderFemPostDataAtPoint(); void show() override; - void onSelectionChanged(const Gui::SelectionChanges &) override; + void onSelectionChanged(const Gui::SelectionChanges&) override; ~ViewProviderFemPostDataAtPoint() override; protected: @@ -134,7 +134,7 @@ protected: // *************************************************************************** // warp vector filter -class FemGuiExport ViewProviderFemPostWarpVector : public ViewProviderFemPostObject +class FemGuiExport ViewProviderFemPostWarpVector: public ViewProviderFemPostObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostWarpVector); @@ -147,7 +147,7 @@ protected: void setupTaskDialog(TaskDlgPost* dlg) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_VIEWPROVIDERFEMPOSTFILTER_H +#endif // FEM_VIEWPROVIDERFEMPOSTFILTER_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp index 05f7634b80..4fe2b2da56 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp @@ -23,27 +23,29 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include +#include +#include +#include #endif +// clang-format off #include #include +// clang-format on #include #include @@ -54,10 +56,10 @@ #include -#include "ViewProviderFemPostFunction.h" #include "FemSettings.h" #include "TaskPostBoxes.h" #include "ViewProviderAnalysis.h" +#include "ViewProviderFemPostFunction.h" #include "ui_BoxWidget.h" #include "ui_CylinderWidget.h" @@ -70,18 +72,20 @@ namespace sp = std::placeholders; void FunctionWidget::setViewProvider(ViewProviderFemPostFunction* view) { - //NOLINTBEGIN + // NOLINTBEGIN m_view = view; m_object = static_cast(view->getObject()); m_connection = m_object->getDocument()->signalChangedObject.connect( std::bind(&FunctionWidget::onObjectsChanged, this, sp::_1, sp::_2)); - //NOLINTEND + // NOLINTEND } -void FunctionWidget::onObjectsChanged(const App::DocumentObject& obj, const App::Property& p) { +void FunctionWidget::onObjectsChanged(const App::DocumentObject& obj, const App::Property& p) +{ - if (&obj == m_object) + if (&obj == m_object) { onChange(p); + } } @@ -91,12 +95,12 @@ ViewProviderFemPostFunctionProvider::ViewProviderFemPostFunctionProvider() = def ViewProviderFemPostFunctionProvider::~ViewProviderFemPostFunctionProvider() = default; -std::vector< App::DocumentObject* > ViewProviderFemPostFunctionProvider::claimChildren() const +std::vector ViewProviderFemPostFunctionProvider::claimChildren() const { return static_cast(getObject())->Functions.getValues(); } -std::vector< App::DocumentObject* > ViewProviderFemPostFunctionProvider::claimChildren3D() const +std::vector ViewProviderFemPostFunctionProvider::claimChildren3D() const { return claimChildren(); } @@ -121,8 +125,9 @@ void ViewProviderFemPostFunctionProvider::updateSize() { std::vector vec = claimChildren(); for (auto it : vec) { - if (!it->isDerivedFrom(Fem::FemPostFunction::getClassTypeId())) + if (!it->isDerivedFrom(Fem::FemPostFunction::getClassTypeId())) { continue; + } ViewProviderFemPostFunction* vp = static_cast( Gui::Application::Instance->getViewProvider(it)); @@ -136,8 +141,9 @@ bool ViewProviderFemPostFunctionProvider::onDelete(const std::vectorgetDocument(), "functions list"); + return ViewProviderFemAnalysis::checkSelectedChildren(objs, + this->getDocument(), + "functions list"); } bool ViewProviderFemPostFunctionProvider::canDelete(App::DocumentObject* obj) const @@ -146,7 +152,7 @@ bool ViewProviderFemPostFunctionProvider::canDelete(App::DocumentObject* obj) co // thus we can pass this action // we can warn the user if necessary in the object's ViewProvider in the onDelete() function Q_UNUSED(obj) - return true; + return true; } @@ -155,14 +161,26 @@ bool ViewProviderFemPostFunctionProvider::canDelete(App::DocumentObject* obj) co PROPERTY_SOURCE(FemGui::ViewProviderFemPostFunction, Gui::ViewProviderDocumentObject) ViewProviderFemPostFunction::ViewProviderFemPostFunction() - : m_manip(nullptr), m_autoscale(false), m_isDragging(false), m_autoRecompute(false) + : m_manip(nullptr) + , m_autoscale(false) + , m_isDragging(false) + , m_autoRecompute(false) { - ADD_PROPERTY_TYPE( - AutoScaleFactorX, (1), "AutoScale", App::Prop_Hidden, "Automatic scaling factor"); - ADD_PROPERTY_TYPE( - AutoScaleFactorY, (1), "AutoScale", App::Prop_Hidden, "Automatic scaling factor"); - ADD_PROPERTY_TYPE( - AutoScaleFactorZ, (1), "AutoScale", App::Prop_Hidden, "Automatic scaling factor"); + ADD_PROPERTY_TYPE(AutoScaleFactorX, + (1), + "AutoScale", + App::Prop_Hidden, + "Automatic scaling factor"); + ADD_PROPERTY_TYPE(AutoScaleFactorY, + (1), + "AutoScale", + App::Prop_Hidden, + "Automatic scaling factor"); + ADD_PROPERTY_TYPE(AutoScaleFactorZ, + (1), + "AutoScale", + App::Prop_Hidden, + "Automatic scaling factor"); m_geometrySeperator = new SoSeparator(); m_geometrySeperator->ref(); @@ -254,12 +272,14 @@ bool ViewProviderFemPostFunction::findScaleFactor(double& scale) const return false; } -bool ViewProviderFemPostFunction::doubleClicked() { +bool ViewProviderFemPostFunction::doubleClicked() +{ Gui::Application::Instance->activeDocument()->setEdit(this, (int)ViewProvider::Default); return true; } -SoTransformManip* ViewProviderFemPostFunction::setupManipulator() { +SoTransformManip* ViewProviderFemPostFunction::setupManipulator() +{ return new SoCenterballManip; } @@ -288,8 +308,9 @@ void ViewProviderFemPostFunction::dragFinishCallback(void* data, SoDragger*) Gui::Application::Instance->activeDocument()->commitCommand(); ViewProviderFemPostFunction* that = static_cast(data); - if (that->m_autoRecompute) + if (that->m_autoRecompute) { that->getObject()->getDocument()->recompute(); + } static_cast(data)->m_isDragging = false; } @@ -299,8 +320,9 @@ void ViewProviderFemPostFunction::dragMotionCallback(void* data, SoDragger* drag ViewProviderFemPostFunction* that = static_cast(data); that->draggerUpdate(drag); - if (that->m_autoRecompute) + if (that->m_autoRecompute) { that->getObject()->getDocument()->recompute(); + } } @@ -310,8 +332,9 @@ bool ViewProviderFemPostFunction::setEdit(int ModNum) Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); TaskDlgPost* postDlg = qobject_cast(dlg); - if (postDlg && postDlg->getView() != this) - postDlg = nullptr; // another pad left open its task panel + if (postDlg && postDlg->getView() != this) { + postDlg = nullptr; // another pad left open its task panel + } if (dlg && !postDlg) { QMessageBox msgBox; msgBox.setText(QObject::tr("A dialog is already open in the task panel")); @@ -319,15 +342,18 @@ bool ViewProviderFemPostFunction::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; + } } // start the edit dialog - if (postDlg) + if (postDlg) { Gui::Control().showDialog(postDlg); + } else { postDlg = new TaskDlgPost(this); postDlg->appendBox(new TaskPostFunction(this)); @@ -356,9 +382,11 @@ void ViewProviderFemPostFunction::onChanged(const App::Property* prop) { Gui::ViewProviderDocumentObject::onChanged(prop); - if (m_autoscale) - m_scale->scaleFactor = SbVec3f( - AutoScaleFactorX.getValue(), AutoScaleFactorY.getValue(), AutoScaleFactorZ.getValue()); + if (m_autoscale) { + m_scale->scaleFactor = SbVec3f(AutoScaleFactorX.getValue(), + AutoScaleFactorY.getValue(), + AutoScaleFactorZ.getValue()); + } } @@ -395,8 +423,8 @@ void ViewProviderFemPostBoxFunction::draggerUpdate(SoDragger* m) void ViewProviderFemPostBoxFunction::updateData(const App::Property* p) { Fem::FemPostBoxFunction* func = static_cast(getObject()); - if (!isDragging() && - (p == &func->Center || p == &func->Length || p == &func->Width || p == &func->Height)) { + if (!isDragging() + && (p == &func->Center || p == &func->Length || p == &func->Width || p == &func->Height)) { const Base::Vector3d& center = func->Center.getValue(); float l = func->Length.getValue(); float w = func->Width.getValue(); @@ -442,25 +470,36 @@ BoxWidget::BoxWidget() ui->width->setDecimals(UserDecimals); ui->height->setDecimals(UserDecimals); - connect(ui->centerX, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &BoxWidget::centerChanged); - connect(ui->centerY, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &BoxWidget::centerChanged); - connect(ui->centerZ, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &BoxWidget::centerChanged); - connect(ui->length, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &BoxWidget::lengthChanged); - connect(ui->width, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &BoxWidget::widthChanged); - connect(ui->height, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &BoxWidget::heightChanged); + connect(ui->centerX, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &BoxWidget::centerChanged); + connect(ui->centerY, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &BoxWidget::centerChanged); + connect(ui->centerZ, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &BoxWidget::centerChanged); + connect(ui->length, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &BoxWidget::lengthChanged); + connect(ui->width, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &BoxWidget::widthChanged); + connect(ui->height, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &BoxWidget::heightChanged); } BoxWidget::~BoxWidget() = default; void BoxWidget::applyPythonCode() -{ -} +{} void BoxWidget::setViewProvider(ViewProviderFemPostFunction* view) { @@ -512,8 +551,9 @@ void BoxWidget::onChange(const App::Property& p) void BoxWidget::centerChanged(double) { if (!blockObjectUpdates()) { - Base::Vector3d vec(ui->centerX->value().getValue(), ui->centerY->value().getValue(), - ui->centerZ->value().getValue()); + Base::Vector3d vec(ui->centerX->value().getValue(), + ui->centerY->value().getValue(), + ui->centerZ->value().getValue()); static_cast(getObject())->Center.setValue(vec); } } @@ -581,8 +621,9 @@ void ViewProviderFemPostCylinderFunction::updateData(const App::Property* p) SbMatrix translate; SbRotation rot(SbVec3f(0.0, 0.0, 1.0), SbVec3f(axis.x, axis.y, axis.z)); - translate.setTransform( - SbVec3f(trans.x, trans.y, trans.z), rot, SbVec3f(radius, radius, radius)); + translate.setTransform(SbVec3f(trans.x, trans.y, trans.z), + rot, + SbVec3f(radius, radius, radius)); getManipulator()->setMatrix(translate); } @@ -621,27 +662,40 @@ CylinderWidget::CylinderWidget() ui->axisY->setDecimals(UserDecimals); ui->axisZ->setDecimals(UserDecimals); - connect(ui->centerX, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &CylinderWidget::centerChanged); - connect(ui->centerY, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &CylinderWidget::centerChanged); - connect(ui->centerZ, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &CylinderWidget::centerChanged); - connect(ui->axisX, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &CylinderWidget::axisChanged); - connect(ui->axisY, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &CylinderWidget::axisChanged); - connect(ui->axisZ, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &CylinderWidget::axisChanged); - connect(ui->radius, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &CylinderWidget::radiusChanged); + connect(ui->centerX, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &CylinderWidget::centerChanged); + connect(ui->centerY, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &CylinderWidget::centerChanged); + connect(ui->centerZ, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &CylinderWidget::centerChanged); + connect(ui->axisX, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &CylinderWidget::axisChanged); + connect(ui->axisY, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &CylinderWidget::axisChanged); + connect(ui->axisZ, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &CylinderWidget::axisChanged); + connect(ui->radius, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &CylinderWidget::radiusChanged); } CylinderWidget::~CylinderWidget() = default; void CylinderWidget::applyPythonCode() -{ -} +{} void CylinderWidget::setViewProvider(ViewProviderFemPostFunction* view) { @@ -686,8 +740,9 @@ void CylinderWidget::onChange(const App::Property& p) void CylinderWidget::centerChanged(double) { if (!blockObjectUpdates()) { - Base::Vector3d vec(ui->centerX->value().getValue(), ui->centerY->value().getValue(), - ui->centerZ->value().getValue()); + Base::Vector3d vec(ui->centerX->value().getValue(), + ui->centerY->value().getValue(), + ui->centerZ->value().getValue()); static_cast(getObject())->Center.setValue(vec); } } @@ -695,8 +750,9 @@ void CylinderWidget::centerChanged(double) void CylinderWidget::axisChanged(double) { if (!blockObjectUpdates()) { - Base::Vector3d vec(ui->axisX->value().getValue(), ui->axisY->value().getValue(), - ui->axisZ->value().getValue()); + Base::Vector3d vec(ui->axisX->value().getValue(), + ui->axisY->value().getValue(), + ui->axisZ->value().getValue()); static_cast(getObject())->Axis.setValue(vec); } } @@ -713,14 +769,17 @@ void CylinderWidget::radiusChanged(double) // *************************************************************************** PROPERTY_SOURCE(FemGui::ViewProviderFemPostPlaneFunction, FemGui::ViewProviderFemPostFunction) -//NOTE: The technical lower limit is at 1e-4 that the Coin3D manipulator can handle +// NOTE: The technical lower limit is at 1e-4 that the Coin3D manipulator can handle static const App::PropertyFloatConstraint::Constraints scaleConstraint = {1e-4, DBL_MAX, 1.0}; ViewProviderFemPostPlaneFunction::ViewProviderFemPostPlaneFunction() : m_detectscale(false) { - ADD_PROPERTY_TYPE( - Scale, (1000.0), "Manipulator", App::Prop_None, "Scaling factor for the manipulator"); + ADD_PROPERTY_TYPE(Scale, + (1000.0), + "Manipulator", + App::Prop_None, + "Scaling factor for the manipulator"); Scale.setConstraints(&scaleConstraint); sPixmap = "fem-post-geo-plane"; @@ -752,14 +811,16 @@ void ViewProviderFemPostPlaneFunction::onChanged(const App::Property* prop) { if (prop == &Scale) { // When loading the Scale property from a project then keep that - if (Scale.getConstraints()) + if (Scale.getConstraints()) { m_detectscale = true; + } if (!isDragging()) { // get current matrix SbVec3f t, s; SbRotation r, so; - SbMatrix matrix = - getManipulator()->getDragger()->getMotionMatrix();// clazy:exclude=rule-of-two-soft + SbMatrix matrix = getManipulator() + ->getDragger() + ->getMotionMatrix(); // clazy:exclude=rule-of-two-soft matrix.getTransform(t, r, s, so); float scale = static_cast(Scale.getValue()); @@ -833,25 +894,36 @@ PlaneWidget::PlaneWidget() ui->normalY->setDecimals(UserDecimals); ui->normalZ->setDecimals(UserDecimals); - connect(ui->originX, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &PlaneWidget::originChanged); - connect(ui->originY, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &PlaneWidget::originChanged); - connect(ui->originZ, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &PlaneWidget::originChanged); - connect(ui->normalX, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &PlaneWidget::normalChanged); - connect(ui->normalY, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &PlaneWidget::normalChanged); - connect(ui->normalZ, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &PlaneWidget::normalChanged); + connect(ui->originX, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &PlaneWidget::originChanged); + connect(ui->originY, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &PlaneWidget::originChanged); + connect(ui->originZ, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &PlaneWidget::originChanged); + connect(ui->normalX, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &PlaneWidget::normalChanged); + connect(ui->normalY, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &PlaneWidget::normalChanged); + connect(ui->normalZ, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &PlaneWidget::normalChanged); } PlaneWidget::~PlaneWidget() = default; void PlaneWidget::applyPythonCode() -{ -} +{} void PlaneWidget::setViewProvider(ViewProviderFemPostFunction* view) { @@ -891,8 +963,9 @@ void PlaneWidget::onChange(const App::Property& p) void PlaneWidget::normalChanged(double) { if (!blockObjectUpdates()) { - Base::Vector3d vec(ui->normalX->value().getValue(), ui->normalY->value().getValue(), - ui->normalZ->value().getValue()); + Base::Vector3d vec(ui->normalX->value().getValue(), + ui->normalY->value().getValue(), + ui->normalZ->value().getValue()); static_cast(getObject())->Normal.setValue(vec); } } @@ -900,8 +973,9 @@ void PlaneWidget::normalChanged(double) void PlaneWidget::originChanged(double) { if (!blockObjectUpdates()) { - Base::Vector3d vec(ui->originX->value().getValue(), ui->originY->value().getValue(), - ui->originZ->value().getValue()); + Base::Vector3d vec(ui->originX->value().getValue(), + ui->originY->value().getValue(), + ui->originZ->value().getValue()); static_cast(getObject())->Origin.setValue(vec); } } @@ -917,7 +991,7 @@ ViewProviderFemPostSphereFunction::ViewProviderFemPostSphereFunction() setAutoScale(false); - //setup the visualisation geometry + // setup the visualisation geometry getGeometryNode()->addChild(ShapeNodes::postSphere()); } @@ -995,21 +1069,28 @@ SphereWidget::SphereWidget() ui->centerY->setDecimals(UserDecimals); ui->centerZ->setDecimals(UserDecimals); - connect(ui->centerX, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &SphereWidget::centerChanged); - connect(ui->centerY, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &SphereWidget::centerChanged); - connect(ui->centerZ, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &SphereWidget::centerChanged); - connect(ui->radius, qOverload(&Gui::QuantitySpinBox::valueChanged), - this, &SphereWidget::radiusChanged); + connect(ui->centerX, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &SphereWidget::centerChanged); + connect(ui->centerY, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &SphereWidget::centerChanged); + connect(ui->centerZ, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &SphereWidget::centerChanged); + connect(ui->radius, + qOverload(&Gui::QuantitySpinBox::valueChanged), + this, + &SphereWidget::radiusChanged); } SphereWidget::~SphereWidget() = default; void SphereWidget::applyPythonCode() -{ -} +{} void SphereWidget::setViewProvider(ViewProviderFemPostFunction* view) { @@ -1047,8 +1128,9 @@ void SphereWidget::onChange(const App::Property& p) void SphereWidget::centerChanged(double) { if (!blockObjectUpdates()) { - Base::Vector3d vec(ui->centerX->value().getValue(), ui->centerY->value().getValue(), - ui->centerZ->value().getValue()); + Base::Vector3d vec(ui->centerX->value().getValue(), + ui->centerY->value().getValue(), + ui->centerZ->value().getValue()); static_cast(getObject())->Center.setValue(vec); } } @@ -1143,7 +1225,7 @@ SoGroup* postCylinder() vert[0] = nCirc + 1; vert[1] = nCirc + 1; for (int i = 0; i < nSide; ++i) { - vert[i+2] = 2; + vert[i + 2] = 2; } SoLineSet* line = new SoLineSet(); @@ -1207,8 +1289,8 @@ SoGroup* postSphere() return group; } -} //namespace ShapeNodes +} // namespace ShapeNodes -} //namespace FemGui +} // namespace FemGui #include "moc_ViewProviderFemPostFunction.cpp" diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.h b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.h index c523c5cfa1..7b69218d84 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.h +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.h @@ -23,9 +23,9 @@ #ifndef FEM_VIEWPROVIDERFEMPOSTFUNCTION_H #define FEM_VIEWPROVIDERFEMPOSTFUNCTION_H +#include #include #include -#include #include #include @@ -49,7 +49,7 @@ namespace FemGui class ViewProviderFemPostFunction; -class FemGuiExport FunctionWidget : public QWidget +class FemGuiExport FunctionWidget: public QWidget { Q_OBJECT public: @@ -61,22 +61,34 @@ public: void onObjectsChanged(const App::DocumentObject& obj, const App::Property&); protected: - ViewProviderFemPostFunction* getView() {return m_view;} - Fem::FemPostFunction* getObject(){return m_object;} + ViewProviderFemPostFunction* getView() + { + return m_view; + } + Fem::FemPostFunction* getObject() + { + return m_object; + } - bool blockObjectUpdates() {return m_block;} - void setBlockObjectUpdates(bool val) {m_block = val;} + bool blockObjectUpdates() + { + return m_block; + } + void setBlockObjectUpdates(bool val) + { + m_block = val; + } virtual void onChange(const App::Property& p) = 0; private: - bool m_block{false}; - ViewProviderFemPostFunction* m_view{nullptr}; - Fem::FemPostFunction* m_object{nullptr}; - boost::signals2::scoped_connection m_connection; + bool m_block {false}; + ViewProviderFemPostFunction* m_view {nullptr}; + Fem::FemPostFunction* m_object {nullptr}; + boost::signals2::scoped_connection m_connection; }; -class FemGuiExport ViewProviderFemPostFunctionProvider : public Gui::ViewProviderDocumentObject +class FemGuiExport ViewProviderFemPostFunctionProvider: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostFunction); @@ -94,15 +106,15 @@ public: bool canDelete(App::DocumentObject* obj) const override; protected: - std::vector< App::DocumentObject* > claimChildren() const override; - std::vector< App::DocumentObject* > claimChildren3D() const override; + std::vector claimChildren() const override; + std::vector claimChildren3D() const override; void onChanged(const App::Property* prop) override; void updateData(const App::Property*) override; void updateSize(); }; -class FemGuiExport ViewProviderFemPostFunction : public Gui::ViewProviderDocumentObject +class FemGuiExport ViewProviderFemPostFunction: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostFunction); @@ -115,45 +127,67 @@ public: App::PropertyFloat AutoScaleFactorY; App::PropertyFloat AutoScaleFactorZ; - void attach(App::DocumentObject *pcObject) override; + void attach(App::DocumentObject* pcObject) override; bool doubleClicked() override; std::vector getDisplayModes() const override; - //creates the widget used in the task dalogs, either for the function itself or for - //the filter using it - virtual FunctionWidget* createControlWidget() {return nullptr;} + // creates the widget used in the task dalogs, either for the function itself or for + // the filter using it + virtual FunctionWidget* createControlWidget() + { + return nullptr; + } protected: bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; void onChanged(const App::Property* prop) override; - void setAutoScale(bool value) {m_autoscale = value;} - bool autoScale() {return m_autoscale;} + void setAutoScale(bool value) + { + m_autoscale = value; + } + bool autoScale() + { + return m_autoscale; + } - bool isDragging() {return m_isDragging;} + bool isDragging() + { + return m_isDragging; + } SbBox3f getBoundingsOfView() const; bool findScaleFactor(double& scale) const; - virtual SoTransformManip* setupManipulator(); - virtual void draggerUpdate(SoDragger*) {} - SoTransformManip* getManipulator() {return m_manip;} - SoSeparator* getGeometryNode() {return m_geometrySeperator;} - SoScale* getScaleNode() {return m_scale;} + virtual SoTransformManip* setupManipulator(); + virtual void draggerUpdate(SoDragger*) + {} + SoTransformManip* getManipulator() + { + return m_manip; + } + SoSeparator* getGeometryNode() + { + return m_geometrySeperator; + } + SoScale* getScaleNode() + { + return m_scale; + } private: - static void dragStartCallback(void * data, SoDragger * d); - static void dragFinishCallback(void * data, SoDragger * d); - static void dragMotionCallback(void * data, SoDragger * d); + static void dragStartCallback(void* data, SoDragger* d); + static void dragFinishCallback(void* data, SoDragger* d); + static void dragMotionCallback(void* data, SoDragger* d); - SoSeparator* m_geometrySeperator; - SoTransformManip* m_manip; - SoScale* m_scale; - bool m_autoscale, m_isDragging, m_autoRecompute; + SoSeparator* m_geometrySeperator; + SoTransformManip* m_manip; + SoScale* m_scale; + bool m_autoscale, m_isDragging, m_autoRecompute; }; // *************************************************************************** -class FemGuiExport BoxWidget : public FunctionWidget +class FemGuiExport BoxWidget: public FunctionWidget { Q_OBJECT public: @@ -174,7 +208,7 @@ private: std::unique_ptr ui; }; -class FemGuiExport ViewProviderFemPostBoxFunction : public ViewProviderFemPostFunction +class FemGuiExport ViewProviderFemPostBoxFunction: public ViewProviderFemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostBoxFunction); @@ -192,7 +226,7 @@ protected: // *************************************************************************** -class FemGuiExport CylinderWidget : public FunctionWidget +class FemGuiExport CylinderWidget: public FunctionWidget { Q_OBJECT public: @@ -212,7 +246,7 @@ private: std::unique_ptr ui; }; -class FemGuiExport ViewProviderFemPostCylinderFunction : public ViewProviderFemPostFunction +class FemGuiExport ViewProviderFemPostCylinderFunction: public ViewProviderFemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostCylinderFunction); @@ -230,7 +264,7 @@ protected: // *************************************************************************** -class FemGuiExport PlaneWidget : public FunctionWidget +class FemGuiExport PlaneWidget: public FunctionWidget { Q_OBJECT public: @@ -249,7 +283,7 @@ private: std::unique_ptr ui; }; -class FemGuiExport ViewProviderFemPostPlaneFunction : public ViewProviderFemPostFunction +class FemGuiExport ViewProviderFemPostPlaneFunction: public ViewProviderFemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostPlaneFunction); @@ -273,7 +307,7 @@ private: // *************************************************************************** -class FemGuiExport SphereWidget : public FunctionWidget +class FemGuiExport SphereWidget: public FunctionWidget { Q_OBJECT public: @@ -292,7 +326,7 @@ private: std::unique_ptr ui; }; -class FemGuiExport ViewProviderFemPostSphereFunction : public ViewProviderFemPostFunction +class FemGuiExport ViewProviderFemPostSphereFunction: public ViewProviderFemPostFunction { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostSphereFunction); @@ -310,14 +344,14 @@ protected: namespace ShapeNodes { - SoGroup* postBox(); - SoGroup* postCylinder(); - SoGroup* postPlane(); - SoGroup* postSphere(); +SoGroup* postBox(); +SoGroup* postCylinder(); +SoGroup* postPlane(); +SoGroup* postSphere(); -} //namespace ShapeNodes +} // namespace ShapeNodes -} //namespace FemGui +} // namespace FemGui -#endif // FEM_VIEWPROVIDERFEMPOSTFUNCTION_H +#endif // FEM_VIEWPROVIDERFEMPOSTFUNCTION_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp index eddd8ccd2e..92a81f33f5 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp @@ -23,27 +23,27 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include -# include -# include -# include +#include +#include +#include #endif #include @@ -62,9 +62,9 @@ #include -#include "ViewProviderFemPostObject.h" #include "TaskPostBoxes.h" #include "ViewProviderAnalysis.h" +#include "ViewProviderFemPostObject.h" using namespace FemGui; @@ -78,7 +78,8 @@ using vtkIdTypePtr = vtkIdType*; // ---------------------------------------------------------------------------- -namespace { +namespace +{ /* * The class FemPostObjectSelectionObserver notifies a ViewProviderFemPostObject * only if its selection status has changed @@ -86,17 +87,21 @@ namespace { class FemPostObjectSelectionObserver { public: - static FemPostObjectSelectionObserver& instance() { + static FemPostObjectSelectionObserver& instance() + { static FemPostObjectSelectionObserver inst; return inst; } - void registerFemPostObject(ViewProviderFemPostObject* vp) { + void registerFemPostObject(ViewProviderFemPostObject* vp) + { views.insert(vp); } - void unregisterFemPostObject(ViewProviderFemPostObject* vp) { + void unregisterFemPostObject(ViewProviderFemPostObject* vp) + { auto it = views.find(vp); - if (it != views.end()) + if (it != views.end()) { views.erase(it); + } } void selectionChanged(const Gui::SelectionChanges& msg) @@ -112,18 +117,19 @@ public: } private: - FemPostObjectSelectionObserver() { - //NOLINTBEGIN + FemPostObjectSelectionObserver() + { + // NOLINTBEGIN this->connectSelection = Gui::Selection().signalSelectionChanged.connect( std::bind(&FemPostObjectSelectionObserver::selectionChanged, this, sp::_1)); - //NOLINTEND + // NOLINTEND } ~FemPostObjectSelectionObserver() = default; public: FemPostObjectSelectionObserver(const FemPostObjectSelectionObserver&) = delete; - FemPostObjectSelectionObserver& operator= (const FemPostObjectSelectionObserver&) = delete; + FemPostObjectSelectionObserver& operator=(const FemPostObjectSelectionObserver&) = delete; private: std::set views; @@ -131,7 +137,7 @@ private: Connection connectSelection; }; -} +} // namespace // ---------------------------------------------------------------------------- @@ -139,7 +145,7 @@ PROPERTY_SOURCE(FemGui::ViewProviderFemPostObject, Gui::ViewProviderDocumentObje ViewProviderFemPostObject::ViewProviderFemPostObject() { - //initialize the properties + // initialize the properties ADD_PROPERTY_TYPE(Field, ((long)0), "Coloring", @@ -154,7 +160,7 @@ ViewProviderFemPostObject::ViewProviderFemPostObject() sPixmap = "fem-femmesh-from-shape"; - //create the subnodes which do the visualization work + // create the subnodes which do the visualization work m_shapeHints = new SoShapeHints(); m_shapeHints->ref(); m_shapeHints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; @@ -194,7 +200,7 @@ ViewProviderFemPostObject::ViewProviderFemPostObject() m_colorBar->Attach(this); m_colorBar->ref(); - //create the vtk algorithms we use for visualisation + // create the vtk algorithms we use for visualisation m_outline = vtkSmartPointer::New(); m_points = vtkSmartPointer::New(); m_pointsSurface = vtkSmartPointer::New(); @@ -268,7 +274,7 @@ void ViewProviderFemPostObject::attach(App::DocumentObject* pcObj) m_colorRoot->addChild(m_colorBar); - //all + // all addDisplayMaskMode(m_separator, "Default"); setDisplayMaskMode("Default"); @@ -282,20 +288,27 @@ SoSeparator* ViewProviderFemPostObject::getFrontRoot() const void ViewProviderFemPostObject::setDisplayMode(const char* ModeName) { - if (strcmp("Outline", ModeName) == 0) + if (strcmp("Outline", ModeName) == 0) { m_currentAlgorithm = m_outline; - else if (strcmp("Surface with Edges", ModeName) == 0) + } + else if (strcmp("Surface with Edges", ModeName) == 0) { m_currentAlgorithm = m_surfaceEdges; - else if (strcmp("Surface", ModeName) == 0) + } + else if (strcmp("Surface", ModeName) == 0) { m_currentAlgorithm = m_surface; - else if (strcmp("Wireframe", ModeName) == 0) + } + else if (strcmp("Wireframe", ModeName) == 0) { m_currentAlgorithm = m_wireframe; - else if (strcmp("Wireframe (surface only)", ModeName) == 0) + } + else if (strcmp("Wireframe (surface only)", ModeName) == 0) { m_currentAlgorithm = m_wireframeSurface; - else if (strcmp("Nodes", ModeName) == 0) + } + else if (strcmp("Nodes", ModeName) == 0) { m_currentAlgorithm = m_points; - else if (strcmp("Nodes (surface only)", ModeName) == 0) + } + else if (strcmp("Nodes (surface only)", ModeName) == 0) { m_currentAlgorithm = m_pointsSurface; + } updateVtk(); @@ -307,7 +320,7 @@ std::vector ViewProviderFemPostObject::getDisplayModes() const std::vector StrList; StrList.emplace_back("Outline"); StrList.emplace_back("Nodes"); - //StrList.emplace_back("Nodes (surface only)"); somehow this filter does not work + // StrList.emplace_back("Nodes (surface only)"); somehow this filter does not work StrList.emplace_back("Surface"); StrList.emplace_back("Surface with Edges"); StrList.emplace_back("Wireframe"); @@ -315,25 +328,29 @@ std::vector ViewProviderFemPostObject::getDisplayModes() const return StrList; } -void ViewProviderFemPostObject::updateVtk() { +void ViewProviderFemPostObject::updateVtk() +{ - if (!setupPipeline()) + if (!setupPipeline()) { return; + } m_currentAlgorithm->Update(); updateProperties(); update3D(); } -void ViewProviderFemPostObject::updateProperties() { +void ViewProviderFemPostObject::updateProperties() +{ m_blockPropertyChanges = true; vtkPolyData* poly = m_currentAlgorithm->GetOutput(); - //coloring + // coloring std::string val; - if (Field.hasEnums() && Field.getValue() >= 0) + if (Field.hasEnums() && Field.getValue() >= 0) { val = Field.getValueAsString(); + } std::vector colorArrays; colorArrays.emplace_back("None"); @@ -341,13 +358,15 @@ void ViewProviderFemPostObject::updateProperties() { vtkPointData* point = poly->GetPointData(); for (int i = 0; i < point->GetNumberOfArrays(); ++i) { std::string FieldName = point->GetArrayName(i); - if (FieldName != "Texture Coordinates") + if (FieldName != "Texture Coordinates") { colorArrays.push_back(FieldName); + } } vtkCellData* cell = poly->GetCellData(); - for (int i = 0; i < cell->GetNumberOfArrays(); ++i) + for (int i = 0; i < cell->GetNumberOfArrays(); ++i) { colorArrays.emplace_back(cell->GetArrayName(i)); + } App::Enumeration empty; Field.setValue(empty); @@ -355,34 +374,40 @@ void ViewProviderFemPostObject::updateProperties() { Field.setValue(m_coloringEnum); std::vector::iterator it = std::find(colorArrays.begin(), colorArrays.end(), val); - if (!val.empty() && it != colorArrays.end()) + if (!val.empty() && it != colorArrays.end()) { Field.setValue(val.c_str()); + } Field.purgeTouched(); - //Vector mode - if (VectorMode.hasEnums() && VectorMode.getValue() >= 0) + // Vector mode + if (VectorMode.hasEnums() && VectorMode.getValue() >= 0) { val = VectorMode.getValueAsString(); + } colorArrays.clear(); - if (Field.getValue() == 0) + if (Field.getValue() == 0) { colorArrays.emplace_back("Not a vector"); + } else { - int array = Field.getValue() - 1; //0 is none + int array = Field.getValue() - 1; // 0 is none vtkDataArray* data = point->GetArray(array); - if (!data) + if (!data) { return; + } - if (data->GetNumberOfComponents() == 1) + if (data->GetNumberOfComponents() == 1) { colorArrays.emplace_back("Not a vector"); + } else { colorArrays.emplace_back("Magnitude"); if (data->GetNumberOfComponents() >= 2) { colorArrays.emplace_back("X"); colorArrays.emplace_back("Y"); } - if (data->GetNumberOfComponents() >= 3) + if (data->GetNumberOfComponents() >= 3) { colorArrays.emplace_back("Z"); + } } } @@ -391,13 +416,15 @@ void ViewProviderFemPostObject::updateProperties() { VectorMode.setValue(m_vectorEnum); it = std::find(colorArrays.begin(), colorArrays.end(), val); - if (!val.empty() && it != colorArrays.end()) + if (!val.empty() && it != colorArrays.end()) { VectorMode.setValue(val.c_str()); + } m_blockPropertyChanges = false; } -void ViewProviderFemPostObject::update3D() { +void ViewProviderFemPostObject::update3D() +{ vtkPolyData* pd = m_currentAlgorithm->GetOutput(); @@ -426,7 +453,7 @@ void ViewProviderFemPostObject::update3D() { m_faces->coordIndex.startEditing(); int soidx = 0; cells = pd->GetPolys(); - for (cells->InitTraversal(); cells->GetNextCell(npts, indx); ) { + for (cells->InitTraversal(); cells->GetNextCell(npts, indx);) { for (int i = 0; i < npts; i++) { m_faces->coordIndex.set1Value(soidx, static_cast(indx[i])); @@ -438,8 +465,9 @@ void ViewProviderFemPostObject::update3D() { m_faces->coordIndex.setNum(soidx); m_faces->coordIndex.finishEditing(); } - else + else { m_faces->coordIndex.setNum(0); + } // write out tstrips if any if (pd->GetNumberOfStrips() > 0) { @@ -447,7 +475,7 @@ void ViewProviderFemPostObject::update3D() { int soidx = 0; cells = pd->GetStrips(); m_triangleStrips->coordIndex.startEditing(); - for (cells->InitTraversal(); cells->GetNextCell(npts, indx); ) { + for (cells->InitTraversal(); cells->GetNextCell(npts, indx);) { for (int i = 0; i < npts; i++) { m_triangleStrips->coordIndex.set1Value(soidx, static_cast(indx[i])); @@ -459,8 +487,9 @@ void ViewProviderFemPostObject::update3D() { m_triangleStrips->coordIndex.setNum(soidx); m_triangleStrips->coordIndex.finishEditing(); } - else + else { m_triangleStrips->coordIndex.setNum(0); + } // write out lines if any if (pd->GetNumberOfLines() > 0) { @@ -468,7 +497,7 @@ void ViewProviderFemPostObject::update3D() { int soidx = 0; cells = pd->GetLines(); m_lines->coordIndex.startEditing(); - for (cells->InitTraversal(); cells->GetNextCell(npts, indx); ) { + for (cells->InitTraversal(); cells->GetNextCell(npts, indx);) { for (int i = 0; i < npts; i++) { m_lines->coordIndex.set1Value(soidx, static_cast(indx[i])); ++soidx; @@ -479,8 +508,9 @@ void ViewProviderFemPostObject::update3D() { m_lines->coordIndex.setNum(soidx); m_lines->coordIndex.finishEditing(); } - else + else { m_lines->coordIndex.setNum(0); + } // write out verts if any if (pd->GetNumberOfVerts() > 0) { @@ -489,23 +519,26 @@ void ViewProviderFemPostObject::update3D() { cells = pd->GetVerts(); m_markers->coordIndex.startEditing(); m_markers->coordIndex.setNum(pd->GetNumberOfVerts()); - for (cells->InitTraversal(); cells->GetNextCell(npts, indx); ) { + for (cells->InitTraversal(); cells->GetNextCell(npts, indx);) { m_markers->coordIndex.set1Value(soidx, static_cast(indx[0])); ++soidx; } m_markers->coordIndex.finishEditing(); } - else + else { m_markers->coordIndex.setNum(0); + } } -void ViewProviderFemPostObject::WritePointData(vtkPoints* points, vtkDataArray* normals, +void ViewProviderFemPostObject::WritePointData(vtkPoints* points, + vtkDataArray* normals, vtkDataArray* tcoords) { Q_UNUSED(tcoords); - if (!points) + if (!points) { return; + } m_coordinates->point.setNum(points->GetNumberOfPoints()); SbVec3f* pnts = m_coordinates->point.startEditing(); @@ -551,8 +584,9 @@ void ViewProviderFemPostObject::updateMaterial() void ViewProviderFemPostObject::WriteColorData(bool ResetColorBarRange) { - if (!setupPipeline()) + if (!setupPipeline()) { return; + } if (Field.getEnumVector().empty() || Field.getValue() == 0) { m_material->diffuseColor.setValue(SbColor(0.8, 0.8, 0.8)); @@ -566,19 +600,21 @@ void ViewProviderFemPostObject::WriteColorData(bool ResetColorBarRange) return; }; - int array = Field.getValue() - 1; // 0 is none + int array = Field.getValue() - 1; // 0 is none vtkPolyData* pd = m_currentAlgorithm->GetOutput(); vtkDataArray* data = pd->GetPointData()->GetArray(array); - if (!data) + if (!data) { return; + } - int component = VectorMode.getValue() - 1; // 0 is either "Not a vector" or magnitude, - // for -1 is correct for magnitude. - // x y and z are one number too high - if (strcmp(VectorMode.getValueAsString(), "Not a vector") == 0) + int component = VectorMode.getValue() - 1; // 0 is either "Not a vector" or magnitude, + // for -1 is correct for magnitude. + // x y and z are one number too high + if (strcmp(VectorMode.getValueAsString(), "Not a vector") == 0) { component = 0; + } - //build the lookuptable + // build the lookuptable if (ResetColorBarRange) { double range[2]; data->GetRange(range, component); @@ -599,8 +635,9 @@ void ViewProviderFemPostObject::WriteColorData(bool ResetColorBarRange) value = data->GetComponent(i, component); } else { - for (int j = 0; j < data->GetNumberOfComponents(); ++j) + for (int j = 0; j < data->GetNumberOfComponents(); ++j) { value += std::pow(data->GetComponent(i, j), 2); + } value = std::sqrt(value); } @@ -658,8 +695,9 @@ void ViewProviderFemPostObject::filterArtifacts(vtkDataSet* dset) // since we will set the filter according to the visible bounding box // assure the object is visible bool visibility = this->Visibility.getValue(); - if (!visibility) + if (!visibility) { this->Visibility.setValue(true); + } m_blockPropertyChanges = true; Gui::Document* doc = this->getDocument(); @@ -688,10 +726,12 @@ void ViewProviderFemPostObject::filterArtifacts(vtkDataSet* dset) extractor->SetInputData(dset); extractor->Update(); auto extractorResult = extractor->GetOutputDataObject(0); - if (extractorResult) + if (extractorResult) { m_surface->SetInputData(extractorResult); - else + } + else { m_surface->SetInputData(dset); + } } else { // for the case that there are only 2D objects @@ -699,28 +739,32 @@ void ViewProviderFemPostObject::filterArtifacts(vtkDataSet* dset) } } // restore initial vsibility - if (!visibility) + if (!visibility) { this->Visibility.setValue(visibility); + } m_blockPropertyChanges = false; } bool ViewProviderFemPostObject::setupPipeline() { - if (m_blockPropertyChanges) + if (m_blockPropertyChanges) { return false; + } auto postObject = static_cast(getObject()); vtkDataObject* data = postObject->Data.getValue(); - if (!data) + if (!data) { return false; + } // check all fields if there is a real/imaginary one and if so // add a field with an absolute value vtkSmartPointer SPdata = data; vtkDataSet* dset = vtkDataSet::SafeDownCast(SPdata); - if (!dset) + if (!dset) { return false; + } std::string FieldName; auto numFields = dset->GetPointData()->GetNumberOfArrays(); for (int i = 0; i < numFields; ++i) { @@ -745,27 +789,32 @@ bool ViewProviderFemPostObject::setupPipeline() // filtering is only necessary for pipelines and warp filters if (FilterMultiCPUResults && (UseNumberOfCores > 1) && ((postObject->getTypeId() == Base::Type::fromName("Fem::FemPostPipeline")) - || (postObject->getTypeId() == Base::Type::fromName("Fem::FemPostWarpVectorFilter")))) + || (postObject->getTypeId() == Base::Type::fromName("Fem::FemPostWarpVectorFilter")))) { filterArtifacts(dset); - else + } + else { m_surface->SetInputData(dset); + } return true; } void ViewProviderFemPostObject::onChanged(const App::Property* prop) { - if (m_blockPropertyChanges) + if (m_blockPropertyChanges) { return; + } bool ResetColorBarRange; // the point filter delivers a single value thus recoloring the bar is senseless if (static_cast(getObject())->getTypeId() - == Base::Type::fromName("Fem::FemPostDataAtPointFilter")) + == Base::Type::fromName("Fem::FemPostDataAtPointFilter")) { ResetColorBarRange = false; - else + } + else { ResetColorBarRange = true; + } if (prop == &Field && setupPipeline()) { updateProperties(); @@ -791,10 +840,11 @@ bool ViewProviderFemPostObject::doubleClicked() ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); bool isBackLightEnabled = hGrp->GetBool("EnableBacklight", false); - if (!isBackLightEnabled) + if (!isBackLightEnabled) { Base::Console().Error("Backlight is not enabled. Due to a VTK implementation problem you " "really should consider to enable backlight in FreeCAD display " "preferences if you work with VTK post processing.\n"); + } // set edit Gui::Application::Instance->activeDocument()->setEdit(this, (int)ViewProvider::Default); return true; @@ -806,8 +856,9 @@ bool ViewProviderFemPostObject::setEdit(int ModNum) Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); TaskDlgPost* postDlg = qobject_cast(dlg); - if (postDlg && postDlg->getView() != this) - postDlg = nullptr; // another pad left open its task panel + if (postDlg && postDlg->getView() != this) { + postDlg = nullptr; // another pad left open its task panel + } if (dlg && !postDlg) { QMessageBox msgBox; msgBox.setText(QObject::tr("A dialog is already open in the task panel")); @@ -815,15 +866,18 @@ bool ViewProviderFemPostObject::setEdit(int ModNum) msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No); msgBox.setDefaultButton(QMessageBox::Yes); int ret = msgBox.exec(); - if (ret == QMessageBox::Yes) + if (ret == QMessageBox::Yes) { Gui::Control().reject(); - else + } + else { return false; + } } // start the edit dialog - if (postDlg) + if (postDlg) { Gui::Control().showDialog(postDlg); + } else { postDlg = new TaskDlgPost(this); setupTaskDialog(postDlg); @@ -847,7 +901,7 @@ void ViewProviderFemPostObject::unsetEdit(int ModNum) { if (ModNum == ViewProvider::Default) { // and update the pad - //getSketchObject()->getDocument()->recompute(); + // getSketchObject()->getDocument()->recompute(); // when pressing ESC make sure to close the dialog Gui::Control().closeDialog(); @@ -869,11 +923,12 @@ void ViewProviderFemPostObject::hide() // get all objects in the document auto docGui = Gui::Application::Instance->activeDocument(); - if (!docGui) + if (!docGui) { return; + } auto doc = docGui->getDocument(); - std::vector ObjectsList = doc->getObjects(); - App::DocumentObject *firstVisiblePostObject = nullptr; + std::vector ObjectsList = doc->getObjects(); + App::DocumentObject* firstVisiblePostObject = nullptr; // step through the objects for (auto it : ObjectsList) { if (it->getTypeId().isDerivedFrom(Fem::FemPostObject::getClassTypeId())) { @@ -887,9 +942,10 @@ void ViewProviderFemPostObject::hide() // refresh found object if (firstVisiblePostObject) { auto viewProvider = docGui->getViewProvider(firstVisiblePostObject); - auto FEMviewProvider = static_cast(viewProvider); - if (FEMviewProvider) + auto FEMviewProvider = static_cast(viewProvider); + if (FEMviewProvider) { FEMviewProvider->WriteColorData(true); + } } } @@ -902,7 +958,7 @@ void ViewProviderFemPostObject::show() WriteColorData(true); } -void ViewProviderFemPostObject::OnChange(Base::Subject< int >& /*rCaller*/, int /*rcReason*/) +void ViewProviderFemPostObject::OnChange(Base::Subject& /*rCaller*/, int /*rcReason*/) { bool ResetColorBarRange = false; WriteColorData(ResetColorBarRange); @@ -924,15 +980,16 @@ bool ViewProviderFemPostObject::canDelete(App::DocumentObject* obj) const return true; } -void ViewProviderFemPostObject::onSelectionChanged(const Gui::SelectionChanges &sel) +void ViewProviderFemPostObject::onSelectionChanged(const Gui::SelectionChanges& sel) { // If a FemPostObject is selected in the document tree we must refresh its // color bar. // But don't do this if the object is invisible because other objects with a // color bar might be visible and the color bar is then wrong. if (sel.Type == Gui::SelectionChanges::AddSelection) { - if (this->getObject()->Visibility.getValue()) + if (this->getObject()->Visibility.getValue()) { updateMaterial(); + } } } @@ -942,25 +999,29 @@ void ViewProviderFemPostObject::addAbsoluteField(vtkDataSet* dset, std::string F // real field names have the suffix " re", given by Elmer // if the field does not have this suffix, we can return auto suffix = FieldName.substr(FieldName.size() - 3, FieldName.size() - 1); - if (strcmp(suffix.c_str(), " re") != 0) + if (strcmp(suffix.c_str(), " re") != 0) { return; + } // absolute fields might have already been created, then do nothing auto strAbsoluteFieldName = FieldName.substr(0, FieldName.size() - 2) + "abs"; vtkDataArray* testArray = dset->GetPointData()->GetArray(strAbsoluteFieldName.c_str()); - if (testArray) + if (testArray) { return; + } // safety check vtkDataArray* realDdata = dset->GetPointData()->GetArray(FieldName.c_str()); - if (!realDdata) + if (!realDdata) { return; + } // now check if the imaginary counterpart exists auto strImaginaryFieldName = FieldName.substr(0, FieldName.size() - 2) + "im"; vtkDataArray* imagDdata = dset->GetPointData()->GetArray(strImaginaryFieldName.c_str()); - if (!imagDdata) + if (!imagDdata) { return; + } // create a new array and copy over the real data // since one cannot directly access the values of a vtkDataSet diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.h b/src/Mod/Fem/Gui/ViewProviderFemPostObject.h index c981a511b1..70b455ae7d 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.h +++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.h @@ -54,18 +54,19 @@ class SoIndexedFaceSet; class SoIndexedLineSet; class SoIndexedTriangleStripSet; -namespace Gui { - class SelectionChanges; - class SoFCColorBar; -} +namespace Gui +{ +class SelectionChanges; +class SoFCColorBar; +} // namespace Gui namespace FemGui { class TaskDlgPost; -class FemGuiExport ViewProviderFemPostObject : public Gui::ViewProviderDocumentObject, - public Base::Observer +class FemGuiExport ViewProviderFemPostObject: public Gui::ViewProviderDocumentObject, + public Base::Observer { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostObject); @@ -76,17 +77,17 @@ public: /// destructor. ~ViewProviderFemPostObject() override; - App::PropertyEnumeration Field; - App::PropertyEnumeration VectorMode; - App::PropertyPercent Transparency; + App::PropertyEnumeration Field; + App::PropertyEnumeration VectorMode; + App::PropertyPercent Transparency; - void attach(App::DocumentObject *pcObject) override; + void attach(App::DocumentObject* pcObject) override; void setDisplayMode(const char* ModeName) override; std::vector getDisplayModes() const override; void updateData(const App::Property*) override; void onChanged(const App::Property* prop) override; - //edit handling + // edit handling bool doubleClicked() override; bool setEdit(int ModNum) override; void unsetEdit(int ModNum) override; @@ -97,7 +98,7 @@ public: SoSeparator* getFrontRoot() const override; // observer for the color bar - void OnChange(Base::Subject< int >& rCaller, int rcReason) override; + void OnChange(Base::Subject& rCaller, int rcReason) override; // update color bar void updateMaterial(); @@ -106,20 +107,20 @@ public: bool canDelete(App::DocumentObject* obj) const override; virtual void onSelectionChanged(const Gui::SelectionChanges& sel); - /** @name Selection handling - * This group of methods do the selection handling. - * Here you can define how the selection for your ViewProvider - * works. + /** @name Selection handling + * This group of methods do the selection handling. + * Here you can define how the selection for your ViewProvider + * works. */ //@{ -// /// indicates if the ViewProvider use the new Selection model -// virtual bool useNewSelectionModel(void) const {return true;} -// /// return a hit element to the selection path or 0 -// virtual std::string getElement(const SoDetail*) const; -// virtual SoDetail* getDetail(const char*) const; -// /// return the highlight lines for a given element or the whole shape -// virtual std::vector getSelectionShape(const char* Element) const; -// //@} + // /// indicates if the ViewProvider use the new Selection model + // virtual bool useNewSelectionModel(void) const {return true;} + // /// return a hit element to the selection path or 0 + // virtual std::string getElement(const SoDetail*) const; + // virtual SoDetail* getDetail(const char*) const; + // /// return the highlight lines for a given element or the whole shape + // virtual std::vector getSelectionShape(const char* Element) const; + // //@} protected: virtual void setupTaskDialog(TaskDlgPost* dlg); @@ -127,44 +128,43 @@ protected: void updateVtk(); void setRangeOfColorBar(double min, double max); - SoCoordinate3* m_coordinates; - SoIndexedPointSet* m_markers; - SoIndexedLineSet* m_lines; - SoIndexedFaceSet* m_faces; - SoIndexedTriangleStripSet* m_triangleStrips; - SoMaterial* m_material; - SoMaterialBinding* m_materialBinding; - SoShapeHints* m_shapeHints; - SoNormalBinding* m_normalBinding; - SoNormal* m_normals; - SoDrawStyle* m_drawStyle; - SoSeparator* m_separator; - Gui::SoFCColorBar* m_colorBar; - SoSeparator* m_colorRoot; - SoDrawStyle* m_colorStyle; + SoCoordinate3* m_coordinates; + SoIndexedPointSet* m_markers; + SoIndexedLineSet* m_lines; + SoIndexedFaceSet* m_faces; + SoIndexedTriangleStripSet* m_triangleStrips; + SoMaterial* m_material; + SoMaterialBinding* m_materialBinding; + SoShapeHints* m_shapeHints; + SoNormalBinding* m_normalBinding; + SoNormal* m_normals; + SoDrawStyle* m_drawStyle; + SoSeparator* m_separator; + Gui::SoFCColorBar* m_colorBar; + SoSeparator* m_colorRoot; + SoDrawStyle* m_colorStyle; - vtkSmartPointer m_currentAlgorithm; - vtkSmartPointer m_surface; - vtkSmartPointer m_surfaceEdges; - vtkSmartPointer m_outline; - vtkSmartPointer m_wireframe, m_wireframeSurface; - vtkSmartPointer m_points, m_pointsSurface; + vtkSmartPointer m_currentAlgorithm; + vtkSmartPointer m_surface; + vtkSmartPointer m_surfaceEdges; + vtkSmartPointer m_outline; + vtkSmartPointer m_wireframe, m_wireframeSurface; + vtkSmartPointer m_points, m_pointsSurface; private: void filterArtifacts(vtkDataSet* data); void updateProperties(); void update3D(); - void WritePointData(vtkPoints *points, vtkDataArray *normals, - vtkDataArray *tcoords); + void WritePointData(vtkPoints* points, vtkDataArray* normals, vtkDataArray* tcoords); void WriteColorData(bool ResetColorBarRange); void WriteTransparency(); void addAbsoluteField(vtkDataSet* dset, std::string FieldName); App::Enumeration m_coloringEnum, m_vectorEnum; - bool m_blockPropertyChanges{false}; + bool m_blockPropertyChanges {false}; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_VIEWPROVIDERFEMPOSTOBJECT_H +#endif // FEM_VIEWPROVIDERFEMPOSTOBJECT_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp index 37c20c032f..be75b54680 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp @@ -33,10 +33,10 @@ #include #include -#include "ViewProviderFemPostPipeline.h" -#include "ViewProviderFemPostPipelinePy.h" #include "ViewProviderAnalysis.h" #include "ViewProviderFemPostFunction.h" +#include "ViewProviderFemPostPipeline.h" +#include "ViewProviderFemPostPipelinePy.h" using namespace FemGui; @@ -50,40 +50,48 @@ ViewProviderFemPostPipeline::ViewProviderFemPostPipeline() ViewProviderFemPostPipeline::~ViewProviderFemPostPipeline() = default; -std::vector< App::DocumentObject* > ViewProviderFemPostPipeline::claimChildren() const { +std::vector ViewProviderFemPostPipeline::claimChildren() const +{ Fem::FemPostPipeline* pipeline = static_cast(getObject()); std::vector children; - if (pipeline->Functions.getValue()) + if (pipeline->Functions.getValue()) { children.push_back(pipeline->Functions.getValue()); + } - children.insert(children.end(), pipeline->Filter.getValues().begin(), - pipeline->Filter.getValues().end()); + children.insert(children.end(), + pipeline->Filter.getValues().begin(), + pipeline->Filter.getValues().end()); return children; } -std::vector< App::DocumentObject* > ViewProviderFemPostPipeline::claimChildren3D() const { +std::vector ViewProviderFemPostPipeline::claimChildren3D() const +{ return claimChildren(); } -void ViewProviderFemPostPipeline::updateData(const App::Property* prop) { +void ViewProviderFemPostPipeline::updateData(const App::Property* prop) +{ FemGui::ViewProviderFemPostObject::updateData(prop); Fem::FemPostPipeline* pipeline = static_cast(getObject()); - if (prop == &pipeline->Functions) + if (prop == &pipeline->Functions) { updateFunctionSize(); + } } -void ViewProviderFemPostPipeline::updateFunctionSize() { +void ViewProviderFemPostPipeline::updateFunctionSize() +{ // we need to get the bounding box and set the function provider size Fem::FemPostPipeline* obj = static_cast(getObject()); if (!obj->Functions.getValue() || !obj->Functions.getValue()->isDerivedFrom( - Fem::FemPostFunctionProvider::getClassTypeId())) + Fem::FemPostFunctionProvider::getClassTypeId())) { return; + } // get the function provider FemGui::ViewProviderFemPostFunctionProvider* vp = @@ -99,7 +107,7 @@ void ViewProviderFemPostPipeline::updateFunctionSize() { } } -void ViewProviderFemPostPipeline::onSelectionChanged(const Gui::SelectionChanges &sel) +void ViewProviderFemPostPipeline::onSelectionChanged(const Gui::SelectionChanges& sel) { auto getAnalyzeView = [](App::DocumentObject* obj) { ViewProviderFemAnalysis* analyzeView = nullptr; @@ -116,10 +124,12 @@ void ViewProviderFemPostPipeline::onSelectionChanged(const Gui::SelectionChanges // But don't do this if the object is invisible because other objects with a // color bar might be visible and the color bar is then wrong. if (sel.Type == Gui::SelectionChanges::AddSelection) { - if (this->getObject()->Visibility.getValue()) + if (this->getObject()->Visibility.getValue()) { updateMaterial(); - else - return; // purposely nothing should be done + } + else { + return; // purposely nothing should be done + } // Access analysis object ViewProviderFemAnalysis* analyzeView = getAnalyzeView(this->getObject()); @@ -135,29 +145,33 @@ void ViewProviderFemPostPipeline::updateColorBars() auto children = claimChildren(); for (auto& child : children) { if (child->Visibility.getValue()) { - auto vpObject = dynamic_cast( + auto vpObject = dynamic_cast( Gui::Application::Instance->getViewProvider(child)); - if (vpObject) + if (vpObject) { vpObject->updateMaterial(); + } } } // if pipeline is visible, update it - if (this->isVisible()) + if (this->isVisible()) { updateMaterial(); + } } -void ViewProviderFemPostPipeline::transformField(char *FieldName, double FieldFactor) +void ViewProviderFemPostPipeline::transformField(char* FieldName, double FieldFactor) { - Fem::FemPostPipeline *obj = static_cast(getObject()); + Fem::FemPostPipeline* obj = static_cast(getObject()); vtkSmartPointer data = obj->Data.getValue(); - vtkDataSet *dset = vtkDataSet::SafeDownCast(data); - if (!dset) + vtkDataSet* dset = vtkDataSet::SafeDownCast(data); + if (!dset) { return; - vtkDataArray *pdata = dset->GetPointData()->GetArray(FieldName); - if (!pdata) + } + vtkDataArray* pdata = dset->GetPointData()->GetArray(FieldName); + if (!pdata) { return; + } auto strFieldName = std::string(FieldName); @@ -176,16 +190,19 @@ void ViewProviderFemPostPipeline::transformField(char *FieldName, double FieldFa } } } - else + else { scaleField(dset, pdata, FieldFactor); + } } -void ViewProviderFemPostPipeline::scaleField(vtkDataSet* dset, vtkDataArray* pdata, +void ViewProviderFemPostPipeline::scaleField(vtkDataSet* dset, + vtkDataArray* pdata, double FieldFactor) { // safe guard - if (!dset || !pdata) + if (!dset || !pdata) { return; + } // step through all mesh points and scale them for (int i = 0; i < dset->GetNumberOfPoints(); ++i) { @@ -204,7 +221,7 @@ void ViewProviderFemPostPipeline::scaleField(vtkDataSet* dset, vtkDataArray* pda } } -PyObject *ViewProviderFemPostPipeline::getPyObject() +PyObject* ViewProviderFemPostPipeline::getPyObject() { if (PythonObject.is(Py::_None())) { // ref counter is set to 1 diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.h b/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.h index d6d2dbf971..4edf71c8a4 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.h +++ b/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.h @@ -32,7 +32,8 @@ namespace FemGui { -class FemGuiExport ViewProviderFemPostPipeline : public ViewProviderFemPostObject { +class FemGuiExport ViewProviderFemPostPipeline: public ViewProviderFemPostObject +{ PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderFemPostPipeline); @@ -41,24 +42,23 @@ public: ViewProviderFemPostPipeline(); ~ViewProviderFemPostPipeline() override; - std::vector< App::DocumentObject* > claimChildren() const override; - std::vector< App::DocumentObject* > claimChildren3D() const override; + std::vector claimChildren() const override; + std::vector claimChildren3D() const override; void updateData(const App::Property* prop) override; - void onSelectionChanged(const Gui::SelectionChanges &sel) override; + void onSelectionChanged(const Gui::SelectionChanges& sel) override; void updateColorBars(); - void transformField(char *FieldName, double FieldFactor); - void scaleField(vtkDataSet *dset, vtkDataArray *pdata, double FieldFactor); - PyObject *getPyObject() override; + void transformField(char* FieldName, double FieldFactor); + void scaleField(vtkDataSet* dset, vtkDataArray* pdata, double FieldFactor); + PyObject* getPyObject() override; private: Py::Object PythonObject; protected: void updateFunctionSize(); - }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_VIEWPROVIDERFEMPOSTPIPELINE_H +#endif // FEM_VIEWPROVIDERFEMPOSTPIPELINE_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostPipelinePyImp.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostPipelinePyImp.cpp index f0d15877c9..d206a06f1d 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostPipelinePyImp.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostPipelinePyImp.cpp @@ -22,10 +22,12 @@ #include "PreCompiled.h" +// clang-format off #include "ViewProviderFemPostPipeline.h" // inclusion of the generated files (generated out of ViewProviderFemPostPipelinePy.xml) #include "ViewProviderFemPostPipelinePy.h" #include "ViewProviderFemPostPipelinePy.cpp" +// clang-format on using namespace FemGui; @@ -36,35 +38,37 @@ std::string ViewProviderFemPostPipelinePy::representation() const return {""}; } -PyObject *ViewProviderFemPostPipelinePy::updateColorBars(PyObject *args) +PyObject* ViewProviderFemPostPipelinePy::updateColorBars(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } this->getViewProviderFemPostPipelinePtr()->updateColorBars(); Py_Return; } -PyObject *ViewProviderFemPostPipelinePy::transformField(PyObject *args) +PyObject* ViewProviderFemPostPipelinePy::transformField(PyObject* args) { - char *FieldName; + char* FieldName; double FieldFactor; - if (!PyArg_ParseTuple(args, "sd", &FieldName, &FieldFactor)) + if (!PyArg_ParseTuple(args, "sd", &FieldName, &FieldFactor)) { return nullptr; + } this->getViewProviderFemPostPipelinePtr()->transformField(FieldName, FieldFactor); Py_Return; } -PyObject *ViewProviderFemPostPipelinePy::getCustomAttributes(const char * /*attr*/) const +PyObject* ViewProviderFemPostPipelinePy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } -int ViewProviderFemPostPipelinePy::setCustomAttributes(const char * /*attr*/, PyObject * /*obj*/) +int ViewProviderFemPostPipelinePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { return 0; } diff --git a/src/Mod/Fem/Gui/ViewProviderResult.cpp b/src/Mod/Fem/Gui/ViewProviderResult.cpp index cd0af53a49..27b8f8a79b 100644 --- a/src/Mod/Fem/Gui/ViewProviderResult.cpp +++ b/src/Mod/Fem/Gui/ViewProviderResult.cpp @@ -39,11 +39,12 @@ ViewProviderResult::~ViewProviderResult() = default; // Python feature ----------------------------------------------------------------------- -namespace Gui { +namespace Gui +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(FemGui::ViewProviderResultPython, FemGui::ViewProviderResult) /// @endcond // explicit template instantiation template class FemGuiExport ViewProviderPythonFeatureT; -} +} // namespace Gui diff --git a/src/Mod/Fem/Gui/ViewProviderResult.h b/src/Mod/Fem/Gui/ViewProviderResult.h index e9479635e8..41792756a9 100644 --- a/src/Mod/Fem/Gui/ViewProviderResult.h +++ b/src/Mod/Fem/Gui/ViewProviderResult.h @@ -31,7 +31,7 @@ namespace FemGui { -class FemGuiExport ViewProviderResult : public Gui::ViewProviderDocumentObject +class FemGuiExport ViewProviderResult: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderResult); @@ -44,12 +44,14 @@ public: // shows solid in the tree bool isShow() const override - { return true; } + { + return true; + } }; using ViewProviderResultPython = Gui::ViewProviderPythonFeatureT; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderResult_H +#endif // FEM_ViewProviderResult_H diff --git a/src/Mod/Fem/Gui/ViewProviderSetElements.cpp b/src/Mod/Fem/Gui/ViewProviderSetElements.cpp index cbe605b030..3bae75eee5 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetElements.cpp +++ b/src/Mod/Fem/Gui/ViewProviderSetElements.cpp @@ -31,20 +31,18 @@ PROPERTY_SOURCE(FemGui::ViewProviderSetElements, Gui::ViewProviderGeometryObject bool ViewProviderSetElements::doubleClicked() { - //Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); - //Gui::Control().showDialog(dlg); + // Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); Gui::Control().showDialog(dlg); return true; } bool ViewProviderSetElements::setEdit(int) { - //Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); - //Gui::Control().showDialog(dlg); + // Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); Gui::Control().showDialog(dlg); return true; } void ViewProviderSetElements::unsetEdit(int) -{ - -} +{} diff --git a/src/Mod/Fem/Gui/ViewProviderSetElements.h b/src/Mod/Fem/Gui/ViewProviderSetElements.h index 0264130c7f..ef9f003537 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetElements.h +++ b/src/Mod/Fem/Gui/ViewProviderSetElements.h @@ -29,7 +29,7 @@ namespace FemGui { -class ViewProviderSetElements : public Gui::ViewProviderGeometryObject +class ViewProviderSetElements: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderSetElements); @@ -41,7 +41,7 @@ protected: void unsetEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderSetElements_H +#endif // FEM_ViewProviderSetElements_H diff --git a/src/Mod/Fem/Gui/ViewProviderSetFaces.cpp b/src/Mod/Fem/Gui/ViewProviderSetFaces.cpp index a1a0f30544..080681c531 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetFaces.cpp +++ b/src/Mod/Fem/Gui/ViewProviderSetFaces.cpp @@ -31,20 +31,18 @@ PROPERTY_SOURCE(FemGui::ViewProviderSetFaces, Gui::ViewProviderGeometryObject) bool ViewProviderSetFaces::doubleClicked() { - //Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); - //Gui::Control().showDialog(dlg); + // Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); Gui::Control().showDialog(dlg); return true; } bool ViewProviderSetFaces::setEdit(int) { - //Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); - //Gui::Control().showDialog(dlg); + // Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); Gui::Control().showDialog(dlg); return true; } void ViewProviderSetFaces::unsetEdit(int) -{ - -} +{} diff --git a/src/Mod/Fem/Gui/ViewProviderSetFaces.h b/src/Mod/Fem/Gui/ViewProviderSetFaces.h index bb3accf2b3..0c658ce13f 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetFaces.h +++ b/src/Mod/Fem/Gui/ViewProviderSetFaces.h @@ -29,7 +29,7 @@ namespace FemGui { -class ViewProviderSetFaces : public Gui::ViewProviderGeometryObject +class ViewProviderSetFaces: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderSetFaces); @@ -41,7 +41,7 @@ protected: void unsetEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderSetFaces_H +#endif // FEM_ViewProviderSetFaces_H diff --git a/src/Mod/Fem/Gui/ViewProviderSetGeometry.cpp b/src/Mod/Fem/Gui/ViewProviderSetGeometry.cpp index f911fe2c91..55dd28e3ec 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetGeometry.cpp +++ b/src/Mod/Fem/Gui/ViewProviderSetGeometry.cpp @@ -31,20 +31,18 @@ PROPERTY_SOURCE(FemGui::ViewProviderSetGeometry, Gui::ViewProviderGeometryObject bool ViewProviderSetGeometry::doubleClicked() { - //Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); - //Gui::Control().showDialog(dlg); + // Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); Gui::Control().showDialog(dlg); return true; } bool ViewProviderSetGeometry::setEdit(int) { - //Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); - //Gui::Control().showDialog(dlg); + // Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(dynamic_cast(getObject())); Gui::Control().showDialog(dlg); return true; } void ViewProviderSetGeometry::unsetEdit(int) -{ - -} +{} diff --git a/src/Mod/Fem/Gui/ViewProviderSetGeometry.h b/src/Mod/Fem/Gui/ViewProviderSetGeometry.h index 388c268a51..ed731cc1d9 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetGeometry.h +++ b/src/Mod/Fem/Gui/ViewProviderSetGeometry.h @@ -29,7 +29,7 @@ namespace FemGui { -class ViewProviderSetGeometry : public Gui::ViewProviderGeometryObject +class ViewProviderSetGeometry: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderSetGeometry); @@ -41,7 +41,7 @@ protected: void unsetEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderSetGeometry_H +#endif // FEM_ViewProviderSetGeometry_H diff --git a/src/Mod/Fem/Gui/ViewProviderSetNodes.cpp b/src/Mod/Fem/Gui/ViewProviderSetNodes.cpp index 49f9fcb15d..8fd2920b26 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetNodes.cpp +++ b/src/Mod/Fem/Gui/ViewProviderSetNodes.cpp @@ -35,7 +35,8 @@ PROPERTY_SOURCE(FemGui::ViewProviderSetNodes, Gui::ViewProviderGeometryObject) bool ViewProviderSetNodes::doubleClicked() { - Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(static_cast(getObject())); + Gui::TaskView::TaskDialog* dlg = + new TaskDlgCreateNodeSet(static_cast(getObject())); Gui::Control().showDialog(dlg); return true; } @@ -43,12 +44,11 @@ bool ViewProviderSetNodes::doubleClicked() bool ViewProviderSetNodes::setEdit(int) { - Gui::TaskView::TaskDialog* dlg = new TaskDlgCreateNodeSet(static_cast(getObject())); + Gui::TaskView::TaskDialog* dlg = + new TaskDlgCreateNodeSet(static_cast(getObject())); Gui::Control().showDialog(dlg); return true; } void ViewProviderSetNodes::unsetEdit(int) -{ - -} +{} diff --git a/src/Mod/Fem/Gui/ViewProviderSetNodes.h b/src/Mod/Fem/Gui/ViewProviderSetNodes.h index 697e55d32b..7ac667b073 100644 --- a/src/Mod/Fem/Gui/ViewProviderSetNodes.h +++ b/src/Mod/Fem/Gui/ViewProviderSetNodes.h @@ -29,7 +29,7 @@ namespace FemGui { -class ViewProviderSetNodes : public Gui::ViewProviderGeometryObject +class ViewProviderSetNodes: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderSetNodes); @@ -41,7 +41,7 @@ protected: void unsetEdit(int ModNum) override; }; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderSetNodes_H +#endif // FEM_ViewProviderSetNodes_H diff --git a/src/Mod/Fem/Gui/ViewProviderSolver.cpp b/src/Mod/Fem/Gui/ViewProviderSolver.cpp index 1734de99d0..6b9bedd8bd 100644 --- a/src/Mod/Fem/Gui/ViewProviderSolver.cpp +++ b/src/Mod/Fem/Gui/ViewProviderSolver.cpp @@ -23,16 +23,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include #include -#include "ViewProviderSolver.h" #include "ViewProviderAnalysis.h" +#include "ViewProviderSolver.h" using namespace FemGui; @@ -48,7 +48,7 @@ ViewProviderSolver::~ViewProviderSolver() = default; std::vector ViewProviderSolver::getDisplayModes() const { - return { "Solver" }; + return {"Solver"}; } bool ViewProviderSolver::onDelete(const std::vector&) @@ -70,11 +70,12 @@ bool ViewProviderSolver::canDelete(App::DocumentObject* obj) const // Python feature ----------------------------------------------------------------------- -namespace Gui { +namespace Gui +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(FemGui::ViewProviderSolverPython, FemGui::ViewProviderSolver) /// @endcond // explicit template instantiation template class FemGuiExport ViewProviderPythonFeatureT; -} +} // namespace Gui diff --git a/src/Mod/Fem/Gui/ViewProviderSolver.h b/src/Mod/Fem/Gui/ViewProviderSolver.h index 2f163a77bc..483a678b1e 100644 --- a/src/Mod/Fem/Gui/ViewProviderSolver.h +++ b/src/Mod/Fem/Gui/ViewProviderSolver.h @@ -37,7 +37,7 @@ class SoMaterialBinding; namespace FemGui { -class FemGuiExport ViewProviderSolver : public Gui::ViewProviderDocumentObject +class FemGuiExport ViewProviderSolver: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(FemGui::ViewProviderSolver); @@ -49,7 +49,8 @@ public: ~ViewProviderSolver() override; // shows solid in the tree - bool isShow() const override { + bool isShow() const override + { return Visibility.getValue(); } /// A list of all possible display modes @@ -62,7 +63,7 @@ public: using ViewProviderSolverPython = Gui::ViewProviderPythonFeatureT; -} //namespace FemGui +} // namespace FemGui -#endif // FEM_ViewProviderSolver_H +#endif // FEM_ViewProviderSolver_H diff --git a/src/Mod/Fem/Gui/Workbench.cpp b/src/Mod/Fem/Gui/Workbench.cpp old mode 100755 new mode 100644 index ea948bcbf5..6d98e7e9e3 --- a/src/Mod/Fem/Gui/Workbench.cpp +++ b/src/Mod/Fem/Gui/Workbench.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -36,7 +36,7 @@ using namespace FemGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "FEM"); qApp->translate("Workbench", "&FEM"); // @@ -88,10 +88,9 @@ Workbench::~Workbench() = default; void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) const { StdWorkbench::setupContextMenu(recipient, item); - *item - << "Separator" - << "FEM_MeshClear" - << "FEM_MeshDisplayInfo"; + *item << "Separator" + << "FEM_MeshClear" + << "FEM_MeshDisplayInfo"; } Gui::ToolBarItem* Workbench::setupToolBars() const @@ -100,130 +99,124 @@ Gui::ToolBarItem* Workbench::setupToolBars() const Gui::ToolBarItem* model = new Gui::ToolBarItem(root); model->setCommand("Model"); - *model - << "FEM_Analysis" - << "Separator" - << "FEM_MaterialSolid" - << "FEM_MaterialFluid" - << "FEM_MaterialMechanicalNonlinear" - << "FEM_MaterialReinforced" - << "FEM_MaterialEditor" - << "Separator" - << "FEM_ElementGeometry1D" - << "FEM_ElementRotation1D" - << "FEM_ElementGeometry2D" - << "FEM_ElementFluid1D"; + *model << "FEM_Analysis" + << "Separator" + << "FEM_MaterialSolid" + << "FEM_MaterialFluid" + << "FEM_MaterialMechanicalNonlinear" + << "FEM_MaterialReinforced" + << "FEM_MaterialEditor" + << "Separator" + << "FEM_ElementGeometry1D" + << "FEM_ElementRotation1D" + << "FEM_ElementGeometry2D" + << "FEM_ElementFluid1D"; Gui::ToolBarItem* electromag = new Gui::ToolBarItem(root); electromag->setCommand("Electromagnetic boundary conditions"); - *electromag - << "FEM_CompEmConstraints"; + *electromag << "FEM_CompEmConstraints"; Gui::ToolBarItem* fluid = new Gui::ToolBarItem(root); fluid->setCommand("Fluid boundary conditions"); - *fluid - << "FEM_ConstraintInitialFlowVelocity" - << "FEM_ConstraintInitialPressure" - << "Separator" - << "FEM_ConstraintFlowVelocity"; + *fluid << "FEM_ConstraintInitialFlowVelocity" + << "FEM_ConstraintInitialPressure" + << "Separator" + << "FEM_ConstraintFlowVelocity"; Gui::ToolBarItem* geom = new Gui::ToolBarItem(root); geom->setCommand("Geometrical analysis features"); - *geom - << "FEM_ConstraintPlaneRotation" - << "FEM_ConstraintSectionPrint" - << "FEM_ConstraintTransform"; + *geom << "FEM_ConstraintPlaneRotation" + << "FEM_ConstraintSectionPrint" + << "FEM_ConstraintTransform"; Gui::ToolBarItem* mech = new Gui::ToolBarItem(root); mech->setCommand("Mechanical boundary conditions and loads"); - *mech - << "FEM_ConstraintFixed" - << "FEM_ConstraintDisplacement" - << "FEM_ConstraintContact" - << "FEM_ConstraintTie" - << "FEM_ConstraintSpring" - << "Separator" - << "FEM_ConstraintForce" - << "FEM_ConstraintPressure" - << "FEM_ConstraintCentrif" - << "FEM_ConstraintSelfWeight"; + *mech << "FEM_ConstraintFixed" + << "FEM_ConstraintDisplacement" + << "FEM_ConstraintContact" + << "FEM_ConstraintTie" + << "FEM_ConstraintSpring" + << "Separator" + << "FEM_ConstraintForce" + << "FEM_ConstraintPressure" + << "FEM_ConstraintCentrif" + << "FEM_ConstraintSelfWeight"; Gui::ToolBarItem* thermal = new Gui::ToolBarItem(root); thermal->setCommand("Thermal boundary conditions and loads"); - *thermal - << "FEM_ConstraintInitialTemperature" - << "Separator" - << "FEM_ConstraintHeatflux" - << "FEM_ConstraintTemperature" - << "FEM_ConstraintBodyHeatSource"; + *thermal << "FEM_ConstraintInitialTemperature" + << "Separator" + << "FEM_ConstraintHeatflux" + << "FEM_ConstraintTemperature" + << "FEM_ConstraintBodyHeatSource"; Gui::ToolBarItem* mesh = new Gui::ToolBarItem(root); mesh->setCommand("Mesh"); #ifdef FCWithNetgen - *mesh - << "FEM_MeshNetgenFromShape"; + *mesh << "FEM_MeshNetgenFromShape"; #endif - *mesh - << "FEM_MeshGmshFromShape" - << "Separator" - << "FEM_MeshBoundaryLayer" - << "FEM_MeshRegion" - << "FEM_MeshGroup" - << "Separator" - << "FEM_FEMMesh2Mesh"; + *mesh << "FEM_MeshGmshFromShape" + << "Separator" + << "FEM_MeshBoundaryLayer" + << "FEM_MeshRegion" + << "FEM_MeshGroup" + << "Separator" + << "FEM_FEMMesh2Mesh"; Gui::ToolBarItem* solve = new Gui::ToolBarItem(root); solve->setCommand("Solve"); - if (!Fem::Tools::checkIfBinaryExists("CCX", "ccx", "ccx").empty()) + if (!Fem::Tools::checkIfBinaryExists("CCX", "ccx", "ccx").empty()) { *solve << "FEM_SolverCalculixCxxtools"; - if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver").empty()) + } + if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver").empty()) { *solve << "FEM_SolverElmer"; + } // also check the multi-CPU Elmer build - else if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver_mpi").empty()) + else if (!Fem::Tools::checkIfBinaryExists("Elmer", "elmer", "ElmerSolver_mpi").empty()) { *solve << "FEM_SolverElmer"; - if (!Fem::Tools::checkIfBinaryExists("Mystran", "mystran", "mystran").empty()) + } + if (!Fem::Tools::checkIfBinaryExists("Mystran", "mystran", "mystran").empty()) { *solve << "FEM_SolverMystran"; - if (!Fem::Tools::checkIfBinaryExists("Z88", "z88", "z88r").empty()) + } + if (!Fem::Tools::checkIfBinaryExists("Z88", "z88", "z88r").empty()) { *solve << "FEM_SolverZ88"; + } *solve << "Separator" - << "FEM_CompMechEquations" - << "FEM_CompEmEquations" - << "FEM_EquationFlow" - << "FEM_EquationFlux" - << "FEM_EquationHeat" - << "Separator" - << "FEM_SolverControl" - << "FEM_SolverRun"; + << "FEM_CompMechEquations" + << "FEM_CompEmEquations" + << "FEM_EquationFlow" + << "FEM_EquationFlux" + << "FEM_EquationHeat" + << "Separator" + << "FEM_SolverControl" + << "FEM_SolverRun"; Gui::ToolBarItem* results = new Gui::ToolBarItem(root); results->setCommand("Results"); - *results - << "FEM_ResultsPurge" - << "FEM_ResultShow"; + *results << "FEM_ResultsPurge" + << "FEM_ResultShow"; #ifdef FC_USE_VTK - *results - << "Separator" - << "FEM_PostApplyChanges" - << "FEM_PostPipelineFromResult" - << "Separator" - << "FEM_PostFilterWarp" - << "FEM_PostFilterClipScalar" - << "FEM_PostFilterCutFunction" - << "FEM_PostFilterClipRegion" - << "FEM_PostFilterContours" - << "FEM_PostFilterDataAlongLine" - << "FEM_PostFilterLinearizedStresses" - << "FEM_PostFilterDataAtPoint" - << "Separator" - << "FEM_PostCreateFunctions"; + *results << "Separator" + << "FEM_PostApplyChanges" + << "FEM_PostPipelineFromResult" + << "Separator" + << "FEM_PostFilterWarp" + << "FEM_PostFilterClipScalar" + << "FEM_PostFilterCutFunction" + << "FEM_PostFilterClipRegion" + << "FEM_PostFilterContours" + << "FEM_PostFilterDataAlongLine" + << "FEM_PostFilterLinearizedStresses" + << "FEM_PostFilterDataAtPoint" + << "Separator" + << "FEM_PostCreateFunctions"; #endif Gui::ToolBarItem* utils = new Gui::ToolBarItem(root); utils->setCommand("Utilities"); - *utils - << "FEM_ClippingPlaneAdd" - << "FEM_ClippingPlaneRemoveAll" - << "FEM_Examples"; + *utils << "FEM_ClippingPlaneAdd" + << "FEM_ClippingPlaneRemoveAll" + << "FEM_Examples"; return root; } @@ -235,74 +228,67 @@ Gui::MenuItem* Workbench::setupMenuBar() const Gui::MenuItem* material = new Gui::MenuItem; material->setCommand("Materials"); - *material - << "FEM_MaterialSolid" - << "FEM_MaterialFluid" - << "FEM_MaterialMechanicalNonlinear" - << "FEM_MaterialReinforced" - << "FEM_MaterialEditor"; + *material << "FEM_MaterialSolid" + << "FEM_MaterialFluid" + << "FEM_MaterialMechanicalNonlinear" + << "FEM_MaterialReinforced" + << "FEM_MaterialEditor"; Gui::MenuItem* elegeom = new Gui::MenuItem; elegeom->setCommand("&Element Geometry"); - *elegeom - << "FEM_ElementGeometry1D" - << "FEM_ElementRotation1D" - << "FEM_ElementGeometry2D" - << "FEM_ElementFluid1D"; + *elegeom << "FEM_ElementGeometry1D" + << "FEM_ElementRotation1D" + << "FEM_ElementGeometry2D" + << "FEM_ElementFluid1D"; Gui::MenuItem* elec = new Gui::MenuItem; elec->setCommand("&Electromagnetic boundary conditions"); - *elec - << "FEM_ConstraintElectrostaticPotential" - << "FEM_ConstraintCurrentDensity" - << "FEM_ConstraintMagnetization"; + *elec << "FEM_ConstraintElectrostaticPotential" + << "FEM_ConstraintCurrentDensity" + << "FEM_ConstraintMagnetization"; Gui::MenuItem* fluid = new Gui::MenuItem; fluid->setCommand("&Fluid boundary conditions"); - *fluid - << "FEM_ConstraintInitialFlowVelocity" - << "FEM_ConstraintInitialPressure" - << "Separator" - << "FEM_ConstraintFlowVelocity"; + *fluid << "FEM_ConstraintInitialFlowVelocity" + << "FEM_ConstraintInitialPressure" + << "Separator" + << "FEM_ConstraintFlowVelocity"; Gui::MenuItem* geom = new Gui::MenuItem; geom->setCommand("&Geometrical analysis features"); - *geom - << "FEM_ConstraintPlaneRotation" - << "FEM_ConstraintSectionPrint" - << "FEM_ConstraintTransform"; + *geom << "FEM_ConstraintPlaneRotation" + << "FEM_ConstraintSectionPrint" + << "FEM_ConstraintTransform"; Gui::MenuItem* mech = new Gui::MenuItem; mech->setCommand("&Mechanical boundary conditions and loads"); - *mech - << "FEM_ConstraintFixed" - << "FEM_ConstraintDisplacement" - << "FEM_ConstraintContact" - << "FEM_ConstraintTie" - << "FEM_ConstraintSpring" - << "Separator" - << "FEM_ConstraintForce" - << "FEM_ConstraintPressure" - << "FEM_ConstraintCentrif" - << "FEM_ConstraintSelfWeight"; + *mech << "FEM_ConstraintFixed" + << "FEM_ConstraintDisplacement" + << "FEM_ConstraintContact" + << "FEM_ConstraintTie" + << "FEM_ConstraintSpring" + << "Separator" + << "FEM_ConstraintForce" + << "FEM_ConstraintPressure" + << "FEM_ConstraintCentrif" + << "FEM_ConstraintSelfWeight"; Gui::MenuItem* thermal = new Gui::MenuItem; thermal->setCommand("&Thermal boundary conditions and loads"); - *thermal - << "FEM_ConstraintInitialTemperature" - << "Separator" - << "FEM_ConstraintHeatflux" - << "FEM_ConstraintTemperature" - << "FEM_ConstraintBodyHeatSource"; + *thermal << "FEM_ConstraintInitialTemperature" + << "Separator" + << "FEM_ConstraintHeatflux" + << "FEM_ConstraintTemperature" + << "FEM_ConstraintBodyHeatSource"; -// Gui::MenuItem* nosolver = new Gui::MenuItem; -// nosolver->setCommand("&Analysis features without solver"); -// *nosolver -// << "FEM_ConstraintFluidBoundary" -// << "Separator" -// << "FEM_ConstraintBearing" -// << "FEM_ConstraintGear" -// << "FEM_ConstraintPulley"; + // Gui::MenuItem* nosolver = new Gui::MenuItem; + // nosolver->setCommand("&Analysis features without solver"); + // *nosolver + // << "FEM_ConstraintFluidBoundary" + // << "Separator" + // << "FEM_ConstraintBearing" + // << "FEM_ConstraintGear" + // << "FEM_ConstraintPulley"; Gui::MenuItem* constants = new Gui::MenuItem; constants->setCommand("&Overwrite Constants"); @@ -311,89 +297,75 @@ Gui::MenuItem* Workbench::setupMenuBar() const Gui::MenuItem* model = new Gui::MenuItem; root->insertItem(item, model); model->setCommand("M&odel"); - *model - << "FEM_Analysis" - << "Separator" - << material - << elegeom - << "Separator" - << elec - << fluid - << geom - << mech - << thermal - << "Separator" -// << nosolver -// << "Separator" - << constants; + *model << "FEM_Analysis" + << "Separator" << material << elegeom << "Separator" << elec << fluid << geom << mech + << thermal + << "Separator" + // << nosolver + // << "Separator" + << constants; Gui::MenuItem* mesh = new Gui::MenuItem; root->insertItem(item, mesh); mesh->setCommand("M&esh"); #ifdef FCWithNetgen - *mesh - << "FEM_MeshNetgenFromShape"; + *mesh << "FEM_MeshNetgenFromShape"; #endif - *mesh - << "FEM_MeshGmshFromShape" - << "Separator" - << "FEM_MeshBoundaryLayer" - << "FEM_MeshRegion" - << "FEM_MeshGroup" - << "Separator" - << "FEM_CreateNodesSet" - << "FEM_FEMMesh2Mesh"; + *mesh << "FEM_MeshGmshFromShape" + << "Separator" + << "FEM_MeshBoundaryLayer" + << "FEM_MeshRegion" + << "FEM_MeshGroup" + << "Separator" + << "FEM_CreateNodesSet" + << "FEM_FEMMesh2Mesh"; Gui::MenuItem* solve = new Gui::MenuItem; root->insertItem(item, solve); solve->setCommand("&Solve"); - *solve - << "FEM_SolverCalculixCxxtools" - << "FEM_SolverCalculiX" - << "FEM_SolverElmer" - << "FEM_SolverMystran" - << "FEM_SolverZ88" - << "Separator" - << "FEM_CompMechEquations" - << "FEM_CompEmEquations" - << "FEM_EquationFlow" - << "FEM_EquationFlux" - << "FEM_EquationHeat" - << "Separator" - << "FEM_SolverControl" - << "FEM_SolverRun"; + *solve << "FEM_SolverCalculixCxxtools" + << "FEM_SolverCalculiX" + << "FEM_SolverElmer" + << "FEM_SolverMystran" + << "FEM_SolverZ88" + << "Separator" + << "FEM_CompMechEquations" + << "FEM_CompEmEquations" + << "FEM_EquationFlow" + << "FEM_EquationFlux" + << "FEM_EquationHeat" + << "Separator" + << "FEM_SolverControl" + << "FEM_SolverRun"; Gui::MenuItem* results = new Gui::MenuItem; root->insertItem(item, results); results->setCommand("&Results"); - *results - << "FEM_ResultsPurge" - << "FEM_ResultShow"; + *results << "FEM_ResultsPurge" + << "FEM_ResultShow"; #ifdef FC_USE_VTK - *results - << "Separator" - << "FEM_PostApplyChanges" - << "FEM_PostPipelineFromResult" - << "Separator" - << "FEM_PostFilterWarp" - << "FEM_PostFilterClipScalar" - << "FEM_PostFilterCutFunction" - << "FEM_PostFilterClipRegion" - << "FEM_PostFilterContours" - << "FEM_PostFilterDataAlongLine" - << "FEM_PostFilterLinearizedStresses" - << "FEM_PostFilterDataAtPoint" - << "Separator" - << "FEM_PostCreateFunctions"; + *results << "Separator" + << "FEM_PostApplyChanges" + << "FEM_PostPipelineFromResult" + << "Separator" + << "FEM_PostFilterWarp" + << "FEM_PostFilterClipScalar" + << "FEM_PostFilterCutFunction" + << "FEM_PostFilterClipRegion" + << "FEM_PostFilterContours" + << "FEM_PostFilterDataAlongLine" + << "FEM_PostFilterLinearizedStresses" + << "FEM_PostFilterDataAtPoint" + << "Separator" + << "FEM_PostCreateFunctions"; #endif Gui::MenuItem* utils = new Gui::MenuItem; root->insertItem(item, utils); utils->setCommand("Utilities"); - *utils - << "FEM_ClippingPlaneAdd" - << "FEM_ClippingPlaneRemoveAll" - << "FEM_Examples"; + *utils << "FEM_ClippingPlaneAdd" + << "FEM_ClippingPlaneRemoveAll" + << "FEM_Examples"; return root; } diff --git a/src/Mod/Fem/Gui/Workbench.h b/src/Mod/Fem/Gui/Workbench.h old mode 100755 new mode 100644 index 59088e8886..558c0dd12f --- a/src/Mod/Fem/Gui/Workbench.h +++ b/src/Mod/Fem/Gui/Workbench.h @@ -27,26 +27,27 @@ #include #include -namespace FemGui { +namespace FemGui +{ /** * @author Werner Mayer */ -class FemGuiExport Workbench : public Gui::StdWorkbench +class FemGuiExport Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - Workbench(); - ~Workbench() override; - void setupContextMenu(const char* recipient, Gui::MenuItem*) const override; + Workbench(); + ~Workbench() override; + void setupContextMenu(const char* recipient, Gui::MenuItem*) const override; protected: - Gui::ToolBarItem* setupToolBars() const override; - Gui::MenuItem* setupMenuBar() const override; + Gui::ToolBarItem* setupToolBars() const override; + Gui::MenuItem* setupMenuBar() const override; }; -} // namespace FemGui +} // namespace FemGui -#endif // FEM_WORKBENCH_H +#endif // FEM_WORKBENCH_H diff --git a/src/Mod/Fem/femobjects/base_fempythonobject.py b/src/Mod/Fem/femobjects/base_fempythonobject.py index af9b0bba32..83f7008eb0 100644 --- a/src/Mod/Fem/femobjects/base_fempythonobject.py +++ b/src/Mod/Fem/femobjects/base_fempythonobject.py @@ -42,8 +42,8 @@ class BaseFemPythonObject(object): # they are needed, see: # https://forum.freecad.org/viewtopic.php?f=18&t=44021 # https://forum.freecad.org/viewtopic.php?f=18&t=44009 - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None diff --git a/src/Mod/Fem/femviewprovider/view_base_femobject.py b/src/Mod/Fem/femviewprovider/view_base_femobject.py index 35ab52f376..efa2d57147 100644 --- a/src/Mod/Fem/femviewprovider/view_base_femobject.py +++ b/src/Mod/Fem/femviewprovider/view_base_femobject.py @@ -114,8 +114,8 @@ class VPBaseFemObject(object): # they are needed, see: # https://forum.freecad.org/viewtopic.php?f=18&t=44021 # https://forum.freecad.org/viewtopic.php?f=18&t=44009 - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None diff --git a/src/Mod/Fem/femviewprovider/view_mesh_gmsh.py b/src/Mod/Fem/femviewprovider/view_mesh_gmsh.py index 3dece56c69..d30d2220a3 100644 --- a/src/Mod/Fem/femviewprovider/view_mesh_gmsh.py +++ b/src/Mod/Fem/femviewprovider/view_mesh_gmsh.py @@ -189,10 +189,10 @@ class VPMeshGmsh: FreeCAD.Console.PrintError(message + "\n") return True - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def claimChildren(self): diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index ac1957e29d..a5ad694a30 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -51,7 +51,6 @@ #include #if OCC_VERSION_HEX >= 0x070500 #include -#include #endif #if defined(__clang__) #pragma clang diagnostic pop @@ -74,7 +73,8 @@ #include #include "ImportOCAF2.h" - +#include "ReaderGltf.h" +#include "WriterGltf.h" namespace Import { @@ -249,6 +249,10 @@ private: pcDoc->recompute(); } } + else if (file.hasExtension({"glb", "gltf"})) { + Import::ReaderGltf reader(file); + reader.read(hDoc); + } else { throw Py::Exception(PyExc_IOError, "no supported file format"); } @@ -434,25 +438,8 @@ private: } } else if (file.hasExtension({"glb", "gltf"})) { -#if OCC_VERSION_HEX >= 0x070500 - TColStd_IndexedDataMapOfStringString aMetadata; - RWGltf_CafWriter aWriter(name8bit.c_str(), file.hasExtension("glb")); - aWriter.SetTransformationFormat(RWGltf_WriterTrsfFormat_Compact); - // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units - aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit(0.001); - aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem( - RWMesh_CoordinateSystem_Zup); -#if OCC_VERSION_HEX >= 0x070700 - aWriter.SetParallel(true); -#endif - Standard_Boolean ret = aWriter.Perform(hDoc, aMetadata, Message_ProgressRange()); - if (!ret) { - PyErr_Format(PyExc_IOError, "Cannot save to file '%s'", Utf8Name.c_str()); - throw Py::Exception(); - } -#else - throw Py::RuntimeError("gITF support requires OCCT 7.5.0 or later"); -#endif + Import::WriterGltf writer(name8bit, file); + writer.write(hDoc); } hApp->Close(hDoc); diff --git a/src/Mod/Import/App/CMakeLists.txt b/src/Mod/Import/App/CMakeLists.txt index 4ad568f2a6..ded2ae2886 100644 --- a/src/Mod/Import/App/CMakeLists.txt +++ b/src/Mod/Import/App/CMakeLists.txt @@ -35,12 +35,16 @@ SET(Import_SRCS ImportOCAF2.h #ImportOCAFAssembly.cpp #ImportOCAFAssembly.h + ReaderGltf.cpp + ReaderGltf.h StepShapePy.xml StepShape.h StepShape.cpp StepShapePyImp.cpp PreCompiled.cpp PreCompiled.h + WriterGltf.cpp + WriterGltf.h dxf/ImpExpDxf.cpp dxf/ImpExpDxf.h dxf/dxf.cpp diff --git a/src/Mod/Import/App/ReaderGltf.cpp b/src/Mod/Import/App/ReaderGltf.cpp new file mode 100644 index 0000000000..a32b2f42dc --- /dev/null +++ b/src/Mod/Import/App/ReaderGltf.cpp @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2023 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + + +#include "PreCompiled.h" +#ifndef _PreComp_ +#include +#include +#include +#include +#include +#include +#if OCC_VERSION_HEX >= 0x070500 +#include +#include +#endif +#endif + +#include "ReaderGltf.h" +#include +#include +#include + +using namespace Import; + +ReaderGltf::ReaderGltf(const Base::FileInfo& file) // NOLINT + : file {file} +{} + +void ReaderGltf::read(Handle(TDocStd_Document) hDoc) // NOLINT +{ +#if OCC_VERSION_HEX >= 0x070500 + const double unit = 0.001; // mm + RWGltf_CafReader aReader; + aReader.SetSystemLengthUnit(unit); + aReader.SetSystemCoordinateSystem(RWMesh_CoordinateSystem_Zup); + aReader.SetDocument(hDoc); + aReader.SetParallel(true); + + TCollection_AsciiString filename(file.filePath().c_str()); + Standard_Boolean ret = aReader.Perform(filename, Message_ProgressRange()); + if (!ret) { + std::stringstream str; + str << "Cannot read from file '" + << "" << file.filePath() << "'"; + } + + Handle(XCAFDoc_ShapeTool) aShapeTool = XCAFDoc_DocumentTool::ShapeTool(hDoc->Main()); + TDF_LabelSequence labels; + aShapeTool->GetShapes(labels); + for (Standard_Integer i = 1; i <= labels.Length(); i++) { + auto label = labels.Value(i); + TopoDS_Shape shape = aShapeTool->GetShape(label); + if (!shape.IsNull()) { + aShapeTool->SetShape(label, fixShape(shape)); + } + } + +#else + throw Base::RuntimeError("gITF support requires OCCT 7.5.0 or later"); +#endif +} + +bool ReaderGltf::cleanup() const +{ + return clean; +} + +void ReaderGltf::setCleanup(bool value) +{ + clean = value; +} + +TopoDS_Shape ReaderGltf::fixShape(TopoDS_Shape shape) // NOLINT +{ + // The glTF reader creates a compound of faces that only contains the triangulation + // but not the underlying surfaces. This leads to faces without boundaries. + // The triangulation is used to create a valid shape. + const double tolerance = 0.5; + std::vector points; + std::vector facets; + Part::TopoShape sh(shape); + sh.getFaces(points, facets, tolerance); + sh.setFaces(points, facets, tolerance); + + if (cleanup()) { + sh.sewShape(); + return sh.removeSplitter(); + } + + return sh.getShape(); +} diff --git a/src/Mod/Import/App/ReaderGltf.h b/src/Mod/Import/App/ReaderGltf.h new file mode 100644 index 0000000000..5925100bba --- /dev/null +++ b/src/Mod/Import/App/ReaderGltf.h @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2023 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + +#ifndef IMPORT_READER_GLTF_H +#define IMPORT_READER_GLTF_H + +#include +#include +#include +#include + +namespace Import +{ + +class ImportExport ReaderGltf +{ +public: + explicit ReaderGltf(const Base::FileInfo& file); + + void read(Handle(TDocStd_Document) hDoc); + bool cleanup() const; + void setCleanup(bool); + +private: + TopoDS_Shape fixShape(TopoDS_Shape); + +private: + Base::FileInfo file; + bool clean = true; +}; + +} // namespace Import + +#endif // IMPORT_READER_GLTF_H diff --git a/src/Mod/Import/App/WriterGltf.cpp b/src/Mod/Import/App/WriterGltf.cpp new file mode 100644 index 0000000000..e6cb037fd0 --- /dev/null +++ b/src/Mod/Import/App/WriterGltf.cpp @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2023 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + + +#include "PreCompiled.h" +#ifndef _PreComp_ +#include +#include +#include +#if OCC_VERSION_HEX >= 0x070500 +#include +#include +#endif +#endif + +#include "WriterGltf.h" +#include + +using namespace Import; + +WriterGltf::WriterGltf(std::string name8bit, const Base::FileInfo& file) // NOLINT + : name8bit {std::move(name8bit)} + , file {file} +{} + +void WriterGltf::write(Handle(TDocStd_Document) hDoc) const // NOLINT +{ +#if OCC_VERSION_HEX >= 0x070500 + TColStd_IndexedDataMapOfStringString aMetadata; + RWGltf_CafWriter aWriter(name8bit.c_str(), file.hasExtension("glb")); + aWriter.SetTransformationFormat(RWGltf_WriterTrsfFormat_Compact); + // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units + aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit(0.001); // NOLINT + aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem(RWMesh_CoordinateSystem_Zup); +#if OCC_VERSION_HEX >= 0x070700 + aWriter.SetParallel(true); +#endif + Standard_Boolean ret = aWriter.Perform(hDoc, aMetadata, Message_ProgressRange()); + if (!ret) { + std::stringstream str; + str << "Cannot save to file '" + << "" << file.filePath() << "'"; + } +#else + throw Base::RuntimeError("gITF support requires OCCT 7.5.0 or later"); +#endif +} diff --git a/src/Mod/Import/App/WriterGltf.h b/src/Mod/Import/App/WriterGltf.h new file mode 100644 index 0000000000..8ab4cba5e4 --- /dev/null +++ b/src/Mod/Import/App/WriterGltf.h @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +/*************************************************************************** + * Copyright (c) 2023 Werner Mayer * + * * + * This file is part of FreeCAD. * + * * + * FreeCAD is free software: you can redistribute it and/or modify it * + * under the terms of the GNU Lesser General Public License as * + * published by the Free Software Foundation, either version 2.1 of the * + * License, or (at your option) any later version. * + * * + * FreeCAD is distributed in the hope that it will be useful, but * + * WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * + * Lesser General Public License for more details. * + * * + * You should have received a copy of the GNU Lesser General Public * + * License along with FreeCAD. If not, see * + * . * + * * + **************************************************************************/ + +#ifndef IMPORT_WRITER_GLTF_H +#define IMPORT_WRITER_GLTF_H + +#include +#include +#include + +namespace Import +{ + +class ImportExport WriterGltf +{ +public: + WriterGltf(std::string name8bit, const Base::FileInfo& file); + + void write(Handle(TDocStd_Document) hDoc) const; + +private: + std::string name8bit; + Base::FileInfo file; +}; +} // namespace Import + +#endif // IMPORT_WRITER_GLTF_H diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 4173739cd0..0228cdb37f 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -88,7 +88,6 @@ #if OCC_VERSION_HEX >= 0x070500 #include -#include #endif #if defined(__clang__) #pragma clang diagnostic pop @@ -105,6 +104,8 @@ #include #include #include +#include +#include #include #include #include @@ -523,6 +524,10 @@ private: pcDoc->recompute(); } } + else if (file.hasExtension({"glb", "gltf"})) { + Import::ReaderGltf reader(file); + reader.read(hDoc); + } else { throw Py::Exception(PyExc_IOError, "no supported file format"); } @@ -537,7 +542,9 @@ private: if (useLinkGroup != Py_None) { ocaf.setUseLinkGroup(Base::asBoolean(useLinkGroup)); } - ocaf.setMode(mode); + if (mode >= 0) { + ocaf.setMode(mode); + } auto ret = ocaf.loadShapes(); hApp->Close(hDoc); FC_DURATION_PLUS(d2, t); @@ -769,25 +776,8 @@ private: } } else if (file.hasExtension({"glb", "gltf"})) { -#if OCC_VERSION_HEX >= 0x070500 - TColStd_IndexedDataMapOfStringString aMetadata; - RWGltf_CafWriter aWriter(name8bit.c_str(), file.hasExtension("glb")); - aWriter.SetTransformationFormat(RWGltf_WriterTrsfFormat_Compact); - // https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#coordinate-system-and-units - aWriter.ChangeCoordinateSystemConverter().SetInputLengthUnit(0.001); - aWriter.ChangeCoordinateSystemConverter().SetInputCoordinateSystem( - RWMesh_CoordinateSystem_Zup); -#if OCC_VERSION_HEX >= 0x070700 - aWriter.SetParallel(true); -#endif - Standard_Boolean ret = aWriter.Perform(hDoc, aMetadata, Message_ProgressRange()); - if (!ret) { - PyErr_Format(PyExc_IOError, "Cannot save to file '%s'", Utf8Name.c_str()); - throw Py::Exception(); - } -#else - throw Py::RuntimeError("gITF support requires OCCT 7.5.0 or later"); -#endif + Import::WriterGltf writer(name8bit, file); + writer.write(hDoc); } hApp->Close(hDoc); diff --git a/src/Mod/Import/Init.py b/src/Mod/Import/Init.py index 658ca17173..d2f7fd97f9 100644 --- a/src/Mod/Import/Init.py +++ b/src/Mod/Import/Init.py @@ -31,5 +31,6 @@ # FreeCAD.addExportType("IGES files (*.iges *.igs)","ImportGui") FreeCAD.addImportType("PLMXML files (*.plmxml)", "PlmXmlParser") FreeCAD.addImportType("STEPZ Zip File Type (*.stpZ *.stpz)", "stepZ") +FreeCAD.addImportType("glTF (*.gltf *.glb)", "ImportGui") FreeCAD.addExportType("STEPZ zip File Type (*.stpZ *.stpz)", "stepZ") FreeCAD.addExportType("glTF (*.gltf *.glb)", "ImportGui") diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.qm b/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.qm index 752bbcc64f..53a5a465ee 100644 Binary files a/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.qm and b/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.qm differ diff --git a/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts b/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts index 46fc3ee454..21541530b0 100644 --- a/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts +++ b/src/Mod/Inspection/Gui/Resources/translations/Inspection_cs.ts @@ -96,7 +96,7 @@ Remove annotations - Odstranit anotace + Odstranit poznámky @@ -106,7 +106,7 @@ Annotation - Vysvětlivka + Poznámka diff --git a/src/Mod/Mesh/App/AppMesh.cpp b/src/Mod/Mesh/App/AppMesh.cpp index 2dcdb0f382..3595849038 100644 --- a/src/Mod/Mesh/App/AppMesh.cpp +++ b/src/Mod/Mesh/App/AppMesh.cpp @@ -44,7 +44,8 @@ #include "MeshPy.h" -namespace Mesh { +namespace Mesh +{ extern PyObject* initModule(); } @@ -57,12 +58,12 @@ PyMOD_INIT_FUNC(Mesh) // NOTE: To finish the initialization of our own type objects we must // call PyType_Ready, otherwise we run into a segmentation fault, later on. // This function is responsible for adding inherited slots from a type's base class. - ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Mesh"); + ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Mesh"); ParameterGrp::handle asy = handle->GetGroup("Asymptote"); - MeshCore::MeshOutput::SetAsymptoteSize(asy->GetASCII("Width", "500"), - asy->GetASCII("Height")); + MeshCore::MeshOutput::SetAsymptoteSize(asy->GetASCII("Width", "500"), asy->GetASCII("Height")); + // clang-format off // add mesh elements Base::Interpreter().addType(&Mesh::MeshPointPy ::Type,meshModule,"MeshPoint"); Base::Interpreter().addType(&Mesh::EdgePy ::Type,meshModule,"Edge"); @@ -109,6 +110,7 @@ PyMOD_INIT_FUNC(Mesh) Mesh::Cone ::init(); Mesh::Torus ::init(); Mesh::Cube ::init(); + // clang-format on PyMOD_Return(meshModule); } diff --git a/src/Mod/Mesh/App/AppMeshPy.cpp b/src/Mod/Mesh/App/AppMeshPy.cpp index 2e01572cbc..9733d6122a 100644 --- a/src/Mod/Mesh/App/AppMeshPy.cpp +++ b/src/Mod/Mesh/App/AppMeshPy.cpp @@ -22,11 +22,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif +#include "Core/Approximation.h" +#include "Core/Evaluation.h" +#include "Core/Iterator.h" +#include "Core/MeshIO.h" +#include "Core/MeshKernel.h" +#include "WildMagic4/Wm4ContBox3.h" #include #include #include @@ -35,89 +41,77 @@ #include #include #include -#include "Core/Approximation.h" -#include "Core/Evaluation.h" -#include "Core/Iterator.h" -#include "Core/MeshIO.h" -#include "Core/MeshKernel.h" -#include "WildMagic4/Wm4ContBox3.h" -#include "MeshPy.h" #include "Exporter.h" #include "Importer.h" #include "Mesh.h" +#include "MeshPy.h" using namespace Mesh; using namespace MeshCore; -namespace Mesh { -class Module : public Py::ExtensionModule +namespace Mesh +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("Mesh") + Module() + : Py::ExtensionModule("Mesh") { - add_varargs_method("read",&Module::read, - "Read a mesh from a file and returns a Mesh object." - ); - add_varargs_method("open",&Module::open, - "open(string)\n" - "Create a new document and a Mesh feature to load the file into\n" - "the document." - ); - add_varargs_method("insert",&Module::importer, - "insert(string|mesh,[string])\n" - "Load or insert a mesh into the given or active document." - ); - add_keyword_method("export",&Module::exporter, - "export(objects, filename, [tolerance=0.1, exportAmfCompressed=True])\n" - "Export a list of objects into a single file identified by filename.\n" - "tolerance is in mm and specifies the maximum acceptable deviation\n" - "between the specified objects and the exported mesh.\n" - "exportAmfCompressed specifies whether exported AMF files should be\n" - "compressed.\n" - ); - add_varargs_method("show",&Module::show, - "show(shape,[string]) -- Add the mesh to the active document or create one if no document exists." - ); - add_varargs_method("createBox",&Module::createBox, - "Create a solid mesh box" - ); - add_varargs_method("createPlane",&Module::createPlane, - "Create a mesh XY plane normal +Z" - ); - add_varargs_method("createSphere",&Module::createSphere, - "Create a tessellated sphere" - ); - add_varargs_method("createEllipsoid",&Module::createEllipsoid, - "Create a tessellated ellipsoid" - ); - add_varargs_method("createCylinder",&Module::createCylinder, - "Create a tessellated cylinder" - ); - add_varargs_method("createCone",&Module::createCone, - "Create a tessellated cone" - ); - add_varargs_method("createTorus",&Module::createTorus, - "Create a tessellated torus" - ); - add_varargs_method("calculateEigenTransform",&Module::calculateEigenTransform, - "calculateEigenTransform(seq(Base.Vector))\n" - "Calculates the eigen Transformation from a list of points.\n" - "calculate the point's local coordinate system with the center\n" - "of gravity as origin. The local coordinate system is computed\n" - "this way that u has minimum and w has maximum expansion.\n" - "The local coordinate system is right-handed.\n" - ); - add_varargs_method("polynomialFit",&Module::polynomialFit, - "polynomialFit(seq(Base.Vector)) -- Calculates a polynomial fit." - ); - add_varargs_method("minimumVolumeOrientedBox",&Module::minimumVolumeOrientedBox, + add_varargs_method("read", + &Module::read, + "Read a mesh from a file and returns a Mesh object."); + add_varargs_method("open", + &Module::open, + "open(string)\n" + "Create a new document and a Mesh feature to load the file into\n" + "the document."); + add_varargs_method("insert", + &Module::importer, + "insert(string|mesh,[string])\n" + "Load or insert a mesh into the given or active document."); + add_keyword_method("export", + &Module::exporter, + "export(objects, filename, [tolerance=0.1, exportAmfCompressed=True])\n" + "Export a list of objects into a single file identified by filename.\n" + "tolerance is in mm and specifies the maximum acceptable deviation\n" + "between the specified objects and the exported mesh.\n" + "exportAmfCompressed specifies whether exported AMF files should be\n" + "compressed.\n"); + add_varargs_method("show", + &Module::show, + "show(shape,[string]) -- Add the mesh to the active document or create " + "one if no document exists."); + add_varargs_method("createBox", &Module::createBox, "Create a solid mesh box"); + add_varargs_method("createPlane", &Module::createPlane, "Create a mesh XY plane normal +Z"); + add_varargs_method("createSphere", &Module::createSphere, "Create a tessellated sphere"); + add_varargs_method("createEllipsoid", + &Module::createEllipsoid, + "Create a tessellated ellipsoid"); + add_varargs_method("createCylinder", + &Module::createCylinder, + "Create a tessellated cylinder"); + add_varargs_method("createCone", &Module::createCone, "Create a tessellated cone"); + add_varargs_method("createTorus", &Module::createTorus, "Create a tessellated torus"); + add_varargs_method("calculateEigenTransform", + &Module::calculateEigenTransform, + "calculateEigenTransform(seq(Base.Vector))\n" + "Calculates the eigen Transformation from a list of points.\n" + "calculate the point's local coordinate system with the center\n" + "of gravity as origin. The local coordinate system is computed\n" + "this way that u has minimum and w has maximum expansion.\n" + "The local coordinate system is right-handed.\n"); + add_varargs_method("polynomialFit", + &Module::polynomialFit, + "polynomialFit(seq(Base.Vector)) -- Calculates a polynomial fit."); + add_varargs_method( + "minimumVolumeOrientedBox", + &Module::minimumVolumeOrientedBox, "minimumVolumeOrientedBox(seq(Base.Vector)) -- Calculates the minimum\n" "volume oriented box containing all points. The return value is a\n" "tuple of seven items:\n" - " center, u, v, w directions and the lengths of the three vectors.\n" - ); + " center, u, v, w directions and the lengths of the three vectors.\n"); initialize("The functions in this module allow working with mesh objects.\n" "A set of functions are provided for reading in registered mesh\n" "file formats to either a new or existing document.\n" @@ -131,23 +125,24 @@ public: } private: - Py::Object invoke_method_varargs(void *method_def, const Py::Tuple &args) override + Py::Object invoke_method_varargs(void* method_def, const Py::Tuple& args) override { try { return Py::ExtensionModule::invoke_method_varargs(method_def, args); } - catch (const Base::Exception &e) { + catch (const Base::Exception& e) { throw Py::RuntimeError(e.what()); } - catch (const std::exception &e) { + catch (const std::exception& e) { throw Py::RuntimeError(e.what()); } } Py::Object read(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); @@ -158,14 +153,15 @@ private: Py::Object open(const Py::Tuple& args) { char* Name; - if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name)) + if (!PyArg_ParseTuple(args.ptr(), "et", "utf-8", &Name)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); // create new document and add Import feature - App::Document *pcDoc = App::GetApplication().newDocument(); + App::Document* pcDoc = App::GetApplication().newDocument(); Mesh::Importer import(pcDoc); import.load(EncodedName); @@ -175,14 +171,15 @@ private: Py::Object importer(const Py::Tuple& args) { char* Name; - char* DocName=nullptr; - if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&DocName)) + char* DocName = nullptr; + if (!PyArg_ParseTuple(args.ptr(), "et|s", "utf-8", &Name, &DocName)) { throw Py::Exception(); + } std::string EncodedName = std::string(Name); PyMem_Free(Name); - App::Document *pcDoc = nullptr; + App::Document* pcDoc = nullptr; if (DocName) { pcDoc = App::GetApplication().getDocument(DocName); } @@ -200,26 +197,35 @@ private: return Py::None(); } - Py::Object exporter(const Py::Tuple &args, const Py::Dict &keywds) + Py::Object exporter(const Py::Tuple& args, const Py::Dict& keywds) { - PyObject *objects; - char *fileNamePy; + PyObject* objects; + char* fileNamePy; // If tolerance is specified via python interface, use that. // If not, use the preference, if that exists, else default to 0.1mm. - auto hGrp( App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Mesh") ); - auto fTolerance( hGrp->GetFloat("MaxDeviationExport", 0.1f) ); + auto hGrp(App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Mesh")); + auto fTolerance(hGrp->GetFloat("MaxDeviationExport", 0.1f)); - int exportAmfCompressed( hGrp->GetBool("ExportAmfCompressed", true) ); - bool export3mfModel( hGrp->GetBool("Export3mfModel", true) ); + int exportAmfCompressed(hGrp->GetBool("ExportAmfCompressed", true)); + bool export3mfModel(hGrp->GetBool("Export3mfModel", true)); - static const std::array kwList{"objectList", "filename", "tolerance", - "exportAmfCompressed", nullptr}; + static const std::array kwList {"objectList", + "filename", + "tolerance", + "exportAmfCompressed", + nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), keywds.ptr(), - "Oet|dp", - kwList, &objects, "utf-8", &fileNamePy, - &fTolerance, &exportAmfCompressed)) { + if (!Base::Wrapped_ParseTupleAndKeywords(args.ptr(), + keywds.ptr(), + "Oet|dp", + kwList, + &objects, + "utf-8", + &fileNamePy, + &fTolerance, + &exportAmfCompressed)) { throw Py::Exception(); } @@ -236,9 +242,9 @@ private: // collect all object types that can be exported as mesh std::vector objectList; for (const auto& it : list) { - PyObject *item = it.ptr(); + PyObject* item = it.ptr(); if (PyObject_TypeCheck(item, &(App::DocumentObjectPy::Type))) { - auto obj( static_cast(item)->getDocumentObjectPtr() ); + auto obj(static_cast(item)->getDocumentObjectPtr()); objectList.push_back(obj); } } @@ -247,28 +253,30 @@ private: throw Py::TypeError("None of the objects can be exported to a mesh file"); } - auto exportFormat( MeshOutput::GetFormat(outputFileName.c_str()) ); + auto exportFormat(MeshOutput::GetFormat(outputFileName.c_str())); std::unique_ptr exporter; if (exportFormat == MeshIO::AMF) { std::map meta; - meta["cad"] = App::Application::Config()["ExeName"] + " " + - App::Application::Config()["ExeVersion"]; + meta["cad"] = App::Application::Config()["ExeName"] + " " + + App::Application::Config()["ExeVersion"]; meta[App::Application::Config()["ExeName"] + "-buildRevisionHash"] = - App::Application::Config()["BuildRevisionHash"]; + App::Application::Config()["BuildRevisionHash"]; exporter = std::make_unique(outputFileName, meta, exportAmfCompressed); } else if (exportFormat == MeshIO::ThreeMF) { Extension3MFFactory::initialize(); - exporter = std::make_unique(outputFileName, Extension3MFFactory::createExtensions()); + exporter = std::make_unique(outputFileName, + Extension3MFFactory::createExtensions()); dynamic_cast(exporter.get())->setForceModel(export3mfModel); } else if (exportFormat != MeshIO::Undefined) { exporter = std::make_unique(outputFileName, exportFormat); } else { - std::string exStr("Can't determine mesh format from file name.\nPlease specify mesh format file extension: '"); + std::string exStr("Can't determine mesh format from file name.\nPlease specify mesh " + "format file extension: '"); exStr += outputFileName + "'"; throw Py::ValueError(exStr.c_str()); } @@ -277,23 +285,26 @@ private: exporter->addObject(it, fTolerance); } - exporter.reset(); // deletes Exporter, mesh file is written by destructor + exporter.reset(); // deletes Exporter, mesh file is written by destructor return Py::None(); } Py::Object show(const Py::Tuple& args) { - PyObject *pcObj; - char *name = "Mesh"; - if (!PyArg_ParseTuple(args.ptr(), "O!|s", &(MeshPy::Type), &pcObj, &name)) + PyObject* pcObj; + char* name = "Mesh"; + if (!PyArg_ParseTuple(args.ptr(), "O!|s", &(MeshPy::Type), &pcObj, &name)) { throw Py::Exception(); + } - App::Document *pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + App::Document* pcDoc = App::GetApplication().getActiveDocument(); + if (!pcDoc) { pcDoc = App::GetApplication().newDocument(); + } MeshPy* pMesh = static_cast(pcObj); - Mesh::Feature *pcFeature = static_cast(pcDoc->addObject("Mesh::Feature", name)); + Mesh::Feature* pcFeature = + static_cast(pcDoc->addObject("Mesh::Feature", name)); Mesh::MeshObject* mo = pMesh->getMeshObjectPtr(); if (!mo) { throw Py::Exception(PyExc_ReferenceError, "object doesn't reference a valid mesh"); @@ -312,25 +323,26 @@ private: float width = 10.0f; float height = 10.0f; float edgelen = -1.0f; - if (PyArg_ParseTuple(args.ptr(), "|ffff",&length,&width,&height,&edgelen)) { - if (edgelen < 0.0f) + if (PyArg_ParseTuple(args.ptr(), "|ffff", &length, &width, &height, &edgelen)) { + if (edgelen < 0.0f) { mesh = MeshObject::createCube(length, width, height); - else + } + else { mesh = MeshObject::createCube(length, width, height, edgelen); + } break; } PyErr_Clear(); PyObject* box; - if (PyArg_ParseTuple(args.ptr(), "O!",&Base::BoundBoxPy::Type, &box)) { + if (PyArg_ParseTuple(args.ptr(), "O!", &Base::BoundBoxPy::Type, &box)) { Py::BoundingBox bbox(box, false); mesh = MeshObject::createCube(bbox.getValue()); break; } throw Py::TypeError("Must be real numbers or BoundBox"); - } - while (false); + } while (false); if (!mesh) { throw Py::RuntimeError("Creation of box failed"); } @@ -338,19 +350,25 @@ private: } Py::Object createPlane(const Py::Tuple& args) { - float x=1,y=0,z=0; - if (!PyArg_ParseTuple(args.ptr(), "|fff",&x,&y,&z)) + float x = 1, y = 0, z = 0; + if (!PyArg_ParseTuple(args.ptr(), "|fff", &x, &y, &z)) { throw Py::Exception(); + } - if (y==0) - y=x; + if (y == 0) { + y = x; + } - float hx = x/2.0f; - float hy = y/2.0f; + float hx = x / 2.0f; + float hy = y / 2.0f; std::vector TriaList; - TriaList.emplace_back(Base::Vector3f(-hx, -hy, 0.0),Base::Vector3f(hx, hy, 0.0),Base::Vector3f(-hx, hy, 0.0)); - TriaList.emplace_back(Base::Vector3f(-hx, -hy, 0.0),Base::Vector3f(hx, -hy, 0.0),Base::Vector3f(hx, hy, 0.0)); + TriaList.emplace_back(Base::Vector3f(-hx, -hy, 0.0), + Base::Vector3f(hx, hy, 0.0), + Base::Vector3f(-hx, hy, 0.0)); + TriaList.emplace_back(Base::Vector3f(-hx, -hy, 0.0), + Base::Vector3f(hx, -hy, 0.0), + Base::Vector3f(hx, hy, 0.0)); std::unique_ptr mesh(new MeshObject); mesh->addFacets(TriaList); @@ -360,8 +378,9 @@ private: { float radius = 5.0f; int sampling = 50; - if (!PyArg_ParseTuple(args.ptr(), "|fi",&radius,&sampling)) + if (!PyArg_ParseTuple(args.ptr(), "|fi", &radius, &sampling)) { throw Py::Exception(); + } MeshObject* mesh = MeshObject::createSphere(radius, sampling); if (!mesh) { @@ -374,8 +393,9 @@ private: float radius1 = 2.0f; float radius2 = 4.0f; int sampling = 50; - if (!PyArg_ParseTuple(args.ptr(), "|ffi",&radius1,&radius2,&sampling)) + if (!PyArg_ParseTuple(args.ptr(), "|ffi", &radius1, &radius2, &sampling)) { throw Py::Exception(); + } MeshObject* mesh = MeshObject::createEllipsoid(radius1, radius2, sampling); if (!mesh) { @@ -390,8 +410,15 @@ private: int closed = 1; float edgelen = 1.0f; int sampling = 50; - if (!PyArg_ParseTuple(args.ptr(), "|ffifi",&radius,&length,&closed,&edgelen,&sampling)) + if (!PyArg_ParseTuple(args.ptr(), + "|ffifi", + &radius, + &length, + &closed, + &edgelen, + &sampling)) { throw Py::Exception(); + } MeshObject* mesh = MeshObject::createCylinder(radius, length, closed, edgelen, sampling); if (!mesh) { @@ -407,8 +434,16 @@ private: int closed = 1; float edgelen = 1.0f; int sampling = 50; - if (!PyArg_ParseTuple(args.ptr(), "|fffifi",&radius1,&radius2,&len,&closed,&edgelen,&sampling)) + if (!PyArg_ParseTuple(args.ptr(), + "|fffifi", + &radius1, + &radius2, + &len, + &closed, + &edgelen, + &sampling)) { throw Py::Exception(); + } MeshObject* mesh = MeshObject::createCone(radius1, radius2, len, closed, edgelen, sampling); if (!mesh) { @@ -421,8 +456,9 @@ private: float radius1 = 10.0f; float radius2 = 2.0f; int sampling = 50; - if (!PyArg_ParseTuple(args.ptr(), "|ffi",&radius1,&radius2,&sampling)) + if (!PyArg_ParseTuple(args.ptr(), "|ffi", &radius1, &radius2, &sampling)) { throw Py::Exception(); + } MeshObject* mesh = MeshObject::createTorus(radius1, radius2, sampling); if (!mesh) { @@ -432,10 +468,11 @@ private: } Py::Object calculateEigenTransform(const Py::Tuple& args) { - PyObject *input; + PyObject* input; - if (!PyArg_ParseTuple(args.ptr(), "O",&input)) + if (!PyArg_ParseTuple(args.ptr(), "O", &input)) { throw Py::Exception(); + } if (!PySequence_Check(input)) { throw Py::TypeError("Input has to be a sequence of Base.Vector()"); @@ -452,20 +489,22 @@ private: for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* value = (*it).ptr(); if (PyObject_TypeCheck(value, &(Base::VectorPy::Type))) { - Base::VectorPy *pcObject = static_cast(value); + Base::VectorPy* pcObject = static_cast(value); Base::Vector3d* val = pcObject->getVectorPtr(); - current_node.Set(float(val->x),float(val->y),float(val->z)); + current_node.Set(float(val->x), float(val->y), float(val->z)); vertices.push_back(current_node); } } MeshCore::MeshFacet aFacet; - aFacet._aulPoints[0] = 0;aFacet._aulPoints[1] = 1;aFacet._aulPoints[2] = 2; + aFacet._aulPoints[0] = 0; + aFacet._aulPoints[1] = 1; + aFacet._aulPoints[2] = 2; faces.push_back(aFacet); - //Fill the Kernel with the temp mesh structure and delete the current containers - aMesh.Adopt(vertices,faces); + // Fill the Kernel with the temp mesh structure and delete the current containers + aMesh.Adopt(vertices, faces); MeshCore::MeshEigensystem pca(aMesh); pca.Evaluate(); Base::Matrix4D Trafo = pca.Transform(); @@ -474,10 +513,11 @@ private: } Py::Object polynomialFit(const Py::Tuple& args) { - PyObject *input; + PyObject* input; - if (!PyArg_ParseTuple(args.ptr(), "O",&input)) + if (!PyArg_ParseTuple(args.ptr(), "O", &input)) { throw Py::Exception(); + } if (!PySequence_Check(input)) { throw Py::TypeError("Input has to be a sequence of Base.Vector()"); @@ -490,9 +530,9 @@ private: for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* value = (*it).ptr(); if (PyObject_TypeCheck(value, &(Base::VectorPy::Type))) { - Base::VectorPy *pcObject = static_cast(value); + Base::VectorPy* pcObject = static_cast(value); Base::Vector3d* val = pcObject->getVectorPtr(); - point.Set(float(val->x),float(val->y),float(val->z)); + point.Set(float(val->x), float(val->y), float(val->z)); polyFit.AddPoint(point); } } @@ -503,8 +543,8 @@ private: dict.setItem(Py::String("Sigma"), Py::Float(fit)); // coefficients - double a,b,c,d,e,f; - polyFit.GetCoefficients(a,b,c,d,e,f); + double a, b, c, d, e, f; + polyFit.GetCoefficients(a, b, c, d, e, f); Py::Tuple p(6); p.setItem(0, Py::Float(a)); p.setItem(1, Py::Float(b)); @@ -520,17 +560,19 @@ private: for (std::vector::iterator it = local.begin(); it != local.end(); ++it) { double z = polyFit.Value(it->x, it->y); double d = it->z - z; - r.setItem(it-local.begin(), Py::Float(d)); + r.setItem(it - local.begin(), Py::Float(d)); } dict.setItem(Py::String("Residuals"), r); return dict; } - Py::Object minimumVolumeOrientedBox(const Py::Tuple& args) { - PyObject *input; + Py::Object minimumVolumeOrientedBox(const Py::Tuple& args) + { + PyObject* input; - if (!PyArg_ParseTuple(args.ptr(), "O",&input)) + if (!PyArg_ParseTuple(args.ptr(), "O", &input)) { throw Py::Exception(); + } if (!PySequence_Check(input)) { throw Py::TypeError("Input has to be a sequence of Base.Vector()"); @@ -542,7 +584,7 @@ private: for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { PyObject* value = (*it).ptr(); if (PyObject_TypeCheck(value, &(Base::VectorPy::Type))) { - Base::VectorPy *pcObject = static_cast(value); + Base::VectorPy* pcObject = static_cast(value); Base::Vector3d* val = pcObject->getVectorPtr(); Wm4::Vector3d pt; pt[0] = val->x; @@ -552,8 +594,9 @@ private: } } - if (points.size() < 4) + if (points.size() < 4) { throw Py::RuntimeError("Too few points"); + } Wm4::Box3d mobox = Wm4::ContMinBox(points.size(), &(points[0]), 0.001, Wm4::Query::QT_REAL); Py::Tuple result(7); @@ -592,4 +635,4 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace Mesh +} // namespace Mesh diff --git a/src/Mod/Mesh/App/Core/Algorithm.cpp b/src/Mod/Mesh/App/Core/Algorithm.cpp index 149f218f68..36f2cccb64 100644 --- a/src/Mod/Mesh/App/Core/Algorithm.cpp +++ b/src/Mod/Mesh/App/Core/Algorithm.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -32,18 +32,20 @@ #include "Algorithm.h" #include "Approximation.h" #include "Elements.h" -#include "Iterator.h" #include "Grid.h" +#include "Iterator.h" #include "Triangulation.h" using namespace MeshCore; -using Base::BoundBox3f; using Base::BoundBox2d; +using Base::BoundBox3f; using Base::Polygon2d; -bool MeshAlgorithm::IsVertexVisible (const Base::Vector3f &rcVertex, const Base::Vector3f &rcView, const MeshFacetGrid &rclGrid) const +bool MeshAlgorithm::IsVertexVisible(const Base::Vector3f& rcVertex, + const Base::Vector3f& rcView, + const MeshFacetGrid& rclGrid) const { const float fMaxDistance = 0.001F; Base::Vector3f cDirection = rcVertex - rcView; @@ -64,17 +66,22 @@ bool MeshAlgorithm::IsVertexVisible (const Base::Vector3f &rcVertex, const Base: } } - return true; // no facet between the two points + return true; // no facet between the two points } -bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes, - FacetIndex &rulFacet) const +bool MeshAlgorithm::NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const { return NearestFacetOnRay(rclPt, rclDir, Mathf::PI, rclRes, rulFacet); } -bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxAngle, - Base::Vector3f &rclRes, FacetIndex &rulFacet) const +bool MeshAlgorithm::NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + float fMaxAngle, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const { Base::Vector3f clProj; Base::Vector3f clRes; @@ -82,35 +89,38 @@ bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base:: FacetIndex ulInd = 0; // slow execution with no grid - MeshFacetIterator clFIter(_rclMesh); + MeshFacetIterator clFIter(_rclMesh); for (clFIter.Init(); clFIter.More(); clFIter.Next()) { if (clFIter->Foraminate(rclPt, rclDir, clRes, fMaxAngle)) { if (!bSol) { // first solution - bSol = true; + bSol = true; clProj = clRes; - ulInd = clFIter.Position(); + ulInd = clFIter.Position(); } else { // is closer to the point if ((clRes - rclPt).Length() < (clProj - rclPt).Length()) { clProj = clRes; - ulInd = clFIter.Position(); + ulInd = clFIter.Position(); } } } } if (bSol) { - rclRes = clProj; + rclRes = clProj; rulFacet = ulInd; } return bSol; } -bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, const MeshFacetGrid &rclGrid, - Base::Vector3f &rclRes, FacetIndex &rulFacet) const +bool MeshAlgorithm::NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + const MeshFacetGrid& rclGrid, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const { std::vector aulFacets; MeshGridIterator clGridIter(rclGrid); @@ -132,12 +142,16 @@ bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base:: return false; } -bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxSearchArea, - const MeshFacetGrid &rclGrid, Base::Vector3f &rclRes, FacetIndex &rulFacet) const +bool MeshAlgorithm::NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + float fMaxSearchArea, + const MeshFacetGrid& rclGrid, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const { const float fMaxAngle = 1.75F; std::vector aulFacets; - MeshGridIterator clGridIter(rclGrid); + MeshGridIterator clGridIter(rclGrid); if (clGridIter.InitOnRay(rclPt, rclDir, fMaxSearchArea, aulFacets)) { if (!RayNearestField(rclPt, rclDir, aulFacets, rclRes, rulFacet, fMaxAngle)) { @@ -156,72 +170,81 @@ bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base:: return false; } -bool MeshAlgorithm::NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, - const std::vector &raulFacets, - Base::Vector3f &rclRes, FacetIndex &rulFacet) const +bool MeshAlgorithm::NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + const std::vector& raulFacets, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const { - Base::Vector3f clProj; - Base::Vector3f clRes; + Base::Vector3f clProj; + Base::Vector3f clRes; bool bSol = false; FacetIndex ulInd = 0; for (FacetIndex index : raulFacets) { MeshGeomFacet rclSFacet = _rclMesh.GetFacet(index); if (rclSFacet.Foraminate(rclPt, rclDir, clRes)) { - if (!bSol) {// first solution - bSol = true; + if (!bSol) { // first solution + bSol = true; clProj = clRes; - ulInd = index; + ulInd = index; } else { // is closer to the point if ((clRes - rclPt).Length() < (clProj - rclPt).Length()) { clProj = clRes; - ulInd = index; + ulInd = index; } } } } if (bSol) { - rclRes = clProj; + rclRes = clProj; rulFacet = ulInd; } return bSol; } -bool MeshAlgorithm::RayNearestField (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, const std::vector &raulFacets, - Base::Vector3f &rclRes, FacetIndex &rulFacet, float /*fMaxAngle*/) const +bool MeshAlgorithm::RayNearestField(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + const std::vector& raulFacets, + Base::Vector3f& rclRes, + FacetIndex& rulFacet, + float /*fMaxAngle*/) const { - Base::Vector3f clProj, clRes; + Base::Vector3f clProj, clRes; bool bSol = false; FacetIndex ulInd = 0; for (FacetIndex index : raulFacets) { - if (_rclMesh.GetFacet(index).Foraminate(rclPt, rclDir, clRes/*, fMaxAngle*/)) { - if (!bSol) { // first solution - bSol = true; + if (_rclMesh.GetFacet(index).Foraminate(rclPt, rclDir, clRes /*, fMaxAngle*/)) { + if (!bSol) { // first solution + bSol = true; clProj = clRes; - ulInd = index; + ulInd = index; } else { // is closer to the point if ((clRes - rclPt).Length() < (clProj - rclPt).Length()) { clProj = clRes; - ulInd = index; + ulInd = index; } } } } if (bSol) { - rclRes = clProj; + rclRes = clProj; rulFacet = ulInd; } return bSol; } -bool MeshAlgorithm::FirstFacetToVertex(const Base::Vector3f &rPt, float fMaxDistance, const MeshFacetGrid &rGrid, FacetIndex &uIndex) const +bool MeshAlgorithm::FirstFacetToVertex(const Base::Vector3f& rPt, + float fMaxDistance, + const MeshFacetGrid& rGrid, + FacetIndex& uIndex) const { const float fEps = 0.001f; @@ -262,11 +285,12 @@ float MeshAlgorithm::GetAverageEdgeLength() const float fLen = 0.0f; MeshFacetIterator cF(_rclMesh); for (cF.Init(); cF.More(); cF.Next()) { - for (int i=0; i<3; i++) - fLen += Base::Distance(cF->_aclPoints[i], cF->_aclPoints[(i+1)%3]); + for (int i = 0; i < 3; i++) { + fLen += Base::Distance(cF->_aclPoints[i], cF->_aclPoints[(i + 1) % 3]); + } } - fLen = fLen / (3.0f * _rclMesh.CountFacets() ); + fLen = fLen / (3.0f * _rclMesh.CountFacets()); return fLen; } @@ -275,8 +299,9 @@ float MeshAlgorithm::GetMinimumEdgeLength() const float fLen = FLOAT_MAX; MeshFacetIterator cF(_rclMesh); for (cF.Init(); cF.More(); cF.Next()) { - for (int i=0; i<3; i++) - fLen = std::min(fLen, Base::Distance(cF->_aclPoints[i], cF->_aclPoints[(i+1)%3])); + for (int i = 0; i < 3; i++) { + fLen = std::min(fLen, Base::Distance(cF->_aclPoints[i], cF->_aclPoints[(i + 1) % 3])); + } } return fLen; @@ -287,8 +312,9 @@ float MeshAlgorithm::GetMaximumEdgeLength() const float fLen = 0.0f; MeshFacetIterator cF(_rclMesh); for (cF.Init(); cF.More(); cF.Next()) { - for (int i=0; i<3; i++) - fLen = std::max(fLen, Base::Distance(cF->_aclPoints[i], cF->_aclPoints[(i+1)%3])); + for (int i = 0; i < 3; i++) { + fLen = std::max(fLen, Base::Distance(cF->_aclPoints[i], cF->_aclPoints[(i + 1) % 3])); + } } return fLen; @@ -305,78 +331,84 @@ Base::Vector3f MeshAlgorithm::GetGravityPoint() const return center / static_cast(_rclMesh.CountPoints()); } -void MeshAlgorithm::GetMeshBorders (std::list > &rclBorders) const +void MeshAlgorithm::GetMeshBorders(std::list>& rclBorders) const { std::vector aulAllFacets(_rclMesh.CountFacets()); FacetIndex k = 0; - for (FacetIndex & index : aulAllFacets) + for (FacetIndex& index : aulAllFacets) { index = k++; + } GetFacetBorders(aulAllFacets, rclBorders); } -void MeshAlgorithm::GetMeshBorders (std::list > &rclBorders) const +void MeshAlgorithm::GetMeshBorders(std::list>& rclBorders) const { std::vector aulAllFacets(_rclMesh.CountFacets()); FacetIndex k = 0; - for (FacetIndex & index : aulAllFacets) + for (FacetIndex& index : aulAllFacets) { index = k++; + } GetFacetBorders(aulAllFacets, rclBorders, true); } -void MeshAlgorithm::GetFacetBorders (const std::vector &raulInd, std::list > &rclBorders) const +void MeshAlgorithm::GetFacetBorders(const std::vector& raulInd, + std::list>& rclBorders) const { - const MeshPointArray &rclPAry = _rclMesh._aclPointArray; - std::list > aulBorders; + const MeshPointArray& rclPAry = _rclMesh._aclPointArray; + std::list> aulBorders; - GetFacetBorders (raulInd, aulBorders, true); - for (const auto & border : aulBorders) - { - std::vector boundary; - boundary.reserve( border.size() ); + GetFacetBorders(raulInd, aulBorders, true); + for (const auto& border : aulBorders) { + std::vector boundary; + boundary.reserve(border.size()); - for (PointIndex jt : border) - boundary.push_back(rclPAry[jt]); + for (PointIndex jt : border) { + boundary.push_back(rclPAry[jt]); + } - rclBorders.push_back( boundary ); - } + rclBorders.push_back(boundary); + } } -void MeshAlgorithm::GetFacetBorders (const std::vector &raulInd, - std::list > &rclBorders, - bool ignoreOrientation) const +void MeshAlgorithm::GetFacetBorders(const std::vector& raulInd, + std::list>& rclBorders, + bool ignoreOrientation) const { - const MeshFacetArray &rclFAry = _rclMesh._aclFacetArray; + const MeshFacetArray& rclFAry = _rclMesh._aclFacetArray; // mark all facets that are in the indices list ResetFacetFlag(MeshFacet::VISIT); - for (FacetIndex it : raulInd) + for (FacetIndex it : raulInd) { rclFAry[it].SetFlag(MeshFacet::VISIT); + } // collect all boundary edges (unsorted) - std::list > aclEdges; + std::list> aclEdges; for (FacetIndex it : raulInd) { - const MeshFacet &rclFacet = rclFAry[it]; + const MeshFacet& rclFacet = rclFAry[it]; for (unsigned short i = 0; i < 3; i++) { FacetIndex ulNB = rclFacet._aulNeighbours[i]; if (ulNB != FACET_INDEX_MAX) { - if (rclFAry[ulNB].IsFlag(MeshFacet::VISIT)) + if (rclFAry[ulNB].IsFlag(MeshFacet::VISIT)) { continue; + } } aclEdges.push_back(rclFacet.GetEdge(i)); } } - if (aclEdges.empty()) - return; // no borders found (=> solid) + if (aclEdges.empty()) { + return; // no borders found (=> solid) + } // search for edges in the unsorted list PointIndex ulFirst, ulLast; std::list clBorder; ulFirst = aclEdges.begin()->first; - ulLast = aclEdges.begin()->second; + ulLast = aclEdges.begin()->second; aclEdges.erase(aclEdges.begin()); clBorder.push_back(ulFirst); @@ -384,7 +416,7 @@ void MeshAlgorithm::GetFacetBorders (const std::vector &raulInd, while (!aclEdges.empty()) { // get adjacent edge - std::list >::iterator pEI; + std::list>::iterator pEI; for (pEI = aclEdges.begin(); pEI != aclEdges.end(); ++pEI) { if (pEI->first == ulLast) { ulLast = pEI->second; @@ -429,7 +461,7 @@ void MeshAlgorithm::GetFacetBorders (const std::vector &raulInd, if (!aclEdges.empty()) { // start new boundary ulFirst = aclEdges.begin()->first; - ulLast = aclEdges.begin()->second; + ulLast = aclEdges.begin()->second; aclEdges.erase(aclEdges.begin()); clBorder.push_back(ulFirst); clBorder.push_back(ulLast); @@ -440,44 +472,47 @@ void MeshAlgorithm::GetFacetBorders (const std::vector &raulInd, void MeshAlgorithm::GetFacetBorder(FacetIndex uFacet, std::list& rBorder) const { - const MeshFacetArray &rFAry = _rclMesh._aclFacetArray; - std::list > openEdges; - if (uFacet >= rFAry.size()) + const MeshFacetArray& rFAry = _rclMesh._aclFacetArray; + std::list> openEdges; + if (uFacet >= rFAry.size()) { return; + } // add the open edge to the beginning of the list MeshFacetArray::_TConstIterator face = rFAry.begin() + uFacet; - for (unsigned short i = 0; i < 3; i++) - { - if (face->_aulNeighbours[i] == FACET_INDEX_MAX) + for (unsigned short i = 0; i < 3; i++) { + if (face->_aulNeighbours[i] == FACET_INDEX_MAX) { openEdges.push_back(face->GetEdge(i)); + } } - if (openEdges.empty()) - return; // facet is not a border facet + if (openEdges.empty()) { + return; // facet is not a border facet + } - for (MeshFacetArray::_TConstIterator it = rFAry.begin(); it != rFAry.end(); ++it) - { - if (it == face) + for (MeshFacetArray::_TConstIterator it = rFAry.begin(); it != rFAry.end(); ++it) { + if (it == face) { continue; - for (unsigned short i = 0; i < 3; i++) - { - if (it->_aulNeighbours[i] == FACET_INDEX_MAX) + } + for (unsigned short i = 0; i < 3; i++) { + if (it->_aulNeighbours[i] == FACET_INDEX_MAX) { openEdges.push_back(it->GetEdge(i)); + } } } SplitBoundaryFromOpenEdges(openEdges, rBorder); } -void MeshAlgorithm::GetFacetsBorders(const std::vector& uFacets, std::list >& rBorders) const +void MeshAlgorithm::GetFacetsBorders(const std::vector& uFacets, + std::list>& rBorders) const { ResetFacetFlag(MeshFacet::TMP0); SetFacetsFlag(uFacets, MeshFacet::TMP0); ResetPointFlag(MeshPoint::TMP0); - const MeshFacetArray &rFAry = _rclMesh._aclFacetArray; - const MeshPointArray &rPAry = _rclMesh._aclPointArray; - std::list > openEdges; + const MeshFacetArray& rFAry = _rclMesh._aclFacetArray; + const MeshPointArray& rPAry = _rclMesh._aclPointArray; + std::list> openEdges; // add the open edge to the beginning of the list for (auto it : uFacets) { @@ -493,26 +528,31 @@ void MeshAlgorithm::GetFacetsBorders(const std::vector& uFacets, std } } - if (openEdges.empty()) - return; // none of the facets are border facets + if (openEdges.empty()) { + return; // none of the facets are border facets + } - for (const auto & it : rFAry) { - if (it.IsFlag(MeshFacet::TMP0)) + for (const auto& it : rFAry) { + if (it.IsFlag(MeshFacet::TMP0)) { continue; + } for (int i = 0; i < 3; i++) { - if (it._aulNeighbours[i] == FACET_INDEX_MAX) + if (it._aulNeighbours[i] == FACET_INDEX_MAX) { openEdges.push_back(it.GetEdge(i)); + } } } // if the first element is not an edge of "uFacets" then give up while (!openEdges.empty()) { PointIndex first = openEdges.begin()->first; - PointIndex second = openEdges.begin()->second; - if (!rPAry[first].IsFlag(MeshPoint::TMP0)) + PointIndex second = openEdges.begin()->second; + if (!rPAry[first].IsFlag(MeshPoint::TMP0)) { break; - if (!rPAry[second].IsFlag(MeshPoint::TMP0)) + } + if (!rPAry[second].IsFlag(MeshPoint::TMP0)) { break; + } std::list boundary; SplitBoundaryFromOpenEdges(openEdges, boundary); @@ -520,14 +560,17 @@ void MeshAlgorithm::GetFacetsBorders(const std::vector& uFacets, std } } -void MeshAlgorithm::SplitBoundaryFromOpenEdges(std::list >& openEdges, std::list& boundary) const +void MeshAlgorithm::SplitBoundaryFromOpenEdges( + std::list>& openEdges, + std::list& boundary) const { // Start with the edge that is associated to uFacet - if (openEdges.empty()) + if (openEdges.empty()) { return; + } PointIndex ulFirst = openEdges.begin()->first; - PointIndex ulLast = openEdges.begin()->second; + PointIndex ulLast = openEdges.begin()->second; openEdges.erase(openEdges.begin()); boundary.push_back(ulFirst); @@ -535,7 +578,7 @@ void MeshAlgorithm::SplitBoundaryFromOpenEdges(std::list >::iterator pEI; + std::list>::iterator pEI; for (pEI = openEdges.begin(); pEI != openEdges.end(); ++pEI) { if (pEI->first == ulLast) { ulLast = pEI->second; @@ -554,28 +597,29 @@ void MeshAlgorithm::SplitBoundaryFromOpenEdges(std::list >& aBorders ) +void MeshAlgorithm::SplitBoundaryLoops(std::list>& aBorders) { // Count the number of open edges for each point std::map openPointDegree; - for (const auto & jt : _rclMesh._aclFacetArray) { - for (int i=0; i<3; i++) { + for (const auto& jt : _rclMesh._aclFacetArray) { + for (int i = 0; i < 3; i++) { if (jt._aulNeighbours[i] == FACET_INDEX_MAX) { openPointDegree[jt._aulPoints[i]]++; - openPointDegree[jt._aulPoints[(i+1)%3]]++; + openPointDegree[jt._aulPoints[(i + 1) % 3]]++; } } } // go through all boundaries and split them if needed - std::list > aSplitBorders; - for (const auto & aBorder : aBorders) { - bool split=false; + std::list> aSplitBorders; + for (const auto& aBorder : aBorders) { + bool split = false; for (auto jt : aBorder) { // two (or more) boundaries meet in one non-manifold point if (openPointDegree[jt] > 2) { @@ -584,17 +628,19 @@ void MeshAlgorithm::SplitBoundaryLoops( std::list >& aBo } } - if (!split) - aSplitBorders.push_back( aBorder ); - else - SplitBoundaryLoops( aBorder, aSplitBorders ); + if (!split) { + aSplitBorders.push_back(aBorder); + } + else { + SplitBoundaryLoops(aBorder, aSplitBorders); + } } aBorders = aSplitBorders; } void MeshAlgorithm::SplitBoundaryLoops(const std::vector& rBound, - std::list >& aBorders) + std::list>& aBorders) { std::map aPtDegree; std::vector cBound; @@ -620,41 +666,51 @@ void MeshAlgorithm::SplitBoundaryLoops(const std::vector& rBound, bool MeshAlgorithm::FillupHole(const std::vector& boundary, AbstractPolygonTriangulator& cTria, - MeshFacetArray& rFaces, MeshPointArray& rPoints, - int level, const MeshRefPointToFacets* pP2FStructure) const + MeshFacetArray& rFaces, + MeshPointArray& rPoints, + int level, + const MeshRefPointToFacets* pP2FStructure) const { if (boundary.front() == boundary.back()) { // first and last vertex are identical - if (boundary.size() < 4) - return false; // something strange + if (boundary.size() < 4) { + return false; // something strange + } } else if (boundary.size() < 3) { - return false; // something strange + return false; // something strange } // Get a facet as reference coordinate system MeshGeomFacet rTriangle; MeshFacet rFace; PointIndex refPoint0 = *(boundary.begin()); - PointIndex refPoint1 = *(boundary.begin()+1); + PointIndex refPoint1 = *(boundary.begin() + 1); if (pP2FStructure) { const std::set& ring1 = (*pP2FStructure)[refPoint0]; const std::set& ring2 = (*pP2FStructure)[refPoint1]; std::vector f_int; - std::set_intersection(ring1.begin(), ring1.end(), ring2.begin(), ring2.end(), - std::back_insert_iterator >(f_int)); - if (f_int.size() != 1) - return false; // error, this must be an open edge! + std::set_intersection(ring1.begin(), + ring1.end(), + ring2.begin(), + ring2.end(), + std::back_insert_iterator>(f_int)); + if (f_int.size() != 1) { + return false; // error, this must be an open edge! + } rFace = _rclMesh._aclFacetArray[f_int.front()]; rTriangle = _rclMesh.GetFacet(rFace); } else { bool ready = false; - for (MeshFacetArray::_TConstIterator it = _rclMesh._aclFacetArray.begin(); it != _rclMesh._aclFacetArray.end(); ++it) { - for (int i=0; i<3; i++) { - if (((it->_aulPoints[i] == refPoint0) && (it->_aulPoints[(i+1)%3] == refPoint1)) || - ((it->_aulPoints[i] == refPoint1) && (it->_aulPoints[(i+1)%3] == refPoint0))) { + for (MeshFacetArray::_TConstIterator it = _rclMesh._aclFacetArray.begin(); + it != _rclMesh._aclFacetArray.end(); + ++it) { + for (int i = 0; i < 3; i++) { + if (((it->_aulPoints[i] == refPoint0) && (it->_aulPoints[(i + 1) % 3] == refPoint1)) + || ((it->_aulPoints[i] == refPoint1) + && (it->_aulPoints[(i + 1) % 3] == refPoint0))) { rFace = *it; rTriangle = _rclMesh.GetFacet(*it); ready = true; @@ -662,8 +718,9 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, } } - if (ready) + if (ready) { break; + } } } @@ -682,9 +739,10 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, rPoints.pop_back(); } - // There is no easy way to check whether the boundary is interior (a hole) or exterior before performing the triangulation. - // Afterwards we can compare the normals of the created triangles with the z-direction of our local coordinate system. - // If the scalar product is positive it was a hole, otherwise not. + // There is no easy way to check whether the boundary is interior (a hole) or exterior before + // performing the triangulation. Afterwards we can compare the normals of the created triangles + // with the z-direction of our local coordinate system. If the scalar product is positive it was + // a hole, otherwise not. cTria.SetPolygon(polygon); cTria.SetIndices(bounds); @@ -704,18 +762,18 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, // get the facets and add the additional points to the array rFaces.insert(rFaces.end(), cTria.GetFacets().begin(), cTria.GetFacets().end()); std::vector newVertices = cTria.AddedPoints(); - for (const auto & vertex : newVertices) { + for (const auto& vertex : newVertices) { rPoints.push_back(vertex); } - // Unfortunately, some algorithms do not care about the orientation of the polygon so we cannot rely on the normal - // criterion to decide whether it's a hole or not. + // Unfortunately, some algorithms do not care about the orientation of the polygon so we + // cannot rely on the normal criterion to decide whether it's a hole or not. // std::vector faces = cTria.GetFacets(); - // Special case handling for a hole with three edges: the resulting facet might be coincident with the - // reference facet - if (faces.size()==1){ + // Special case handling for a hole with three edges: the resulting facet might be + // coincident with the reference facet + if (faces.size() == 1) { MeshFacet first = faces.front(); if (cTria.NeedsReindexing()) { first._aulPoints[0] = boundary[first._aulPoints[0]]; @@ -740,7 +798,7 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, refPoint1 = 1; } if (ref_side < USHRT_MAX) { - for (const auto & face : faces) { + for (const auto& face : faces) { tri_side = face.Side(refPoint0, refPoint1); if (tri_side < USHRT_MAX) { facet = face; @@ -751,8 +809,11 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, // in case the reference facet has not an open edge print a log message if (ref_side == USHRT_MAX || tri_side == USHRT_MAX) { - Base::Console().Log("MeshAlgorithm::FillupHole: Expected open edge for facet <%d, %d, %d>\n", - rFace._aulPoints[0], rFace._aulPoints[1], rFace._aulPoints[2]); + Base::Console().Log( + "MeshAlgorithm::FillupHole: Expected open edge for facet <%d, %d, %d>\n", + rFace._aulPoints[0], + rFace._aulPoints[1], + rFace._aulPoints[2]); rFaces.clear(); rPoints.clear(); cTria.Discard(); @@ -764,15 +825,18 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, triangle = cTria.GetTriangle(rPoints, facet); TriangulationVerifier* verifier = cTria.GetVerifier(); - if (!verifier) + if (!verifier) { return true; + } // Now we have two adjacent triangles which we check for overlaps. - // Therefore we build a separation plane that must separate the two diametrically opposed points. - Base::Vector3f planeNormal = rTriangle.GetNormal() % (rTriangle._aclPoints[(ref_side+1)%3]-rTriangle._aclPoints[ref_side]); - Base::Vector3f planeBase = rTriangle._aclPoints[ref_side%3]; - Base::Vector3f ref_point = rTriangle._aclPoints[(ref_side+2)%3]; - Base::Vector3f tri_point = triangle._aclPoints[(tri_side+2)%3]; + // Therefore we build a separation plane that must separate the two diametrically opposed + // points. + Base::Vector3f planeNormal = rTriangle.GetNormal() + % (rTriangle._aclPoints[(ref_side + 1) % 3] - rTriangle._aclPoints[ref_side]); + Base::Vector3f planeBase = rTriangle._aclPoints[ref_side % 3]; + Base::Vector3f ref_point = rTriangle._aclPoints[(ref_side + 2) % 3]; + Base::Vector3f tri_point = triangle._aclPoints[(tri_side + 2) % 3]; if (!verifier->Accept(planeNormal, planeBase, ref_point, tri_point)) { rFaces.clear(); @@ -783,8 +847,9 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, // we know to have filled a polygon, now check for the orientation if (verifier->MustFlip(triangle.GetNormal(), rTriangle.GetNormal())) { - for (auto & rFace : rFaces) + for (auto& rFace : rFaces) { rFace.FlipNormal(); + } } #endif @@ -794,97 +859,119 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, return false; } -void MeshAlgorithm::SetFacetsProperty(const std::vector &raulInds, const std::vector &raulProps) const +void MeshAlgorithm::SetFacetsProperty(const std::vector& raulInds, + const std::vector& raulProps) const { - if (raulInds.size() != raulProps.size()) + if (raulInds.size() != raulProps.size()) { return; + } std::vector::const_iterator iP = raulProps.begin(); - for (std::vector::const_iterator i = raulInds.begin(); i != raulInds.end(); ++i, ++iP) + for (std::vector::const_iterator i = raulInds.begin(); i != raulInds.end(); + ++i, ++iP) { _rclMesh._aclFacetArray[*i].SetProperty(*iP); + } } -void MeshAlgorithm::SetFacetsFlag (const std::vector &raulInds, MeshFacet::TFlagType tF) const +void MeshAlgorithm::SetFacetsFlag(const std::vector& raulInds, + MeshFacet::TFlagType tF) const { - for (FacetIndex it : raulInds) + for (FacetIndex it : raulInds) { _rclMesh._aclFacetArray[it].SetFlag(tF); + } } -void MeshAlgorithm::SetPointsFlag (const std::vector &raulInds, MeshPoint::TFlagType tF) const +void MeshAlgorithm::SetPointsFlag(const std::vector& raulInds, + MeshPoint::TFlagType tF) const { - for (PointIndex it : raulInds) + for (PointIndex it : raulInds) { _rclMesh._aclPointArray[it].SetFlag(tF); + } } -void MeshAlgorithm::GetFacetsFlag (std::vector &raulInds, MeshFacet::TFlagType tF) const +void MeshAlgorithm::GetFacetsFlag(std::vector& raulInds, MeshFacet::TFlagType tF) const { raulInds.reserve(raulInds.size() + CountFacetFlag(tF)); MeshFacetArray::_TConstIterator beg = _rclMesh._aclFacetArray.begin(); MeshFacetArray::_TConstIterator end = _rclMesh._aclFacetArray.end(); for (MeshFacetArray::_TConstIterator it = beg; it != end; ++it) { - if (it->IsFlag(tF)) - raulInds.push_back(it-beg); + if (it->IsFlag(tF)) { + raulInds.push_back(it - beg); + } } } -void MeshAlgorithm::GetPointsFlag (std::vector &raulInds, MeshPoint::TFlagType tF) const +void MeshAlgorithm::GetPointsFlag(std::vector& raulInds, MeshPoint::TFlagType tF) const { raulInds.reserve(raulInds.size() + CountPointFlag(tF)); MeshPointArray::_TConstIterator beg = _rclMesh._aclPointArray.begin(); MeshPointArray::_TConstIterator end = _rclMesh._aclPointArray.end(); for (MeshPointArray::_TConstIterator it = beg; it != end; ++it) { - if (it->IsFlag(tF)) - raulInds.push_back(it-beg); + if (it->IsFlag(tF)) { + raulInds.push_back(it - beg); + } } } -void MeshAlgorithm::ResetFacetsFlag (const std::vector &raulInds, MeshFacet::TFlagType tF) const +void MeshAlgorithm::ResetFacetsFlag(const std::vector& raulInds, + MeshFacet::TFlagType tF) const { - for (FacetIndex it : raulInds) + for (FacetIndex it : raulInds) { _rclMesh._aclFacetArray[it].ResetFlag(tF); + } } -void MeshAlgorithm::ResetPointsFlag (const std::vector &raulInds, MeshPoint::TFlagType tF) const +void MeshAlgorithm::ResetPointsFlag(const std::vector& raulInds, + MeshPoint::TFlagType tF) const { - for (PointIndex it : raulInds) + for (PointIndex it : raulInds) { _rclMesh._aclPointArray[it].ResetFlag(tF); + } } -void MeshAlgorithm::SetFacetFlag (MeshFacet::TFlagType tF) const +void MeshAlgorithm::SetFacetFlag(MeshFacet::TFlagType tF) const { _rclMesh._aclFacetArray.SetFlag(tF); } -void MeshAlgorithm::SetPointFlag (MeshPoint::TFlagType tF) const +void MeshAlgorithm::SetPointFlag(MeshPoint::TFlagType tF) const { _rclMesh._aclPointArray.SetFlag(tF); } -void MeshAlgorithm::ResetFacetFlag (MeshFacet::TFlagType tF) const +void MeshAlgorithm::ResetFacetFlag(MeshFacet::TFlagType tF) const { _rclMesh._aclFacetArray.ResetFlag(tF); } -void MeshAlgorithm::ResetPointFlag (MeshPoint::TFlagType tF) const +void MeshAlgorithm::ResetPointFlag(MeshPoint::TFlagType tF) const { _rclMesh._aclPointArray.ResetFlag(tF); } -unsigned long MeshAlgorithm::CountFacetFlag (MeshFacet::TFlagType tF) const +unsigned long MeshAlgorithm::CountFacetFlag(MeshFacet::TFlagType tF) const { MeshIsFlag flag; - return std::count_if(_rclMesh._aclFacetArray.begin(), _rclMesh._aclFacetArray.end(), - [flag, tF](const MeshFacet& f) { return flag(f, tF);}); + return std::count_if(_rclMesh._aclFacetArray.begin(), + _rclMesh._aclFacetArray.end(), + [flag, tF](const MeshFacet& f) { + return flag(f, tF); + }); } -unsigned long MeshAlgorithm::CountPointFlag (MeshPoint::TFlagType tF) const +unsigned long MeshAlgorithm::CountPointFlag(MeshPoint::TFlagType tF) const { MeshIsFlag flag; - return std::count_if(_rclMesh._aclPointArray.begin(), _rclMesh._aclPointArray.end(), - [flag, tF](const MeshPoint& f) { return flag(f, tF);}); + return std::count_if(_rclMesh._aclPointArray.begin(), + _rclMesh._aclPointArray.end(), + [flag, tF](const MeshPoint& f) { + return flag(f, tF); + }); } -void MeshAlgorithm::GetFacetsFromToolMesh( const MeshKernel& rToolMesh, const Base::Vector3f& rcDir, std::vector &raclCutted ) const +void MeshAlgorithm::GetFacetsFromToolMesh(const MeshKernel& rToolMesh, + const Base::Vector3f& rcDir, + std::vector& raclCutted) const { MeshFacetIterator cFIt(_rclMesh); MeshFacetIterator cTIt(rToolMesh); @@ -899,24 +986,27 @@ void MeshAlgorithm::GetFacetsFromToolMesh( const MeshKernel& rToolMesh, const Ba // check each point of each facet for (const auto& pnt : cFIt->_aclPoints) { // at least the point must be inside the bounding box of the tool mesh - if (cBB.IsInBox( pnt)) { - // should not cause performance problems since the tool mesh is usually rather lightweight - int ct=0; + if (cBB.IsInBox(pnt)) { + // should not cause performance problems since the tool mesh is usually rather + // lightweight + int ct = 0; for (cTIt.Init(); cTIt.More(); cTIt.Next()) { - if (cTIt->IsPointOfFace( pnt, MeshPoint::epsilon())) { - ct=1; - break; // the point lies on the tool mesh + if (cTIt->IsPointOfFace(pnt, MeshPoint::epsilon())) { + ct = 1; + break; // the point lies on the tool mesh } - else if (cTIt->Foraminate( pnt, rcDir, tmp)) { - // check if the intersection point lies in direction rcDir of the considered point - if ((tmp - pnt) * rcDir > 0) + else if (cTIt->Foraminate(pnt, rcDir, tmp)) { + // check if the intersection point lies in direction rcDir of the considered + // point + if ((tmp - pnt) * rcDir > 0) { ct++; + } } } // odd number => point is inside the tool mesh if (ct % 2 == 1) { - raclCutted.push_back( cFIt.Position() ); + raclCutted.push_back(cFIt.Position()); break; } } @@ -926,8 +1016,10 @@ void MeshAlgorithm::GetFacetsFromToolMesh( const MeshKernel& rToolMesh, const Ba } } -void MeshAlgorithm::GetFacetsFromToolMesh(const MeshKernel& rToolMesh, const Base::Vector3f& rcDir, - const MeshFacetGrid& rGrid, std::vector &raclCutted) const +void MeshAlgorithm::GetFacetsFromToolMesh(const MeshKernel& rToolMesh, + const Base::Vector3f& rcDir, + const MeshFacetGrid& rGrid, + std::vector& raclCutted) const { // iterator over grid structure MeshGridIterator clGridIter(rGrid); @@ -983,17 +1075,20 @@ void MeshAlgorithm::GetFacetsFromToolMesh(const MeshKernel& rToolMesh, const Bas for (auto point : cFIt->_aclPoints) { // at least the point must be inside the bounding box of the tool mesh if (cBB.IsInBox(point)) { - // should not cause performance problems since the tool mesh is usually rather lightweight - int ct=0; + // should not cause performance problems since the tool mesh is usually rather + // lightweight + int ct = 0; for (cTIt.Init(); cTIt.More(); cTIt.Next()) { if (cTIt->IsPointOfFace(point, MeshPoint::epsilon())) { - ct=1; - break; // the point lies on the tool mesh + ct = 1; + break; // the point lies on the tool mesh } else if (cTIt->Foraminate(point, rcDir, tmp)) { - // check if the intersection point lies in direction rcDir of the considered point - if ((tmp - point) * rcDir > 0) + // check if the intersection point lies in direction rcDir of the considered + // point + if ((tmp - point) * rcDir > 0) { ct++; + } } } @@ -1021,60 +1116,60 @@ int MeshAlgorithm::Surround(const Base::BoundBox3f& rBox, const Base::Vector3f& // at least both boxes intersect if (cBB && rBox) { // check for intersections with the actual mesh - Base::Vector3f cCorner[8] = { - Base::Vector3f(rBox.MinX,rBox.MinY,rBox.MinZ), Base::Vector3f(rBox.MaxX,rBox.MinY,rBox.MinZ), - Base::Vector3f(rBox.MaxX,rBox.MaxY,rBox.MinZ), Base::Vector3f(rBox.MinX,rBox.MaxY,rBox.MinZ), - Base::Vector3f(rBox.MinX,rBox.MinY,rBox.MaxZ), Base::Vector3f(rBox.MaxX,rBox.MinY,rBox.MaxZ), - Base::Vector3f(rBox.MaxX,rBox.MaxY,rBox.MaxZ), Base::Vector3f(rBox.MinX,rBox.MaxY,rBox.MaxZ)}; + Base::Vector3f cCorner[8] = {Base::Vector3f(rBox.MinX, rBox.MinY, rBox.MinZ), + Base::Vector3f(rBox.MaxX, rBox.MinY, rBox.MinZ), + Base::Vector3f(rBox.MaxX, rBox.MaxY, rBox.MinZ), + Base::Vector3f(rBox.MinX, rBox.MaxY, rBox.MinZ), + Base::Vector3f(rBox.MinX, rBox.MinY, rBox.MaxZ), + Base::Vector3f(rBox.MaxX, rBox.MinY, rBox.MaxZ), + Base::Vector3f(rBox.MaxX, rBox.MaxY, rBox.MaxZ), + Base::Vector3f(rBox.MinX, rBox.MaxY, rBox.MaxZ)}; MeshFacetIterator cTIt(_rclMesh); // triangulation of the box - int triangles[36] = { - 0,1,2,0,2,3, - 0,1,5,0,5,4, - 0,4,7,0,7,3, - 6,7,4,6,4,5, - 6,2,3,6,3,7, - 6,1,2,6,5,1 - }; + int triangles[36] = {0, 1, 2, 0, 2, 3, 0, 1, 5, 0, 5, 4, 0, 4, 7, 0, 7, 3, + 6, 7, 4, 6, 4, 5, 6, 2, 3, 6, 3, 7, 6, 1, 2, 6, 5, 1}; std::vector cFacet(12); - int id=0; - for (size_t ii=0; ii<12; ii++) { - cFacet[ii]._aclPoints[0]=cCorner[triangles[id++]]; - cFacet[ii]._aclPoints[1]=cCorner[triangles[id++]]; - cFacet[ii]._aclPoints[2]=cCorner[triangles[id++]]; + int id = 0; + for (size_t ii = 0; ii < 12; ii++) { + cFacet[ii]._aclPoints[0] = cCorner[triangles[id++]]; + cFacet[ii]._aclPoints[1] = cCorner[triangles[id++]]; + cFacet[ii]._aclPoints[2] = cCorner[triangles[id++]]; } // check for intersections of the box with the mesh - for (const auto & it : cFacet) { + for (const auto& it : cFacet) { for (cTIt.Init(); cTIt.More(); cTIt.Next()) { - int ret = cTIt->IntersectWithFacet(it,pt1, pt2); + int ret = cTIt->IntersectWithFacet(it, pt1, pt2); // the box intersects the mesh? - if (ret != 0) - return 0; // => no more investigations required + if (ret != 0) { + return 0; // => no more investigations required + } } } // Now we know that the box doesn't intersect with the mesh. This means that either the box // is completely inside or outside the mesh. To check this we test one point of the box // whether it is inside or outside. - int ct=0; + int ct = 0; for (cTIt.Init(); cTIt.More(); cTIt.Next()) { if (cTIt->IsPointOfFace(cCorner[0], MeshPoint::epsilon())) { - ct=1; - break; // the point lies on the tool mesh + ct = 1; + break; // the point lies on the tool mesh } else if (cTIt->Foraminate(cCorner[0], rcDir, tmp)) { // check if the intersection point lies in direction rcDir of the considered point - if ((tmp - cCorner[0]) * rcDir > 0) + if ((tmp - cCorner[0]) * rcDir > 0) { ct++; + } } } - // odd number => point (i.e. the box) is inside the mesh, even number => point is outside the mesh + // odd number => point (i.e. the box) is inside the mesh, even number => point is outside + // the mesh return (ct % 2 == 1) ? 1 : -1; } @@ -1082,8 +1177,11 @@ int MeshAlgorithm::Surround(const Base::BoundBox3f& rBox, const Base::Vector3f& return -1; } -void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, const Base::ViewProjMethod* pclProj, const Base::Polygon2d& rclPoly, - bool bInner, std::vector &raulFacets) const +void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, + const Base::ViewProjMethod* pclProj, + const Base::Polygon2d& rclPoly, + bool bInner, + std::vector& raulFacets) const { std::vector::iterator it; MeshFacetIterator clIter(_rclMesh, 0); @@ -1113,7 +1211,8 @@ void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, const Base::ViewPr // remove duplicates std::sort(aulAllElements.begin(), aulAllElements.end()); - aulAllElements.erase(std::unique(aulAllElements.begin(), aulAllElements.end()), aulAllElements.end()); + aulAllElements.erase(std::unique(aulAllElements.begin(), aulAllElements.end()), + aulAllElements.end()); Base::SequencerLauncher seq("Check facets", aulAllElements.size()); @@ -1121,11 +1220,11 @@ void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, const Base::ViewPr bNoPointInside = true; clGravityOfFacet.Set(0.0f, 0.0f, 0.0f); MeshGeomFacet rclFacet = _rclMesh.GetFacet(*it); - for (const auto & pnt : rclFacet._aclPoints) { + for (const auto& pnt : rclFacet._aclPoints) { clPt2d = fixedProj(pnt); clGravityOfFacet += clPt2d; - if (clPolyBBox.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)) && - rclPoly.Contains(Base::Vector2d(clPt2d.x, clPt2d.y))) { + if (clPolyBBox.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)) + && rclPoly.Contains(Base::Vector2d(clPt2d.x, clPt2d.y))) { raulFacets.push_back(*it); bNoPointInside = false; break; @@ -1134,11 +1233,12 @@ void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, const Base::ViewPr // if no facet point is inside the polygon then check also the gravity if (bNoPointInside) { - clGravityOfFacet *= 1.0f/3.0f; + clGravityOfFacet *= 1.0f / 3.0f; - if (clPolyBBox.Contains(Base::Vector2d(clGravityOfFacet.x, clGravityOfFacet.y)) && - rclPoly.Contains(Base::Vector2d(clGravityOfFacet.x, clGravityOfFacet.y))) + if (clPolyBBox.Contains(Base::Vector2d(clGravityOfFacet.x, clGravityOfFacet.y)) + && rclPoly.Contains(Base::Vector2d(clGravityOfFacet.x, clGravityOfFacet.y))) { raulFacets.push_back(*it); + } } seq.next(); @@ -1150,8 +1250,8 @@ void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, const Base::ViewPr for (clIter.Init(); clIter.More(); clIter.Next()) { for (const auto& pnt : clIter->_aclPoints) { clPt2d = fixedProj(pnt); - if ((clPolyBBox.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)) && - !rclPoly.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)))) { + if ((clPolyBBox.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)) + && !rclPoly.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)))) { raulFacets.push_back(clIter.Position()); break; } @@ -1161,8 +1261,10 @@ void MeshAlgorithm::CheckFacets(const MeshFacetGrid& rclGrid, const Base::ViewPr } } -void MeshAlgorithm::CheckFacets(const Base::ViewProjMethod* pclProj, const Base::Polygon2d& rclPoly, - bool bInner, std::vector &raulFacets) const +void MeshAlgorithm::CheckFacets(const Base::ViewProjMethod* pclProj, + const Base::Polygon2d& rclPoly, + bool bInner, + std::vector& raulFacets) const { const MeshPointArray& p = _rclMesh.GetPoints(); const MeshFacetArray& f = _rclMesh.GetFacets(); @@ -1172,14 +1274,15 @@ void MeshAlgorithm::CheckFacets(const Base::ViewProjMethod* pclProj, const Base: // Precompute the screen projection matrix as Coin's projection function is expensive Base::ViewProjMatrix fixedProj(pclProj->getComposedProjectionMatrix()); - FacetIndex index=0; - for (MeshFacetArray::_TConstIterator it = f.begin(); it != f.end(); ++it,++index) { + FacetIndex index = 0; + for (MeshFacetArray::_TConstIterator it = f.begin(); it != f.end(); ++it, ++index) { for (PointIndex ptIndex : it->_aulPoints) { pt2d = fixedProj(p[ptIndex]); // First check whether the point is in the bounding box of the polygon - if ((bb.Contains(Base::Vector2d(pt2d.x, pt2d.y)) && - rclPoly.Contains(Base::Vector2d(pt2d.x, pt2d.y))) ^ !bInner) { + if ((bb.Contains(Base::Vector2d(pt2d.x, pt2d.y)) + && rclPoly.Contains(Base::Vector2d(pt2d.x, pt2d.y))) + ^ !bInner) { raulFacets.push_back(index); break; } @@ -1187,30 +1290,32 @@ void MeshAlgorithm::CheckFacets(const Base::ViewProjMethod* pclProj, const Base: } } -float MeshAlgorithm::Surface () const +float MeshAlgorithm::Surface() const { - float fTotal = 0.0f; + float fTotal = 0.0f; MeshFacetIterator clFIter(_rclMesh); - for (clFIter.Init(); clFIter.More(); clFIter.Next()) - fTotal += clFIter->Area(); + for (clFIter.Init(); clFIter.More(); clFIter.Next()) { + fTotal += clFIter->Area(); + } return fTotal; } -void MeshAlgorithm::SubSampleByDist (float fDist, std::vector &rclPoints) const +void MeshAlgorithm::SubSampleByDist(float fDist, std::vector& rclPoints) const { rclPoints.clear(); MeshFacetIterator clFIter(_rclMesh); for (clFIter.Init(); clFIter.More(); clFIter.Next()) { size_t k = rclPoints.size(); clFIter->SubSample(fDist, rclPoints); - if (rclPoints.size() == k) - rclPoints.push_back(clFIter->GetGravityPoint()); // min. add middle point + if (rclPoints.size() == k) { + rclPoints.push_back(clFIter->GetGravityPoint()); // min. add middle point + } } } -void MeshAlgorithm::SubSampleAllPoints (std::vector &rclPoints) const +void MeshAlgorithm::SubSampleAllPoints(std::vector& rclPoints) const { rclPoints.clear(); @@ -1222,245 +1327,260 @@ void MeshAlgorithm::SubSampleAllPoints (std::vector &rclPoints) } } -void MeshAlgorithm::SubSampleByCount (unsigned long ulCtPoints, std::vector &rclPoints) const +void MeshAlgorithm::SubSampleByCount(unsigned long ulCtPoints, + std::vector& rclPoints) const { float fDist = float(sqrt(Surface() / float(ulCtPoints))); SubSampleByDist(fDist, rclPoints); } -void MeshAlgorithm::SearchFacetsFromPolyline (const std::vector &rclPolyline, float fRadius, - const MeshFacetGrid& rclGrid, std::vector &rclResultFacetsIndices) const +void MeshAlgorithm::SearchFacetsFromPolyline(const std::vector& rclPolyline, + float fRadius, + const MeshFacetGrid& rclGrid, + std::vector& rclResultFacetsIndices) const { - rclResultFacetsIndices.clear(); - if ( rclPolyline.size() < 3 ) - return; // no polygon defined - - std::set aclFacets; - for (std::vector::const_iterator pV = rclPolyline.begin(); pV < (rclPolyline.end() - 1); ++pV) - { - const Base::Vector3f &rclP0 = *pV, &rclP1 = *(pV + 1); - - // BB eines Polyline-Segments - BoundBox3f clSegmBB(rclP0.x, rclP0.y, rclP0.z, rclP0.x, rclP0.y, rclP0.z); - clSegmBB.Add(rclP1); - clSegmBB.Enlarge(fRadius); // BB um Suchradius vergroessern - - std::vector aclBBFacets; - unsigned long k = rclGrid.Inside(clSegmBB, aclBBFacets, false); - for (unsigned long i = 0; i < k; i++) - { - if (_rclMesh.GetFacet(aclBBFacets[i]).DistanceToLineSegment(rclP0, rclP1) < fRadius) - aclFacets.insert(aclBBFacets[i]); + rclResultFacetsIndices.clear(); + if (rclPolyline.size() < 3) { + return; // no polygon defined } - } - rclResultFacetsIndices.insert(rclResultFacetsIndices.begin(), aclFacets.begin(), aclFacets.end()); + std::set aclFacets; + for (std::vector::const_iterator pV = rclPolyline.begin(); + pV < (rclPolyline.end() - 1); + ++pV) { + const Base::Vector3f &rclP0 = *pV, &rclP1 = *(pV + 1); + + // BB eines Polyline-Segments + BoundBox3f clSegmBB(rclP0.x, rclP0.y, rclP0.z, rclP0.x, rclP0.y, rclP0.z); + clSegmBB.Add(rclP1); + clSegmBB.Enlarge(fRadius); // BB um Suchradius vergroessern + + std::vector aclBBFacets; + unsigned long k = rclGrid.Inside(clSegmBB, aclBBFacets, false); + for (unsigned long i = 0; i < k; i++) { + if (_rclMesh.GetFacet(aclBBFacets[i]).DistanceToLineSegment(rclP0, rclP1) < fRadius) { + aclFacets.insert(aclBBFacets[i]); + } + } + } + + rclResultFacetsIndices.insert(rclResultFacetsIndices.begin(), + aclFacets.begin(), + aclFacets.end()); } -void MeshAlgorithm::CutBorderFacets (std::vector &raclFacetIndices, unsigned short usLevel) const +void MeshAlgorithm::CutBorderFacets(std::vector& raclFacetIndices, + unsigned short usLevel) const { - std::vector aclToDelete; + std::vector aclToDelete; - CheckBorderFacets(raclFacetIndices, aclToDelete, usLevel); + CheckBorderFacets(raclFacetIndices, aclToDelete, usLevel); - // alle gefunden "Rand"-Facetsindizes" aus dem Array loeschen - std::vector aclResult; - std::set aclTmp(aclToDelete.begin(), aclToDelete.end()); + // alle gefunden "Rand"-Facetsindizes" aus dem Array loeschen + std::vector aclResult; + std::set aclTmp(aclToDelete.begin(), aclToDelete.end()); - for (FacetIndex facetIndex : raclFacetIndices) - { - if (aclTmp.find(facetIndex) == aclTmp.end()) - aclResult.push_back(facetIndex); - } + for (FacetIndex facetIndex : raclFacetIndices) { + if (aclTmp.find(facetIndex) == aclTmp.end()) { + aclResult.push_back(facetIndex); + } + } - raclFacetIndices = aclResult; + raclFacetIndices = aclResult; } unsigned long MeshAlgorithm::CountBorderEdges() const { - unsigned long cnt=0; - const MeshFacetArray &rclFAry = _rclMesh._aclFacetArray; + unsigned long cnt = 0; + const MeshFacetArray& rclFAry = _rclMesh._aclFacetArray; MeshFacetArray::_TConstIterator end = rclFAry.end(); for (MeshFacetArray::_TConstIterator it = rclFAry.begin(); it != end; ++it) { for (FacetIndex facetIndex : it->_aulNeighbours) { - if (facetIndex == FACET_INDEX_MAX) + if (facetIndex == FACET_INDEX_MAX) { cnt++; + } } } return cnt; } -void MeshAlgorithm::CheckBorderFacets (const std::vector &raclFacetIndices, std::vector &raclResultIndices, unsigned short usLevel) const +void MeshAlgorithm::CheckBorderFacets(const std::vector& raclFacetIndices, + std::vector& raclResultIndices, + unsigned short usLevel) const { - ResetFacetFlag(MeshFacet::TMP0); - SetFacetsFlag(raclFacetIndices, MeshFacet::TMP0); + ResetFacetFlag(MeshFacet::TMP0); + SetFacetsFlag(raclFacetIndices, MeshFacet::TMP0); - const MeshFacetArray &rclFAry = _rclMesh._aclFacetArray; + const MeshFacetArray& rclFAry = _rclMesh._aclFacetArray; - for (unsigned short usL = 0; usL < usLevel; usL++) - { - for (FacetIndex facetIndex : raclFacetIndices) - { - for (FacetIndex ulNB : rclFAry[facetIndex]._aulNeighbours) - { - if (ulNB == FACET_INDEX_MAX) - { - raclResultIndices.push_back(facetIndex); - rclFAry[facetIndex].ResetFlag(MeshFacet::TMP0); - continue; + for (unsigned short usL = 0; usL < usLevel; usL++) { + for (FacetIndex facetIndex : raclFacetIndices) { + for (FacetIndex ulNB : rclFAry[facetIndex]._aulNeighbours) { + if (ulNB == FACET_INDEX_MAX) { + raclResultIndices.push_back(facetIndex); + rclFAry[facetIndex].ResetFlag(MeshFacet::TMP0); + continue; + } + if (!rclFAry[ulNB].IsFlag(MeshFacet::TMP0)) { + raclResultIndices.push_back(facetIndex); + rclFAry[facetIndex].ResetFlag(MeshFacet::TMP0); + continue; + } + } } - if (!rclFAry[ulNB].IsFlag(MeshFacet::TMP0)) - { - raclResultIndices.push_back(facetIndex); - rclFAry[facetIndex].ResetFlag(MeshFacet::TMP0); - continue; + } +} + +void MeshAlgorithm::GetBorderPoints(const std::vector& raclFacetIndices, + std::set& raclResultPointsIndices) const +{ + ResetFacetFlag(MeshFacet::TMP0); + SetFacetsFlag(raclFacetIndices, MeshFacet::TMP0); + + const MeshFacetArray& rclFAry = _rclMesh._aclFacetArray; + + for (FacetIndex facetIndex : raclFacetIndices) { + for (int i = 0; i < 3; i++) { + const MeshFacet& rclFacet = rclFAry[facetIndex]; + FacetIndex ulNB = rclFacet._aulNeighbours[i]; + if (ulNB == FACET_INDEX_MAX) { + raclResultPointsIndices.insert(rclFacet._aulPoints[i]); + raclResultPointsIndices.insert(rclFacet._aulPoints[(i + 1) % 3]); + continue; + } + if (!rclFAry[ulNB].IsFlag(MeshFacet::TMP0)) { + raclResultPointsIndices.insert(rclFacet._aulPoints[i]); + raclResultPointsIndices.insert(rclFacet._aulPoints[(i + 1) % 3]); + continue; + } } - } } - } } -void MeshAlgorithm::GetBorderPoints (const std::vector &raclFacetIndices, std::set &raclResultPointsIndices) const +bool MeshAlgorithm::NearestPointFromPoint(const Base::Vector3f& rclPt, + FacetIndex& rclResFacetIndex, + Base::Vector3f& rclResPoint) const { - ResetFacetFlag(MeshFacet::TMP0); - SetFacetsFlag(raclFacetIndices, MeshFacet::TMP0); - - const MeshFacetArray &rclFAry = _rclMesh._aclFacetArray; - - for (FacetIndex facetIndex : raclFacetIndices) - { - for (int i = 0; i < 3; i++) - { - const MeshFacet &rclFacet = rclFAry[facetIndex]; - FacetIndex ulNB = rclFacet._aulNeighbours[i]; - if (ulNB == FACET_INDEX_MAX) - { - raclResultPointsIndices.insert(rclFacet._aulPoints[i]); - raclResultPointsIndices.insert(rclFacet._aulPoints[(i+1)%3]); - continue; - } - if (!rclFAry[ulNB].IsFlag(MeshFacet::TMP0)) - { - raclResultPointsIndices.insert(rclFacet._aulPoints[i]); - raclResultPointsIndices.insert(rclFacet._aulPoints[(i+1)%3]); - continue; - } + if (_rclMesh.CountFacets() == 0) { + return false; } - } -} -bool MeshAlgorithm::NearestPointFromPoint (const Base::Vector3f &rclPt, FacetIndex &rclResFacetIndex, Base::Vector3f &rclResPoint) const -{ - if (_rclMesh.CountFacets() == 0) - return false; - - // calc each facet - float fMinDist = FLOAT_MAX; - FacetIndex ulInd = FACET_INDEX_MAX; - MeshFacetIterator pF(_rclMesh); - for (pF.Init(); pF.More(); pF.Next()) - { - float fDist = pF->DistanceToPoint(rclPt); - if (fDist < fMinDist) - { - fMinDist = fDist; - ulInd = pF.Position(); + // calc each facet + float fMinDist = FLOAT_MAX; + FacetIndex ulInd = FACET_INDEX_MAX; + MeshFacetIterator pF(_rclMesh); + for (pF.Init(); pF.More(); pF.Next()) { + float fDist = pF->DistanceToPoint(rclPt); + if (fDist < fMinDist) { + fMinDist = fDist; + ulInd = pF.Position(); + } } - } - MeshGeomFacet rclSFacet = _rclMesh.GetFacet(ulInd); - rclSFacet.DistanceToPoint(rclPt, rclResPoint); - rclResFacetIndex = ulInd; + MeshGeomFacet rclSFacet = _rclMesh.GetFacet(ulInd); + rclSFacet.DistanceToPoint(rclPt, rclResPoint); + rclResFacetIndex = ulInd; - return true; + return true; } -bool MeshAlgorithm::NearestPointFromPoint (const Base::Vector3f &rclPt, const MeshFacetGrid& rclGrid, FacetIndex &rclResFacetIndex, Base::Vector3f &rclResPoint) const +bool MeshAlgorithm::NearestPointFromPoint(const Base::Vector3f& rclPt, + const MeshFacetGrid& rclGrid, + FacetIndex& rclResFacetIndex, + Base::Vector3f& rclResPoint) const { - FacetIndex ulInd = rclGrid.SearchNearestFromPoint(rclPt); + FacetIndex ulInd = rclGrid.SearchNearestFromPoint(rclPt); - if (ulInd == FACET_INDEX_MAX) - { - return false; - } + if (ulInd == FACET_INDEX_MAX) { + return false; + } - MeshGeomFacet rclSFacet = _rclMesh.GetFacet(ulInd); - rclSFacet.DistanceToPoint(rclPt, rclResPoint); - rclResFacetIndex = ulInd; + MeshGeomFacet rclSFacet = _rclMesh.GetFacet(ulInd); + rclSFacet.DistanceToPoint(rclPt, rclResPoint); + rclResFacetIndex = ulInd; - return true; + return true; } -bool MeshAlgorithm::NearestPointFromPoint (const Base::Vector3f &rclPt, const MeshFacetGrid& rclGrid, float fMaxSearchArea, - FacetIndex &rclResFacetIndex, Base::Vector3f &rclResPoint) const +bool MeshAlgorithm::NearestPointFromPoint(const Base::Vector3f& rclPt, + const MeshFacetGrid& rclGrid, + float fMaxSearchArea, + FacetIndex& rclResFacetIndex, + Base::Vector3f& rclResPoint) const { - FacetIndex ulInd = rclGrid.SearchNearestFromPoint(rclPt, fMaxSearchArea); + FacetIndex ulInd = rclGrid.SearchNearestFromPoint(rclPt, fMaxSearchArea); - if (ulInd == FACET_INDEX_MAX) - return false; // no facets inside BoundingBox + if (ulInd == FACET_INDEX_MAX) { + return false; // no facets inside BoundingBox + } - MeshGeomFacet rclSFacet = _rclMesh.GetFacet(ulInd); - rclSFacet.DistanceToPoint(rclPt, rclResPoint); - rclResFacetIndex = ulInd; + MeshGeomFacet rclSFacet = _rclMesh.GetFacet(ulInd); + rclSFacet.DistanceToPoint(rclPt, rclResPoint); + rclResFacetIndex = ulInd; - return true; + return true; } -bool MeshAlgorithm::CutWithPlane (const Base::Vector3f &clBase, const Base::Vector3f &clNormal, const MeshFacetGrid &rclGrid, - std::list > &rclResult, float fMinEps, bool bConnectPolygons) const +bool MeshAlgorithm::CutWithPlane(const Base::Vector3f& clBase, + const Base::Vector3f& clNormal, + const MeshFacetGrid& rclGrid, + std::list>& rclResult, + float fMinEps, + bool bConnectPolygons) const { - std::vector aulFacets; + std::vector aulFacets; - // Search grid - MeshGridIterator clGridIter(rclGrid); - for (clGridIter.Init(); clGridIter.More(); clGridIter.Next()) - { - // if Gridvoxel intersects the plane: pick up all facets for cutting - if (clGridIter.GetBoundBox().IsCutPlane(clBase, clNormal)) - clGridIter.GetElements(aulFacets); - } + // Search grid + MeshGridIterator clGridIter(rclGrid); + for (clGridIter.Init(); clGridIter.More(); clGridIter.Next()) { + // if Gridvoxel intersects the plane: pick up all facets for cutting + if (clGridIter.GetBoundBox().IsCutPlane(clBase, clNormal)) { + clGridIter.GetElements(aulFacets); + } + } - // remove multiple triangles - std::sort(aulFacets.begin(), aulFacets.end()); - aulFacets.erase(std::unique(aulFacets.begin(), aulFacets.end()), aulFacets.end()); + // remove multiple triangles + std::sort(aulFacets.begin(), aulFacets.end()); + aulFacets.erase(std::unique(aulFacets.begin(), aulFacets.end()), aulFacets.end()); - // intersect all facets with plane - std::list > clTempPoly; // Field with intersection lines (unsorted, not chained) + // intersect all facets with plane + std::list> + clTempPoly; // Field with intersection lines (unsorted, not chained) - for (FacetIndex facetIndex : aulFacets) - { - Base::Vector3f clE1, clE2; - const MeshGeomFacet clF(_rclMesh.GetFacet(facetIndex)); + for (FacetIndex facetIndex : aulFacets) { + Base::Vector3f clE1, clE2; + const MeshGeomFacet clF(_rclMesh.GetFacet(facetIndex)); - // Cut the facet and store the cutting path - if (clF.IntersectWithPlane(clBase, clNormal, clE1, clE2)) - clTempPoly.emplace_back(clE1, clE2); - } + // Cut the facet and store the cutting path + if (clF.IntersectWithPlane(clBase, clNormal, clE1, clE2)) { + clTempPoly.emplace_back(clE1, clE2); + } + } - if(bConnectPolygons) - { - //std::list > rclTempLines; - std::list > rclResultLines(clTempPoly.begin(),clTempPoly.end()); - std::list > tempList; - ConnectLines(clTempPoly, tempList, fMinEps); - ConnectPolygons(tempList, clTempPoly); + if (bConnectPolygons) { + // std::list > rclTempLines; + std::list> rclResultLines(clTempPoly.begin(), + clTempPoly.end()); + std::list> tempList; + ConnectLines(clTempPoly, tempList, fMinEps); + ConnectPolygons(tempList, clTempPoly); - for(auto & iter : clTempPoly) - { - rclResultLines.push_front(iter); - } + for (auto& iter : clTempPoly) { + rclResultLines.push_front(iter); + } - return ConnectLines(rclResultLines, rclResult, fMinEps); - } + return ConnectLines(rclResultLines, rclResult, fMinEps); + } - return ConnectLines(clTempPoly, rclResult, fMinEps); + return ConnectLines(clTempPoly, rclResult, fMinEps); } -bool MeshAlgorithm::ConnectLines (std::list > &rclLines, - std::list > &rclPolylines, float fMinEps) const +bool MeshAlgorithm::ConnectLines(std::list>& rclLines, + std::list>& rclPolylines, + float fMinEps) const { - using TCIter = std::list >::iterator; + using TCIter = std::list>::iterator; // square search radius // const float fMinEps = 1.0e-2f; // := 10 micrometer distance @@ -1470,12 +1590,14 @@ bool MeshAlgorithm::ConnectLines (std::list _clToDelete; float fToDelDist = fMinEps / 10.0f; for (TCIter pF = rclLines.begin(); pF != rclLines.end(); ++pF) { - if (Base::DistanceP2(pF->first, pF->second) < fToDelDist) - _clToDelete.push_back(pF); + if (Base::DistanceP2(pF->first, pF->second) < fToDelDist) { + _clToDelete.push_back(pF); + } } - for (auto & pI : _clToDelete) + for (auto& pI : _clToDelete) { rclLines.erase(pI); + } while (!rclLines.empty()) { TCIter pF; @@ -1485,7 +1607,7 @@ bool MeshAlgorithm::ConnectLines (std::listfirst; // current start point of the polyline - Base::Vector3f clEnd = rclLines.begin()->second; // current end point of the polyline + Base::Vector3f clEnd = rclLines.begin()->second; // current end point of the polyline clPoly.push_back(clFront); clPoly.push_back(clEnd); rclLines.erase(rclLines.begin()); @@ -1494,33 +1616,33 @@ bool MeshAlgorithm::ConnectLines (std::listfirst) < fFrontMin) { - fFrontMin = Base::DistanceP2(clFront, pF->first); - pFront = pF; + fFrontMin = Base::DistanceP2(clFront, pF->first); + pFront = pF; bFrontFirst = true; } else if (Base::DistanceP2(clEnd, pF->first) < fEndMin) { - fEndMin = Base::DistanceP2(clEnd, pF->first); - pEnd = pF; - bEndFirst = true; + fEndMin = Base::DistanceP2(clEnd, pF->first); + pEnd = pF; + bEndFirst = true; } else if (Base::DistanceP2(clFront, pF->second) < fFrontMin) { - fFrontMin = Base::DistanceP2(clFront, pF->second); - pFront = pF; + fFrontMin = Base::DistanceP2(clFront, pF->second); + pFront = pF; bFrontFirst = false; } else if (Base::DistanceP2(clEnd, pF->second) < fEndMin) { - fEndMin = Base::DistanceP2(clEnd, pF->second); - pEnd = pF; - bEndFirst = false; + fEndMin = Base::DistanceP2(clEnd, pF->second); + pEnd = pF; + bEndFirst = false; } } @@ -1551,64 +1673,75 @@ bool MeshAlgorithm::ConnectLines (std::list >::iterator; + using TPIter = std::list>::iterator; std::list _clPolyToDelete; for (TPIter pJ = rclPolylines.begin(); pJ != rclPolylines.end(); ++pJ) { - if (pJ->size() == 2) { // only one line segment - if (Base::DistanceP2(*pJ->begin(), *(pJ->begin() + 1)) <= fMinEps) + if (pJ->size() == 2) { // only one line segment + if (Base::DistanceP2(*pJ->begin(), *(pJ->begin() + 1)) <= fMinEps) { _clPolyToDelete.push_back(pJ); + } } } - for (auto & pK : _clPolyToDelete) + for (auto& pK : _clPolyToDelete) { rclPolylines.erase(pK); + } return true; } -bool MeshAlgorithm::ConnectPolygons(std::list > &clPolyList, - std::list > &rclLines) const +bool MeshAlgorithm::ConnectPolygons( + std::list>& clPolyList, + std::list>& rclLines) const { - for (std::list< std::vector >::iterator OutIter = clPolyList.begin(); OutIter != clPolyList.end(); ++OutIter) { - if (OutIter->empty()) + for (std::list>::iterator OutIter = clPolyList.begin(); + OutIter != clPolyList.end(); + ++OutIter) { + if (OutIter->empty()) { continue; - std::pair currentSort; - float fDist = Base::Distance(OutIter->front(),OutIter->back()); + } + std::pair currentSort; + float fDist = Base::Distance(OutIter->front(), OutIter->back()); currentSort.first = OutIter->front(); currentSort.second = OutIter->back(); - for (std::list< std::vector >::iterator InnerIter = clPolyList.begin(); InnerIter != clPolyList.end(); ++InnerIter) { - if (OutIter == InnerIter) + for (std::list>::iterator InnerIter = clPolyList.begin(); + InnerIter != clPolyList.end(); + ++InnerIter) { + if (OutIter == InnerIter) { continue; + } if (Base::Distance(OutIter->front(), InnerIter->front()) < fDist) { currentSort.second = InnerIter->front(); - fDist = Base::Distance(OutIter->front(),InnerIter->front()); + fDist = Base::Distance(OutIter->front(), InnerIter->front()); } if (Base::Distance(OutIter->front(), InnerIter->back()) < fDist) { currentSort.second = InnerIter->back(); - fDist = Base::Distance(OutIter->front(),InnerIter->back()); + fDist = Base::Distance(OutIter->front(), InnerIter->back()); } } rclLines.push_front(currentSort); - } return true; } -void MeshAlgorithm::GetFacetsFromPlane (const MeshFacetGrid &rclGrid, const Base::Vector3f& clNormal, float d, const Base::Vector3f &rclLeft, - const Base::Vector3f &rclRight, std::vector &rclRes) const +void MeshAlgorithm::GetFacetsFromPlane(const MeshFacetGrid& rclGrid, + const Base::Vector3f& clNormal, + float d, + const Base::Vector3f& rclLeft, + const Base::Vector3f& rclRight, + std::vector& rclRes) const { std::vector aulFacets; @@ -1621,8 +1754,9 @@ void MeshAlgorithm::GetFacetsFromPlane (const MeshFacetGrid &rclGrid, const Base MeshGridIterator clGridIter(rclGrid); for (clGridIter.Init(); clGridIter.More(); clGridIter.Next()) { // add facets from grid if the plane if cut the grid-voxel - if (clGridIter.GetBoundBox().IsCutPlane(clBase, clNormal)) + if (clGridIter.GetBoundBox().IsCutPlane(clBase, clNormal)) { clGridIter.GetElements(aulFacets); + } } // testing facet against planes @@ -1632,67 +1766,79 @@ void MeshAlgorithm::GetFacetsFromPlane (const MeshFacetGrid &rclGrid, const Base bool bInner = false; for (int i = 0; (i < 3) && !bInner; i++) { Base::Vector3f clPt = clSFacet._aclPoints[i]; - if ((clPt.DistanceToPlane(rclLeft, clPtNormal) <= 0.0f) && (clPt.DistanceToPlane(rclRight, clPtNormal) >= 0.0f)) + if ((clPt.DistanceToPlane(rclLeft, clPtNormal) <= 0.0f) + && (clPt.DistanceToPlane(rclRight, clPtNormal) >= 0.0f)) { bInner = true; + } } - if (bInner) + if (bInner) { rclRes.push_back(facetIndex); + } } } } -void MeshAlgorithm::PointsFromFacetsIndices (const std::vector &rvecIndices, std::vector &rvecPoints) const +void MeshAlgorithm::PointsFromFacetsIndices(const std::vector& rvecIndices, + std::vector& rvecPoints) const { - const MeshFacetArray &rclFAry = _rclMesh._aclFacetArray; - const MeshPointArray &rclPAry = _rclMesh._aclPointArray; + const MeshFacetArray& rclFAry = _rclMesh._aclFacetArray; + const MeshPointArray& rclPAry = _rclMesh._aclPointArray; - std::set setPoints; + std::set setPoints; - for (FacetIndex facetIndex : rvecIndices) - { - for (PointIndex pointIndex : rclFAry[facetIndex]._aulPoints) - setPoints.insert(pointIndex); - } + for (FacetIndex facetIndex : rvecIndices) { + for (PointIndex pointIndex : rclFAry[facetIndex]._aulPoints) { + setPoints.insert(pointIndex); + } + } - rvecPoints.clear(); - for (PointIndex pointIndex : setPoints) - rvecPoints.push_back(rclPAry[pointIndex]); + rvecPoints.clear(); + for (PointIndex pointIndex : setPoints) { + rvecPoints.push_back(rclPAry[pointIndex]); + } } -bool MeshAlgorithm::Distance (const Base::Vector3f &rclPt, FacetIndex ulFacetIdx, float fMaxDistance, float &rfDistance) const +bool MeshAlgorithm::Distance(const Base::Vector3f& rclPt, + FacetIndex ulFacetIdx, + float fMaxDistance, + float& rfDistance) const { - const MeshFacetArray &rclFAry = _rclMesh._aclFacetArray; - const MeshPointArray &rclPAry = _rclMesh._aclPointArray; - const PointIndex *pulIdx = rclFAry[ulFacetIdx]._aulPoints; + const MeshFacetArray& rclFAry = _rclMesh._aclFacetArray; + const MeshPointArray& rclPAry = _rclMesh._aclPointArray; + const PointIndex* pulIdx = rclFAry[ulFacetIdx]._aulPoints; - BoundBox3f clBB; - clBB.Add(rclPAry[*(pulIdx++)]); - clBB.Add(rclPAry[*(pulIdx++)]); - clBB.Add(rclPAry[*pulIdx]); - clBB.Enlarge(fMaxDistance); + BoundBox3f clBB; + clBB.Add(rclPAry[*(pulIdx++)]); + clBB.Add(rclPAry[*(pulIdx++)]); + clBB.Add(rclPAry[*pulIdx]); + clBB.Enlarge(fMaxDistance); - if (!clBB.IsInBox(rclPt)) - return false; + if (!clBB.IsInBox(rclPt)) { + return false; + } - rfDistance = _rclMesh.GetFacet(ulFacetIdx).DistanceToPoint(rclPt); + rfDistance = _rclMesh.GetFacet(ulFacetIdx).DistanceToPoint(rclPt); - return rfDistance < fMaxDistance; + return rfDistance < fMaxDistance; } -float MeshAlgorithm::CalculateMinimumGridLength(float fLength, const Base::BoundBox3f& rBBox, unsigned long maxElements) const +float MeshAlgorithm::CalculateMinimumGridLength(float fLength, + const Base::BoundBox3f& rBBox, + unsigned long maxElements) const { - // Max. limit of grid elements - float fMaxGridElements=static_cast(maxElements); + // Max. limit of grid elements + float fMaxGridElements = static_cast(maxElements); - // estimate the minimum allowed grid length - float fMinGridLen = static_cast(pow((rBBox.LengthX()*rBBox.LengthY()*rBBox.LengthZ()/fMaxGridElements), 0.3333f)); - return std::max(fMinGridLen, fLength); + // estimate the minimum allowed grid length + float fMinGridLen = static_cast( + pow((rBBox.LengthX() * rBBox.LengthY() * rBBox.LengthZ() / fMaxGridElements), 0.3333f)); + return std::max(fMinGridLen, fLength); } // ---------------------------------------------------- -void MeshRefPointToFacets::Rebuild () +void MeshRefPointToFacets::Rebuild() { _map.clear(); @@ -1701,7 +1847,8 @@ void MeshRefPointToFacets::Rebuild () _map.resize(rPoints.size()); MeshFacetArray::_TConstIterator pFBegin = rFacets.begin(); - for (MeshFacetArray::_TConstIterator pFIter = rFacets.begin(); pFIter != rFacets.end(); ++pFIter) { + for (MeshFacetArray::_TConstIterator pFIter = rFacets.begin(); pFIter != rFacets.end(); + ++pFIter) { _map[pFIter->_aulPoints[0]].insert(pFIter - pFBegin); _map[pFIter->_aulPoints[1]].insert(pFIter - pFBegin); _map[pFIter->_aulPoints[2]].insert(pFIter - pFBegin); @@ -1722,13 +1869,14 @@ Base::Vector3f MeshRefPointToFacets::GetNormal(PointIndex pos) const return normal; } -std::set MeshRefPointToFacets::NeighbourPoints(const std::vector& pt, int level) const +std::set MeshRefPointToFacets::NeighbourPoints(const std::vector& pt, + int level) const { - std::set cp,nb,lp; + std::set cp, nb, lp; cp.insert(pt.begin(), pt.end()); lp.insert(pt.begin(), pt.end()); MeshFacetArray::_TConstIterator f_it = _rclMesh.GetFacets().begin(); - for (int i=0; i < level; i++) { + for (int i = 0; i < level; i++) { std::set cur; for (PointIndex it : lp) { const std::set& ft = (*this)[it]; @@ -1743,8 +1891,9 @@ std::set MeshRefPointToFacets::NeighbourPoints(const std::vector MeshRefPointToFacets::NeighbourPoints(PointIndex pos) const std::set p; const std::set& vf = _map[pos]; for (FacetIndex it : vf) { - PointIndex p1{}, p2{}, p3{}; + PointIndex p1 {}, p2 {}, p3 {}; _rclMesh.GetFacetPoints(it, p1, p2, p3); - if (p1 != pos) + if (p1 != pos) { p.insert(p1); - if (p2 != pos) + } + if (p2 != pos) { p.insert(p2); - if (p3 != pos) + } + if (p3 != pos) { p.insert(p3); + } } return p; } -void MeshRefPointToFacets::Neighbours (FacetIndex ulFacetInd, float fMaxDist, MeshCollector& collect) const +void MeshRefPointToFacets::Neighbours(FacetIndex ulFacetInd, + float fMaxDist, + MeshCollector& collect) const { std::set visited; - Base::Vector3f clCenter = _rclMesh.GetFacet(ulFacetInd).GetGravityPoint(); + Base::Vector3f clCenter = _rclMesh.GetFacet(ulFacetInd).GetGravityPoint(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); SearchNeighbours(rFacets, ulFacetInd, clCenter, fMaxDist * fMaxDist, visited, collect); } -void MeshRefPointToFacets::SearchNeighbours(const MeshFacetArray& rFacets, FacetIndex index, const Base::Vector3f &rclCenter, - float fMaxDist2, std::set& visited, MeshCollector& collect) const +void MeshRefPointToFacets::SearchNeighbours(const MeshFacetArray& rFacets, + FacetIndex index, + const Base::Vector3f& rclCenter, + float fMaxDist2, + std::set& visited, + MeshCollector& collect) const { - if (visited.find(index) != visited.end()) + if (visited.find(index) != visited.end()) { return; + } const MeshFacet& face = rFacets[index]; - if (Base::DistanceP2(rclCenter, _rclMesh.GetFacet(face).GetGravityPoint()) > fMaxDist2) + if (Base::DistanceP2(rclCenter, _rclMesh.GetFacet(face).GetGravityPoint()) > fMaxDist2) { return; + } visited.insert(index); collect.Append(_rclMesh, index); for (PointIndex ptIndex : face._aulPoints) { - const std::set &f = (*this)[ptIndex]; + const std::set& f = (*this)[ptIndex]; for (FacetIndex j : f) { SearchNeighbours(rFacets, j, rclCenter, fMaxDist2, visited, collect); @@ -1797,23 +1957,20 @@ void MeshRefPointToFacets::SearchNeighbours(const MeshFacetArray& rFacets, Facet } } -MeshFacetArray::_TConstIterator -MeshRefPointToFacets::GetFacet (FacetIndex index) const +MeshFacetArray::_TConstIterator MeshRefPointToFacets::GetFacet(FacetIndex index) const { return _rclMesh.GetFacets().begin() + index; } -const std::set& -MeshRefPointToFacets::operator[] (PointIndex pos) const +const std::set& MeshRefPointToFacets::operator[](PointIndex pos) const { return _map[pos]; } -std::vector -MeshRefPointToFacets::GetIndices(PointIndex pos1, PointIndex pos2) const +std::vector MeshRefPointToFacets::GetIndices(PointIndex pos1, PointIndex pos2) const { std::vector intersection; - std::back_insert_iterator > result(intersection); + std::back_insert_iterator> result(intersection); const std::set& set1 = _map[pos1]; const std::set& set2 = _map[pos2]; std::set_intersection(set1.begin(), set1.end(), set2.begin(), set2.end(), result); @@ -1824,7 +1981,7 @@ std::vector MeshRefPointToFacets::GetIndices(PointIndex pos1, PointIndex pos2, PointIndex pos3) const { std::vector intersection; - std::back_insert_iterator > result(intersection); + std::back_insert_iterator> result(intersection); std::vector set1 = GetIndices(pos1, pos2); const std::set& set2 = _map[pos3]; std::set_intersection(set1.begin(), set1.end(), set2.begin(), set2.end(), result); @@ -1853,35 +2010,34 @@ void MeshRefPointToFacets::RemoveFacet(FacetIndex facetIndex) //---------------------------------------------------------------------------- -void MeshRefFacetToFacets::Rebuild () +void MeshRefFacetToFacets::Rebuild() { _map.clear(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); _map.resize(rFacets.size()); - MeshRefPointToFacets vertexFace(_rclMesh); + MeshRefPointToFacets vertexFace(_rclMesh); MeshFacetArray::_TConstIterator pFBegin = rFacets.begin(); for (MeshFacetArray::_TConstIterator pFIter = pFBegin; pFIter != rFacets.end(); ++pFIter) { for (PointIndex ptIndex : pFIter->_aulPoints) { const std::set& faces = vertexFace[ptIndex]; - for (FacetIndex face : faces) + for (FacetIndex face : faces) { _map[pFIter - pFBegin].insert(face); + } } } } -const std::set& -MeshRefFacetToFacets::operator[] (FacetIndex pos) const +const std::set& MeshRefFacetToFacets::operator[](FacetIndex pos) const { return _map[pos]; } -std::vector -MeshRefFacetToFacets::GetIndices(FacetIndex pos1, FacetIndex pos2) const +std::vector MeshRefFacetToFacets::GetIndices(FacetIndex pos1, FacetIndex pos2) const { std::vector intersection; - std::back_insert_iterator > result(intersection); + std::back_insert_iterator> result(intersection); const std::set& set1 = _map[pos1]; const std::set& set2 = _map[pos2]; std::set_intersection(set1.begin(), set1.end(), set2.begin(), set2.end(), result); @@ -1890,7 +2046,7 @@ MeshRefFacetToFacets::GetIndices(FacetIndex pos1, FacetIndex pos2) const //---------------------------------------------------------------------------- -void MeshRefPointToPoints::Rebuild () +void MeshRefPointToPoints::Rebuild() { _map.clear(); @@ -1898,7 +2054,7 @@ void MeshRefPointToPoints::Rebuild () _map.resize(rPoints.size()); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - for (const auto & rFacet : rFacets) { + for (const auto& rFacet : rFacets) { PointIndex ulP0 = rFacet._aulPoints[0]; PointIndex ulP1 = rFacet._aulPoints[1]; PointIndex ulP2 = rFacet._aulPoints[2]; @@ -1934,17 +2090,16 @@ Base::Vector3f MeshRefPointToPoints::GetNormal(PointIndex pos) const float MeshRefPointToPoints::GetAverageEdgeLength(PointIndex index) const { const MeshPointArray& rPoints = _rclMesh.GetPoints(); - float len=0.0f; + float len = 0.0f; const std::set& n = (*this)[index]; const Base::Vector3f& p = rPoints[index]; for (PointIndex it : n) { len += Base::Distance(p, rPoints[it]); } - return (len/n.size()); + return (len / n.size()); } -const std::set& -MeshRefPointToPoints::operator[] (PointIndex pos) const +const std::set& MeshRefPointToPoints::operator[](PointIndex pos) const { return _map[pos]; } @@ -1961,19 +2116,18 @@ void MeshRefPointToPoints::RemoveNeighbour(PointIndex pos, PointIndex facet) //---------------------------------------------------------------------------- -void MeshRefEdgeToFacets::Rebuild () +void MeshRefEdgeToFacets::Rebuild() { _map.clear(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); FacetIndex index = 0; for (MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); ++it, ++index) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { MeshEdge e; e.first = it->_aulPoints[i]; - e.second = it->_aulPoints[(i+1)%3]; - std::map::iterator jt = - _map.find(e); + e.second = it->_aulPoints[(i + 1) % 3]; + std::map::iterator jt = _map.find(e); if (jt == _map.end()) { _map[e].first = index; _map[e].second = FACET_INDEX_MAX; @@ -1985,15 +2139,14 @@ void MeshRefEdgeToFacets::Rebuild () } } -const std::pair& -MeshRefEdgeToFacets::operator[] (const MeshEdge& edge) const +const std::pair& MeshRefEdgeToFacets::operator[](const MeshEdge& edge) const { return _map.find(edge)->second; } //---------------------------------------------------------------------------- -void MeshRefNormalToPoints::Rebuild () +void MeshRefNormalToPoints::Rebuild() { _norm.clear(); @@ -2001,25 +2154,25 @@ void MeshRefNormalToPoints::Rebuild () _norm.resize(rPoints.size()); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - for (const auto & rFacet : rFacets) { - const MeshPoint &p0 = rPoints[rFacet._aulPoints[0]]; - const MeshPoint &p1 = rPoints[rFacet._aulPoints[1]]; - const MeshPoint &p2 = rPoints[rFacet._aulPoints[2]]; - float l2p01 = Base::DistanceP2(p0,p1); - float l2p12 = Base::DistanceP2(p1,p2); - float l2p20 = Base::DistanceP2(p2,p0); + for (const auto& rFacet : rFacets) { + const MeshPoint& p0 = rPoints[rFacet._aulPoints[0]]; + const MeshPoint& p1 = rPoints[rFacet._aulPoints[1]]; + const MeshPoint& p2 = rPoints[rFacet._aulPoints[2]]; + float l2p01 = Base::DistanceP2(p0, p1); + float l2p12 = Base::DistanceP2(p1, p2); + float l2p20 = Base::DistanceP2(p2, p0); Base::Vector3f facenormal = _rclMesh.GetFacet(rFacet).GetNormal(); _norm[rFacet._aulPoints[0]] += facenormal * (1.0f / (l2p01 * l2p20)); _norm[rFacet._aulPoints[1]] += facenormal * (1.0f / (l2p12 * l2p01)); _norm[rFacet._aulPoints[2]] += facenormal * (1.0f / (l2p20 * l2p12)); } - for (auto & it : _norm) + for (auto& it : _norm) { it.Normalize(); + } } -const Base::Vector3f& -MeshRefNormalToPoints::operator[] (PointIndex pos) const +const Base::Vector3f& MeshRefNormalToPoints::operator[](PointIndex pos) const { return _norm[pos]; } diff --git a/src/Mod/Mesh/App/Core/Algorithm.h b/src/Mod/Mesh/App/Core/Algorithm.h index 3cf7030c56..a66c9440ee 100644 --- a/src/Mod/Mesh/App/Core/Algorithm.h +++ b/src/Mod/Mesh/App/Core/Algorithm.h @@ -33,12 +33,14 @@ // forward declarations -namespace Base{ - class ViewProjMethod; - class Polygon2d; -} +namespace Base +{ +class ViewProjMethod; +class Polygon2d; +} // namespace Base -namespace MeshCore { +namespace MeshCore +{ class MeshGeomFacet; class MeshGeomEdge; @@ -54,288 +56,367 @@ class AbstractPolygonTriangulator; class MeshExport MeshAlgorithm { public: - explicit MeshAlgorithm (const MeshKernel &rclM) : _rclMesh(rclM) { } + explicit MeshAlgorithm(const MeshKernel& rclM) + : _rclMesh(rclM) + {} public: - /** - * Searches for the nearest facet to the ray defined by - * (\a rclPt, \a rclDir). - * The point \a rclRes holds the intersection point with the ray and the - * nearest facet with index \a rulFacet. - * \note This method tests all facets so it should only be used - * occasionally. - */ - bool NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes, - FacetIndex &rulFacet) const; - /** - * Searches for the nearest facet to the ray defined by - * (\a rclPt, \a rclDir). - * The point \a rclRes holds the intersection point with the ray and the - * nearest facet with index \a rulFacet. The angle between the ray and the normal of the triangle - * must be less than or equal to \a fMaxAngle. - * \note This method tests all facets so it should only be used - * occasionally. - */ - bool NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxAngle, Base::Vector3f &rclRes, - FacetIndex &rulFacet) const; - /** - * Searches for the nearest facet to the ray defined by - * (\a rclPt, \a rclDir). - * The point \a rclRes holds the intersection point with the ray and the - * nearest facet with index \a rulFacet. - * \note This method is optimized by using a grid. So this method can be - * used for a lot of tests. - */ - bool NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, const MeshFacetGrid &rclGrid, - Base::Vector3f &rclRes, FacetIndex &rulFacet) const; - /** - * Searches for the nearest facet to the ray defined by - * (\a rclPt, \a rclDir). - * The point \a rclRes holds the intersection point with the ray and the - * nearest facet with index \a rulFacet. - * \note This method tests all facets taken from \a raulFacets instead of - * the attached mesh. So the caller must ensure that the indices are valid - * facets. - */ - bool NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, const std::vector &raulFacets, - Base::Vector3f &rclRes, FacetIndex &rulFacet) const; - /** - * Searches for the nearest facet to the ray defined by (\a rclPt, \a rclDir). The point \a rclRes holds - * the intersection point with the ray and the nearest facet with index \a rulFacet. - * More a search radius around the ray of \a fMaxSearchArea is defined. - * \note This method is optimized by using a grid. So this method can be used for a lot of tests. - */ - bool NearestFacetOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxSearchArea, - const MeshFacetGrid &rclGrid, Base::Vector3f &rclRes, FacetIndex &rulFacet) const; - /** - * Searches for the first facet of the grid element (\a rclGrid) in that the point \a rclPt lies into which is a distance not - * higher than \a fMaxDistance. Of no such facet is found \a rulFacet is undefined and false is returned, otherwise true. - * \note If the point \a rclPt is outside of the grid \a rclGrid nothing is done. - */ - bool FirstFacetToVertex(const Base::Vector3f &rclPt, float fMaxDistance, const MeshFacetGrid &rclGrid, FacetIndex &rulFacet) const; - /** - * Checks from the viewpoint \a rcView if the vertex \a rcVertex is visible or it is hidden by a facet. - * If the vertex is visible true is returned, false otherwise. - */ - bool IsVertexVisible (const Base::Vector3f &rcVertex, const Base::Vector3f &rcView, const MeshFacetGrid &rclGrid ) const; - /** - * Calculates the average length of edges. - */ - float GetAverageEdgeLength() const; - /** - * Calculates the minimum length of edges. - */ - float GetMinimumEdgeLength() const; - /** - * Calculates the maximum length of edges. - */ - float GetMaximumEdgeLength() const; - /** - * Calculates the gravity point of the mesh. - */ - Base::Vector3f GetGravityPoint() const; - /** - * Returns all boundaries of the mesh. - */ - void GetMeshBorders (std::list > &rclBorders) const; - /** - * Returns all boundaries of the mesh. This method does basically the same as above unless that it returns the point indices - * of the boundaries. - */ - void GetMeshBorders (std::list > &rclBorders) const; - /** - * Returns all boundaries of a subset the mesh defined by \a raulInd. - */ - void GetFacetBorders (const std::vector &raulInd, std::list > &rclBorders) const; - /** - * Returns all boundaries of a subset the mesh defined by \a raulInd. This method does basically the same as above unless - * that it returns the point indices of the boundaries. - * If \a ignoreOrientation is false (the default) we may get a broken boundary curve if the mesh has facets - * with wrong orientation. However, if \a ignoreOrientation is true we may get a boundary curve with wrong - * orientation even if the mesh is topologically correct. You should let the default value unless you exactly - * know what you do. - */ - void GetFacetBorders (const std::vector &raulInd, std::list > &rclBorders, - bool ignoreOrientation = false) const; - /** - * Returns the boundary of the mesh to the facet \a uFacet. If this facet does not have an open edge the returned - * boundary is empty. - */ - void GetFacetBorder(FacetIndex uFacet, std::list& rBorder) const; - /** - * Returns the boundary of the mesh to the facets \a uFacest. If none of the facets have an open edge the returned - * boundary is empty. - */ - void GetFacetsBorders(const std::vector& uFacets, std::list >& rBorders) const; - /** - * Boundaries that consist of several loops must be split in several independent boundaries - * to perform e.g. a polygon triangulation algorithm on them. - */ - void SplitBoundaryLoops( std::list >& aBorders ); - /** - * Fills up the single boundary if it is a hole with high quality triangles and a maximum area of \a fMaxArea. - * The triangulation information is stored in \a rFaces and \a rPoints. - * To speed up the calculations the optional parameter \a pStructure can be specified that holds a facet-to-points - * structure of the underlying mesh. - * If the boundary is not a hole or the algorithm failed false is returned, otherwise true. - * @note \a boundary contains the point indices of the mesh data structure. The first and last index must therefore be equal. - * @note \a rPoints contains the geometric points of the triangulation. The number of points can be the same as or exceed - * the number of boundary indices but it cannot be lower. - * @note If the number of geometric points exceeds the number of boundary indices then the triangulation algorithm has - * introduced new points which are added to the end of \a rPoints. - */ - bool FillupHole(const std::vector& boundary, - AbstractPolygonTriangulator& cTria, - MeshFacetArray& rFaces, MeshPointArray& rPoints, - int level, const MeshRefPointToFacets* pP2FStructure=nullptr) const; - /** Sets to all facets in \a raulInds the properties in raulProps. - * \note Both arrays must have the same size. - */ - void SetFacetsProperty(const std::vector &raulInds, const std::vector &raulProps) const; - /** Sets to all facets the flag \a tF. */ - void SetFacetFlag (MeshFacet::TFlagType tF) const; - /** Sets to all points the flag \a tF. */ - void SetPointFlag (MeshPoint::TFlagType tF) const; - /** Resets of all facets the flag \a tF. */ - void ResetFacetFlag (MeshFacet::TFlagType tF) const; - /** Resets of all points the flag \a tF. */ - void ResetPointFlag (MeshPoint::TFlagType tF) const; - /** Sets to all facets in \a raulInds the flag \a tF. */ - void SetFacetsFlag (const std::vector &raulInds, MeshFacet::TFlagType tF) const; - /** Sets to all points in \a raulInds the flag \a tF. */ - void SetPointsFlag (const std::vector &raulInds, MeshPoint::TFlagType tF) const; - /** Gets all facets in \a raulInds with the flag \a tF. */ - void GetFacetsFlag (std::vector &raulInds, MeshFacet::TFlagType tF) const; - /** Gets all points in \a raulInds with the flag \a tF. */ - void GetPointsFlag (std::vector &raulInds, MeshPoint::TFlagType tF) const; - /** Resets from all facets in \a raulInds the flag \a tF. */ - void ResetFacetsFlag (const std::vector &raulInds, MeshFacet::TFlagType tF) const; - /** Resets from all points in \a raulInds the flag \a tF. */ - void ResetPointsFlag (const std::vector &raulInds, MeshPoint::TFlagType tF) const; - /** Count all facets with the flag \a tF. */ - unsigned long CountFacetFlag (MeshFacet::TFlagType tF) const; - /** Count all points with the flag \a tF. */ - unsigned long CountPointFlag (MeshPoint::TFlagType tF) const; - /** Returns all geometric points from the facets in \a rvecIndices. */ - void PointsFromFacetsIndices (const std::vector &rvecIndices, std::vector &rvecPoints) const; - /** - * Returns the indices of all facets that have at least one point that lies inside the tool mesh. The direction - * \a dir is used to try to foraminate the facets of the tool mesh and counts the number of foraminated facets. - * If this number is odd the considered point lies inside otherwise outside. - * @note The tool mesh must be a valid solid. - * @note It's not tested if \a rToolMesh is a valid solid. In case it is not the result is undefined. - */ - void GetFacetsFromToolMesh( const MeshKernel& rToolMesh, const Base::Vector3f& rcDir, std::vector &raclCutted ) const; - /** - * Does basically the same as method above except it uses a mesh grid to speed up the computation. - */ - void GetFacetsFromToolMesh( const MeshKernel& rToolMesh, const Base::Vector3f& rcDir, const MeshFacetGrid& rGrid, std::vector &raclCutted ) const; - /** - * Checks whether the bounding box \a rBox is surrounded by the attached mesh which must be a solid. - * The direction \a rcDir is used to try to foraminate the facets of the tool mesh and counts the number of foraminated facets. - * 1 is returned if the box is completely inside the mesh - * 0 is returned if the box is partially inside (i.e. intersects) the mesh - * -1 is returned if the box is completely outside the mesh. This could also mean that the mesh is surrounded by \a rBox. - */ - int Surround( const Base::BoundBox3f& rBox, const Base::Vector3f& rcDir ); - /** - * Projects the determined facets through projection with \a pclProj into the 2D plane and checks for - * intersection with the polygon. - * If \a bInner is \a true than all facets with at least one corner inside the polygon get deleted. If \a - * bInner is \a false then all facets with at least one corner outside the polygon get deleted. - * This algorithm is optimized by using a grid. - */ - void CheckFacets (const MeshFacetGrid &rclGrid, const Base::ViewProjMethod* pclProj, const Base::Polygon2d& rclPoly, - bool bInner, std::vector &rclRes) const; - /** - * Does the same as the above method unless that it doesn't use a grid. - */ - void CheckFacets (const Base::ViewProjMethod* pclProj, const Base::Polygon2d& rclPoly, - bool bInner, std::vector &rclRes) const; - /** - * Determines all facets of the given array \a raclFacetIndices that lie at the edge or that - * have at least neighbour facet that is not inside the array. The resulting array \a raclResultIndices - * is not be deleted before the algorithm starts. \a usLevel indicates how often the algorithm is - * repeated. - */ - void CheckBorderFacets (const std::vector &raclFacetIndices, - std::vector &raclResultIndices, unsigned short usLevel = 1) const; - /** - * Invokes CheckBorderFacets() to get all border facets of \a raclFacetIndices. Then the content of - * \a raclFacetIndices is replaced by all facets that can be deleted. - * \note The mesh structure is not modified by this method. This is in the responsibility of the user. - */ - void CutBorderFacets (std::vector &raclFacetIndices, unsigned short usLevel = 1) const; - /** Returns the number of border edges */ - unsigned long CountBorderEdges() const; - /** - * Determines all border points as indices of the facets in \a raclFacetIndices. The points are unsorted. - */ - void GetBorderPoints (const std::vector &raclFacetIndices, std::set &raclResultPointsIndices) const; - /** Computes the surface of the mesh. */ - float Surface () const; - /** Subsamples the mesh with point distance \a fDist and stores the points in \a rclPoints. */ - void SubSampleByDist (float fDist, std::vector &rclPoints) const; - /** - * Subsamples the mesh to produce around \a ulCtPoints. \a ulCtPoints should be greater - * than 5 * number of facets. - */ - void SubSampleByCount (unsigned long ulCtPoints, std::vector &rclPoints) const; - /** Returns only the points of the mesh without actually sampling the data. */ - void SubSampleAllPoints(std::vector &rclPoints) const; - /** - * Searches for all facets that intersect the "search tube" with radius \a r around the polyline. - */ - void SearchFacetsFromPolyline (const std::vector &rclPolyline, float fRadius, - const MeshFacetGrid& rclGrid, std::vector &rclResultFacetsIndices) const; - /** Projects a point directly to the mesh (means nearest facet), the result is the facet index and - * the foraminate point, use second version with grid for more performance. - */ - bool NearestPointFromPoint (const Base::Vector3f &rclPt, FacetIndex &rclResFacetIndex, Base::Vector3f &rclResPoint) const; - bool NearestPointFromPoint (const Base::Vector3f &rclPt, const MeshFacetGrid& rclGrid, - FacetIndex &rclResFacetIndex, Base::Vector3f &rclResPoint) const; - bool NearestPointFromPoint (const Base::Vector3f &rclPt, const MeshFacetGrid& rclGrid, float fMaxSearchArea, - FacetIndex &rclResFacetIndex, Base::Vector3f &rclResPoint) const; - /** Cuts the mesh with a plane. The result is a list of polylines. */ - bool CutWithPlane (const Base::Vector3f &clBase, const Base::Vector3f &clNormal, const MeshFacetGrid &rclGrid, - std::list > &rclResult, float fMinEps = 1.0e-2f, bool bConnectPolygons = false) const; - /** - * Gets all facets that cut the plane (N,d) and that lie between the two points left and right. - * The plane is defined by it normalized normal and the signed distance to the origin. - */ - void GetFacetsFromPlane (const MeshFacetGrid &rclGrid, const Base::Vector3f& clNormal, float dist, - const Base::Vector3f &rclLeft, const Base::Vector3f &rclRight, std::vector &rclRes) const; + /** + * Searches for the nearest facet to the ray defined by + * (\a rclPt, \a rclDir). + * The point \a rclRes holds the intersection point with the ray and the + * nearest facet with index \a rulFacet. + * \note This method tests all facets so it should only be used + * occasionally. + */ + bool NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const; + /** + * Searches for the nearest facet to the ray defined by + * (\a rclPt, \a rclDir). + * The point \a rclRes holds the intersection point with the ray and the + * nearest facet with index \a rulFacet. The angle between the ray and the normal of the + * triangle must be less than or equal to \a fMaxAngle. \note This method tests all facets so it + * should only be used occasionally. + */ + bool NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + float fMaxAngle, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const; + /** + * Searches for the nearest facet to the ray defined by + * (\a rclPt, \a rclDir). + * The point \a rclRes holds the intersection point with the ray and the + * nearest facet with index \a rulFacet. + * \note This method is optimized by using a grid. So this method can be + * used for a lot of tests. + */ + bool NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + const MeshFacetGrid& rclGrid, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const; + /** + * Searches for the nearest facet to the ray defined by + * (\a rclPt, \a rclDir). + * The point \a rclRes holds the intersection point with the ray and the + * nearest facet with index \a rulFacet. + * \note This method tests all facets taken from \a raulFacets instead of + * the attached mesh. So the caller must ensure that the indices are valid + * facets. + */ + bool NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + const std::vector& raulFacets, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const; + /** + * Searches for the nearest facet to the ray defined by (\a rclPt, \a rclDir). The point \a + * rclRes holds the intersection point with the ray and the nearest facet with index \a + * rulFacet. More a search radius around the ray of \a fMaxSearchArea is defined. \note This + * method is optimized by using a grid. So this method can be used for a lot of tests. + */ + bool NearestFacetOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + float fMaxSearchArea, + const MeshFacetGrid& rclGrid, + Base::Vector3f& rclRes, + FacetIndex& rulFacet) const; + /** + * Searches for the first facet of the grid element (\a rclGrid) in that the point \a rclPt lies + * into which is a distance not higher than \a fMaxDistance. Of no such facet is found \a + * rulFacet is undefined and false is returned, otherwise true. \note If the point \a rclPt is + * outside of the grid \a rclGrid nothing is done. + */ + bool FirstFacetToVertex(const Base::Vector3f& rclPt, + float fMaxDistance, + const MeshFacetGrid& rclGrid, + FacetIndex& rulFacet) const; + /** + * Checks from the viewpoint \a rcView if the vertex \a rcVertex is visible or it is hidden by a + * facet. If the vertex is visible true is returned, false otherwise. + */ + bool IsVertexVisible(const Base::Vector3f& rcVertex, + const Base::Vector3f& rcView, + const MeshFacetGrid& rclGrid) const; + /** + * Calculates the average length of edges. + */ + float GetAverageEdgeLength() const; + /** + * Calculates the minimum length of edges. + */ + float GetMinimumEdgeLength() const; + /** + * Calculates the maximum length of edges. + */ + float GetMaximumEdgeLength() const; + /** + * Calculates the gravity point of the mesh. + */ + Base::Vector3f GetGravityPoint() const; + /** + * Returns all boundaries of the mesh. + */ + void GetMeshBorders(std::list>& rclBorders) const; + /** + * Returns all boundaries of the mesh. This method does basically the same as above unless that + * it returns the point indices of the boundaries. + */ + void GetMeshBorders(std::list>& rclBorders) const; + /** + * Returns all boundaries of a subset the mesh defined by \a raulInd. + */ + void GetFacetBorders(const std::vector& raulInd, + std::list>& rclBorders) const; + /** + * Returns all boundaries of a subset the mesh defined by \a raulInd. This method does basically + * the same as above unless that it returns the point indices of the boundaries. If \a + * ignoreOrientation is false (the default) we may get a broken boundary curve if the mesh has + * facets with wrong orientation. However, if \a ignoreOrientation is true we may get a boundary + * curve with wrong orientation even if the mesh is topologically correct. You should let the + * default value unless you exactly know what you do. + */ + void GetFacetBorders(const std::vector& raulInd, + std::list>& rclBorders, + bool ignoreOrientation = false) const; + /** + * Returns the boundary of the mesh to the facet \a uFacet. If this facet does not have an open + * edge the returned boundary is empty. + */ + void GetFacetBorder(FacetIndex uFacet, std::list& rBorder) const; + /** + * Returns the boundary of the mesh to the facets \a uFacest. If none of the facets have an open + * edge the returned boundary is empty. + */ + void GetFacetsBorders(const std::vector& uFacets, + std::list>& rBorders) const; + /** + * Boundaries that consist of several loops must be split in several independent boundaries + * to perform e.g. a polygon triangulation algorithm on them. + */ + void SplitBoundaryLoops(std::list>& aBorders); + /** + * Fills up the single boundary if it is a hole with high quality triangles and a maximum area + * of \a fMaxArea. The triangulation information is stored in \a rFaces and \a rPoints. To speed + * up the calculations the optional parameter \a pStructure can be specified that holds a + * facet-to-points structure of the underlying mesh. If the boundary is not a hole or the + * algorithm failed false is returned, otherwise true. + * @note \a boundary contains the point indices of the mesh data structure. The first and last + * index must therefore be equal. + * @note \a rPoints contains the geometric points of the triangulation. The number of points can + * be the same as or exceed the number of boundary indices but it cannot be lower. + * @note If the number of geometric points exceeds the number of boundary indices then the + * triangulation algorithm has introduced new points which are added to the end of \a rPoints. + */ + bool FillupHole(const std::vector& boundary, + AbstractPolygonTriangulator& cTria, + MeshFacetArray& rFaces, + MeshPointArray& rPoints, + int level, + const MeshRefPointToFacets* pP2FStructure = nullptr) const; + /** Sets to all facets in \a raulInds the properties in raulProps. + * \note Both arrays must have the same size. + */ + void SetFacetsProperty(const std::vector& raulInds, + const std::vector& raulProps) const; + /** Sets to all facets the flag \a tF. */ + void SetFacetFlag(MeshFacet::TFlagType tF) const; + /** Sets to all points the flag \a tF. */ + void SetPointFlag(MeshPoint::TFlagType tF) const; + /** Resets of all facets the flag \a tF. */ + void ResetFacetFlag(MeshFacet::TFlagType tF) const; + /** Resets of all points the flag \a tF. */ + void ResetPointFlag(MeshPoint::TFlagType tF) const; + /** Sets to all facets in \a raulInds the flag \a tF. */ + void SetFacetsFlag(const std::vector& raulInds, MeshFacet::TFlagType tF) const; + /** Sets to all points in \a raulInds the flag \a tF. */ + void SetPointsFlag(const std::vector& raulInds, MeshPoint::TFlagType tF) const; + /** Gets all facets in \a raulInds with the flag \a tF. */ + void GetFacetsFlag(std::vector& raulInds, MeshFacet::TFlagType tF) const; + /** Gets all points in \a raulInds with the flag \a tF. */ + void GetPointsFlag(std::vector& raulInds, MeshPoint::TFlagType tF) const; + /** Resets from all facets in \a raulInds the flag \a tF. */ + void ResetFacetsFlag(const std::vector& raulInds, MeshFacet::TFlagType tF) const; + /** Resets from all points in \a raulInds the flag \a tF. */ + void ResetPointsFlag(const std::vector& raulInds, MeshPoint::TFlagType tF) const; + /** Count all facets with the flag \a tF. */ + unsigned long CountFacetFlag(MeshFacet::TFlagType tF) const; + /** Count all points with the flag \a tF. */ + unsigned long CountPointFlag(MeshPoint::TFlagType tF) const; + /** Returns all geometric points from the facets in \a rvecIndices. */ + void PointsFromFacetsIndices(const std::vector& rvecIndices, + std::vector& rvecPoints) const; + /** + * Returns the indices of all facets that have at least one point that lies inside the tool + * mesh. The direction \a dir is used to try to foraminate the facets of the tool mesh and + * counts the number of foraminated facets. If this number is odd the considered point lies + * inside otherwise outside. + * @note The tool mesh must be a valid solid. + * @note It's not tested if \a rToolMesh is a valid solid. In case it is not the result is + * undefined. + */ + void GetFacetsFromToolMesh(const MeshKernel& rToolMesh, + const Base::Vector3f& rcDir, + std::vector& raclCutted) const; + /** + * Does basically the same as method above except it uses a mesh grid to speed up the + * computation. + */ + void GetFacetsFromToolMesh(const MeshKernel& rToolMesh, + const Base::Vector3f& rcDir, + const MeshFacetGrid& rGrid, + std::vector& raclCutted) const; + /** + * Checks whether the bounding box \a rBox is surrounded by the attached mesh which must be a + * solid. The direction \a rcDir is used to try to foraminate the facets of the tool mesh and + * counts the number of foraminated facets. 1 is returned if the box is completely inside the + * mesh 0 is returned if the box is partially inside (i.e. intersects) the mesh -1 is returned + * if the box is completely outside the mesh. This could also mean that the mesh is surrounded + * by \a rBox. + */ + int Surround(const Base::BoundBox3f& rBox, const Base::Vector3f& rcDir); + /** + * Projects the determined facets through projection with \a pclProj into the 2D plane and + * checks for intersection with the polygon. If \a bInner is \a true than all facets with at + * least one corner inside the polygon get deleted. If \a bInner is \a false then all facets + * with at least one corner outside the polygon get deleted. This algorithm is optimized by + * using a grid. + */ + void CheckFacets(const MeshFacetGrid& rclGrid, + const Base::ViewProjMethod* pclProj, + const Base::Polygon2d& rclPoly, + bool bInner, + std::vector& rclRes) const; + /** + * Does the same as the above method unless that it doesn't use a grid. + */ + void CheckFacets(const Base::ViewProjMethod* pclProj, + const Base::Polygon2d& rclPoly, + bool bInner, + std::vector& rclRes) const; + /** + * Determines all facets of the given array \a raclFacetIndices that lie at the edge or that + * have at least neighbour facet that is not inside the array. The resulting array \a + * raclResultIndices is not be deleted before the algorithm starts. \a usLevel indicates how + * often the algorithm is repeated. + */ + void CheckBorderFacets(const std::vector& raclFacetIndices, + std::vector& raclResultIndices, + unsigned short usLevel = 1) const; + /** + * Invokes CheckBorderFacets() to get all border facets of \a raclFacetIndices. Then the content + * of \a raclFacetIndices is replaced by all facets that can be deleted. \note The mesh + * structure is not modified by this method. This is in the responsibility of the user. + */ + void CutBorderFacets(std::vector& raclFacetIndices, + unsigned short usLevel = 1) const; + /** Returns the number of border edges */ + unsigned long CountBorderEdges() const; + /** + * Determines all border points as indices of the facets in \a raclFacetIndices. The points are + * unsorted. + */ + void GetBorderPoints(const std::vector& raclFacetIndices, + std::set& raclResultPointsIndices) const; + /** Computes the surface of the mesh. */ + float Surface() const; + /** Subsamples the mesh with point distance \a fDist and stores the points in \a rclPoints. */ + void SubSampleByDist(float fDist, std::vector& rclPoints) const; + /** + * Subsamples the mesh to produce around \a ulCtPoints. \a ulCtPoints should be greater + * than 5 * number of facets. + */ + void SubSampleByCount(unsigned long ulCtPoints, std::vector& rclPoints) const; + /** Returns only the points of the mesh without actually sampling the data. */ + void SubSampleAllPoints(std::vector& rclPoints) const; + /** + * Searches for all facets that intersect the "search tube" with radius \a r around the + * polyline. + */ + void SearchFacetsFromPolyline(const std::vector& rclPolyline, + float fRadius, + const MeshFacetGrid& rclGrid, + std::vector& rclResultFacetsIndices) const; + /** Projects a point directly to the mesh (means nearest facet), the result is the facet index + * and the foraminate point, use second version with grid for more performance. + */ + bool NearestPointFromPoint(const Base::Vector3f& rclPt, + FacetIndex& rclResFacetIndex, + Base::Vector3f& rclResPoint) const; + bool NearestPointFromPoint(const Base::Vector3f& rclPt, + const MeshFacetGrid& rclGrid, + FacetIndex& rclResFacetIndex, + Base::Vector3f& rclResPoint) const; + bool NearestPointFromPoint(const Base::Vector3f& rclPt, + const MeshFacetGrid& rclGrid, + float fMaxSearchArea, + FacetIndex& rclResFacetIndex, + Base::Vector3f& rclResPoint) const; + /** Cuts the mesh with a plane. The result is a list of polylines. */ + bool CutWithPlane(const Base::Vector3f& clBase, + const Base::Vector3f& clNormal, + const MeshFacetGrid& rclGrid, + std::list>& rclResult, + float fMinEps = 1.0e-2f, + bool bConnectPolygons = false) const; + /** + * Gets all facets that cut the plane (N,d) and that lie between the two points left and right. + * The plane is defined by it normalized normal and the signed distance to the origin. + */ + void GetFacetsFromPlane(const MeshFacetGrid& rclGrid, + const Base::Vector3f& clNormal, + float dist, + const Base::Vector3f& rclLeft, + const Base::Vector3f& rclRight, + std::vector& rclRes) const; - /** Returns true if the distance from the \a rclPt to the facet \a ulFacetIdx is less than \a fMaxDistance. - * If this restriction is met \a rfDistance is set to the actual distance, otherwise false is returned. - */ - bool Distance (const Base::Vector3f &rclPt, FacetIndex ulFacetIdx, float fMaxDistance, float &rfDistance) const; - /** - * Calculates the minimum grid length so that not more elements than \a maxElements will be created when the grid gets - * built up. The minimum grid length must be at least \a fLength. - */ - float CalculateMinimumGridLength(float fLength, const Base::BoundBox3f& rBBox, unsigned long maxElements) const; + /** Returns true if the distance from the \a rclPt to the facet \a ulFacetIdx is less than \a + * fMaxDistance. If this restriction is met \a rfDistance is set to the actual distance, + * otherwise false is returned. + */ + bool Distance(const Base::Vector3f& rclPt, + FacetIndex ulFacetIdx, + float fMaxDistance, + float& rfDistance) const; + /** + * Calculates the minimum grid length so that not more elements than \a maxElements will be + * created when the grid gets built up. The minimum grid length must be at least \a fLength. + */ + float CalculateMinimumGridLength(float fLength, + const Base::BoundBox3f& rBBox, + unsigned long maxElements) const; protected: - /** Helper method to connect the intersection points to polylines. */ - bool ConnectLines (std::list > &rclLines, std::list >&rclPolylines, - float fMinEps) const; - bool ConnectPolygons(std::list > &clPolyList, std::list > &rclLines) const; - /** Searches the nearest facet in \a raulFacets to the ray (\a rclPt, \a rclDir). */ - bool RayNearestField (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, const std::vector &raulFacets, - Base::Vector3f &rclRes, FacetIndex &rulFacet, float fMaxAngle = Mathf::PI) const; - /** - * Splits the boundary \a rBound in several loops and append this loops to the list of borders. - */ - void SplitBoundaryLoops(const std::vector& rBound, std::list >& aBorders); - /** - * From the given \a openEdges a boundary is split and added to \a boundary. - */ - void SplitBoundaryFromOpenEdges(std::list >& openEdges, std::list& boundary) const; + /** Helper method to connect the intersection points to polylines. */ + bool ConnectLines(std::list>& rclLines, + std::list>& rclPolylines, + float fMinEps) const; + bool ConnectPolygons(std::list>& clPolyList, + std::list>& rclLines) const; + /** Searches the nearest facet in \a raulFacets to the ray (\a rclPt, \a rclDir). */ + bool RayNearestField(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + const std::vector& raulFacets, + Base::Vector3f& rclRes, + FacetIndex& rulFacet, + float fMaxAngle = Mathf::PI) const; + /** + * Splits the boundary \a rBound in several loops and append this loops to the list of borders. + */ + void SplitBoundaryLoops(const std::vector& rBound, + std::list>& aBorders); + /** + * From the given \a openEdges a boundary is split and added to \a boundary. + */ + void SplitBoundaryFromOpenEdges(std::list>& openEdges, + std::list& boundary) const; protected: - const MeshKernel &_rclMesh; /**< The mesh kernel. */ + const MeshKernel& _rclMesh; /**< The mesh kernel. */ }; class MeshExport MeshCollector @@ -346,10 +427,12 @@ public: virtual void Append(const MeshCore::MeshKernel&, FacetIndex index) = 0; }; -class MeshExport PointCollector : public MeshCollector +class MeshExport PointCollector: public MeshCollector { public: - explicit PointCollector(std::vector& ind) : indices(ind){} + explicit PointCollector(std::vector& ind) + : indices(ind) + {} void Append(const MeshCore::MeshKernel& kernel, FacetIndex index) override { PointIndex ulP1, ulP2, ulP3; @@ -363,10 +446,12 @@ private: std::vector& indices; }; -class MeshExport FacetCollector : public MeshCollector +class MeshExport FacetCollector: public MeshCollector { public: - explicit FacetCollector(std::vector& ind) : indices(ind){} + explicit FacetCollector(std::vector& ind) + : indices(ind) + {} void Append(const MeshCore::MeshKernel&, FacetIndex index) override { indices.push_back(index); @@ -386,30 +471,37 @@ class MeshExport MeshRefPointToFacets { public: /// Construction - explicit MeshRefPointToFacets (const MeshKernel &rclM) : _rclMesh(rclM) - { Rebuild(); } + explicit MeshRefPointToFacets(const MeshKernel& rclM) + : _rclMesh(rclM) + { + Rebuild(); + } /// Rebuilds up data structure - void Rebuild (); - const std::set& operator[] (PointIndex) const; + void Rebuild(); + const std::set& operator[](PointIndex) const; std::vector GetIndices(PointIndex, PointIndex) const; std::vector GetIndices(PointIndex, PointIndex, PointIndex) const; - MeshFacetArray::_TConstIterator GetFacet (FacetIndex) const; - std::set NeighbourPoints(const std::vector& , int level) const; + MeshFacetArray::_TConstIterator GetFacet(FacetIndex) const; + std::set NeighbourPoints(const std::vector&, int level) const; std::set NeighbourPoints(PointIndex) const; - void Neighbours (FacetIndex ulFacetInd, float fMaxDist, MeshCollector& collect) const; + void Neighbours(FacetIndex ulFacetInd, float fMaxDist, MeshCollector& collect) const; Base::Vector3f GetNormal(PointIndex) const; void AddNeighbour(PointIndex, FacetIndex); void RemoveNeighbour(PointIndex, FacetIndex); void RemoveFacet(FacetIndex); protected: - void SearchNeighbours(const MeshFacetArray& rFacets, FacetIndex index, const Base::Vector3f &rclCenter, - float fMaxDist, std::set &visit, MeshCollector& collect) const; + void SearchNeighbours(const MeshFacetArray& rFacets, + FacetIndex index, + const Base::Vector3f& rclCenter, + float fMaxDist, + std::set& visit, + MeshCollector& collect) const; protected: - const MeshKernel &_rclMesh; /**< The mesh kernel. */ - std::vector > _map; + const MeshKernel& _rclMesh; /**< The mesh kernel. */ + std::vector> _map; }; /** @@ -422,20 +514,23 @@ class MeshExport MeshRefFacetToFacets { public: /// Construction - explicit MeshRefFacetToFacets (const MeshKernel &rclM) : _rclMesh(rclM) - { Rebuild(); } + explicit MeshRefFacetToFacets(const MeshKernel& rclM) + : _rclMesh(rclM) + { + Rebuild(); + } /// Rebuilds up data structure - void Rebuild (); + void Rebuild(); /// Returns a set of facets sharing one or more points with the facet with /// index \a ulFacetIndex. - const std::set& operator[] (FacetIndex) const; + const std::set& operator[](FacetIndex) const; /// Returns an array of common facets of the passed facet indexes. std::vector GetIndices(FacetIndex, FacetIndex) const; protected: - const MeshKernel &_rclMesh; /**< The mesh kernel. */ - std::vector > _map; + const MeshKernel& _rclMesh; /**< The mesh kernel. */ + std::vector> _map; }; /** @@ -448,20 +543,23 @@ class MeshExport MeshRefPointToPoints { public: /// Construction - explicit MeshRefPointToPoints (const MeshKernel &rclM) : _rclMesh(rclM) - { Rebuild(); } + explicit MeshRefPointToPoints(const MeshKernel& rclM) + : _rclMesh(rclM) + { + Rebuild(); + } /// Rebuilds up data structure - void Rebuild (); - const std::set& operator[] (PointIndex) const; + void Rebuild(); + const std::set& operator[](PointIndex) const; Base::Vector3f GetNormal(PointIndex) const; float GetAverageEdgeLength(PointIndex) const; void AddNeighbour(PointIndex, PointIndex); void RemoveNeighbour(PointIndex, PointIndex); protected: - const MeshKernel &_rclMesh; /**< The mesh kernel. */ - std::vector > _map; + const MeshKernel& _rclMesh; /**< The mesh kernel. */ + std::vector> _map; }; /** @@ -474,30 +572,38 @@ class MeshExport MeshRefEdgeToFacets { public: /// Construction - explicit MeshRefEdgeToFacets (const MeshKernel &rclM) : _rclMesh(rclM) - { Rebuild(); } + explicit MeshRefEdgeToFacets(const MeshKernel& rclM) + : _rclMesh(rclM) + { + Rebuild(); + } /// Rebuilds up data structure - void Rebuild (); - const std::pair& operator[] (const MeshEdge&) const; + void Rebuild(); + const std::pair& operator[](const MeshEdge&) const; protected: - class EdgeOrder { + class EdgeOrder + { public: - bool operator () (const MeshEdge &e1, const MeshEdge &e2) const + bool operator()(const MeshEdge& e1, const MeshEdge& e2) const { - if (e1.first < e2.first) + if (e1.first < e2.first) { return true; - else if (e1.first > e2.first) + } + else if (e1.first > e2.first) { return false; - else if (e1.second < e2.second) + } + else if (e1.second < e2.second) { return true; - else + } + else { return false; + } } }; using MeshFacetPair = std::pair; - const MeshKernel &_rclMesh; /**< The mesh kernel. */ + const MeshKernel& _rclMesh; /**< The mesh kernel. */ std::map _map; }; @@ -510,21 +616,25 @@ class MeshExport MeshRefNormalToPoints { public: /// Construction - explicit MeshRefNormalToPoints (const MeshKernel &rclM) : _rclMesh(rclM) - { Rebuild(); } + explicit MeshRefNormalToPoints(const MeshKernel& rclM) + : _rclMesh(rclM) + { + Rebuild(); + } /// Rebuilds up data structure - void Rebuild (); - const Base::Vector3f& operator[] (PointIndex) const; - const std::vector& GetValues() const { + void Rebuild(); + const Base::Vector3f& operator[](PointIndex) const; + const std::vector& GetValues() const + { return _norm; } protected: - const MeshKernel &_rclMesh; /**< The mesh kernel. */ + const MeshKernel& _rclMesh; /**< The mesh kernel. */ std::vector _norm; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_ALGORITHM_H diff --git a/src/Mod/Mesh/App/Core/Approximation.cpp b/src/Mod/Mesh/App/Core/Approximation.cpp index e1b73e66e1..ad204d493a 100644 --- a/src/Mod/Mesh/App/Core/Approximation.cpp +++ b/src/Mod/Mesh/App/Core/Approximation.cpp @@ -23,23 +23,23 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include #include -#include #include #include #include +#include -//#define FC_USE_EIGEN -#include +// #define FC_USE_EIGEN #include +#include #ifdef FC_USE_EIGEN -# include +#include #endif #include "Approximation.h" @@ -58,40 +58,40 @@ Approximation::~Approximation() Clear(); } -void Approximation::GetMgcVectorArray(std::vector< Wm4::Vector3 >& rcPts) const +void Approximation::GetMgcVectorArray(std::vector>& rcPts) const { - std::list< Base::Vector3f >::const_iterator It; + std::list::const_iterator It; rcPts.reserve(_vPoints.size()); for (It = _vPoints.begin(); It != _vPoints.end(); ++It) { rcPts.push_back(Base::convertTo(*It)); } } -void Approximation::AddPoint(const Base::Vector3f &rcVector) +void Approximation::AddPoint(const Base::Vector3f& rcVector) { _vPoints.push_back(rcVector); _bIsFitted = false; } -void Approximation::AddPoints(const std::vector &points) +void Approximation::AddPoints(const std::vector& points) { std::copy(points.begin(), points.end(), std::back_inserter(_vPoints)); _bIsFitted = false; } -void Approximation::AddPoints(const std::set &points) +void Approximation::AddPoints(const std::set& points) { std::copy(points.begin(), points.end(), std::back_inserter(_vPoints)); _bIsFitted = false; } -void Approximation::AddPoints(const std::list &points) +void Approximation::AddPoints(const std::list& points) { std::copy(points.begin(), points.end(), std::back_inserter(_vPoints)); _bIsFitted = false; } -void Approximation::AddPoints(const MeshPointArray &points) +void Approximation::AddPoints(const MeshPointArray& points) { std::copy(points.begin(), points.end(), std::back_inserter(_vPoints)); _bIsFitted = false; @@ -101,8 +101,9 @@ Base::Vector3f Approximation::GetGravity() const { Base::Vector3f clGravity; if (!_vPoints.empty()) { - for (const auto& vPoint : _vPoints) + for (const auto& vPoint : _vPoints) { clGravity += vPoint; + } clGravity *= 1.0f / float(_vPoints.size()); } return clGravity; @@ -132,45 +133,53 @@ bool Approximation::Done() const // ------------------------------------------------------------------------------- PlaneFit::PlaneFit() - : _vBase(0,0,0) - , _vDirU(1,0,0) - , _vDirV(0,1,0) - , _vDirW(0,0,1) -{ -} + : _vBase(0, 0, 0) + , _vDirU(1, 0, 0) + , _vDirV(0, 1, 0) + , _vDirW(0, 0, 1) +{} float PlaneFit::Fit() { _bIsFitted = true; - if (CountPoints() < 3) + if (CountPoints() < 3) { return FLOAT_MAX; + } - double sxx,sxy,sxz,syy,syz,szz,mx,my,mz; - sxx=sxy=sxz=syy=syz=szz=mx=my=mz=0.0; + double sxx, sxy, sxz, syy, syz, szz, mx, my, mz; + sxx = sxy = sxz = syy = syz = szz = mx = my = mz = 0.0; - for (const auto & vPoint : _vPoints) { - sxx += double(vPoint.x * vPoint.x); sxy += double(vPoint.x * vPoint.y); - sxz += double(vPoint.x * vPoint.z); syy += double(vPoint.y * vPoint.y); - syz += double(vPoint.y * vPoint.z); szz += double(vPoint.z * vPoint.z); - mx += double(vPoint.x); my += double(vPoint.y); mz += double(vPoint.z); + for (const auto& vPoint : _vPoints) { + sxx += double(vPoint.x * vPoint.x); + sxy += double(vPoint.x * vPoint.y); + sxz += double(vPoint.x * vPoint.z); + syy += double(vPoint.y * vPoint.y); + syz += double(vPoint.y * vPoint.z); + szz += double(vPoint.z * vPoint.z); + mx += double(vPoint.x); + my += double(vPoint.y); + mz += double(vPoint.z); } size_t nSize = _vPoints.size(); - sxx = sxx - mx*mx/(double(nSize)); - sxy = sxy - mx*my/(double(nSize)); - sxz = sxz - mx*mz/(double(nSize)); - syy = syy - my*my/(double(nSize)); - syz = syz - my*mz/(double(nSize)); - szz = szz - mz*mz/(double(nSize)); + sxx = sxx - mx * mx / (double(nSize)); + sxy = sxy - mx * my / (double(nSize)); + sxz = sxz - mx * mz / (double(nSize)); + syy = syy - my * my / (double(nSize)); + syz = syz - my * mz / (double(nSize)); + szz = szz - mz * mz / (double(nSize)); #if defined(FC_USE_EIGEN) Eigen::Matrix3d covMat = Eigen::Matrix3d::Zero(); - covMat(0,0) = sxx; - covMat(1,1) = syy; - covMat(2,2) = szz; - covMat(0,1) = sxy; covMat(1,0) = sxy; - covMat(0,2) = sxz; covMat(2,0) = sxz; - covMat(1,2) = syz; covMat(2,1) = syz; + covMat(0, 0) = sxx; + covMat(1, 1) = syy; + covMat(2, 2) = szz; + covMat(0, 1) = sxy; + covMat(1, 0) = sxy; + covMat(0, 2) = sxz; + covMat(2, 0) = sxz; + covMat(1, 2) = syz; + covMat(2, 1) = syz; Eigen::SelfAdjointEigenSolver eig(covMat); Eigen::Vector3d u = eig.eigenvectors().col(1); @@ -180,12 +189,12 @@ float PlaneFit::Fit() _vDirU.Set(u.x(), u.y(), u.z()); _vDirV.Set(v.x(), v.y(), v.z()); _vDirW.Set(w.x(), w.y(), w.z()); - _vBase.Set(mx/(float)nSize, my/(float)nSize, mz/(float)nSize); + _vBase.Set(mx / (float)nSize, my / (float)nSize, mz / (float)nSize); float sigma = w.dot(covMat * w); #else // Covariance matrix - Wm4::Matrix3 akMat(sxx,sxy,sxz,sxy,syy,syz,sxz,syz,szz); + Wm4::Matrix3 akMat(sxx, sxy, sxz, sxy, syy, syz, sxz, syz, szz); Wm4::Matrix3 rkRot, rkDiag; try { akMat.EigenDecomposition(rkRot, rkDiag); @@ -198,17 +207,19 @@ float PlaneFit::Fit() // rkDiag(0,0) <= rkDiag(1,1) <= rkDiag(2,2) // // points describe a line or even are identical - if (rkDiag(1,1) <= 0) + if (rkDiag(1, 1) <= 0) { return FLOAT_MAX; + } Wm4::Vector3 U = rkRot.GetColumn(1); Wm4::Vector3 V = rkRot.GetColumn(2); Wm4::Vector3 W = rkRot.GetColumn(0); // It may happen that the result have nan values - for (int i=0; i<3; i++) { - if (boost::math::isnan(W[i])) + for (int i = 0; i < 3; i++) { + if (boost::math::isnan(W[i])) { return FLOAT_MAX; + } } // In some cases when the points exactly lie on a plane it can happen that @@ -216,8 +227,7 @@ float PlaneFit::Fit() // In this case create an orthonormal basis bool validUV = true; for (int i = 0; i < 3; i++) { - if (boost::math::isnan(U[i]) || - boost::math::isnan(V[i])) { + if (boost::math::isnan(U[i]) || boost::math::isnan(V[i])) { validUV = false; break; } @@ -230,18 +240,20 @@ float PlaneFit::Fit() _vDirU.Set(float(U.X()), float(U.Y()), float(U.Z())); _vDirV.Set(float(V.X()), float(V.Y()), float(V.Z())); _vDirW.Set(float(W.X()), float(W.Y()), float(W.Z())); - _vBase.Set(float(mx/nSize), float(my/nSize), float(mz/nSize)); + _vBase.Set(float(mx / nSize), float(my / nSize), float(mz / nSize)); float sigma = float(W.Dot(akMat * W)); #endif // In case sigma is nan - if (boost::math::isnan(sigma)) + if (boost::math::isnan(sigma)) { return FLOAT_MAX; + } // This must be caused by some round-off errors. Theoretically it's impossible // that 'sigma' becomes negative because the covariance matrix is positive semi-definite. - if (sigma < 0) + if (sigma < 0) { sigma = 0; + } // make a right-handed system if ((_vDirU % _vDirV) * _vDirW < 0.0f) { @@ -250,10 +262,12 @@ float PlaneFit::Fit() _vDirV = tmp; } - if (nSize > 3) - sigma = sqrt(sigma/(nSize-3)); - else + if (nSize > 3) { + sigma = sqrt(sigma / (nSize - 3)); + } + else { sigma = 0; + } _fLastResult = sigma; return _fLastResult; @@ -261,41 +275,50 @@ float PlaneFit::Fit() Base::Vector3f PlaneFit::GetBase() const { - if (_bIsFitted) + if (_bIsFitted) { return _vBase; - else + } + else { return Base::Vector3f(); + } } Base::Vector3f PlaneFit::GetDirU() const { - if (_bIsFitted) + if (_bIsFitted) { return _vDirU; - else + } + else { return Base::Vector3f(); + } } Base::Vector3f PlaneFit::GetDirV() const { - if (_bIsFitted) + if (_bIsFitted) { return _vDirV; - else + } + else { return Base::Vector3f(); + } } Base::Vector3f PlaneFit::GetNormal() const { - if (_bIsFitted) + if (_bIsFitted) { return _vDirW; - else + } + else { return Base::Vector3f(); + } } -float PlaneFit::GetDistanceToPlane(const Base::Vector3f &rcPoint) const +float PlaneFit::GetDistanceToPlane(const Base::Vector3f& rcPoint) const { float fResult = FLOAT_MAX; - if (_bIsFitted) + if (_bIsFitted) { fResult = (rcPoint - _vBase) * _vDirW; + } return fResult; } @@ -305,19 +328,19 @@ float PlaneFit::GetStdDeviation() const // Variance: VAR=(N/N-1)*[(1/N)*SUM(Xi^2)-M^2] // Standard deviation: SD=SQRT(VAR) // Standard error of the mean: SE=SD/SQRT(N) - if (!_bIsFitted) + if (!_bIsFitted) { return FLOAT_MAX; + } - float fSumXi = 0.0f, fSumXi2 = 0.0f, - fMean = 0.0f, fDist = 0.0f; + float fSumXi = 0.0f, fSumXi2 = 0.0f, fMean = 0.0f, fDist = 0.0f; float ulPtCt = float(CountPoints()); - std::list< Base::Vector3f >::const_iterator cIt; + std::list::const_iterator cIt; for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) { - fDist = GetDistanceToPlane( *cIt ); - fSumXi += fDist; - fSumXi2 += ( fDist * fDist ); + fDist = GetDistanceToPlane(*cIt); + fSumXi += fDist; + fSumXi2 += (fDist * fDist); } fMean = (1.0f / ulPtCt) * fSumXi; @@ -329,19 +352,20 @@ float PlaneFit::GetSignedStdDeviation() const // if the nearest point to the gravity is at the side // of normal direction the value will be // positive otherwise negative - if (!_bIsFitted) + if (!_bIsFitted) { return FLOAT_MAX; + } - float fSumXi = 0.0f, fSumXi2 = 0.0f, - fMean = 0.0f, fDist = 0.0f; + float fSumXi = 0.0f, fSumXi2 = 0.0f, fMean = 0.0f, fDist = 0.0f; float fMinDist = FLOAT_MAX; float fFactor; float ulPtCt = float(CountPoints()); Base::Vector3f clGravity, clPt; std::list::const_iterator cIt; - for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) + for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) { clGravity += *cIt; + } clGravity *= (1.0f / ulPtCt); for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) { @@ -350,27 +374,29 @@ float PlaneFit::GetSignedStdDeviation() const clPt = *cIt; } fDist = GetDistanceToPlane(*cIt); - fSumXi += fDist; + fSumXi += fDist; fSumXi2 += (fDist * fDist); } // which side - if ((clPt-clGravity)*GetNormal() > 0) + if ((clPt - clGravity) * GetNormal() > 0) { fFactor = 1.0f; - else + } + else { fFactor = -1.0f; + } fMean = 1.0f / ulPtCt * fSumXi; return fFactor * sqrt((ulPtCt / (ulPtCt - 3.0f)) * ((1.0f / ulPtCt) * fSumXi2 - fMean * fMean)); } -void PlaneFit::ProjectToPlane () +void PlaneFit::ProjectToPlane() { Base::Vector3f cGravity(GetGravity()); - Base::Vector3f cNormal (GetNormal ()); + Base::Vector3f cNormal(GetNormal()); - for (auto & cPnt : _vPoints) { + for (auto& cPnt : _vPoints) { float fD = (cPnt - cGravity) * cNormal; cPnt = cPnt - fD * cNormal; } @@ -401,13 +427,15 @@ std::vector PlaneFit::GetLocalPoints() const Base::Vector3d bs = Base::convertTo(this->_vBase); Base::Vector3d ex = Base::convertTo(this->_vDirU); Base::Vector3d ey = Base::convertTo(this->_vDirV); - //Base::Vector3d ez = Base::convertTo(this->_vDirW); + // Base::Vector3d ez = Base::convertTo(this->_vDirW); localPoints.insert(localPoints.begin(), _vPoints.begin(), _vPoints.end()); - for (auto & localPoint : localPoints) { + for (auto& localPoint : localPoints) { Base::Vector3d clPoint = Base::convertTo(localPoint); clPoint.TransformToCoordinateSystem(bs, ex, ey); - localPoint.Set(static_cast(clPoint.x), static_cast(clPoint.y), static_cast(clPoint.z)); + localPoint.Set(static_cast(clPoint.x), + static_cast(clPoint.y), + static_cast(clPoint.z)); } } @@ -418,26 +446,32 @@ Base::BoundBox3f PlaneFit::GetBoundings() const { Base::BoundBox3f bbox; std::vector pts = GetLocalPoints(); - for (const auto& it : pts) + for (const auto& it : pts) { bbox.Add(it); + } return bbox; } // ------------------------------------------------------------------------------- -bool QuadraticFit::GetCurvatureInfo(double x, double y, double z, - double &rfCurv0, double &rfCurv1, - Base::Vector3f &rkDir0, Base::Vector3f &rkDir1, double &dDistance) +bool QuadraticFit::GetCurvatureInfo(double x, + double y, + double z, + double& rfCurv0, + double& rfCurv1, + Base::Vector3f& rkDir0, + Base::Vector3f& rkDir1, + double& dDistance) { - assert( _bIsFitted ); + assert(_bIsFitted); bool bResult = false; if (_bIsFitted) { Wm4::Vector3 Dir0, Dir1; - FunctionContainer clFuncCont( _fCoeff ); - bResult = clFuncCont.CurvatureInfo( x, y, z, rfCurv0, rfCurv1, Dir0, Dir1, dDistance ); + FunctionContainer clFuncCont(_fCoeff); + bResult = clFuncCont.CurvatureInfo(x, y, z, rfCurv0, rfCurv1, Dir0, Dir1, dDistance); - dDistance = double(clFuncCont.GetGradient( x, y, z ).Length()); + dDistance = double(clFuncCont.GetGradient(x, y, z).Length()); rkDir0 = Base::convertTo(Dir0); rkDir1 = Base::convertTo(Dir1); } @@ -445,13 +479,13 @@ bool QuadraticFit::GetCurvatureInfo(double x, double y, double z, return bResult; } -bool QuadraticFit::GetCurvatureInfo(double x, double y, double z, double &rfCurv0, double &rfCurv1) +bool QuadraticFit::GetCurvatureInfo(double x, double y, double z, double& rfCurv0, double& rfCurv1) { bool bResult = false; if (_bIsFitted) { - FunctionContainer clFuncCont( _fCoeff ); - bResult = clFuncCont.CurvatureInfo( x, y, z, rfCurv0, rfCurv1 ); + FunctionContainer clFuncCont(_fCoeff); + bResult = clFuncCont.CurvatureInfo(x, y, z, rfCurv0, rfCurv1); } return bResult; @@ -466,10 +500,12 @@ double QuadraticFit::GetCoeff(std::size_t ulIndex) const { assert(ulIndex < 10); - if( _bIsFitted ) - return _fCoeff[ ulIndex ]; - else + if (_bIsFitted) { + return _fCoeff[ulIndex]; + } + else { return double(FLOAT_MAX); + } } float QuadraticFit::Fit() @@ -477,9 +513,9 @@ float QuadraticFit::Fit() float fResult = FLOAT_MAX; if (CountPoints() > 0) { - std::vector< Wm4::Vector3 > cPts; - GetMgcVectorArray( cPts ); - fResult = (float) Wm4::QuadraticFit3( CountPoints(), &(cPts[0]), _fCoeff ); + std::vector> cPts; + GetMgcVectorArray(cPts); + fResult = (float)Wm4::QuadraticFit3(CountPoints(), &(cPts[0]), _fCoeff); _fLastResult = fResult; _bIsFitted = true; @@ -488,13 +524,18 @@ float QuadraticFit::Fit() return fResult; } -void QuadraticFit::CalcEigenValues(double &dLambda1, double &dLambda2, double &dLambda3, - Base::Vector3f &clEV1, Base::Vector3f &clEV2, Base::Vector3f &clEV3) const +void QuadraticFit::CalcEigenValues(double& dLambda1, + double& dLambda2, + double& dLambda3, + Base::Vector3f& clEV1, + Base::Vector3f& clEV2, + Base::Vector3f& clEV3) const { - assert( _bIsFitted ); + assert(_bIsFitted); /* - * F(x,y,z) = a11*x*x + a22*y*y + a33*z*z +2*a12*x*y + 2*a13*x*z + 2*a23*y*z + 2*a10*x + 2*a20*y + 2*a30*z * a00 = 0 + * F(x,y,z) = a11*x*x + a22*y*y + a33*z*z +2*a12*x*y + 2*a13*x*z + 2*a23*y*z + 2*a10*x + 2*a20*y + * + 2*a30*z * a00 = 0 * * Form matrix: * @@ -514,12 +555,18 @@ void QuadraticFit::CalcEigenValues(double &dLambda1, double &dLambda2, double &d * */ - Wm4::Matrix3 akMat(_fCoeff[4], _fCoeff[7]/2.0, _fCoeff[8]/2.0, - _fCoeff[7]/2.0, _fCoeff[5], _fCoeff[9]/2.0, - _fCoeff[8]/2.0, _fCoeff[9]/2.0, _fCoeff[6] ); + Wm4::Matrix3 akMat(_fCoeff[4], + _fCoeff[7] / 2.0, + _fCoeff[8] / 2.0, + _fCoeff[7] / 2.0, + _fCoeff[5], + _fCoeff[9] / 2.0, + _fCoeff[8] / 2.0, + _fCoeff[9] / 2.0, + _fCoeff[6]); Wm4::Matrix3 rkRot, rkDiag; - akMat.EigenDecomposition( rkRot, rkDiag ); + akMat.EigenDecomposition(rkRot, rkDiag); Wm4::Vector3 vEigenU = rkRot.GetColumn(0); Wm4::Vector3 vEigenV = rkRot.GetColumn(1); @@ -534,16 +581,18 @@ void QuadraticFit::CalcEigenValues(double &dLambda1, double &dLambda2, double &d dLambda3 = rkDiag[2][2]; } -void QuadraticFit::CalcZValues( double x, double y, double &dZ1, double &dZ2 ) const +void QuadraticFit::CalcZValues(double x, double y, double& dZ1, double& dZ2) const { - assert( _bIsFitted ); + assert(_bIsFitted); - double dDisk = _fCoeff[3]*_fCoeff[3]+2*_fCoeff[3]*_fCoeff[8]*x+2*_fCoeff[3]*_fCoeff[9]*y+ - _fCoeff[8]*_fCoeff[8]*x*x+2*_fCoeff[8]*x*_fCoeff[9]*y+_fCoeff[9]*_fCoeff[9]*y*y- - 4*_fCoeff[6]*_fCoeff[0]-4*_fCoeff[6]*_fCoeff[1]*x-4*_fCoeff[6]*_fCoeff[2]*y- - 4*_fCoeff[6]*_fCoeff[7]*x*y-4*_fCoeff[6]*_fCoeff[4]*x*x-4*_fCoeff[6]*_fCoeff[5]*y*y; + double dDisk = _fCoeff[3] * _fCoeff[3] + 2 * _fCoeff[3] * _fCoeff[8] * x + + 2 * _fCoeff[3] * _fCoeff[9] * y + _fCoeff[8] * _fCoeff[8] * x * x + + 2 * _fCoeff[8] * x * _fCoeff[9] * y + _fCoeff[9] * _fCoeff[9] * y * y + - 4 * _fCoeff[6] * _fCoeff[0] - 4 * _fCoeff[6] * _fCoeff[1] * x + - 4 * _fCoeff[6] * _fCoeff[2] * y - 4 * _fCoeff[6] * _fCoeff[7] * x * y + - 4 * _fCoeff[6] * _fCoeff[4] * x * x - 4 * _fCoeff[6] * _fCoeff[5] * y * y; - if (fabs( _fCoeff[6] ) < 0.000005) { + if (fabs(_fCoeff[6]) < 0.000005) { dZ1 = double(FLOAT_MAX); dZ2 = double(FLOAT_MAX); return; @@ -554,19 +603,19 @@ void QuadraticFit::CalcZValues( double x, double y, double &dZ1, double &dZ2 ) c dZ2 = double(FLOAT_MAX); return; } - else - dDisk = sqrt( dDisk ); + else { + dDisk = sqrt(dDisk); + } - dZ1 = 0.5 * ( ( -_fCoeff[3] - _fCoeff[8]*x - _fCoeff[9]*y + dDisk ) / _fCoeff[6] ); - dZ2 = 0.5 * ( ( -_fCoeff[3] - _fCoeff[8]*x - _fCoeff[9]*y - dDisk ) / _fCoeff[6] ); + dZ1 = 0.5 * ((-_fCoeff[3] - _fCoeff[8] * x - _fCoeff[9] * y + dDisk) / _fCoeff[6]); + dZ2 = 0.5 * ((-_fCoeff[3] - _fCoeff[8] * x - _fCoeff[9] * y - dDisk) / _fCoeff[6]); } // ------------------------------------------------------------------------------- SurfaceFit::SurfaceFit() - : _fCoeff{} -{ -} + : _fCoeff {} +{} float SurfaceFit::Fit() { @@ -582,17 +631,23 @@ float SurfaceFit::Fit() return fResult; } -bool SurfaceFit::GetCurvatureInfo(double x, double y, double z, double &rfCurv0, double &rfCurv1, - Base::Vector3f &rkDir0, Base::Vector3f &rkDir1, double &dDistance ) +bool SurfaceFit::GetCurvatureInfo(double x, + double y, + double z, + double& rfCurv0, + double& rfCurv1, + Base::Vector3f& rkDir0, + Base::Vector3f& rkDir1, + double& dDistance) { bool bResult = false; if (_bIsFitted) { Wm4::Vector3 Dir0, Dir1; - FunctionContainer clFuncCont( _fCoeff ); - bResult = clFuncCont.CurvatureInfo( x, y, z, rfCurv0, rfCurv1, Dir0, Dir1, dDistance ); + FunctionContainer clFuncCont(_fCoeff); + bResult = clFuncCont.CurvatureInfo(x, y, z, rfCurv0, rfCurv1, Dir0, Dir1, dDistance); - dDistance = double(clFuncCont.GetGradient( x, y, z ).Length()); + dDistance = double(clFuncCont.GetGradient(x, y, z).Length()); rkDir0 = Base::convertTo(Dir0); rkDir1 = Base::convertTo(Dir1); } @@ -600,14 +655,14 @@ bool SurfaceFit::GetCurvatureInfo(double x, double y, double z, double &rfCurv0, return bResult; } -bool SurfaceFit::GetCurvatureInfo(double x, double y, double z, double &rfCurv0, double &rfCurv1) +bool SurfaceFit::GetCurvatureInfo(double x, double y, double z, double& rfCurv0, double& rfCurv1) { - assert( _bIsFitted ); + assert(_bIsFitted); bool bResult = false; if (_bIsFitted) { - FunctionContainer clFuncCont( _fCoeff ); - bResult = clFuncCont.CurvatureInfo( x, y, z, rfCurv0, rfCurv1 ); + FunctionContainer clFuncCont(_fCoeff); + bResult = clFuncCont.CurvatureInfo(x, y, z, rfCurv0, rfCurv1); } return bResult; @@ -615,13 +670,14 @@ bool SurfaceFit::GetCurvatureInfo(double x, double y, double z, double &rfCurv0, double SurfaceFit::PolynomFit() { - if (PlaneFit::Fit() >= FLOAT_MAX) + if (PlaneFit::Fit() >= FLOAT_MAX) { return double(FLOAT_MAX); + } Base::Vector3d bs = Base::convertTo(this->_vBase); Base::Vector3d ex = Base::convertTo(this->_vDirU); Base::Vector3d ey = Base::convertTo(this->_vDirV); - //Base::Vector3d ez = Base::convertTo(this->_vDirW); + // Base::Vector3d ez = Base::convertTo(this->_vDirW); // A*x = b // See also www.cs.jhu.edu/~misha/Fall05/10.23.05.pdf @@ -639,15 +695,16 @@ double SurfaceFit::PolynomFit() // <=> sum[(P*Vi)*Vi] = sum[Vi*zi] // <=> sum[(Vi*Vi^t)*P] = sum[Vi*zi] where (Vi*Vi^t) is a symmetric matrix // <=> sum[(Vi*Vi^t)]*P = sum[Vi*zi] - Eigen::Matrix A = Eigen::Matrix::Zero(); - Eigen::Matrix b = Eigen::Matrix::Zero(); - Eigen::Matrix x = Eigen::Matrix::Zero(); + Eigen::Matrix A = Eigen::Matrix::Zero(); + Eigen::Matrix b = Eigen::Matrix::Zero(); + Eigen::Matrix x = Eigen::Matrix::Zero(); std::vector transform; transform.reserve(_vPoints.size()); double dW2 = 0; - for (std::list::const_iterator it = _vPoints.begin(); it != _vPoints.end(); ++it) { + for (std::list::const_iterator it = _vPoints.begin(); it != _vPoints.end(); + ++it) { Base::Vector3d clPoint = Base::convertTo(*it); clPoint.TransformToCoordinateSystem(bs, ex, ey); transform.push_back(clPoint); @@ -655,69 +712,69 @@ double SurfaceFit::PolynomFit() double dV = clPoint.y; double dW = clPoint.z; - double dU2 = dU*dU; - double dV2 = dV*dV; - double dUV = dU*dV; + double dU2 = dU * dU; + double dV2 = dV * dV; + double dUV = dU * dV; - dW2 += dW*dW; + dW2 += dW * dW; - A(0,0) = A(0,0) + dU2*dU2; - A(0,1) = A(0,1) + dU2*dV2; - A(0,2) = A(0,2) + dU2*dUV; - A(0,3) = A(0,3) + dU2*dU ; - A(0,4) = A(0,4) + dU2*dV ; - A(0,5) = A(0,5) + dU2 ; - b(0) = b(0) + dU2*dW ; + A(0, 0) = A(0, 0) + dU2 * dU2; + A(0, 1) = A(0, 1) + dU2 * dV2; + A(0, 2) = A(0, 2) + dU2 * dUV; + A(0, 3) = A(0, 3) + dU2 * dU; + A(0, 4) = A(0, 4) + dU2 * dV; + A(0, 5) = A(0, 5) + dU2; + b(0) = b(0) + dU2 * dW; - A(1,1) = A(1,1) + dV2*dV2; - A(1,2) = A(1,2) + dV2*dUV; - A(1,3) = A(1,3) + dV2*dU ; - A(1,4) = A(1,4) + dV2*dV ; - A(1,5) = A(1,5) + dV2 ; - b(1) = b(1) + dV2*dW ; + A(1, 1) = A(1, 1) + dV2 * dV2; + A(1, 2) = A(1, 2) + dV2 * dUV; + A(1, 3) = A(1, 3) + dV2 * dU; + A(1, 4) = A(1, 4) + dV2 * dV; + A(1, 5) = A(1, 5) + dV2; + b(1) = b(1) + dV2 * dW; - A(2,2) = A(2,2) + dUV*dUV; - A(2,3) = A(2,3) + dUV*dU ; - A(2,4) = A(2,4) + dUV*dV ; - A(2,5) = A(2,5) + dUV ; - b(3) = b(3) + dUV*dW ; + A(2, 2) = A(2, 2) + dUV * dUV; + A(2, 3) = A(2, 3) + dUV * dU; + A(2, 4) = A(2, 4) + dUV * dV; + A(2, 5) = A(2, 5) + dUV; + b(3) = b(3) + dUV * dW; - A(3,3) = A(3,3) + dU *dU ; - A(3,4) = A(3,4) + dU *dV ; - A(3,5) = A(3,5) + dU ; - b(3) = b(3) + dU *dW ; + A(3, 3) = A(3, 3) + dU * dU; + A(3, 4) = A(3, 4) + dU * dV; + A(3, 5) = A(3, 5) + dU; + b(3) = b(3) + dU * dW; - A(4,4) = A(4,4) + dV *dV ; - A(4,5) = A(4,5) + dV ; - b(5) = b(5) + dV *dW ; + A(4, 4) = A(4, 4) + dV * dV; + A(4, 5) = A(4, 5) + dV; + b(5) = b(5) + dV * dW; - A(5,5) = A(5,5) + 1 ; - b(5) = b(5) + 1 *dW ; + A(5, 5) = A(5, 5) + 1; + b(5) = b(5) + 1 * dW; } // Mat is symmetric // - A(1,0) = A(0,1); - A(2,0) = A(0,2); - A(3,0) = A(0,3); - A(4,0) = A(0,4); - A(5,0) = A(0,5); + A(1, 0) = A(0, 1); + A(2, 0) = A(0, 2); + A(3, 0) = A(0, 3); + A(4, 0) = A(0, 4); + A(5, 0) = A(0, 5); - A(2,1) = A(1,2); - A(3,1) = A(1,3); - A(4,1) = A(1,4); - A(5,1) = A(1,5); + A(2, 1) = A(1, 2); + A(3, 1) = A(1, 3); + A(4, 1) = A(1, 4); + A(5, 1) = A(1, 5); - A(3,2) = A(2,3); - A(4,2) = A(2,4); - A(5,2) = A(2,5); + A(3, 2) = A(2, 3); + A(4, 2) = A(2, 4); + A(5, 2) = A(2, 5); - A(4,3) = A(3,4); - A(5,3) = A(3,5); + A(4, 3) = A(3, 4); + A(5, 3) = A(3, 5); - A(5,4) = A(4,5); + A(5, 4) = A(4, 5); - Eigen::HouseholderQR< Eigen::Matrix > qr(A); + Eigen::HouseholderQR> qr(A); x = qr.solve(b); // FunctionContainer gets an implicit function F(x,y,z) = 0 of this form @@ -748,28 +805,30 @@ double SurfaceFit::PolynomFit() _fCoeff[3] = -1.0; _fCoeff[4] = x(0); _fCoeff[5] = x(1); - _fCoeff[6] = 0.0; + _fCoeff[6] = 0.0; _fCoeff[7] = x(2); - _fCoeff[8] = 0.0; - _fCoeff[9] = 0.0; + _fCoeff[8] = 0.0; + _fCoeff[9] = 0.0; // Get S(P) = sum[(P*Vi)^2 - 2*(P*Vi)*zi + zi^2] double sigma = 0; FunctionContainer clFuncCont(_fCoeff); - for (const auto & it : transform) { + for (const auto& it : transform) { double u = it.x; double v = it.y; double z = clFuncCont.F(u, v, 0.0); - sigma += z*z; + sigma += z * z; } sigma += dW2 - 2 * x.dot(b); // This must be caused by some round-off errors. Theoretically it's impossible // that 'sigma' becomes negative. - if (sigma < 0) + if (sigma < 0) { sigma = 0; - if (!_vPoints.empty()) - sigma = sqrt(sigma/_vPoints.size()); + } + if (!_vPoints.empty()) { + sigma = sqrt(sigma / _vPoints.size()); + } _fLastResult = static_cast(sigma); return double(_fLastResult); @@ -786,7 +845,8 @@ double SurfaceFit::Value(double x, double y) const return z; } -void SurfaceFit::GetCoefficients(double& a,double& b,double& c,double& d,double& e,double& f) const +void SurfaceFit::GetCoefficients(double& a, double& b, double& c, double& d, double& e, double& f) + const { a = _fCoeff[4]; b = _fCoeff[5]; @@ -862,7 +922,8 @@ void SurfaceFit::Transform(std::vector& pts) const * f(x,y) = a*x*x + b*y*y + c*x*y + d*y + e*f + f * by getting the 3x3 control points. */ -std::vector SurfaceFit::toBezier(double umin, double umax, double vmin, double vmax) const +std::vector +SurfaceFit::toBezier(double umin, double umax, double vmin, double vmax) const { std::vector pts; pts.reserve(9); @@ -921,27 +982,28 @@ std::vector SurfaceFit::toBezier(double umin, double umax, doubl // ------------------------------------------------------------------------------- -namespace MeshCore { +namespace MeshCore +{ struct LMCylinderFunctor { Eigen::MatrixXd measuredValues; // Compute 'm' errors, one for each data point, for the given parameter values in 'x' - int operator()(const Eigen::VectorXd &xvec, Eigen::VectorXd &fvec) const + int operator()(const Eigen::VectorXd& xvec, Eigen::VectorXd& fvec) const { // 'xvec' has dimensions n x 1 // It contains the current estimates for the parameters. // 'fvec' has dimensions m x 1 // It will contain the error for each data point. - double aParam = xvec(0); // dir_x - double bParam = xvec(1); // dir_y - double cParam = xvec(2); // dir_z - double dParam = xvec(3); // cnt_x - double eParam = xvec(4); // cnt_y - double fParam = xvec(5); // cnt_z - double gParam = xvec(6); // radius + double aParam = xvec(0); // dir_x + double bParam = xvec(1); // dir_y + double cParam = xvec(2); // dir_z + double dParam = xvec(3); // cnt_x + double eParam = xvec(4); // cnt_y + double fParam = xvec(5); // cnt_z + double gParam = xvec(6); // radius // use distance functions (fvec(i)) for cylinders as defined in the paper: // Least-Squares Fitting Algorithms of the NIST Algorithm Testing System @@ -950,9 +1012,9 @@ struct LMCylinderFunctor double yValue = measuredValues(i, 1); double zValue = measuredValues(i, 2); - double a = aParam/(sqrt(aParam*aParam + bParam*bParam + cParam*cParam)); - double b = bParam/(sqrt(aParam*aParam + bParam*bParam + cParam*cParam)); - double c = cParam/(sqrt(aParam*aParam + bParam*bParam + cParam*cParam)); + double a = aParam / (sqrt(aParam * aParam + bParam * bParam + cParam * cParam)); + double b = bParam / (sqrt(aParam * aParam + bParam * bParam + cParam * cParam)); + double c = cParam / (sqrt(aParam * aParam + bParam * bParam + cParam * cParam)); double x = dParam; double y = eParam; double z = fParam; @@ -960,13 +1022,13 @@ struct LMCylinderFunctor double v = a * (zValue - z) - c * (xValue - x); double w = b * (xValue - x) - a * (yValue - y); - fvec(i) = sqrt(u*u + v*v + w*w) - gParam; + fvec(i) = sqrt(u * u + v * v + w * w) - gParam; } return 0; } // Compute the jacobian of the errors - int df(const Eigen::VectorXd &x, Eigen::MatrixXd &fjac) const + int df(const Eigen::VectorXd& x, Eigen::MatrixXd& fjac) const { // 'x' has dimensions n x 1 // It contains the current estimates for the parameters. @@ -1002,22 +1064,27 @@ struct LMCylinderFunctor int m; // Returns 'm', the number of values. - int values() const { return m; } + int values() const + { + return m; + } // The number of parameters, i.e. inputs. int n; // Returns 'n', the number of inputs. - int inputs() const { return n; } + int inputs() const + { + return n; + } }; -} +} // namespace MeshCore CylinderFit::CylinderFit() - : _vBase(0,0,0) - , _vAxis(0,0,1) -{ -} + : _vBase(0, 0, 0) + , _vAxis(0, 0, 1) +{} Base::Vector3f CylinderFit::GetInitialAxisFromNormals(const std::vector& n) const { @@ -1055,22 +1122,28 @@ Base::Vector3f CylinderFit::GetInitialAxisFromNormals(const std::vector eig(covMat); Eigen::Vector3d w = eig.eigenvectors().col(0); @@ -1088,16 +1161,20 @@ void CylinderFit::SetInitialValues(const Base::Vector3f& b, const Base::Vector3f float CylinderFit::Fit() { - if (CountPoints() < 7) + if (CountPoints() < 7) { return FLOAT_MAX; + } _bIsFitted = true; #if 1 // Do the cylinder fit MeshCoreFit::CylinderFit cylFit; cylFit.AddPoints(_vPoints); - if (_initialGuess) - cylFit.SetApproximations(_fRadius, Base::Vector3d(_vBase.x, _vBase.y, _vBase.z), Base::Vector3d(_vAxis.x, _vAxis.y, _vAxis.z)); + if (_initialGuess) { + cylFit.SetApproximations(_fRadius, + Base::Vector3d(_vBase.x, _vBase.y, _vBase.z), + Base::Vector3d(_vAxis.x, _vAxis.y, _vAxis.z)); + } float result = cylFit.Fit(); if (result < FLOAT_MAX) { @@ -1105,8 +1182,18 @@ float CylinderFit::Fit() Base::Vector3d dir = cylFit.GetAxis(); #if defined(FC_DEBUG) - Base::Console().Log("MeshCoreFit::Cylinder Fit: Base: (%0.4f, %0.4f, %0.4f), Axis: (%0.6f, %0.6f, %0.6f), Radius: %0.4f, Std Dev: %0.4f, Iterations: %d\n", - base.x, base.y, base.z, dir.x, dir.y, dir.z, cylFit.GetRadius(), cylFit.GetStdDeviation(), cylFit.GetNumIterations()); + Base::Console().Log( + "MeshCoreFit::Cylinder Fit: Base: (%0.4f, %0.4f, %0.4f), Axis: (%0.6f, %0.6f, " + "%0.6f), Radius: %0.4f, Std Dev: %0.4f, Iterations: %d\n", + base.x, + base.y, + base.z, + dir.x, + dir.y, + dir.z, + cylFit.GetRadius(), + cylFit.GetStdDeviation(), + cylFit.GetNumIterations()); #endif _vBase = Base::convertTo(base); _vAxis = Base::convertTo(dir); @@ -1127,13 +1214,13 @@ float CylinderFit::Fit() } Eigen::VectorXd x(n); - x(0) = 1.0; // initial value for dir_x - x(1) = 1.0; // initial value for dir_y - x(2) = 1.0; // initial value for dir_z - x(3) = 0.0; // initial value for cnt_x - x(4) = 0.0; // initial value for cnt_y - x(5) = 0.0; // initial value for cnt_z - x(6) = 0.0; // initial value for radius + x(0) = 1.0; // initial value for dir_x + x(1) = 1.0; // initial value for dir_y + x(2) = 1.0; // initial value for dir_z + x(3) = 0.0; // initial value for cnt_x + x(4) = 0.0; // initial value for cnt_y + x(5) = 0.0; // initial value for cnt_z + x(6) = 0.0; // initial value for radius // // Run the LM optimization @@ -1147,7 +1234,10 @@ float CylinderFit::Fit() Eigen::LevenbergMarquardt lm(functor); int status = lm.minimize(x); - Base::Console().Log("Cylinder fit: %d, iterations: %d, gradient norm: %f\n", status, lm.iter, lm.gnorm); + Base::Console().Log("Cylinder fit: %d, iterations: %d, gradient norm: %f\n", + status, + lm.iter, + lm.gnorm); _vAxis.x = x(0); _vAxis.y = x(1); @@ -1173,25 +1263,30 @@ float CylinderFit::GetRadius() const Base::Vector3f CylinderFit::GetBase() const { - if (_bIsFitted) + if (_bIsFitted) { return _vBase; - else + } + else { return Base::Vector3f(); + } } Base::Vector3f CylinderFit::GetAxis() const { - if (_bIsFitted) + if (_bIsFitted) { return _vAxis; - else + } + else { return Base::Vector3f(); + } } -float CylinderFit::GetDistanceToCylinder(const Base::Vector3f &rcPoint) const +float CylinderFit::GetDistanceToCylinder(const Base::Vector3f& rcPoint) const { float fResult = FLOAT_MAX; - if (_bIsFitted) + if (_bIsFitted) { fResult = rcPoint.DistanceToLine(_vBase, _vAxis) - _fRadius; + } return fResult; } @@ -1201,19 +1296,19 @@ float CylinderFit::GetStdDeviation() const // Variance: VAR=(N/N-1)*[(1/N)*SUM(Xi^2)-M^2] // Standard deviation: SD=SQRT(VAR) // Standard error of the mean: SE=SD/SQRT(N) - if (!_bIsFitted) + if (!_bIsFitted) { return FLOAT_MAX; + } - float fSumXi = 0.0f, fSumXi2 = 0.0f, - fMean = 0.0f, fDist = 0.0f; + float fSumXi = 0.0f, fSumXi2 = 0.0f, fMean = 0.0f, fDist = 0.0f; float ulPtCt = float(CountPoints()); - std::list< Base::Vector3f >::const_iterator cIt; + std::list::const_iterator cIt; for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) { - fDist = GetDistanceToCylinder( *cIt ); - fSumXi += fDist; - fSumXi2 += ( fDist * fDist ); + fDist = GetDistanceToCylinder(*cIt); + fSumXi += fDist; + fSumXi2 += (fDist * fDist); } fMean = (1.0f / ulPtCt) * fSumXi; @@ -1248,7 +1343,7 @@ void CylinderFit::ProjectToCylinder() Base::Vector3f cBase(GetBase()); Base::Vector3f cAxis(GetAxis()); - for (auto & cPnt : _vPoints) { + for (auto& cPnt : _vPoints) { if (cPnt.DistanceToLine(cBase, cAxis) > 0) { Base::Vector3f proj; cBase.ProjectToPlane(cPnt, cAxis, proj); @@ -1264,9 +1359,8 @@ void CylinderFit::ProjectToCylinder() float x = (float(rand()) / float(RAND_MAX)); float y = (float(rand()) / float(RAND_MAX)); float z = (float(rand()) / float(RAND_MAX)); - cMov.Move(x,y,z); - } - while (cMov.DistanceToLine(cBase, cAxis) == 0); + cMov.Move(x, y, z); + } while (cMov.DistanceToLine(cBase, cAxis) == 0); Base::Vector3f proj; cMov.ProjectToPlane(cPnt, cAxis, proj); @@ -1280,35 +1374,43 @@ void CylinderFit::ProjectToCylinder() // ----------------------------------------------------------------------------- SphereFit::SphereFit() - : _vCenter(0,0,0) -{ -} + : _vCenter(0, 0, 0) +{} float SphereFit::GetRadius() const { - if (_bIsFitted) + if (_bIsFitted) { return _fRadius; - else + } + else { return FLOAT_MAX; + } } Base::Vector3f SphereFit::GetCenter() const { - if (_bIsFitted) + if (_bIsFitted) { return _vCenter; - else + } + else { return Base::Vector3f(); + } } float SphereFit::Fit() { _bIsFitted = true; - if (CountPoints() < 4) + if (CountPoints() < 4) { return FLOAT_MAX; + } std::vector input; - std::transform(_vPoints.begin(), _vPoints.end(), std::back_inserter(input), - [](const Base::Vector3f& v) { return Wm4::Vector3d(v.x, v.y, v.z); }); + std::transform(_vPoints.begin(), + _vPoints.end(), + std::back_inserter(input), + [](const Base::Vector3f& v) { + return Wm4::Vector3d(v.x, v.y, v.z); + }); Wm4::Sphere3d sphere; Wm4::SphereFit3(input.size(), input.data(), 10, sphere, false); @@ -1319,8 +1421,13 @@ float SphereFit::Fit() _fLastResult = 0; #if defined(_DEBUG) - Base::Console().Message(" WildMagic Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: %0.4f, Std Dev: %0.4f\n", - _vCenter.x, _vCenter.y, _vCenter.z, _fRadius, GetStdDeviation()); + Base::Console().Message(" WildMagic Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: " + "%0.4f, Std Dev: %0.4f\n", + _vCenter.x, + _vCenter.y, + _vCenter.z, + _fRadius, + GetStdDeviation()); #endif MeshCoreFit::SphereFit sphereFit; @@ -1330,8 +1437,14 @@ float SphereFit::Fit() if (result < FLOAT_MAX) { Base::Vector3d center = sphereFit.GetCenter(); #if defined(_DEBUG) - Base::Console().Message("MeshCoreFit::Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: %0.4f, Std Dev: %0.4f, Iterations: %d\n", - center.x, center.y, center.z, sphereFit.GetRadius(), sphereFit.GetStdDeviation(), sphereFit.GetNumIterations()); + Base::Console().Message("MeshCoreFit::Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: " + "%0.4f, Std Dev: %0.4f, Iterations: %d\n", + center.x, + center.y, + center.z, + sphereFit.GetRadius(), + sphereFit.GetStdDeviation(), + sphereFit.GetNumIterations()); #endif _vCenter = Base::convertTo(center); _fRadius = (float)sphereFit.GetRadius(); @@ -1356,19 +1469,19 @@ float SphereFit::GetStdDeviation() const // Variance: VAR=(N/N-1)*[(1/N)*SUM(Xi^2)-M^2] // Standard deviation: SD=SQRT(VAR) // Standard error of the mean: SE=SD/SQRT(N) - if (!_bIsFitted) + if (!_bIsFitted) { return FLOAT_MAX; + } - float fSumXi = 0.0f, fSumXi2 = 0.0f, - fMean = 0.0f, fDist = 0.0f; + float fSumXi = 0.0f, fSumXi2 = 0.0f, fMean = 0.0f, fDist = 0.0f; float ulPtCt = float(CountPoints()); - std::list< Base::Vector3f >::const_iterator cIt; + std::list::const_iterator cIt; for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) { - fDist = GetDistanceToSphere( *cIt ); - fSumXi += fDist; - fSumXi2 += ( fDist * fDist ); + fDist = GetDistanceToSphere(*cIt); + fSumXi += fDist; + fSumXi2 += (fDist * fDist); } fMean = (1.0f / ulPtCt) * fSumXi; @@ -1377,22 +1490,20 @@ float SphereFit::GetStdDeviation() const void SphereFit::ProjectToSphere() { - for (auto & cPnt : _vPoints) { + for (auto& cPnt : _vPoints) { // Compute unit vector from sphere centre to point. // Because this vector is orthogonal to the sphere's surface at the // intersection point we can easily compute the projection point on the // closest surface point using the radius of the sphere Base::Vector3f diff = cPnt - _vCenter; double length = diff.Length(); - if (length == 0.0) - { - // Point is exactly at the sphere center, so it can be projected in any direction onto the sphere! - // So here just project in +Z direction + if (length == 0.0) { + // Point is exactly at the sphere center, so it can be projected in any direction onto + // the sphere! So here just project in +Z direction cPnt.z += _fRadius; } - else - { - diff /= length; // normalizing the vector + else { + diff /= length; // normalizing the vector cPnt = _vCenter + diff * _fRadius; } } @@ -1401,9 +1512,8 @@ void SphereFit::ProjectToSphere() // ------------------------------------------------------------------------------- PolynomialFit::PolynomialFit() - : _fCoeff{} -{ -} + : _fCoeff {} +{} float PolynomialFit::Fit() { @@ -1411,7 +1521,8 @@ float PolynomialFit::Fit() x.reserve(_vPoints.size()); y.reserve(_vPoints.size()); z.reserve(_vPoints.size()); - for (std::list::const_iterator it = _vPoints.begin(); it != _vPoints.end(); ++it) { + for (std::list::const_iterator it = _vPoints.begin(); it != _vPoints.end(); + ++it) { x.push_back(it->x); y.push_back(it->y); z.push_back(it->z); @@ -1419,8 +1530,9 @@ float PolynomialFit::Fit() try { float* coeff = Wm4::PolyFit3(_vPoints.size(), &(x[0]), &(y[0]), &(z[0]), 2, 2); - for (int i=0; i<9; i++) + for (int i = 0; i < 9; i++) { _fCoeff[i] = coeff[i]; + } } catch (const std::exception&) { return FLOAT_MAX; @@ -1431,15 +1543,8 @@ float PolynomialFit::Fit() float PolynomialFit::Value(float x, float y) const { - float fValue = - _fCoeff[0] + - _fCoeff[1] * x + - _fCoeff[2] * x * x + - _fCoeff[3] * y + - _fCoeff[4] * x * y + - _fCoeff[5] * x * x * y + - _fCoeff[6] * y * y + - _fCoeff[7] * x * y * y + - _fCoeff[8] * x * x * y * y; + float fValue = _fCoeff[0] + _fCoeff[1] * x + _fCoeff[2] * x * x + _fCoeff[3] * y + + _fCoeff[4] * x * y + _fCoeff[5] * x * x * y + _fCoeff[6] * y * y + _fCoeff[7] * x * y * y + + _fCoeff[8] * x * x * y * y; return fValue; } diff --git a/src/Mod/Mesh/App/Core/Approximation.h b/src/Mod/Mesh/App/Core/Approximation.h index a7e3ac60e3..3f15fe2fd1 100644 --- a/src/Mod/Mesh/App/Core/Approximation.h +++ b/src/Mod/Mesh/App/Core/Approximation.h @@ -25,7 +25,7 @@ #include #ifndef MESH_GLOBAL_H -# include +#include #endif #include #include @@ -43,56 +43,77 @@ namespace Wm4 /** * An implicit surface is defined by F(x,y,z) = 0. * This polynomial surface is actually defined as z = f(x,y) = ax^2 + by^2 + cx + dy + exy + g. - * To use Wm3 routines for implicit surfaces we can write the surface also as F(x,y,z) = f(x,y) - z = 0. + * To use Wm3 routines for implicit surfaces we can write the surface also as F(x,y,z) = f(x,y) - z + * = 0. * @author Werner Mayer */ -template -class PolynomialSurface : public ImplicitSurface +template +class PolynomialSurface: public ImplicitSurface { public: - explicit PolynomialSurface (const Real afCoeff[6]) - { for (int i=0; i<6; i++) m_afCoeff[i] = afCoeff[i]; } + explicit PolynomialSurface(const Real afCoeff[6]) + { + for (int i = 0; i < 6; i++) { + m_afCoeff[i] = afCoeff[i]; + } + } - // the function - Real F (const Vector3& rkP) const override - { - return ( m_afCoeff[0]*rkP.X()*rkP.X() + - m_afCoeff[1]*rkP.Y()*rkP.Y() + - m_afCoeff[2]*rkP.X() + - m_afCoeff[3]*rkP.Y() + - m_afCoeff[4]*rkP.X()*rkP.Y() + - m_afCoeff[5]-rkP.Z()) ; - } + // the function + Real F(const Vector3& rkP) const override + { + return (m_afCoeff[0] * rkP.X() * rkP.X() + m_afCoeff[1] * rkP.Y() * rkP.Y() + + m_afCoeff[2] * rkP.X() + m_afCoeff[3] * rkP.Y() + m_afCoeff[4] * rkP.X() * rkP.Y() + + m_afCoeff[5] - rkP.Z()); + } - // first-order partial derivatives - Real FX (const Vector3& rkP) const override - { return (Real)(2.0*m_afCoeff[0]*rkP.X() + m_afCoeff[2] + m_afCoeff[4]*rkP.Y()); } - Real FY (const Vector3& rkP) const override - { return (Real)(2.0*m_afCoeff[1]*rkP.Y() + m_afCoeff[3] + m_afCoeff[4]*rkP.X()); } - Real FZ (const Vector3& /*rkP*/) const override - { return (Real)-1.0; } + // first-order partial derivatives + Real FX(const Vector3& rkP) const override + { + return (Real)(2.0 * m_afCoeff[0] * rkP.X() + m_afCoeff[2] + m_afCoeff[4] * rkP.Y()); + } + Real FY(const Vector3& rkP) const override + { + return (Real)(2.0 * m_afCoeff[1] * rkP.Y() + m_afCoeff[3] + m_afCoeff[4] * rkP.X()); + } + Real FZ(const Vector3& /*rkP*/) const override + { + return (Real)-1.0; + } - // second-order partial derivatives - Real FXX (const Vector3& /*rkP*/) const override - { return (Real)(2.0*m_afCoeff[0]); } - Real FXY (const Vector3& /*rkP*/) const override - { return (Real)(m_afCoeff[4]); } - Real FXZ (const Vector3& /*rkP*/) const override - { return (Real)0.0; } - Real FYY (const Vector3& /*rkP*/) const override - { return (Real)(2.0*m_afCoeff[1]); } - Real FYZ (const Vector3& /*rkP*/) const override - { return (Real)0.0; } - Real FZZ (const Vector3& /*rkP*/) const override - { return (Real)0.0; } + // second-order partial derivatives + Real FXX(const Vector3& /*rkP*/) const override + { + return (Real)(2.0 * m_afCoeff[0]); + } + Real FXY(const Vector3& /*rkP*/) const override + { + return (Real)(m_afCoeff[4]); + } + Real FXZ(const Vector3& /*rkP*/) const override + { + return (Real)0.0; + } + Real FYY(const Vector3& /*rkP*/) const override + { + return (Real)(2.0 * m_afCoeff[1]); + } + Real FYZ(const Vector3& /*rkP*/) const override + { + return (Real)0.0; + } + Real FZZ(const Vector3& /*rkP*/) const override + { + return (Real)0.0; + } protected: - Real m_afCoeff[6]; + Real m_afCoeff[6]; }; -} +} // namespace Wm4 -namespace MeshCore { +namespace MeshCore +{ class MeshPointArray; /** @@ -112,27 +133,30 @@ public: /** * Add point for the fit algorithm. */ - void AddPoint(const Base::Vector3f &rcVector); + void AddPoint(const Base::Vector3f& rcVector); /** * Add points for the fit algorithm. */ - void AddPoints(const std::vector &rvPointVect); + void AddPoints(const std::vector& rvPointVect); /** * Add points for the fit algorithm. */ - void AddPoints(const std::set &rsPointSet); + void AddPoints(const std::set& rsPointSet); /** * Add points for the fit algorithm. */ - void AddPoints(const std::list &rsPointList); + void AddPoints(const std::list& rsPointList); /** * Add points for the fit algorithm. */ - void AddPoints(const MeshPointArray &points); + void AddPoints(const MeshPointArray& points); /** * Get all added points. */ - const std::list& GetPoints() const { return _vPoints; } + const std::list& GetPoints() const + { + return _vPoints; + } /** * Returns the center of gravity of the current added points. * @return Base::Vector3f @@ -166,14 +190,14 @@ protected: /** * Creates a vector of Wm4::Vector3 elements. */ - void GetMgcVectorArray( std::vector< Wm4::Vector3 >& rcPts ) const; + void GetMgcVectorArray(std::vector>& rcPts) const; protected: - //NOLINTBEGIN - std::list< Base::Vector3f > _vPoints; /**< Holds the points for the fit algorithm. */ - bool _bIsFitted{false}; /**< Flag, whether the fit has been called. */ - float _fLastResult{FLOAT_MAX}; /**< Stores the last result of the fit */ - //NOLINTEND + // NOLINTBEGIN + std::list _vPoints; /**< Holds the points for the fit algorithm. */ + bool _bIsFitted {false}; /**< Flag, whether the fit has been called. */ + float _fLastResult {FLOAT_MAX}; /**< Stores the last result of the fit */ + // NOLINTEND }; // ------------------------------------------------------------------------------- @@ -181,7 +205,7 @@ protected: /** * Approximation of a plane into a given set of points. */ -class MeshExport PlaneFit : public Approximation +class MeshExport PlaneFit: public Approximation { public: PlaneFit(); @@ -202,15 +226,15 @@ public: * Returns the distance from the point \a rcPoint to the fitted plane. If Fit() has not been * called FLOAT_MAX is returned. */ - float GetDistanceToPlane(const Base::Vector3f &rcPoint) const; + float GetDistanceToPlane(const Base::Vector3f& rcPoint) const; /** * Returns the standard deviation from the points to the fitted plane. If Fit() has not been * called FLOAT_MAX is returned. */ float GetStdDeviation() const; /** - * Returns the standard deviation from the points to the fitted plane with respect to the orientation - * of the plane's normal. If Fit() has not been called FLOAT_MAX is returned. + * Returns the standard deviation from the points to the fitted plane with respect to the + * orientation of the plane's normal. If Fit() has not been called FLOAT_MAX is returned. */ float GetSignedStdDeviation() const; /** @@ -235,12 +259,12 @@ public: Base::BoundBox3f GetBoundings() const; protected: - //NOLINTBEGIN + // NOLINTBEGIN Base::Vector3f _vBase; /**< Base vector of the plane. */ Base::Vector3f _vDirU; Base::Vector3f _vDirV; Base::Vector3f _vDirW; /**< Normal of the plane. */ - //NOLINTEND + // NOLINTEND }; // ------------------------------------------------------------------------------- @@ -254,7 +278,7 @@ protected: * Depending on the parameters (a,..,k) this surface defines a sphere, ellipsoid, cylinder, cone * and so on. */ -class MeshExport QuadraticFit : public Approximation +class MeshExport QuadraticFit: public Approximation { public: QuadraticFit() = default; @@ -276,7 +300,7 @@ public: */ float Fit() override; - void CalcZValues(double x, double y, double &dZ1, double &dZ2) const; + void CalcZValues(double x, double y, double& dZ1, double& dZ2) const; /** * Calculate the curvatures of the quadric at a given point. * @param x X-coordinate @@ -289,12 +313,16 @@ public: * @param dDistance * @return bool Success = true, otherwise false */ - bool GetCurvatureInfo(double x, double y, double z, - double &rfCurv0, double &rfCurv1, - Base::Vector3f &rkDir0, Base::Vector3f &rkDir1, double &dDistance); + bool GetCurvatureInfo(double x, + double y, + double z, + double& rfCurv0, + double& rfCurv1, + Base::Vector3f& rkDir0, + Base::Vector3f& rkDir1, + double& dDistance); - bool GetCurvatureInfo(double x, double y, double z, - double &rfCurv0, double &rfcurv1); + bool GetCurvatureInfo(double x, double y, double z, double& rfCurv0, double& rfcurv1); /** * Compute form matrix A and calculate Eigenvalues. * @param dLambda1 Eigenvalue 1 @@ -304,35 +332,44 @@ public: * @param clEV2 Eigenvector 2 * @param clEV3 Eigenvector 3 */ - void CalcEigenValues(double &dLambda1, double &dLambda2, double &dLambda3, - Base::Vector3f &clEV1, Base::Vector3f &clEV2, Base::Vector3f &clEV3) const; + void CalcEigenValues(double& dLambda1, + double& dLambda2, + double& dLambda3, + Base::Vector3f& clEV1, + Base::Vector3f& clEV2, + Base::Vector3f& clEV3) const; private: - double _fCoeff[ 10 ]{}; /**< Coefficients of the fit */ + double _fCoeff[10] {}; /**< Coefficients of the fit */ }; // ------------------------------------------------------------------------------- /** - * This is an 2.5D approach which first determines the bestfit plane of the point set (P_i = (x,y,z), i=1,...,n) - * to get a parametrisation of the points afterwards. The coordinates of the points with respect to the local - * coordinate system of the plane are determined and then a quadratic polynomial function of the form: - * w = f(u,v) = a*u^2 + b*v^2 + c*u*v + d*u + e*v + f - * is determined. - * This approach was developed as an alternative for the 3D approach with quadrics because - * the latter suffers from strange artifacts in planar areas. + * This is an 2.5D approach which first determines the bestfit plane of the point set (P_i = + * (x,y,z), i=1,...,n) to get a parametrisation of the points afterwards. The coordinates of the + * points with respect to the local coordinate system of the plane are determined and then a + * quadratic polynomial function of the form: w = f(u,v) = a*u^2 + b*v^2 + c*u*v + d*u + e*v + f is + * determined. This approach was developed as an alternative for the 3D approach with quadrics + * because the latter suffers from strange artifacts in planar areas. */ -class MeshExport SurfaceFit : public PlaneFit +class MeshExport SurfaceFit: public PlaneFit { public: SurfaceFit(); - bool GetCurvatureInfo(double x, double y, double z, double &rfCurv0, double &rfCurv1, - Base::Vector3f &rkDir0, Base::Vector3f &rkDir1, double &dDistance); - bool GetCurvatureInfo(double x, double y, double z, double &rfCurv0, double &rfcurv1); + bool GetCurvatureInfo(double x, + double y, + double z, + double& rfCurv0, + double& rfCurv1, + Base::Vector3f& rkDir0, + Base::Vector3f& rkDir1, + double& dDistance); + bool GetCurvatureInfo(double x, double y, double z, double& rfCurv0, double& rfcurv1); float Fit() override; double Value(double x, double y) const; - void GetCoefficients(double& a,double& b,double& c,double& d,double& e,double& f) const; + void GetCoefficients(double& a, double& b, double& c, double& d, double& e, double& f) const; /** * @brief Transform * Transforms points from the local coordinate system to the world coordinate system @@ -347,11 +384,12 @@ public: * @param vmax Parameter range * @return control points of the Bezier surface */ - std::vector toBezier(double umin=0.0, double umax=1.0, double vmin=0.0, double vmax=1.0) const; + std::vector + toBezier(double umin = 0.0, double umax = 1.0, double vmin = 0.0, double vmax = 1.0) const; protected: double PolynomFit(); - double _fCoeff[ 10 ]; /**< Ziel der Koeffizienten aus dem Fit */ + double _fCoeff[10]; /**< Ziel der Koeffizienten aus dem Fit */ }; // ------------------------------------------------------------------------------- @@ -359,7 +397,7 @@ protected: /** * Approximation of a cylinder into a given set of points. */ -class MeshExport CylinderFit : public Approximation +class MeshExport CylinderFit: public Approximation { public: CylinderFit(); @@ -383,7 +421,7 @@ public: * Returns the distance from the point \a rcPoint to the fitted cylinder. If Fit() has not been * called FLOAT_MAX is returned. */ - float GetDistanceToCylinder(const Base::Vector3f &rcPoint) const; + float GetDistanceToCylinder(const Base::Vector3f& rcPoint) const; /** * Returns the standard deviation from the points to the fitted cylinder. If Fit() has not been * called FLOAT_MAX is returned. @@ -402,8 +440,8 @@ public: protected: Base::Vector3f _vBase; /**< Base vector of the cylinder. */ Base::Vector3f _vAxis; /**< Axis of the cylinder. */ - float _fRadius{0}; /**< Radius of the cylinder. */ - bool _initialGuess{false}; + float _fRadius {0}; /**< Radius of the cylinder. */ + bool _initialGuess {false}; }; // ------------------------------------------------------------------------------- @@ -411,7 +449,7 @@ protected: /** * Approximation of a sphere into a given set of points. */ -class MeshExport SphereFit : public Approximation +class MeshExport SphereFit: public Approximation { public: SphereFit(); @@ -425,7 +463,7 @@ public: * Returns the distance from the point \a rcPoint to the fitted sphere. If Fit() has not been * called FLOAT_MAX is returned. */ - float GetDistanceToSphere(const Base::Vector3f &rcPoint) const; + float GetDistanceToSphere(const Base::Vector3f& rcPoint) const; /** * Returns the standard deviation from the points to the fitted sphere. If Fit() has not been * called FLOAT_MAX is returned. @@ -438,7 +476,7 @@ public: protected: Base::Vector3f _vCenter; /**< Center of the sphere. */ - float _fRadius{0}; /**< Radius of the cylinder. */ + float _fRadius {0}; /**< Radius of the cylinder. */ }; // ------------------------------------------------------------------------------- @@ -454,38 +492,45 @@ public: /** * WildMagic library uses function with this interface */ - using Function = double (*)(double,double,double); + using Function = double (*)(double, double, double); /** * The constructor expects an array of quadric coefficients. * @param pKoef Pointer to the quadric coefficients * (double [10]) */ - explicit FunctionContainer(const double *pKoef) + explicit FunctionContainer(const double* pKoef) { - Assign( pKoef ); - pImplSurf = new Wm4::QuadricSurface( dKoeff ); + Assign(pKoef); + pImplSurf = new Wm4::QuadricSurface(dKoeff); } /** * Apply quadric coefficients * @param pKoef Pointer to the quadric coefficients * (double [10]) */ - void Assign( const double *pKoef ) + void Assign(const double* pKoef) { - for (long ct=0; ct < 10; ct++) - dKoeff[ ct ] = pKoef[ ct ]; + for (long ct = 0; ct < 10; ct++) { + dKoeff[ct] = pKoef[ct]; + } } /** * Destructor. Deletes the ImpicitSurface instance * of the WildMagic library */ - ~FunctionContainer(){ delete pImplSurf; } + ~FunctionContainer() + { + delete pImplSurf; + } /** * Access to the quadric coefficients * @param idx Index to coefficient * @return double& coefficient */ - double& operator[](int idx){ return dKoeff[ idx ]; } + double& operator[](int idx) + { + return dKoeff[idx]; + } /** * Redirector to a method of the WildMagic library. Determines * the principal curvatures and their directions at the given point. @@ -499,49 +544,66 @@ public: * @param dDistance Gives distances from the point to the quadric. * @return bool Success = true, otherwise false */ - bool CurvatureInfo(double x, double y, double z, - double &rfCurv0, double &rfCurv1, - Wm4::Vector3 &rkDir0, Wm4::Vector3 &rkDir1, double &dDistance) + bool CurvatureInfo(double x, + double y, + double z, + double& rfCurv0, + double& rfCurv1, + Wm4::Vector3& rkDir0, + Wm4::Vector3& rkDir1, + double& dDistance) { (void)dDistance; - return pImplSurf->ComputePrincipalCurvatureInfo( Wm4::Vector3(x, y, z),rfCurv0, rfCurv1, rkDir0, rkDir1 ); + return pImplSurf->ComputePrincipalCurvatureInfo(Wm4::Vector3(x, y, z), + rfCurv0, + rfCurv1, + rkDir0, + rkDir1); } - Base::Vector3f GetGradient( double x, double y, double z ) const + Base::Vector3f GetGradient(double x, double y, double z) const { - Wm4::Vector3 grad = pImplSurf->GetGradient( Wm4::Vector3(x, y, z) ); + Wm4::Vector3 grad = pImplSurf->GetGradient(Wm4::Vector3(x, y, z)); return Base::Vector3f(static_cast(grad.X()), static_cast(grad.Y()), static_cast(grad.Z())); } - Base::Matrix4D GetHessian( double x, double y, double z ) const + Base::Matrix4D GetHessian(double x, double y, double z) const { - Wm4::Matrix3 hess = pImplSurf->GetHessian( Wm4::Vector3(x, y, z) ); - Base::Matrix4D cMat; cMat.setToUnity(); - cMat[0][0] = hess[0][0]; cMat[0][1] = hess[0][1]; cMat[0][2] = hess[0][2]; - cMat[1][0] = hess[1][0]; cMat[1][1] = hess[1][1]; cMat[1][2] = hess[1][2]; - cMat[2][0] = hess[2][0]; cMat[2][1] = hess[2][1]; cMat[2][2] = hess[2][2]; + Wm4::Matrix3 hess = pImplSurf->GetHessian(Wm4::Vector3(x, y, z)); + Base::Matrix4D cMat; + cMat.setToUnity(); + cMat[0][0] = hess[0][0]; + cMat[0][1] = hess[0][1]; + cMat[0][2] = hess[0][2]; + cMat[1][0] = hess[1][0]; + cMat[1][1] = hess[1][1]; + cMat[1][2] = hess[1][2]; + cMat[2][0] = hess[2][0]; + cMat[2][1] = hess[2][1]; + cMat[2][2] = hess[2][2]; return cMat; } - bool CurvatureInfo(double x, double y, double z, - double &rfCurv0, double &rfCurv1) + bool CurvatureInfo(double x, double y, double z, double& rfCurv0, double& rfCurv1) { - double dQuot = Fz(x,y,z); - double zx = - ( Fx(x,y,z) / dQuot ); - double zy = - ( Fy(x,y,z) / dQuot ); + double dQuot = Fz(x, y, z); + double zx = -(Fx(x, y, z) / dQuot); + double zy = -(Fy(x, y, z) / dQuot); - double zxx = - ( 2.0 * ( dKoeff[5] + dKoeff[6] * zx * zx + dKoeff[8] * zx ) ) / dQuot; - double zyy = - ( 2.0 * ( dKoeff[5] + dKoeff[6] * zy * zy + dKoeff[9] * zy ) ) / dQuot; - double zxy = - ( dKoeff[6] * zx * zy + dKoeff[7] + dKoeff[8] * zy + dKoeff[9] * zx ) / dQuot; + double zxx = -(2.0 * (dKoeff[5] + dKoeff[6] * zx * zx + dKoeff[8] * zx)) / dQuot; + double zyy = -(2.0 * (dKoeff[5] + dKoeff[6] * zy * zy + dKoeff[9] * zy)) / dQuot; + double zxy = -(dKoeff[6] * zx * zy + dKoeff[7] + dKoeff[8] * zy + dKoeff[9] * zx) / dQuot; - double dNen = 1 + zx*zx + zy*zy; - double dNenSqrt = sqrt( dNen ); - double K = ( zxx * zyy - zxy * zxy ) / ( dNen * dNen ); - double H = 0.5 * ( ( 1.0+zx*zx - 2*zx*zy*zxy + (1.0+zy*zy)*zxx ) / ( dNenSqrt * dNenSqrt * dNenSqrt ) ) ; + double dNen = 1 + zx * zx + zy * zy; + double dNenSqrt = sqrt(dNen); + double K = (zxx * zyy - zxy * zxy) / (dNen * dNen); + double H = 0.5 + * ((1.0 + zx * zx - 2 * zx * zy * zxy + (1.0 + zy * zy) * zxx) + / (dNenSqrt * dNenSqrt * dNenSqrt)); - double dDiscr = sqrt(fabs(H*H-K)); + double dDiscr = sqrt(fabs(H * H - K)); rfCurv0 = H - dDiscr; rfCurv1 = H + dDiscr; @@ -549,62 +611,74 @@ public: } //+++++++++ Quadric +++++++++++++++++++++++++++++++++++++++ - double F ( double x, double y, double z ) + double F(double x, double y, double z) { - return (dKoeff[0] + dKoeff[1]*x + dKoeff[2]*y + dKoeff[3]*z + - dKoeff[4]*x*x + dKoeff[5]*y*y + dKoeff[6]*z*z + - dKoeff[7]*x*y + dKoeff[8]*x*z + dKoeff[9]*y*z); + return (dKoeff[0] + dKoeff[1] * x + dKoeff[2] * y + dKoeff[3] * z + dKoeff[4] * x * x + + dKoeff[5] * y * y + dKoeff[6] * z * z + dKoeff[7] * x * y + dKoeff[8] * x * z + + dKoeff[9] * y * z); } //+++++++++ 1. derivations ++++++++++++++++++++++++++++++++ - double Fx ( double x, double y, double z ) + double Fx(double x, double y, double z) { - return( dKoeff[1] + 2.0*dKoeff[4]*x + dKoeff[7]*y + dKoeff[8]*z ); + return (dKoeff[1] + 2.0 * dKoeff[4] * x + dKoeff[7] * y + dKoeff[8] * z); } - double Fy ( double x, double y, double z ) + double Fy(double x, double y, double z) { - return( dKoeff[2] + 2.0*dKoeff[5]*y + dKoeff[7]*x + dKoeff[9]*z ); + return (dKoeff[2] + 2.0 * dKoeff[5] * y + dKoeff[7] * x + dKoeff[9] * z); } - double Fz ( double x, double y, double z ) + double Fz(double x, double y, double z) { - return( dKoeff[3] + 2.0*dKoeff[6]*z + dKoeff[8]*x + dKoeff[9]*y ); + return (dKoeff[3] + 2.0 * dKoeff[6] * z + dKoeff[8] * x + dKoeff[9] * y); } //+++++++++ 2. derivations ++++++++++++++++++++++++++++++++ - double Fxx( double x, double y, double z ) + double Fxx(double x, double y, double z) { - (void)x; (void)y; (void)z; - return( 2.0*dKoeff[4] ); + (void)x; + (void)y; + (void)z; + return (2.0 * dKoeff[4]); } - double Fxy( double x, double y, double z ) + double Fxy(double x, double y, double z) { - (void)x; (void)y; (void)z; - return( dKoeff[7] ); + (void)x; + (void)y; + (void)z; + return (dKoeff[7]); } - double Fxz( double x, double y, double z ) + double Fxz(double x, double y, double z) { - (void)x; (void)y; (void)z; - return( dKoeff[8] ); + (void)x; + (void)y; + (void)z; + return (dKoeff[8]); } - double Fyy( double x, double y, double z ) + double Fyy(double x, double y, double z) { - (void)x; (void)y; (void)z; - return( 2.0*dKoeff[5] ); + (void)x; + (void)y; + (void)z; + return (2.0 * dKoeff[5]); } - double Fyz( double x, double y, double z ) + double Fyz(double x, double y, double z) { - (void)x; (void)y; (void)z; - return( dKoeff[9] ); + (void)x; + (void)y; + (void)z; + return (dKoeff[9]); } - double Fzz( double x, double y, double z ) + double Fzz(double x, double y, double z) { - (void)x; (void)y; (void)z; - return( 2.0*dKoeff[6] ); + (void)x; + (void)y; + (void)z; + return (2.0 * dKoeff[6]); } protected: - double dKoeff[ 10 ]; /**< Coefficients of quadric */ - Wm4::ImplicitSurface *pImplSurf; /**< Access to the WildMagic library */ + double dKoeff[10]; /**< Coefficients of quadric */ + Wm4::ImplicitSurface* pImplSurf; /**< Access to the WildMagic library */ private: /** @@ -613,7 +687,7 @@ private: FunctionContainer() = default; }; -class MeshExport PolynomialFit : public Approximation +class MeshExport PolynomialFit: public Approximation { public: PolynomialFit(); @@ -625,6 +699,6 @@ protected: float _fCoeff[9]; }; -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_APPROXIMATION_H +#endif // MESH_APPROXIMATION_H diff --git a/src/Mod/Mesh/App/Core/Builder.cpp b/src/Mod/Mesh/App/Core/Builder.cpp index 4f7cc42165..f2e312c638 100644 --- a/src/Mod/Mesh/App/Core/Builder.cpp +++ b/src/Mod/Mesh/App/Core/Builder.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -38,13 +38,12 @@ using namespace MeshCore; -MeshBuilder::MeshBuilder (MeshKernel& kernel) +MeshBuilder::MeshBuilder(MeshKernel& kernel) : _meshKernel(kernel) - , _fSaveTolerance{MeshDefinitions::_fMinPointDistanceD1} -{ -} + , _fSaveTolerance {MeshDefinitions::_fMinPointDistanceD1} +{} -MeshBuilder::~MeshBuilder () +MeshBuilder::~MeshBuilder() { MeshDefinitions::_fMinPointDistanceD1 = _fSaveTolerance; delete this->_seq; @@ -55,74 +54,85 @@ void MeshBuilder::SetTolerance(float fTol) MeshDefinitions::_fMinPointDistanceD1 = fTol; } -void MeshBuilder::Initialize (size_t ctFacets, bool deletion) +void MeshBuilder::Initialize(size_t ctFacets, bool deletion) { - if (deletion) - { + if (deletion) { // Clear the mesh structure and free all memory _meshKernel.Clear(); - // Allocate new memory that is needed later on. If AddFacet() gets called exactly ctFacets times there is no wastage of memory - // otherwise the vector reallocates ~50% of its future memory usage. - // Note: A feature of the std::vector implementation is that it can hold more memory (capacity) than it actually needs (size). - // This usually happens if its elements are added without specifying its final size. Later on it's a bit tricky to free the wasted - // memory. So we're strived to avoid the wastage of memory. + // Allocate new memory that is needed later on. If AddFacet() gets called exactly ctFacets + // times there is no wastage of memory otherwise the vector reallocates ~50% of its future + // memory usage. Note: A feature of the std::vector implementation is that it can hold more + // memory (capacity) than it actually needs (size). + // This usually happens if its elements are added without specifying its final size. + // Later on it's a bit tricky to free the wasted memory. So we're strived to avoid the + // wastage of memory. _meshKernel._aclFacetArray.reserve(ctFacets); - // Usually the number of vertices is the half of the number of facets. So we reserve this memory with 10% surcharge - // To save memory we hold an array with iterators that point to the right vertex (insertion order) in the set, instead of - // holding the vertex array twice. + // Usually the number of vertices is the half of the number of facets. So we reserve this + // memory with 10% surcharge To save memory we hold an array with iterators that point to + // the right vertex (insertion order) in the set, instead of holding the vertex array twice. size_t ctPoints = ctFacets / 2; - _pointsIterator.reserve(static_cast(float(ctPoints)*1.10f)); + _pointsIterator.reserve(static_cast(float(ctPoints) * 1.10f)); _ptIdx = 0; } - else - { - for (const auto & it1 : _meshKernel._aclPointArray) - { + else { + for (const auto& it1 : _meshKernel._aclPointArray) { MeshPointIterator pit = _points.insert(it1); _pointsIterator.push_back(pit); } _ptIdx = _points.size(); - // As we have a copy of our vertices in the set we must clear them from our array now But we can keep its - // memory as we reuse it later on anyway. + // As we have a copy of our vertices in the set we must clear them from our array now But + // we can keep its memory as we reuse it later on anyway. _meshKernel._aclPointArray.clear(); // additional memory - size_t newCtFacets = _meshKernel._aclFacetArray.size()+ctFacets; + size_t newCtFacets = _meshKernel._aclFacetArray.size() + ctFacets; _meshKernel._aclFacetArray.reserve(newCtFacets); size_t ctPoints = newCtFacets / 2; - _pointsIterator.reserve(static_cast(float(ctPoints)*1.10f)); + _pointsIterator.reserve(static_cast(float(ctPoints) * 1.10f)); } this->_seq = new Base::SequencerLauncher("create mesh structure...", ctFacets * 2); } -void MeshBuilder::AddFacet (const MeshGeomFacet& facet, bool takeFlag, bool takeProperty) +void MeshBuilder::AddFacet(const MeshGeomFacet& facet, bool takeFlag, bool takeProperty) { unsigned char flag = 0; unsigned long prop = 0; - if (takeFlag) + if (takeFlag) { flag = facet._ucFlag; - if (takeProperty) + } + if (takeProperty) { prop = facet._ulProp; + } - AddFacet(facet._aclPoints[0], facet._aclPoints[1], facet._aclPoints[2], facet.GetNormal(), flag, prop); + AddFacet(facet._aclPoints[0], + facet._aclPoints[1], + facet._aclPoints[2], + facet.GetNormal(), + flag, + prop); } -void MeshBuilder::AddFacet (const Base::Vector3f& pt1, const Base::Vector3f& pt2, const Base::Vector3f& pt3, const Base::Vector3f& normal, unsigned char flag, unsigned long prop) +void MeshBuilder::AddFacet(const Base::Vector3f& pt1, + const Base::Vector3f& pt2, + const Base::Vector3f& pt3, + const Base::Vector3f& normal, + unsigned char flag, + unsigned long prop) { - Base::Vector3f facetPoints[4] = { pt1, pt2, pt3, normal }; + Base::Vector3f facetPoints[4] = {pt1, pt2, pt3, normal}; AddFacet(facetPoints, flag, prop); } -void MeshBuilder::AddFacet (Base::Vector3f* facetPoints, unsigned char flag, unsigned long prop) +void MeshBuilder::AddFacet(Base::Vector3f* facetPoints, unsigned char flag, unsigned long prop) { - this->_seq->next(true); // allow to cancel + this->_seq->next(true); // allow to cancel // adjust circulation direction - if ((((facetPoints[1] - facetPoints[0]) % (facetPoints[2] - facetPoints[0])) * facetPoints[3]) < 0.0f) - { + if ((((facetPoints[1] - facetPoints[0]) % (facetPoints[2] - facetPoints[0])) * facetPoints[3]) + < 0.0f) { std::swap(facetPoints[1], facetPoints[2]); } @@ -131,65 +141,65 @@ void MeshBuilder::AddFacet (Base::Vector3f* facetPoints, unsigned char flag, uns mf._ulProp = prop; int i = 0; - for (i = 0; i < 3; i++) - { + for (i = 0; i < 3; i++) { MeshPoint pt(facetPoints[i]); std::set::iterator p = _points.find(pt); - if (p == _points.end()) - { + if (p == _points.end()) { mf._aulPoints[i] = _ptIdx; pt._ulProp = _ptIdx++; // keep an iterator to the right vertex MeshPointIterator it = _points.insert(pt); _pointsIterator.push_back(it); } - else + else { mf._aulPoints[i] = p->_ulProp; + } } // check for degenerated facet (one edge has length 0) - if ((mf._aulPoints[0] == mf._aulPoints[1]) || (mf._aulPoints[0] == mf._aulPoints[2]) || (mf._aulPoints[1] == mf._aulPoints[2])) + if ((mf._aulPoints[0] == mf._aulPoints[1]) || (mf._aulPoints[0] == mf._aulPoints[2]) + || (mf._aulPoints[1] == mf._aulPoints[2])) { return; + } _meshKernel._aclFacetArray.push_back(mf); } -void MeshBuilder::SetNeighbourhood () +void MeshBuilder::SetNeighbourhood() { std::set edges; FacetIndex facetIdx = 0; - for (auto & mf : _meshKernel._aclFacetArray) - { - this->_seq->next(true); // allow to cancel - for (int i = 0; i < 3; i++) - { - Edge edge(mf._aulPoints[i], mf._aulPoints[(i+1)%3], facetIdx); + for (auto& mf : _meshKernel._aclFacetArray) { + this->_seq->next(true); // allow to cancel + for (int i = 0; i < 3; i++) { + Edge edge(mf._aulPoints[i], mf._aulPoints[(i + 1) % 3], facetIdx); std::set::iterator e = edges.find(edge); - if (e != edges.end()) - { // edge exists, set neighbourhood + if (e != edges.end()) { // edge exists, set neighbourhood MeshFacet& mf1 = _meshKernel._aclFacetArray[e->facetIdx]; - if (mf1._aulPoints[0] == edge.pt1) - { - if (mf1._aulPoints[1] == edge.pt2) + if (mf1._aulPoints[0] == edge.pt1) { + if (mf1._aulPoints[1] == edge.pt2) { mf1._aulNeighbours[0] = facetIdx; - else + } + else { mf1._aulNeighbours[2] = facetIdx; + } } - else if (mf1._aulPoints[0] == edge.pt2) - { - if (mf1._aulPoints[1] == edge.pt1) + else if (mf1._aulPoints[0] == edge.pt2) { + if (mf1._aulPoints[1] == edge.pt1) { mf1._aulNeighbours[0] = facetIdx; - else + } + else { mf1._aulNeighbours[2] = facetIdx; + } } - else + else { mf1._aulNeighbours[1] = facetIdx; + } mf._aulNeighbours[i] = e->facetIdx; } - else - { // new edge + else { // new edge edges.insert(edge); } } @@ -201,54 +211,62 @@ void MeshBuilder::SetNeighbourhood () void MeshBuilder::RemoveUnreferencedPoints() { _meshKernel._aclPointArray.SetFlag(MeshPoint::INVALID); - for (const auto & it : _meshKernel._aclFacetArray) - { - for (PointIndex point : it._aulPoints) + for (const auto& it : _meshKernel._aclFacetArray) { + for (PointIndex point : it._aulPoints) { _meshKernel._aclPointArray[point].ResetInvalid(); + } } unsigned long uValidPts = std::count_if(_meshKernel._aclPointArray.begin(), _meshKernel._aclPointArray.end(), - [](const MeshPoint& p) { return p.IsValid(); }); - if ( uValidPts < _meshKernel.CountPoints() ) + [](const MeshPoint& p) { + return p.IsValid(); + }); + if (uValidPts < _meshKernel.CountPoints()) { _meshKernel.RemoveInvalids(); + } } -void MeshBuilder::Finish (bool freeMemory) +void MeshBuilder::Finish(bool freeMemory) { - // now we can resize the vertex array to the exact size and copy the vertices with their correct positions in the array - PointIndex i=0; + // now we can resize the vertex array to the exact size and copy the vertices with their correct + // positions in the array + PointIndex i = 0; _meshKernel._aclPointArray.resize(_pointsIterator.size()); - for (const auto & it : _pointsIterator) + for (const auto& it : _pointsIterator) { _meshKernel._aclPointArray[i++] = *(it.first); + } // free all memory of the internal structures // Note: this scope is needed to free memory immediately #if defined(_MSC_VER) && defined(_DEBUG) // Just do nothing here as it may take a long time when running the debugger #else - { std::vector().swap(_pointsIterator); } + { + std::vector().swap(_pointsIterator); + } #endif _points.clear(); SetNeighbourhood(); RemoveUnreferencedPoints(); - // if AddFacet() has been called more often (or even less) as specified in Initialize() we have a wastage of memory - if ( freeMemory ) - { + // if AddFacet() has been called more often (or even less) as specified in Initialize() we have + // a wastage of memory + if (freeMemory) { size_t cap = _meshKernel._aclFacetArray.capacity(); size_t siz = _meshKernel._aclFacetArray.size(); // wastage of more than 5% - if ( cap > siz+siz/20 ) - { + if (cap > siz + siz / 20) { try { - FacetIndex i=0; + FacetIndex i = 0; MeshFacetArray faces(siz); - for (const auto & it : _meshKernel._aclFacetArray) + for (const auto& it : _meshKernel._aclFacetArray) { faces[i++] = it; + } _meshKernel._aclFacetArray.swap(faces); - } catch ( const Base::MemoryException&) { + } + catch (const Base::MemoryException&) { // sorry, we cannot reduce the memory } } @@ -259,11 +277,22 @@ void MeshBuilder::Finish (bool freeMemory) // ---------------------------------------------------------------------------- -struct MeshFastBuilder::Private { +struct MeshFastBuilder::Private +{ struct Vertex { - Vertex() : x(0), y(0), z(0), i(0) {} - Vertex(float x, float y, float z) : x(x), y(y), z(z), i(0) {} + Vertex() + : x(0) + , y(0) + , z(0) + , i(0) + {} + Vertex(float x, float y, float z) + : x(x) + , y(y) + , z(z) + , i(0) + {} float x, y, z; size_type i; @@ -274,14 +303,18 @@ struct MeshFastBuilder::Private { } bool operator<(const Vertex& rhs) const { - if (x != rhs.x) + if (x != rhs.x) { return x < rhs.x; - else if (y != rhs.y) + } + else if (y != rhs.y) { return y < rhs.y; - else if (z != rhs.z) + } + else if (z != rhs.z) { return z < rhs.z; - else + } + else { return false; + } } }; @@ -289,24 +322,25 @@ struct MeshFastBuilder::Private { QVector verts; }; -MeshFastBuilder::MeshFastBuilder(MeshKernel &rclM) : _meshKernel(rclM), p(new Private) -{ -} +MeshFastBuilder::MeshFastBuilder(MeshKernel& rclM) + : _meshKernel(rclM) + , p(new Private) +{} MeshFastBuilder::~MeshFastBuilder() { delete p; } -void MeshFastBuilder::Initialize (size_type ctFacets) +void MeshFastBuilder::Initialize(size_type ctFacets) { p->verts.reserve(ctFacets * 3); } -void MeshFastBuilder::AddFacet (const Base::Vector3f* facetPoints) +void MeshFastBuilder::AddFacet(const Base::Vector3f* facetPoints) { Private::Vertex v; - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { v.x = facetPoints[i].x; v.y = facetPoints[i].y; v.z = facetPoints[i].z; @@ -314,7 +348,7 @@ void MeshFastBuilder::AddFacet (const Base::Vector3f* facetPoints) } } -void MeshFastBuilder::AddFacet (const MeshGeomFacet& facetPoints) +void MeshFastBuilder::AddFacet(const MeshGeomFacet& facetPoints) { Private::Vertex v; for (const auto& pnt : facetPoints._aclPoints) { @@ -325,16 +359,16 @@ void MeshFastBuilder::AddFacet (const MeshGeomFacet& facetPoints) } } -void MeshFastBuilder::Finish () +void MeshFastBuilder::Finish() { using size_type = QVector::size_type; QVector& verts = p->verts; size_type ulCtPts = verts.size(); - for (size_type i=0; i < ulCtPts; ++i) { + for (size_type i = 0; i < ulCtPts; ++i) { verts[i].i = i; } - //std::sort(verts.begin(), verts.end()); + // std::sort(verts.begin(), verts.end()); int threads = QThread::idealThreadCount(); MeshCore::parallel_sort(verts.begin(), verts.end(), std::less<>(), threads); @@ -342,25 +376,26 @@ void MeshFastBuilder::Finish () size_type vertex_count = 0; for (QVector::iterator v = verts.begin(); v != verts.end(); ++v) { - if (!vertex_count || *v != verts[vertex_count-1]) + if (!vertex_count || *v != verts[vertex_count - 1]) { verts[vertex_count++] = *v; + } indices[v->i] = static_cast(vertex_count - 1); } - size_type ulCt = verts.size()/3; + size_type ulCt = verts.size() / 3; MeshFacetArray rFacets(static_cast(ulCt)); - for (size_type i=0; i < ulCt; ++i) { - rFacets[static_cast(i)]._aulPoints[0] = indices[3*i]; - rFacets[static_cast(i)]._aulPoints[1] = indices[3*i + 1]; - rFacets[static_cast(i)]._aulPoints[2] = indices[3*i + 2]; + for (size_type i = 0; i < ulCt; ++i) { + rFacets[static_cast(i)]._aulPoints[0] = indices[3 * i]; + rFacets[static_cast(i)]._aulPoints[1] = indices[3 * i + 1]; + rFacets[static_cast(i)]._aulPoints[2] = indices[3 * i + 2]; } verts.resize(vertex_count); MeshPointArray rPoints; rPoints.reserve(static_cast(vertex_count)); - for (const auto & v : verts) { + for (const auto& v : verts) { rPoints.push_back(MeshPoint(v.x, v.y, v.z)); } diff --git a/src/Mod/Mesh/App/Core/Builder.h b/src/Mod/Mesh/App/Core/Builder.h index 61669ae59b..02da3e5663 100644 --- a/src/Mod/Mesh/App/Core/Builder.h +++ b/src/Mod/Mesh/App/Core/Builder.h @@ -29,7 +29,8 @@ #include "MeshKernel.h" -namespace Base { +namespace Base +{ class SequencerLauncher; } @@ -63,37 +64,35 @@ private: //@{ class Edge { - public: + public: PointIndex pt1; PointIndex pt2; FacetIndex facetIdx; - Edge (PointIndex p1, PointIndex p2, FacetIndex idx) + Edge(PointIndex p1, PointIndex p2, FacetIndex idx) { facetIdx = idx; - if (p1 > p2) - { + if (p1 > p2) { pt1 = p2; pt2 = p1; } - else - { + else { pt1 = p1; pt2 = p2; } } - bool operator < (const Edge &e) const + bool operator<(const Edge& e) const { return (pt1 == e.pt1) ? (pt2 < e.pt2) : (pt1 < e.pt1); } - bool operator > (const Edge &e) const + bool operator>(const Edge& e) const { return (pt1 == e.pt1) ? (pt2 > e.pt2) : (pt1 > e.pt1); } - bool operator == (const Edge &e) const + bool operator==(const Edge& e) const { return (pt1 == e.pt1) && (pt2 == e.pt2); } @@ -102,19 +101,20 @@ private: MeshKernel& _meshKernel; std::set _points; - Base::SequencerLauncher* _seq{nullptr}; + Base::SequencerLauncher* _seq {nullptr}; // keep an array of iterators pointing to the vertex inside the set to save memory using MeshPointIterator = std::pair::iterator, bool>; std::vector _pointsIterator; - size_t _ptIdx{0}; + size_t _ptIdx {0}; - void SetNeighbourhood (); - // As it's forbidden to insert a degenerated facet but insert its vertices anyway we must remove them + void SetNeighbourhood(); + // As it's forbidden to insert a degenerated facet but insert its vertices anyway we must remove + // them void RemoveUnreferencedPoints(); public: - explicit MeshBuilder(MeshKernel &rclM); + explicit MeshBuilder(MeshKernel& rclM); ~MeshBuilder(); /** @@ -130,7 +130,7 @@ public: * AddFacet(), otherwise you'll possibly run into wastage of memory * and performance problems. */ - void Initialize (size_t ctFacets, bool deletion = true); + void Initialize(size_t ctFacets, bool deletion = true); /** adding facets */ /** Add new facet @@ -138,17 +138,22 @@ public: * @param takeFlag if true the flag from the MeshGeomFacet will be taken * @param takeProperty */ - void AddFacet (const MeshGeomFacet& facet, bool takeFlag = false, bool takeProperty = false); + void AddFacet(const MeshGeomFacet& facet, bool takeFlag = false, bool takeProperty = false); /** Add new facet */ - void AddFacet (const Base::Vector3f& pt1, const Base::Vector3f& pt2, const Base::Vector3f& pt3, const Base::Vector3f& normal, unsigned char flag = 0, unsigned long prop = 0); + void AddFacet(const Base::Vector3f& pt1, + const Base::Vector3f& pt2, + const Base::Vector3f& pt3, + const Base::Vector3f& normal, + unsigned char flag = 0, + unsigned long prop = 0); /** Add new facet * @param facetPoints Array of vectors (size 4) in order of vec1, vec2, * vec3, normal * @param flag * @param prop */ - void AddFacet (Base::Vector3f* facetPoints, unsigned char flag = 0, unsigned long prop = 0); + void AddFacet(Base::Vector3f* facetPoints, unsigned char flag = 0, unsigned long prop = 0); /** Finishes building up the mesh structure. Must be done after adding facets. * @param freeMemory if false (default) only the memory of internal @@ -158,7 +163,7 @@ public: * Initialize() then absolutely no memory is wasted and you can leave the * default value. */ - void Finish (bool freeMemory=false); + void Finish(bool freeMemory = false); friend class MeshKernel; @@ -190,29 +195,29 @@ private: public: using size_type = int; - explicit MeshFastBuilder(MeshKernel &rclM); + explicit MeshFastBuilder(MeshKernel& rclM); ~MeshFastBuilder(); /** Initializes the class. Must be done before adding facets * @param ctFacets count of facets. */ - void Initialize (size_type ctFacets); + void Initialize(size_type ctFacets); /** Add new facet */ - void AddFacet (const Base::Vector3f* facetPoints); + void AddFacet(const Base::Vector3f* facetPoints); /** Add new facet */ - void AddFacet (const MeshGeomFacet& facetPoints); + void AddFacet(const MeshGeomFacet& facetPoints); /** Finishes building up the mesh structure. Must be done after adding facets. */ - void Finish (); + void Finish(); private: struct Private; Private* p; }; -} // namespace MeshCore +} // namespace MeshCore #endif diff --git a/src/Mod/Mesh/App/Core/Curvature.cpp b/src/Mod/Mesh/App/Core/Curvature.cpp index 954c2c16db..d60463f040 100644 --- a/src/Mod/Mesh/App/Core/Curvature.cpp +++ b/src/Mod/Mesh/App/Core/Curvature.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -33,15 +33,15 @@ #include #include -//#define OPTIMIZE_CURVATURE +// #define OPTIMIZE_CURVATURE #ifdef OPTIMIZE_CURVATURE -# include +#include #else -# include +#include #endif -#include "Curvature.h" #include "Approximation.h" +#include "Curvature.h" #include "Iterator.h" #include "MeshKernel.h" #include "Tools.h" @@ -51,16 +51,20 @@ using namespace MeshCore; namespace sp = std::placeholders; MeshCurvature::MeshCurvature(const MeshKernel& kernel) - : myKernel(kernel), myMinPoints(20), myRadius(0.5f) + : myKernel(kernel) + , myMinPoints(20) + , myRadius(0.5f) { mySegment.resize(kernel.CountFacets()); std::generate(mySegment.begin(), mySegment.end(), Base::iotaGen(0)); } MeshCurvature::MeshCurvature(const MeshKernel& kernel, const std::vector& segm) - : myKernel(kernel), myMinPoints(20), myRadius(0.5f), mySegment(segm) -{ -} + : myKernel(kernel) + , myMinPoints(20) + , myRadius(0.5f) + , mySegment(segm) +{} void MeshCurvature::ComputePerFace(bool parallel) { @@ -77,50 +81,48 @@ void MeshCurvature::ComputePerFace(bool parallel) } } else { - //NOLINTBEGIN - QFuture future = QtConcurrent::mapped - (mySegment, std::bind(&FacetCurvature::Compute, &face, sp::_1)); - //NOLINTEND + // NOLINTBEGIN + QFuture future = + QtConcurrent::mapped(mySegment, std::bind(&FacetCurvature::Compute, &face, sp::_1)); + // NOLINTEND QFutureWatcher watcher; watcher.setFuture(future); watcher.waitForFinished(); - for (const auto & it : future) { + for (const auto& it : future) { myCurvature.push_back(it); } } } #ifdef OPTIMIZE_CURVATURE -namespace MeshCore { -void GenerateComplementBasis (Eigen::Vector3f& rkU, Eigen::Vector3f& rkV, - const Eigen::Vector3f& rkW) +namespace MeshCore +{ +void GenerateComplementBasis(Eigen::Vector3f& rkU, Eigen::Vector3f& rkV, const Eigen::Vector3f& rkW) { float fInvLength; - if (fabs(rkW[0]) >= fabs(rkW[1])) - { + if (fabs(rkW[0]) >= fabs(rkW[1])) { // W.x or W.z is the largest magnitude component, swap them - fInvLength = 1.0/sqrt(rkW[0]*rkW[0] + rkW[2]*rkW[2]); - rkU[0] = -rkW[2]*fInvLength; - rkU[1] = 0.0; - rkU[2] = +rkW[0]*fInvLength; - rkV[0] = rkW[1]*rkU[2]; - rkV[1] = rkW[2]*rkU[0] - rkW[0]*rkU[2]; - rkV[2] = -rkW[1]*rkU[0]; + fInvLength = 1.0 / sqrt(rkW[0] * rkW[0] + rkW[2] * rkW[2]); + rkU[0] = -rkW[2] * fInvLength; + rkU[1] = 0.0; + rkU[2] = +rkW[0] * fInvLength; + rkV[0] = rkW[1] * rkU[2]; + rkV[1] = rkW[2] * rkU[0] - rkW[0] * rkU[2]; + rkV[2] = -rkW[1] * rkU[0]; } - else - { + else { // W.y or W.z is the largest magnitude component, swap them - fInvLength = 1.0/sqrt(rkW[1]*rkW[1] + rkW[2]*rkW[2]); - rkU[0] = 0.0; - rkU[1] = +rkW[2]*fInvLength; - rkU[2] = -rkW[1]*fInvLength; - rkV[0] = rkW[1]*rkU[2] - rkW[2]*rkU[1]; - rkV[1] = -rkW[0]*rkU[2]; - rkV[2] = rkW[0]*rkU[1]; + fInvLength = 1.0 / sqrt(rkW[1] * rkW[1] + rkW[2] * rkW[2]); + rkU[0] = 0.0; + rkU[1] = +rkW[2] * fInvLength; + rkU[2] = -rkW[1] * fInvLength; + rkV[0] = rkW[1] * rkU[2] - rkW[2] * rkU[1]; + rkV[1] = -rkW[0] * rkU[2]; + rkV[2] = rkW[0] * rkU[1]; } } -} +} // namespace MeshCore void MeshCurvature::ComputePerVertex() { @@ -136,7 +138,7 @@ void MeshCurvature::ComputePerVertex() std::vector akNormal(numPoints); std::vector akVertex(numPoints); - for (unsigned long i=0; i= kW1.squaredNorm()) - { + Eigen::Vector2f kW0(kS(0, 1), minCurvature - kS(0, 0)); + Eigen::Vector2f kW1(minCurvature - kS(1, 1), kS(1, 0)); + if (kW0.squaredNorm() >= kW1.squaredNorm()) { float len = kW0.squaredNorm(); - if (len > 0 && len != 1) + if (len > 0 && len != 1) { kW0.normalize(); - Eigen::Vector3f v = kU*kW0[0] + kV*kW0[1]; - minDirection.Set(v[0],v[1],v[2]); + } + Eigen::Vector3f v = kU * kW0[0] + kV * kW0[1]; + minDirection.Set(v[0], v[1], v[2]); } - else - { + else { float len = kW1.squaredNorm(); - if (len > 0 && len != 1) + if (len > 0 && len != 1) { kW1.normalize(); - Eigen::Vector3f v = kU*kW1[0] + kV*kW1[1]; - minDirection.Set(v[0],v[1],v[2]); + } + Eigen::Vector3f v = kU * kW1[0] + kV * kW1[1]; + minDirection.Set(v[0], v[1], v[2]); } - kW0 = Eigen::Vector2f(kS(0,1),maxCurvature-kS(0,0)); - kW1 = Eigen::Vector2f(maxCurvature-kS(1,1),kS(1,0)); - if (kW0.squaredNorm() >= kW1.squaredNorm()) - { + kW0 = Eigen::Vector2f(kS(0, 1), maxCurvature - kS(0, 0)); + kW1 = Eigen::Vector2f(maxCurvature - kS(1, 1), kS(1, 0)); + if (kW0.squaredNorm() >= kW1.squaredNorm()) { float len = kW0.squaredNorm(); - if (len > 0 && len != 1) + if (len > 0 && len != 1) { kW0.normalize(); - Eigen::Vector3f v = kU*kW0[0] + kV*kW0[1]; - maxDirection.Set(v[0],v[1],v[2]); + } + Eigen::Vector3f v = kU * kW0[0] + kV * kW0[1]; + maxDirection.Set(v[0], v[1], v[2]); } - else - { + else { float len = kW1.squaredNorm(); - if (len > 0 && len != 1) + if (len > 0 && len != 1) { kW1.normalize(); - Eigen::Vector3f v = kU*kW1[0] + kV*kW1[1]; - maxDirection.Set(v[0],v[1],v[2]); + } + Eigen::Vector3f v = kU * kW1[0] + kV * kW1[1]; + maxDirection.Set(v[0], v[1], v[2]); } CurvatureInfo ci; @@ -294,7 +294,7 @@ void MeshCurvature::ComputePerVertex() myCurvature.clear(); // get all points - std::vector< Wm4::Vector3 > aPnts; + std::vector> aPnts; aPnts.reserve(myKernel.CountPoints()); MeshPointIterator cPIt(myKernel); for (cPIt.Init(); cPIt.More(); cPIt.Next()) { @@ -304,20 +304,24 @@ void MeshCurvature::ComputePerVertex() // get all point connections std::vector aIdx; - aIdx.reserve(3*myKernel.CountFacets()); + aIdx.reserve(3 * myKernel.CountFacets()); const MeshFacetArray& raFts = myKernel.GetFacets(); - for (const auto & it : raFts) { + for (const auto& it : raFts) { for (PointIndex point : it._aulPoints) { aIdx.push_back(int(point)); } } // in case of an empty mesh no curvature can be calculated - if (myKernel.CountPoints() == 0 || myKernel.CountFacets() == 0) + if (myKernel.CountPoints() == 0 || myKernel.CountFacets() == 0) { return; + } // compute vertex based curvatures - Wm4::MeshCurvature meshCurv(myKernel.CountPoints(), &(aPnts[0]), myKernel.CountFacets(), &(aIdx[0])); + Wm4::MeshCurvature meshCurv(myKernel.CountPoints(), + &(aPnts[0]), + myKernel.CountFacets(), + &(aIdx[0])); // get curvature information now const Wm4::Vector3* aMaxCurvDir = meshCurv.GetMaxDirections(); @@ -326,24 +330,31 @@ void MeshCurvature::ComputePerVertex() const double* aMinCurv = meshCurv.GetMinCurvatures(); myCurvature.reserve(myKernel.CountPoints()); - for (unsigned long i=0; i& ind) : indices(ind){} + explicit FitPointCollector(std::set& ind) + : indices(ind) + {} void Append(const MeshCore::MeshKernel& kernel, FacetIndex index) override { PointIndex ulP1, ulP2, ulP3; @@ -356,14 +367,19 @@ public: private: std::set& indices; }; -} +} // namespace MeshCore // -------------------------------------------------------- -FacetCurvature::FacetCurvature(const MeshKernel& kernel, const MeshRefPointToFacets& search, float r, unsigned long pt) - : myKernel(kernel), mySearch(search), myMinPoints(pt), myRadius(r) -{ -} +FacetCurvature::FacetCurvature(const MeshKernel& kernel, + const MeshRefPointToFacets& search, + float r, + unsigned long pt) + : myKernel(kernel) + , mySearch(search) + , myMinPoints(pt) + , myRadius(r) +{} CurvatureInfo FacetCurvature::Compute(FacetIndex index) const { @@ -377,16 +393,16 @@ CurvatureInfo FacetCurvature::Compute(FacetIndex index) const FitPointCollector collect(point_indices); float searchDist = myRadius; - int attempts=0; + int attempts = 0; do { mySearch.Neighbours(index, searchDist, collect); - if (point_indices.empty()) + if (point_indices.empty()) { break; + } float min_points = myMinPoints; float use_points = point_indices.size(); - searchDist = searchDist * sqrt(min_points/use_points); - } - while((point_indices.size() < myMinPoints) && (attempts++ < 3)); + searchDist = searchDist * sqrt(min_points / use_points); + } while ((point_indices.size() < myMinPoints) && (attempts++ < 3)); std::vector fitPoints; const MeshPointArray& verts = myKernel.GetPoints(); @@ -436,8 +452,8 @@ CurvatureInfo FacetCurvature::Compute(FacetIndex index) const if (rkNormal * face_normal < 0.0) { // Note: Changing the normal directions is similar to flipping over the object. // In this case we must adjust the curvature information as well. - std::swap(info.cMaxCurvDir,info.cMinCurvDir); - std::swap(info.fMaxCurvature,info.fMinCurvature); + std::swap(info.cMaxCurvDir, info.cMinCurvDir); + std::swap(info.fMaxCurvature, info.fMinCurvature); info.fMaxCurvature *= (-1.0); info.fMinCurvature *= (-1.0); } diff --git a/src/Mod/Mesh/App/Core/Curvature.h b/src/Mod/Mesh/App/Core/Curvature.h index 111c855a76..9f724d1491 100644 --- a/src/Mod/Mesh/App/Core/Curvature.h +++ b/src/Mod/Mesh/App/Core/Curvature.h @@ -23,11 +23,12 @@ #ifndef MESHCORE_CURVATURE_H #define MESHCORE_CURVATURE_H -#include -#include #include "Definitions.h" +#include +#include -namespace MeshCore { +namespace MeshCore +{ class MeshKernel; class MeshRefPointToFacets; @@ -42,7 +43,10 @@ struct MeshExport CurvatureInfo class MeshExport FacetCurvature { public: - FacetCurvature(const MeshKernel& kernel, const MeshRefPointToFacets& search, float, unsigned long); + FacetCurvature(const MeshKernel& kernel, + const MeshRefPointToFacets& search, + float, + unsigned long); CurvatureInfo Compute(FacetIndex index) const; private: @@ -57,11 +61,20 @@ class MeshExport MeshCurvature public: explicit MeshCurvature(const MeshKernel& kernel); MeshCurvature(const MeshKernel& kernel, const std::vector& segm); - float GetRadius() const { return myRadius; } - void SetRadius(float r) { myRadius = r; } + float GetRadius() const + { + return myRadius; + } + void SetRadius(float r) + { + myRadius = r; + } void ComputePerFace(bool parallel); void ComputePerVertex(); - const std::vector& GetCurvature() const { return myCurvature; } + const std::vector& GetCurvature() const + { + return myCurvature; + } private: const MeshKernel& myKernel; @@ -71,6 +84,6 @@ private: std::vector myCurvature; }; -} // MeshCore +} // namespace MeshCore -#endif // MESHCORE_CURVATURE_H +#endif // MESHCORE_CURVATURE_H diff --git a/src/Mod/Mesh/App/Core/CylinderFit.cpp b/src/Mod/Mesh/App/Core/CylinderFit.cpp index 3ccdbec122..194ef85306 100644 --- a/src/Mod/Mesh/App/Core/CylinderFit.cpp +++ b/src/Mod/Mesh/App/Core/CylinderFit.cpp @@ -56,9 +56,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -70,96 +70,114 @@ using namespace MeshCoreFit; CylinderFit::CylinderFit() - : _vBase(0,0,0) - , _vAxis(0,0,1) -{ -} + : _vBase(0, 0, 0) + , _vAxis(0, 0, 1) +{} // Set approximations before calling the fitting -void CylinderFit::SetApproximations(double radius, const Base::Vector3d &base, const Base::Vector3d &axis) +void CylinderFit::SetApproximations(double radius, + const Base::Vector3d& base, + const Base::Vector3d& axis) { - _bIsFitted = false; - _fLastResult = FLOAT_MAX; - _numIter = 0; - _dRadius = radius; - _vBase = base; - _vAxis = axis; - _vAxis.Normalize(); + _bIsFitted = false; + _fLastResult = FLOAT_MAX; + _numIter = 0; + _dRadius = radius; + _vBase = base; + _vAxis = axis; + _vAxis.Normalize(); } // Set approximations before calling the fitting. This version computes the radius // using the given axis and the existing surface points (which must already be added!) -void CylinderFit::SetApproximations(const Base::Vector3d &base, const Base::Vector3d &axis) +void CylinderFit::SetApproximations(const Base::Vector3d& base, const Base::Vector3d& axis) { - _bIsFitted = false; - _fLastResult = FLOAT_MAX; - _numIter = 0; - _vBase = base; - _vAxis = axis; - _vAxis.Normalize(); - _dRadius = 0.0; - if (!_vPoints.empty()) - { - for (std::list< Base::Vector3f >::const_iterator cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) - _dRadius += Base::Vector3d(cIt->x, cIt->y, cIt->z).DistanceToLine(_vBase, _vAxis); - _dRadius /= (double)_vPoints.size(); - } + _bIsFitted = false; + _fLastResult = FLOAT_MAX; + _numIter = 0; + _vBase = base; + _vAxis = axis; + _vAxis.Normalize(); + _dRadius = 0.0; + if (!_vPoints.empty()) { + for (std::list::const_iterator cIt = _vPoints.begin(); + cIt != _vPoints.end(); + ++cIt) { + _dRadius += Base::Vector3d(cIt->x, cIt->y, cIt->z).DistanceToLine(_vBase, _vAxis); + } + _dRadius /= (double)_vPoints.size(); + } } // Set iteration convergence criteria for the fit if special values are needed. // The default values set in the constructor are suitable for most uses -void CylinderFit::SetConvergenceCriteria(double posConvLimit, double dirConvLimit, double vConvLimit, int maxIter) +void CylinderFit::SetConvergenceCriteria(double posConvLimit, + double dirConvLimit, + double vConvLimit, + int maxIter) { - if (posConvLimit > 0.0) - _posConvLimit = posConvLimit; - if (dirConvLimit > 0.0) - _dirConvLimit = dirConvLimit; - if (vConvLimit > 0.0) - _vConvLimit = vConvLimit; - if (maxIter > 0) - _maxIter = maxIter; + if (posConvLimit > 0.0) { + _posConvLimit = posConvLimit; + } + if (dirConvLimit > 0.0) { + _dirConvLimit = dirConvLimit; + } + if (vConvLimit > 0.0) { + _vConvLimit = vConvLimit; + } + if (maxIter > 0) { + _maxIter = maxIter; + } } double CylinderFit::GetRadius() const { - if (_bIsFitted) - return _dRadius; - else - return 0.0; + if (_bIsFitted) { + return _dRadius; + } + else { + return 0.0; + } } Base::Vector3d CylinderFit::GetBase() const { - if (_bIsFitted) + if (_bIsFitted) { return _vBase; - else + } + else { return Base::Vector3d(); + } } Base::Vector3d CylinderFit::GetAxis() const { - if (_bIsFitted) + if (_bIsFitted) { return _vAxis; - else + } + else { return Base::Vector3d(); + } } int CylinderFit::GetNumIterations() const { - if (_bIsFitted) - return _numIter; - else - return 0; + if (_bIsFitted) { + return _numIter; + } + else { + return 0; + } } -float CylinderFit::GetDistanceToCylinder(const Base::Vector3f &rcPoint) const +float CylinderFit::GetDistanceToCylinder(const Base::Vector3f& rcPoint) const { float fResult = FLOAT_MAX; - if (_bIsFitted) - { - fResult = Base::Vector3d(rcPoint.x, rcPoint.y, rcPoint.z).DistanceToLine(_vBase, _vAxis) - _dRadius; - } + if (_bIsFitted) { + fResult = Base::Vector3d(rcPoint.x, rcPoint.y, rcPoint.z).DistanceToLine(_vBase, _vAxis) + - _dRadius; + } return fResult; } @@ -168,13 +186,14 @@ float CylinderFit::GetStdDeviation() const // Mean: M=(1/N)*SUM Xi // Variance: VAR=(N/N-1)*[(1/N)*SUM(Xi^2)-M^2] // Standard deviation: SD=SQRT(VAR) - if (!_bIsFitted) + if (!_bIsFitted) { return FLOAT_MAX; + } double sumXi = 0.0, sumXi2 = 0.0, dist = 0.0; for (auto it : _vPoints) { - dist = GetDistanceToCylinder( it ); - sumXi += dist; + dist = GetDistanceToCylinder(it); + sumXi += dist; sumXi2 += (dist * dist); } @@ -188,7 +207,7 @@ void CylinderFit::ProjectToCylinder() Base::Vector3f cBase(_vBase.x, _vBase.y, _vBase.z); Base::Vector3f cAxis(_vAxis.x, _vAxis.y, _vAxis.z); - for (auto & cPnt : _vPoints) { + for (auto& cPnt : _vPoints) { if (cPnt.DistanceToLine(cBase, cAxis) > 0) { Base::Vector3f proj; cBase.ProjectToPlane(cPnt, cAxis, proj); @@ -204,9 +223,8 @@ void CylinderFit::ProjectToCylinder() float x = (float(rand()) / float(RAND_MAX)); float y = (float(rand()) / float(RAND_MAX)); float z = (float(rand()) / float(RAND_MAX)); - cMov.Move(x,y,z); - } - while (cMov.DistanceToLine(cBase, cAxis) == 0); + cMov.Move(x, y, z); + } while (cMov.DistanceToLine(cBase, cAxis) == 0); Base::Vector3f proj; cMov.ProjectToPlane(cPnt, cAxis, proj); @@ -223,25 +241,31 @@ void CylinderFit::ProjectToCylinder() // In that case rather use SetApproximations() with a better estimate. void CylinderFit::ComputeApproximationsLine() { - _bIsFitted = false; - _fLastResult = FLOAT_MAX; - _numIter = 0; - _vBase.Set(0.0, 0.0, 0.0); - _vAxis.Set(0.0, 0.0, 0.0); - _dRadius = 0.0; - if (!_vPoints.empty()) - { - std::vector input; - std::transform(_vPoints.begin(), _vPoints.end(), std::back_inserter(input), - [](const Base::Vector3f& v) { return Wm4::Vector3d(v.x, v.y, v.z); }); - Wm4::Line3 kLine = Wm4::OrthogonalLineFit3(input.size(), input.data()); - _vBase.Set(kLine.Origin.X(), kLine.Origin.Y(), kLine.Origin.Z()); - _vAxis.Set(kLine.Direction.X(), kLine.Direction.Y(), kLine.Direction.Z()); + _bIsFitted = false; + _fLastResult = FLOAT_MAX; + _numIter = 0; + _vBase.Set(0.0, 0.0, 0.0); + _vAxis.Set(0.0, 0.0, 0.0); + _dRadius = 0.0; + if (!_vPoints.empty()) { + std::vector input; + std::transform(_vPoints.begin(), + _vPoints.end(), + std::back_inserter(input), + [](const Base::Vector3f& v) { + return Wm4::Vector3d(v.x, v.y, v.z); + }); + Wm4::Line3 kLine = Wm4::OrthogonalLineFit3(input.size(), input.data()); + _vBase.Set(kLine.Origin.X(), kLine.Origin.Y(), kLine.Origin.Z()); + _vAxis.Set(kLine.Direction.X(), kLine.Direction.Y(), kLine.Direction.Z()); - for (std::list< Base::Vector3f >::const_iterator cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) - _dRadius += Base::Vector3d(cIt->x, cIt->y, cIt->z).DistanceToLine(_vBase, _vAxis); - _dRadius /= (double)_vPoints.size(); - } + for (std::list::const_iterator cIt = _vPoints.begin(); + cIt != _vPoints.end(); + ++cIt) { + _dRadius += Base::Vector3d(cIt->x, cIt->y, cIt->z).DistanceToLine(_vBase, _vAxis); + } + _dRadius /= (double)_vPoints.size(); + } } float CylinderFit::Fit() @@ -251,12 +275,14 @@ float CylinderFit::Fit() _numIter = 0; // A minimum of 5 surface points is needed to define a cylinder - if (CountPoints() < 5) + if (CountPoints() < 5) { return FLOAT_MAX; + } // If approximations have not been set/computed then compute some now using the line fit method - if (_dRadius == 0.0) + if (_dRadius == 0.0) { ComputeApproximationsLine(); + } // Check parameters to define the best solution direction // There are 7 parameters but 2 are actually dependent on the others @@ -269,48 +295,56 @@ float CylinderFit::Fit() findBestSolDirection(solDir); // Initialise some matrices and vectors - std::vector< Base::Vector3d > residuals(CountPoints(), Base::Vector3d(0.0, 0.0, 0.0)); + std::vector residuals(CountPoints(), Base::Vector3d(0.0, 0.0, 0.0)); Matrix5x5 atpa; Eigen::VectorXd atpl(5); // Iteration loop... double sigma0; bool cont = true; - while (cont && (_numIter < _maxIter)) - { + while (cont && (_numIter < _maxIter)) { ++_numIter; // Set up the quasi parametric normal equations setupNormalEquationMatrices(solDir, residuals, atpa, atpl); // Solve the equations for the unknown corrections - Eigen::LLT< Matrix5x5 > llt(atpa); - if (llt.info() != Eigen::Success) + Eigen::LLT llt(atpa); + if (llt.info() != Eigen::Success) { return FLOAT_MAX; + } Eigen::VectorXd x = llt.solve(atpl); // Check parameter convergence cont = false; - if ((fabs(x(0)) > _posConvLimit) || (fabs(x(1)) > _posConvLimit) || // the two position parameter corrections - (fabs(x(2)) > _dirConvLimit) || (fabs(x(3)) > _dirConvLimit) || // the two direction parameter corrections - (fabs(x(4)) > _posConvLimit)) // the radius correction + if ((fabs(x(0)) > _posConvLimit) || (fabs(x(1)) > _posConvLimit) + || // the two position parameter corrections + (fabs(x(2)) > _dirConvLimit) || (fabs(x(3)) > _dirConvLimit) + || // the two direction parameter corrections + (fabs(x(4)) > _posConvLimit)) { // the radius correction cont = true; + } - // Before updating the unknowns, compute the residuals and sigma0 and check the residual convergence + // Before updating the unknowns, compute the residuals and sigma0 and check the residual + // convergence bool vConverged; - if (!computeResiduals(solDir, x, residuals, sigma0, _vConvLimit, vConverged)) + if (!computeResiduals(solDir, x, residuals, sigma0, _vConvLimit, vConverged)) { return FLOAT_MAX; - if (!vConverged) + } + if (!vConverged) { cont = true; + } // Update the parameters - if (!updateParameters(solDir, x)) + if (!updateParameters(solDir, x)) { return FLOAT_MAX; + } } // Check for convergence - if (cont) + if (cont) { return FLOAT_MAX; + } _bIsFitted = true; _fLastResult = sigma0; @@ -320,121 +354,129 @@ float CylinderFit::Fit() // Checks initial parameter values and defines the best solution direction to use // Axis direction = (L,M,N) -// solution L: L is biggest axis component and L = f(M,N) and X = Mx (we move the base point along axis to this x-value) -// solution M: M is biggest axis component and M = f(L,N) and Y = My (we move the base point along axis to this y-value) -// solution N: N is biggest axis component and N = f(L,M) and Z = Mz (we move the base point along axis to this z-value) -// where (Mx,My,Mz) is the mean of the input points (centre of gravity) -void CylinderFit::findBestSolDirection(SolutionD &solDir) +// solution L: L is biggest axis component and L = f(M,N) and X = Mx (we move the base point along +// axis to this x-value) solution M: M is biggest axis component and M = f(L,N) and Y = My (we move +// the base point along axis to this y-value) solution N: N is biggest axis component and N = f(L,M) +// and Z = Mz (we move the base point along axis to this z-value) where (Mx,My,Mz) is the mean of +// the input points (centre of gravity) +void CylinderFit::findBestSolDirection(SolutionD& solDir) { - // Choose the best of the three solution 'directions' to use - // This is to avoid a square root of a negative number when computing the dependent parameters - Base::Vector3d dir = _vAxis; - Base::Vector3d pos = _vBase; - dir.Normalize(); - double biggest = dir.x; - solDir = solL; - if (fabs (dir.y) > fabs (biggest)) - { - biggest = dir.y; - solDir = solM; - } - if (fabs (dir.z) > fabs (biggest)) - { - biggest = dir.z; - solDir = solN; - } - if (biggest < 0.0) - dir.Set(-dir.x, -dir.y, -dir.z); // multiplies by -1 + // Choose the best of the three solution 'directions' to use + // This is to avoid a square root of a negative number when computing the dependent parameters + Base::Vector3d dir = _vAxis; + Base::Vector3d pos = _vBase; + dir.Normalize(); + double biggest = dir.x; + solDir = solL; + if (fabs(dir.y) > fabs(biggest)) { + biggest = dir.y; + solDir = solM; + } + if (fabs(dir.z) > fabs(biggest)) { + biggest = dir.z; + solDir = solN; + } + if (biggest < 0.0) { + dir.Set(-dir.x, -dir.y, -dir.z); // multiplies by -1 + } - double fixedVal = 0.0; - double lambda; - switch (solDir) - { - case solL: - fixedVal = meanXObs(); - lambda = (fixedVal - pos.x) / dir.x; - pos.x = fixedVal; - pos.y = pos.y + lambda * dir.y; - pos.z = pos.z + lambda * dir.z; - break; - case solM: - fixedVal = meanYObs(); - lambda = (fixedVal - pos.y) / dir.y; - pos.x = pos.x + lambda * dir.x; - pos.y = fixedVal; - pos.z = pos.z + lambda * dir.z; - break; - case solN: - fixedVal = meanZObs(); - lambda = (fixedVal - pos.z) / dir.z; - pos.x = pos.x + lambda * dir.x; - pos.y = pos.y + lambda * dir.y; - pos.z = fixedVal; - break; - } - _vAxis = dir; - _vBase = pos; + double fixedVal = 0.0; + double lambda; + switch (solDir) { + case solL: + fixedVal = meanXObs(); + lambda = (fixedVal - pos.x) / dir.x; + pos.x = fixedVal; + pos.y = pos.y + lambda * dir.y; + pos.z = pos.z + lambda * dir.z; + break; + case solM: + fixedVal = meanYObs(); + lambda = (fixedVal - pos.y) / dir.y; + pos.x = pos.x + lambda * dir.x; + pos.y = fixedVal; + pos.z = pos.z + lambda * dir.z; + break; + case solN: + fixedVal = meanZObs(); + lambda = (fixedVal - pos.z) / dir.z; + pos.x = pos.x + lambda * dir.x; + pos.y = pos.y + lambda * dir.y; + pos.z = fixedVal; + break; + } + _vAxis = dir; + _vBase = pos; } double CylinderFit::meanXObs() { - double mx = 0.0; - if (!_vPoints.empty()) - { - for (std::list::const_iterator cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) - mx += cIt->x; - mx /= double(_vPoints.size()); - } - return mx; + double mx = 0.0; + if (!_vPoints.empty()) { + for (std::list::const_iterator cIt = _vPoints.begin(); + cIt != _vPoints.end(); + ++cIt) { + mx += cIt->x; + } + mx /= double(_vPoints.size()); + } + return mx; } double CylinderFit::meanYObs() { - double my = 0.0; - if (!_vPoints.empty()) - { - for (std::list::const_iterator cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) - my += cIt->y; - my /= double(_vPoints.size()); - } - return my; + double my = 0.0; + if (!_vPoints.empty()) { + for (std::list::const_iterator cIt = _vPoints.begin(); + cIt != _vPoints.end(); + ++cIt) { + my += cIt->y; + } + my /= double(_vPoints.size()); + } + return my; } double CylinderFit::meanZObs() { - double mz = 0.0; - if (!_vPoints.empty()) - { - for (std::list::const_iterator cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) - mz += cIt->z; - mz /= double(_vPoints.size()); - } - return mz; + double mz = 0.0; + if (!_vPoints.empty()) { + for (std::list::const_iterator cIt = _vPoints.begin(); + cIt != _vPoints.end(); + ++cIt) { + mz += cIt->z; + } + mz /= double(_vPoints.size()); + } + return mz; } // Set up the normal equation matrices // atpa ... 5x5 normal matrix // atpl ... 5x1 matrix (right-hand side of equation) -void CylinderFit::setupNormalEquationMatrices(SolutionD solDir, const std::vector< Base::Vector3d > &residuals, Matrix5x5 &atpa, Eigen::VectorXd &atpl) const +void CylinderFit::setupNormalEquationMatrices(SolutionD solDir, + const std::vector& residuals, + Matrix5x5& atpa, + Eigen::VectorXd& atpl) const { - // Zero matrices - atpa.setZero(); - atpl.setZero(); + // Zero matrices + atpa.setZero(); + atpl.setZero(); - // For each point, setup the observation equation coefficients and add their - // contribution into the normal equation matrices - double a[5], b[3]; - double f0, qw; - std::vector< Base::Vector3d >::const_iterator vIt = residuals.begin(); - std::list< Base::Vector3f >::const_iterator cIt; - for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) - { - // if (using this point) { // currently all given points are used (could modify this if eliminating outliers, etc.... - setupObservation(solDir, *cIt, *vIt, a, f0, qw, b); - addObservationU(a, f0, qw, atpa, atpl); - // } - } - setLowerPart(atpa); + // For each point, setup the observation equation coefficients and add their + // contribution into the normal equation matrices + double a[5], b[3]; + double f0, qw; + std::vector::const_iterator vIt = residuals.begin(); + std::list::const_iterator cIt; + for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) { + // if (using this point) { // currently all given points are used (could modify this if + // eliminating outliers, etc.... + setupObservation(solDir, *cIt, *vIt, a, f0, qw, b); + addObservationU(a, f0, qw, atpa, atpl); + // } + } + setLowerPart(atpa); } // Sets up contributions of given observation to the quasi parametric @@ -443,93 +485,115 @@ void CylinderFit::setupNormalEquationMatrices(SolutionD solDir, const std::vecto // residual ... residual for this point computed from previous iteration (zero for first iteration) // a[5] ... parameter partials // f0 ... reference to f0 term -// qw ... reference to quasi weight (here we are assuming equal unit weights for each observed point coordinate) -// b[3] ... observation partials -void CylinderFit::setupObservation(SolutionD solDir, const Base::Vector3f &point, const Base::Vector3d &residual, double a[5], double &f0, double &qw, double b[3]) const +// qw ... reference to quasi weight (here we are assuming equal unit weights for each observed +// point coordinate) b[3] ... observation partials +void CylinderFit::setupObservation(SolutionD solDir, + const Base::Vector3f& point, + const Base::Vector3d& residual, + double a[5], + double& f0, + double& qw, + double b[3]) const { - // This adjustment requires an update of the observation approximations - // because the residuals do not have a linear relationship. - // New estimates for the observations: - double xEstimate = (double)point.x + residual.x; - double yEstimate = (double)point.y + residual.y; - double zEstimate = (double)point.z + residual.z; + // This adjustment requires an update of the observation approximations + // because the residuals do not have a linear relationship. + // New estimates for the observations: + double xEstimate = (double)point.x + residual.x; + double yEstimate = (double)point.y + residual.y; + double zEstimate = (double)point.z + residual.z; - // intermediate parameters - double lambda = _vAxis.x * (xEstimate - _vBase.x) + _vAxis.y * (yEstimate - _vBase.y) + _vAxis.z * (zEstimate - _vBase.z); - double x0 = _vBase.x + lambda * _vAxis.x; - double y0 = _vBase.y + lambda * _vAxis.y; - double z0 = _vBase.z + lambda * _vAxis.z; - double dx = xEstimate - x0; - double dy = yEstimate - y0; - double dz = zEstimate - z0; - double dx00 = _vBase.x - xEstimate; - double dy00 = _vBase.y - yEstimate; - double dz00 = _vBase.z - zEstimate; + // intermediate parameters + double lambda = _vAxis.x * (xEstimate - _vBase.x) + _vAxis.y * (yEstimate - _vBase.y) + + _vAxis.z * (zEstimate - _vBase.z); + double x0 = _vBase.x + lambda * _vAxis.x; + double y0 = _vBase.y + lambda * _vAxis.y; + double z0 = _vBase.z + lambda * _vAxis.z; + double dx = xEstimate - x0; + double dy = yEstimate - y0; + double dz = zEstimate - z0; + double dx00 = _vBase.x - xEstimate; + double dy00 = _vBase.y - yEstimate; + double dz00 = _vBase.z - zEstimate; - // partials of the observations - b[0] = 2.0 * (dx - _vAxis.x * _vAxis.x * dx - _vAxis.x * _vAxis.y * dy - _vAxis.x * _vAxis.z * dz); - b[1] = 2.0 * (dy - _vAxis.x * _vAxis.y * dx - _vAxis.y * _vAxis.y * dy - _vAxis.y * _vAxis.z * dz); - b[2] = 2.0 * (dz - _vAxis.x * _vAxis.z * dx - _vAxis.y * _vAxis.z * dy - _vAxis.z * _vAxis.z * dz); + // partials of the observations + b[0] = + 2.0 * (dx - _vAxis.x * _vAxis.x * dx - _vAxis.x * _vAxis.y * dy - _vAxis.x * _vAxis.z * dz); + b[1] = + 2.0 * (dy - _vAxis.x * _vAxis.y * dx - _vAxis.y * _vAxis.y * dy - _vAxis.y * _vAxis.z * dz); + b[2] = + 2.0 * (dz - _vAxis.x * _vAxis.z * dx - _vAxis.y * _vAxis.z * dy - _vAxis.z * _vAxis.z * dz); - // partials of the parameters - switch (solDir) - { - double ddxdl, ddydl, ddzdl; - double ddxdm, ddydm, ddzdm; - double ddxdn, ddydn, ddzdn; - case solL: - // order of parameters: Yc, Zc, M, N, R - ddxdm = -2.0 * _vAxis.y * dx00 + (_vAxis.x - _vAxis.y * _vAxis.y / _vAxis.x) * dy00 - (_vAxis.y * _vAxis.z / _vAxis.x) * dz00; - ddydm = (_vAxis.x - _vAxis.y * _vAxis.y / _vAxis.x) * dx00 + 2.0 * _vAxis.y * dy00 + _vAxis.z * dz00; - ddzdm = -(_vAxis.y * _vAxis.z / _vAxis.x) * dx00 + _vAxis.z * dy00; - ddxdn = -2.0 * _vAxis.z * dx00 - (_vAxis.y * _vAxis.z / _vAxis.x) * dy00 + (_vAxis.x - _vAxis.z * _vAxis.z / _vAxis.x) * dz00; - ddydn = -(_vAxis.y * _vAxis.z / _vAxis.x) * dx00 + _vAxis.y * dz00; - ddzdn = (_vAxis.x - _vAxis.z * _vAxis.z / _vAxis.x) * dx00 + _vAxis.y * dy00 + 2.0 * _vAxis.z * dz00; - a[0] = -b[1]; - a[1] = -b[2]; - a[2] = 2.0 * (dx * ddxdm + dy * ddydm + dz * ddzdm); - a[3] = 2.0 * (dx * ddxdn + dy * ddydn + dz * ddzdn); - a[4] = -2.0 * _dRadius; - break; - case solM: - // order of parameters: Xc, Zc, L, N, R - ddxdl = 2.0 * _vAxis.x * dx00 + (_vAxis.y - _vAxis.x * _vAxis.x / _vAxis.y) * dy00 + _vAxis.z * dz00; - ddydl = (_vAxis.y - _vAxis.x * _vAxis.x / _vAxis.y) * dx00 - 2.0 * _vAxis.x * dy00 - (_vAxis.x * _vAxis.z / _vAxis.y) * dz00; - ddzdl = _vAxis.z * dx00 - (_vAxis.x * _vAxis.z / _vAxis.y) * dy00; - ddxdn = -(_vAxis.x * _vAxis.z / _vAxis.y) * dy00 + _vAxis.x * dz00; - ddydn = -(_vAxis.x * _vAxis.z / _vAxis.y) * dx00 - 2.0 * _vAxis.z * dy00 + (_vAxis.y - _vAxis.z * _vAxis.z / _vAxis.y) * dz00; - ddzdn = _vAxis.x * dx00 + (_vAxis.y - _vAxis.z * _vAxis.z / _vAxis.y) * dy00 + 2.0 * _vAxis.z * dz00; - a[0] = -b[0]; - a[1] = -b[2]; - a[2] = 2.0 * (dx * ddxdl + dy * ddydl + dz * ddzdl); - a[3] = 2.0 * (dx * ddxdn + dy * ddydn + dz * ddzdn); - a[4] = -2.0 * _dRadius; - break; - case solN: - // order of parameters: Xc, Yc, L, M, R - ddxdl = 2.0 * _vAxis.x * dx00 + _vAxis.y * dy00 + (_vAxis.z - _vAxis.x * _vAxis.x / _vAxis.z) * dz00; - ddydl = _vAxis.y * dx00 - (_vAxis.x * _vAxis.y / _vAxis.z) * dz00; - ddzdl = (_vAxis.z - _vAxis.x * _vAxis.x / _vAxis.z) * dx00 - (_vAxis.x * _vAxis.y / _vAxis.z) * dy00 - 2.0 * _vAxis.x * dz00; - ddxdm = _vAxis.x * dy00 - (_vAxis.x * _vAxis.y / _vAxis.z) * dz00; - ddydm = _vAxis.x * dx00 + 2.0 * _vAxis.y * dy00 + (_vAxis.z - _vAxis.y * _vAxis.y / _vAxis.z) * dz00; - ddzdm = - (_vAxis.x * _vAxis.y / _vAxis.z) * dx00 + (_vAxis.z - _vAxis.y * _vAxis.y / _vAxis.z) * dy00 - 2.0 * _vAxis.y * dz00; - a[0] = -b[0]; - a[1] = -b[1]; - a[2] = 2.0 * (dx * ddxdl + dy * ddydl + dz * ddzdl); - a[3] = 2.0 * (dx * ddxdm + dy * ddydm + dz * ddzdm); - a[4] = -2.0 * _dRadius; - break; - } + // partials of the parameters + switch (solDir) { + double ddxdl, ddydl, ddzdl; + double ddxdm, ddydm, ddzdm; + double ddxdn, ddydn, ddzdn; + case solL: + // order of parameters: Yc, Zc, M, N, R + ddxdm = -2.0 * _vAxis.y * dx00 + (_vAxis.x - _vAxis.y * _vAxis.y / _vAxis.x) * dy00 + - (_vAxis.y * _vAxis.z / _vAxis.x) * dz00; + ddydm = (_vAxis.x - _vAxis.y * _vAxis.y / _vAxis.x) * dx00 + 2.0 * _vAxis.y * dy00 + + _vAxis.z * dz00; + ddzdm = -(_vAxis.y * _vAxis.z / _vAxis.x) * dx00 + _vAxis.z * dy00; + ddxdn = -2.0 * _vAxis.z * dx00 - (_vAxis.y * _vAxis.z / _vAxis.x) * dy00 + + (_vAxis.x - _vAxis.z * _vAxis.z / _vAxis.x) * dz00; + ddydn = -(_vAxis.y * _vAxis.z / _vAxis.x) * dx00 + _vAxis.y * dz00; + ddzdn = (_vAxis.x - _vAxis.z * _vAxis.z / _vAxis.x) * dx00 + _vAxis.y * dy00 + + 2.0 * _vAxis.z * dz00; + a[0] = -b[1]; + a[1] = -b[2]; + a[2] = 2.0 * (dx * ddxdm + dy * ddydm + dz * ddzdm); + a[3] = 2.0 * (dx * ddxdn + dy * ddydn + dz * ddzdn); + a[4] = -2.0 * _dRadius; + break; + case solM: + // order of parameters: Xc, Zc, L, N, R + ddxdl = 2.0 * _vAxis.x * dx00 + (_vAxis.y - _vAxis.x * _vAxis.x / _vAxis.y) * dy00 + + _vAxis.z * dz00; + ddydl = (_vAxis.y - _vAxis.x * _vAxis.x / _vAxis.y) * dx00 - 2.0 * _vAxis.x * dy00 + - (_vAxis.x * _vAxis.z / _vAxis.y) * dz00; + ddzdl = _vAxis.z * dx00 - (_vAxis.x * _vAxis.z / _vAxis.y) * dy00; + ddxdn = -(_vAxis.x * _vAxis.z / _vAxis.y) * dy00 + _vAxis.x * dz00; + ddydn = -(_vAxis.x * _vAxis.z / _vAxis.y) * dx00 - 2.0 * _vAxis.z * dy00 + + (_vAxis.y - _vAxis.z * _vAxis.z / _vAxis.y) * dz00; + ddzdn = _vAxis.x * dx00 + (_vAxis.y - _vAxis.z * _vAxis.z / _vAxis.y) * dy00 + + 2.0 * _vAxis.z * dz00; + a[0] = -b[0]; + a[1] = -b[2]; + a[2] = 2.0 * (dx * ddxdl + dy * ddydl + dz * ddzdl); + a[3] = 2.0 * (dx * ddxdn + dy * ddydn + dz * ddzdn); + a[4] = -2.0 * _dRadius; + break; + case solN: + // order of parameters: Xc, Yc, L, M, R + ddxdl = 2.0 * _vAxis.x * dx00 + _vAxis.y * dy00 + + (_vAxis.z - _vAxis.x * _vAxis.x / _vAxis.z) * dz00; + ddydl = _vAxis.y * dx00 - (_vAxis.x * _vAxis.y / _vAxis.z) * dz00; + ddzdl = (_vAxis.z - _vAxis.x * _vAxis.x / _vAxis.z) * dx00 + - (_vAxis.x * _vAxis.y / _vAxis.z) * dy00 - 2.0 * _vAxis.x * dz00; + ddxdm = _vAxis.x * dy00 - (_vAxis.x * _vAxis.y / _vAxis.z) * dz00; + ddydm = _vAxis.x * dx00 + 2.0 * _vAxis.y * dy00 + + (_vAxis.z - _vAxis.y * _vAxis.y / _vAxis.z) * dz00; + ddzdm = -(_vAxis.x * _vAxis.y / _vAxis.z) * dx00 + + (_vAxis.z - _vAxis.y * _vAxis.y / _vAxis.z) * dy00 - 2.0 * _vAxis.y * dz00; + a[0] = -b[0]; + a[1] = -b[1]; + a[2] = 2.0 * (dx * ddxdl + dy * ddydl + dz * ddzdl); + a[3] = 2.0 * (dx * ddxdm + dy * ddydm + dz * ddzdm); + a[4] = -2.0 * _dRadius; + break; + } - // free term - f0 = _dRadius * _dRadius - dx * dx - dy * dy - dz * dz + b[0] * residual.x + b[1] * residual.y + b[2] * residual.z; + // free term + f0 = _dRadius * _dRadius - dx * dx - dy * dy - dz * dz + b[0] * residual.x + b[1] * residual.y + + b[2] * residual.z; - // quasi weight (using equal weights for cylinder point coordinate observations) - //w[0] = 1.0; - //w[1] = 1.0; - //w[2] = 1.0; - //qw = 1.0 / (b[0] * b[0] / w[0] + b[1] * b[1] / w[1] + b[2] * b[2] / w[2]); - qw = 1.0 / (b[0] * b[0] + b[1] * b[1] + b[2] * b[2]); + // quasi weight (using equal weights for cylinder point coordinate observations) + // w[0] = 1.0; + // w[1] = 1.0; + // w[2] = 1.0; + // qw = 1.0 / (b[0] * b[0] / w[0] + b[1] * b[1] / w[1] + b[2] * b[2] / w[2]); + qw = 1.0 / (b[0] * b[0] + b[1] * b[1] + b[2] * b[2]); } // Computes contribution of the given observation equation on the normal equation matrices @@ -542,158 +606,174 @@ void CylinderFit::setupObservation(SolutionD solDir, const Base::Vector3f &point // pi ... weight of observation (= quasi weight qw for this solution) // atpa ... 5x5 normal equation matrix // atpl ... 5x1 matrix/vector (right-hand side of equations) -void CylinderFit::addObservationU(double a[5], double li, double pi, Matrix5x5 &atpa, Eigen::VectorXd &atpl) const +void CylinderFit::addObservationU(double a[5], + double li, + double pi, + Matrix5x5& atpa, + Eigen::VectorXd& atpl) const { - for (int i = 0; i < 5; ++i) - { - double aipi = a[i] * pi; - for (int j = i; j < 5; ++j) - { - atpa(i, j) += aipi * a[j]; - //atpa(j, i) = atpa(i, j); // it's a symmetrical matrix, we'll set this later after all observations processed - } - atpl(i) += aipi * li; - } + for (int i = 0; i < 5; ++i) { + double aipi = a[i] * pi; + for (int j = i; j < 5; ++j) { + atpa(i, j) += aipi * a[j]; + // atpa(j, i) = atpa(i, j); // it's a symmetrical matrix, we'll set this later after all + // observations processed + } + atpl(i) += aipi * li; + } } // Set the lower part of the normal matrix equal to the upper part // This is done after all the observations have been added -void CylinderFit::setLowerPart(Matrix5x5 &atpa) const +void CylinderFit::setLowerPart(Matrix5x5& atpa) const { - for (int i = 0; i < 5; ++i) - for (int j = i+1; j < 5; ++j) // skip the diagonal elements - atpa(j, i) = atpa(i, j); + for (int i = 0; i < 5; ++i) { + for (int j = i + 1; j < 5; ++j) { // skip the diagonal elements + atpa(j, i) = atpa(i, j); + } + } } // Compute the residuals and sigma0 and check the residual convergence -bool CylinderFit::computeResiduals(SolutionD solDir, const Eigen::VectorXd &x, std::vector< Base::Vector3d > &residuals, double &sigma0, double vConvLimit, bool &vConverged) const +bool CylinderFit::computeResiduals(SolutionD solDir, + const Eigen::VectorXd& x, + std::vector& residuals, + double& sigma0, + double vConvLimit, + bool& vConverged) const { - vConverged = true; - int nPtsUsed = 0; - sigma0 = 0.0; - double a[5], b[3]; - double f0, qw; - //double maxdVx = 0.0; - //double maxdVy = 0.0; - //double maxdVz = 0.0; - //double rmsVv = 0.0; - std::vector< Base::Vector3d >::iterator vIt = residuals.begin(); - std::list< Base::Vector3f >::const_iterator cIt; - for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) - { - // if (using this point) { // currently all given points are used (could modify this if eliminating outliers, etc.... - ++nPtsUsed; - Base::Vector3d &v = *vIt; - setupObservation(solDir, *cIt, v, a, f0, qw, b); - double qv = -f0; - for (int i = 0; i < 5; ++i) - qv += a[i] * x(i); + vConverged = true; + int nPtsUsed = 0; + sigma0 = 0.0; + double a[5], b[3]; + double f0, qw; + // double maxdVx = 0.0; + // double maxdVy = 0.0; + // double maxdVz = 0.0; + // double rmsVv = 0.0; + std::vector::iterator vIt = residuals.begin(); + std::list::const_iterator cIt; + for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) { + // if (using this point) { // currently all given points are used (could modify this if + // eliminating outliers, etc.... + ++nPtsUsed; + Base::Vector3d& v = *vIt; + setupObservation(solDir, *cIt, v, a, f0, qw, b); + double qv = -f0; + for (int i = 0; i < 5; ++i) { + qv += a[i] * x(i); + } - // We are using equal weights for cylinder point coordinate observations (see setupObservation) - // i.e. w[0] = w[1] = w[2] = 1.0; - //double vx = -qw * qv * b[0] / w[0]; - //double vy = -qw * qv * b[1] / w[1]; - //double vz = -qw * qv * b[2] / w[2]; - double vx = -qw * qv * b[0]; - double vy = -qw * qv * b[1]; - double vz = -qw * qv * b[2]; - double dVx = fabs(vx - v.x); - double dVy = fabs(vy - v.y); - double dVz = fabs(vz - v.z); - v.x = vx; - v.y = vy; - v.z = vz; + // We are using equal weights for cylinder point coordinate observations (see + // setupObservation) i.e. w[0] = w[1] = w[2] = 1.0; + // double vx = -qw * qv * b[0] / w[0]; + // double vy = -qw * qv * b[1] / w[1]; + // double vz = -qw * qv * b[2] / w[2]; + double vx = -qw * qv * b[0]; + double vy = -qw * qv * b[1]; + double vz = -qw * qv * b[2]; + double dVx = fabs(vx - v.x); + double dVy = fabs(vy - v.y); + double dVz = fabs(vz - v.z); + v.x = vx; + v.y = vy; + v.z = vz; - //double vv = v.x * v.x + v.y * v.y + v.z * v.z; - //rmsVv += vv * vv; + // double vv = v.x * v.x + v.y * v.y + v.z * v.z; + // rmsVv += vv * vv; - //sigma0 += v.x * w[0] * v.x + v.y * w[1] * v.y + v.z * w[2] * v.z; - sigma0 += v.x * v.x + v.y * v.y + v.z * v.z; + // sigma0 += v.x * w[0] * v.x + v.y * w[1] * v.y + v.z * w[2] * v.z; + sigma0 += v.x * v.x + v.y * v.y + v.z * v.z; - if ((dVx > vConvLimit) || (dVy > vConvLimit) || (dVz > vConvLimit)) - vConverged = false; + if ((dVx > vConvLimit) || (dVy > vConvLimit) || (dVz > vConvLimit)) { + vConverged = false; + } - //if (dVx > maxdVx) - // maxdVx = dVx; - //if (dVy > maxdVy) - // maxdVy = dVy; - //if (dVz > maxdVz) - // maxdVz = dVz; - } + // if (dVx > maxdVx) + // maxdVx = dVx; + // if (dVy > maxdVy) + // maxdVy = dVy; + // if (dVz > maxdVz) + // maxdVz = dVz; + } - // Compute degrees of freedom and sigma0 - if (nPtsUsed < 5) // A minimum of 5 surface points is needed to define a cylinder - { - sigma0 = 0.0; - return false; - } - int df = nPtsUsed - 5; - if (df == 0) - sigma0 = 0.0; - else - sigma0 = sqrt (sigma0 / (double)df); + // Compute degrees of freedom and sigma0 + if (nPtsUsed < 5) // A minimum of 5 surface points is needed to define a cylinder + { + sigma0 = 0.0; + return false; + } + int df = nPtsUsed - 5; + if (df == 0) { + sigma0 = 0.0; + } + else { + sigma0 = sqrt(sigma0 / (double)df); + } - //rmsVv = sqrt(rmsVv / (double)nPtsUsed); - //Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS Vv: %0.4f\n", x(0), x(1), x(2), x(3), x(4), maxdVx, maxdVy, maxdVz, rmsVv); + // rmsVv = sqrt(rmsVv / (double)nPtsUsed); + // Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS + // Vv: %0.4f\n", x(0), x(1), x(2), x(3), x(4), maxdVx, maxdVy, maxdVz, rmsVv); - return true; + return true; } // Update the parameters after solving the normal equations -bool CylinderFit::updateParameters(SolutionD solDir, const Eigen::VectorXd &x) +bool CylinderFit::updateParameters(SolutionD solDir, const Eigen::VectorXd& x) { - // Update the parameters used as unknowns in the solution - switch (solDir) - { - case solL: // order of parameters: Yc, Zc, M, N, R - _vBase.y += x(0); - _vBase.z += x(1); - _vAxis.y += x(2); - _vAxis.z += x(3); - _dRadius += x(4); - break; - case solM: // order of parameters: Xc, Zc, L, N, R - _vBase.x += x(0); - _vBase.z += x(1); - _vAxis.x += x(2); - _vAxis.z += x(3); - _dRadius += x(4); - break; - case solN: // order of parameters: Xc, Yc, L, M, R - _vBase.x += x(0); - _vBase.y += x(1); - _vAxis.x += x(2); - _vAxis.y += x(3); - _dRadius += x(4); - break; - } + // Update the parameters used as unknowns in the solution + switch (solDir) { + case solL: // order of parameters: Yc, Zc, M, N, R + _vBase.y += x(0); + _vBase.z += x(1); + _vAxis.y += x(2); + _vAxis.z += x(3); + _dRadius += x(4); + break; + case solM: // order of parameters: Xc, Zc, L, N, R + _vBase.x += x(0); + _vBase.z += x(1); + _vAxis.x += x(2); + _vAxis.z += x(3); + _dRadius += x(4); + break; + case solN: // order of parameters: Xc, Yc, L, M, R + _vBase.x += x(0); + _vBase.y += x(1); + _vAxis.x += x(2); + _vAxis.y += x(3); + _dRadius += x(4); + break; + } - // Update the dependent axis direction parameter - double l2, m2, n2; - switch (solDir) - { - case solL: - l2 = 1.0 - _vAxis.y * _vAxis.y - _vAxis.z * _vAxis.z; - if (l2 <= 0.0) - return false; // L*L <= 0 ! - _vAxis.x = sqrt(l2); - //_vBase.x is fixed - break; - case solM: - m2 = 1.0 - _vAxis.x * _vAxis.x - _vAxis.z * _vAxis.z; - if (m2 <= 0.0) - return false; // M*M <= 0 ! - _vAxis.y = sqrt(m2); - //_vBase.y is fixed - break; - case solN: - n2 = 1.0 - _vAxis.x * _vAxis.x - _vAxis.y * _vAxis.y; - if (n2 <= 0.0) - return false; // N*N <= 0 ! - _vAxis.z = sqrt(n2); - //_vBase.z is fixed - break; - } + // Update the dependent axis direction parameter + double l2, m2, n2; + switch (solDir) { + case solL: + l2 = 1.0 - _vAxis.y * _vAxis.y - _vAxis.z * _vAxis.z; + if (l2 <= 0.0) { + return false; // L*L <= 0 ! + } + _vAxis.x = sqrt(l2); + //_vBase.x is fixed + break; + case solM: + m2 = 1.0 - _vAxis.x * _vAxis.x - _vAxis.z * _vAxis.z; + if (m2 <= 0.0) { + return false; // M*M <= 0 ! + } + _vAxis.y = sqrt(m2); + //_vBase.y is fixed + break; + case solN: + n2 = 1.0 - _vAxis.x * _vAxis.x - _vAxis.y * _vAxis.y; + if (n2 <= 0.0) { + return false; // N*N <= 0 ! + } + _vAxis.z = sqrt(n2); + //_vBase.z is fixed + break; + } - return true; + return true; } diff --git a/src/Mod/Mesh/App/Core/CylinderFit.h b/src/Mod/Mesh/App/Core/CylinderFit.h index 72d3ad0bda..817c586a1a 100644 --- a/src/Mod/Mesh/App/Core/CylinderFit.h +++ b/src/Mod/Mesh/App/Core/CylinderFit.h @@ -29,22 +29,26 @@ // ------------------------------------------------------------------------------- -namespace MeshCoreFit { +namespace MeshCoreFit +{ -using Matrix5x5 = Eigen::Matrix; +using Matrix5x5 = Eigen::Matrix; /** * Best-fit cylinder for a given set of points. * Doesn't expect points on any top or bottom end-planes, only points on the side surface */ -class MeshExport CylinderFit : public MeshCore::Approximation +class MeshExport CylinderFit: public MeshCore::Approximation { protected: - // Solution 'direction' enumeration - enum SolutionD {solL = 0, // solution L: L is biggest axis component and L = f(M,N) - solM = 1, // solution M: M is biggest axis component and M = f(L,N) - solN = 2 // solution N: N is biggest axis component and N = f(L,M) - }; + // Solution 'direction' enumeration + enum SolutionD + { + solL = 0, // solution L: L is biggest axis component and L = f(M,N) + solM = 1, // solution M: M is biggest axis component and M = f(L,N) + solN = 2 // solution N: N is biggest axis component and N = f(L,M) + }; + public: /** * Construction @@ -53,33 +57,40 @@ public: /** * Set approximations before calling Fit() */ - void SetApproximations(double radius, const Base::Vector3d &base, const Base::Vector3d &axis); + void SetApproximations(double radius, const Base::Vector3d& base, const Base::Vector3d& axis); /** * Set approximations before calling Fit(). This version computes the radius - * using the given axis and the existing surface points. + * using the given axis and the existing surface points. */ - void SetApproximations(const Base::Vector3d &base, const Base::Vector3d &axis); + void SetApproximations(const Base::Vector3d& base, const Base::Vector3d& axis); /** - * Set iteration convergence criteria for the fit if special values are needed. - * The default values set in the constructor are suitable for most uses + * Set iteration convergence criteria for the fit if special values are needed. + * The default values set in the constructor are suitable for most uses */ - void SetConvergenceCriteria(double posConvLimit, double dirConvLimit, double vConvLimit, int maxIter); + void SetConvergenceCriteria(double posConvLimit, + double dirConvLimit, + double vConvLimit, + int maxIter); /** - * Returns the radius of the fitted cylinder. If Fit() has not been called then zero is returned. + * Returns the radius of the fitted cylinder. If Fit() has not been called then zero is + * returned. */ double GetRadius() const; /** - * Returns the base of the fitted cylinder. If Fit() has not been called the null vector is returned. + * Returns the base of the fitted cylinder. If Fit() has not been called the null vector is + * returned. */ Base::Vector3d GetBase() const; /** - * Returns the axis of the fitted cylinder. If Fit() has not been called the null vector is returned. + * Returns the axis of the fitted cylinder. If Fit() has not been called the null vector is + * returned. */ Base::Vector3d GetAxis() const; /** - * Returns the number of iterations that Fit() needed to converge. If Fit() has not been called then zero is returned. + * Returns the number of iterations that Fit() needed to converge. If Fit() has not been called + * then zero is returned. */ - int GetNumIterations() const; + int GetNumIterations() const; /** * Fit a cylinder into the given points. If the fit fails FLOAT_MAX is returned. */ @@ -88,7 +99,7 @@ public: * Returns the distance from the point \a rcPoint to the fitted cylinder. If Fit() has not been * called FLOAT_MAX is returned. */ - float GetDistanceToCylinder(const Base::Vector3f &rcPoint) const; + float GetDistanceToCylinder(const Base::Vector3f& rcPoint) const; /** * Returns the standard deviation from the points to the fitted cylinder. If Fit() has not been * called FLOAT_MAX is returned. @@ -101,64 +112,81 @@ public: protected: /** - * Compute approximations for the parameters using all points using the line fit method + * Compute approximations for the parameters using all points using the line fit method */ - void ComputeApproximationsLine(); - /** - * Checks initial parameter values and defines the best solution direction to use - */ - void findBestSolDirection(SolutionD &solDir); + void ComputeApproximationsLine(); /** - * Compute the mean X-value of all of the points (observed/input surface points) + * Checks initial parameter values and defines the best solution direction to use */ - double meanXObs(); + void findBestSolDirection(SolutionD& solDir); /** - * Compute the mean Y-value of all of the points (observed/input surface points) + * Compute the mean X-value of all of the points (observed/input surface points) */ - double meanYObs(); + double meanXObs(); /** - * Compute the mean Z-value of all of the points (observed/input surface points) + * Compute the mean Y-value of all of the points (observed/input surface points) */ - double meanZObs(); - /** - * Set up the normal equations + double meanYObs(); + /** + * Compute the mean Z-value of all of the points (observed/input surface points) */ - void setupNormalEquationMatrices(SolutionD solDir, const std::vector< Base::Vector3d > &residuals, Matrix5x5 &atpa, Eigen::VectorXd &atpl) const; - /** - * Sets up contributions of given observation to the normal equation matrices. + double meanZObs(); + /** + * Set up the normal equations */ - void setupObservation(SolutionD solDir, const Base::Vector3f &point, const Base::Vector3d &residual, double a[5], double &f0, double &qw, double b[3]) const; - /** - * Computes contribution of the given observation equation on the normal equation matrices + void setupNormalEquationMatrices(SolutionD solDir, + const std::vector& residuals, + Matrix5x5& atpa, + Eigen::VectorXd& atpl) const; + /** + * Sets up contributions of given observation to the normal equation matrices. */ - void addObservationU(double a[5], double li, double pi, Matrix5x5 &atpa, Eigen::VectorXd &atpl) const; - /** - * Set the lower part of the normal matrix equal to the upper part + void setupObservation(SolutionD solDir, + const Base::Vector3f& point, + const Base::Vector3d& residual, + double a[5], + double& f0, + double& qw, + double b[3]) const; + /** + * Computes contribution of the given observation equation on the normal equation matrices */ - void setLowerPart(Matrix5x5 &atpa) const; + void addObservationU(double a[5], + double li, + double pi, + Matrix5x5& atpa, + Eigen::VectorXd& atpl) const; + /** + * Set the lower part of the normal matrix equal to the upper part + */ + void setLowerPart(Matrix5x5& atpa) const; - /** - * Compute the residuals and sigma0 and check the residual convergence + /** + * Compute the residuals and sigma0 and check the residual convergence */ - bool computeResiduals(SolutionD solDir, const Eigen::VectorXd &x, std::vector< Base::Vector3d > &residuals, double &sigma0, double vConvLimit, bool &vConverged) const; - /** - * Update the parameters after solving the normal equations + bool computeResiduals(SolutionD solDir, + const Eigen::VectorXd& x, + std::vector& residuals, + double& sigma0, + double vConvLimit, + bool& vConverged) const; + /** + * Update the parameters after solving the normal equations */ - bool updateParameters(SolutionD solDir, const Eigen::VectorXd &x); + bool updateParameters(SolutionD solDir, const Eigen::VectorXd& x); private: - Base::Vector3d _vBase; /**< Base vector of the cylinder (point on axis). */ - Base::Vector3d _vAxis; /**< Axis of the cylinder. */ - double _dRadius{0}; /**< Radius of the cylinder. */ - int _numIter{0}; /**< Number of iterations for solution to converge. */ - double _posConvLimit{0.0001}; /**< Position and radius parameter convergence threshold. */ - double _dirConvLimit{0.000001}; /**< Direction parameter convergence threshold. */ - double _vConvLimit{0.001}; /**< Residual convergence threshold. */ - int _maxIter{50}; /**< Maximum number of iterations. */ - + Base::Vector3d _vBase; /**< Base vector of the cylinder (point on axis). */ + Base::Vector3d _vAxis; /**< Axis of the cylinder. */ + double _dRadius {0}; /**< Radius of the cylinder. */ + int _numIter {0}; /**< Number of iterations for solution to converge. */ + double _posConvLimit {0.0001}; /**< Position and radius parameter convergence threshold. */ + double _dirConvLimit {0.000001}; /**< Direction parameter convergence threshold. */ + double _vConvLimit {0.001}; /**< Residual convergence threshold. */ + int _maxIter {50}; /**< Maximum number of iterations. */ }; -} // namespace MeshCore +} // namespace MeshCoreFit -#endif // MESH_CYLINDER_FIT_H +#endif // MESH_CYLINDER_FIT_H diff --git a/src/Mod/Mesh/App/Core/Decimation.cpp b/src/Mod/Mesh/App/Core/Decimation.cpp index 210f621d52..b9d0a2389a 100644 --- a/src/Mod/Mesh/App/Core/Decimation.cpp +++ b/src/Mod/Mesh/App/Core/Decimation.cpp @@ -30,9 +30,8 @@ using namespace MeshCore; MeshSimplify::MeshSimplify(MeshKernel& mesh) - : myKernel(mesh) -{ -} + : myKernel(mesh) +{} void MeshSimplify::simplify(float tolerance, float reduction) { @@ -53,14 +52,16 @@ void MeshSimplify::simplify(float tolerance, float reduction) Simplify::Triangle t; t.deleted = 0; t.dirty = 0; - for (double & j : t.err) + for (double& j : t.err) { j = 0.0; - for (int j = 0; j < 3; j++) + } + for (int j = 0; j < 3; j++) { t.v[j] = facets[i]._aulPoints[j]; + } alg.triangles.push_back(t); } - int target_count = static_cast(static_cast(facets.size()) * (1.0f-reduction)); + int target_count = static_cast(static_cast(facets.size()) * (1.0f - reduction)); // Simplification starts alg.simplify_mesh(target_count, tolerance); @@ -68,18 +69,19 @@ void MeshSimplify::simplify(float tolerance, float reduction) // Simplification done MeshPointArray new_points; new_points.reserve(alg.vertices.size()); - for (const auto & vertex : alg.vertices) { + for (const auto& vertex : alg.vertices) { new_points.push_back(vertex.p); } std::size_t numFacets = 0; - for (const auto & triangle : alg.triangles) { - if (!triangle.deleted) + for (const auto& triangle : alg.triangles) { + if (!triangle.deleted) { numFacets++; + } } MeshFacetArray new_facets; new_facets.reserve(numFacets); - for (const auto & triangle : alg.triangles) { + for (const auto& triangle : alg.triangles) { if (!triangle.deleted) { MeshFacet face; face._aulPoints[0] = triangle.v[0]; @@ -111,10 +113,12 @@ void MeshSimplify::simplify(int targetSize) Simplify::Triangle t; t.deleted = 0; t.dirty = 0; - for (double & j : t.err) + for (double& j : t.err) { j = 0.0; - for (int j = 0; j < 3; j++) + } + for (int j = 0; j < 3; j++) { t.v[j] = facets[i]._aulPoints[j]; + } alg.triangles.push_back(t); } @@ -124,18 +128,19 @@ void MeshSimplify::simplify(int targetSize) // Simplification done MeshPointArray new_points; new_points.reserve(alg.vertices.size()); - for (const auto & vertex : alg.vertices) { + for (const auto& vertex : alg.vertices) { new_points.push_back(vertex.p); } std::size_t numFacets = 0; - for (const auto & triangle : alg.triangles) { - if (!triangle.deleted) + for (const auto& triangle : alg.triangles) { + if (!triangle.deleted) { numFacets++; + } } MeshFacetArray new_facets; new_facets.reserve(numFacets); - for (const auto & triangle : alg.triangles) { + for (const auto& triangle : alg.triangles) { if (!triangle.deleted) { MeshFacet face; face._aulPoints[0] = triangle.v[0]; diff --git a/src/Mod/Mesh/App/Core/Decimation.h b/src/Mod/Mesh/App/Core/Decimation.h index cad05356a6..ba19bfd9cb 100644 --- a/src/Mod/Mesh/App/Core/Decimation.h +++ b/src/Mod/Mesh/App/Core/Decimation.h @@ -33,7 +33,7 @@ class MeshKernel; class MeshExport MeshSimplify { public: - MeshSimplify(MeshKernel&);//explicit bombs + MeshSimplify(MeshKernel&); // explicit bombs void simplify(float tolerance, float reduction); void simplify(int targetSize); @@ -41,7 +41,7 @@ private: MeshKernel& myKernel; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_DECIMATION_H diff --git a/src/Mod/Mesh/App/Core/Definitions.cpp b/src/Mod/Mesh/App/Core/Definitions.cpp index dc99816a62..ff8882c399 100644 --- a/src/Mod/Mesh/App/Core/Definitions.cpp +++ b/src/Mod/Mesh/App/Core/Definitions.cpp @@ -24,29 +24,32 @@ #include -#include #include "Definitions.h" +#include -namespace MeshCore { - -template<> MeshExport const float Math ::PI = (float)(4.0*atan(1.0)); -template<> MeshExport const double Math::PI = 4.0*atan(1.0); - -float MeshDefinitions::_fMinPointDistance = float(MESH_MIN_PT_DIST); -float MeshDefinitions::_fMinPointDistanceP2 = _fMinPointDistance * _fMinPointDistance; -float MeshDefinitions::_fMinPointDistanceD1 = _fMinPointDistance; -float MeshDefinitions::_fMinEdgeLength = MESH_MIN_EDGE_LEN; -bool MeshDefinitions::_bRemoveMinLength = MESH_REMOVE_MIN_LEN; -float MeshDefinitions::_fMinEdgeAngle = Base::toRadians(MESH_MIN_EDGE_ANGLE); - -MeshDefinitions::MeshDefinitions () = default; - -void MeshDefinitions::SetMinPointDistance (float fMin) +namespace MeshCore { - _fMinPointDistance = fMin; - _fMinPointDistanceP2 = fMin * fMin; - _fMinPointDistanceD1 = float(sqrt((fMin * fMin) / 3.0f)); + +template<> +MeshExport const float Math::PI = (float)(4.0 * atan(1.0)); +template<> +MeshExport const double Math::PI = 4.0 * atan(1.0); + +float MeshDefinitions::_fMinPointDistance = float(MESH_MIN_PT_DIST); +float MeshDefinitions::_fMinPointDistanceP2 = _fMinPointDistance * _fMinPointDistance; +float MeshDefinitions::_fMinPointDistanceD1 = _fMinPointDistance; +float MeshDefinitions::_fMinEdgeLength = MESH_MIN_EDGE_LEN; +bool MeshDefinitions::_bRemoveMinLength = MESH_REMOVE_MIN_LEN; +float MeshDefinitions::_fMinEdgeAngle = Base::toRadians(MESH_MIN_EDGE_ANGLE); + +MeshDefinitions::MeshDefinitions() = default; + +void MeshDefinitions::SetMinPointDistance(float fMin) +{ + _fMinPointDistance = fMin; + _fMinPointDistanceP2 = fMin * fMin; + _fMinPointDistanceD1 = float(sqrt((fMin * fMin) / 3.0f)); } -} +} // namespace MeshCore diff --git a/src/Mod/Mesh/App/Core/Definitions.h b/src/Mod/Mesh/App/Core/Definitions.h index d1ef6ab329..9337ab396e 100644 --- a/src/Mod/Mesh/App/Core/Definitions.h +++ b/src/Mod/Mesh/App/Core/Definitions.h @@ -24,16 +24,16 @@ #define MESH_DEFINITIONS_H #ifndef MESH_GLOBAL_H -# include +#include #endif #include // default values -#define MESH_MIN_PT_DIST 1.0e-6f -#define MESH_MIN_EDGE_LEN 1.0e-3f -#define MESH_MIN_EDGE_ANGLE 2.0 -#define MESH_REMOVE_MIN_LEN true +#define MESH_MIN_PT_DIST 1.0e-6f +#define MESH_MIN_EDGE_LEN 1.0e-3f +#define MESH_MIN_EDGE_ANGLE 2.0 +#define MESH_REMOVE_MIN_LEN true #define MESH_REMOVE_G3_EDGES true /* @@ -41,19 +41,20 @@ */ #define FLOAT_EPS 1.0e-4f -#ifndef FLOAT_MAX -# define FLOAT_MAX 1e30f +#ifndef FLOAT_MAX +#define FLOAT_MAX 1e30f #endif -#ifndef DOUBLE_MAX -# define DOUBLE_MAX 1.7976931348623157E+308 /* max decimal value of a "double"*/ +#ifndef DOUBLE_MAX +#define DOUBLE_MAX 1.7976931348623157E+308 /* max decimal value of a "double"*/ #endif -#ifndef DOUBLE_MIN -# define DOUBLE_MIN 2.2250738585072014E-308 /* min decimal value of a "double"*/ +#ifndef DOUBLE_MIN +#define DOUBLE_MIN 2.2250738585072014E-308 /* min decimal value of a "double"*/ #endif -namespace MeshCore { +namespace MeshCore +{ // type definitions using ElementIndex = unsigned long; @@ -63,7 +64,7 @@ const FacetIndex FACET_INDEX_MAX = ULONG_MAX; using PointIndex = ElementIndex; const PointIndex POINT_INDEX_MAX = ULONG_MAX; -template +template class Math { public: @@ -80,20 +81,20 @@ using Mathd = Math; class MeshExport MeshDefinitions { public: - MeshDefinitions (); + MeshDefinitions(); - static float _fMinPointDistance; - static float _fMinPointDistanceP2; - static float _fMinPointDistanceD1; + static float _fMinPointDistance; + static float _fMinPointDistanceP2; + static float _fMinPointDistanceD1; - static float _fMinEdgeLength; - static bool _bRemoveMinLength; + static float _fMinEdgeLength; + static bool _bRemoveMinLength; - static float _fMinEdgeAngle; + static float _fMinEdgeAngle; - static void SetMinPointDistance (float fMin); + static void SetMinPointDistance(float fMin); }; -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_DEFINITIONS_H +#endif // MESH_DEFINITIONS_H diff --git a/src/Mod/Mesh/App/Core/Degeneration.cpp b/src/Mod/Mesh/App/Core/Degeneration.cpp index 033ad2beef..9f00419996 100644 --- a/src/Mod/Mesh/App/Core/Degeneration.cpp +++ b/src/Mod/Mesh/App/Core/Degeneration.cpp @@ -23,9 +23,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include @@ -41,53 +41,57 @@ using namespace MeshCore; bool MeshEvalInvalids::Evaluate() { - const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - for (const auto & it : rFaces) - { - if ( !it.IsValid() ) - return false; - } + const MeshFacetArray& rFaces = _rclMesh.GetFacets(); + for (const auto& it : rFaces) { + if (!it.IsValid()) { + return false; + } + } - const MeshPointArray& rPoints = _rclMesh.GetPoints(); - for (const auto & it : rPoints) - { - if ( !it.IsValid() ) - return false; - } + const MeshPointArray& rPoints = _rclMesh.GetPoints(); + for (const auto& it : rPoints) { + if (!it.IsValid()) { + return false; + } + } - return true; + return true; } std::vector MeshEvalInvalids::GetIndices() const { - std::vector aInds; - const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - const MeshPointArray& rPoints = _rclMesh.GetPoints(); - FacetIndex ind=0; - for ( MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, ind++ ) - { - if ( !it->IsValid() ) - aInds.push_back(ind); - else if ( !rPoints[it->_aulPoints[0]].IsValid() ) - aInds.push_back(ind); - else if ( !rPoints[it->_aulPoints[1]].IsValid() ) - aInds.push_back(ind); - else if ( !rPoints[it->_aulPoints[2]].IsValid() ) - aInds.push_back(ind); - } + std::vector aInds; + const MeshFacetArray& rFaces = _rclMesh.GetFacets(); + const MeshPointArray& rPoints = _rclMesh.GetPoints(); + FacetIndex ind = 0; + for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, ind++) { + if (!it->IsValid()) { + aInds.push_back(ind); + } + else if (!rPoints[it->_aulPoints[0]].IsValid()) { + aInds.push_back(ind); + } + else if (!rPoints[it->_aulPoints[1]].IsValid()) { + aInds.push_back(ind); + } + else if (!rPoints[it->_aulPoints[2]].IsValid()) { + aInds.push_back(ind); + } + } - return aInds; + return aInds; } bool MeshFixInvalids::Fixup() { - _rclMesh.RemoveInvalids(); - return true; + _rclMesh.RemoveInvalids(); + return true; } // ---------------------------------------------------------------------- -namespace MeshCore { +namespace MeshCore +{ using VertexIterator = MeshPointArray::_TConstIterator; /* @@ -99,27 +103,27 @@ using VertexIterator = MeshPointArray::_TConstIterator; */ struct Vertex_EqualTo { - bool operator()(const VertexIterator& x, - const VertexIterator& y) const + bool operator()(const VertexIterator& x, const VertexIterator& y) const { - if ( (*x) < (*y) ) + if ((*x) < (*y)) { return false; - else if ( (*y) < (*x) ) + } + else if ((*y) < (*x)) { return false; + } return true; } }; struct Vertex_Less { - bool operator()(const VertexIterator& x, - const VertexIterator& y) const + bool operator()(const VertexIterator& x, const VertexIterator& y) const { return (*x) < (*y); } }; -} +} // namespace MeshCore bool MeshEvalDuplicatePoints::Evaluate() { @@ -134,16 +138,17 @@ bool MeshEvalDuplicatePoints::Evaluate() // if there are two adjacent vertices which have the same coordinates std::sort(vertices.begin(), vertices.end(), Vertex_Less()); - if (std::adjacent_find(vertices.begin(), vertices.end(), Vertex_EqualTo()) < vertices.end() ) + if (std::adjacent_find(vertices.begin(), vertices.end(), Vertex_EqualTo()) < vertices.end()) { return false; + } return true; } std::vector MeshEvalDuplicatePoints::GetIndices() const { - //Note: We must neither use map or set to get duplicated indices because - //the sort algorithms deliver different results compared to std::sort of - //a vector. + // Note: We must neither use map or set to get duplicated indices because + // the sort algorithms deliver different results compared to std::sort of + // a vector. const MeshPointArray& rPoints = _rclMesh.GetPoints(); std::vector vertices; vertices.reserve(rPoints.size()); @@ -171,9 +176,9 @@ std::vector MeshEvalDuplicatePoints::GetIndices() const bool MeshFixDuplicatePoints::Fixup() { - //Note: We must neither use map or set to get duplicated indices because - //the sort algorithms deliver different results compared to std::sort of - //a vector. + // Note: We must neither use map or set to get duplicated indices because + // the sort algorithms deliver different results compared to std::sort of + // a vector. const MeshPointArray& rPoints = _rclMesh.GetPoints(); std::vector vertices; vertices.reserve(rPoints.size()); @@ -205,11 +210,12 @@ bool MeshFixDuplicatePoints::Fixup() // now set all facets to the correct index MeshFacetArray& rFacets = _rclMesh._aclFacetArray; - for (auto & it : rFacets) { - for (PointIndex & point : it._aulPoints) { + for (auto& it : rFacets) { + for (PointIndex& point : it._aulPoints) { std::map::iterator pt = mapPointIndex.find(point); - if (pt != mapPointIndex.end()) + if (pt != mapPointIndex.end()) { point = pt->second; + } } } @@ -225,9 +231,10 @@ bool MeshFixDuplicatePoints::Fixup() bool MeshEvalNaNPoints::Evaluate() { const MeshPointArray& rPoints = _rclMesh.GetPoints(); - for (const auto & it : rPoints) { - if (boost::math::isnan(it.x) || boost::math::isnan(it.y) || boost::math::isnan(it.z)) + for (const auto& it : rPoints) { + if (boost::math::isnan(it.x) || boost::math::isnan(it.y) || boost::math::isnan(it.z)) { return false; + } } return true; @@ -238,8 +245,9 @@ std::vector MeshEvalNaNPoints::GetIndices() const std::vector aInds; const MeshPointArray& rPoints = _rclMesh.GetPoints(); for (MeshPointArray::_TConstIterator it = rPoints.begin(); it != rPoints.end(); ++it) { - if (boost::math::isnan(it->x) || boost::math::isnan(it->y) || boost::math::isnan(it->z)) + if (boost::math::isnan(it->x) || boost::math::isnan(it->y) || boost::math::isnan(it->z)) { aInds.push_back(it - rPoints.begin()); + } } return aInds; @@ -250,8 +258,9 @@ bool MeshFixNaNPoints::Fixup() std::vector aInds; const MeshPointArray& rPoints = _rclMesh.GetPoints(); for (MeshPointArray::_TConstIterator it = rPoints.begin(); it != rPoints.end(); ++it) { - if (boost::math::isnan(it->x) || boost::math::isnan(it->y) || boost::math::isnan(it->z)) + if (boost::math::isnan(it->x) || boost::math::isnan(it->y) || boost::math::isnan(it->z)) { aInds.push_back(it - rPoints.begin()); + } } // remove invalid indices @@ -263,7 +272,8 @@ bool MeshFixNaNPoints::Fixup() // ---------------------------------------------------------------------- -namespace MeshCore { +namespace MeshCore +{ using FaceIterator = MeshFacetArray::_TConstIterator; /* @@ -271,8 +281,7 @@ using FaceIterator = MeshFacetArray::_TConstIterator; */ struct MeshFacet_Less { - bool operator()(const FaceIterator& x, - const FaceIterator& y) const + bool operator()(const FaceIterator& x, const FaceIterator& y) const { PointIndex tmp; PointIndex x0 = x->_aulPoints[0]; @@ -282,35 +291,59 @@ struct MeshFacet_Less PointIndex y1 = y->_aulPoints[1]; PointIndex y2 = y->_aulPoints[2]; - if (x0 > x1) - { tmp = x0; x0 = x1; x1 = tmp; } - if (x0 > x2) - { tmp = x0; x0 = x2; x2 = tmp; } - if (x1 > x2) - { tmp = x1; x1 = x2; x2 = tmp; } - if (y0 > y1) - { tmp = y0; y0 = y1; y1 = tmp; } - if (y0 > y2) - { tmp = y0; y0 = y2; y2 = tmp; } - if (y1 > y2) - { tmp = y1; y1 = y2; y2 = tmp; } + if (x0 > x1) { + tmp = x0; + x0 = x1; + x1 = tmp; + } + if (x0 > x2) { + tmp = x0; + x0 = x2; + x2 = tmp; + } + if (x1 > x2) { + tmp = x1; + x1 = x2; + x2 = tmp; + } + if (y0 > y1) { + tmp = y0; + y0 = y1; + y1 = tmp; + } + if (y0 > y2) { + tmp = y0; + y0 = y2; + y2 = tmp; + } + if (y1 > y2) { + tmp = y1; + y1 = y2; + y2 = tmp; + } - if (x0 < y0) + if (x0 < y0) { return true; - else if (x0 > y0) + } + else if (x0 > y0) { return false; - else if (x1 < y1) + } + else if (x1 < y1) { return true; - else if (x1 > y1) + } + else if (x1 > y1) { return false; - else if (x2 < y2) + } + else if (x2 < y2) { return true; - else + } + else { return false; + } } }; -} +} // namespace MeshCore /* * Two facets are equal if all its three point indices refer to the same @@ -318,17 +351,18 @@ struct MeshFacet_Less */ struct MeshFacet_EqualTo { - bool operator()(const FaceIterator& x, - const FaceIterator& y) const + bool operator()(const FaceIterator& x, const FaceIterator& y) const { - for (int i=0; i<3; i++ ) { + for (int i = 0; i < 3; i++) { if (x->_aulPoints[0] == y->_aulPoints[i]) { - if (x->_aulPoints[1] == y->_aulPoints[(i+1)%3] && - x->_aulPoints[2] == y->_aulPoints[(i+2)%3]) + if (x->_aulPoints[1] == y->_aulPoints[(i + 1) % 3] + && x->_aulPoints[2] == y->_aulPoints[(i + 2) % 3]) { return true; - else if (x->_aulPoints[1] == y->_aulPoints[(i+2)%3] && - x->_aulPoints[2] == y->_aulPoints[(i+1)%3]) + } + else if (x->_aulPoints[1] == y->_aulPoints[(i + 2) % 3] + && x->_aulPoints[2] == y->_aulPoints[(i + 1) % 3]) { return true; + } } } @@ -338,17 +372,16 @@ struct MeshFacet_EqualTo bool MeshEvalDuplicateFacets::Evaluate() { - std::set aFaces; - const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it) - { - std::pair::iterator, bool> - pI = aFaces.insert(it); - if (!pI.second) - return false; - } + std::set aFaces; + const MeshFacetArray& rFaces = _rclMesh.GetFacets(); + for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it) { + std::pair::iterator, bool> pI = aFaces.insert(it); + if (!pI.second) { + return false; + } + } - return true; + return true; } std::vector MeshEvalDuplicateFacets::GetIndices() const @@ -378,41 +411,40 @@ std::vector MeshEvalDuplicateFacets::GetIndices() const return aInds; #else - std::vector aInds; - const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - FacetIndex uIndex=0; + std::vector aInds; + const MeshFacetArray& rFaces = _rclMesh.GetFacets(); + FacetIndex uIndex = 0; - // get all facets - std::set aFaceSet; - for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, uIndex++) - { - std::pair::iterator, bool> - pI = aFaceSet.insert(it); - if (!pI.second) - aInds.push_back(uIndex); - } + // get all facets + std::set aFaceSet; + for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, uIndex++) { + std::pair::iterator, bool> pI = aFaceSet.insert(it); + if (!pI.second) { + aInds.push_back(uIndex); + } + } - return aInds; + return aInds; #endif } bool MeshFixDuplicateFacets::Fixup() { - FacetIndex uIndex=0; + FacetIndex uIndex = 0; std::vector aRemoveFaces; const MeshFacetArray& rFaces = _rclMesh.GetFacets(); // get all facets - std::set aFaceSet; + std::set aFaceSet; for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, uIndex++) { - std::pair::iterator, bool> - pI = aFaceSet.insert(it); - if (!pI.second) + std::pair::iterator, bool> pI = aFaceSet.insert(it); + if (!pI.second) { aRemoveFaces.push_back(uIndex); + } } _rclMesh.DeleteFacets(aRemoveFaces); - _rclMesh.RebuildNeighbours(); // needs to be done here + _rclMesh.RebuildNeighbours(); // needs to be done here return true; } @@ -422,15 +454,14 @@ bool MeshFixDuplicateFacets::Fixup() bool MeshEvalInternalFacets::Evaluate() { _indices.clear(); - FacetIndex uIndex=0; + FacetIndex uIndex = 0; const MeshFacetArray& rFaces = _rclMesh.GetFacets(); // get all facets - std::set aFaceSet; + std::set aFaceSet; MeshFacetArray::_TConstIterator first = rFaces.begin(); for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, uIndex++) { - std::pair::iterator, bool> - pI = aFaceSet.insert(it); + std::pair::iterator, bool> pI = aFaceSet.insert(it); if (!pI.second) { // collect both elements _indices.push_back(*pI.first - first); @@ -447,22 +478,25 @@ bool MeshEvalDegeneratedFacets::Evaluate() { MeshFacetIterator it(_rclMesh); for (it.Init(); it.More(); it.Next()) { - if (it->IsDegenerated(fEpsilon)) + if (it->IsDegenerated(fEpsilon)) { return false; + } } return true; } -unsigned long MeshEvalDegeneratedFacets::CountEdgeTooSmall (float fMinEdgeLength) const +unsigned long MeshEvalDegeneratedFacets::CountEdgeTooSmall(float fMinEdgeLength) const { - MeshFacetIterator clFIter(_rclMesh); + MeshFacetIterator clFIter(_rclMesh); unsigned long k = 0; while (!clFIter.EndReached()) { for (int i = 0; i < 3; i++) { - if (Base::Distance(clFIter->_aclPoints[i], clFIter->_aclPoints[(i+1)%3]) < fMinEdgeLength) + if (Base::Distance(clFIter->_aclPoints[i], clFIter->_aclPoints[(i + 1) % 3]) + < fMinEdgeLength) { k++; + } } ++clFIter; } @@ -475,8 +509,9 @@ std::vector MeshEvalDegeneratedFacets::GetIndices() const std::vector aInds; MeshFacetIterator it(_rclMesh); for (it.Init(); it.More(); it.Next()) { - if (it->IsDegenerated(fEpsilon)) + if (it->IsDegenerated(fEpsilon)) { aInds.push_back(it.Position()); + } } return aInds; @@ -493,7 +528,7 @@ bool MeshFixDegeneratedFacets::Fixup() bool removed = cTopAlg.RemoveDegeneratedFacet(uId); if (removed) { // due to a modification of the array the iterator became invalid - it.Set(uId-1); + it.Set(uId - 1); } } } @@ -503,29 +538,27 @@ bool MeshFixDegeneratedFacets::Fixup() bool MeshRemoveNeedles::Fixup() { - using FaceEdge = std::pair; // (face, edge) pair + using FaceEdge = std::pair; // (face, edge) pair using FaceEdgePriority = std::pair; MeshTopoAlgorithm topAlg(_rclMesh); MeshRefPointToFacets vf_it(_rclMesh); - const MeshFacetArray &rclFAry = _rclMesh.GetFacets(); - const MeshPointArray &rclPAry = _rclMesh.GetPoints(); + const MeshFacetArray& rclFAry = _rclMesh.GetFacets(); + const MeshPointArray& rclPAry = _rclMesh.GetPoints(); rclFAry.ResetInvalid(); rclPAry.ResetInvalid(); rclPAry.ResetFlag(MeshPoint::VISIT); std::size_t facetCount = rclFAry.size(); - std::priority_queue, - std::greater<> > todo; + std::priority_queue, std::greater<>> todo; for (std::size_t index = 0; index < facetCount; index++) { const MeshFacet& facet = rclFAry[index]; MeshGeomFacet tria(_rclMesh.GetFacet(facet)); float perimeter = tria.Perimeter(); float fMinLen = perimeter * fMinEdgeLength; - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { const Base::Vector3f& p1 = rclPAry[facet._aulPoints[i]]; - const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(i+1)%3]]; + const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(i + 1) % 3]]; float distance = Base::Distance(p1, p2); if (distance < fMinLen) { @@ -541,8 +574,9 @@ bool MeshRemoveNeedles::Fixup() todo.pop(); // check if one of the face pairs was already processed - if (!rclFAry[faceedge.first].IsValid()) + if (!rclFAry[faceedge.first].IsValid()) { continue; + } // the facet points may have changed, so check the current distance again const MeshFacet& facet = rclFAry[faceedge.first]; @@ -550,33 +584,36 @@ bool MeshRemoveNeedles::Fixup() float perimeter = tria.Perimeter(); float fMinLen = perimeter * fMinEdgeLength; const Base::Vector3f& p1 = rclPAry[facet._aulPoints[faceedge.second]]; - const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(faceedge.second+1)%3]]; + const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(faceedge.second + 1) % 3]]; float distance = Base::Distance(p1, p2); - if (distance >= fMinLen) + if (distance >= fMinLen) { continue; + } // collect the collapse-edge information EdgeCollapse ce; ce._fromPoint = rclFAry[faceedge.first]._aulPoints[faceedge.second]; - ce._toPoint = rclFAry[faceedge.first]._aulPoints[(faceedge.second+1)%3]; + ce._toPoint = rclFAry[faceedge.first]._aulPoints[(faceedge.second + 1) % 3]; ce._removeFacets.push_back(faceedge.first); FacetIndex neighbour = rclFAry[faceedge.first]._aulNeighbours[faceedge.second]; - if (neighbour != FACET_INDEX_MAX) + if (neighbour != FACET_INDEX_MAX) { ce._removeFacets.push_back(neighbour); + } std::set vf = vf_it[ce._fromPoint]; vf.erase(faceedge.first); - if (neighbour != FACET_INDEX_MAX) + if (neighbour != FACET_INDEX_MAX) { vf.erase(neighbour); + } ce._changeFacets.insert(ce._changeFacets.begin(), vf.begin(), vf.end()); // get adjacent points std::set vv; vv = vf_it.NeighbourPoints(ce._fromPoint); - ce._adjacentFrom.insert(ce._adjacentFrom.begin(), vv.begin(),vv.end()); + ce._adjacentFrom.insert(ce._adjacentFrom.begin(), vv.begin(), vv.end()); vv = vf_it.NeighbourPoints(ce._toPoint); - ce._adjacentTo.insert(ce._adjacentTo.begin(), vv.begin(),vv.end()); + ce._adjacentTo.insert(ce._adjacentTo.begin(), vv.begin(), vv.end()); if (topAlg.IsCollapseEdgeLegal(ce)) { topAlg.CollapseEdge(ce); @@ -603,27 +640,27 @@ bool MeshRemoveNeedles::Fixup() bool MeshFixCaps::Fixup() { - using FaceVertex = std::pair; // (face, vertex) pair + using FaceVertex = std::pair; // (face, vertex) pair using FaceVertexPriority = std::pair; MeshTopoAlgorithm topAlg(_rclMesh); - const MeshFacetArray &rclFAry = _rclMesh.GetFacets(); - const MeshPointArray &rclPAry = _rclMesh.GetPoints(); + const MeshFacetArray& rclFAry = _rclMesh.GetFacets(); + const MeshPointArray& rclPAry = _rclMesh.GetPoints(); std::size_t facetCount = rclFAry.size(); float fCosMaxAngle = static_cast(cos(fMaxAngle)); - std::priority_queue, - std::greater<> > todo; + std::priority_queue, std::greater<>> todo; for (std::size_t index = 0; index < facetCount; index++) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { const MeshFacet& facet = rclFAry[index]; const Base::Vector3f& p1 = rclPAry[facet._aulPoints[i]]; - const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(i+1)%3]]; - const Base::Vector3f& p3 = rclPAry[facet._aulPoints[(i+2)%3]]; - Base::Vector3f dir1(p2-p1); dir1.Normalize(); - Base::Vector3f dir2(p3-p1); dir2.Normalize(); + const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(i + 1) % 3]]; + const Base::Vector3f& p3 = rclPAry[facet._aulPoints[(i + 2) % 3]]; + Base::Vector3f dir1(p2 - p1); + dir1.Normalize(); + Base::Vector3f dir2(p3 - p1); + dir2.Normalize(); float fCosAngle = dir1.Dot(dir2); if (fCosAngle < fCosMaxAngle) { @@ -640,31 +677,36 @@ bool MeshFixCaps::Fixup() // the facet points may have changed, so check the current distance again const MeshFacet& facet = rclFAry[facevertex.first]; const Base::Vector3f& p1 = rclPAry[facet._aulPoints[facevertex.second]]; - const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(facevertex.second+1)%3]]; - const Base::Vector3f& p3 = rclPAry[facet._aulPoints[(facevertex.second+2)%3]]; - Base::Vector3f dir1(p2-p1); dir1.Normalize(); - Base::Vector3f dir2(p3-p1); dir2.Normalize(); + const Base::Vector3f& p2 = rclPAry[facet._aulPoints[(facevertex.second + 1) % 3]]; + const Base::Vector3f& p3 = rclPAry[facet._aulPoints[(facevertex.second + 2) % 3]]; + Base::Vector3f dir1(p2 - p1); + dir1.Normalize(); + Base::Vector3f dir2(p3 - p1); + dir2.Normalize(); // check that the criterion is still OK in case // an earlier edge-swap has an impact float fCosAngle = dir1.Dot(dir2); - if (fCosAngle >= fCosMaxAngle) + if (fCosAngle >= fCosMaxAngle) { continue; + } // the triangle shouldn't be a needle, therefore the projection of the point with // the maximum angle must have a clear distance to the other corner points // as factor we choose a default value of 25% of the corresponding edge length - Base::Vector3f p4 = p1.Perpendicular(p2, p3-p2); - float distP2P3 = Base::Distance(p2,p3); - float distP2P4 = Base::Distance(p2,p4); - float distP3P4 = Base::Distance(p3,p4); - if (distP2P4/distP2P3 < fSplitFactor || distP3P4/distP2P3 < fSplitFactor) + Base::Vector3f p4 = p1.Perpendicular(p2, p3 - p2); + float distP2P3 = Base::Distance(p2, p3); + float distP2P4 = Base::Distance(p2, p4); + float distP3P4 = Base::Distance(p3, p4); + if (distP2P4 / distP2P3 < fSplitFactor || distP3P4 / distP2P3 < fSplitFactor) { continue; + } FacetIndex facetpos = facevertex.first; - FacetIndex neighbour = rclFAry[facetpos]._aulNeighbours[(facevertex.second+1)%3]; - if (neighbour != FACET_INDEX_MAX) + FacetIndex neighbour = rclFAry[facetpos]._aulNeighbours[(facevertex.second + 1) % 3]; + if (neighbour != FACET_INDEX_MAX) { topAlg.SwapEdge(facetpos, neighbour); + } } return true; @@ -679,8 +721,9 @@ bool MeshEvalDeformedFacets::Evaluate() MeshFacetIterator it(_rclMesh); for (it.Init(); it.More(); it.Next()) { - if (it->IsDeformed(fCosMinAngle, fCosMaxAngle)) + if (it->IsDeformed(fCosMinAngle, fCosMaxAngle)) { return false; + } } return true; @@ -694,8 +737,9 @@ std::vector MeshEvalDeformedFacets::GetIndices() const std::vector aInds; MeshFacetIterator it(_rclMesh); for (it.Init(); it.More(); it.Next()) { - if (it->IsDeformed(fCosMinAngle, fCosMaxAngle)) + if (it->IsDeformed(fCosMinAngle, fCosMaxAngle)) { aInds.push_back(it.Position()); + } } return aInds; @@ -706,7 +750,7 @@ bool MeshFixDeformedFacets::Fixup() float fCosMinAngle = cos(fMinAngle); float fCosMaxAngle = cos(fMaxAngle); - Base::Vector3f u,v; + Base::Vector3f u, v; MeshTopoAlgorithm cTopAlg(_rclMesh); MeshFacetIterator it(_rclMesh); @@ -714,12 +758,12 @@ bool MeshFixDeformedFacets::Fixup() // possibly deformed but not degenerated if (!it->IsDegenerated(fEpsilon)) { // store the angles to avoid to compute twice - float fCosAngles[3] = {0,0,0}; - bool done=false; + float fCosAngles[3] = {0, 0, 0}; + bool done = false; - for (int i=0; i<3; i++) { - u = it->_aclPoints[(i+1)%3]-it->_aclPoints[i]; - v = it->_aclPoints[(i+2)%3]-it->_aclPoints[i]; + for (int i = 0; i < 3; i++) { + u = it->_aclPoints[(i + 1) % 3] - it->_aclPoints[i]; + v = it->_aclPoints[(i + 2) % 3] - it->_aclPoints[i]; u.Normalize(); v.Normalize(); @@ -728,12 +772,13 @@ bool MeshFixDeformedFacets::Fixup() } // first check for angle > 120 deg: in this case we swap with the opposite edge - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { float fCosAngle = fCosAngles[i]; if (fCosAngle < fCosMaxAngle) { const MeshFacet& face = it.GetReference(); - FacetIndex uNeighbour = face._aulNeighbours[(i+1)%3]; - if (uNeighbour!=FACET_INDEX_MAX && cTopAlg.ShouldSwapEdge(it.Position(), uNeighbour, fMaxSwapAngle)) { + FacetIndex uNeighbour = face._aulNeighbours[(i + 1) % 3]; + if (uNeighbour != FACET_INDEX_MAX + && cTopAlg.ShouldSwapEdge(it.Position(), uNeighbour, fMaxSwapAngle)) { cTopAlg.SwapEdge(it.Position(), uNeighbour); done = true; } @@ -742,23 +787,27 @@ bool MeshFixDeformedFacets::Fixup() } // we have swapped already - if (done) + if (done) { continue; + } - // now check for angle < 30 deg: in this case we swap with one of the edges the corner is part of - for (int j=0; j<3; j++) { + // now check for angle < 30 deg: in this case we swap with one of the edges the corner + // is part of + for (int j = 0; j < 3; j++) { float fCosAngle = fCosAngles[j]; if (fCosAngle > fCosMinAngle) { const MeshFacet& face = it.GetReference(); FacetIndex uNeighbour = face._aulNeighbours[j]; - if (uNeighbour!=FACET_INDEX_MAX && cTopAlg.ShouldSwapEdge(it.Position(), uNeighbour, fMaxSwapAngle)) { + if (uNeighbour != FACET_INDEX_MAX + && cTopAlg.ShouldSwapEdge(it.Position(), uNeighbour, fMaxSwapAngle)) { cTopAlg.SwapEdge(it.Position(), uNeighbour); break; } - uNeighbour = face._aulNeighbours[(j+2)%3]; - if (uNeighbour!=FACET_INDEX_MAX && cTopAlg.ShouldSwapEdge(it.Position(), uNeighbour, fMaxSwapAngle)) { + uNeighbour = face._aulNeighbours[(j + 2) % 3]; + if (uNeighbour != FACET_INDEX_MAX + && cTopAlg.ShouldSwapEdge(it.Position(), uNeighbour, fMaxSwapAngle)) { cTopAlg.SwapEdge(it.Position(), uNeighbour); break; } @@ -779,10 +828,10 @@ bool MeshFixMergeFacets::Fixup() unsigned long countPoints = _rclMesh.CountPoints(); std::vector newFacets; - newFacets.reserve(countPoints/20); // 5% should be sufficient + newFacets.reserve(countPoints / 20); // 5% should be sufficient MeshTopoAlgorithm topAlg(_rclMesh); - for (unsigned long i=0; iindices.clear(); - MeshRefPointToFacets clPt2Facets(_rclMesh); + MeshRefPointToFacets clPt2Facets(_rclMesh); const MeshPointArray& rPntAry = _rclMesh.GetPoints(); MeshFacetArray::_TConstIterator f_beg = _rclMesh.GetFacets().begin(); MeshGeomFacet rTriangle; Base::Vector3f tmp; unsigned long ctPoints = _rclMesh.CountPoints(); - for (unsigned long index=0; index < ctPoints; index++) { + for (unsigned long index = 0; index < ctPoints; index++) { std::vector point; point.push_back(index); // get the local neighbourhood of the point - std::set nb = clPt2Facets.NeighbourPoints(point,1); + std::set nb = clPt2Facets.NeighbourPoints(point, 1); const std::set& faces = clPt2Facets[index]; for (PointIndex pt : nb) { const MeshPoint& mp = rPntAry[pt]; for (FacetIndex ft : faces) { - // the point must not be part of the facet we test - if (f_beg[ft]._aulPoints[0] == pt) - continue; - if (f_beg[ft]._aulPoints[1] == pt) - continue; - if (f_beg[ft]._aulPoints[2] == pt) - continue; - // is the point projectable onto the facet? - rTriangle = _rclMesh.GetFacet(f_beg[ft]); - if (rTriangle.IntersectWithLine(mp,rTriangle.GetNormal(),tmp)) { - const std::set& f = clPt2Facets[pt]; - this->indices.insert(this->indices.end(), f.begin(), f.end()); - break; - } + // the point must not be part of the facet we test + if (f_beg[ft]._aulPoints[0] == pt) { + continue; + } + if (f_beg[ft]._aulPoints[1] == pt) { + continue; + } + if (f_beg[ft]._aulPoints[2] == pt) { + continue; + } + // is the point projectable onto the facet? + rTriangle = _rclMesh.GetFacet(f_beg[ft]); + if (rTriangle.IntersectWithLine(mp, rTriangle.GetNormal(), tmp)) { + const std::set& f = clPt2Facets[pt]; + this->indices.insert(this->indices.end(), f.begin(), f.end()); + break; + } } } } // remove duplicates std::sort(this->indices.begin(), this->indices.end()); - this->indices.erase(std::unique(this->indices.begin(), - this->indices.end()), this->indices.end()); + this->indices.erase(std::unique(this->indices.begin(), this->indices.end()), + this->indices.end()); return this->indices.empty(); } @@ -859,9 +911,11 @@ Forbidden is: Repair: + store the point indices which can be projected on a face + store the face indices on which a point can be projected - + remove faces with an edge length smaller than a certain threshold (e.g. 0.01) from the stored triangles or that reference one of the stored points + + remove faces with an edge length smaller than a certain threshold (e.g. 0.01) from the stored +triangles or that reference one of the stored points + for this edge merge the two points - + if a point of a face can be projected onto another face and they have a common point then split the second face if the distance is under a certain threshold + + if a point of a face can be projected onto another face and they have a common point then split +the second face if the distance is under a certain threshold */ bool MeshFixDentsOnSurface::Fixup() { @@ -880,12 +934,12 @@ bool MeshEvalFoldsOnSurface::Evaluate() { this->indices.clear(); const MeshFacetArray& rFAry = _rclMesh.GetFacets(); - unsigned long ct=0; + unsigned long ct = 0; for (MeshFacetArray::const_iterator it = rFAry.begin(); it != rFAry.end(); ++it, ct++) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { FacetIndex n1 = it->_aulNeighbours[i]; - FacetIndex n2 = it->_aulNeighbours[(i+1)%3]; - Base::Vector3f v1 =_rclMesh.GetFacet(*it).GetNormal(); + FacetIndex n2 = it->_aulNeighbours[(i + 1) % 3]; + Base::Vector3f v1 = _rclMesh.GetFacet(*it).GetNormal(); if (n1 != FACET_INDEX_MAX && n2 != FACET_INDEX_MAX) { Base::Vector3f v2 = _rclMesh.GetFacet(n1).GetNormal(); Base::Vector3f v3 = _rclMesh.GetFacet(n2).GetNormal(); @@ -902,8 +956,8 @@ bool MeshEvalFoldsOnSurface::Evaluate() // remove duplicates std::sort(this->indices.begin(), this->indices.end()); - this->indices.erase(std::unique(this->indices.begin(), - this->indices.end()), this->indices.end()); + this->indices.erase(std::unique(this->indices.begin(), this->indices.end()), + this->indices.end()); return this->indices.empty(); } @@ -927,8 +981,9 @@ bool MeshEvalFoldsOnBoundary::Evaluate() MeshGeomFacet f1 = _rclMesh.GetFacet(*it); MeshGeomFacet f2 = _rclMesh.GetFacet(nbIndex); float cos_angle = f1.GetNormal() * f2.GetNormal(); - if (cos_angle <= 0.5f) // ~ 60 degree - indices.push_back(it-rFacAry.begin()); + if (cos_angle <= 0.5f) { // ~ 60 degree + indices.push_back(it - rFacAry.begin()); + } } } } @@ -959,23 +1014,22 @@ bool MeshEvalFoldOversOnSurface::Evaluate() { this->indices.clear(); const MeshCore::MeshFacetArray& facets = _rclMesh.GetFacets(); - MeshCore::MeshFacetArray::_TConstIterator f_it, - f_beg = facets.begin(), f_end = facets.end(); + MeshCore::MeshFacetArray::_TConstIterator f_it, f_beg = facets.begin(), f_end = facets.end(); Base::Vector3f n1, n2; for (f_it = facets.begin(); f_it != f_end; ++f_it) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { FacetIndex index1 = f_it->_aulNeighbours[i]; - FacetIndex index2 = f_it->_aulNeighbours[(i+1)%3]; + FacetIndex index2 = f_it->_aulNeighbours[(i + 1) % 3]; if (index1 != FACET_INDEX_MAX && index2 != FACET_INDEX_MAX) { // if the topology is correct but the normals flip from // two neighbours we have a fold - if (f_it->HasSameOrientation(f_beg[index1]) && - f_it->HasSameOrientation(f_beg[index2])) { + if (f_it->HasSameOrientation(f_beg[index1]) + && f_it->HasSameOrientation(f_beg[index2])) { n1 = _rclMesh.GetFacet(index1).GetNormal(); n2 = _rclMesh.GetFacet(index2).GetNormal(); - if (n1 * n2 < -0.5f) { // angle > 120 deg - this->indices.push_back(f_it-f_beg); + if (n1 * n2 < -0.5f) { // angle > 120 deg + this->indices.push_back(f_it - f_beg); break; } } @@ -991,8 +1045,7 @@ bool MeshEvalFoldOversOnSurface::Evaluate() bool MeshEvalBorderFacet::Evaluate() { const MeshCore::MeshFacetArray& facets = _rclMesh.GetFacets(); - MeshCore::MeshFacetArray::_TConstIterator f_it, - f_beg = facets.begin(), f_end = facets.end(); + MeshCore::MeshFacetArray::_TConstIterator f_it, f_beg = facets.begin(), f_end = facets.end(); MeshCore::MeshRefPointToPoints vv_it(_rclMesh); MeshCore::MeshRefPointToFacets vf_it(_rclMesh); @@ -1005,8 +1058,9 @@ bool MeshEvalBorderFacet::Evaluate() } } - if (ok) - _facets.push_back(f_it-f_beg); + if (ok) { + _facets.push_back(f_it - f_beg); + } } return _facets.empty(); @@ -1019,7 +1073,7 @@ bool MeshEvalRangeFacet::Evaluate() const MeshFacetArray& rFaces = _rclMesh.GetFacets(); FacetIndex ulCtFacets = rFaces.size(); - for (const auto & it : rFaces) { + for (const auto& it : rFaces) { for (FacetIndex nbFacet : it._aulNeighbours) { if ((nbFacet >= ulCtFacets) && (nbFacet < FACET_INDEX_MAX)) { return false; @@ -1036,7 +1090,7 @@ std::vector MeshEvalRangeFacet::GetIndices() const const MeshFacetArray& rFaces = _rclMesh.GetFacets(); FacetIndex ulCtFacets = rFaces.size(); - FacetIndex ind=0; + FacetIndex ind = 0; for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, ind++) { for (FacetIndex nbIndex : it->_aulNeighbours) { if ((nbIndex >= ulCtFacets) && (nbIndex < FACET_INDEX_MAX)) { @@ -1062,11 +1116,15 @@ bool MeshEvalRangePoint::Evaluate() const MeshFacetArray& rFaces = _rclMesh.GetFacets(); PointIndex ulCtPoints = _rclMesh.CountPoints(); - for (const auto & it : rFaces) { - if (std::find_if(it._aulPoints, it._aulPoints + 3, [ulCtPoints](PointIndex i) { - return i >= ulCtPoints; - }) < it._aulPoints + 3) + for (const auto& it : rFaces) { + if (std::find_if(it._aulPoints, + it._aulPoints + 3, + [ulCtPoints](PointIndex i) { + return i >= ulCtPoints; + }) + < it._aulPoints + 3) { return false; + } } return true; @@ -1078,12 +1136,16 @@ std::vector MeshEvalRangePoint::GetIndices() const const MeshFacetArray& rFaces = _rclMesh.GetFacets(); PointIndex ulCtPoints = _rclMesh.CountPoints(); - PointIndex ind=0; + PointIndex ind = 0; for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, ind++) { - if (std::find_if(it->_aulPoints, it->_aulPoints + 3, [ulCtPoints](PointIndex i) { - return i >= ulCtPoints; - }) < it->_aulPoints + 3) + if (std::find_if(it->_aulPoints, + it->_aulPoints + 3, + [ulCtPoints](PointIndex i) { + return i >= ulCtPoints; + }) + < it->_aulPoints + 3) { aInds.push_back(ind); + } } return aInds; @@ -1115,56 +1177,55 @@ bool MeshFixRangePoint::Fixup() bool MeshEvalCorruptedFacets::Evaluate() { - const MeshFacetArray& rFaces = _rclMesh.GetFacets(); + const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - for (const auto & it : rFaces) { - // duplicated point indices - if (it.IsDegenerated()) - return false; - } + for (const auto& it : rFaces) { + // duplicated point indices + if (it.IsDegenerated()) { + return false; + } + } - return true; + return true; } std::vector MeshEvalCorruptedFacets::GetIndices() const { - std::vector aInds; - const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - FacetIndex ind=0; + std::vector aInds; + const MeshFacetArray& rFaces = _rclMesh.GetFacets(); + FacetIndex ind = 0; - for ( MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, ind++ ) { - if (it->IsDegenerated()) - aInds.push_back(ind); - } + for (MeshFacetArray::_TConstIterator it = rFaces.begin(); it != rFaces.end(); ++it, ind++) { + if (it->IsDegenerated()) { + aInds.push_back(ind); + } + } - return aInds; + return aInds; } bool MeshFixCorruptedFacets::Fixup() { - MeshTopoAlgorithm cTopAlg(_rclMesh); - - MeshFacetIterator it(_rclMesh); - for ( it.Init(); it.More(); it.Next() ) - { - if ( it.GetReference().IsDegenerated() ) - { - unsigned long uId = it.Position(); - bool removed = cTopAlg.RemoveCorruptedFacet(uId); - if (removed) { - // due to a modification of the array the iterator became invalid - it.Set(uId-1); - } + MeshTopoAlgorithm cTopAlg(_rclMesh); + MeshFacetIterator it(_rclMesh); + for (it.Init(); it.More(); it.Next()) { + if (it.GetReference().IsDegenerated()) { + unsigned long uId = it.Position(); + bool removed = cTopAlg.RemoveCorruptedFacet(uId); + if (removed) { + // due to a modification of the array the iterator became invalid + it.Set(uId - 1); + } + } } - } - return true; + return true; } // ---------------------------------------------------------------------- -bool MeshEvalPointOnEdge::Evaluate () +bool MeshEvalPointOnEdge::Evaluate() { MeshFacetGrid facetGrid(_rclMesh); const MeshPointArray& points = _rclMesh.GetPoints(); @@ -1176,11 +1237,12 @@ bool MeshEvalPointOnEdge::Evaluate () for (int i = 0; i < 3; i++) { MeshGeomEdge edge; edge._aclPoints[0] = points[facet._aulPoints[i]]; - edge._aclPoints[1] = points[facet._aulPoints[(i+1)%3]]; + edge._aclPoints[1] = points[facet._aulPoints[(i + 1) % 3]]; if (edge.GetBoundBox().IsInBox(points[idx])) { - if (edge.IsPointOf(points[idx], 0.001f)) + if (edge.IsPointOf(points[idx], 0.001f)) { return true; + } } } } @@ -1188,7 +1250,7 @@ bool MeshEvalPointOnEdge::Evaluate () }; PointIndex maxPoints = _rclMesh.CountPoints(); - for (PointIndex i = 0; i < maxPoints; i++) { + for (PointIndex i = 0; i < maxPoints; i++) { std::vector elements; facetGrid.GetElements(points[i], elements); @@ -1196,8 +1258,9 @@ bool MeshEvalPointOnEdge::Evaluate () const MeshFacet& face = facets[it]; if (IsPointOnEdge(i, face)) { pointsIndices.push_back(i); - if (face.HasOpenEdge()) + if (face.HasOpenEdge()) { facetsIndices.push_back(it); + } } } } @@ -1214,7 +1277,7 @@ std::vector MeshEvalPointOnEdge::GetFacetIndices() const return facetsIndices; } -bool MeshFixPointOnEdge::Fixup () +bool MeshFixPointOnEdge::Fixup() { MeshEvalPointOnEdge eval(_rclMesh); eval.Evaluate(); @@ -1229,10 +1292,11 @@ bool MeshFixPointOnEdge::Fixup () _rclMesh.DeletePoints(pointsIndices); if (fillBoundary) { - std::list > borderList; + std::list> borderList; FindBoundaries(borderList); - if (!borderList.empty()) + if (!borderList.empty()) { FillBoundaries(borderList); + } } } @@ -1246,7 +1310,7 @@ void MeshFixPointOnEdge::MarkBoundaries(const std::vector& facetsInd meshalg.SetFacetsFlag(facetsIndices, MeshFacet::TMP0); } -void MeshFixPointOnEdge::FindBoundaries(std::list >& borderList) +void MeshFixPointOnEdge::FindBoundaries(std::list>& borderList) { std::vector tmp; MeshAlgorithm meshalg(_rclMesh); @@ -1257,11 +1321,11 @@ void MeshFixPointOnEdge::FindBoundaries(std::list >& bor } } -void MeshFixPointOnEdge::FillBoundaries(const std::list >& borderList) +void MeshFixPointOnEdge::FillBoundaries(const std::list>& borderList) { FlatTriangulator tria; tria.SetVerifier(new MeshCore::TriangulationVerifierV2); MeshTopoAlgorithm topalg(_rclMesh); - std::list > failed; + std::list> failed; topalg.FillupHoles(1, tria, borderList, failed); } diff --git a/src/Mod/Mesh/App/Core/Degeneration.h b/src/Mod/Mesh/App/Core/Degeneration.h index 480a767269..0baf629930 100644 --- a/src/Mod/Mesh/App/Core/Degeneration.h +++ b/src/Mod/Mesh/App/Core/Degeneration.h @@ -30,7 +30,8 @@ #include "Evaluation.h" -namespace MeshCore { +namespace MeshCore +{ class MeshKernel; class MeshGeomFacet; @@ -43,21 +44,23 @@ class MeshFacetIterator; * @see MeshFixInvalids * @author Werner Mayer */ -class MeshExport MeshEvalInvalids : public MeshEvaluation +class MeshExport MeshEvalInvalids: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalInvalids (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Searches for as 'Invalid' marked points or facets. - */ - bool Evaluate () override; - /** - * Returns the indices of all invalid facets or facets whose points are invalid. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + explicit MeshEvalInvalids(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Searches for as 'Invalid' marked points or facets. + */ + bool Evaluate() override; + /** + * Returns the indices of all invalid facets or facets whose points are invalid. + */ + std::vector GetIndices() const; }; /** @@ -65,42 +68,48 @@ public: * @see MeshEvalInvalids * @author Werner Mayer */ -class MeshExport MeshFixInvalids : public MeshValidation +class MeshExport MeshFixInvalids: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixInvalids (MeshKernel &rclM) : MeshValidation( rclM ) { } - /** - * Remove invalid elements. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixInvalids(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Remove invalid elements. + */ + bool Fixup() override; }; /** * The MeshEvalDuplicatePoints class searches for duplicated points. - * A point is regarded as duplicated if the distances between x, y and z coordinates of two points is - * less than an epsilon (defined by MeshDefinitions::_fMinPointDistanceD1, default value=1.0e-5f). + * A point is regarded as duplicated if the distances between x, y and z coordinates of two points + * is less than an epsilon (defined by MeshDefinitions::_fMinPointDistanceD1, default + * value=1.0e-5f). * @see MeshFixDuplicatePoints * @see MeshEvalDegeneratedFacets * @author Werner Mayer */ -class MeshExport MeshEvalDuplicatePoints : public MeshEvaluation +class MeshExport MeshEvalDuplicatePoints: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalDuplicatePoints (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Merges points to one if the distance between them is less than the global \a MeshDefinitions::_fMinPointDistanceD1. - */ - bool Evaluate () override; - /** - * Returns the indices of all duplicated points. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + explicit MeshEvalDuplicatePoints(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Merges points to one if the distance between them is less than the global \a + * MeshDefinitions::_fMinPointDistanceD1. + */ + bool Evaluate() override; + /** + * Returns the indices of all duplicated points. + */ + std::vector GetIndices() const; }; /** @@ -108,17 +117,19 @@ public: * @see MeshEvalDuplicatePoints * @author Werner Mayer */ -class MeshExport MeshFixDuplicatePoints : public MeshValidation +class MeshExport MeshFixDuplicatePoints: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixDuplicatePoints (MeshKernel &rclM) : MeshValidation( rclM ) { } - /** - * Merges duplicated points. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixDuplicatePoints(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Merges duplicated points. + */ + bool Fixup() override; }; /** @@ -126,21 +137,23 @@ public: * @see MeshFixNaNPoints * @author Werner Mayer */ -class MeshExport MeshEvalNaNPoints : public MeshEvaluation +class MeshExport MeshEvalNaNPoints: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalNaNPoints (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Returns false if a point with NaN coordinate is found. - */ - bool Evaluate () override; - /** - * Returns the indices of all NaN points. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + explicit MeshEvalNaNPoints(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Returns false if a point with NaN coordinate is found. + */ + bool Evaluate() override; + /** + * Returns the indices of all NaN points. + */ + std::vector GetIndices() const; }; /** @@ -148,41 +161,45 @@ public: * @see MeshEvalNaNPoints * @author Werner Mayer */ -class MeshExport MeshFixNaNPoints : public MeshValidation +class MeshExport MeshFixNaNPoints: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixNaNPoints (MeshKernel &rclM) : MeshValidation( rclM ) { } - /** - * Merges duplicated points. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixNaNPoints(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Merges duplicated points. + */ + bool Fixup() override; }; /** * The MeshEvalDuplicateFacets class searches for duplicated facets. - * A facet is regarded as duplicated if all its point indices refer to the same location in the point array of the mesh kernel. - * The actual geometric points are not taken into consideration. + * A facet is regarded as duplicated if all its point indices refer to the same location in the + * point array of the mesh kernel. The actual geometric points are not taken into consideration. * @see MeshFixDuplicateFacets * @author Werner Mayer */ -class MeshExport MeshEvalDuplicateFacets : public MeshEvaluation +class MeshExport MeshEvalDuplicateFacets: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalDuplicateFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Searches for duplicated facets. - */ - bool Evaluate () override; - /** - * Returns the indices of all duplicated facets. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + explicit MeshEvalDuplicateFacets(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Searches for duplicated facets. + */ + bool Evaluate() override; + /** + * Returns the indices of all duplicated facets. + */ + std::vector GetIndices() const; }; /** @@ -190,76 +207,85 @@ public: * @see MeshEvalDuplicateFacets * @author Werner Mayer */ -class MeshExport MeshFixDuplicateFacets : public MeshValidation +class MeshExport MeshFixDuplicateFacets: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixDuplicateFacets (MeshKernel &rclM) : MeshValidation( rclM ) { } - /** - * Removes duplicated facets. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixDuplicateFacets(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Removes duplicated facets. + */ + bool Fixup() override; }; /** * The MeshEvalInternalFacets class identifies internal facets of a volume mesh. * @author Werner Mayer */ -class MeshExport MeshEvalInternalFacets : public MeshEvaluation +class MeshExport MeshEvalInternalFacets: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalInternalFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Identify internal facets. - */ - bool Evaluate () override; - /** - * Return the indices. - */ - const std::vector& GetIndices() const - { return _indices; } + /** + * Construction. + */ + explicit MeshEvalInternalFacets(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Identify internal facets. + */ + bool Evaluate() override; + /** + * Return the indices. + */ + const std::vector& GetIndices() const + { + return _indices; + } private: std::vector _indices; }; /** - * The MeshEvalDegeneratedFacets class searches for degenerated facets. A facet is degenerated either if its points - * are collinear, i.e. they lie on a line or two points are coincident. In the latter case these points are duplicated. - * If a facet refers to at least two equal point indices then the facet is also regarded is 'corrupt'. + * The MeshEvalDegeneratedFacets class searches for degenerated facets. A facet is degenerated + * either if its points are collinear, i.e. they lie on a line or two points are coincident. In the + * latter case these points are duplicated. If a facet refers to at least two equal point indices + * then the facet is also regarded is 'corrupt'. * @see MeshEvalCorruptedFacets * @see MeshEvalDuplicatePoints * @see MeshFixDegeneratedFacets * @author Werner Mayer */ -class MeshExport MeshEvalDegeneratedFacets : public MeshEvaluation +class MeshExport MeshEvalDegeneratedFacets: public MeshEvaluation { public: - /** - * Construction. - */ - MeshEvalDegeneratedFacets (const MeshKernel &rclM, float fEps) - : MeshEvaluation(rclM), fEpsilon(fEps) {} - /** - * Searches degenerated facets. - */ - bool Evaluate () override; - /** - * Returns the number of facets with an edge smaller than \a fMinEdgeLength. - */ - unsigned long CountEdgeTooSmall (float fMinEdgeLength) const; - /** - * Returns the indices of all corrupt facets. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + MeshEvalDegeneratedFacets(const MeshKernel& rclM, float fEps) + : MeshEvaluation(rclM) + , fEpsilon(fEps) + {} + /** + * Searches degenerated facets. + */ + bool Evaluate() override; + /** + * Returns the number of facets with an edge smaller than \a fMinEdgeLength. + */ + unsigned long CountEdgeTooSmall(float fMinEdgeLength) const; + /** + * Returns the indices of all corrupt facets. + */ + std::vector GetIndices() const; private: - float fEpsilon; + float fEpsilon; }; /** @@ -267,21 +293,23 @@ private: * @see MeshEvalDegeneratedFacets * @author Werner Mayer */ -class MeshExport MeshFixDegeneratedFacets : public MeshValidation +class MeshExport MeshFixDegeneratedFacets: public MeshValidation { public: - /** - * Construction. - */ - MeshFixDegeneratedFacets (MeshKernel &rclM, float fEps) - : MeshValidation(rclM), fEpsilon(fEps) { } - /** - * Removes degenerated facets. - */ - bool Fixup () override; + /** + * Construction. + */ + MeshFixDegeneratedFacets(MeshKernel& rclM, float fEps) + : MeshValidation(rclM) + , fEpsilon(fEps) + {} + /** + * Removes degenerated facets. + */ + bool Fixup() override; private: - float fEpsilon; + float fEpsilon; }; /** @@ -292,7 +320,7 @@ private: * @see MeshFixCaps * @author Werner Mayer */ -class MeshExport MeshRemoveNeedles : public MeshValidation +class MeshExport MeshRemoveNeedles: public MeshValidation { public: /** @@ -300,16 +328,18 @@ public: * It defines the amount of perimeter of a triangle for which the shortest * edge is considered for removal. */ - explicit MeshRemoveNeedles (MeshKernel &rclM, float fMinEdgeLen = 0.05f) - : MeshValidation(rclM), fMinEdgeLength(std::min(fMinEdgeLen, 0.25f)) {} - /** - * Removes all facets with an edge smaller than \a fMinEdgeLength without leaving holes or gaps - * in the mesh. - */ - bool Fixup () override; + explicit MeshRemoveNeedles(MeshKernel& rclM, float fMinEdgeLen = 0.05f) + : MeshValidation(rclM) + , fMinEdgeLength(std::min(fMinEdgeLen, 0.25f)) + {} + /** + * Removes all facets with an edge smaller than \a fMinEdgeLength without leaving holes or gaps + * in the mesh. + */ + bool Fixup() override; private: - float fMinEdgeLength; + float fMinEdgeLength; }; /** @@ -322,21 +352,26 @@ private: * @see MeshRemoveNeedles * @author Werner Mayer */ -class MeshExport MeshFixCaps : public MeshValidation +class MeshExport MeshFixCaps: public MeshValidation { public: - /** - * Construction. The \arg fFactor must be in the range of 0.0 and 0.5. - */ - explicit MeshFixCaps (MeshKernel &rclM, float fMaxAng = 2.61f, float fFactor = 0.25f) // ~150 degree - : MeshValidation(rclM), fMaxAngle(fMaxAng), fSplitFactor(fFactor) { } - /** - */ - bool Fixup () override; + /** + * Construction. The \arg fFactor must be in the range of 0.0 and 0.5. + */ + explicit MeshFixCaps(MeshKernel& rclM, + float fMaxAng = 2.61f, + float fFactor = 0.25f) // ~150 degree + : MeshValidation(rclM) + , fMaxAngle(fMaxAng) + , fSplitFactor(fFactor) + {} + /** + */ + bool Fixup() override; private: - float fMaxAngle; - float fSplitFactor; + float fMaxAngle; + float fSplitFactor; }; /** @@ -345,86 +380,108 @@ private: * @see MeshFixDegeneratedFacets * @author Werner Mayer */ -class MeshExport MeshEvalDeformedFacets : public MeshEvaluation +class MeshExport MeshEvalDeformedFacets: public MeshEvaluation { public: - /** - * Construction. - */ - MeshEvalDeformedFacets (const MeshKernel &rclM, float fMinAngle, float fMaxAngle) - : MeshEvaluation(rclM), fMinAngle(fMinAngle), fMaxAngle(fMaxAngle) { } - /** - * Searches deformed facets. - */ - bool Evaluate () override; - /** - * Returns the indices of deformed facets. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + MeshEvalDeformedFacets(const MeshKernel& rclM, float fMinAngle, float fMaxAngle) + : MeshEvaluation(rclM) + , fMinAngle(fMinAngle) + , fMaxAngle(fMaxAngle) + {} + /** + * Searches deformed facets. + */ + bool Evaluate() override; + /** + * Returns the indices of deformed facets. + */ + std::vector GetIndices() const; private: - float fMinAngle; /**< If an angle of a facet is lower than fMinAngle it's considered as deformed. */ - float fMaxAngle; /**< If an angle of a facet is higher than fMaxAngle it's considered as deformed. */ + float fMinAngle; /**< If an angle of a facet is lower than fMinAngle it's considered as + deformed. */ + float fMaxAngle; /**< If an angle of a facet is higher than fMaxAngle it's considered as + deformed. */ }; /** - * The MeshFixDeformedFacets class tries to fix deformed facets by swapping the common edge with one of their neighbours. - * @note Degenerated facets are also deformed facet but this algorithm tries to fix deformed facets that or not degenerated. - * The removal of degenerated facets is done by @ref MeshFixDegeneratedFacets. + * The MeshFixDeformedFacets class tries to fix deformed facets by swapping the common edge with one + * of their neighbours. + * @note Degenerated facets are also deformed facet but this algorithm tries to fix deformed facets + * that or not degenerated. The removal of degenerated facets is done by @ref + * MeshFixDegeneratedFacets. * @see MeshEvalDeformedFacets * @author Werner Mayer */ -class MeshExport MeshFixDeformedFacets : public MeshValidation +class MeshExport MeshFixDeformedFacets: public MeshValidation { public: - /** - * Construction. - */ - MeshFixDeformedFacets (MeshKernel &rclM, float fMinAngle, float fMaxAngle, float fSwapAngle, float fEps) - : MeshValidation(rclM), fMinAngle(fMinAngle), fMaxAngle(fMaxAngle), - fMaxSwapAngle(fSwapAngle), fEpsilon(fEps) { } - /** - * Removes deformed facets. - */ - bool Fixup () override; + /** + * Construction. + */ + MeshFixDeformedFacets(MeshKernel& rclM, + float fMinAngle, + float fMaxAngle, + float fSwapAngle, + float fEps) + : MeshValidation(rclM) + , fMinAngle(fMinAngle) + , fMaxAngle(fMaxAngle) + , fMaxSwapAngle(fSwapAngle) + , fEpsilon(fEps) + {} + /** + * Removes deformed facets. + */ + bool Fixup() override; private: - float fMinAngle; /**< If an angle of a facet is lower than fMinAngle it's considered as deformed. */ - float fMaxAngle; /**< If an angle of a facet is higher than fMaxAngle it's considered as deformed. */ - float fMaxSwapAngle; /**< A swap edge is only allowed if the angle of both normals doesn't exceed fMaxSwapAngle */ - float fEpsilon; + float fMinAngle; /**< If an angle of a facet is lower than fMinAngle it's considered as + deformed. */ + float fMaxAngle; /**< If an angle of a facet is higher than fMaxAngle it's considered as + deformed. */ + float fMaxSwapAngle; /**< A swap edge is only allowed if the angle of both normals doesn't + exceed fMaxSwapAngle */ + float fEpsilon; }; /** - * The MeshFixMergeFacets class removes vertexes which have three adjacent vertexes and is referenced by three facets. - * Usually all the three facets that reference this vertex are not well-formed. If the number of adjacent vertexes - * is equal to the number of adjacent facets the affected vertex never lies on the boundary and thus it's safe to delete - * and replace the three facets with a single facet. - * Effectively this algorithm does the opposite of \ref MeshTopoAlgorithm::InsertVertex + * The MeshFixMergeFacets class removes vertexes which have three adjacent vertexes and is + * referenced by three facets. Usually all the three facets that reference this vertex are not + * well-formed. If the number of adjacent vertexes is equal to the number of adjacent facets the + * affected vertex never lies on the boundary and thus it's safe to delete and replace the three + * facets with a single facet. Effectively this algorithm does the opposite of \ref + * MeshTopoAlgorithm::InsertVertex * @author Werner Mayer */ -class MeshExport MeshFixMergeFacets : public MeshValidation +class MeshExport MeshFixMergeFacets: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixMergeFacets (MeshKernel &rclM) - : MeshValidation(rclM) { } - /** - * Removes deformed facets. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixMergeFacets(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Removes deformed facets. + */ + bool Fixup() override; }; /** * If an adjacent point (A) of a point (P) can be projected onto a triangle shared * by (P) but not by (A) then we have a local dent. The topology is not affected. */ -class MeshExport MeshEvalDentsOnSurface : public MeshEvaluation +class MeshExport MeshEvalDentsOnSurface: public MeshEvaluation { public: - explicit MeshEvalDentsOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } + explicit MeshEvalDentsOnSurface(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} bool Evaluate() override; std::vector GetIndices() const; @@ -433,10 +490,12 @@ private: std::vector indices; }; -class MeshExport MeshFixDentsOnSurface : public MeshValidation +class MeshExport MeshFixDentsOnSurface: public MeshValidation { public: - explicit MeshFixDentsOnSurface (MeshKernel &rclM) : MeshValidation( rclM ) { } + explicit MeshFixDentsOnSurface(MeshKernel& rclM) + : MeshValidation(rclM) + {} bool Fixup() override; }; @@ -446,10 +505,12 @@ public: * but the angles between both of these adjacent triangles is higher than 90 deg * we have a fold. The topology is not affected but the geometry is broken. */ -class MeshExport MeshEvalFoldsOnSurface : public MeshEvaluation +class MeshExport MeshEvalFoldsOnSurface: public MeshEvaluation { public: - explicit MeshEvalFoldsOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } + explicit MeshEvalFoldsOnSurface(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} bool Evaluate() override; std::vector GetIndices() const; @@ -464,10 +525,12 @@ private: * The topology is not affected there but such triangles can lead to problems * on some hole-filling algorithms. */ -class MeshExport MeshEvalFoldsOnBoundary : public MeshEvaluation +class MeshExport MeshEvalFoldsOnBoundary: public MeshEvaluation { public: - explicit MeshEvalFoldsOnBoundary (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } + explicit MeshEvalFoldsOnBoundary(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} bool Evaluate() override; std::vector GetIndices() const; @@ -476,10 +539,12 @@ private: std::vector indices; }; -class MeshExport MeshFixFoldsOnBoundary : public MeshValidation +class MeshExport MeshFixFoldsOnBoundary: public MeshValidation { public: - explicit MeshFixFoldsOnBoundary (MeshKernel &rclM) : MeshValidation( rclM ) { } + explicit MeshFixFoldsOnBoundary(MeshKernel& rclM) + : MeshValidation(rclM) + {} bool Fixup() override; }; @@ -488,14 +553,18 @@ public: * Considers two adjacent triangles with an angle higher than 120 deg of their * normals as a fold-over. The topology is not affected there. */ -class MeshExport MeshEvalFoldOversOnSurface : public MeshEvaluation +class MeshExport MeshEvalFoldOversOnSurface: public MeshEvaluation { public: - explicit MeshEvalFoldOversOnSurface (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } + explicit MeshEvalFoldOversOnSurface(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} bool Evaluate() override; std::vector GetIndices() const - { return this->indices; } + { + return this->indices; + } private: std::vector indices; @@ -506,12 +575,14 @@ private: * part of a boundary. * @see MeshEvalSingleFacet */ -class MeshExport MeshEvalBorderFacet : public MeshEvaluation +class MeshExport MeshEvalBorderFacet: public MeshEvaluation { public: - MeshEvalBorderFacet (const MeshKernel &rclB, std::vector& f) - : MeshEvaluation(rclB), _facets(f) {} - bool Evaluate() override; + MeshEvalBorderFacet(const MeshKernel& rclB, std::vector& f) + : MeshEvaluation(rclB) + , _facets(f) + {} + bool Evaluate() override; protected: std::vector& _facets; @@ -528,21 +599,23 @@ protected: * @see MeshFixRangeFacet * @author Werner Mayer */ -class MeshExport MeshEvalRangeFacet : public MeshEvaluation +class MeshExport MeshEvalRangeFacet: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalRangeFacet (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Searches for facets that has neighbour facet indices out of range. - */ - bool Evaluate () override; - /** - * Returns the indices of all facets with invalid neighbour indices. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + explicit MeshEvalRangeFacet(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Searches for facets that has neighbour facet indices out of range. + */ + bool Evaluate() override; + /** + * Returns the indices of all facets with invalid neighbour indices. + */ + std::vector GetIndices() const; }; /** @@ -550,17 +623,19 @@ public: * @see MeshEvalRangeFacet * @author Werner Mayer */ -class MeshExport MeshFixRangeFacet : public MeshValidation +class MeshExport MeshFixRangeFacet: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixRangeFacet (MeshKernel &rclM) : MeshValidation( rclM ) { } - /** - * Fixes facets with neighbour indices out of range. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixRangeFacet(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Fixes facets with neighbour indices out of range. + */ + bool Fixup() override; }; /** @@ -568,21 +643,23 @@ public: * @see MeshFixRangePoint * @author Werner Mayer */ -class MeshExport MeshEvalRangePoint : public MeshEvaluation +class MeshExport MeshEvalRangePoint: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalRangePoint (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Searches for facets that has point indices out of range. - */ - bool Evaluate () override; - /** - * Returns the indices of all facets with invalid point indices. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + explicit MeshEvalRangePoint(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Searches for facets that has point indices out of range. + */ + bool Evaluate() override; + /** + * Returns the indices of all facets with invalid point indices. + */ + std::vector GetIndices() const; }; /** @@ -590,17 +667,19 @@ public: * @see MeshFixRangePoint * @author Werner Mayer */ -class MeshExport MeshFixRangePoint : public MeshValidation +class MeshExport MeshFixRangePoint: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixRangePoint (MeshKernel &rclM) : MeshValidation( rclM ) { } - /** - * Fixes facets with point indices out of range. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixRangePoint(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Fixes facets with point indices out of range. + */ + bool Fixup() override; }; /** @@ -609,21 +688,23 @@ public: * @see MeshFixCorruptedFacets * @author Werner Mayer */ -class MeshExport MeshEvalCorruptedFacets : public MeshEvaluation +class MeshExport MeshEvalCorruptedFacets: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalCorruptedFacets (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Searches for corrupted facets. - */ - bool Evaluate () override; - /** - * Returns the indices of all corrupt facets. - */ - std::vector GetIndices() const; + /** + * Construction. + */ + explicit MeshEvalCorruptedFacets(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Searches for corrupted facets. + */ + bool Evaluate() override; + /** + * Returns the indices of all corrupt facets. + */ + std::vector GetIndices() const; }; /** @@ -632,17 +713,19 @@ public: * @see MeshEvalCorruptedFacets * @author Werner Mayer */ -class MeshExport MeshFixCorruptedFacets : public MeshValidation +class MeshExport MeshFixCorruptedFacets: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixCorruptedFacets (MeshKernel &rclM) : MeshValidation( rclM ) { } - /** - * Removes corrupted facets. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixCorruptedFacets(MeshKernel& rclM) + : MeshValidation(rclM) + {} + /** + * Removes corrupted facets. + */ + bool Fixup() override; }; /** @@ -650,29 +733,31 @@ public: * @see MeshFixPointOnEdge * @author Werner Mayer */ -class MeshExport MeshEvalPointOnEdge : public MeshEvaluation +class MeshExport MeshEvalPointOnEdge: public MeshEvaluation { public: - /** - * Construction. - */ - explicit MeshEvalPointOnEdge (const MeshKernel &rclM) : MeshEvaluation( rclM ) { } - /** - * Searches for points that lie on edge of triangle. - */ - bool Evaluate () override; - /** - * Returns the indices of all points on edge. - */ - std::vector GetPointIndices() const; - /** - * Returns the indices of all facets with an open edge on that a point lies. - */ - std::vector GetFacetIndices() const; + /** + * Construction. + */ + explicit MeshEvalPointOnEdge(const MeshKernel& rclM) + : MeshEvaluation(rclM) + {} + /** + * Searches for points that lie on edge of triangle. + */ + bool Evaluate() override; + /** + * Returns the indices of all points on edge. + */ + std::vector GetPointIndices() const; + /** + * Returns the indices of all facets with an open edge on that a point lies. + */ + std::vector GetFacetIndices() const; private: - std::vector pointsIndices; - std::vector facetsIndices; + std::vector pointsIndices; + std::vector facetsIndices; }; /** @@ -680,27 +765,30 @@ private: * @see MeshEvalPointOnEdge * @author Werner Mayer */ -class MeshExport MeshFixPointOnEdge : public MeshValidation +class MeshExport MeshFixPointOnEdge: public MeshValidation { public: - /** - * Construction. - */ - explicit MeshFixPointOnEdge (MeshKernel &rclM, bool fill = false) : MeshValidation( rclM ), fillBoundary(fill) { } - /** - * Removes points that lie on edges of triangles. - */ - bool Fixup () override; + /** + * Construction. + */ + explicit MeshFixPointOnEdge(MeshKernel& rclM, bool fill = false) + : MeshValidation(rclM) + , fillBoundary(fill) + {} + /** + * Removes points that lie on edges of triangles. + */ + bool Fixup() override; private: - void MarkBoundaries(const std::vector& facetsIndices); - void FindBoundaries(std::list >& borderList); - void FillBoundaries(const std::list >& borderList); + void MarkBoundaries(const std::vector& facetsIndices); + void FindBoundaries(std::list>& borderList); + void FillBoundaries(const std::list>& borderList); private: - bool fillBoundary; + bool fillBoundary; }; -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_DEGENERATION_H +#endif // MESH_DEGENERATION_H diff --git a/src/Mod/Mesh/App/Core/Elements.cpp b/src/Mod/Mesh/App/Core/Elements.cpp index 4cfa55398f..4f04abe768 100644 --- a/src/Mod/Mesh/App/Core/Elements.cpp +++ b/src/Mod/Mesh/App/Core/Elements.cpp @@ -22,15 +22,15 @@ #include "PreCompiled.h" -#include -#include #include #include +#include +#include -#include "Elements.h" #include "Algorithm.h" -#include "tritritest.h" +#include "Elements.h" #include "Utilities.h" +#include "tritritest.h" using namespace MeshCore; @@ -40,194 +40,213 @@ MeshPointArray::MeshPointArray(const MeshPointArray& ary) = default; MeshPointArray::MeshPointArray(MeshPointArray&& ary) = default; -PointIndex MeshPointArray::Get (const MeshPoint &rclPoint) +PointIndex MeshPointArray::Get(const MeshPoint& rclPoint) { - iterator clIter; + iterator clIter; - clIter = std::find(begin(), end(), rclPoint); - if (clIter != end()) - return clIter - begin(); - else - return POINT_INDEX_MAX; + clIter = std::find(begin(), end(), rclPoint); + if (clIter != end()) { + return clIter - begin(); + } + else { + return POINT_INDEX_MAX; + } } -PointIndex MeshPointArray::GetOrAddIndex (const MeshPoint &rclPoint) +PointIndex MeshPointArray::GetOrAddIndex(const MeshPoint& rclPoint) { - PointIndex ulIndex; + PointIndex ulIndex; - if ((ulIndex = Get(rclPoint)) == POINT_INDEX_MAX) - { - push_back(rclPoint); - return static_cast(size() - 1); - } - else - return ulIndex; + if ((ulIndex = Get(rclPoint)) == POINT_INDEX_MAX) { + push_back(rclPoint); + return static_cast(size() - 1); + } + else { + return ulIndex; + } } -void MeshPointArray::SetFlag (MeshPoint::TFlagType tF) const +void MeshPointArray::SetFlag(MeshPoint::TFlagType tF) const { - for (MeshPointArray::_TConstIterator i = begin(); i < end(); ++i) i->SetFlag(tF); + for (MeshPointArray::_TConstIterator i = begin(); i < end(); ++i) { + i->SetFlag(tF); + } } -void MeshPointArray::ResetFlag (MeshPoint::TFlagType tF) const +void MeshPointArray::ResetFlag(MeshPoint::TFlagType tF) const { - for (MeshPointArray::_TConstIterator i = begin(); i < end(); ++i) i->ResetFlag(tF); + for (MeshPointArray::_TConstIterator i = begin(); i < end(); ++i) { + i->ResetFlag(tF); + } } -void MeshPointArray::SetProperty (unsigned long ulVal) const +void MeshPointArray::SetProperty(unsigned long ulVal) const { - for (const auto & pP : *this) pP.SetProperty(ulVal); + for (const auto& pP : *this) { + pP.SetProperty(ulVal); + } } -void MeshPointArray::ResetInvalid () const +void MeshPointArray::ResetInvalid() const { - for (const auto & pP : *this) pP.ResetInvalid(); + for (const auto& pP : *this) { + pP.ResetInvalid(); + } } -MeshPointArray& MeshPointArray::operator = (const MeshPointArray &rclPAry) = default; +MeshPointArray& MeshPointArray::operator=(const MeshPointArray& rclPAry) = default; -MeshPointArray& MeshPointArray::operator = (MeshPointArray &&rclPAry) = default; +MeshPointArray& MeshPointArray::operator=(MeshPointArray&& rclPAry) = default; void MeshPointArray::Transform(const Base::Matrix4D& mat) { - for (auto & pP : *this) - mat.multVec(pP,pP); + for (auto& pP : *this) { + mat.multVec(pP, pP); + } } MeshFacetArray::MeshFacetArray(const MeshFacetArray& ary) = default; MeshFacetArray::MeshFacetArray(MeshFacetArray&& ary) = default; -void MeshFacetArray::Erase (_TIterator pIter) +void MeshFacetArray::Erase(_TIterator pIter) { - FacetIndex i, *pulN; - _TIterator pPass, pEnd; - FacetIndex ulInd = pIter - begin(); - erase(pIter); - pPass = begin(); - pEnd = end(); - while (pPass < pEnd) - { - for (i = 0; i < 3; i++) - { - pulN = &pPass->_aulNeighbours[i]; - if ((*pulN > ulInd) && (*pulN != FACET_INDEX_MAX)) - (*pulN)--; + FacetIndex i, *pulN; + _TIterator pPass, pEnd; + FacetIndex ulInd = pIter - begin(); + erase(pIter); + pPass = begin(); + pEnd = end(); + while (pPass < pEnd) { + for (i = 0; i < 3; i++) { + pulN = &pPass->_aulNeighbours[i]; + if ((*pulN > ulInd) && (*pulN != FACET_INDEX_MAX)) { + (*pulN)--; + } + } + pPass++; } - pPass++; - } } -void MeshFacetArray::TransposeIndices (PointIndex ulOrig, PointIndex ulNew) +void MeshFacetArray::TransposeIndices(PointIndex ulOrig, PointIndex ulNew) { - _TIterator pIter = begin(), pEnd = end(); + _TIterator pIter = begin(), pEnd = end(); - while (pIter < pEnd) - { - pIter->Transpose(ulOrig, ulNew); - ++pIter; - } + while (pIter < pEnd) { + pIter->Transpose(ulOrig, ulNew); + ++pIter; + } } -void MeshFacetArray::DecrementIndices (PointIndex ulIndex) +void MeshFacetArray::DecrementIndices(PointIndex ulIndex) { - _TIterator pIter = begin(), pEnd = end(); + _TIterator pIter = begin(), pEnd = end(); - while (pIter < pEnd) - { - pIter->Decrement(ulIndex); - ++pIter; - } + while (pIter < pEnd) { + pIter->Decrement(ulIndex); + ++pIter; + } } -void MeshFacetArray::SetFlag (MeshFacet::TFlagType tF) const +void MeshFacetArray::SetFlag(MeshFacet::TFlagType tF) const { - for (MeshFacetArray::_TConstIterator i = begin(); i < end(); ++i) i->SetFlag(tF); + for (MeshFacetArray::_TConstIterator i = begin(); i < end(); ++i) { + i->SetFlag(tF); + } } -void MeshFacetArray::ResetFlag (MeshFacet::TFlagType tF) const +void MeshFacetArray::ResetFlag(MeshFacet::TFlagType tF) const { - for (MeshFacetArray::_TConstIterator i = begin(); i < end(); ++i) i->ResetFlag(tF); + for (MeshFacetArray::_TConstIterator i = begin(); i < end(); ++i) { + i->ResetFlag(tF); + } } -void MeshFacetArray::SetProperty (unsigned long ulVal) const +void MeshFacetArray::SetProperty(unsigned long ulVal) const { - for (const auto & pF : *this) pF.SetProperty(ulVal); + for (const auto& pF : *this) { + pF.SetProperty(ulVal); + } } -void MeshFacetArray::ResetInvalid () const +void MeshFacetArray::ResetInvalid() const { - for (const auto & pF : *this) pF.ResetInvalid(); + for (const auto& pF : *this) { + pF.ResetInvalid(); + } } -MeshFacetArray& MeshFacetArray::operator = (const MeshFacetArray &rclFAry) = default; +MeshFacetArray& MeshFacetArray::operator=(const MeshFacetArray& rclFAry) = default; -MeshFacetArray& MeshFacetArray::operator = (MeshFacetArray &&rclFAry) = default; +MeshFacetArray& MeshFacetArray::operator=(MeshFacetArray&& rclFAry) = default; // ----------------------------------------------------------------- -bool MeshGeomEdge::ContainedByOrIntersectBoundingBox ( const Base::BoundBox3f &rclBB ) const +bool MeshGeomEdge::ContainedByOrIntersectBoundingBox(const Base::BoundBox3f& rclBB) const { - // Test whether all corner points of the Edge are on one of the 6 sides of the BB - if (!(GetBoundBox() && rclBB)) + // Test whether all corner points of the Edge are on one of the 6 sides of the BB + if (!(GetBoundBox() && rclBB)) { + return false; + } + + // Test whether Edge-BB is completely in BB + if (rclBB.IsInBox(GetBoundBox())) { + return true; + } + + // Test whether one of the corner points is in BB + for (const auto& pnt : _aclPoints) { + if (rclBB.IsInBox(pnt)) { + return true; + } + } + + // "real" test for cut + if (IntersectBoundingBox(rclBB)) { + return true; + } + return false; - - // Test whether Edge-BB is completely in BB - if (rclBB.IsInBox(GetBoundBox())) - return true; - - // Test whether one of the corner points is in BB - for (const auto& pnt : _aclPoints) - { - if (rclBB.IsInBox(pnt)) - return true; - } - - // "real" test for cut - if (IntersectBoundingBox(rclBB)) - return true; - - return false; } -Base::BoundBox3f MeshGeomEdge::GetBoundBox () const +Base::BoundBox3f MeshGeomEdge::GetBoundBox() const { - return {_aclPoints,2}; + return {_aclPoints, 2}; } -bool MeshGeomEdge::IntersectBoundingBox (const Base::BoundBox3f &rclBB) const +bool MeshGeomEdge::IntersectBoundingBox(const Base::BoundBox3f& rclBB) const { - const Base::Vector3f& rclP0 = _aclPoints[0]; - const Base::Vector3f& rclP1 = _aclPoints[1]; + const Base::Vector3f& rclP0 = _aclPoints[0]; + const Base::Vector3f& rclP1 = _aclPoints[1]; - Vector3 A(rclP0.x, rclP0.y, rclP0.z); - Vector3 B(rclP1.x, rclP1.y, rclP1.z); + Vector3 A(rclP0.x, rclP0.y, rclP0.z); + Vector3 B(rclP1.x, rclP1.y, rclP1.z); - Vector3 n = B - A; - float len = n.Length(); - n.Normalize(); - Vector3 p = 0.5f*(A + B); + Vector3 n = B - A; + float len = n.Length(); + n.Normalize(); + Vector3 p = 0.5f * (A + B); - Segment3 akSeg(p, n, 0.5f*len); + Segment3 akSeg(p, n, 0.5f * len); - Base::Vector3f clCenter = rclBB.GetCenter(); - Vector3 center(clCenter.x, clCenter.y, clCenter.z); - Vector3 axis0(1.0f, 0.0f, 0.0f); - Vector3 axis1(0.0f, 1.0f, 0.0f); - Vector3 axis2(0.0f, 0.0f, 1.0f); - float extent0 = 0.5f*rclBB.LengthX(); - float extent1 = 0.5f*rclBB.LengthY(); - float extent2 = 0.5f*rclBB.LengthZ(); + Base::Vector3f clCenter = rclBB.GetCenter(); + Vector3 center(clCenter.x, clCenter.y, clCenter.z); + Vector3 axis0(1.0f, 0.0f, 0.0f); + Vector3 axis1(0.0f, 1.0f, 0.0f); + Vector3 axis2(0.0f, 0.0f, 1.0f); + float extent0 = 0.5f * rclBB.LengthX(); + float extent1 = 0.5f * rclBB.LengthY(); + float extent2 = 0.5f * rclBB.LengthZ(); - Box3 kBox(center, axis0, axis1, axis2, extent0, extent1, extent2); + Box3 kBox(center, axis0, axis1, axis2, extent0, extent1, extent2); - IntrSegment3Box3 intrsectbox(akSeg, kBox, false); - return intrsectbox.Test(); + IntrSegment3Box3 intrsectbox(akSeg, kBox, false); + return intrsectbox.Test(); } -bool MeshGeomEdge::IntersectWithLine (const Base::Vector3f &rclPt, - const Base::Vector3f &rclDir, - Base::Vector3f &rclRes) const +bool MeshGeomEdge::IntersectWithLine(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes) const { const float eps = 1e-06f; Base::Vector3f n = _aclPoints[1] - _aclPoints[0]; @@ -244,7 +263,7 @@ bool MeshGeomEdge::IntersectWithLine (const Base::Vector3f &rclPt, return true; } - return false; // no intersection possible + return false; // no intersection possible } // that's the normal of a helper plane and its base at _aclPoints @@ -252,8 +271,9 @@ bool MeshGeomEdge::IntersectWithLine (const Base::Vector3f &rclPt, // if the distance of rclPt to the plane is higher than eps then the // two lines are warped and there is no intersection possible - if (fabs(rclPt.DistanceToPlane(_aclPoints[0], normal)) > eps) + if (fabs(rclPt.DistanceToPlane(_aclPoints[0], normal)) > eps) { return false; + } // get a second helper plane and get the intersection with the line Base::Vector3f normal2 = normal.Cross(n); @@ -268,7 +288,7 @@ bool MeshGeomEdge::IntersectWithLine (const Base::Vector3f &rclPt, return dist2 + dist3 <= dist1 + eps; } -bool MeshGeomEdge::IsParallel(const MeshGeomEdge &edge) const +bool MeshGeomEdge::IsParallel(const MeshGeomEdge& edge) const { Base::Vector3f r(_aclPoints[1] - _aclPoints[0]); Base::Vector3f s(edge._aclPoints[1] - edge._aclPoints[0]); @@ -276,7 +296,7 @@ bool MeshGeomEdge::IsParallel(const MeshGeomEdge &edge) const return n.IsNull(); } -bool MeshGeomEdge::IsCollinear(const MeshGeomEdge &edge) const +bool MeshGeomEdge::IsCollinear(const MeshGeomEdge& edge) const { if (IsParallel(edge)) { Base::Vector3f r(_aclPoints[1] - _aclPoints[0]); @@ -287,7 +307,7 @@ bool MeshGeomEdge::IsCollinear(const MeshGeomEdge &edge) const return false; } -bool MeshGeomEdge::IntersectWithEdge (const MeshGeomEdge &edge, Base::Vector3f &res) const +bool MeshGeomEdge::IntersectWithEdge(const MeshGeomEdge& edge, Base::Vector3f& res) const { const float eps = 1e-06f; Base::Vector3f p(_aclPoints[0]); @@ -322,8 +342,9 @@ bool MeshGeomEdge::IntersectWithEdge (const MeshGeomEdge &edge, Base::Vector3f & float distance = q.DistanceToPlane(p, n); // lines are warped - if (fabs(distance) > eps) + if (fabs(distance) > eps) { return false; + } float t = d.Cross(s).Dot(n) / n.Sqr(); float u = d.Cross(r).Dot(n) / n.Sqr(); @@ -333,7 +354,7 @@ bool MeshGeomEdge::IntersectWithEdge (const MeshGeomEdge &edge, Base::Vector3f & }; if (is_in_range(t) && is_in_range(u)) { - res = p + t * r; // equal to q + u * s + res = p + t * r; // equal to q + u * s return true; } @@ -341,16 +362,17 @@ bool MeshGeomEdge::IntersectWithEdge (const MeshGeomEdge &edge, Base::Vector3f & } } -bool MeshGeomEdge::IntersectWithPlane (const Base::Vector3f &rclPt, - const Base::Vector3f &rclDir, - Base::Vector3f &rclRes) const +bool MeshGeomEdge::IntersectWithPlane(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes) const { float dist1 = _aclPoints[0].DistanceToPlane(rclPt, rclDir); float dist2 = _aclPoints[1].DistanceToPlane(rclPt, rclDir); // either both points are below or above the plane - if (dist1 * dist2 >= 0.0f) + if (dist1 * dist2 >= 0.0f) { return false; + } Base::Vector3f u = _aclPoints[1] - _aclPoints[0]; Base::Vector3f b = rclPt - _aclPoints[0]; @@ -360,8 +382,7 @@ bool MeshGeomEdge::IntersectWithPlane (const Base::Vector3f &rclPt, return true; } -void MeshGeomEdge::ProjectPointToLine (const Base::Vector3f &rclPoint, - Base::Vector3f &rclProj) const +void MeshGeomEdge::ProjectPointToLine(const Base::Vector3f& rclPoint, Base::Vector3f& rclProj) const { Base::Vector3f pt1 = rclPoint - _aclPoints[0]; Base::Vector3f dir = _aclPoints[1] - _aclPoints[0]; @@ -370,8 +391,10 @@ void MeshGeomEdge::ProjectPointToLine (const Base::Vector3f &rclPoint, rclProj = rclPoint + vec; } -void MeshGeomEdge::ClosestPointsToLine(const Base::Vector3f &linePt, const Base::Vector3f &lineDir, - Base::Vector3f& rclPnt1, Base::Vector3f& rclPnt2) const +void MeshGeomEdge::ClosestPointsToLine(const Base::Vector3f& linePt, + const Base::Vector3f& lineDir, + Base::Vector3f& rclPnt1, + Base::Vector3f& rclPnt2) const { const float eps = 1e-06f; Base::Vector3f edgeDir = _aclPoints[1] - _aclPoints[0]; @@ -411,7 +434,7 @@ void MeshGeomEdge::ClosestPointsToLine(const Base::Vector3f &linePt, const Base: } } -bool MeshGeomEdge::IsPointOf (const Base::Vector3f &rclPoint, float fDistance) const +bool MeshGeomEdge::IsPointOf(const Base::Vector3f& rclPoint, float fDistance) const { float len2 = Base::DistanceP2(_aclPoints[0], _aclPoints[1]); if (len2 == 0.0f) { @@ -423,8 +446,9 @@ bool MeshGeomEdge::IsPointOf (const Base::Vector3f &rclPoint, float fDistance) c float dot = pXp1 * p2p1; float t = dot / len2; - if (t < 0.0f || t > 1.0f) + if (t < 0.0f || t > 1.0f) { return false; + } // point on the edge Base::Vector3f ptEdge = t * p2p1 + _aclPoints[0]; @@ -441,171 +465,177 @@ bool MeshGeomEdge::IsProjectionPointOf(const Base::Vector3f& point) const // ----------------------------------------------------------------- -MeshGeomFacet::MeshGeomFacet () - : _bNormalCalculated(false), - _ucFlag(0), _ulProp(0) -{ +MeshGeomFacet::MeshGeomFacet() + : _bNormalCalculated(false) + , _ucFlag(0) + , _ulProp(0) +{} + +MeshGeomFacet::MeshGeomFacet(const Base::Vector3f& v1, + const Base::Vector3f& v2, + const Base::Vector3f& v3) + : _bNormalCalculated(false) + , _ucFlag(0) + , _ulProp(0) +{ + _aclPoints[0] = v1; + _aclPoints[1] = v2; + _aclPoints[2] = v3; } -MeshGeomFacet::MeshGeomFacet (const Base::Vector3f &v1,const Base::Vector3f &v2,const Base::Vector3f &v3) - : _bNormalCalculated(false), - _ucFlag(0), - _ulProp(0) +bool MeshGeomFacet::IsPointOf(const Base::Vector3f& rclPoint, float fDistance) const { - _aclPoints[0] = v1; - _aclPoints[1] = v2; - _aclPoints[2] = v3; + if (DistancePlaneToPoint(rclPoint) > fDistance) { + return false; + } + + // force internal normal to be computed if not done yet + Base::Vector3f clNorm(GetNormal()), clProjPt(rclPoint), clEdge; + Base::Vector3f clP0(_aclPoints[0]), clP1(_aclPoints[1]), clP2(_aclPoints[2]); + float fLP, fLE; + + clNorm.Normalize(); + clProjPt.ProjectToPlane(_aclPoints[0], clNorm); + + + // Edge P0 --> P1 + clEdge = clP1 - clP0; + fLP = clProjPt.DistanceToLine(clP0, clEdge); + if (fLP > 0.0f) { + fLE = clP2.DistanceToLine(clP0, clEdge); + if (fLP <= fLE) { + if (clProjPt.DistanceToLine(clP2, clEdge) > fLE) { + return false; + } + } + else { + return false; + } + } + + // Edge P0 --> P2 + clEdge = clP2 - clP0; + fLP = clProjPt.DistanceToLine(clP0, clEdge); + if (fLP > 0.0f) { + fLE = clP1.DistanceToLine(clP0, clEdge); + if (fLP <= fLE) { + if (clProjPt.DistanceToLine(clP1, clEdge) > fLE) { + return false; + } + } + else { + return false; + } + } + + // Edge P1 --> P2 + clEdge = clP2 - clP1; + fLP = clProjPt.DistanceToLine(clP1, clEdge); + if (fLP > 0.0f) { + fLE = clP0.DistanceToLine(clP1, clEdge); + if (fLP <= fLE) { + if (clProjPt.DistanceToLine(clP0, clEdge) > fLE) { + return false; + } + } + else { + return false; + } + } + + return true; } - - -bool MeshGeomFacet::IsPointOf (const Base::Vector3f &rclPoint, float fDistance) const +bool MeshGeomFacet::IsPointOfFace(const Base::Vector3f& rclP, float fDistance) const { - if (DistancePlaneToPoint(rclPoint) > fDistance) - return false; + // more effective implementation than in MeshGeomFacet::IsPointOf + // + Base::Vector3f a(_aclPoints[0].x, _aclPoints[0].y, _aclPoints[0].z); + Base::Vector3f b(_aclPoints[1].x, _aclPoints[1].y, _aclPoints[1].z); + Base::Vector3f c(_aclPoints[2].x, _aclPoints[2].y, _aclPoints[2].z); + Base::Vector3f p(rclP); - // force internal normal to be computed if not done yet - Base::Vector3f clNorm(GetNormal()), clProjPt(rclPoint), clEdge; - Base::Vector3f clP0(_aclPoints[0]), clP1(_aclPoints[1]), clP2(_aclPoints[2]); - float fLP, fLE; + Base::Vector3f n = (b - a) % (c - a); + Base::Vector3f n1 = (a - p) % (b - p); + Base::Vector3f n2 = (c - p) % (a - p); + Base::Vector3f n3 = (b - p) % (c - p); - clNorm.Normalize(); - clProjPt.ProjectToPlane(_aclPoints[0], clNorm); - - - // Edge P0 --> P1 - clEdge = clP1 - clP0; - fLP = clProjPt.DistanceToLine(clP0, clEdge); - if (fLP > 0.0f) - { - fLE = clP2.DistanceToLine(clP0, clEdge); - if (fLP <= fLE) - { - if (clProjPt.DistanceToLine(clP2, clEdge) > fLE) + if (n * (p - a) > fDistance * n.Length()) { return false; } - else - return false; - } - // Edge P0 --> P2 - clEdge = clP2 - clP0; - fLP = clProjPt.DistanceToLine(clP0, clEdge); - if (fLP > 0.0f) - { - fLE = clP1.DistanceToLine(clP0, clEdge); - if (fLP <= fLE) - { - if (clProjPt.DistanceToLine(clP1, clEdge) > fLE) + if (n * (a - p) > fDistance * n.Length()) { return false; } - else - return false; - } - // Edge P1 --> P2 - clEdge = clP2 - clP1; - fLP = clProjPt.DistanceToLine(clP1, clEdge); - if (fLP > 0.0f) - { - fLE = clP0.DistanceToLine(clP1, clEdge); - if (fLP <= fLE) - { - if (clProjPt.DistanceToLine(clP0, clEdge) > fLE) + if (n * n1 <= 0.0f) { return false; } - else - return false; - } - return true; -} + if (n * n2 <= 0.0f) { + return false; + } -bool MeshGeomFacet::IsPointOfFace (const Base::Vector3f& rclP, float fDistance) const -{ - // more effective implementation than in MeshGeomFacet::IsPointOf - // - Base::Vector3f a(_aclPoints[0].x, _aclPoints[0].y, _aclPoints[0].z); - Base::Vector3f b(_aclPoints[1].x, _aclPoints[1].y, _aclPoints[1].z); - Base::Vector3f c(_aclPoints[2].x, _aclPoints[2].y, _aclPoints[2].z); - Base::Vector3f p(rclP); + if (n * n3 <= 0.0f) { + return false; + } - Base::Vector3f n = (b - a) % (c - a); - Base::Vector3f n1 = (a - p) % (b - p); - Base::Vector3f n2 = (c - p) % (a - p); - Base::Vector3f n3 = (b - p) % (c - p); - - if (n * (p - a) > fDistance * n.Length()) - return false; - - if (n * (a - p) > fDistance * n.Length()) - return false; - - if (n * n1 <= 0.0f) - return false; - - if (n * n2 <= 0.0f) - return false; - - if (n * n3 <= 0.0f) - return false; - - return true; + return true; } bool MeshGeomFacet::Weights(const Base::Vector3f& rclP, float& w0, float& w1, float& w2) const { - float fAreaABC = Area(); - float fAreaPBC = MeshGeomFacet(rclP,_aclPoints[1],_aclPoints[2]).Area(); - float fAreaPCA = MeshGeomFacet(rclP,_aclPoints[2],_aclPoints[0]).Area(); - float fAreaPAB = MeshGeomFacet(rclP,_aclPoints[0],_aclPoints[1]).Area(); + float fAreaABC = Area(); + float fAreaPBC = MeshGeomFacet(rclP, _aclPoints[1], _aclPoints[2]).Area(); + float fAreaPCA = MeshGeomFacet(rclP, _aclPoints[2], _aclPoints[0]).Area(); + float fAreaPAB = MeshGeomFacet(rclP, _aclPoints[0], _aclPoints[1]).Area(); - w0=fAreaPBC/fAreaABC; - w1=fAreaPCA/fAreaABC; - w2=fAreaPAB/fAreaABC; + w0 = fAreaPBC / fAreaABC; + w1 = fAreaPCA / fAreaABC; + w2 = fAreaPAB / fAreaABC; - return fabs(w0+w1+w2-1.0f)<0.001f; + return fabs(w0 + w1 + w2 - 1.0f) < 0.001f; } -void MeshGeomFacet::ProjectPointToPlane (const Base::Vector3f &rclPoint, Base::Vector3f &rclProj) const +void MeshGeomFacet::ProjectPointToPlane(const Base::Vector3f& rclPoint, + Base::Vector3f& rclProj) const { - rclPoint.ProjectToPlane(_aclPoints[0], GetNormal(), rclProj); + rclPoint.ProjectToPlane(_aclPoints[0], GetNormal(), rclProj); } -void MeshGeomFacet::ProjectFacetToPlane (MeshGeomFacet &rclFacet) const +void MeshGeomFacet::ProjectFacetToPlane(MeshGeomFacet& rclFacet) const { - // project facet 2 onto facet 1 - IntersectPlaneWithLine( rclFacet._aclPoints[0], GetNormal(), rclFacet._aclPoints[0] ); - IntersectPlaneWithLine( rclFacet._aclPoints[1], GetNormal(), rclFacet._aclPoints[1] ); - IntersectPlaneWithLine( rclFacet._aclPoints[2], GetNormal(), rclFacet._aclPoints[2] ); + // project facet 2 onto facet 1 + IntersectPlaneWithLine(rclFacet._aclPoints[0], GetNormal(), rclFacet._aclPoints[0]); + IntersectPlaneWithLine(rclFacet._aclPoints[1], GetNormal(), rclFacet._aclPoints[1]); + IntersectPlaneWithLine(rclFacet._aclPoints[2], GetNormal(), rclFacet._aclPoints[2]); } -void MeshGeomFacet::Enlarge (float fDist) +void MeshGeomFacet::Enlarge(float fDist) { - Base::Vector3f clM, clU, clV, clPNew[3]; - float fA, fD; - PointIndex i, ulP1, ulP2, ulP3; + Base::Vector3f clM, clU, clV, clPNew[3]; + float fA, fD; + PointIndex i, ulP1, ulP2, ulP3; - for (i = 0; i < 3; i++) - { - ulP1 = i; - ulP2 = (i + 1) % 3; - ulP3 = (i + 2) % 3; - clU = _aclPoints[ulP2] - _aclPoints[ulP1]; - clV = _aclPoints[ulP3] - _aclPoints[ulP1]; - clM = -(clU + clV); - fA = clM.GetAngle(-clU); - fD = fDist / float(sin(fA)); - clM.Normalize(); - clM.Scale(fD, fD, fD); - clPNew[ulP1] = _aclPoints[ulP1] + clM; - } + for (i = 0; i < 3; i++) { + ulP1 = i; + ulP2 = (i + 1) % 3; + ulP3 = (i + 2) % 3; + clU = _aclPoints[ulP2] - _aclPoints[ulP1]; + clV = _aclPoints[ulP3] - _aclPoints[ulP1]; + clM = -(clU + clV); + fA = clM.GetAngle(-clU); + fD = fDist / float(sin(fA)); + clM.Normalize(); + clM.Scale(fD, fD, fD); + clPNew[ulP1] = _aclPoints[ulP1] + clM; + } - _aclPoints[0] = clPNew[0]; - _aclPoints[1] = clPNew[1]; - _aclPoints[2] = clPNew[2]; + _aclPoints[0] = clPNew[0]; + _aclPoints[1] = clPNew[1]; + _aclPoints[2] = clPNew[2]; } bool MeshGeomFacet::IsDegenerated(float epsilon) const @@ -635,99 +665,110 @@ bool MeshGeomFacet::IsDegenerated(float epsilon) const Base::Vector3d v = p3 - p1; double eps = static_cast(epsilon); - double uu = u*u; - if (uu <= eps) + double uu = u * u; + if (uu <= eps) { return true; - double vv = v*v; - if (vv <= eps) + } + double vv = v * v; + if (vv <= eps) { return true; - double uv = u*v; - double crosssqr = uu*vv-uv*uv; - if (crosssqr <= eps*std::max(uu,vv)) + } + double uv = u * v; + double crosssqr = uu * vv - uv * uv; + if (crosssqr <= eps * std::max(uu, vv)) { return true; + } return false; } bool MeshGeomFacet::IsDeformed(float fCosOfMinAngle, float fCosOfMaxAngle) const { float fCosAngle; - Base::Vector3f u,v; + Base::Vector3f u, v; - for (int i=0; i<3; i++) { - u = _aclPoints[(i+1)%3]-_aclPoints[i]; - v = _aclPoints[(i+2)%3]-_aclPoints[i]; + for (int i = 0; i < 3; i++) { + u = _aclPoints[(i + 1) % 3] - _aclPoints[i]; + v = _aclPoints[(i + 2) % 3] - _aclPoints[i]; u.Normalize(); v.Normalize(); fCosAngle = u * v; - if (fCosAngle > fCosOfMinAngle || fCosAngle < fCosOfMaxAngle) + if (fCosAngle > fCosOfMinAngle || fCosAngle < fCosOfMaxAngle) { return true; + } } return false; } -bool MeshGeomFacet::IntersectBoundingBox ( const Base::BoundBox3f &rclBB ) const +bool MeshGeomFacet::IntersectBoundingBox(const Base::BoundBox3f& rclBB) const { - // the triangle's corner points - const Base::Vector3f& v0 = _aclPoints[0]; - const Base::Vector3f& v1 = _aclPoints[1]; - const Base::Vector3f& v2 = _aclPoints[2]; + // the triangle's corner points + const Base::Vector3f& v0 = _aclPoints[0]; + const Base::Vector3f& v1 = _aclPoints[1]; + const Base::Vector3f& v2 = _aclPoints[2]; - // first check if at least one point is inside the box - if ( rclBB.IsInBox( v0 ) || rclBB.IsInBox( v1 ) || rclBB.IsInBox( v2 ) ) - return true; + // first check if at least one point is inside the box + if (rclBB.IsInBox(v0) || rclBB.IsInBox(v1) || rclBB.IsInBox(v2)) { + return true; + } - // edge lengths - float len0 = (v0-v1).Length(); - float len1 = (v1-v2).Length(); - float len2 = (v2-v0).Length(); + // edge lengths + float len0 = (v0 - v1).Length(); + float len1 = (v1 - v2).Length(); + float len2 = (v2 - v0).Length(); - // Build up the line segments - Vector3 p0(0.5f*(v0.x+v1.x), 0.5f*(v0.y+v1.y), 0.5f*(v0.z+v1.z)); - Vector3 p1(0.5f*(v1.x+v2.x), 0.5f*(v1.y+v2.y), 0.5f*(v1.z+v2.z)); - Vector3 p2(0.5f*(v2.x+v0.x), 0.5f*(v2.y+v0.y), 0.5f*(v2.z+v0.z)); + // Build up the line segments + Vector3 p0(0.5f * (v0.x + v1.x), 0.5f * (v0.y + v1.y), 0.5f * (v0.z + v1.z)); + Vector3 p1(0.5f * (v1.x + v2.x), 0.5f * (v1.y + v2.y), 0.5f * (v1.z + v2.z)); + Vector3 p2(0.5f * (v2.x + v0.x), 0.5f * (v2.y + v0.y), 0.5f * (v2.z + v0.z)); - Vector3 d0(v1.x - v0.x, v1.y - v0.y, v1.z - v0.z); - d0.Normalize(); - Vector3 d1(v2.x - v1.x, v2.y - v1.y, v2.z - v1.z); - d1.Normalize(); - Vector3 d2(v0.x - v2.x, v0.y - v2.y, v0.z - v2.z); - d2.Normalize(); + Vector3 d0(v1.x - v0.x, v1.y - v0.y, v1.z - v0.z); + d0.Normalize(); + Vector3 d1(v2.x - v1.x, v2.y - v1.y, v2.z - v1.z); + d1.Normalize(); + Vector3 d2(v0.x - v2.x, v0.y - v2.y, v0.z - v2.z); + d2.Normalize(); - Segment3 akSeg0(p0, d0, len0/2.0f ); - Segment3 akSeg1(p1, d1, len1/2.0f); - Segment3 akSeg2(p2, d2, len2/2.0f); + Segment3 akSeg0(p0, d0, len0 / 2.0f); + Segment3 akSeg1(p1, d1, len1 / 2.0f); + Segment3 akSeg2(p2, d2, len2 / 2.0f); - // Build up the box - Base::Vector3f clCenter = rclBB.GetCenter(); - Vector3 center(clCenter.x, clCenter.y, clCenter.z); - Vector3 axis0(1.0f, 0.0f, 0.0f); - Vector3 axis1(0.0f, 1.0f, 0.0f); - Vector3 axis2(0.0f, 0.0f, 1.0f); - float extent0 = 0.5f*rclBB.LengthX(); - float extent1 = 0.5f*rclBB.LengthY(); - float extent2 = 0.5f*rclBB.LengthZ(); + // Build up the box + Base::Vector3f clCenter = rclBB.GetCenter(); + Vector3 center(clCenter.x, clCenter.y, clCenter.z); + Vector3 axis0(1.0f, 0.0f, 0.0f); + Vector3 axis1(0.0f, 1.0f, 0.0f); + Vector3 axis2(0.0f, 0.0f, 1.0f); + float extent0 = 0.5f * rclBB.LengthX(); + float extent1 = 0.5f * rclBB.LengthY(); + float extent2 = 0.5f * rclBB.LengthZ(); - Box3 akBox(center, axis0, axis1, axis2, extent0, extent1, extent2); + Box3 akBox(center, axis0, axis1, axis2, extent0, extent1, extent2); - // Check for intersection of line segments and box - IntrSegment3Box3 akSec0(akSeg0, akBox, false); - if ( akSec0.Test() ) - return true; - IntrSegment3Box3 akSec1(akSeg1, akBox, false); - if ( akSec1.Test() ) - return true; - IntrSegment3Box3 akSec2(akSeg2, akBox, false); - if ( akSec2.Test() ) - return true; + // Check for intersection of line segments and box + IntrSegment3Box3 akSec0(akSeg0, akBox, false); + if (akSec0.Test()) { + return true; + } + IntrSegment3Box3 akSec1(akSeg1, akBox, false); + if (akSec1.Test()) { + return true; + } + IntrSegment3Box3 akSec2(akSeg2, akBox, false); + if (akSec2.Test()) { + return true; + } - // no intersection - return false; + // no intersection + return false; } -bool MeshGeomFacet::IntersectWithPlane (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal, Base::Vector3f &rclP1, Base::Vector3f &rclP2) const +bool MeshGeomFacet::IntersectWithPlane(const Base::Vector3f& rclBase, + const Base::Vector3f& rclNormal, + Base::Vector3f& rclP1, + Base::Vector3f& rclP2) const { const float eps = 1e-06f; @@ -757,14 +798,14 @@ bool MeshGeomFacet::IntersectWithPlane (const Base::Vector3f &rclBase, const Bas } // edge lengths - float len0 = (v0-v1).Length(); - float len1 = (v1-v2).Length(); - float len2 = (v2-v0).Length(); + float len0 = (v0 - v1).Length(); + float len1 = (v1 - v2).Length(); + float len2 = (v2 - v0).Length(); // Build up the line segments - Vector3 p0(0.5f*(v0.x+v1.x), 0.5f*(v0.y+v1.y), 0.5f*(v0.z+v1.z)); - Vector3 p1(0.5f*(v1.x+v2.x), 0.5f*(v1.y+v2.y), 0.5f*(v1.z+v2.z)); - Vector3 p2(0.5f*(v2.x+v0.x), 0.5f*(v2.y+v0.y), 0.5f*(v2.z+v0.z)); + Vector3 p0(0.5f * (v0.x + v1.x), 0.5f * (v0.y + v1.y), 0.5f * (v0.z + v1.z)); + Vector3 p1(0.5f * (v1.x + v2.x), 0.5f * (v1.y + v2.y), 0.5f * (v1.z + v2.z)); + Vector3 p2(0.5f * (v2.x + v0.x), 0.5f * (v2.y + v0.y), 0.5f * (v2.z + v0.z)); Vector3 d0(v1.x - v0.x, v1.y - v0.y, v1.z - v0.z); d0.Normalize(); @@ -773,9 +814,9 @@ bool MeshGeomFacet::IntersectWithPlane (const Base::Vector3f &rclBase, const Bas Vector3 d2(v0.x - v2.x, v0.y - v2.y, v0.z - v2.z); d2.Normalize(); - Segment3 akSeg0(p0, d0, len0/2.0f ); - Segment3 akSeg1(p1, d1, len1/2.0f); - Segment3 akSeg2(p2, d2, len2/2.0f); + Segment3 akSeg0(p0, d0, len0 / 2.0f); + Segment3 akSeg1(p1, d1, len1 / 2.0f); + Segment3 akSeg2(p2, d2, len2 / 2.0f); // Build up the plane Vector3 p(rclBase.x, rclBase.y, rclBase.z); @@ -821,26 +862,26 @@ bool MeshGeomFacet::IntersectWithPlane (const Base::Vector3f &rclBase, const Bas // check for arbitrary intersections if (test0.Find()) { intr = p0 + test0.GetSegmentT() * d0; - rclP1.Set( intr[0], intr[1], intr[2]); + rclP1.Set(intr[0], intr[1], intr[2]); if (test1.Find()) { intr = p1 + test1.GetSegmentT() * d1; - rclP2.Set( intr[0], intr[1], intr[2]); + rclP2.Set(intr[0], intr[1], intr[2]); return true; } else if (test2.Find()) { intr = p2 + test2.GetSegmentT() * d2; - rclP2.Set( intr[0], intr[1], intr[2]); + rclP2.Set(intr[0], intr[1], intr[2]); return true; } } else if (test1.Find()) { intr = p1 + test1.GetSegmentT() * d1; - rclP1.Set( intr[0], intr[1], intr[2]); + rclP1.Set(intr[0], intr[1], intr[2]); if (test2.Find()) { intr = p2 + test2.GetSegmentT() * d2; - rclP2.Set( intr[0], intr[1], intr[2]); + rclP2.Set(intr[0], intr[1], intr[2]); return true; } } @@ -848,7 +889,10 @@ bool MeshGeomFacet::IntersectWithPlane (const Base::Vector3f &rclBase, const Bas return false; } -bool MeshGeomFacet::Foraminate (const Base::Vector3f &P, const Base::Vector3f &dir, Base::Vector3f &I, float fMaxAngle) const +bool MeshGeomFacet::Foraminate(const Base::Vector3f& P, + const Base::Vector3f& dir, + Base::Vector3f& I, + float fMaxAngle) const { const float eps = 1e-06f; Base::Vector3f n = this->GetNormal(); @@ -856,23 +900,25 @@ bool MeshGeomFacet::Foraminate (const Base::Vector3f &P, const Base::Vector3f &d // check angle between facet normal and the line direction, FLOAT_MAX is // returned for degenerated facets float fAngle = dir.GetAngle(n); - if (fAngle > fMaxAngle) + if (fAngle > fMaxAngle) { return false; + } float nn = n * n; float nd = n * dir; float dd = dir * dir; // the line mustn't be parallel to the triangle - if ((nd * nd) <= (eps * dd * nn)) + if ((nd * nd) <= (eps * dd * nn)) { return false; + } Base::Vector3f u = this->_aclPoints[1] - this->_aclPoints[0]; Base::Vector3f v = this->_aclPoints[2] - this->_aclPoints[0]; Base::Vector3f w0 = P - this->_aclPoints[0]; float r = -(n * w0) / nd; - Base::Vector3f w = w0 + r * dir; + Base::Vector3f w = w0 + r * dir; float uu = u * u; float uv = u * v; @@ -881,8 +927,8 @@ bool MeshGeomFacet::Foraminate (const Base::Vector3f &P, const Base::Vector3f &d float wv = w * v; float det = float(fabs((uu * vv) - (uv * uv))); - float s = (vv * wu) - (uv * wv); - float t = (uu * wv) - (uv * wu); + float s = (vv * wu) - (uv * wv); + float t = (uu * wv) - (uv * wu); // is the intersection point inside the triangle? if ((s >= 0.0f) && (t >= 0.0f) && ((s + t) <= det)) { @@ -893,138 +939,140 @@ bool MeshGeomFacet::Foraminate (const Base::Vector3f &P, const Base::Vector3f &d return false; } -bool MeshGeomFacet::IntersectPlaneWithLine (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes) const +bool MeshGeomFacet::IntersectPlaneWithLine(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes) const { - // calculate the intersection of the straight line <-> plane - if ( fabs(rclDir * GetNormal()) < 1e-3f ) - return false; // line and plane are parallel - - float s = ( ( GetGravityPoint() - rclPt ) * GetNormal() ) - / ( rclDir * GetNormal() ); - rclRes = rclPt + s * rclDir; - - return true; -} - -bool MeshGeomFacet::IntersectWithLine (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes) const -{ - if ( !IntersectPlaneWithLine( rclPt, rclDir, rclRes ) ) - return false; // line and plane are parallel - // Check if the intersection point is inside the facet - return IsPointOfFace(rclRes, 1e-03f); -} - -float MeshGeomFacet::DistanceToLineSegment (const Base::Vector3f &rclP1, const Base::Vector3f &rclP2) const -{ - // line segment - Vector3 A(rclP1.x, rclP1.y, rclP1.z); - Vector3 B(rclP2.x, rclP2.y, rclP2.z); - - Vector3 n = B - A; - float len = n.Length(); - n.Normalize(); - Vector3 p = 0.5f*(A + B); - - Segment3 akSeg(p, n, 0.5f*len); - - // triangle - Vector3 akF0(_aclPoints[0].x, _aclPoints[0].y, _aclPoints[0].z); - Vector3 akF1(_aclPoints[1].x, _aclPoints[1].y, _aclPoints[1].z); - Vector3 akF2(_aclPoints[2].x, _aclPoints[2].y, _aclPoints[2].z); - - Triangle3 akTria(akF0, akF1, akF2); - - DistSegment3Triangle3 akDistSegTria(akSeg, akTria); - return akDistSegTria.Get(); -} - -float MeshGeomFacet::DistanceToPoint (const Base::Vector3f &rclPt, Base::Vector3f &rclNt) const -{ - Vector3 akPt(rclPt.x, rclPt.y, rclPt.z); - Vector3 akF0(_aclPoints[0].x, _aclPoints[0].y, _aclPoints[0].z); - Vector3 akF1(_aclPoints[1].x, _aclPoints[1].y, _aclPoints[1].z); - Vector3 akF2(_aclPoints[2].x, _aclPoints[2].y, _aclPoints[2].z); - - Triangle3 akTria(akF0, akF1, akF2); - DistVector3Triangle3 akDistPtTria(akPt, akTria); - - float fDist = akDistPtTria.Get(); - - // get nearest point of the facet - Vector3 akNt = akDistPtTria.GetClosestPoint1(); - rclNt.Set(akNt.X(), akNt.Y(), akNt.Z()); - - return fDist; -} - -void MeshGeomFacet::SubSample (float fStep, std::vector &rclPoints) const -{ - std::vector clPoints; - Base::Vector3f A = _aclPoints[0]; - Base::Vector3f B = _aclPoints[1]; - Base::Vector3f C = _aclPoints[2]; - Base::Vector3f clVecAB(B - A); - Base::Vector3f clVecAC(C - A); - Base::Vector3f clVecBC(C - B); - - // longest axis corresponds to AB - float fLenAB = clVecAB.Length(); - float fLenAC = clVecAC.Length(); - float fLenBC = clVecBC.Length(); - - if (fLenAC > fLenAB) - { - std::swap(B, C); - std::swap(fLenAB, fLenAC); - } - if (fLenBC > fLenAB) - { - std::swap(A, C); - std::swap(fLenBC, fLenAB); - } - - clVecAB = (B - A); - clVecAC = (C - A); - clVecBC = (C - B); - Base::Vector3f clVecABNorm(clVecAB); - Base::Vector3f clVecHNorm((clVecAB % clVecAC) % clVecAB); - clVecABNorm.Normalize(); - clVecHNorm.Normalize(); - - float bx = fLenAB; - float cy = float(sin(clVecAB.GetAngle(clVecAC)) * fLenAC); - float cx = float(sqrt(fabs(fLenAC * fLenAC - cy * cy))); - - float fDetABC = bx*cy; - - for (float px = (fStep / 2.0f); px < fLenAB; px += fStep) - { - for (float py = (fStep / 2.0f); py < cy; py += fStep) - { - float u = (bx*cy + cx*py - px*cy - bx*py) / fDetABC; - float v = (px*cy - cx*py) / fDetABC; - float w = (bx*py) / fDetABC; - - if ((u >= 0.0f) && (v >= 0.0f) && (w >= 0.0f) && ((u + v) < 1.0f)) - { - // rclPoints.push_back(CBase::Vector3f(u*A + v*B + w*C)); - Base::Vector3f clV = A + (px * clVecABNorm) + (py * clVecHNorm); - clPoints.push_back(clV); - - } - else - break; + // calculate the intersection of the straight line <-> plane + if (fabs(rclDir * GetNormal()) < 1e-3f) { + return false; // line and plane are parallel } - } - // if couldn't subsample the facet take gravity center - if (clPoints.empty()) - clPoints.push_back(this->GetGravityPoint()); + float s = ((GetGravityPoint() - rclPt) * GetNormal()) / (rclDir * GetNormal()); + rclRes = rclPt + s * rclDir; - rclPoints.insert(rclPoints.end(), clPoints.begin(), clPoints.end()); + return true; } -bool MeshGeomFacet::IsCoplanar(const MeshGeomFacet &facet) const +bool MeshGeomFacet::IntersectWithLine(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes) const +{ + if (!IntersectPlaneWithLine(rclPt, rclDir, rclRes)) { + return false; // line and plane are parallel + } + // Check if the intersection point is inside the facet + return IsPointOfFace(rclRes, 1e-03f); +} + +float MeshGeomFacet::DistanceToLineSegment(const Base::Vector3f& rclP1, + const Base::Vector3f& rclP2) const +{ + // line segment + Vector3 A(rclP1.x, rclP1.y, rclP1.z); + Vector3 B(rclP2.x, rclP2.y, rclP2.z); + + Vector3 n = B - A; + float len = n.Length(); + n.Normalize(); + Vector3 p = 0.5f * (A + B); + + Segment3 akSeg(p, n, 0.5f * len); + + // triangle + Vector3 akF0(_aclPoints[0].x, _aclPoints[0].y, _aclPoints[0].z); + Vector3 akF1(_aclPoints[1].x, _aclPoints[1].y, _aclPoints[1].z); + Vector3 akF2(_aclPoints[2].x, _aclPoints[2].y, _aclPoints[2].z); + + Triangle3 akTria(akF0, akF1, akF2); + + DistSegment3Triangle3 akDistSegTria(akSeg, akTria); + return akDistSegTria.Get(); +} + +float MeshGeomFacet::DistanceToPoint(const Base::Vector3f& rclPt, Base::Vector3f& rclNt) const +{ + Vector3 akPt(rclPt.x, rclPt.y, rclPt.z); + Vector3 akF0(_aclPoints[0].x, _aclPoints[0].y, _aclPoints[0].z); + Vector3 akF1(_aclPoints[1].x, _aclPoints[1].y, _aclPoints[1].z); + Vector3 akF2(_aclPoints[2].x, _aclPoints[2].y, _aclPoints[2].z); + + Triangle3 akTria(akF0, akF1, akF2); + DistVector3Triangle3 akDistPtTria(akPt, akTria); + + float fDist = akDistPtTria.Get(); + + // get nearest point of the facet + Vector3 akNt = akDistPtTria.GetClosestPoint1(); + rclNt.Set(akNt.X(), akNt.Y(), akNt.Z()); + + return fDist; +} + +void MeshGeomFacet::SubSample(float fStep, std::vector& rclPoints) const +{ + std::vector clPoints; + Base::Vector3f A = _aclPoints[0]; + Base::Vector3f B = _aclPoints[1]; + Base::Vector3f C = _aclPoints[2]; + Base::Vector3f clVecAB(B - A); + Base::Vector3f clVecAC(C - A); + Base::Vector3f clVecBC(C - B); + + // longest axis corresponds to AB + float fLenAB = clVecAB.Length(); + float fLenAC = clVecAC.Length(); + float fLenBC = clVecBC.Length(); + + if (fLenAC > fLenAB) { + std::swap(B, C); + std::swap(fLenAB, fLenAC); + } + if (fLenBC > fLenAB) { + std::swap(A, C); + std::swap(fLenBC, fLenAB); + } + + clVecAB = (B - A); + clVecAC = (C - A); + clVecBC = (C - B); + Base::Vector3f clVecABNorm(clVecAB); + Base::Vector3f clVecHNorm((clVecAB % clVecAC) % clVecAB); + clVecABNorm.Normalize(); + clVecHNorm.Normalize(); + + float bx = fLenAB; + float cy = float(sin(clVecAB.GetAngle(clVecAC)) * fLenAC); + float cx = float(sqrt(fabs(fLenAC * fLenAC - cy * cy))); + + float fDetABC = bx * cy; + + for (float px = (fStep / 2.0f); px < fLenAB; px += fStep) { + for (float py = (fStep / 2.0f); py < cy; py += fStep) { + float u = (bx * cy + cx * py - px * cy - bx * py) / fDetABC; + float v = (px * cy - cx * py) / fDetABC; + float w = (bx * py) / fDetABC; + + if ((u >= 0.0f) && (v >= 0.0f) && (w >= 0.0f) && ((u + v) < 1.0f)) { + // rclPoints.push_back(CBase::Vector3f(u*A + v*B + w*C)); + Base::Vector3f clV = A + (px * clVecABNorm) + (py * clVecHNorm); + clPoints.push_back(clV); + } + else { + break; + } + } + } + + // if couldn't subsample the facet take gravity center + if (clPoints.empty()) { + clPoints.push_back(this->GetGravityPoint()); + } + + rclPoints.insert(rclPoints.end(), clPoints.begin(), clPoints.end()); +} + +bool MeshGeomFacet::IsCoplanar(const MeshGeomFacet& facet) const { const float eps = 1e-06f; const float unit = 0.9995f; @@ -1038,22 +1086,22 @@ bool MeshGeomFacet::IsCoplanar(const MeshGeomFacet &facet) const * http://www.acm.org/jgt/papers/Moller97/tritri.html * http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/ */ -bool MeshGeomFacet::IntersectWithFacet(const MeshGeomFacet &rclFacet) const +bool MeshGeomFacet::IntersectWithFacet(const MeshGeomFacet& rclFacet) const { - float V[3][3], U[3][3]; - for (int i = 0; i < 3; i++) - { - V[i][0] = _aclPoints[i].x; - V[i][1] = _aclPoints[i].y; - V[i][2] = _aclPoints[i].z; - U[i][0] = rclFacet._aclPoints[i].x; - U[i][1] = rclFacet._aclPoints[i].y; - U[i][2] = rclFacet._aclPoints[i].z; - } + float V[3][3], U[3][3]; + for (int i = 0; i < 3; i++) { + V[i][0] = _aclPoints[i].x; + V[i][1] = _aclPoints[i].y; + V[i][2] = _aclPoints[i].z; + U[i][0] = rclFacet._aclPoints[i].x; + U[i][1] = rclFacet._aclPoints[i].y; + U[i][2] = rclFacet._aclPoints[i].z; + } - if (tri_tri_intersect(V[0], V[1], V[2], U[0], U[1], U[2]) == 0) - return false; // no intersections - return true; + if (tri_tri_intersect(V[0], V[1], V[2], U[0], U[1], U[2]) == 0) { + return false; // no intersections + } + return true; } /** @@ -1061,9 +1109,9 @@ bool MeshGeomFacet::IntersectWithFacet(const MeshGeomFacet &rclFacet) const * http://www.acm.org/jgt/papers/Moller97/tritri.html * http://www.cs.lth.se/home/Tomas_Akenine_Moller/code/ */ -int MeshGeomFacet::IntersectWithFacet (const MeshGeomFacet& rclFacet, - Base::Vector3f& rclPt0, - Base::Vector3f& rclPt1) const +int MeshGeomFacet::IntersectWithFacet(const MeshGeomFacet& rclFacet, + Base::Vector3f& rclPt0, + Base::Vector3f& rclPt1) const { // Note: tri_tri_intersect_with_isection() does not return line of // intersection when triangles are coplanar. See tritritest.h:18 and 658. @@ -1071,9 +1119,9 @@ int MeshGeomFacet::IntersectWithFacet (const MeshGeomFacet& rclFacet, // Since tri_tri_intersect_with_isection may return garbage values try to get // sensible values with edge/edge intersections std::vector intersections; - for (short i=0; i<3; i++) { + for (short i = 0; i < 3; i++) { MeshGeomEdge edge1 = GetEdge(i); - for (short j=0; j<3; j++) { + for (short j = 0; j < 3; j++) { MeshGeomEdge edge2 = rclFacet.GetEdge(j); Base::Vector3f point; if (edge1.IntersectWithEdge(edge2, point)) { @@ -1102,8 +1150,7 @@ int MeshGeomFacet::IntersectWithFacet (const MeshGeomFacet& rclFacet, int coplanar = 0; float isectpt1[3], isectpt2[3]; - for (int i = 0; i < 3; i++) - { + for (int i = 0; i < 3; i++) { V[i][0] = _aclPoints[i].x; V[i][1] = _aclPoints[i].y; V[i][2] = _aclPoints[i].z; @@ -1112,12 +1159,25 @@ int MeshGeomFacet::IntersectWithFacet (const MeshGeomFacet& rclFacet, U[i][2] = rclFacet._aclPoints[i].z; } - if (tri_tri_intersect_with_isectline(V[0], V[1], V[2], U[0], U[1], U[2], - &coplanar, isectpt1, isectpt2) == 0) - return 0; // no intersections + if (tri_tri_intersect_with_isectline(V[0], + V[1], + V[2], + U[0], + U[1], + U[2], + &coplanar, + isectpt1, + isectpt2) + == 0) { + return 0; // no intersections + } - rclPt0.x = isectpt1[0]; rclPt0.y = isectpt1[1]; rclPt0.z = isectpt1[2]; - rclPt1.x = isectpt2[0]; rclPt1.y = isectpt2[1]; rclPt1.z = isectpt2[2]; + rclPt0.x = isectpt1[0]; + rclPt0.y = isectpt1[1]; + rclPt0.z = isectpt1[2]; + rclPt1.x = isectpt2[0]; + rclPt1.y = isectpt2[1]; + rclPt1.z = isectpt2[2]; // With extremely acute-angled triangles it may happen that the algorithm // claims an intersection but the intersection points are far outside the @@ -1125,37 +1185,43 @@ int MeshGeomFacet::IntersectWithFacet (const MeshGeomFacet& rclFacet, // are inside the bounding boxes of both triangles. Base::BoundBox3f box1 = this->GetBoundBox(); box1.Enlarge(0.001f); - if (!box1.IsInBox(rclPt0) || !box1.IsInBox(rclPt1)) + if (!box1.IsInBox(rclPt0) || !box1.IsInBox(rclPt1)) { return 0; + } Base::BoundBox3f box2 = rclFacet.GetBoundBox(); box2.Enlarge(0.001f); - if (!box2.IsInBox(rclPt0) || !box2.IsInBox(rclPt1)) + if (!box2.IsInBox(rclPt0) || !box2.IsInBox(rclPt1)) { return 0; + } // Note: The algorithm delivers sometimes false-positives, i.e. it claims // that the two triangles intersect but they don't. It seems that this bad // behaviour occurs if the triangles are nearly co-planar float mult = fabs(this->GetNormal() * rclFacet.GetNormal()); if (rclPt0 == rclPt1) { - if (mult < 0.995f) // not co-planar, thus no test needed + if (mult < 0.995f) { // not co-planar, thus no test needed return 1; - if (this->IsPointOf(rclPt0) && rclFacet.IsPointOf(rclPt0)) + } + if (this->IsPointOf(rclPt0) && rclFacet.IsPointOf(rclPt0)) { return 1; + } } else { - if (mult < 0.995f) // not co-planar, thus no test needed + if (mult < 0.995f) { // not co-planar, thus no test needed return 2; - if (this->IsPointOf(rclPt0) && rclFacet.IsPointOf(rclPt0) && - this->IsPointOf(rclPt1) && rclFacet.IsPointOf(rclPt1)) + } + if (this->IsPointOf(rclPt0) && rclFacet.IsPointOf(rclPt0) && this->IsPointOf(rclPt1) + && rclFacet.IsPointOf(rclPt1)) { return 2; + } } // the intersection algorithm delivered a false-positive return 0; } -bool MeshGeomFacet::IsPointOf (const Base::Vector3f &P) const +bool MeshGeomFacet::IsPointOf(const Base::Vector3f& P) const { Base::Vector3d p1 = Base::convertTo(this->_aclPoints[0]); Base::Vector3d p2 = Base::convertTo(this->_aclPoints[1]); @@ -1177,13 +1243,13 @@ bool MeshGeomFacet::IsPointOf (const Base::Vector3f &P) const // negative values for s or t. This e.g. can happen if the point lies // at the border of the facet. And as det could also become very small // we need an adaptive tolerance. - const double eps=std::min(1.0e-6, det*det); + const double eps = std::min(1.0e-6, det * det); - double s = (vv * wu) - (uv * wv); - double t = (uu * wv) - (uv * wu); + double s = (vv * wu) - (uv * wv); + double t = (uu * wv) - (uv * wu); // is the point inside the triangle? - if ((s >= -eps) && (t >= -eps) && ((s + t) <= det+eps)) { + if ((s >= -eps) && (t >= -eps) && ((s + t) <= det + eps)) { return true; } @@ -1192,306 +1258,315 @@ bool MeshGeomFacet::IsPointOf (const Base::Vector3f &P) const float MeshGeomFacet::CenterOfInscribedCircle(Base::Vector3f& rclCenter) const { - const Base::Vector3f& p0 = _aclPoints[0]; - const Base::Vector3f& p1 = _aclPoints[1]; - const Base::Vector3f& p2 = _aclPoints[2]; + const Base::Vector3f& p0 = _aclPoints[0]; + const Base::Vector3f& p1 = _aclPoints[1]; + const Base::Vector3f& p2 = _aclPoints[2]; - float a = Base::Distance(p1,p2); - float b = Base::Distance(p2,p0); - float c = Base::Distance(p0,p1); + float a = Base::Distance(p1, p2); + float b = Base::Distance(p2, p0); + float c = Base::Distance(p0, p1); - // radius of the circle - float fRadius = Area(); - fRadius *= 2.0f/(a + b + c); + // radius of the circle + float fRadius = Area(); + fRadius *= 2.0f / (a + b + c); - // center of the circle - float w = a + b + c; - rclCenter.x = (a*p0.x + b*p1.x + c*p2.x)/w; - rclCenter.y = (a*p0.y + b*p1.y + c*p2.y)/w; - rclCenter.z = (a*p0.z + b*p1.z + c*p2.z)/w; + // center of the circle + float w = a + b + c; + rclCenter.x = (a * p0.x + b * p1.x + c * p2.x) / w; + rclCenter.y = (a * p0.y + b * p1.y + c * p2.y) / w; + rclCenter.z = (a * p0.z + b * p1.z + c * p2.z) / w; - return fRadius; + return fRadius; } float MeshGeomFacet::CenterOfCircumCircle(Base::Vector3f& rclCenter) const { - const Base::Vector3f& p0 = _aclPoints[0]; - const Base::Vector3f& p1 = _aclPoints[1]; - const Base::Vector3f& p2 = _aclPoints[2]; + const Base::Vector3f& p0 = _aclPoints[0]; + const Base::Vector3f& p1 = _aclPoints[1]; + const Base::Vector3f& p2 = _aclPoints[2]; - Base::Vector3f u = (p1-p0); - Base::Vector3f v = (p2-p1); - Base::Vector3f w = (p0-p2); + Base::Vector3f u = (p1 - p0); + Base::Vector3f v = (p2 - p1); + Base::Vector3f w = (p0 - p2); - double uu = (u * u); - double vv = (v * v); - double ww = (w * w); - double uv = - (u * v); - double vw = - (v * w); - double uw = - (w * u); + double uu = (u * u); + double vv = (v * v); + double ww = (w * w); + double uv = -(u * v); + double vw = -(v * w); + double uw = -(w * u); - double w0 = (2 * sqrt(uu * ww - uw * uw) * uw / (uu * ww)); - double w1 = (2 * sqrt(uu * vv - uv * uv) * uv / (uu * vv)); - double w2 = (2 * sqrt(vv * ww - vw * vw) * vw / (vv * ww)); + double w0 = (2 * sqrt(uu * ww - uw * uw) * uw / (uu * ww)); + double w1 = (2 * sqrt(uu * vv - uv * uv) * uv / (uu * vv)); + double w2 = (2 * sqrt(vv * ww - vw * vw) * vw / (vv * ww)); - // center of the circle - double wx = w0 + w1 + w2; - rclCenter.x = static_cast((w0*p0.x + w1*p1.x + w2*p2.x)/wx); - rclCenter.y = static_cast((w0*p0.y + w1*p1.y + w2*p2.y)/wx); - rclCenter.z = static_cast((w0*p0.z + w1*p1.z + w2*p2.z)/wx); + // center of the circle + double wx = w0 + w1 + w2; + rclCenter.x = static_cast((w0 * p0.x + w1 * p1.x + w2 * p2.x) / wx); + rclCenter.y = static_cast((w0 * p0.y + w1 * p1.y + w2 * p2.y) / wx); + rclCenter.z = static_cast((w0 * p0.z + w1 * p1.z + w2 * p2.z) / wx); - // radius of the circle - float fRadius = static_cast(sqrt(uu * vv * ww) / (4 * Area())); - return fRadius; + // radius of the circle + float fRadius = static_cast(sqrt(uu * vv * ww) / (4 * Area())); + return fRadius; } unsigned short MeshGeomFacet::NearestEdgeToPoint(const Base::Vector3f& rclPt) const { - unsigned short usSide; + unsigned short usSide; - const Base::Vector3f& rcP1 = _aclPoints[0]; - const Base::Vector3f& rcP2 = _aclPoints[1]; - const Base::Vector3f& rcP3 = _aclPoints[2]; + const Base::Vector3f& rcP1 = _aclPoints[0]; + const Base::Vector3f& rcP2 = _aclPoints[1]; + const Base::Vector3f& rcP3 = _aclPoints[2]; - float fD1 = FLOAT_MAX; - float fD2 = FLOAT_MAX; - float fD3 = FLOAT_MAX; + float fD1 = FLOAT_MAX; + float fD2 = FLOAT_MAX; + float fD3 = FLOAT_MAX; - // 1st edge - Base::Vector3f clDir = rcP2 - rcP1; - float fLen = Base::Distance(rcP2, rcP1); - float t = ( ( rclPt - rcP1 ) * clDir ) / ( fLen * fLen ); - if ( t < 0.0f ) - fD1 = Base::Distance(rclPt, rcP1); - else if ( t > 1.0f ) - fD1 = Base::Distance(rclPt, rcP2); - else - fD1 = ( ( ( rclPt - rcP1 ) % clDir).Length() ) / fLen; - - // 2nd edge - clDir = rcP3 - rcP2; - fLen = Base::Distance(rcP3, rcP2); - t = ( ( rclPt - rcP2 ) * clDir ) / ( fLen * fLen ); - if ( t < 0.0f ) - fD2 = Base::Distance(rclPt, rcP2); - else if ( t > 1.0f ) - fD2 = Base::Distance(rclPt, rcP3); - else - fD2 = ( ( ( rclPt - rcP2 ) % clDir).Length() ) / fLen; - - // 3rd edge - clDir = rcP1 - rcP3; - fLen = Base::Distance(rcP1, rcP3); - t = ( ( rclPt - rcP3 ) * clDir ) / ( fLen * fLen ); - if ( t < 0.0f ) - fD3 = Base::Distance(rclPt, rcP3); - else if ( t > 1.0f ) - fD3 = Base::Distance(rclPt, rcP1); - else - fD3 = ( ( ( rclPt - rcP3 ) % clDir).Length() ) / fLen; - - if ( fD1 < fD2 ) - { - if ( fD1 < fD3 ) - { - usSide = 0; + // 1st edge + Base::Vector3f clDir = rcP2 - rcP1; + float fLen = Base::Distance(rcP2, rcP1); + float t = ((rclPt - rcP1) * clDir) / (fLen * fLen); + if (t < 0.0f) { + fD1 = Base::Distance(rclPt, rcP1); } - else - { - usSide = 2; + else if (t > 1.0f) { + fD1 = Base::Distance(rclPt, rcP2); } - } - else - { - if ( fD2 < fD3 ) - { - usSide = 1; + else { + fD1 = (((rclPt - rcP1) % clDir).Length()) / fLen; } - else - { - usSide = 2; - } - } - return usSide; + // 2nd edge + clDir = rcP3 - rcP2; + fLen = Base::Distance(rcP3, rcP2); + t = ((rclPt - rcP2) * clDir) / (fLen * fLen); + if (t < 0.0f) { + fD2 = Base::Distance(rclPt, rcP2); + } + else if (t > 1.0f) { + fD2 = Base::Distance(rclPt, rcP3); + } + else { + fD2 = (((rclPt - rcP2) % clDir).Length()) / fLen; + } + + // 3rd edge + clDir = rcP1 - rcP3; + fLen = Base::Distance(rcP1, rcP3); + t = ((rclPt - rcP3) * clDir) / (fLen * fLen); + if (t < 0.0f) { + fD3 = Base::Distance(rclPt, rcP3); + } + else if (t > 1.0f) { + fD3 = Base::Distance(rclPt, rcP1); + } + else { + fD3 = (((rclPt - rcP3) % clDir).Length()) / fLen; + } + + if (fD1 < fD2) { + if (fD1 < fD3) { + usSide = 0; + } + else { + usSide = 2; + } + } + else { + if (fD2 < fD3) { + usSide = 1; + } + else { + usSide = 2; + } + } + + return usSide; } -void MeshGeomFacet::NearestEdgeToPoint(const Base::Vector3f& rclPt, float& fDistance, unsigned short& usSide) const +void MeshGeomFacet::NearestEdgeToPoint(const Base::Vector3f& rclPt, + float& fDistance, + unsigned short& usSide) const { - const Base::Vector3f& rcP1 = _aclPoints[0]; - const Base::Vector3f& rcP2 = _aclPoints[1]; - const Base::Vector3f& rcP3 = _aclPoints[2]; + const Base::Vector3f& rcP1 = _aclPoints[0]; + const Base::Vector3f& rcP2 = _aclPoints[1]; + const Base::Vector3f& rcP3 = _aclPoints[2]; - float fD1 = FLOAT_MAX; - float fD2 = FLOAT_MAX; - float fD3 = FLOAT_MAX; + float fD1 = FLOAT_MAX; + float fD2 = FLOAT_MAX; + float fD3 = FLOAT_MAX; - // 1st edge - Base::Vector3f clDir = rcP2 - rcP1; - float fLen = Base::Distance(rcP2, rcP1); - float t = ( ( rclPt - rcP1 ) * clDir ) / ( fLen * fLen ); - if ( t < 0.0f ) - fD1 = Base::Distance(rclPt, rcP1); - else if ( t > 1.0f ) - fD1 = Base::Distance(rclPt, rcP2); - else - fD1 = ( ( ( rclPt - rcP1 ) % clDir).Length() ) / fLen; - - // 2nd edge - clDir = rcP3 - rcP2; - fLen = Base::Distance(rcP3, rcP2); - t = ( ( rclPt - rcP2 ) * clDir ) / ( fLen * fLen ); - if ( t < 0.0f ) - fD2 = Base::Distance(rclPt, rcP2); - else if ( t > 1.0f ) - fD2 = Base::Distance(rclPt, rcP3); - else - fD2 = ( ( ( rclPt - rcP2 ) % clDir).Length() ) / fLen; - - // 3rd edge - clDir = rcP1 - rcP3; - fLen = Base::Distance(rcP1, rcP3); - t = ( ( rclPt - rcP3 ) * clDir ) / ( fLen * fLen ); - if ( t < 0.0f ) - fD3 = Base::Distance(rclPt, rcP3); - else if ( t > 1.0f ) - fD3 = Base::Distance(rclPt, rcP1); - else - fD3 = ( ( ( rclPt - rcP3 ) % clDir).Length() ) / fLen; - - if ( fD1 < fD2 ) - { - if ( fD1 < fD3 ) - { - usSide = 0; - fDistance = fD1; + // 1st edge + Base::Vector3f clDir = rcP2 - rcP1; + float fLen = Base::Distance(rcP2, rcP1); + float t = ((rclPt - rcP1) * clDir) / (fLen * fLen); + if (t < 0.0f) { + fD1 = Base::Distance(rclPt, rcP1); } - else - { - usSide = 2; - fDistance = fD3; + else if (t > 1.0f) { + fD1 = Base::Distance(rclPt, rcP2); } - } - else - { - if ( fD2 < fD3 ) - { - usSide = 1; - fDistance = fD2; + else { + fD1 = (((rclPt - rcP1) % clDir).Length()) / fLen; } - else - { - usSide = 2; - fDistance = fD3; + + // 2nd edge + clDir = rcP3 - rcP2; + fLen = Base::Distance(rcP3, rcP2); + t = ((rclPt - rcP2) * clDir) / (fLen * fLen); + if (t < 0.0f) { + fD2 = Base::Distance(rclPt, rcP2); + } + else if (t > 1.0f) { + fD2 = Base::Distance(rclPt, rcP3); + } + else { + fD2 = (((rclPt - rcP2) % clDir).Length()) / fLen; + } + + // 3rd edge + clDir = rcP1 - rcP3; + fLen = Base::Distance(rcP1, rcP3); + t = ((rclPt - rcP3) * clDir) / (fLen * fLen); + if (t < 0.0f) { + fD3 = Base::Distance(rclPt, rcP3); + } + else if (t > 1.0f) { + fD3 = Base::Distance(rclPt, rcP1); + } + else { + fD3 = (((rclPt - rcP3) % clDir).Length()) / fLen; + } + + if (fD1 < fD2) { + if (fD1 < fD3) { + usSide = 0; + fDistance = fD1; + } + else { + usSide = 2; + fDistance = fD3; + } + } + else { + if (fD2 < fD3) { + usSide = 1; + fDistance = fD2; + } + else { + usSide = 2; + fDistance = fD3; + } } - } } MeshGeomEdge MeshGeomFacet::GetEdge(short side) const { MeshGeomEdge edge; - edge._aclPoints[0] = this->_aclPoints[side %3]; - edge._aclPoints[1] = this->_aclPoints[(side+1)%3]; + edge._aclPoints[0] = this->_aclPoints[side % 3]; + edge._aclPoints[1] = this->_aclPoints[(side + 1) % 3]; return edge; } -float MeshGeomFacet::VolumeOfPrism (const MeshGeomFacet& rclF1) const +float MeshGeomFacet::VolumeOfPrism(const MeshGeomFacet& rclF1) const { - Base::Vector3f P1 = this->_aclPoints[0]; - Base::Vector3f P2 = this->_aclPoints[1]; - Base::Vector3f P3 = this->_aclPoints[2]; - Base::Vector3f Q1 = rclF1._aclPoints[0]; - Base::Vector3f Q2 = rclF1._aclPoints[1]; - Base::Vector3f Q3 = rclF1._aclPoints[2]; + Base::Vector3f P1 = this->_aclPoints[0]; + Base::Vector3f P2 = this->_aclPoints[1]; + Base::Vector3f P3 = this->_aclPoints[2]; + Base::Vector3f Q1 = rclF1._aclPoints[0]; + Base::Vector3f Q2 = rclF1._aclPoints[1]; + Base::Vector3f Q3 = rclF1._aclPoints[2]; - if ((P1-Q2).Length() < (P1-Q1).Length()) - { - Base::Vector3f tmp = Q1; - Q1 = Q2; - Q2 = tmp; - } - if ((P1-Q3).Length() < (P1-Q1).Length()) - { - Base::Vector3f tmp = Q1; - Q1 = Q3; - Q3 = tmp; - } - if ((P2-Q3).Length() < (P2-Q2).Length()) - { - Base::Vector3f tmp = Q2; - Q2 = Q3; - Q3 = tmp; - } + if ((P1 - Q2).Length() < (P1 - Q1).Length()) { + Base::Vector3f tmp = Q1; + Q1 = Q2; + Q2 = tmp; + } + if ((P1 - Q3).Length() < (P1 - Q1).Length()) { + Base::Vector3f tmp = Q1; + Q1 = Q3; + Q3 = tmp; + } + if ((P2 - Q3).Length() < (P2 - Q2).Length()) { + Base::Vector3f tmp = Q2; + Q2 = Q3; + Q3 = tmp; + } - Base::Vector3f N1 = (P2-P1) % (P3-P1); - Base::Vector3f N2 = (P2-P1) % (Q2-P1); - Base::Vector3f N3 = (Q2-P1) % (Q1-P1); + Base::Vector3f N1 = (P2 - P1) % (P3 - P1); + Base::Vector3f N2 = (P2 - P1) % (Q2 - P1); + Base::Vector3f N3 = (Q2 - P1) % (Q1 - P1); - float fVol=0.0f; - fVol += float(fabs((Q3-P1) * N1)); - fVol += float(fabs((Q3-P1) * N2)); - fVol += float(fabs((Q3-P1) * N3)); + float fVol = 0.0f; + fVol += float(fabs((Q3 - P1) * N1)); + fVol += float(fabs((Q3 - P1) * N2)); + fVol += float(fabs((Q3 - P1) * N3)); - fVol /= 6.0f; + fVol /= 6.0f; - return fVol;; + return fVol; + ; } -float MeshGeomFacet::MaximumAngle () const +float MeshGeomFacet::MaximumAngle() const { - float fMaxAngle = 0.0f; + float fMaxAngle = 0.0f; - for ( int i=0; i<3; i++ ) { - Base::Vector3f dir1(_aclPoints[(i+1)%3]-_aclPoints[i]); - Base::Vector3f dir2(_aclPoints[(i+2)%3]-_aclPoints[i]); - float fAngle = dir1.GetAngle(dir2); - if (fAngle > fMaxAngle) - fMaxAngle = fAngle; - } + for (int i = 0; i < 3; i++) { + Base::Vector3f dir1(_aclPoints[(i + 1) % 3] - _aclPoints[i]); + Base::Vector3f dir2(_aclPoints[(i + 2) % 3] - _aclPoints[i]); + float fAngle = dir1.GetAngle(dir2); + if (fAngle > fMaxAngle) { + fMaxAngle = fAngle; + } + } - return fMaxAngle; + return fMaxAngle; } -float MeshGeomFacet::MinimumAngle () const +float MeshGeomFacet::MinimumAngle() const { - float fMinAngle = Mathf::PI; + float fMinAngle = Mathf::PI; - for ( int i=0; i<3; i++ ) { - Base::Vector3f dir1(_aclPoints[(i+1)%3]-_aclPoints[i]); - Base::Vector3f dir2(_aclPoints[(i+2)%3]-_aclPoints[i]); - float fAngle = dir1.GetAngle(dir2); - if (fAngle < fMinAngle) - fMinAngle = fAngle; - } + for (int i = 0; i < 3; i++) { + Base::Vector3f dir1(_aclPoints[(i + 1) % 3] - _aclPoints[i]); + Base::Vector3f dir2(_aclPoints[(i + 2) % 3] - _aclPoints[i]); + float fAngle = dir1.GetAngle(dir2); + if (fAngle < fMinAngle) { + fMinAngle = fAngle; + } + } - return fMinAngle; + return fMinAngle; } bool MeshGeomFacet::IsPointOfSphere(const Base::Vector3f& rP) const { - float radius; - Base::Vector3f center; - radius = CenterOfCircumCircle(center); - radius *= radius; + float radius; + Base::Vector3f center; + radius = CenterOfCircumCircle(center); + radius *= radius; - float dist = Base::DistanceP2(rP, center); - return dist < radius; + float dist = Base::DistanceP2(rP, center); + return dist < radius; } bool MeshGeomFacet::IsPointOfSphere(const MeshGeomFacet& rFacet) const { - float radius; - Base::Vector3f center; - radius = CenterOfCircumCircle(center); - radius *= radius; + float radius; + Base::Vector3f center; + radius = CenterOfCircumCircle(center); + radius *= radius; - for (const auto& pnt : rFacet._aclPoints) { - float dist = Base::DistanceP2(pnt, center); - if (dist < radius) - return true; - } + for (const auto& pnt : rFacet._aclPoints) { + float dist = Base::DistanceP2(pnt, center); + if (dist < radius) { + return true; + } + } - return false; + return false; } float MeshGeomFacet::AspectRatio() const @@ -1501,16 +1576,18 @@ float MeshGeomFacet::AspectRatio() const Base::Vector3f d2 = _aclPoints[2] - _aclPoints[0]; float l2, maxl2 = d0.Sqr(); - if ((l2=d1.Sqr()) > maxl2) + if ((l2 = d1.Sqr()) > maxl2) { maxl2 = l2; + } d1 = d2; - if ((l2=d1.Sqr()) > maxl2) + if ((l2 = d1.Sqr()) > maxl2) { maxl2 = l2; + } // squared area of the parallelogram spanned by d0 and d1 float a2 = (d0 % d1).Sqr(); - return float(sqrt( (maxl2 * maxl2) / a2 )); + return float(sqrt((maxl2 * maxl2) / a2)); } float MeshGeomFacet::AspectRatio2() const diff --git a/src/Mod/Mesh/App/Core/Elements.h b/src/Mod/Mesh/App/Core/Elements.h index cf2a073715..dfd349a81b 100644 --- a/src/Mod/Mesh/App/Core/Elements.h +++ b/src/Mod/Mesh/App/Core/Elements.h @@ -39,7 +39,8 @@ using Base::Vector3f; #endif -namespace MeshCore { +namespace MeshCore +{ class MeshHelpEdge; class MeshPoint; @@ -52,8 +53,8 @@ class MeshPoint; class MeshExport MeshHelpEdge { public: - inline bool operator == (const MeshHelpEdge &rclEdge) const; - PointIndex _ulIndex[2]; // point indices + inline bool operator==(const MeshHelpEdge& rclEdge) const; + PointIndex _ulIndex[2]; // point indices }; /** @@ -63,8 +64,8 @@ public: class MeshExport MeshIndexEdge { public: - FacetIndex _ulFacetIndex; // Facet index - unsigned short _ausCorner[2]; // corner point indices of the facet + FacetIndex _ulFacetIndex; // Facet index + unsigned short _ausCorner[2]; // corner point indices of the facet }; /** MeshEdge just a pair of two point indices */ @@ -72,19 +73,19 @@ using MeshEdge = std::pair; struct MeshExport EdgeCollapse { - PointIndex _fromPoint; - PointIndex _toPoint; - std::vector _adjacentFrom; // adjacent points to _fromPoint - std::vector _adjacentTo; // adjacent points to _toPoint - std::vector _removeFacets; - std::vector _changeFacets; + PointIndex _fromPoint; + PointIndex _toPoint; + std::vector _adjacentFrom; // adjacent points to _fromPoint + std::vector _adjacentTo; // adjacent points to _toPoint + std::vector _removeFacets; + std::vector _changeFacets; }; struct MeshExport VertexCollapse { - PointIndex _point; - std::vector _circumPoints; - std::vector _circumFacets; + PointIndex _point; + std::vector _circumPoints; + std::vector _circumFacets; }; /** @@ -103,51 +104,78 @@ struct MeshExport VertexCollapse class MeshExport MeshPoint: public Base::Vector3f { public: - enum TFlagType {INVALID=1, VISIT=2, SEGMENT=4, MARKED=8, SELECTED=16, REV=32, TMP0=64, TMP1=128}; + enum TFlagType + { + INVALID = 1, + VISIT = 2, + SEGMENT = 4, + MARKED = 8, + SELECTED = 16, + REV = 32, + TMP0 = 64, + TMP1 = 128 + }; - /** @name Construction */ - //@{ - MeshPoint () : _ucFlag(0), _ulProp(0) { } - inline MeshPoint (float x, float y, float z); - inline MeshPoint (const Base::Vector3f &rclPt);//explicit bombs - inline MeshPoint (const MeshPoint &rclPt) = default; - inline MeshPoint (MeshPoint &&rclPt) = default; - ~MeshPoint () = default; - //@} + /** @name Construction */ + //@{ + MeshPoint() + : _ucFlag(0) + , _ulProp(0) + {} + inline MeshPoint(float x, float y, float z); + inline MeshPoint(const Base::Vector3f& rclPt); // explicit bombs + inline MeshPoint(const MeshPoint& rclPt) = default; + inline MeshPoint(MeshPoint&& rclPt) = default; + ~MeshPoint() = default; + //@} public: - /** @name Flag state - * @note All flag methods are const as they do NOT change the actual behaviour of the object - */ - //@{ - void SetFlag (TFlagType tF) const - { _ucFlag |= static_cast(tF); } - void ResetFlag (TFlagType tF) const - { _ucFlag &= ~static_cast(tF); } - bool IsFlag (TFlagType tF) const - { return (_ucFlag & static_cast(tF)) == static_cast(tF); } - void ResetInvalid () const - { ResetFlag(INVALID); } - void SetInvalid () const - { SetFlag(INVALID); } - bool IsValid () const - { return !IsFlag(INVALID); } - void SetProperty(unsigned long uP) const - { _ulProp = uP; } - //@} + /** @name Flag state + * @note All flag methods are const as they do NOT change the actual behaviour of the object + */ + //@{ + void SetFlag(TFlagType tF) const + { + _ucFlag |= static_cast(tF); + } + void ResetFlag(TFlagType tF) const + { + _ucFlag &= ~static_cast(tF); + } + bool IsFlag(TFlagType tF) const + { + return (_ucFlag & static_cast(tF)) == static_cast(tF); + } + void ResetInvalid() const + { + ResetFlag(INVALID); + } + void SetInvalid() const + { + SetFlag(INVALID); + } + bool IsValid() const + { + return !IsFlag(INVALID); + } + void SetProperty(unsigned long uP) const + { + _ulProp = uP; + } + //@} - // Assignment - inline MeshPoint& operator = (const MeshPoint &rclPt) = default; - inline MeshPoint& operator = (MeshPoint &&rclPt) = default; + // Assignment + inline MeshPoint& operator=(const MeshPoint& rclPt) = default; + inline MeshPoint& operator=(MeshPoint&& rclPt) = default; - // compare operator - inline bool operator == (const MeshPoint &rclPt) const; - inline bool operator == (const Base::Vector3f &rclV) const; - inline bool operator < (const MeshPoint &rclPt) const; + // compare operator + inline bool operator==(const MeshPoint& rclPt) const; + inline bool operator==(const Base::Vector3f& rclV) const; + inline bool operator<(const MeshPoint& rclPt) const; public: - mutable unsigned char _ucFlag; /**< Flag member */ - mutable unsigned long _ulProp; /**< Free usable property */ + mutable unsigned char _ucFlag; /**< Flag member */ + mutable unsigned long _ulProp; /**< Free usable property */ }; /** @@ -157,62 +185,70 @@ public: class MeshExport MeshGeomEdge { public: - MeshGeomEdge () = default; + MeshGeomEdge() = default; - /** Checks if the edge is inside the bounding box or intersects with it. */ - bool ContainedByOrIntersectBoundingBox (const Base::BoundBox3f &rclBB ) const; - /** Returns the bounding box of the edge. */ - Base::BoundBox3f GetBoundBox () const; - /** Checks if the edge intersects with the given bounding box. */ - bool IntersectBoundingBox (const Base::BoundBox3f &rclBB) const; - /** Calculates the intersection point of the line defined by the base \a rclPt and the direction \a rclDir - * with the edge. The intersection must be inside the edge. If there is no intersection false is returned. - */ - bool IntersectWithLine (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes) const; - /** Calculates the intersection point of an edge with this edge. - * The intersection must be inside both edges. If there is no intersection false is returned. - */ - bool IntersectWithEdge (const MeshGeomEdge &edge, Base::Vector3f &res) const; - /** Calculates the intersection point of the plane defined by the base \a rclPt and the direction \a rclDir - * with the edge. The intersection must be inside the edge. If there is no intersection false is returned. - */ - bool IntersectWithPlane (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes) const; - /** - * Calculates the projection of a point onto the line defined by the edge. The caller must check if - * the projection point is inside the edge. - */ - void ProjectPointToLine (const Base::Vector3f &rclPoint, Base::Vector3f &rclProj) const; - /** - * Get the closest points \a rclPnt1 and \a rclPnt2 of the line defined by this edge and the line - * defined by \a rclPt and \a rclDir. - * If the two points are identical then both lines intersect each other. - */ - void ClosestPointsToLine(const Base::Vector3f &linePt, const Base::Vector3f &lineDir, - Base::Vector3f& rclPnt1, Base::Vector3f& rclPnt2) const; - /** - * Checks if the point is part of the edge. A point is regarded as part - * of an edge if the distance is lower than \a fDistance to the projected point - * of \a rclPoint on the edge. - */ - bool IsPointOf (const Base::Vector3f &rclPoint, float fDistance) const; - /** - * Checks if the projection point of \a point lies on the edge. - */ - bool IsProjectionPointOf(const Base::Vector3f& point) const; - /** - * Checks if the two edges are parallel. - * \note Parallel edges could be collinear. - */ - bool IsParallel(const MeshGeomEdge &edge) const; - /** - * Checks if the two edges are collinear. - * \note Collinear edges always are parallel. - */ - bool IsCollinear(const MeshGeomEdge &edge) const; + /** Checks if the edge is inside the bounding box or intersects with it. */ + bool ContainedByOrIntersectBoundingBox(const Base::BoundBox3f& rclBB) const; + /** Returns the bounding box of the edge. */ + Base::BoundBox3f GetBoundBox() const; + /** Checks if the edge intersects with the given bounding box. */ + bool IntersectBoundingBox(const Base::BoundBox3f& rclBB) const; + /** Calculates the intersection point of the line defined by the base \a rclPt and the direction + * \a rclDir with the edge. The intersection must be inside the edge. If there is no + * intersection false is returned. + */ + bool IntersectWithLine(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes) const; + /** Calculates the intersection point of an edge with this edge. + * The intersection must be inside both edges. If there is no intersection false is returned. + */ + bool IntersectWithEdge(const MeshGeomEdge& edge, Base::Vector3f& res) const; + /** Calculates the intersection point of the plane defined by the base \a rclPt and the + * direction \a rclDir with the edge. The intersection must be inside the edge. If there is no + * intersection false is returned. + */ + bool IntersectWithPlane(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes) const; + /** + * Calculates the projection of a point onto the line defined by the edge. The caller must check + * if the projection point is inside the edge. + */ + void ProjectPointToLine(const Base::Vector3f& rclPoint, Base::Vector3f& rclProj) const; + /** + * Get the closest points \a rclPnt1 and \a rclPnt2 of the line defined by this edge and the + * line defined by \a rclPt and \a rclDir. If the two points are identical then both lines + * intersect each other. + */ + void ClosestPointsToLine(const Base::Vector3f& linePt, + const Base::Vector3f& lineDir, + Base::Vector3f& rclPnt1, + Base::Vector3f& rclPnt2) const; + /** + * Checks if the point is part of the edge. A point is regarded as part + * of an edge if the distance is lower than \a fDistance to the projected point + * of \a rclPoint on the edge. + */ + bool IsPointOf(const Base::Vector3f& rclPoint, float fDistance) const; + /** + * Checks if the projection point of \a point lies on the edge. + */ + bool IsProjectionPointOf(const Base::Vector3f& point) const; + /** + * Checks if the two edges are parallel. + * \note Parallel edges could be collinear. + */ + bool IsParallel(const MeshGeomEdge& edge) const; + /** + * Checks if the two edges are collinear. + * \note Collinear edges always are parallel. + */ + bool IsCollinear(const MeshGeomEdge& edge) const; public: - Base::Vector3f _aclPoints[2]; /**< Corner points */ - bool _bBorder{false}; /**< Set to true if border edge */ + Base::Vector3f _aclPoints[2]; /**< Corner points */ + bool _bBorder {false}; /**< Set to true if border edge */ }; /** @@ -235,130 +271,162 @@ public: class MeshFacet { public: - enum TFlagType {INVALID=1, VISIT=2, SEGMENT=4, MARKED=8, SELECTED=16, REV=32, TMP0=64, TMP1=128}; + enum TFlagType + { + INVALID = 1, + VISIT = 2, + SEGMENT = 4, + MARKED = 8, + SELECTED = 16, + REV = 32, + TMP0 = 64, + TMP1 = 128 + }; public: - /** @name Construction */ - //@{ - inline MeshFacet (); - inline MeshFacet(const MeshFacet &rclF) = default; - inline MeshFacet(MeshFacet &&rclF) = default; - inline MeshFacet(PointIndex p1,PointIndex p2,PointIndex p3,FacetIndex n1=FACET_INDEX_MAX,FacetIndex n2=FACET_INDEX_MAX,FacetIndex n3=FACET_INDEX_MAX); - ~MeshFacet () = default; - //@} + /** @name Construction */ + //@{ + inline MeshFacet(); + inline MeshFacet(const MeshFacet& rclF) = default; + inline MeshFacet(MeshFacet&& rclF) = default; + inline MeshFacet(PointIndex p1, + PointIndex p2, + PointIndex p3, + FacetIndex n1 = FACET_INDEX_MAX, + FacetIndex n2 = FACET_INDEX_MAX, + FacetIndex n3 = FACET_INDEX_MAX); + ~MeshFacet() = default; + //@} - /** @name Flag state - * @note All flag methods are const as they do NOT change the actual behaviour of the object - */ - //@{ - void SetFlag (TFlagType tF) const - { _ucFlag |= static_cast(tF); } - void ResetFlag (TFlagType tF) const - { _ucFlag &= ~static_cast(tF); } - bool IsFlag (TFlagType tF) const - { return (_ucFlag & static_cast(tF)) == static_cast(tF); } - void ResetInvalid () const - { ResetFlag(INVALID); } - void SetProperty(unsigned long uP) const - { _ulProp = uP; } - /** - * Marks a facet as invalid. Should be used only temporary from within an algorithm - * (e.g. deletion of several facets) but must not be set permanently. - * From outside the data-structure must not have invalid facets. - */ - void SetInvalid () const - { SetFlag(INVALID); } - bool IsValid () const - { return !IsFlag(INVALID); } - //@} + /** @name Flag state + * @note All flag methods are const as they do NOT change the actual behaviour of the object + */ + //@{ + void SetFlag(TFlagType tF) const + { + _ucFlag |= static_cast(tF); + } + void ResetFlag(TFlagType tF) const + { + _ucFlag &= ~static_cast(tF); + } + bool IsFlag(TFlagType tF) const + { + return (_ucFlag & static_cast(tF)) == static_cast(tF); + } + void ResetInvalid() const + { + ResetFlag(INVALID); + } + void SetProperty(unsigned long uP) const + { + _ulProp = uP; + } + /** + * Marks a facet as invalid. Should be used only temporary from within an algorithm + * (e.g. deletion of several facets) but must not be set permanently. + * From outside the data-structure must not have invalid facets. + */ + void SetInvalid() const + { + SetFlag(INVALID); + } + bool IsValid() const + { + return !IsFlag(INVALID); + } + //@} - // Assignment - inline MeshFacet& operator = (const MeshFacet &rclF) = default; - inline MeshFacet& operator = (MeshFacet &&rclF) = default; - inline void SetVertices(PointIndex,PointIndex,PointIndex); - inline void SetNeighbours(FacetIndex,FacetIndex,FacetIndex); + // Assignment + inline MeshFacet& operator=(const MeshFacet& rclF) = default; + inline MeshFacet& operator=(MeshFacet&& rclF) = default; + inline void SetVertices(PointIndex, PointIndex, PointIndex); + inline void SetNeighbours(FacetIndex, FacetIndex, FacetIndex); - /** - * Returns the indices of the corner points of the given edge number. - */ - inline void GetEdge (unsigned short usSide, MeshHelpEdge &rclEdge) const; - /** - * Returns the indices of the corner points of the given edge number. - */ - inline std::pair GetEdge (unsigned short usSide) const; - /** - * Returns the edge-number to the given index of neighbour facet. - * If \a ulNIndex is not a neighbour USHRT_MAX is returned. - */ - inline unsigned short Side (FacetIndex ulNIndex) const; - /** - * Returns the edge-number defined by two points. If one point is - * not a corner point USHRT_MAX is returned. - */ - inline unsigned short Side (PointIndex ulP0, PointIndex P1) const; - /** - * Returns the edge-number defined by the shared edge of both facets. If the facets don't - * share a common edge USHRT_MAX is returned. - */ - inline unsigned short Side (const MeshFacet& rcFace) const; - /** - * Returns true if this facet shares the same three points as \a rcFace. - * The orientation is not of interest in this case. - */ - inline bool IsEqual (const MeshFacet& rcFace) const; - /** - * Replaces the index of the corner point that is equal to \a ulOrig - * by \a ulNew. If the facet does not have a corner point with this index - * nothing happens. - */ - inline void Transpose (PointIndex ulOrig, PointIndex ulNew); - /** - * Decrement the index for each corner point that is higher than \a ulIndex. - */ - inline void Decrement (PointIndex ulIndex); - /** - * Checks if the facets references the given point index. - */ - inline bool HasPoint(PointIndex) const; - /** - * Replaces the index of the neighbour facet that is equal to \a ulOrig - * by \a ulNew. If the facet does not have a neighbourt with this index - * nothing happens. - */ - inline void ReplaceNeighbour (FacetIndex ulOrig, FacetIndex ulNew); - /** - * Checks if the neighbour exists at the given edge-number. - */ - bool HasNeighbour (unsigned short usSide) const - { return (_aulNeighbours[usSide] != FACET_INDEX_MAX); } - /** - * Checks if the given index is a neighbour facet. - */ - bool IsNeighbour(FacetIndex index) const { - return Side(index) < 3; - } - /** Counts the number of edges without neighbour. */ - inline unsigned short CountOpenEdges() const; - /** Returns true if there is an edge without neighbour, otherwise false. */ - inline bool HasOpenEdge() const; - /** Returns true if the two facets have the same orientation, false otherwise - * Therefore the two facets must be adjacent. - */ - inline bool HasSameOrientation(const MeshFacet&) const; - /** Checks whether the facet is degenerated to a line of point. */ - inline bool IsDegenerated() const; - /** Flips the orientation of the facet. */ - void FlipNormal () - { - std::swap(_aulPoints[1], _aulPoints[2]); - std::swap(_aulNeighbours[0], _aulNeighbours[2]); - } + /** + * Returns the indices of the corner points of the given edge number. + */ + inline void GetEdge(unsigned short usSide, MeshHelpEdge& rclEdge) const; + /** + * Returns the indices of the corner points of the given edge number. + */ + inline std::pair GetEdge(unsigned short usSide) const; + /** + * Returns the edge-number to the given index of neighbour facet. + * If \a ulNIndex is not a neighbour USHRT_MAX is returned. + */ + inline unsigned short Side(FacetIndex ulNIndex) const; + /** + * Returns the edge-number defined by two points. If one point is + * not a corner point USHRT_MAX is returned. + */ + inline unsigned short Side(PointIndex ulP0, PointIndex P1) const; + /** + * Returns the edge-number defined by the shared edge of both facets. If the facets don't + * share a common edge USHRT_MAX is returned. + */ + inline unsigned short Side(const MeshFacet& rcFace) const; + /** + * Returns true if this facet shares the same three points as \a rcFace. + * The orientation is not of interest in this case. + */ + inline bool IsEqual(const MeshFacet& rcFace) const; + /** + * Replaces the index of the corner point that is equal to \a ulOrig + * by \a ulNew. If the facet does not have a corner point with this index + * nothing happens. + */ + inline void Transpose(PointIndex ulOrig, PointIndex ulNew); + /** + * Decrement the index for each corner point that is higher than \a ulIndex. + */ + inline void Decrement(PointIndex ulIndex); + /** + * Checks if the facets references the given point index. + */ + inline bool HasPoint(PointIndex) const; + /** + * Replaces the index of the neighbour facet that is equal to \a ulOrig + * by \a ulNew. If the facet does not have a neighbourt with this index + * nothing happens. + */ + inline void ReplaceNeighbour(FacetIndex ulOrig, FacetIndex ulNew); + /** + * Checks if the neighbour exists at the given edge-number. + */ + bool HasNeighbour(unsigned short usSide) const + { + return (_aulNeighbours[usSide] != FACET_INDEX_MAX); + } + /** + * Checks if the given index is a neighbour facet. + */ + bool IsNeighbour(FacetIndex index) const + { + return Side(index) < 3; + } + /** Counts the number of edges without neighbour. */ + inline unsigned short CountOpenEdges() const; + /** Returns true if there is an edge without neighbour, otherwise false. */ + inline bool HasOpenEdge() const; + /** Returns true if the two facets have the same orientation, false otherwise + * Therefore the two facets must be adjacent. + */ + inline bool HasSameOrientation(const MeshFacet&) const; + /** Checks whether the facet is degenerated to a line of point. */ + inline bool IsDegenerated() const; + /** Flips the orientation of the facet. */ + void FlipNormal() + { + std::swap(_aulPoints[1], _aulPoints[2]); + std::swap(_aulNeighbours[0], _aulNeighbours[2]); + } public: - mutable unsigned char _ucFlag; /**< Flag member. */ - mutable unsigned long _ulProp; /**< Free usable property. */ - PointIndex _aulPoints[3]; /**< Indices of corner points. */ - FacetIndex _aulNeighbours[3]; /**< Indices of neighbour facets. */ + mutable unsigned char _ucFlag; /**< Flag member. */ + mutable unsigned long _ulProp; /**< Free usable property. */ + PointIndex _aulPoints[3]; /**< Indices of corner points. */ + FacetIndex _aulNeighbours[3]; /**< Indices of neighbour facets. */ }; /** @@ -368,211 +436,243 @@ public: class MeshExport MeshGeomFacet { public: - /** @name Construction */ - //@{ - /// default constructor - MeshGeomFacet (); - /// Constructor with the corner points - MeshGeomFacet (const Base::Vector3f &v1,const Base::Vector3f &v2,const Base::Vector3f &v3); - MeshGeomFacet(const MeshGeomFacet&) = default; - MeshGeomFacet(MeshGeomFacet&&) = default; - /// Destruction - ~MeshGeomFacet () = default; - //@} + /** @name Construction */ + //@{ + /// default constructor + MeshGeomFacet(); + /// Constructor with the corner points + MeshGeomFacet(const Base::Vector3f& v1, const Base::Vector3f& v2, const Base::Vector3f& v3); + MeshGeomFacet(const MeshGeomFacet&) = default; + MeshGeomFacet(MeshGeomFacet&&) = default; + /// Destruction + ~MeshGeomFacet() = default; + //@} - MeshGeomFacet& operator = (const MeshGeomFacet&) = default; - MeshGeomFacet& operator = (MeshGeomFacet&&) = default; + MeshGeomFacet& operator=(const MeshGeomFacet&) = default; + MeshGeomFacet& operator=(MeshGeomFacet&&) = default; public: - /** - * Checks if the point is part of the facet. A point is regarded as part - * of a facet if the distance is lower \a fDistance and the projected point - * in the facet normal direction is inside the triangle. - */ - bool IsPointOf (const Base::Vector3f &rclPoint, float fDistance) const; - /** - * Checks if the point is inside or at the border of the facet. The point - * must already exactly lie on the plane defined by the facet, which is not - * checked. This method is very efficient. - */ - bool IsPointOf (const Base::Vector3f &rclPoint) const; - /** Checks whether the given point is inside the facet with tolerance \a fDistance. - * This method does actually the same as IsPointOf() but this implementation - * is done more effective through comparison of normals. - */ - bool IsPointOfFace (const Base::Vector3f& rclP, float fDistance) const; - /** Calculates the weights \a w1, ..., \a w3 of the corners to get the point \a rclP, i.e. - * rclP = w0*v0 + w1*v1 + w2*v2 (v0-v2 are the corners corners). - * If w0+w1+w2==1.0 then the point rclP lies on the plane that is spanned by the facet, otherwise - * the point doesn't lie on the plane. - * If the sum of wi is 1 and if each wi is between [0,1] than the point lies inside - * the facet or on the border, respectively. - * - * If the point doesn't lie on the plane false is returned, true otherwise. - */ - bool Weights(const Base::Vector3f& rclP, float& w0, float& w1, float& w2) const; - /** - * Calculates the distance of a point to the plane defined by the triangle. - */ - inline float DistancePlaneToPoint (const Base::Vector3f &rclPoint) const; - /** - * Calculates the projection of a point onto the plane defined by the triangle. - */ - void ProjectPointToPlane (const Base::Vector3f &rclPoint, Base::Vector3f &rclProj) const; - /** - * Calculates the projection of a facet onto the plane defined by the triangle. - */ - void ProjectFacetToPlane (MeshGeomFacet &rclFacet) const; - /** - * Checks whether the triangle is degenerated. A triangle is degenerated if its area - * is less than an epsilon. - */ - bool IsDegenerated(float epsilon) const; - /** - * Checks whether the triangle is deformed. A triangle is deformed if an angle - * exceeds a given maximum angle or falls below a given minimum angle. - * For performance reasons the cosine of minimum and maximum angle is expected. - */ - bool IsDeformed(float fCosOfMinAngle, float fCosOfMaxAngle) const; - /** - * Enlarges the triangle. - */ - void Enlarge (float fDist); - /** - * Calculates the facet normal for storing internally. - */ - inline void CalcNormal () const; - /** - * Arrange the facet normal so the both vectors have the same orientation. - */ - inline void ArrangeNormal (const Base::Vector3f &rclN); - /** - * Adjusts the facet's orientation to its normal. - */ - inline void AdjustCirculationDirection (); - /** Invalidate the normal. It will be recomputed when querying it. */ - void NormalInvalid () { _bNormalCalculated = false; } - /** Query the flag state of the facet. */ - bool IsFlag (MeshFacet::TFlagType tF) const - { return (_ucFlag & static_cast(tF)) == static_cast(tF); } + /** + * Checks if the point is part of the facet. A point is regarded as part + * of a facet if the distance is lower \a fDistance and the projected point + * in the facet normal direction is inside the triangle. + */ + bool IsPointOf(const Base::Vector3f& rclPoint, float fDistance) const; + /** + * Checks if the point is inside or at the border of the facet. The point + * must already exactly lie on the plane defined by the facet, which is not + * checked. This method is very efficient. + */ + bool IsPointOf(const Base::Vector3f& rclPoint) const; + /** Checks whether the given point is inside the facet with tolerance \a fDistance. + * This method does actually the same as IsPointOf() but this implementation + * is done more effective through comparison of normals. + */ + bool IsPointOfFace(const Base::Vector3f& rclP, float fDistance) const; + /** Calculates the weights \a w1, ..., \a w3 of the corners to get the point \a rclP, i.e. + * rclP = w0*v0 + w1*v1 + w2*v2 (v0-v2 are the corners corners). + * If w0+w1+w2==1.0 then the point rclP lies on the plane that is spanned by the facet, + * otherwise the point doesn't lie on the plane. If the sum of wi is 1 and if each wi is between + * [0,1] than the point lies inside the facet or on the border, respectively. + * + * If the point doesn't lie on the plane false is returned, true otherwise. + */ + bool Weights(const Base::Vector3f& rclP, float& w0, float& w1, float& w2) const; + /** + * Calculates the distance of a point to the plane defined by the triangle. + */ + inline float DistancePlaneToPoint(const Base::Vector3f& rclPoint) const; + /** + * Calculates the projection of a point onto the plane defined by the triangle. + */ + void ProjectPointToPlane(const Base::Vector3f& rclPoint, Base::Vector3f& rclProj) const; + /** + * Calculates the projection of a facet onto the plane defined by the triangle. + */ + void ProjectFacetToPlane(MeshGeomFacet& rclFacet) const; + /** + * Checks whether the triangle is degenerated. A triangle is degenerated if its area + * is less than an epsilon. + */ + bool IsDegenerated(float epsilon) const; + /** + * Checks whether the triangle is deformed. A triangle is deformed if an angle + * exceeds a given maximum angle or falls below a given minimum angle. + * For performance reasons the cosine of minimum and maximum angle is expected. + */ + bool IsDeformed(float fCosOfMinAngle, float fCosOfMaxAngle) const; + /** + * Enlarges the triangle. + */ + void Enlarge(float fDist); + /** + * Calculates the facet normal for storing internally. + */ + inline void CalcNormal() const; + /** + * Arrange the facet normal so the both vectors have the same orientation. + */ + inline void ArrangeNormal(const Base::Vector3f& rclN); + /** + * Adjusts the facet's orientation to its normal. + */ + inline void AdjustCirculationDirection(); + /** Invalidate the normal. It will be recomputed when querying it. */ + void NormalInvalid() + { + _bNormalCalculated = false; + } + /** Query the flag state of the facet. */ + bool IsFlag(MeshFacet::TFlagType tF) const + { + return (_ucFlag & static_cast(tF)) == static_cast(tF); + } /** Set flag state */ - void SetFlag (MeshFacet::TFlagType tF) - { _ucFlag |= static_cast(tF); } - /** Reset flag state */ - void ResetFlag (MeshFacet::TFlagType tF) - { _ucFlag &= ~static_cast(tF); } - /** Calculates the facet's gravity point. */ - inline Base::Vector3f GetGravityPoint () const; - /** Returns the normal of the facet. */ - inline Base::Vector3f GetNormal () const; - /** Sets the facet's normal. */ - inline void SetNormal (const Base::Vector3f &rclNormal); - /** Returns the wrapping bounding box. */ - inline Base::BoundBox3f GetBoundBox () const; - /** Calculates the perimeter of the facet. */ - inline float Perimeter() const; - /** Calculates the area of a facet. */ - inline float Area () const; - /** Calculates the maximum angle of a facet. */ - float MaximumAngle () const; - /** Calculates the minimum angle of a facet. */ - float MinimumAngle () const; - /** Checks if the facet is inside the bounding box or intersects with it. */ - inline bool ContainedByOrIntersectBoundingBox (const Base::BoundBox3f &rcBB) const; - /** Checks if the facet intersects with the given bounding box. */ - bool IntersectBoundingBox ( const Base::BoundBox3f &rclBB ) const; - /** This method checks if both facets intersect. - */ - bool IntersectWithFacet(const MeshGeomFacet &rclFacet) const; - /** - * Intersect the facet with the other facet - * The result is line given by two points (if intersected). - * Return is the number of intersections points: 0: no intersection, 1: one intersection point (rclPt0), 2: two intersections points (rclPt0, rclPt1) - */ - int IntersectWithFacet (const MeshGeomFacet& facet, Base::Vector3f& rclPt0, Base::Vector3f& rclPt1) const; - /** Calculates the shortest distance from the line segment defined by \a rcP1 and \a rcP2 to - * this facet. - */ - float DistanceToLineSegment (const Base::Vector3f &rcP1, const Base::Vector3f &rcP2) const; - /** Calculates the shortest distance from the point \a rcPt to the facet. */ - float DistanceToPoint (const Base::Vector3f &rcPt) const - { Base::Vector3f res; return DistanceToPoint(rcPt, res); } - /** Calculates the shortest distance from the point \a rcPt to the facet. \a rclNt is the point of the facet - * with shortest distance. - */ - float DistanceToPoint ( const Base::Vector3f &rclPt, Base::Vector3f& rclNt ) const; - /** Calculates the intersection point of the line defined by the base \a rclPt and the direction \a rclDir - * with the facet. The intersection must be inside the facet. If there is no intersection false is returned. - */ - bool IntersectWithLine (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes) const; - /** Calculates the intersection point of the line defined by the base \a rclPt and the direction \a rclDir - * with the facet. The intersection must be inside the facet. If there is no intersection false is returned. - * This does actually the same as IntersectWithLine() with one additionally constraint that the angle - * between the direction of the line and the normal of the plane must not exceed \a fMaxAngle. - */ - bool Foraminate (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, Base::Vector3f &rclRes, float fMaxAngle = Mathf::PI) const; - /** Checks if the facet intersects with the plane defined by the base \a rclBase and the normal - * \a rclNormal and returns true if two points are found, false otherwise. - */ - bool IntersectWithPlane (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal, Base::Vector3f &rclP1, Base::Vector3f &rclP2) const; - /** - * Checks if the facet intersects with the plane defined by the base \a rclBase and the normal - * \a rclNormal. - */ - inline bool IntersectWithPlane (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal) const; - /** Checks if the plane defined by the facet \a rclFacet intersects with the line defined by the base - * \a rclBase and the direction \a rclNormal and returns the intersection point \a rclRes if possible. - */ - bool IntersectPlaneWithLine (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal, Base::Vector3f &rclRes ) const; - /** Calculates the volume of the prism defined by two facets. - * \note The two facets must not intersect. - */ - float VolumeOfPrism (const MeshGeomFacet& rclF) const; - /** Subsamples the facet into points with resolution \a fStep. */ - void SubSample (float fStep, std::vector &rclPoints) const; - /** Calculates the center and radius of the inscribed circle of the facet. */ - float CenterOfInscribedCircle(Base::Vector3f& rclCenter) const; - /** Calculates the center and radius of the circum circle of the facet. */ - float CenterOfCircumCircle(Base::Vector3f& rclCenter) const; - /** Returns the edge number of the facet that is nearest to the point \a rclPt. */ - unsigned short NearestEdgeToPoint(const Base::Vector3f& rclPt) const; - /** Returns the edge number \a side of the facet and the distance to the edge that is nearest to the point \a rclPt. */ - void NearestEdgeToPoint(const Base::Vector3f& rclPt, float& fDistance, unsigned short& side) const; - /** Returns the edge for \a side. */ - MeshGeomEdge GetEdge(short side) const; - /** The center and radius of the circum circle define a sphere in 3D. If the point \a rP is part of this sphere true is - * returned, otherwise false. - */ - bool IsPointOfSphere(const Base::Vector3f& rP) const; - /** This is an overloaded member function, provided for convenience. It behaves essentially like the above function. - * If one of the facet's points is inside the sphere true is returned, otherwise false. - */ - bool IsPointOfSphere(const MeshGeomFacet& rFacet) const; - /** The aspect ratio is the longest edge length divided by its height. - */ - float AspectRatio() const; - /** The alternative aspect ration is the ratio of the radius of the circum-circle and twice the radius of the in-circle. - */ - float AspectRatio2() const; - /** The roundness is in the range between 0.0 (colinear) and 1.0 (equilateral). - */ - float Roundness() const; - /** Apply a transformation on the triangle. - */ - void Transform(const Base::Matrix4D&); - /** - * Checks if the two triangles are coplanar. - */ - bool IsCoplanar(const MeshGeomFacet &facet) const; + void SetFlag(MeshFacet::TFlagType tF) + { + _ucFlag |= static_cast(tF); + } + /** Reset flag state */ + void ResetFlag(MeshFacet::TFlagType tF) + { + _ucFlag &= ~static_cast(tF); + } + /** Calculates the facet's gravity point. */ + inline Base::Vector3f GetGravityPoint() const; + /** Returns the normal of the facet. */ + inline Base::Vector3f GetNormal() const; + /** Sets the facet's normal. */ + inline void SetNormal(const Base::Vector3f& rclNormal); + /** Returns the wrapping bounding box. */ + inline Base::BoundBox3f GetBoundBox() const; + /** Calculates the perimeter of the facet. */ + inline float Perimeter() const; + /** Calculates the area of a facet. */ + inline float Area() const; + /** Calculates the maximum angle of a facet. */ + float MaximumAngle() const; + /** Calculates the minimum angle of a facet. */ + float MinimumAngle() const; + /** Checks if the facet is inside the bounding box or intersects with it. */ + inline bool ContainedByOrIntersectBoundingBox(const Base::BoundBox3f& rcBB) const; + /** Checks if the facet intersects with the given bounding box. */ + bool IntersectBoundingBox(const Base::BoundBox3f& rclBB) const; + /** This method checks if both facets intersect. + */ + bool IntersectWithFacet(const MeshGeomFacet& rclFacet) const; + /** + * Intersect the facet with the other facet + * The result is line given by two points (if intersected). + * Return is the number of intersections points: 0: no intersection, 1: one intersection point + * (rclPt0), 2: two intersections points (rclPt0, rclPt1) + */ + int IntersectWithFacet(const MeshGeomFacet& facet, + Base::Vector3f& rclPt0, + Base::Vector3f& rclPt1) const; + /** Calculates the shortest distance from the line segment defined by \a rcP1 and \a rcP2 to + * this facet. + */ + float DistanceToLineSegment(const Base::Vector3f& rcP1, const Base::Vector3f& rcP2) const; + /** Calculates the shortest distance from the point \a rcPt to the facet. */ + float DistanceToPoint(const Base::Vector3f& rcPt) const + { + Base::Vector3f res; + return DistanceToPoint(rcPt, res); + } + /** Calculates the shortest distance from the point \a rcPt to the facet. \a rclNt is the point + * of the facet with shortest distance. + */ + float DistanceToPoint(const Base::Vector3f& rclPt, Base::Vector3f& rclNt) const; + /** Calculates the intersection point of the line defined by the base \a rclPt and the direction + * \a rclDir with the facet. The intersection must be inside the facet. If there is no + * intersection false is returned. + */ + bool IntersectWithLine(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes) const; + /** Calculates the intersection point of the line defined by the base \a rclPt and the direction + * \a rclDir with the facet. The intersection must be inside the facet. If there is no + * intersection false is returned. This does actually the same as IntersectWithLine() with one + * additionally constraint that the angle between the direction of the line and the normal of + * the plane must not exceed \a fMaxAngle. + */ + bool Foraminate(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + Base::Vector3f& rclRes, + float fMaxAngle = Mathf::PI) const; + /** Checks if the facet intersects with the plane defined by the base \a rclBase and the normal + * \a rclNormal and returns true if two points are found, false otherwise. + */ + bool IntersectWithPlane(const Base::Vector3f& rclBase, + const Base::Vector3f& rclNormal, + Base::Vector3f& rclP1, + Base::Vector3f& rclP2) const; + /** + * Checks if the facet intersects with the plane defined by the base \a rclBase and the normal + * \a rclNormal. + */ + inline bool IntersectWithPlane(const Base::Vector3f& rclBase, + const Base::Vector3f& rclNormal) const; + /** Checks if the plane defined by the facet \a rclFacet intersects with the line defined by the + * base \a rclBase and the direction \a rclNormal and returns the intersection point \a rclRes + * if possible. + */ + bool IntersectPlaneWithLine(const Base::Vector3f& rclBase, + const Base::Vector3f& rclNormal, + Base::Vector3f& rclRes) const; + /** Calculates the volume of the prism defined by two facets. + * \note The two facets must not intersect. + */ + float VolumeOfPrism(const MeshGeomFacet& rclF) const; + /** Subsamples the facet into points with resolution \a fStep. */ + void SubSample(float fStep, std::vector& rclPoints) const; + /** Calculates the center and radius of the inscribed circle of the facet. */ + float CenterOfInscribedCircle(Base::Vector3f& rclCenter) const; + /** Calculates the center and radius of the circum circle of the facet. */ + float CenterOfCircumCircle(Base::Vector3f& rclCenter) const; + /** Returns the edge number of the facet that is nearest to the point \a rclPt. */ + unsigned short NearestEdgeToPoint(const Base::Vector3f& rclPt) const; + /** Returns the edge number \a side of the facet and the distance to the edge that is nearest to + * the point \a rclPt. */ + void + NearestEdgeToPoint(const Base::Vector3f& rclPt, float& fDistance, unsigned short& side) const; + /** Returns the edge for \a side. */ + MeshGeomEdge GetEdge(short side) const; + /** The center and radius of the circum circle define a sphere in 3D. If the point \a rP is part + * of this sphere true is returned, otherwise false. + */ + bool IsPointOfSphere(const Base::Vector3f& rP) const; + /** This is an overloaded member function, provided for convenience. It behaves essentially like + * the above function. If one of the facet's points is inside the sphere true is returned, + * otherwise false. + */ + bool IsPointOfSphere(const MeshGeomFacet& rFacet) const; + /** The aspect ratio is the longest edge length divided by its height. + */ + float AspectRatio() const; + /** The alternative aspect ration is the ratio of the radius of the circum-circle and twice the + * radius of the in-circle. + */ + float AspectRatio2() const; + /** The roundness is in the range between 0.0 (colinear) and 1.0 (equilateral). + */ + float Roundness() const; + /** Apply a transformation on the triangle. + */ + void Transform(const Base::Matrix4D&); + /** + * Checks if the two triangles are coplanar. + */ + bool IsCoplanar(const MeshGeomFacet& facet) const; protected: - mutable Base::Vector3f _clNormal; /**< Normal of the facet. */ - mutable bool _bNormalCalculated; /**< True if the normal is already calculated. */ + mutable Base::Vector3f _clNormal; /**< Normal of the facet. */ + mutable bool _bNormalCalculated; /**< True if the normal is already calculated. */ public: - Base::Vector3f _aclPoints[3]; /**< Geometric corner points. */ - unsigned char _ucFlag; /**< Flag property */ - unsigned long _ulProp; /**< Free usable property. */ + Base::Vector3f _aclPoints[3]; /**< Geometric corner points. */ + unsigned char _ucFlag; /**< Flag property */ + unsigned long _ulProp; /**< Free usable property. */ }; using TMeshPointArray = std::vector; @@ -582,52 +682,54 @@ using TMeshPointArray = std::vector; class MeshExport MeshPointArray: public TMeshPointArray { public: - // Iterator interface - using _TIterator = std::vector::iterator; - using _TConstIterator = std::vector::const_iterator; + // Iterator interface + using _TIterator = std::vector::iterator; + using _TConstIterator = std::vector::const_iterator; - /** @name Construction */ - //@{ - // constructor - MeshPointArray () = default; - // constructor - explicit MeshPointArray (PointIndex ulSize) : TMeshPointArray(ulSize) { } - /// copy-constructor - MeshPointArray (const MeshPointArray&); - MeshPointArray (MeshPointArray&&); - // Destructor - ~MeshPointArray () = default; - //@} + /** @name Construction */ + //@{ + // constructor + MeshPointArray() = default; + // constructor + explicit MeshPointArray(PointIndex ulSize) + : TMeshPointArray(ulSize) + {} + /// copy-constructor + MeshPointArray(const MeshPointArray&); + MeshPointArray(MeshPointArray&&); + // Destructor + ~MeshPointArray() = default; + //@} - /** @name Flag state - * @note All flag methods are const as they do NOT change the actual properties of the object - */ - //@{ - /// Sets the flag for all points - void SetFlag (MeshPoint::TFlagType tF) const; - /// Resets the flag for all points - void ResetFlag (MeshPoint::TFlagType tF) const; - /// Sets all points invalid - void ResetInvalid () const; - /// Sets the property for all points - void SetProperty (unsigned long ulVal) const; - //@} + /** @name Flag state + * @note All flag methods are const as they do NOT change the actual properties of the object + */ + //@{ + /// Sets the flag for all points + void SetFlag(MeshPoint::TFlagType tF) const; + /// Resets the flag for all points + void ResetFlag(MeshPoint::TFlagType tF) const; + /// Sets all points invalid + void ResetInvalid() const; + /// Sets the property for all points + void SetProperty(unsigned long ulVal) const; + //@} - // Assignment - MeshPointArray& operator = (const MeshPointArray &rclPAry); - MeshPointArray& operator = (MeshPointArray &&rclPAry); - void Transform(const Base::Matrix4D&); - /** - * Searches for the first point index Two points are equal if the distance is less - * than EPSILON. If no such points is found POINT_INDEX_MAX is returned. - */ - PointIndex Get (const MeshPoint &rclPoint); - /** - * Searches for the first point index Two points are equal if the distance is less - * than EPSILON. If no such points is found the point is added to the array at end - * and its index is returned. - */ - PointIndex GetOrAddIndex (const MeshPoint &rclPoint); + // Assignment + MeshPointArray& operator=(const MeshPointArray& rclPAry); + MeshPointArray& operator=(MeshPointArray&& rclPAry); + void Transform(const Base::Matrix4D&); + /** + * Searches for the first point index Two points are equal if the distance is less + * than EPSILON. If no such points is found POINT_INDEX_MAX is returned. + */ + PointIndex Get(const MeshPoint& rclPoint); + /** + * Searches for the first point index Two points are equal if the distance is less + * than EPSILON. If no such points is found the point is added to the array at end + * and its index is returned. + */ + PointIndex GetOrAddIndex(const MeshPoint& rclPoint); }; using TMeshFacetArray = std::vector; @@ -645,48 +747,50 @@ public: /** @name Construction */ //@{ /// constructor - MeshFacetArray () = default; + MeshFacetArray() = default; /// constructor - explicit MeshFacetArray (FacetIndex ulSize) : TMeshFacetArray(ulSize) { } + explicit MeshFacetArray(FacetIndex ulSize) + : TMeshFacetArray(ulSize) + {} /// copy-constructor - MeshFacetArray (const MeshFacetArray&); - MeshFacetArray (MeshFacetArray&&); + MeshFacetArray(const MeshFacetArray&); + MeshFacetArray(MeshFacetArray&&); /// destructor - ~MeshFacetArray () = default; + ~MeshFacetArray() = default; //@} /** @name Flag state - * @note All flag methods are const as they do NOT change the actual properties - * of the object - */ + * @note All flag methods are const as they do NOT change the actual properties + * of the object + */ //@{ /// Sets the flag for all facets. - void SetFlag (MeshFacet::TFlagType tF) const; + void SetFlag(MeshFacet::TFlagType tF) const; /// Resets the flag for all facets. - void ResetFlag (MeshFacet::TFlagType tF) const; + void ResetFlag(MeshFacet::TFlagType tF) const; /// Sets all facets invalid - void ResetInvalid () const; + void ResetInvalid() const; /// Sets the property for all facets - void SetProperty (unsigned long ulVal) const; + void SetProperty(unsigned long ulVal) const; //@} // Assignment - MeshFacetArray& operator = (const MeshFacetArray &rclFAry); - MeshFacetArray& operator = (MeshFacetArray &&rclFAry); + MeshFacetArray& operator=(const MeshFacetArray& rclFAry); + MeshFacetArray& operator=(MeshFacetArray&& rclFAry); /** * Removes the facet from the array the iterator points to. All neighbour * indices of the other facets get adjusted. */ - void Erase (_TIterator pIter); + void Erase(_TIterator pIter); /** * Checks and flips the point indices if needed. @see MeshFacet::Transpose(). */ - void TransposeIndices (PointIndex ulOrig, PointIndex ulNew); + void TransposeIndices(PointIndex ulOrig, PointIndex ulNew); /** * Decrements all point indices that are higher than \a ulIndex. */ - void DecrementIndices (PointIndex ulIndex); + void DecrementIndices(PointIndex ulIndex); }; /** @@ -698,17 +802,19 @@ class MeshExport MeshPointModifier public: explicit MeshPointModifier(MeshPointArray& points) : rPoints(points) - { - } + {} ~MeshPointModifier() = default; - MeshPointArray& GetPoints() const { return rPoints; } + MeshPointArray& GetPoints() const + { + return rPoints; + } MeshPointModifier(const MeshPointModifier& c) = default; MeshPointModifier(MeshPointModifier&& c) = default; - MeshPointModifier& operator = (const MeshPointModifier& c) = delete; - MeshPointModifier& operator = (MeshPointModifier&& c) = delete; + MeshPointModifier& operator=(const MeshPointModifier& c) = delete; + MeshPointModifier& operator=(MeshPointModifier&& c) = delete; private: MeshPointArray& rPoints; @@ -723,14 +829,13 @@ class MeshExport MeshFacetModifier public: explicit MeshFacetModifier(MeshFacetArray& facets) : rFacets(facets) - { - } + {} ~MeshFacetModifier() = default; MeshFacetModifier(const MeshFacetModifier& c) = default; MeshFacetModifier(MeshFacetModifier&& c) = default; - MeshFacetModifier& operator = (const MeshFacetModifier& c) = delete; - MeshFacetModifier& operator = (MeshFacetModifier&& c) = delete; + MeshFacetModifier& operator=(const MeshFacetModifier& c) = delete; + MeshFacetModifier& operator=(MeshFacetModifier&& c) = delete; /** * Replaces the index of the corner point of the facet at position \a pos @@ -746,151 +851,164 @@ private: MeshFacetArray& rFacets; }; -inline MeshPoint::MeshPoint (float x, float y, float z) - : Base::Vector3f(x, y, z), - _ucFlag(0), - _ulProp(0) -{ -} +inline MeshPoint::MeshPoint(float x, float y, float z) + : Base::Vector3f(x, y, z) + , _ucFlag(0) + , _ulProp(0) +{} -inline MeshPoint::MeshPoint (const Base::Vector3f &rclPt) - : Base::Vector3f(rclPt), - _ucFlag(0), - _ulProp(0) -{ -} +inline MeshPoint::MeshPoint(const Base::Vector3f& rclPt) + : Base::Vector3f(rclPt) + , _ucFlag(0) + , _ulProp(0) +{} -inline bool MeshPoint::operator == (const MeshPoint &rclPt) const +inline bool MeshPoint::operator==(const MeshPoint& rclPt) const { return Base::DistanceP2(*this, rclPt) < MeshDefinitions::_fMinPointDistanceP2; } -inline bool MeshPoint::operator == (const Base::Vector3f &rclV) const +inline bool MeshPoint::operator==(const Base::Vector3f& rclV) const { return Base::DistanceP2(*this, rclV) < MeshDefinitions::_fMinPointDistanceP2; } -inline bool MeshPoint::operator < (const MeshPoint &rclPt) const +inline bool MeshPoint::operator<(const MeshPoint& rclPt) const { - if (fabs ( this->x - rclPt.x ) >= MeshDefinitions::_fMinPointDistanceD1) + if (fabs(this->x - rclPt.x) >= MeshDefinitions::_fMinPointDistanceD1) { return this->x < rclPt.x; - if (fabs ( this->y - rclPt.y ) >= MeshDefinitions::_fMinPointDistanceD1) + } + if (fabs(this->y - rclPt.y) >= MeshDefinitions::_fMinPointDistanceD1) { return this->y < rclPt.y; - if (fabs ( this->z - rclPt.z ) >= MeshDefinitions::_fMinPointDistanceD1) + } + if (fabs(this->z - rclPt.z) >= MeshDefinitions::_fMinPointDistanceD1) { return this->z < rclPt.z; - return false; // points are considered to be equal + } + return false; // points are considered to be equal } -inline float MeshGeomFacet::DistancePlaneToPoint (const Base::Vector3f &rclPoint) const +inline float MeshGeomFacet::DistancePlaneToPoint(const Base::Vector3f& rclPoint) const { // internal normal is forced to have length equal to 1 return float(fabs(rclPoint.DistanceToPlane(_aclPoints[0], GetNormal()))); } -inline void MeshGeomFacet::CalcNormal () const +inline void MeshGeomFacet::CalcNormal() const { _clNormal = (_aclPoints[1] - _aclPoints[0]) % (_aclPoints[2] - _aclPoints[0]); _clNormal.Normalize(); _bNormalCalculated = true; } -inline Base::Vector3f MeshGeomFacet::GetNormal () const +inline Base::Vector3f MeshGeomFacet::GetNormal() const { - if (!_bNormalCalculated) + if (!_bNormalCalculated) { CalcNormal(); + } return _clNormal; } -inline void MeshGeomFacet::SetNormal (const Base::Vector3f &rclNormal) +inline void MeshGeomFacet::SetNormal(const Base::Vector3f& rclNormal) { - if (rclNormal.Sqr() == 0.0f) + if (rclNormal.Sqr() == 0.0f) { return; + } _clNormal = rclNormal; _clNormal.Normalize(); _bNormalCalculated = true; } -inline void MeshGeomFacet::ArrangeNormal (const Base::Vector3f &rclN) +inline void MeshGeomFacet::ArrangeNormal(const Base::Vector3f& rclN) { // force internal normal to be computed if not done yet - if ((rclN * GetNormal()) < 0.0f) + if ((rclN * GetNormal()) < 0.0f) { _clNormal = -_clNormal; + } } -inline Base::Vector3f MeshGeomFacet::GetGravityPoint () const +inline Base::Vector3f MeshGeomFacet::GetGravityPoint() const { return (1.0f / 3.0f) * (_aclPoints[0] + _aclPoints[1] + _aclPoints[2]); } -inline void MeshGeomFacet::AdjustCirculationDirection () +inline void MeshGeomFacet::AdjustCirculationDirection() { Base::Vector3f clN = (_aclPoints[1] - _aclPoints[0]) % (_aclPoints[2] - _aclPoints[0]); - if ((clN * _clNormal) < 0.0f) + if ((clN * _clNormal) < 0.0f) { std::swap(_aclPoints[1], _aclPoints[2]); + } } -inline Base::BoundBox3f MeshGeomFacet::GetBoundBox () const +inline Base::BoundBox3f MeshGeomFacet::GetBoundBox() const { return {_aclPoints, 3}; } inline float MeshGeomFacet::Perimeter() const { - float perimeter=0.0f; + float perimeter = 0.0f; perimeter += Base::Distance(_aclPoints[0], _aclPoints[1]); perimeter += Base::Distance(_aclPoints[1], _aclPoints[2]); perimeter += Base::Distance(_aclPoints[2], _aclPoints[0]); return perimeter; } -inline float MeshGeomFacet::Area () const +inline float MeshGeomFacet::Area() const { - return ((_aclPoints[1] - _aclPoints[0]) % - (_aclPoints[2] - _aclPoints[0])).Length() / 2.0f; + return ((_aclPoints[1] - _aclPoints[0]) % (_aclPoints[2] - _aclPoints[0])).Length() / 2.0f; } -inline bool MeshGeomFacet::ContainedByOrIntersectBoundingBox ( const Base::BoundBox3f &rclBB ) const +inline bool MeshGeomFacet::ContainedByOrIntersectBoundingBox(const Base::BoundBox3f& rclBB) const { - // Test, if all corner points of the facet are on one of the 6 sides of the BB - if (!(GetBoundBox() && rclBB)) + // Test, if all corner points of the facet are on one of the 6 sides of the BB + if (!(GetBoundBox() && rclBB)) { return false; + } // Test, whether Facet-BB is completely within BB - if (rclBB.IsInBox(GetBoundBox())) + if (rclBB.IsInBox(GetBoundBox())) { return true; + } // Test, whether one of the corner points is in BB for (auto pnt : _aclPoints) { - if (rclBB.IsInBox(pnt)) + if (rclBB.IsInBox(pnt)) { return true; + } } // "real" test for cutting - if (IntersectBoundingBox(rclBB)) + if (IntersectBoundingBox(rclBB)) { return true; + } return false; } -inline bool MeshGeomFacet::IntersectWithPlane (const Base::Vector3f &rclBase, const Base::Vector3f &rclNormal) const +inline bool MeshGeomFacet::IntersectWithPlane(const Base::Vector3f& rclBase, + const Base::Vector3f& rclNormal) const { bool bD0 = (_aclPoints[0].DistanceToPlane(rclBase, rclNormal) > 0.0f); - return !((bD0 == (_aclPoints[1].DistanceToPlane(rclBase, rclNormal) > 0.0f)) && - (bD0 == (_aclPoints[2].DistanceToPlane(rclBase, rclNormal) > 0.0f))); + return !((bD0 == (_aclPoints[1].DistanceToPlane(rclBase, rclNormal) > 0.0f)) + && (bD0 == (_aclPoints[2].DistanceToPlane(rclBase, rclNormal) > 0.0f))); } -inline MeshFacet::MeshFacet () -: _ucFlag(0), - _ulProp(0) +inline MeshFacet::MeshFacet() + : _ucFlag(0) + , _ulProp(0) { memset(_aulNeighbours, 0xff, sizeof(FacetIndex) * 3); memset(_aulPoints, 0xff, sizeof(PointIndex) * 3); } -inline MeshFacet::MeshFacet(PointIndex p1,PointIndex p2,PointIndex p3, - FacetIndex n1,FacetIndex n2,FacetIndex n3) -: _ucFlag(0), - _ulProp(0) +inline MeshFacet::MeshFacet(PointIndex p1, + PointIndex p2, + PointIndex p3, + FacetIndex n1, + FacetIndex n2, + FacetIndex n3) + : _ucFlag(0) + , _ulProp(0) { _aulPoints[0] = p1; _aulPoints[1] = p2; @@ -901,74 +1019,92 @@ inline MeshFacet::MeshFacet(PointIndex p1,PointIndex p2,PointIndex p3, _aulNeighbours[2] = n3; } -void MeshFacet::SetVertices(PointIndex p1,PointIndex p2,PointIndex p3) +void MeshFacet::SetVertices(PointIndex p1, PointIndex p2, PointIndex p3) { _aulPoints[0] = p1; _aulPoints[1] = p2; _aulPoints[2] = p3; } -void MeshFacet::SetNeighbours(FacetIndex n1,FacetIndex n2,FacetIndex n3) +void MeshFacet::SetNeighbours(FacetIndex n1, FacetIndex n2, FacetIndex n3) { _aulNeighbours[0] = n1; _aulNeighbours[1] = n2; _aulNeighbours[2] = n3; } -inline void MeshFacet::GetEdge (unsigned short usSide, MeshHelpEdge &rclEdge) const +inline void MeshFacet::GetEdge(unsigned short usSide, MeshHelpEdge& rclEdge) const { rclEdge._ulIndex[0] = _aulPoints[usSide]; - rclEdge._ulIndex[1] = _aulPoints[(usSide+1) % 3]; + rclEdge._ulIndex[1] = _aulPoints[(usSide + 1) % 3]; } -inline std::pair MeshFacet::GetEdge (unsigned short usSide) const +inline std::pair MeshFacet::GetEdge(unsigned short usSide) const { - return {_aulPoints[usSide], _aulPoints[(usSide+1)%3]}; + return {_aulPoints[usSide], _aulPoints[(usSide + 1) % 3]}; } -inline void MeshFacet::Transpose (PointIndex ulOrig, PointIndex ulNew) +inline void MeshFacet::Transpose(PointIndex ulOrig, PointIndex ulNew) { - if (_aulPoints[0] == ulOrig) + if (_aulPoints[0] == ulOrig) { _aulPoints[0] = ulNew; - else if (_aulPoints[1] == ulOrig) + } + else if (_aulPoints[1] == ulOrig) { _aulPoints[1] = ulNew; - else if (_aulPoints[2] == ulOrig) + } + else if (_aulPoints[2] == ulOrig) { _aulPoints[2] = ulNew; + } } -inline void MeshFacet::Decrement (PointIndex ulIndex) +inline void MeshFacet::Decrement(PointIndex ulIndex) { - if (_aulPoints[0] > ulIndex) _aulPoints[0]--; - if (_aulPoints[1] > ulIndex) _aulPoints[1]--; - if (_aulPoints[2] > ulIndex) _aulPoints[2]--; + if (_aulPoints[0] > ulIndex) { + _aulPoints[0]--; + } + if (_aulPoints[1] > ulIndex) { + _aulPoints[1]--; + } + if (_aulPoints[2] > ulIndex) { + _aulPoints[2]--; + } } inline bool MeshFacet::HasPoint(PointIndex ulIndex) const { - if (_aulPoints[0] == ulIndex) + if (_aulPoints[0] == ulIndex) { return true; - if (_aulPoints[1] == ulIndex) + } + if (_aulPoints[1] == ulIndex) { return true; - if (_aulPoints[2] == ulIndex) + } + if (_aulPoints[2] == ulIndex) { return true; + } return false; } -inline void MeshFacet::ReplaceNeighbour (FacetIndex ulOrig, FacetIndex ulNew) +inline void MeshFacet::ReplaceNeighbour(FacetIndex ulOrig, FacetIndex ulNew) { - if (_aulNeighbours[0] == ulOrig) + if (_aulNeighbours[0] == ulOrig) { _aulNeighbours[0] = ulNew; - else if (_aulNeighbours[1] == ulOrig) + } + else if (_aulNeighbours[1] == ulOrig) { _aulNeighbours[1] = ulNew; - else if (_aulNeighbours[2] == ulOrig) + } + else if (_aulNeighbours[2] == ulOrig) { _aulNeighbours[2] = ulNew; + } } inline unsigned short MeshFacet::CountOpenEdges() const { - unsigned short ct=0; - for (unsigned short i=0; i<3; i++) - { if ( !HasNeighbour(i) ) ct++; } + unsigned short ct = 0; + for (unsigned short i = 0; i < 3; i++) { + if (!HasNeighbour(i)) { + ct++; + } + } return ct; } @@ -982,8 +1118,8 @@ inline bool MeshFacet::HasSameOrientation(const MeshFacet& f) const for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (_aulPoints[i] == f._aulPoints[j]) { - if ((_aulPoints[(i+1)%3] == f._aulPoints[(j+1)%3]) || - (_aulPoints[(i+2)%3] == f._aulPoints[(j+2)%3])) { + if ((_aulPoints[(i + 1) % 3] == f._aulPoints[(j + 1) % 3]) + || (_aulPoints[(i + 2) % 3] == f._aulPoints[(j + 2) % 3])) { return false; } } @@ -995,73 +1131,89 @@ inline bool MeshFacet::HasSameOrientation(const MeshFacet& f) const inline bool MeshFacet::IsDegenerated() const { - if (_aulPoints[0] == _aulPoints[1]) + if (_aulPoints[0] == _aulPoints[1]) { return true; - if (_aulPoints[1] == _aulPoints[2]) + } + if (_aulPoints[1] == _aulPoints[2]) { return true; - if (_aulPoints[2] == _aulPoints[0]) + } + if (_aulPoints[2] == _aulPoints[0]) { return true; + } return false; } -inline unsigned short MeshFacet::Side (FacetIndex ulNIndex) const +inline unsigned short MeshFacet::Side(FacetIndex ulNIndex) const { - if (_aulNeighbours[0] == ulNIndex) + if (_aulNeighbours[0] == ulNIndex) { return 0; - else if (_aulNeighbours[1] == ulNIndex) + } + else if (_aulNeighbours[1] == ulNIndex) { return 1; - else if (_aulNeighbours[2] == ulNIndex) + } + else if (_aulNeighbours[2] == ulNIndex) { return 2; - else + } + else { return USHRT_MAX; + } } -inline unsigned short MeshFacet::Side (PointIndex ulP0, PointIndex ulP1) const +inline unsigned short MeshFacet::Side(PointIndex ulP0, PointIndex ulP1) const { if (_aulPoints[0] == ulP0) { - if (_aulPoints[1] == ulP1) + if (_aulPoints[1] == ulP1) { return 0; // Edge 0-1 ==> 0 - else if (_aulPoints[2] == ulP1) + } + else if (_aulPoints[2] == ulP1) { return 2; // Edge 0-2 ==> 2 + } } else if (_aulPoints[1] == ulP0) { - if (_aulPoints[0] == ulP1) - return 0; // Edge 1-0 ==> 0 - else if (_aulPoints[2] == ulP1) - return 1; // Edge 1-2 ==> 1 + if (_aulPoints[0] == ulP1) { + return 0; // Edge 1-0 ==> 0 + } + else if (_aulPoints[2] == ulP1) { + return 1; // Edge 1-2 ==> 1 + } } else if (_aulPoints[2] == ulP0) { - if (_aulPoints[0] == ulP1) - return 2; // Edge 2-0 ==> 2 - else if (_aulPoints[1] == ulP1) - return 1; // Edge 2-1 ==> 1 + if (_aulPoints[0] == ulP1) { + return 2; // Edge 2-0 ==> 2 + } + else if (_aulPoints[1] == ulP1) { + return 1; // Edge 2-1 ==> 1 + } } return USHRT_MAX; } -inline unsigned short MeshFacet::Side (const MeshFacet& rFace) const +inline unsigned short MeshFacet::Side(const MeshFacet& rFace) const { unsigned short side; - for (int i=0; i<3;i++){ - side = Side(rFace._aulPoints[i], rFace._aulPoints[(i+1)%3]); - if (side != USHRT_MAX) + for (int i = 0; i < 3; i++) { + side = Side(rFace._aulPoints[i], rFace._aulPoints[(i + 1) % 3]); + if (side != USHRT_MAX) { return side; + } } return USHRT_MAX; } -inline bool MeshFacet::IsEqual (const MeshFacet& rcFace) const +inline bool MeshFacet::IsEqual(const MeshFacet& rcFace) const { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { if (this->_aulPoints[0] == rcFace._aulPoints[i]) { - if (this->_aulPoints[1] == rcFace._aulPoints[(i+1)%3] && - this->_aulPoints[2] == rcFace._aulPoints[(i+2)%3]) + if (this->_aulPoints[1] == rcFace._aulPoints[(i + 1) % 3] + && this->_aulPoints[2] == rcFace._aulPoints[(i + 2) % 3]) { return true; - else if (this->_aulPoints[1] == rcFace._aulPoints[(i+2)%3] && - this->_aulPoints[2] == rcFace._aulPoints[(i+1)%3]) + } + else if (this->_aulPoints[1] == rcFace._aulPoints[(i + 2) % 3] + && this->_aulPoints[2] == rcFace._aulPoints[(i + 1) % 3]) { return true; + } } } @@ -1071,59 +1223,69 @@ inline bool MeshFacet::IsEqual (const MeshFacet& rcFace) const /** * Binary function to query the flags for use with generic STL functions. */ -template +template class MeshIsFlag { public: using first_argument_type = TCLASS; using second_argument_type = typename TCLASS::TFlagType; using result_type = bool; - bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const - { return rclElem.IsFlag(tFlag); } + bool operator()(const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const + { + return rclElem.IsFlag(tFlag); + } }; /** * Binary function to query the flags for use with generic STL functions. */ -template +template class MeshIsNotFlag { public: using first_argument_type = TCLASS; using second_argument_type = typename TCLASS::TFlagType; using result_type = bool; - bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const - { return !rclElem.IsFlag(tFlag); } + bool operator()(const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const + { + return !rclElem.IsFlag(tFlag); + } }; /** * Binary function to set the flags for use with generic STL functions. */ -template +template class MeshSetFlag { public: using first_argument_type = TCLASS; using second_argument_type = typename TCLASS::TFlagType; using result_type = bool; - bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const - { rclElem.SetFlag(tFlag); return true; } + bool operator()(const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const + { + rclElem.SetFlag(tFlag); + return true; + } }; /** * Binary function to reset the flags for use with generic STL functions. */ -template +template class MeshResetFlag { public: using first_argument_type = TCLASS; using second_argument_type = typename TCLASS::TFlagType; using result_type = bool; - bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const - { rclElem.ResetFlag(tFlag); return true; } + bool operator()(const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const + { + rclElem.ResetFlag(tFlag); + return true; + } }; -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_ELEMENTS_H +#endif // MESH_ELEMENTS_H diff --git a/src/Mod/Mesh/App/Core/Evaluation.cpp b/src/Mod/Mesh/App/Core/Evaluation.cpp index 66307a66ab..707c712ceb 100644 --- a/src/Mod/Mesh/App/Core/Evaluation.cpp +++ b/src/Mod/Mesh/App/Core/Evaluation.cpp @@ -23,16 +23,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include #include -#include "Evaluation.h" #include "Algorithm.h" #include "Approximation.h" +#include "Evaluation.h" #include "Functional.h" #include "Grid.h" #include "Iterator.h" @@ -44,8 +44,10 @@ using namespace MeshCore; MeshOrientationVisitor::MeshOrientationVisitor() = default; -bool MeshOrientationVisitor::Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, - FacetIndex ulFInd, unsigned long ulLevel) +bool MeshOrientationVisitor::Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) { (void)ulFInd; (void)ulLevel; @@ -62,13 +64,16 @@ bool MeshOrientationVisitor::HasNonUnifomOrientedFacets() const return _nonuniformOrientation; } -MeshOrientationCollector::MeshOrientationCollector(std::vector& aulIndices, std::vector& aulComplement) - : _aulIndices(aulIndices), _aulComplement(aulComplement) -{ -} +MeshOrientationCollector::MeshOrientationCollector(std::vector& aulIndices, + std::vector& aulComplement) + : _aulIndices(aulIndices) + , _aulComplement(aulComplement) +{} -bool MeshOrientationCollector::Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, - FacetIndex ulFInd, unsigned long ulLevel) +bool MeshOrientationCollector::Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) { (void)ulLevel; // different orientation of rclFacet and rclFrom @@ -77,10 +82,11 @@ bool MeshOrientationCollector::Visit (const MeshFacet &rclFacet, const MeshFacet if (!rclFrom.IsFlag(MeshFacet::TMP0)) { // mark this facet as false oriented rclFacet.SetFlag(MeshFacet::TMP0); - _aulIndices.push_back( ulFInd ); + _aulIndices.push_back(ulFInd); + } + else { + _aulComplement.push_back(ulFInd); } - else - _aulComplement.push_back( ulFInd ); } else { // same orientation but if the neighbour rclFrom is false oriented @@ -90,20 +96,22 @@ bool MeshOrientationCollector::Visit (const MeshFacet &rclFacet, const MeshFacet rclFacet.SetFlag(MeshFacet::TMP0); _aulIndices.push_back(ulFInd); } - else - _aulComplement.push_back( ulFInd ); + else { + _aulComplement.push_back(ulFInd); + } } return true; } MeshSameOrientationCollector::MeshSameOrientationCollector(std::vector& aulIndices) - : _aulIndices(aulIndices) -{ -} + : _aulIndices(aulIndices) +{} -bool MeshSameOrientationCollector::Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, - FacetIndex ulFInd, unsigned long ulLevel) +bool MeshSameOrientationCollector::Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) { // different orientation of rclFacet and rclFrom (void)ulLevel; @@ -116,12 +124,11 @@ bool MeshSameOrientationCollector::Visit (const MeshFacet &rclFacet, const MeshF // ---------------------------------------------------- -MeshEvalOrientation::MeshEvalOrientation (const MeshKernel& rclM) - : MeshEvaluation( rclM ) -{ -} +MeshEvalOrientation::MeshEvalOrientation(const MeshKernel& rclM) + : MeshEvaluation(rclM) +{} -bool MeshEvalOrientation::Evaluate () +bool MeshEvalOrientation::Evaluate() { const MeshFacetArray& rFAry = _rclMesh.GetFacets(); MeshFacetArray::_TConstIterator iBeg = rFAry.begin(); @@ -132,9 +139,9 @@ bool MeshEvalOrientation::Evaluate () const MeshFacet& rclFacet = iBeg[it->_aulNeighbours[i]]; for (int j = 0; j < 3; j++) { if (it->_aulPoints[i] == rclFacet._aulPoints[j]) { - if ((it->_aulPoints[(i+1)%3] == rclFacet._aulPoints[(j+1)%3]) || - (it->_aulPoints[(i+2)%3] == rclFacet._aulPoints[(j+2)%3])) { - return false; // adjacent face with wrong orientation + if ((it->_aulPoints[(i + 1) % 3] == rclFacet._aulPoints[(j + 1) % 3]) + || (it->_aulPoints[(i + 2) % 3] == rclFacet._aulPoints[(j + 2) % 3])) { + return false; // adjacent face with wrong orientation } } } @@ -147,12 +154,12 @@ bool MeshEvalOrientation::Evaluate () unsigned long MeshEvalOrientation::HasFalsePositives(const std::vector& inds) const { - // All faces with wrong orientation (i.e. adjacent faces with a normal flip and their neighbours) - // build a segment and are marked as TMP0. Now we check all border faces of the segments with - // their correct neighbours if there was really a normal flip. If there is no normal flip we have - // a false positive. - // False-positives can occur if the mesh structure has some defects which let the region-grow - // algorithm fail to detect the faces with wrong orientation. + // All faces with wrong orientation (i.e. adjacent faces with a normal flip and their + // neighbours) build a segment and are marked as TMP0. Now we check all border faces of the + // segments with their correct neighbours if there was really a normal flip. If there is no + // normal flip we have a false positive. False-positives can occur if the mesh structure has + // some defects which let the region-grow algorithm fail to detect the faces with wrong + // orientation. const MeshFacetArray& rFAry = _rclMesh.GetFacets(); MeshFacetArray::_TConstIterator iBeg = rFAry.begin(); for (FacetIndex it : inds) { @@ -179,8 +186,9 @@ std::vector MeshEvalOrientation::GetIndices() const { FacetIndex ulStartFacet, ulVisited; - if (_rclMesh.CountFacets() == 0) + if (_rclMesh.CountFacets() == 0) { return {}; + } // reset VISIT flags MeshAlgorithm cAlg(_rclMesh); @@ -197,18 +205,18 @@ std::vector MeshEvalOrientation::GetIndices() const std::vector uIndices, uComplement; MeshOrientationCollector clHarmonizer(uIndices, uComplement); - while (ulStartFacet != FACET_INDEX_MAX) { + while (ulStartFacet != FACET_INDEX_MAX) { unsigned long wrongFacets = uIndices.size(); uComplement.clear(); - uComplement.push_back( ulStartFacet ); + uComplement.push_back(ulStartFacet); ulVisited = _rclMesh.VisitNeighbourFacets(clHarmonizer, ulStartFacet) + 1; // In the currently visited component we have found less than 40% as correct // oriented and the rest as false oriented. So, we decide that it should be the other // way round and swap the indices of this component. - if (uComplement.size() < static_cast(0.4f*static_cast(ulVisited))) { - uIndices.erase(uIndices.begin()+wrongFacets, uIndices.end()); + if (uComplement.size() < static_cast(0.4f * static_cast(ulVisited))) { + uIndices.erase(uIndices.begin() + wrongFacets, uIndices.end()); uIndices.insert(uIndices.end(), uComplement.begin(), uComplement.end()); } @@ -220,10 +228,12 @@ std::vector MeshEvalOrientation::GetIndices() const return flag(f, MeshFacet::VISIT); }); - if (iTri < iEnd) + if (iTri < iEnd) { ulStartFacet = iTri - iBeg; - else + } + else { ulStartFacet = FACET_INDEX_MAX; + } } // in some very rare cases where we have some strange artifacts in the mesh structure @@ -241,27 +251,31 @@ std::vector MeshEvalOrientation::GetIndices() const std::sort(falsePos.begin(), falsePos.end()); std::vector diff; - std::back_insert_iterator > biit(diff); - std::set_difference(uIndices.begin(), uIndices.end(), falsePos.begin(), falsePos.end(), biit); + std::back_insert_iterator> biit(diff); + std::set_difference(uIndices.begin(), + uIndices.end(), + falsePos.begin(), + falsePos.end(), + biit); uIndices = diff; cAlg.ResetFacetFlag(MeshFacet::TMP0); cAlg.SetFacetsFlag(uIndices, MeshFacet::TMP0); FacetIndex current = ulStartFacet; ulStartFacet = HasFalsePositives(uIndices); - if (current == ulStartFacet) - break; // avoid an endless loop + if (current == ulStartFacet) { + break; // avoid an endless loop + } } return uIndices; } -MeshFixOrientation::MeshFixOrientation (MeshKernel& rclM) - : MeshValidation( rclM ) -{ -} +MeshFixOrientation::MeshFixOrientation(MeshKernel& rclM) + : MeshValidation(rclM) +{} -bool MeshFixOrientation::Fixup () +bool MeshFixOrientation::Fixup() { MeshTopoAlgorithm(_rclMesh).HarmonizeNormals(); return MeshEvalOrientation(_rclMesh).Evaluate(); @@ -269,27 +283,27 @@ bool MeshFixOrientation::Fixup () // ---------------------------------------------------- -MeshEvalSolid::MeshEvalSolid (const MeshKernel& rclM) - :MeshEvaluation( rclM ) -{ -} +MeshEvalSolid::MeshEvalSolid(const MeshKernel& rclM) + : MeshEvaluation(rclM) +{} -bool MeshEvalSolid::Evaluate () +bool MeshEvalSolid::Evaluate() { - std::vector edges; - _rclMesh.GetEdges( edges ); - for (const auto & it : edges) - { - if (it._bBorder) - return false; - } + std::vector edges; + _rclMesh.GetEdges(edges); + for (const auto& it : edges) { + if (it._bBorder) { + return false; + } + } - return true; + return true; } // ---------------------------------------------------- -namespace MeshCore { +namespace MeshCore +{ struct Edge_Index { @@ -301,27 +315,31 @@ struct Edge_Less { bool operator()(const Edge_Index& x, const Edge_Index& y) const { - if (x.p0 < y.p0) + if (x.p0 < y.p0) { return true; - else if (x.p0 > y.p0) + } + else if (x.p0 > y.p0) { return false; - else if (x.p1 < y.p1) + } + else if (x.p1 < y.p1) { return true; - else if (x.p1 > y.p1) + } + else if (x.p1 > y.p1) { return false; + } return false; } }; -} +} // namespace MeshCore -bool MeshEvalTopology::Evaluate () +bool MeshEvalTopology::Evaluate() { // Using and sorting a vector seems to be faster and more memory-efficient // than a map. const MeshFacetArray& rclFAry = _rclMesh.GetFacets(); std::vector edges; - edges.reserve(3*rclFAry.size()); + edges.reserve(3 * rclFAry.size()); // build up an array of edges MeshFacetArray::_TConstIterator pI; @@ -329,9 +347,9 @@ bool MeshEvalTopology::Evaluate () for (pI = rclFAry.begin(); pI != rclFAry.end(); ++pI) { for (int i = 0; i < 3; i++) { Edge_Index item; - item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.f = pI - rclFAry.begin(); + item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.f = pI - rclFAry.begin(); edges.push_back(item); } @@ -373,7 +391,7 @@ bool MeshEvalTopology::Evaluate () } // generate indexed edge list which tangents non-manifolds -void MeshEvalTopology::GetFacetManifolds (std::vector &raclFacetIndList) const +void MeshEvalTopology::GetFacetManifolds(std::vector& raclFacetIndList) const { raclFacetIndList.clear(); const MeshFacetArray& rclFAry = _rclMesh.GetFacets(); @@ -381,12 +399,14 @@ void MeshEvalTopology::GetFacetManifolds (std::vector &raclFacetIndL for (pI = rclFAry.begin(); pI != rclFAry.end(); ++pI) { for (int i = 0; i < 3; i++) { - PointIndex ulPt0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - PointIndex ulPt1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - std::pair edge = std::make_pair(ulPt0, ulPt1); + PointIndex ulPt0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + PointIndex ulPt1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + std::pair edge = std::make_pair(ulPt0, ulPt1); - if (std::find(nonManifoldList.begin(), nonManifoldList.end(), edge) != nonManifoldList.end()) + if (std::find(nonManifoldList.begin(), nonManifoldList.end(), edge) + != nonManifoldList.end()) { raclFacetIndList.push_back(pI - rclFAry.begin()); + } } } } @@ -396,7 +416,7 @@ unsigned long MeshEvalTopology::CountManifolds() const return nonManifoldList.size(); } -bool MeshFixTopology::Fixup () +bool MeshFixTopology::Fixup() { #if 0 MeshEvalTopology eval(_rclMesh); @@ -411,30 +431,35 @@ bool MeshFixTopology::Fixup () } #else const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - deletedFaces.reserve(3 * nonManifoldList.size()); // allocate some memory + deletedFaces.reserve(3 * nonManifoldList.size()); // allocate some memory for (const auto& it : nonManifoldList) { std::vector non_mf; non_mf.reserve(it.size()); for (FacetIndex jt : it) { // facet is only connected with one edge and there causes a non-manifold unsigned short numOpenEdges = rFaces[jt].CountOpenEdges(); - if (numOpenEdges == 2) + if (numOpenEdges == 2) { non_mf.push_back(jt); - else if (rFaces[jt].IsDegenerated()) + } + else if (rFaces[jt].IsDegenerated()) { non_mf.push_back(jt); + } } // are we able to repair the non-manifold edge by not removing all facets? - if (it.size() - non_mf.size() == 2) + if (it.size() - non_mf.size() == 2) { deletedFaces.insert(deletedFaces.end(), non_mf.begin(), non_mf.end()); - else + } + else { deletedFaces.insert(deletedFaces.end(), it.begin(), it.end()); + } } if (!deletedFaces.empty()) { // remove duplicates std::sort(deletedFaces.begin(), deletedFaces.end()); - deletedFaces.erase(std::unique(deletedFaces.begin(), deletedFaces.end()), deletedFaces.end()); + deletedFaces.erase(std::unique(deletedFaces.begin(), deletedFaces.end()), + deletedFaces.end()); _rclMesh.DeleteFacets(deletedFaces); _rclMesh.RebuildNeighbours(); @@ -446,7 +471,7 @@ bool MeshFixTopology::Fixup () // --------------------------------------------------------- -bool MeshEvalPointManifolds::Evaluate () +bool MeshEvalPointManifolds::Evaluate() { this->nonManifoldPoints.clear(); this->facetsOfNonManifoldPoints.clear(); @@ -455,7 +480,7 @@ bool MeshEvalPointManifolds::Evaluate () MeshCore::MeshRefPointToFacets vf_it(_rclMesh); unsigned long ctPoints = _rclMesh.CountPoints(); - for (PointIndex index=0; index < ctPoints; index++) { + for (PointIndex index = 0; index < ctPoints; index++) { // get the local neighbourhood of the point const std::set& nf = vf_it[index]; const std::set& np = vv_it[index]; @@ -464,8 +489,9 @@ bool MeshEvalPointManifolds::Evaluate () sp = np.size(); sf = nf.size(); // for an inner point the number of adjacent points is equal to the number of shared faces - // for a boundary point the number of adjacent points is higher by one than the number of shared faces - // for a non-manifold point the number of adjacent points is higher by more than one than the number of shared faces + // for a boundary point the number of adjacent points is higher by one than the number of + // shared faces for a non-manifold point the number of adjacent points is higher by more + // than one than the number of shared faces if (sp > sf + 1) { nonManifoldPoints.push_back(index); std::vector faces; @@ -477,9 +503,9 @@ bool MeshEvalPointManifolds::Evaluate () return this->nonManifoldPoints.empty(); } -void MeshEvalPointManifolds::GetFacetIndices (std::vector &facets) const +void MeshEvalPointManifolds::GetFacetIndices(std::vector& facets) const { - std::list >::const_iterator it; + std::list>::const_iterator it; for (it = facetsOfNonManifoldPoints.begin(); it != facetsOfNonManifoldPoints.end(); ++it) { facets.insert(facets.end(), it->begin(), it->end()); } @@ -493,86 +519,86 @@ void MeshEvalPointManifolds::GetFacetIndices (std::vector &facets) c // --------------------------------------------------------- -bool MeshEvalSingleFacet::Evaluate () +bool MeshEvalSingleFacet::Evaluate() { - // get all non-manifolds - (void)MeshEvalTopology::Evaluate(); -/* - // for each (multiple) single linked facet there should - // exist two valid facets sharing the same edge - // so make facet 1 neighbour of facet 2 and vice versa - const std::vector& rclFAry = _rclMesh.GetFacets(); - std::vector::const_iterator pI; + // get all non-manifolds + (void)MeshEvalTopology::Evaluate(); + /* + // for each (multiple) single linked facet there should + // exist two valid facets sharing the same edge + // so make facet 1 neighbour of facet 2 and vice versa + const std::vector& rclFAry = _rclMesh.GetFacets(); + std::vector::const_iterator pI; - std::vector > aclMf = _aclManifoldList; - _aclManifoldList.clear(); + std::vector > aclMf = _aclManifoldList; + _aclManifoldList.clear(); - std::map, std::list > aclHits; - std::map, std::list >::iterator pEdge; + std::map, std::list > aclHits; + std::map, std::list >::iterator pEdge; - // search for single links (a non-manifold edge and two open edges) - // - // - // build edge <=> facet map - for (pI = rclFAry.begin(); pI != rclFAry.end(); ++pI) - { - for (int i = 0; i < 3; i++) - { - unsigned long ulPt0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - unsigned long ulPt1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - aclHits[std::pair(ulPt0, ulPt1)].push_front(pI - rclFAry.begin()); - } - } - - // now search for single links - for (std::vector >::const_iterator pMF = aclMf.begin(); pMF != aclMf.end(); ++pMF) - { - std::list aulManifolds; - for (std::list::const_iterator pF = pMF->begin(); pF != pMF->end(); ++pF) - { - const MeshFacet& rclF = rclFAry[*pF]; - - unsigned long ulCtNeighbours=0; - for (int i = 0; i < 3; i++) + // search for single links (a non-manifold edge and two open edges) + // + // + // build edge <=> facet map + for (pI = rclFAry.begin(); pI != rclFAry.end(); ++pI) { - unsigned long ulPt0 = std::min(rclF._aulPoints[i], rclF._aulPoints[(i+1)%3]); - unsigned long ulPt1 = std::max(rclF._aulPoints[i], rclF._aulPoints[(i+1)%3]); - std::pair clEdge(ulPt0, ulPt1); - - // number of facets sharing this edge - ulCtNeighbours += aclHits[clEdge].size(); + for (int i = 0; i < 3; i++) + { + unsigned long ulPt0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); + unsigned long ulPt1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); + aclHits[std::pair(ulPt0, ulPt1)].push_front(pI - + rclFAry.begin()); + } } - // single linked found - if (ulCtNeighbours == pMF->size() + 2) - aulManifolds.push_front(*pF); - } + // now search for single links + for (std::vector >::const_iterator pMF = aclMf.begin(); pMF != + aclMf.end(); ++pMF) + { + std::list aulManifolds; + for (std::list::const_iterator pF = pMF->begin(); pF != pMF->end(); ++pF) + { + const MeshFacet& rclF = rclFAry[*pF]; - if ( aulManifolds.size() > 0 ) - _aclManifoldList.push_back(aulManifolds); - } -*/ - return (nonManifoldList.empty()); + unsigned long ulCtNeighbours=0; + for (int i = 0; i < 3; i++) + { + unsigned long ulPt0 = std::min(rclF._aulPoints[i], + rclF._aulPoints[(i+1)%3]); unsigned long ulPt1 = std::max(rclF._aulPoints[i], + rclF._aulPoints[(i+1)%3]); std::pair clEdge(ulPt0, ulPt1); + + // number of facets sharing this edge + ulCtNeighbours += aclHits[clEdge].size(); + } + + // single linked found + if (ulCtNeighbours == pMF->size() + 2) + aulManifolds.push_front(*pF); + } + + if ( aulManifolds.size() > 0 ) + _aclManifoldList.push_back(aulManifolds); + } + */ + return (nonManifoldList.empty()); } -bool MeshFixSingleFacet::Fixup () +bool MeshFixSingleFacet::Fixup() { - std::vector aulInvalids; - for (const auto & it : _raclManifoldList) - { - for (FacetIndex it2 : it) - { - aulInvalids.push_back(it2); + std::vector aulInvalids; + for (const auto& it : _raclManifoldList) { + for (FacetIndex it2 : it) { + aulInvalids.push_back(it2); + } } - } - _rclMesh.DeleteFacets(aulInvalids); - return true; + _rclMesh.DeleteFacets(aulInvalids); + return true; } // ---------------------------------------------------------------- -bool MeshEvalSelfIntersection::Evaluate () +bool MeshEvalSelfIntersection::Evaluate() { // Contains bounding boxes for every facet std::vector boxes; @@ -590,42 +616,49 @@ bool MeshEvalSelfIntersection::Evaluate () } // Calculates the intersections - Base::SequencerLauncher seq("Checking for self-intersections...", ulGridX*ulGridY*ulGridZ); + Base::SequencerLauncher seq("Checking for self-intersections...", ulGridX * ulGridY * ulGridZ); for (clGridIter.Init(); clGridIter.More(); clGridIter.Next()) { - //Get the facet indices, belonging to the current grid unit + // Get the facet indices, belonging to the current grid unit std::vector aulGridElements; clGridIter.GetElements(aulGridElements); seq.next(); - if (aulGridElements.empty()) + if (aulGridElements.empty()) { continue; + } MeshGeomFacet facet1, facet2; Base::Vector3f pt1, pt2; - for (std::vector::iterator it = aulGridElements.begin(); it != aulGridElements.end(); ++it) { + for (std::vector::iterator it = aulGridElements.begin(); + it != aulGridElements.end(); + ++it) { const Base::BoundBox3f& box1 = boxes[*it]; cMFI.Set(*it); facet1 = *cMFI; const MeshFacet& rface1 = rFaces[*it]; for (std::vector::iterator jt = it; jt != aulGridElements.end(); ++jt) { - if (jt == it) // the identical facet + if (jt == it) { // the identical facet continue; - // If the facets share a common vertex we do not check for self-intersections because they - // could but usually do not intersect each other and the algorithm below would detect false-positives, - // otherwise + } + // If the facets share a common vertex we do not check for self-intersections + // because they could but usually do not intersect each other and the algorithm + // below would detect false-positives, otherwise const MeshFacet& rface2 = rFaces[*jt]; - if (rface1._aulPoints[0] == rface2._aulPoints[0] || - rface1._aulPoints[0] == rface2._aulPoints[1] || - rface1._aulPoints[0] == rface2._aulPoints[2]) - continue; // ignore facets sharing a common vertex - if (rface1._aulPoints[1] == rface2._aulPoints[0] || - rface1._aulPoints[1] == rface2._aulPoints[1] || - rface1._aulPoints[1] == rface2._aulPoints[2]) - continue; // ignore facets sharing a common vertex - if (rface1._aulPoints[2] == rface2._aulPoints[0] || - rface1._aulPoints[2] == rface2._aulPoints[1] || - rface1._aulPoints[2] == rface2._aulPoints[2]) - continue; // ignore facets sharing a common vertex + if (rface1._aulPoints[0] == rface2._aulPoints[0] + || rface1._aulPoints[0] == rface2._aulPoints[1] + || rface1._aulPoints[0] == rface2._aulPoints[2]) { + continue; // ignore facets sharing a common vertex + } + if (rface1._aulPoints[1] == rface2._aulPoints[0] + || rface1._aulPoints[1] == rface2._aulPoints[1] + || rface1._aulPoints[1] == rface2._aulPoints[2]) { + continue; // ignore facets sharing a common vertex + } + if (rface1._aulPoints[2] == rface2._aulPoints[0] + || rface1._aulPoints[2] == rface2._aulPoints[1] + || rface1._aulPoints[2] == rface2._aulPoints[2]) { + continue; // ignore facets sharing a common vertex + } const Base::BoundBox3f& box2 = boxes[*jt]; if (box1 && box2) { @@ -644,15 +677,16 @@ bool MeshEvalSelfIntersection::Evaluate () return true; } -void MeshEvalSelfIntersection::GetIntersections(const std::vector >& indices, - std::vector >& intersection) const +void MeshEvalSelfIntersection::GetIntersections( + const std::vector>& indices, + std::vector>& intersection) const { intersection.reserve(indices.size()); MeshFacetIterator cMF1(_rclMesh); MeshFacetIterator cMF2(_rclMesh); Base::Vector3f pt1, pt2; - std::vector >::const_iterator it; + std::vector>::const_iterator it; for (it = indices.begin(); it != indices.end(); ++it) { cMF1.Set(it->first); cMF2.Set(it->second); @@ -668,11 +702,12 @@ void MeshEvalSelfIntersection::GetIntersections(const std::vector >& intersection) const +void MeshEvalSelfIntersection::GetIntersections( + std::vector>& intersection) const { // Contains bounding boxes for every facet std::vector boxes; - //intersection.clear(); + // intersection.clear(); // Splits the mesh using grid for speeding up the calculation MeshFacetGrid cMeshFacetGrid(_rclMesh); @@ -682,47 +717,54 @@ void MeshEvalSelfIntersection::GetIntersections(std::vector aulGridElements; clGridIter.GetElements(aulGridElements); seq.next(true); - if (aulGridElements.empty()) + if (aulGridElements.empty()) { continue; + } MeshGeomFacet facet1, facet2; Base::Vector3f pt1, pt2; - for (std::vector::iterator it = aulGridElements.begin(); it != aulGridElements.end(); ++it) { + for (std::vector::iterator it = aulGridElements.begin(); + it != aulGridElements.end(); + ++it) { const Base::BoundBox3f& box1 = boxes[*it]; cMFI.Set(*it); facet1 = *cMFI; const MeshFacet& rface1 = rFaces[*it]; for (std::vector::iterator jt = it; jt != aulGridElements.end(); ++jt) { - if (jt == it) // the identical facet + if (jt == it) { // the identical facet continue; - // If the facets share a common vertex we do not check for self-intersections because they - // could but usually do not intersect each other and the algorithm below would detect false-positives, - // otherwise + } + // If the facets share a common vertex we do not check for self-intersections + // because they could but usually do not intersect each other and the algorithm + // below would detect false-positives, otherwise const MeshFacet& rface2 = rFaces[*jt]; - if (rface1._aulPoints[0] == rface2._aulPoints[0] || - rface1._aulPoints[0] == rface2._aulPoints[1] || - rface1._aulPoints[0] == rface2._aulPoints[2]) - continue; // ignore facets sharing a common vertex - if (rface1._aulPoints[1] == rface2._aulPoints[0] || - rface1._aulPoints[1] == rface2._aulPoints[1] || - rface1._aulPoints[1] == rface2._aulPoints[2]) - continue; // ignore facets sharing a common vertex - if (rface1._aulPoints[2] == rface2._aulPoints[0] || - rface1._aulPoints[2] == rface2._aulPoints[1] || - rface1._aulPoints[2] == rface2._aulPoints[2]) - continue; // ignore facets sharing a common vertex + if (rface1._aulPoints[0] == rface2._aulPoints[0] + || rface1._aulPoints[0] == rface2._aulPoints[1] + || rface1._aulPoints[0] == rface2._aulPoints[2]) { + continue; // ignore facets sharing a common vertex + } + if (rface1._aulPoints[1] == rface2._aulPoints[0] + || rface1._aulPoints[1] == rface2._aulPoints[1] + || rface1._aulPoints[1] == rface2._aulPoints[2]) { + continue; // ignore facets sharing a common vertex + } + if (rface1._aulPoints[2] == rface2._aulPoints[0] + || rface1._aulPoints[2] == rface2._aulPoints[1] + || rface1._aulPoints[2] == rface2._aulPoints[2]) { + continue; // ignore facets sharing a common vertex + } const Base::BoundBox3f& box2 = boxes[*jt]; if (box1 && box2) { @@ -730,7 +772,7 @@ void MeshEvalSelfIntersection::GetIntersections(std::vector MeshFixSelfIntersection::GetFacets() const { std::vector indices; const MeshFacetArray& rFaces = _rclMesh.GetFacets(); - for (const auto & it : selfIntersectons) { + for (const auto& it : selfIntersectons) { unsigned short numOpenEdges1 = rFaces[it.first].CountOpenEdges(); unsigned short numOpenEdges2 = rFaces[it.second].CountOpenEdges(); @@ -775,7 +817,7 @@ bool MeshFixSelfIntersection::Fixup() // ---------------------------------------------------------------- -bool MeshEvalNeighbourhood::Evaluate () +bool MeshEvalNeighbourhood::Evaluate() { // Note: If more than two facets are attached to the edge then we have a // non-manifold edge here. @@ -789,7 +831,7 @@ bool MeshEvalNeighbourhood::Evaluate () // than a map. const MeshFacetArray& rclFAry = _rclMesh.GetFacets(); std::vector edges; - edges.reserve(3*rclFAry.size()); + edges.reserve(3 * rclFAry.size()); // build up an array of edges MeshFacetArray::_TConstIterator pI; @@ -797,9 +839,9 @@ bool MeshEvalNeighbourhood::Evaluate () for (pI = rclFAry.begin(); pI != rclFAry.end(); ++pI) { for (int i = 0; i < 3; i++) { Edge_Index item; - item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.f = pI - rclFAry.begin(); + item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.f = pI - rclFAry.begin(); edges.push_back(item); } @@ -824,20 +866,21 @@ bool MeshEvalNeighbourhood::Evaluate () if (count == 2) { const MeshFacet& rFace0 = rclFAry[f0]; const MeshFacet& rFace1 = rclFAry[f1]; - unsigned short side0 = rFace0.Side(p0,p1); - unsigned short side1 = rFace1.Side(p0,p1); + unsigned short side0 = rFace0.Side(p0, p1); + unsigned short side1 = rFace1.Side(p0, p1); // Check whether rFace0 and rFace1 reference each other as // neighbours - if (rFace0._aulNeighbours[side0]!=f1 || - rFace1._aulNeighbours[side1]!=f0) + if (rFace0._aulNeighbours[side0] != f1 || rFace1._aulNeighbours[side1] != f0) { return false; + } } else if (count == 1) { const MeshFacet& rFace = rclFAry[f0]; - unsigned short side = rFace.Side(p0,p1); + unsigned short side = rFace.Side(p0, p1); // should be "open edge" but isn't marked as such - if (rFace._aulNeighbours[side] != FACET_INDEX_MAX) + if (rFace._aulNeighbours[side] != FACET_INDEX_MAX) { return false; + } } p0 = pE->p0; @@ -855,7 +898,7 @@ std::vector MeshEvalNeighbourhood::GetIndices() const std::vector inds; const MeshFacetArray& rclFAry = _rclMesh.GetFacets(); std::vector edges; - edges.reserve(3*rclFAry.size()); + edges.reserve(3 * rclFAry.size()); // build up an array of edges MeshFacetArray::_TConstIterator pI; @@ -863,9 +906,9 @@ std::vector MeshEvalNeighbourhood::GetIndices() const for (pI = rclFAry.begin(); pI != rclFAry.end(); ++pI) { for (int i = 0; i < 3; i++) { Edge_Index item; - item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.f = pI - rclFAry.begin(); + item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.f = pI - rclFAry.begin(); edges.push_back(item); } @@ -890,22 +933,22 @@ std::vector MeshEvalNeighbourhood::GetIndices() const if (count == 2) { const MeshFacet& rFace0 = rclFAry[f0]; const MeshFacet& rFace1 = rclFAry[f1]; - unsigned short side0 = rFace0.Side(p0,p1); - unsigned short side1 = rFace1.Side(p0,p1); + unsigned short side0 = rFace0.Side(p0, p1); + unsigned short side1 = rFace1.Side(p0, p1); // Check whether rFace0 and rFace1 reference each other as // neighbours - if (rFace0._aulNeighbours[side0]!=f1 || - rFace1._aulNeighbours[side1]!=f0) { + if (rFace0._aulNeighbours[side0] != f1 || rFace1._aulNeighbours[side1] != f0) { inds.push_back(f0); inds.push_back(f1); } } else if (count == 1) { const MeshFacet& rFace = rclFAry[f0]; - unsigned short side = rFace.Side(p0,p1); + unsigned short side = rFace.Side(p0, p1); // should be "open edge" but isn't marked as such - if (rFace._aulNeighbours[side] != FACET_INDEX_MAX) + if (rFace._aulNeighbours[side] != FACET_INDEX_MAX) { inds.push_back(f0); + } } p0 = pE->p0; @@ -928,7 +971,7 @@ bool MeshFixNeighbourhood::Fixup() return true; } -void MeshKernel::RebuildNeighbours (FacetIndex index) +void MeshKernel::RebuildNeighbours(FacetIndex index) { std::vector edges; edges.reserve(3 * (this->_aclFacetArray.size() - index)); @@ -939,15 +982,15 @@ void MeshKernel::RebuildNeighbours (FacetIndex index) for (pI = pB + index; pI != this->_aclFacetArray.end(); ++pI) { for (int i = 0; i < 3; i++) { Edge_Index item; - item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - item.f = pI - pB; + item.p0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.p1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + item.f = pI - pB; edges.push_back(item); } } // sort the edges - //std::sort(edges.begin(), edges.end(), Edge_Less()); + // std::sort(edges.begin(), edges.end(), Edge_Less()); int threads = QThread::idealThreadCount(); MeshCore::parallel_sort(edges.begin(), edges.end(), Edge_Less(), threads); @@ -966,14 +1009,14 @@ void MeshKernel::RebuildNeighbours (FacetIndex index) if (count == 2) { MeshFacet& rFace0 = this->_aclFacetArray[f0]; MeshFacet& rFace1 = this->_aclFacetArray[f1]; - unsigned short side0 = rFace0.Side(p0,p1); - unsigned short side1 = rFace1.Side(p0,p1); + unsigned short side0 = rFace0.Side(p0, p1); + unsigned short side1 = rFace1.Side(p0, p1); rFace0._aulNeighbours[side0] = f1; rFace1._aulNeighbours[side1] = f0; } else if (count == 1) { MeshFacet& rFace = this->_aclFacetArray[f0]; - unsigned short side = rFace.Side(p0,p1); + unsigned short side = rFace.Side(p0, p1); rFace._aulNeighbours[side] = FACET_INDEX_MAX; } @@ -989,19 +1032,19 @@ void MeshKernel::RebuildNeighbours (FacetIndex index) if (count == 2) { MeshFacet& rFace0 = this->_aclFacetArray[f0]; MeshFacet& rFace1 = this->_aclFacetArray[f1]; - unsigned short side0 = rFace0.Side(p0,p1); - unsigned short side1 = rFace1.Side(p0,p1); + unsigned short side0 = rFace0.Side(p0, p1); + unsigned short side1 = rFace1.Side(p0, p1); rFace0._aulNeighbours[side0] = f1; rFace1._aulNeighbours[side1] = f0; } else if (count == 1) { MeshFacet& rFace = this->_aclFacetArray[f0]; - unsigned short side = rFace.Side(p0,p1); + unsigned short side = rFace.Side(p0, p1); rFace._aulNeighbours[side] = FACET_INDEX_MAX; } } -void MeshKernel::RebuildNeighbours () +void MeshKernel::RebuildNeighbours() { // complete rebuild RebuildNeighbours(0); @@ -1009,8 +1052,11 @@ void MeshKernel::RebuildNeighbours () // ---------------------------------------------------------------- -MeshEigensystem::MeshEigensystem (const MeshKernel &rclB) - : MeshEvaluation(rclB), _cU(1.0f, 0.0f, 0.0f), _cV(0.0f, 1.0f, 0.0f), _cW(0.0f, 0.0f, 1.0f) +MeshEigensystem::MeshEigensystem(const MeshKernel& rclB) + : MeshEvaluation(rclB) + , _cU(1.0f, 0.0f, 0.0f) + , _cV(0.0f, 1.0f, 0.0f) + , _cW(0.0f, 0.0f, 1.0f) { // use the values of world coordinates as default Base::BoundBox3f box = _rclMesh.GetBoundBox(); @@ -1030,16 +1076,30 @@ Base::Matrix4D MeshEigensystem::Transform() const // x = Q * y - Q * c Base::Matrix4D clTMat; // rotation part - clTMat[0][0] = double(_cU.x); clTMat[0][1] = double(_cU.y); clTMat[0][2] = double(_cU.z); clTMat[0][3] = 0.0; - clTMat[1][0] = double(_cV.x); clTMat[1][1] = double(_cV.y); clTMat[1][2] = double(_cV.z); clTMat[1][3] = 0.0; - clTMat[2][0] = double(_cW.x); clTMat[2][1] = double(_cW.y); clTMat[2][2] = double(_cW.z); clTMat[2][3] = 0.0; - clTMat[3][0] = 0.0; clTMat[3][1] = 0.0; clTMat[3][2] = 0.0; clTMat[3][3] = 1.0; + clTMat[0][0] = double(_cU.x); + clTMat[0][1] = double(_cU.y); + clTMat[0][2] = double(_cU.z); + clTMat[0][3] = 0.0; + clTMat[1][0] = double(_cV.x); + clTMat[1][1] = double(_cV.y); + clTMat[1][2] = double(_cV.z); + clTMat[1][3] = 0.0; + clTMat[2][0] = double(_cW.x); + clTMat[2][1] = double(_cW.y); + clTMat[2][2] = double(_cW.z); + clTMat[2][3] = 0.0; + clTMat[3][0] = 0.0; + clTMat[3][1] = 0.0; + clTMat[3][2] = 0.0; + clTMat[3][3] = 1.0; Base::Vector3f c(_cC); c = clTMat * c; // translation part - clTMat[0][3] = double(-c.x); clTMat[1][3] = double(-c.y); clTMat[2][3] = double(-c.z); + clTMat[0][3] = double(-c.x); + clTMat[1][3] = double(-c.y); + clTMat[2][3] = double(-c.z); return clTMat; } @@ -1048,13 +1108,13 @@ bool MeshEigensystem::Evaluate() { CalculateLocalSystem(); - float xmin=0.0f, xmax=0.0f, ymin=0.0f, ymax=0.0f, zmin=0.0f, zmax=0.0f; + float xmin = 0.0f, xmax = 0.0f, ymin = 0.0f, ymax = 0.0f, zmin = 0.0f, zmax = 0.0f; Base::Vector3f clVect, clProj; float fH; - const MeshPointArray& aclPoints = _rclMesh.GetPoints (); - for (const auto & it : aclPoints) { + const MeshPointArray& aclPoints = _rclMesh.GetPoints(); + for (const auto& it : aclPoints) { // u-direction clVect = it - _cC; clProj.ProjectToLine(clVect, _cU); @@ -1062,8 +1122,9 @@ bool MeshEigensystem::Evaluate() fH = clVect.Length(); // point vectors in the same direction ? - if ((clVect * _cU) < 0.0f) + if ((clVect * _cU) < 0.0f) { fH = -fH; + } xmax = std::max(xmax, fH); xmin = std::min(xmin, fH); @@ -1075,8 +1136,9 @@ bool MeshEigensystem::Evaluate() fH = clVect.Length(); // point vectors in the same direction ? - if ((clVect * _cV) < 0.0f) - fH = -fH; + if ((clVect * _cV) < 0.0f) { + fH = -fH; + } ymax = std::max(ymax, fH); ymin = std::min(ymin, fH); @@ -1088,8 +1150,9 @@ bool MeshEigensystem::Evaluate() fH = clVect.Length(); // point vectors in the same direction ? - if ((clVect * _cW) < 0.0f) + if ((clVect * _cW) < 0.0f) { fH = -fH; + } zmax = std::max(zmax, fH); zmin = std::min(zmin, fH); @@ -1099,26 +1162,28 @@ bool MeshEigensystem::Evaluate() _fV = ymax - ymin; _fW = zmax - zmin; - return false; // to call Fixup() if needed + return false; // to call Fixup() if needed } Base::Vector3f MeshEigensystem::GetBoundings() const { - return Base::Vector3f ( _fU, _fV, _fW ); + return Base::Vector3f(_fU, _fV, _fW); } void MeshEigensystem::CalculateLocalSystem() { // at least one facet is needed - if (_rclMesh.CountFacets() < 1) - return; // cannot continue calculation + if (_rclMesh.CountFacets() < 1) { + return; // cannot continue calculation + } - const MeshPointArray& aclPoints = _rclMesh.GetPoints (); + const MeshPointArray& aclPoints = _rclMesh.GetPoints(); MeshPointArray::_TConstIterator it; PlaneFit planeFit; - for (it = aclPoints.begin(); it!=aclPoints.end(); ++it) + for (it = aclPoints.begin(); it != aclPoints.end(); ++it) { planeFit.AddPoint(*it); + } planeFit.Fit(); _cC = planeFit.GetBase(); @@ -1129,8 +1194,7 @@ void MeshEigensystem::CalculateLocalSystem() // set the sign for the vectors float fSumU, fSumV, fSumW; fSumU = fSumV = fSumW = 0.0f; - for (it = aclPoints.begin(); it!=aclPoints.end(); ++it) - { + for (it = aclPoints.begin(); it != aclPoints.end(); ++it) { float fU = _cU * (*it - _cC); float fV = _cV * (*it - _cC); float fW = _cW * (*it - _cC); @@ -1140,13 +1204,17 @@ void MeshEigensystem::CalculateLocalSystem() } // avoid ambiguities concerning directions - if (fSumU < 0.0f) + if (fSumU < 0.0f) { _cU *= -1.0f; - if (fSumV < 0.0f) + } + if (fSumV < 0.0f) { _cV *= -1.0f; - if (fSumW < 0.0f) + } + if (fSumW < 0.0f) { _cW *= -1.0f; + } - if ((_cU%_cV)*_cW < 0.0f) - _cW = -_cW; // make a right-handed system + if ((_cU % _cV) * _cW < 0.0f) { + _cW = -_cW; // make a right-handed system + } } diff --git a/src/Mod/Mesh/App/Core/Evaluation.h b/src/Mod/Mesh/App/Core/Evaluation.h index 4d0bc52400..366e152e8f 100644 --- a/src/Mod/Mesh/App/Core/Evaluation.h +++ b/src/Mod/Mesh/App/Core/Evaluation.h @@ -30,7 +30,8 @@ #include "Visitor.h" -namespace MeshCore { +namespace MeshCore +{ /** * The MeshEvaluation class checks the mesh kernel for correctness with respect to a @@ -44,18 +45,20 @@ namespace MeshCore { class MeshExport MeshEvaluation { public: - explicit MeshEvaluation (const MeshKernel &rclB) : _rclMesh(rclB) {} - virtual ~MeshEvaluation () = default; + explicit MeshEvaluation(const MeshKernel& rclB) + : _rclMesh(rclB) + {} + virtual ~MeshEvaluation() = default; - /** - * Evaluates the mesh kernel with respect to certain criteria. Must be reimplemented by every - * subclass. This pure virtual function returns false if the mesh kernel is invalid according - * to this criterion and true if the mesh kernel is correct. - */ - virtual bool Evaluate () = 0; + /** + * Evaluates the mesh kernel with respect to certain criteria. Must be reimplemented by every + * subclass. This pure virtual function returns false if the mesh kernel is invalid according + * to this criterion and true if the mesh kernel is correct. + */ + virtual bool Evaluate() = 0; protected: - const MeshKernel& _rclMesh; /**< Mesh kernel */ + const MeshKernel& _rclMesh; /**< Mesh kernel */ }; // ---------------------------------------------------- @@ -70,17 +73,19 @@ protected: class MeshExport MeshValidation { public: - explicit MeshValidation (MeshKernel &rclB) : _rclMesh(rclB) {} - virtual ~MeshValidation () = default; + explicit MeshValidation(MeshKernel& rclB) + : _rclMesh(rclB) + {} + virtual ~MeshValidation() = default; - /** - * This function attempts to change the mesh kernel to be valid according to the checked - * criterion: True is returned if the errors could be fixed, false otherwise. - */ - virtual bool Fixup() = 0; + /** + * This function attempts to change the mesh kernel to be valid according to the checked + * criterion: True is returned if the errors could be fixed, false otherwise. + */ + virtual bool Fixup() = 0; protected: - MeshKernel& _rclMesh; /**< Mesh kernel */ + MeshKernel& _rclMesh; /**< Mesh kernel */ }; // ---------------------------------------------------- @@ -89,17 +94,17 @@ protected: * This class searches for nonuniform orientation of neighboured facets. * @author Werner Mayer */ -class MeshExport MeshOrientationVisitor : public MeshFacetVisitor +class MeshExport MeshOrientationVisitor: public MeshFacetVisitor { public: MeshOrientationVisitor(); /** Returns false after the first inconsistence is found, true otherwise. */ - bool Visit (const MeshFacet &, const MeshFacet &, FacetIndex , unsigned long ) override; + bool Visit(const MeshFacet&, const MeshFacet&, FacetIndex, unsigned long) override; bool HasNonUnifomOrientedFacets() const; private: - bool _nonuniformOrientation{false}; + bool _nonuniformOrientation {false}; }; /** @@ -107,14 +112,14 @@ private: * Note: The 'TMP0' flag for facets must be reset before using this class. * @author Werner Mayer */ -class MeshExport MeshOrientationCollector : public MeshOrientationVisitor +class MeshExport MeshOrientationCollector: public MeshOrientationVisitor { public: MeshOrientationCollector(std::vector& aulIndices, std::vector& aulComplement); /** Returns always true and collects the indices with wrong orientation. */ - bool Visit (const MeshFacet &, const MeshFacet &, FacetIndex , unsigned long) override; + bool Visit(const MeshFacet&, const MeshFacet&, FacetIndex, unsigned long) override; private: std::vector& _aulIndices; @@ -124,12 +129,12 @@ private: /** * @author Werner Mayer */ -class MeshExport MeshSameOrientationCollector : public MeshOrientationVisitor +class MeshExport MeshSameOrientationCollector: public MeshOrientationVisitor { public: explicit MeshSameOrientationCollector(std::vector& aulIndices); /** Returns always true and collects the indices with wrong orientation. */ - bool Visit (const MeshFacet &, const MeshFacet &, FacetIndex , unsigned long) override; + bool Visit(const MeshFacet&, const MeshFacet&, FacetIndex, unsigned long) override; private: std::vector& _aulIndices; @@ -139,11 +144,11 @@ private: * The MeshEvalOrientation class checks the mesh kernel for consistent facet normals. * @author Werner Mayer */ -class MeshExport MeshEvalOrientation : public MeshEvaluation +class MeshExport MeshEvalOrientation: public MeshEvaluation { public: - explicit MeshEvalOrientation (const MeshKernel& rclM); - bool Evaluate () override; + explicit MeshEvalOrientation(const MeshKernel& rclM); + bool Evaluate() override; std::vector GetIndices() const; private: @@ -154,10 +159,10 @@ private: * The MeshFixOrientation class harmonizes the facet normals of the passed mesh kernel. * @author Werner Mayer */ -class MeshExport MeshFixOrientation : public MeshValidation +class MeshExport MeshFixOrientation: public MeshValidation { public: - explicit MeshFixOrientation (MeshKernel& rclM); + explicit MeshFixOrientation(MeshKernel& rclM); bool Fixup() override; }; @@ -167,11 +172,11 @@ public: * The MeshEvalSolid class checks if the mesh represents a solid. * @author Werner Mayer */ -class MeshExport MeshEvalSolid : public MeshEvaluation +class MeshExport MeshEvalSolid: public MeshEvaluation { public: - explicit MeshEvalSolid (const MeshKernel& rclM); - bool Evaluate () override; + explicit MeshEvalSolid(const MeshKernel& rclM); + bool Evaluate() override; }; // ---------------------------------------------------- @@ -182,38 +187,51 @@ public: * non-manifold if it is shared by more than two facets. * @note This check does not necessarily cover any degenerations. */ -class MeshExport MeshEvalTopology : public MeshEvaluation +class MeshExport MeshEvalTopology: public MeshEvaluation { public: - explicit MeshEvalTopology (const MeshKernel &rclB) : MeshEvaluation(rclB) {} - bool Evaluate () override; + explicit MeshEvalTopology(const MeshKernel& rclB) + : MeshEvaluation(rclB) + {} + bool Evaluate() override; - void GetFacetManifolds (std::vector &raclFacetIndList) const; + void GetFacetManifolds(std::vector& raclFacetIndList) const; unsigned long CountManifolds() const; - const std::vector >& GetIndices() const { return nonManifoldList; } - const std::list >& GetFacets() const { return nonManifoldFacets; } + const std::vector>& GetIndices() const + { + return nonManifoldList; + } + const std::list>& GetFacets() const + { + return nonManifoldFacets; + } protected: - std::vector > nonManifoldList; - std::list > nonManifoldFacets; + std::vector> nonManifoldList; + std::list> nonManifoldFacets; }; /** * The MeshFixTopology class tries to fix a few cases of non-manifolds. * @see MeshEvalTopology */ -class MeshExport MeshFixTopology : public MeshValidation +class MeshExport MeshFixTopology: public MeshValidation { public: - MeshFixTopology (MeshKernel &rclB, const std::list >& mf) - : MeshValidation(rclB), nonManifoldList(mf) {} + MeshFixTopology(MeshKernel& rclB, const std::list>& mf) + : MeshValidation(rclB) + , nonManifoldList(mf) + {} bool Fixup() override; - const std::vector& GetDeletedFaces() const { return deletedFaces; } + const std::vector& GetDeletedFaces() const + { + return deletedFaces; + } protected: std::vector deletedFaces; - const std::list >& nonManifoldList; + const std::list>& nonManifoldList; }; // ---------------------------------------------------- @@ -224,20 +242,31 @@ protected: * the point but are not topologically connected over a common edge. * Such mesh defects can lead to some very ugly folds on the surface. */ -class MeshExport MeshEvalPointManifolds : public MeshEvaluation +class MeshExport MeshEvalPointManifolds: public MeshEvaluation { public: - explicit MeshEvalPointManifolds (const MeshKernel &rclB) : MeshEvaluation(rclB) {} - bool Evaluate () override; + explicit MeshEvalPointManifolds(const MeshKernel& rclB) + : MeshEvaluation(rclB) + {} + bool Evaluate() override; - void GetFacetIndices (std::vector &facets) const; - const std::list >& GetFacetIndices () const { return facetsOfNonManifoldPoints; } - const std::vector& GetIndices() const { return nonManifoldPoints; } - unsigned long CountManifolds() const { return static_cast(nonManifoldPoints.size()); } + void GetFacetIndices(std::vector& facets) const; + const std::list>& GetFacetIndices() const + { + return facetsOfNonManifoldPoints; + } + const std::vector& GetIndices() const + { + return nonManifoldPoints; + } + unsigned long CountManifolds() const + { + return static_cast(nonManifoldPoints.size()); + } protected: std::vector nonManifoldPoints; - std::list > facetsOfNonManifoldPoints; + std::list> facetsOfNonManifoldPoints; }; // ---------------------------------------------------- @@ -249,26 +278,30 @@ protected: * at their other edges. * Such facets can just be removed from the mesh. */ -class MeshExport MeshEvalSingleFacet : public MeshEvalTopology +class MeshExport MeshEvalSingleFacet: public MeshEvalTopology { public: - explicit MeshEvalSingleFacet (const MeshKernel &rclB) : MeshEvalTopology(rclB) {} - bool Evaluate () override; + explicit MeshEvalSingleFacet(const MeshKernel& rclB) + : MeshEvalTopology(rclB) + {} + bool Evaluate() override; }; /** * The MeshFixSingleFacet class tries to fix a special case of non-manifolds. * @see MeshEvalSingleFacet */ -class MeshExport MeshFixSingleFacet : public MeshValidation +class MeshExport MeshFixSingleFacet: public MeshValidation { public: - MeshFixSingleFacet (MeshKernel &rclB, const std::vector >& mf) - : MeshValidation(rclB), _raclManifoldList(mf) {} - bool Fixup() override; + MeshFixSingleFacet(MeshKernel& rclB, const std::vector>& mf) + : MeshValidation(rclB) + , _raclManifoldList(mf) + {} + bool Fixup() override; protected: - const std::vector >& _raclManifoldList; + const std::vector>& _raclManifoldList; }; // ---------------------------------------------------- @@ -277,33 +310,38 @@ protected: * The MeshEvalSelfIntersection class checks the mesh for self intersection. * @author Werner Mayer */ -class MeshExport MeshEvalSelfIntersection : public MeshEvaluation +class MeshExport MeshEvalSelfIntersection: public MeshEvaluation { public: - explicit MeshEvalSelfIntersection (const MeshKernel &rclB) : MeshEvaluation(rclB) {} + explicit MeshEvalSelfIntersection(const MeshKernel& rclB) + : MeshEvaluation(rclB) + {} /// Evaluate the mesh and return if true if there are self intersections - bool Evaluate () override; + bool Evaluate() override; /// collect all intersection lines - void GetIntersections(const std::vector >&, - std::vector >&) const; + void GetIntersections(const std::vector>&, + std::vector>&) const; /// collect the index of all facets with self intersections - void GetIntersections(std::vector >&) const; + void GetIntersections(std::vector>&) const; }; /** * The MeshFixSelfIntersection class tries to fix self-intersections. * @see MeshEvalSingleFacet */ -class MeshExport MeshFixSelfIntersection : public MeshValidation +class MeshExport MeshFixSelfIntersection: public MeshValidation { public: - MeshFixSelfIntersection (MeshKernel &rclB, const std::vector >& si) - : MeshValidation(rclB), selfIntersectons(si) {} + MeshFixSelfIntersection(MeshKernel& rclB, + const std::vector>& si) + : MeshValidation(rclB) + , selfIntersectons(si) + {} std::vector GetFacets() const; bool Fixup() override; private: - const std::vector >& selfIntersectons; + const std::vector>& selfIntersectons; }; // ---------------------------------------------------- @@ -313,23 +351,27 @@ private: * set correctly. * @author Werner Mayer */ -class MeshExport MeshEvalNeighbourhood : public MeshEvaluation +class MeshExport MeshEvalNeighbourhood: public MeshEvaluation { public: - explicit MeshEvalNeighbourhood (const MeshKernel &rclB) : MeshEvaluation(rclB) {} - bool Evaluate () override; - std::vector GetIndices() const; + explicit MeshEvalNeighbourhood(const MeshKernel& rclB) + : MeshEvaluation(rclB) + {} + bool Evaluate() override; + std::vector GetIndices() const; }; /** * The MeshFixNeighbourhood class fixes the neighbourhood of the facets. * @author Werner Mayer */ -class MeshExport MeshFixNeighbourhood : public MeshValidation +class MeshExport MeshFixNeighbourhood: public MeshValidation { public: - explicit MeshFixNeighbourhood (MeshKernel &rclB) : MeshValidation(rclB) {} - bool Fixup() override; + explicit MeshFixNeighbourhood(MeshKernel& rclB) + : MeshValidation(rclB) + {} + bool Fixup() override; }; // ---------------------------------------------------- @@ -342,31 +384,32 @@ public: * expansion. The local coordinate system is right-handed. * @author Werner Mayer */ -class MeshExport MeshEigensystem : public MeshEvaluation +class MeshExport MeshEigensystem: public MeshEvaluation { public: - explicit MeshEigensystem (const MeshKernel &rclB); + explicit MeshEigensystem(const MeshKernel& rclB); - /** Returns the transformation matrix. */ - Base::Matrix4D Transform() const; - /** - * Returns the expansions in \a u, \a v and \a w of the bounding box. - */ - Base::Vector3f GetBoundings() const; + /** Returns the transformation matrix. */ + Base::Matrix4D Transform() const; + /** + * Returns the expansions in \a u, \a v and \a w of the bounding box. + */ + Base::Vector3f GetBoundings() const; - bool Evaluate() override; - /** - * Calculates the local coordinate system defined by \a u, \a v, \a w - * and \a c. - */ + bool Evaluate() override; + /** + * Calculates the local coordinate system defined by \a u, \a v, \a w + * and \a c. + */ protected: - void CalculateLocalSystem(); + void CalculateLocalSystem(); private: - Base::Vector3f _cU, _cV, _cW, _cC; /**< Vectors that define the local coordinate system. */ - float _fU, _fV, _fW; /**< Expansion in \a u, \a v, and \a w direction of the transformed mesh. */ + Base::Vector3f _cU, _cV, _cW, _cC; /**< Vectors that define the local coordinate system. */ + float _fU, _fV, + _fW; /**< Expansion in \a u, \a v, and \a w direction of the transformed mesh. */ }; -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_EVALUATION_H +#endif // MESH_EVALUATION_H diff --git a/src/Mod/Mesh/App/Core/Functional.h b/src/Mod/Mesh/App/Core/Functional.h index cf71a8dd09..d33a1cdda6 100644 --- a/src/Mod/Mesh/App/Core/Functional.h +++ b/src/Mod/Mesh/App/Core/Functional.h @@ -23,41 +23,40 @@ #ifndef MESH_FUNCTIONAL_H #define MESH_FUNCTIONAL_H -#include -#include #include +#include +#include namespace MeshCore { - template - static void parallel_sort(Iter begin, Iter end, Pred comp, int threads) - { - if (threads < 2 || end - begin < 2) - { - std::sort(begin, end, comp); - } - else - { - Iter mid = begin + (end - begin) / 2; - if (threads == 2) - { - QFuture future = QtConcurrent::run(parallel_sort, begin, mid, comp, threads / 2); - std::sort(mid, end, comp); - future.waitForFinished(); - } - else - { - QFuture a = QtConcurrent::run(parallel_sort, begin, mid, comp, threads / 2); - QFuture b = QtConcurrent::run(parallel_sort, mid, end, comp, threads / 2); - a.waitForFinished(); - b.waitForFinished(); - } - std::inplace_merge(begin, mid, end, comp); - } +template +static void parallel_sort(Iter begin, Iter end, Pred comp, int threads) +{ + if (threads < 2 || end - begin < 2) { + std::sort(begin, end, comp); } + else { + Iter mid = begin + (end - begin) / 2; + if (threads == 2) { + QFuture future = + QtConcurrent::run(parallel_sort, begin, mid, comp, threads / 2); + std::sort(mid, end, comp); + future.waitForFinished(); + } + else { + QFuture a = + QtConcurrent::run(parallel_sort, begin, mid, comp, threads / 2); + QFuture b = + QtConcurrent::run(parallel_sort, mid, end, comp, threads / 2); + a.waitForFinished(); + b.waitForFinished(); + } + std::inplace_merge(begin, mid, end, comp); + } +} -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_FUNCTIONAL_H diff --git a/src/Mod/Mesh/App/Core/Grid.cpp b/src/Mod/Mesh/App/Core/Grid.cpp index 1a4dc27db0..0ad39efa4e 100644 --- a/src/Mod/Mesh/App/Core/Grid.cpp +++ b/src/Mod/Mesh/App/Core/Grid.cpp @@ -23,241 +23,272 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif -#include "Grid.h" #include "Algorithm.h" +#include "Grid.h" #include "Iterator.h" #include "MeshKernel.h" using namespace MeshCore; -MeshGrid::MeshGrid (const MeshKernel &rclM) -: _pclMesh(&rclM), - _ulCtElements(0), - _ulCtGridsX(0), _ulCtGridsY(0), _ulCtGridsZ(0), - _fGridLenX(0.0f), _fGridLenY(0.0f), _fGridLenZ(0.0f), - _fMinX(0.0f), _fMinY(0.0f), _fMinZ(0.0f) +MeshGrid::MeshGrid(const MeshKernel& rclM) + : _pclMesh(&rclM) + , _ulCtElements(0) + , _ulCtGridsX(0) + , _ulCtGridsY(0) + , _ulCtGridsZ(0) + , _fGridLenX(0.0f) + , _fGridLenY(0.0f) + , _fGridLenZ(0.0f) + , _fMinX(0.0f) + , _fMinY(0.0f) + , _fMinZ(0.0f) +{} + +MeshGrid::MeshGrid() + : _pclMesh(nullptr) + , _ulCtElements(0) + , _ulCtGridsX(MESH_CT_GRID) + , _ulCtGridsY(MESH_CT_GRID) + , _ulCtGridsZ(MESH_CT_GRID) + , _fGridLenX(0.0f) + , _fGridLenY(0.0f) + , _fGridLenZ(0.0f) + , _fMinX(0.0f) + , _fMinY(0.0f) + , _fMinZ(0.0f) +{} + +void MeshGrid::Attach(const MeshKernel& rclM) { + _pclMesh = &rclM; + RebuildGrid(); } -MeshGrid::MeshGrid () -: _pclMesh(nullptr), - _ulCtElements(0), - _ulCtGridsX(MESH_CT_GRID), _ulCtGridsY(MESH_CT_GRID), _ulCtGridsZ(MESH_CT_GRID), - _fGridLenX(0.0f), _fGridLenY(0.0f), _fGridLenZ(0.0f), - _fMinX(0.0f), _fMinY(0.0f), _fMinZ(0.0f) +void MeshGrid::Clear() { + _aulGrid.clear(); + _pclMesh = nullptr; } -void MeshGrid::Attach (const MeshKernel &rclM) +void MeshGrid::Rebuild(unsigned long ulX, unsigned long ulY, unsigned long ulZ) { - _pclMesh = &rclM; - RebuildGrid(); + _ulCtGridsX = ulX; + _ulCtGridsY = ulY; + _ulCtGridsZ = ulZ; + _ulCtElements = HasElements(); + RebuildGrid(); } -void MeshGrid::Clear () +void MeshGrid::Rebuild(unsigned long ulPerGrid, unsigned long ulMaxGrid) { - _aulGrid.clear(); - _pclMesh = nullptr; + _ulCtElements = HasElements(); + CalculateGridLength(ulPerGrid, ulMaxGrid); + RebuildGrid(); } -void MeshGrid::Rebuild (unsigned long ulX, unsigned long ulY, unsigned long ulZ) +void MeshGrid::Rebuild(int iCtGridPerAxis) { - _ulCtGridsX = ulX; - _ulCtGridsY = ulY; - _ulCtGridsZ = ulZ; - _ulCtElements = HasElements(); - RebuildGrid(); + _ulCtElements = HasElements(); + CalculateGridLength(iCtGridPerAxis); + RebuildGrid(); } -void MeshGrid::Rebuild (unsigned long ulPerGrid, unsigned long ulMaxGrid) +void MeshGrid::InitGrid() { - _ulCtElements = HasElements(); - CalculateGridLength(ulPerGrid, ulMaxGrid); - RebuildGrid(); -} + assert(_pclMesh); -void MeshGrid::Rebuild (int iCtGridPerAxis) -{ - _ulCtElements = HasElements(); - CalculateGridLength(iCtGridPerAxis); - RebuildGrid(); -} + unsigned long i, j; -void MeshGrid::InitGrid () -{ - assert(_pclMesh); - - unsigned long i, j; - - // Calculate grid length if not initialised - // - if ((_ulCtGridsX == 0) || (_ulCtGridsY == 0) || (_ulCtGridsZ == 0)) - CalculateGridLength(MESH_CT_GRID, MESH_MAX_GRIDS); - - // Determine grid length and offset - // - { - Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); - - float fLengthX = clBBMesh.LengthX(); - float fLengthY = clBBMesh.LengthY(); - float fLengthZ = clBBMesh.LengthZ(); - - { - // Offset fGridLen/2 + // Calculate grid length if not initialised // - _fGridLenX = (1.0f + fLengthX) / float(_ulCtGridsX); - _fMinX = clBBMesh.MinX - 0.5f; - } - - { - _fGridLenY = (1.0f + fLengthY) / float(_ulCtGridsY); - _fMinY = clBBMesh.MinY - 0.5f; - } - - { - _fGridLenZ = (1.0f + fLengthZ) / float(_ulCtGridsZ); - _fMinZ = clBBMesh.MinZ - 0.5f; - } - } - - // Create data structure - _aulGrid.clear(); - _aulGrid.resize(_ulCtGridsX); - for (i = 0; i < _ulCtGridsX; i++) - { - _aulGrid[i].resize(_ulCtGridsY); - for (j = 0; j < _ulCtGridsY; j++) - _aulGrid[i][j].resize(_ulCtGridsZ); - } -} - -unsigned long MeshGrid::Inside (const Base::BoundBox3f &rclBB, std::vector &raulElements, - bool bDelDoubles) const -{ - unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - - raulElements.clear(); - - // Grid boxes for a more detailed selection - Position(Base::Vector3f(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); - Position(Base::Vector3f(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); - - for (i = ulMinX; i <= ulMaxX; i++) - { - for (j = ulMinY; j <= ulMaxY; j++) - { - for (k = ulMinZ; k <= ulMaxZ; k++) - { - raulElements.insert(raulElements.end(), _aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); - } + if ((_ulCtGridsX == 0) || (_ulCtGridsY == 0) || (_ulCtGridsZ == 0)) { + CalculateGridLength(MESH_CT_GRID, MESH_MAX_GRIDS); } - } - if (bDelDoubles) - { - // remove duplicate mentions - std::sort(raulElements.begin(), raulElements.end()); - raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), raulElements.end()); - } - - return raulElements.size(); -} - -unsigned long MeshGrid::Inside (const Base::BoundBox3f &rclBB, std::vector &raulElements, - const Base::Vector3f &rclOrg, float fMaxDist, bool bDelDoubles) const -{ - unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - float fGridDiag = GetBoundBox(0, 0, 0).CalcDiagonalLength(); - float fMinDistP2 = (fGridDiag * fGridDiag) + (fMaxDist * fMaxDist); - - raulElements.clear(); - - // Grid boxes for a more detailed selection - Position(Base::Vector3f(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); - Position(Base::Vector3f(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); - - for (i = ulMinX; i <= ulMaxX; i++) - { - for (j = ulMinY; j <= ulMaxY; j++) + // Determine grid length and offset + // { - for (k = ulMinZ; k <= ulMaxZ; k++) - { - if (Base::DistanceP2(GetBoundBox(i, j, k).GetCenter(), rclOrg) < fMinDistP2) - raulElements.insert(raulElements.end(), _aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); - } + Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); + + float fLengthX = clBBMesh.LengthX(); + float fLengthY = clBBMesh.LengthY(); + float fLengthZ = clBBMesh.LengthZ(); + + { + // Offset fGridLen/2 + // + _fGridLenX = (1.0f + fLengthX) / float(_ulCtGridsX); + _fMinX = clBBMesh.MinX - 0.5f; + } + + { + _fGridLenY = (1.0f + fLengthY) / float(_ulCtGridsY); + _fMinY = clBBMesh.MinY - 0.5f; + } + + { + _fGridLenZ = (1.0f + fLengthZ) / float(_ulCtGridsZ); + _fMinZ = clBBMesh.MinZ - 0.5f; + } } - } - if (bDelDoubles) - { - // remove duplicate mentions - std::sort(raulElements.begin(), raulElements.end()); - raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), raulElements.end()); - } - - return raulElements.size(); -} - -unsigned long MeshGrid::Inside (const Base::BoundBox3f &rclBB, std::set &raulElements) const -{ - unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - - raulElements.clear(); - - // Grid boxes for a more detailed selection - Position(Base::Vector3f(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); - Position(Base::Vector3f(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); - - for (i = ulMinX; i <= ulMaxX; i++) - { - for (j = ulMinY; j <= ulMaxY; j++) - { - for (k = ulMinZ; k <= ulMaxZ; k++) - { - raulElements.insert(_aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); - } + // Create data structure + _aulGrid.clear(); + _aulGrid.resize(_ulCtGridsX); + for (i = 0; i < _ulCtGridsX; i++) { + _aulGrid[i].resize(_ulCtGridsY); + for (j = 0; j < _ulCtGridsY; j++) { + _aulGrid[i][j].resize(_ulCtGridsZ); + } } - } - - return raulElements.size(); } -bool MeshGrid::CheckPosition (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const +unsigned long MeshGrid::Inside(const Base::BoundBox3f& rclBB, + std::vector& raulElements, + bool bDelDoubles) const { - rulX = static_cast((rclPoint.x - _fMinX) / _fGridLenX); - rulY = static_cast((rclPoint.y - _fMinY) / _fGridLenY); - rulZ = static_cast((rclPoint.z - _fMinZ) / _fGridLenZ); + unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; - if ( (rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ) ) - return true; + raulElements.clear(); - return false; + // Grid boxes for a more detailed selection + Position(Base::Vector3f(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); + Position(Base::Vector3f(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); + + for (i = ulMinX; i <= ulMaxX; i++) { + for (j = ulMinY; j <= ulMaxY; j++) { + for (k = ulMinZ; k <= ulMaxZ; k++) { + raulElements.insert(raulElements.end(), + _aulGrid[i][j][k].begin(), + _aulGrid[i][j][k].end()); + } + } + } + + if (bDelDoubles) { + // remove duplicate mentions + std::sort(raulElements.begin(), raulElements.end()); + raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), + raulElements.end()); + } + + return raulElements.size(); } -void MeshGrid::Position (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const +unsigned long MeshGrid::Inside(const Base::BoundBox3f& rclBB, + std::vector& raulElements, + const Base::Vector3f& rclOrg, + float fMaxDist, + bool bDelDoubles) const { - if (rclPoint.x <= _fMinX) - rulX = 0; - else - rulX = std::min(static_cast((rclPoint.x - _fMinX) / _fGridLenX), _ulCtGridsX - 1); + unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; + float fGridDiag = GetBoundBox(0, 0, 0).CalcDiagonalLength(); + float fMinDistP2 = (fGridDiag * fGridDiag) + (fMaxDist * fMaxDist); - if (rclPoint.y <= _fMinY) - rulY = 0; - else - rulY = std::min(static_cast((rclPoint.y - _fMinY) / _fGridLenY), _ulCtGridsY - 1); + raulElements.clear(); - if (rclPoint.z <= _fMinZ) - rulZ = 0; - else - rulZ = std::min(static_cast((rclPoint.z - _fMinZ) / _fGridLenZ), _ulCtGridsZ - 1); + // Grid boxes for a more detailed selection + Position(Base::Vector3f(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); + Position(Base::Vector3f(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); + + for (i = ulMinX; i <= ulMaxX; i++) { + for (j = ulMinY; j <= ulMaxY; j++) { + for (k = ulMinZ; k <= ulMaxZ; k++) { + if (Base::DistanceP2(GetBoundBox(i, j, k).GetCenter(), rclOrg) < fMinDistP2) { + raulElements.insert(raulElements.end(), + _aulGrid[i][j][k].begin(), + _aulGrid[i][j][k].end()); + } + } + } + } + + if (bDelDoubles) { + // remove duplicate mentions + std::sort(raulElements.begin(), raulElements.end()); + raulElements.erase(std::unique(raulElements.begin(), raulElements.end()), + raulElements.end()); + } + + return raulElements.size(); } -void MeshGrid::CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMaxGrids) +unsigned long MeshGrid::Inside(const Base::BoundBox3f& rclBB, + std::set& raulElements) const +{ + unsigned long i, j, k, ulMinX, ulMinY, ulMinZ, ulMaxX, ulMaxY, ulMaxZ; + + raulElements.clear(); + + // Grid boxes for a more detailed selection + Position(Base::Vector3f(rclBB.MinX, rclBB.MinY, rclBB.MinZ), ulMinX, ulMinY, ulMinZ); + Position(Base::Vector3f(rclBB.MaxX, rclBB.MaxY, rclBB.MaxZ), ulMaxX, ulMaxY, ulMaxZ); + + for (i = ulMinX; i <= ulMaxX; i++) { + for (j = ulMinY; j <= ulMaxY; j++) { + for (k = ulMinZ; k <= ulMaxZ; k++) { + raulElements.insert(_aulGrid[i][j][k].begin(), _aulGrid[i][j][k].end()); + } + } + } + + return raulElements.size(); +} + +bool MeshGrid::CheckPosition(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const +{ + rulX = static_cast((rclPoint.x - _fMinX) / _fGridLenX); + rulY = static_cast((rclPoint.y - _fMinY) / _fGridLenY); + rulZ = static_cast((rclPoint.z - _fMinZ) / _fGridLenZ); + + if ((rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ)) { + return true; + } + + return false; +} + +void MeshGrid::Position(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const +{ + if (rclPoint.x <= _fMinX) { + rulX = 0; + } + else { + rulX = + std::min(static_cast((rclPoint.x - _fMinX) / _fGridLenX), + _ulCtGridsX - 1); + } + + if (rclPoint.y <= _fMinY) { + rulY = 0; + } + else { + rulY = + std::min(static_cast((rclPoint.y - _fMinY) / _fGridLenY), + _ulCtGridsY - 1); + } + + if (rclPoint.z <= _fMinZ) { + rulZ = 0; + } + else { + rulZ = + std::min(static_cast((rclPoint.z - _fMinZ) / _fGridLenZ), + _ulCtGridsZ - 1); + } +} + +void MeshGrid::CalculateGridLength(unsigned long ulCtGrid, unsigned long ulMaxGrids) { // Calculate grid lengths or number of grids per dimension // There should be about 10 (?!?!) facets per grid @@ -272,10 +303,12 @@ void MeshGrid::CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMaxG float fVolume = fLenX * fLenY * fLenZ; if (fVolume > 0.0f) { float fVolElem; - if (_ulCtElements > (ulMaxGrids * ulCtGrid)) + if (_ulCtElements > (ulMaxGrids * ulCtGrid)) { fVolElem = (fLenX * fLenY * fLenZ) / float(ulMaxGrids * ulCtGrid); - else + } + else { fVolElem = (fLenX * fLenY * fLenZ) / float(_ulCtElements); + } float fVol = fVolElem * float(ulCtGrid); fGridLen = float(pow(fVol, 1.0f / 3.0f)); @@ -284,10 +317,12 @@ void MeshGrid::CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMaxG // Planar bounding box float fArea = fLenX * fLenY + fLenX * fLenZ + fLenY * fLenZ; float fAreaElem; - if (_ulCtElements > (ulMaxGrids * ulCtGrid)) + if (_ulCtElements > (ulMaxGrids * ulCtGrid)) { fAreaElem = fArea / float(ulMaxGrids * ulCtGrid); - else + } + else { fAreaElem = fArea / float(_ulCtElements); + } float fRepresentativeArea = fAreaElem * static_cast(ulCtGrid); fGridLen = sqrt(fRepresentativeArea); @@ -306,942 +341,975 @@ void MeshGrid::CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMaxG } } -void MeshGrid::CalculateGridLength (int iCtGridPerAxis) +void MeshGrid::CalculateGridLength(int iCtGridPerAxis) { - if (iCtGridPerAxis<=0) - { - CalculateGridLength(MESH_CT_GRID, MESH_MAX_GRIDS); - return; - } + if (iCtGridPerAxis <= 0) { + CalculateGridLength(MESH_CT_GRID, MESH_MAX_GRIDS); + return; + } - // Calculate grid lengths or number of grids per dimension - // There should be about 10 (?!?!) facets per grid - // respectively max grids should not exceed 10000 - Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); + // Calculate grid lengths or number of grids per dimension + // There should be about 10 (?!?!) facets per grid + // respectively max grids should not exceed 10000 + Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); - float fLenghtX = clBBMesh.LengthX(); - float fLenghtY = clBBMesh.LengthY(); - float fLenghtZ = clBBMesh.LengthZ(); + float fLenghtX = clBBMesh.LengthX(); + float fLenghtY = clBBMesh.LengthY(); + float fLenghtZ = clBBMesh.LengthZ(); - float fLenghtD = clBBMesh.CalcDiagonalLength(); + float fLenghtD = clBBMesh.CalcDiagonalLength(); - float fLengthTol = 0.05f * fLenghtD; + float fLengthTol = 0.05f * fLenghtD; - bool bLenghtXisZero = (fLenghtX <= fLengthTol); - bool bLenghtYisZero = (fLenghtY <= fLengthTol); - bool bLenghtZisZero = (fLenghtZ <= fLengthTol); + bool bLenghtXisZero = (fLenghtX <= fLengthTol); + bool bLenghtYisZero = (fLenghtY <= fLengthTol); + bool bLenghtZisZero = (fLenghtZ <= fLengthTol); - int iFlag = 0; + int iFlag = 0; - int iMaxGrids = 1; + int iMaxGrids = 1; - if (bLenghtXisZero) - iFlag += 1; - else - iMaxGrids *= iCtGridPerAxis; + if (bLenghtXisZero) { + iFlag += 1; + } + else { + iMaxGrids *= iCtGridPerAxis; + } - if (bLenghtYisZero) - iFlag += 2; - else - iMaxGrids *= iCtGridPerAxis; + if (bLenghtYisZero) { + iFlag += 2; + } + else { + iMaxGrids *= iCtGridPerAxis; + } - if (bLenghtZisZero) - iFlag += 4; - else - iMaxGrids *= iCtGridPerAxis; + if (bLenghtZisZero) { + iFlag += 4; + } + else { + iMaxGrids *= iCtGridPerAxis; + } - unsigned long ulGridsFacets = 10; + unsigned long ulGridsFacets = 10; - float fFactorVolumen = 40.0; - float fFactorArea = 10.0; + float fFactorVolumen = 40.0; + float fFactorArea = 10.0; - switch (iFlag) - { - case 0: - { - float fVolumen = fLenghtX * fLenghtY * fLenghtZ; + switch (iFlag) { + case 0: { + float fVolumen = fLenghtX * fLenghtY * fLenghtZ; - float fVolumenGrid = (fVolumen * ulGridsFacets) / (fFactorVolumen * _ulCtElements); + float fVolumenGrid = (fVolumen * ulGridsFacets) / (fFactorVolumen * _ulCtElements); - if ((fVolumenGrid * iMaxGrids) < fVolumen) - fVolumenGrid = fVolumen / static_cast(iMaxGrids); + if ((fVolumenGrid * iMaxGrids) < fVolumen) { + fVolumenGrid = fVolumen / static_cast(iMaxGrids); + } - float fLengthGrid = pow(fVolumenGrid, 1.0f / 3.0f); + float fLengthGrid = pow(fVolumenGrid, 1.0f / 3.0f); - _ulCtGridsX = std::max(static_cast(fLenghtX / fLengthGrid), 1); - _ulCtGridsY = std::max(static_cast(fLenghtY / fLengthGrid), 1); - _ulCtGridsZ = std::max(static_cast(fLenghtZ / fLengthGrid), 1); + _ulCtGridsX = + std::max(static_cast(fLenghtX / fLengthGrid), 1); + _ulCtGridsY = + std::max(static_cast(fLenghtY / fLengthGrid), 1); + _ulCtGridsZ = + std::max(static_cast(fLenghtZ / fLengthGrid), 1); - } break; - case 1: - { - _ulCtGridsX = 1; // bLenghtXisZero + } break; + case 1: { + _ulCtGridsX = 1; // bLenghtXisZero - float fArea = fLenghtY * fLenghtZ; + float fArea = fLenghtY * fLenghtZ; - float fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); + float fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); - if ((fAreaGrid * iMaxGrids) < fArea) - fAreaGrid = fArea / static_cast(iMaxGrids); + if ((fAreaGrid * iMaxGrids) < fArea) { + fAreaGrid = fArea / static_cast(iMaxGrids); + } - float fLengthGrid = float(sqrt(fAreaGrid)); + float fLengthGrid = float(sqrt(fAreaGrid)); - _ulCtGridsY = std::max(static_cast(fLenghtY / fLengthGrid), 1); - _ulCtGridsZ = std::max(static_cast(fLenghtZ / fLengthGrid), 1); - } break; - case 2: - { - _ulCtGridsY = 1; // bLenghtYisZero + _ulCtGridsY = + std::max(static_cast(fLenghtY / fLengthGrid), 1); + _ulCtGridsZ = + std::max(static_cast(fLenghtZ / fLengthGrid), 1); + } break; + case 2: { + _ulCtGridsY = 1; // bLenghtYisZero - float fArea = fLenghtX * fLenghtZ; + float fArea = fLenghtX * fLenghtZ; - float fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); + float fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); - if ((fAreaGrid * iMaxGrids) < fArea) - fAreaGrid = fArea / static_cast(iMaxGrids); + if ((fAreaGrid * iMaxGrids) < fArea) { + fAreaGrid = fArea / static_cast(iMaxGrids); + } - float fLengthGrid = float(sqrt(fAreaGrid)); + float fLengthGrid = float(sqrt(fAreaGrid)); - _ulCtGridsX = std::max(static_cast(fLenghtX / fLengthGrid), 1); - _ulCtGridsZ = std::max(static_cast(fLenghtZ / fLengthGrid), 1); - } break; - case 3: - { - _ulCtGridsX = 1; // bLenghtXisZero - _ulCtGridsY = 1; // bLenghtYisZero - _ulCtGridsZ = static_cast(iMaxGrids); // bLenghtYisZero - } break; - case 4: - { - _ulCtGridsZ = 1; // bLenghtZisZero + _ulCtGridsX = + std::max(static_cast(fLenghtX / fLengthGrid), 1); + _ulCtGridsZ = + std::max(static_cast(fLenghtZ / fLengthGrid), 1); + } break; + case 3: { + _ulCtGridsX = 1; // bLenghtXisZero + _ulCtGridsY = 1; // bLenghtYisZero + _ulCtGridsZ = static_cast(iMaxGrids); // bLenghtYisZero + } break; + case 4: { + _ulCtGridsZ = 1; // bLenghtZisZero - float fArea = fLenghtX * fLenghtY; + float fArea = fLenghtX * fLenghtY; - float fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); + float fAreaGrid = (fArea * ulGridsFacets) / (fFactorArea * _ulCtElements); - if ((fAreaGrid * iMaxGrids) < fArea) - fAreaGrid = fArea / static_cast(iMaxGrids); + if ((fAreaGrid * iMaxGrids) < fArea) { + fAreaGrid = fArea / static_cast(iMaxGrids); + } - float fLengthGrid = float(sqrt(fAreaGrid)); + float fLengthGrid = float(sqrt(fAreaGrid)); - _ulCtGridsX = std::max(static_cast(fLenghtX / fLengthGrid), 1); - _ulCtGridsY = std::max(static_cast(fLenghtY / fLengthGrid), 1); - } break; - case 5: - { - _ulCtGridsX = 1; // bLenghtXisZero - _ulCtGridsZ = 1; // bLenghtZisZero - _ulCtGridsY = static_cast(iMaxGrids); // bLenghtYisZero - } break; - case 6: - { - _ulCtGridsY = 1; // bLenghtYisZero - _ulCtGridsZ = 1; // bLenghtZisZero - _ulCtGridsX = static_cast(iMaxGrids); // bLenghtYisZero - } break; - case 7: - { - _ulCtGridsX = static_cast(iMaxGrids); // bLenghtXisZero - _ulCtGridsY = static_cast(iMaxGrids); // bLenghtYisZero - _ulCtGridsZ = static_cast(iMaxGrids); // bLenghtZisZero - } break; - } + _ulCtGridsX = + std::max(static_cast(fLenghtX / fLengthGrid), 1); + _ulCtGridsY = + std::max(static_cast(fLenghtY / fLengthGrid), 1); + } break; + case 5: { + _ulCtGridsX = 1; // bLenghtXisZero + _ulCtGridsZ = 1; // bLenghtZisZero + _ulCtGridsY = static_cast(iMaxGrids); // bLenghtYisZero + } break; + case 6: { + _ulCtGridsY = 1; // bLenghtYisZero + _ulCtGridsZ = 1; // bLenghtZisZero + _ulCtGridsX = static_cast(iMaxGrids); // bLenghtYisZero + } break; + case 7: { + _ulCtGridsX = static_cast(iMaxGrids); // bLenghtXisZero + _ulCtGridsY = static_cast(iMaxGrids); // bLenghtYisZero + _ulCtGridsZ = static_cast(iMaxGrids); // bLenghtZisZero + } break; + } } -void MeshGrid::SearchNearestFromPoint (const Base::Vector3f &rclPt, std::set &raclInd) const +void MeshGrid::SearchNearestFromPoint(const Base::Vector3f& rclPt, + std::set& raclInd) const { - raclInd.clear(); - Base::BoundBox3f clBB = GetBoundBox(); + raclInd.clear(); + Base::BoundBox3f clBB = GetBoundBox(); - if (clBB.IsInBox(rclPt)) - { // Point lies within - unsigned long ulX, ulY, ulZ; - Position(rclPt, ulX, ulY, ulZ); - //int nX = ulX, nY = ulY, nZ = ulZ; - unsigned long ulMaxLevel = std::max(_ulCtGridsX, std::max(_ulCtGridsY, _ulCtGridsZ)); - unsigned long ulLevel = 0; - while (raclInd.empty() && ulLevel <= ulMaxLevel) - GetHull(ulX, ulY, ulZ, ulLevel++, raclInd); - GetHull(ulX, ulY, ulZ, ulLevel, raclInd); - } - else - { // Point outside - Base::BoundBox3f::SIDE tSide = clBB.GetSideFromRay(rclPt, clBB.GetCenter() - rclPt); - switch (tSide) - { - case Base::BoundBox3f::RIGHT: - { - unsigned long nX = 0; - while (raclInd.empty() && nX < _ulCtGridsX) - { - for (unsigned long i = 0; i < _ulCtGridsY; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); - } - nX++; + if (clBB.IsInBox(rclPt)) { // Point lies within + unsigned long ulX, ulY, ulZ; + Position(rclPt, ulX, ulY, ulZ); + // int nX = ulX, nY = ulY, nZ = ulZ; + unsigned long ulMaxLevel = + std::max(_ulCtGridsX, std::max(_ulCtGridsY, _ulCtGridsZ)); + unsigned long ulLevel = 0; + while (raclInd.empty() && ulLevel <= ulMaxLevel) { + GetHull(ulX, ulY, ulZ, ulLevel++, raclInd); + } + GetHull(ulX, ulY, ulZ, ulLevel, raclInd); + } + else { // Point outside + Base::BoundBox3f::SIDE tSide = clBB.GetSideFromRay(rclPt, clBB.GetCenter() - rclPt); + switch (tSide) { + case Base::BoundBox3f::RIGHT: { + unsigned long nX = 0; + while (raclInd.empty() && nX < _ulCtGridsX) { + for (unsigned long i = 0; i < _ulCtGridsY; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); + } + } + nX++; + } + break; + } + case Base::BoundBox3f::LEFT: { + unsigned long nX = _ulCtGridsX - 1; + while (raclInd.empty() && nX < _ulCtGridsX) { + for (unsigned long i = 0; i < _ulCtGridsY; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); + } + } + nX++; + } + break; + } + case Base::BoundBox3f::TOP: { + unsigned long nY = 0; + while (raclInd.empty() && nY < _ulCtGridsY) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); + } + } + nY++; + } + break; + } + case Base::BoundBox3f::BOTTOM: { + unsigned long nY = _ulCtGridsY - 1; + while (raclInd.empty() && nY < _ulCtGridsY) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); + } + } + nY--; + } + break; + } + case Base::BoundBox3f::BACK: { + unsigned long nZ = 0; + while (raclInd.empty() && nZ < _ulCtGridsZ) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsY; j++) { + raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); + } + } + nZ++; + } + break; + } + case Base::BoundBox3f::FRONT: { + unsigned long nZ = _ulCtGridsZ - 1; + while (raclInd.empty() && nZ < _ulCtGridsZ) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsY; j++) { + raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); + } + } + nZ--; + } + break; + } + + default: + break; } - break; - } - case Base::BoundBox3f::LEFT: - { - unsigned long nX = _ulCtGridsX - 1; - while (raclInd.empty() && nX < _ulCtGridsX) - { - for (unsigned long i = 0; i < _ulCtGridsY; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[nX][i][j].begin(), _aulGrid[nX][i][j].end()); - } - nX++; - } - break; - } - case Base::BoundBox3f::TOP: - { - unsigned long nY = 0; - while (raclInd.empty() && nY < _ulCtGridsY) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); - } - nY++; - } - break; - } - case Base::BoundBox3f::BOTTOM: - { - unsigned long nY = _ulCtGridsY - 1; - while (raclInd.empty() && nY < _ulCtGridsY) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - raclInd.insert(_aulGrid[i][nY][j].begin(), _aulGrid[i][nY][j].end()); - } - nY--; - } - break; - } - case Base::BoundBox3f::BACK: - { - unsigned long nZ = 0; - while (raclInd.empty() && nZ < _ulCtGridsZ) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsY; j++) - raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); - } - nZ++; - } - break; - } - case Base::BoundBox3f::FRONT: - { - unsigned long nZ = _ulCtGridsZ - 1; - while (raclInd.empty() && nZ < _ulCtGridsZ) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsY; j++) - raclInd.insert(_aulGrid[i][j][nZ].begin(), _aulGrid[i][j][nZ].end()); - } - nZ--; - } - break; - } - - default: - break; } - } } -void MeshGrid::GetHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, - unsigned long ulDistance, std::set &raclInd) const +void MeshGrid::GetHull(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + unsigned long ulDistance, + std::set& raclInd) const { - int nX1 = std::max(0, int(ulX) - int(ulDistance)); - int nY1 = std::max(0, int(ulY) - int(ulDistance)); - int nZ1 = std::max(0, int(ulZ) - int(ulDistance)); - int nX2 = std::min(int(_ulCtGridsX) - 1, int(ulX) + int(ulDistance)); - int nY2 = std::min(int(_ulCtGridsY) - 1, int(ulY) + int(ulDistance)); - int nZ2 = std::min(int(_ulCtGridsZ) - 1, int(ulZ) + int(ulDistance)); + int nX1 = std::max(0, int(ulX) - int(ulDistance)); + int nY1 = std::max(0, int(ulY) - int(ulDistance)); + int nZ1 = std::max(0, int(ulZ) - int(ulDistance)); + int nX2 = std::min(int(_ulCtGridsX) - 1, int(ulX) + int(ulDistance)); + int nY2 = std::min(int(_ulCtGridsY) - 1, int(ulY) + int(ulDistance)); + int nZ2 = std::min(int(_ulCtGridsZ) - 1, int(ulZ) + int(ulDistance)); - int i, j; + int i, j; - // top plane - for (i = nX1; i <= nX2; i++) - { - for (j = nY1; j <= nY2; j++) - { - GetElements(static_cast(i), - static_cast(j), - static_cast(nZ1), - raclInd); + // top plane + for (i = nX1; i <= nX2; i++) { + for (j = nY1; j <= nY2; j++) { + GetElements(static_cast(i), + static_cast(j), + static_cast(nZ1), + raclInd); + } } - } - // bottom plane - for (i = nX1; i <= nX2; i++) - { - for (j = nY1; j <= nY2; j++) - { - GetElements(static_cast(i), - static_cast(j), - static_cast(nZ2), - raclInd); + // bottom plane + for (i = nX1; i <= nX2; i++) { + for (j = nY1; j <= nY2; j++) { + GetElements(static_cast(i), + static_cast(j), + static_cast(nZ2), + raclInd); + } } - } - // left plane - for (i = nY1; i <= nY2; i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - GetElements(static_cast(nX1), - static_cast(i), - static_cast(j), - raclInd); + // left plane + for (i = nY1; i <= nY2; i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(static_cast(nX1), + static_cast(i), + static_cast(j), + raclInd); + } } - } - // right plane - for (i = nY1; i <= nY2; i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - GetElements(static_cast(nX2), - static_cast(i), - static_cast(j), - raclInd); + // right plane + for (i = nY1; i <= nY2; i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(static_cast(nX2), + static_cast(i), + static_cast(j), + raclInd); + } } - } - // front plane - for (i = (nX1+1); i <= (nX2-1); i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - GetElements(static_cast(i), - static_cast(nY1), - static_cast(j), - raclInd); + // front plane + for (i = (nX1 + 1); i <= (nX2 - 1); i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(static_cast(i), + static_cast(nY1), + static_cast(j), + raclInd); + } } - } - // back plane - for (i = (nX1+1); i <= (nX2-1); i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - GetElements(static_cast(i), - static_cast(nY2), - static_cast(j), - raclInd); + // back plane + for (i = (nX1 + 1); i <= (nX2 - 1); i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + GetElements(static_cast(i), + static_cast(nY2), + static_cast(j), + raclInd); + } } - } } -unsigned long MeshGrid::GetElements (unsigned long ulX, unsigned long ulY, unsigned long ulZ, - std::set &raclInd) const +unsigned long MeshGrid::GetElements(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + std::set& raclInd) const { - const std::set &rclSet = _aulGrid[ulX][ulY][ulZ]; - if (!rclSet.empty()) - { - raclInd.insert(rclSet.begin(), rclSet.end()); - return rclSet.size(); - } + const std::set& rclSet = _aulGrid[ulX][ulY][ulZ]; + if (!rclSet.empty()) { + raclInd.insert(rclSet.begin(), rclSet.end()); + return rclSet.size(); + } - return 0; -} - -unsigned long MeshGrid::GetElements(const Base::Vector3f &rclPoint, std::vector& aulFacets) const -{ - unsigned long ulX, ulY, ulZ; - if (!CheckPosition(rclPoint, ulX, ulY, ulZ)) return 0; - - aulFacets.resize(_aulGrid[ulX][ulY][ulZ].size()); - - std::copy(_aulGrid[ulX][ulY][ulZ].begin(), _aulGrid[ulX][ulY][ulZ].end(), aulFacets.begin()); - return aulFacets.size(); } -unsigned long MeshGrid::GetIndexToPosition(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const +unsigned long MeshGrid::GetElements(const Base::Vector3f& rclPoint, + std::vector& aulFacets) const { - if ( !CheckPos(ulX, ulY, ulZ) ) - return ULONG_MAX; - return (ulZ * _ulCtGridsY + ulY) * _ulCtGridsX + ulX; + unsigned long ulX, ulY, ulZ; + if (!CheckPosition(rclPoint, ulX, ulY, ulZ)) { + return 0; + } + + aulFacets.resize(_aulGrid[ulX][ulY][ulZ].size()); + + std::copy(_aulGrid[ulX][ulY][ulZ].begin(), _aulGrid[ulX][ulY][ulZ].end(), aulFacets.begin()); + return aulFacets.size(); } -bool MeshGrid::GetPositionToIndex(unsigned long id, unsigned long& ulX, unsigned long& ulY, unsigned long& ulZ) const +unsigned long +MeshGrid::GetIndexToPosition(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const { - ulX = id % _ulCtGridsX; - ulY = (id/_ulCtGridsX)%_ulCtGridsY; - ulZ = id/(_ulCtGridsX*_ulCtGridsY); + if (!CheckPos(ulX, ulY, ulZ)) { + return ULONG_MAX; + } + return (ulZ * _ulCtGridsY + ulY) * _ulCtGridsX + ulX; +} - if ( !CheckPos(ulX, ulY, ulZ) ) - { - ulX = ULONG_MAX; - ulY = ULONG_MAX; - ulZ = ULONG_MAX; - return false; - } +bool MeshGrid::GetPositionToIndex(unsigned long id, + unsigned long& ulX, + unsigned long& ulY, + unsigned long& ulZ) const +{ + ulX = id % _ulCtGridsX; + ulY = (id / _ulCtGridsX) % _ulCtGridsY; + ulZ = id / (_ulCtGridsX * _ulCtGridsY); - return true; + if (!CheckPos(ulX, ulY, ulZ)) { + ulX = ULONG_MAX; + ulY = ULONG_MAX; + ulZ = ULONG_MAX; + return false; + } + + return true; } // ---------------------------------------------------------------- -MeshFacetGrid::MeshFacetGrid (const MeshKernel &rclM) -: MeshGrid(rclM) +MeshFacetGrid::MeshFacetGrid(const MeshKernel& rclM) + : MeshGrid(rclM) { - RebuildGrid(); -} - -MeshFacetGrid::MeshFacetGrid (const MeshKernel &rclM, int iCtGridPerAxis) -: MeshGrid(rclM) -{ - Rebuild(iCtGridPerAxis); -} - -MeshFacetGrid::MeshFacetGrid (const MeshKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ) -: MeshGrid(rclM) -{ - Rebuild(ulX, ulY, ulZ); -} - -MeshFacetGrid::MeshFacetGrid (const MeshKernel &rclM, float fGridLen) -: MeshGrid(rclM) -{ - Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); - Rebuild(std::max(static_cast(clBBMesh.LengthX() / fGridLen), 1), - std::max(static_cast(clBBMesh.LengthY() / fGridLen), 1), - std::max(static_cast(clBBMesh.LengthZ() / fGridLen), 1)); -} - -void MeshFacetGrid::Validate (const MeshKernel &rclMesh) -{ - if (_pclMesh != &rclMesh) - Attach(rclMesh); - else if (rclMesh.CountFacets() != _ulCtElements) RebuildGrid(); } -void MeshFacetGrid::Validate () +MeshFacetGrid::MeshFacetGrid(const MeshKernel& rclM, int iCtGridPerAxis) + : MeshGrid(rclM) { - if (!_pclMesh) - return; + Rebuild(iCtGridPerAxis); +} - if (_pclMesh->CountFacets() != _ulCtElements) - RebuildGrid(); +MeshFacetGrid::MeshFacetGrid(const MeshKernel& rclM, + unsigned long ulX, + unsigned long ulY, + unsigned long ulZ) + : MeshGrid(rclM) +{ + Rebuild(ulX, ulY, ulZ); +} + +MeshFacetGrid::MeshFacetGrid(const MeshKernel& rclM, float fGridLen) + : MeshGrid(rclM) +{ + Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); + Rebuild(std::max(static_cast(clBBMesh.LengthX() / fGridLen), 1), + std::max(static_cast(clBBMesh.LengthY() / fGridLen), 1), + std::max(static_cast(clBBMesh.LengthZ() / fGridLen), 1)); +} + +void MeshFacetGrid::Validate(const MeshKernel& rclMesh) +{ + if (_pclMesh != &rclMesh) { + Attach(rclMesh); + } + else if (rclMesh.CountFacets() != _ulCtElements) { + RebuildGrid(); + } +} + +void MeshFacetGrid::Validate() +{ + if (!_pclMesh) { + return; + } + + if (_pclMesh->CountFacets() != _ulCtElements) { + RebuildGrid(); + } } bool MeshFacetGrid::Verify() const { - if ( !_pclMesh ) - return false; // no mesh attached - if (_pclMesh->CountFacets() != _ulCtElements) - return false; // not up-to-date - - MeshGridIterator it(*this); - MeshFacetIterator cF(*_pclMesh); - for ( it.Init(); it.More(); it.Next() ) - { - std::vector aulElements; - it.GetElements( aulElements ); - for (ElementIndex element : aulElements) - { - cF.Set( element ); - if (!cF->IntersectBoundingBox(it.GetBoundBox())) - return false; // no intersection between facet although the facet is in grid + if (!_pclMesh) { + return false; // no mesh attached + } + if (_pclMesh->CountFacets() != _ulCtElements) { + return false; // not up-to-date } - } - return true; + MeshGridIterator it(*this); + MeshFacetIterator cF(*_pclMesh); + for (it.Init(); it.More(); it.Next()) { + std::vector aulElements; + it.GetElements(aulElements); + for (ElementIndex element : aulElements) { + cF.Set(element); + if (!cF->IntersectBoundingBox(it.GetBoundBox())) { + return false; // no intersection between facet although the facet is in grid + } + } + } + + return true; } -void MeshFacetGrid::RebuildGrid () +void MeshFacetGrid::RebuildGrid() { - _ulCtElements = _pclMesh->CountFacets(); + _ulCtElements = _pclMesh->CountFacets(); - InitGrid(); + InitGrid(); - // Fill data structure - MeshFacetIterator clFIter(*_pclMesh); - - unsigned long i = 0; - for (clFIter.Init(); clFIter.More(); clFIter.Next()) - { -// AddFacet(*clFIter, i++, 2.0f); - AddFacet(*clFIter, i++); - } + // Fill data structure + MeshFacetIterator clFIter(*_pclMesh); + unsigned long i = 0; + for (clFIter.Init(); clFIter.More(); clFIter.Next()) { + // AddFacet(*clFIter, i++, 2.0f); + AddFacet(*clFIter, i++); + } } -unsigned long MeshFacetGrid::SearchNearestFromPoint (const Base::Vector3f &rclPt) const +unsigned long MeshFacetGrid::SearchNearestFromPoint(const Base::Vector3f& rclPt) const { - ElementIndex ulFacetInd = ELEMENT_INDEX_MAX; - float fMinDist = FLOAT_MAX; - Base::BoundBox3f clBB = GetBoundBox(); + ElementIndex ulFacetInd = ELEMENT_INDEX_MAX; + float fMinDist = FLOAT_MAX; + Base::BoundBox3f clBB = GetBoundBox(); - if (clBB.IsInBox(rclPt)) - { // Point lies within - unsigned long ulX, ulY, ulZ; - Position(rclPt, ulX, ulY, ulZ); - float fMinGridDist = std::min(std::min(_fGridLenX, _fGridLenY), _fGridLenZ); - unsigned long ulDistance = 0; - while (fMinDist > (fMinGridDist * float(ulDistance))) - { - SearchNearestFacetInHull(ulX, ulY, ulZ, ulDistance, rclPt, ulFacetInd, fMinDist); - ulDistance++; + if (clBB.IsInBox(rclPt)) { // Point lies within + unsigned long ulX, ulY, ulZ; + Position(rclPt, ulX, ulY, ulZ); + float fMinGridDist = std::min(std::min(_fGridLenX, _fGridLenY), _fGridLenZ); + unsigned long ulDistance = 0; + while (fMinDist > (fMinGridDist * float(ulDistance))) { + SearchNearestFacetInHull(ulX, ulY, ulZ, ulDistance, rclPt, ulFacetInd, fMinDist); + ulDistance++; + } + SearchNearestFacetInHull(ulX, ulY, ulZ, ulDistance, rclPt, ulFacetInd, fMinDist); } - SearchNearestFacetInHull(ulX, ulY, ulZ, ulDistance, rclPt, ulFacetInd, fMinDist); - } - else - { // Point outside - Base::BoundBox3f::SIDE tSide = clBB.GetSideFromRay(rclPt, clBB.GetCenter() - rclPt); - switch (tSide) - { - case Base::BoundBox3f::RIGHT: - { - unsigned long nX = 0; - while ((fMinDist > ((clBB.MinX - rclPt.x) + (float(nX) * _fGridLenX))) && (nX < _ulCtGridsX)) - { - for (unsigned long i = 0; i < _ulCtGridsY; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - SearchNearestFacetInGrid(nX, i, j, rclPt, fMinDist, ulFacetInd); - } - nX++; + else { // Point outside + Base::BoundBox3f::SIDE tSide = clBB.GetSideFromRay(rclPt, clBB.GetCenter() - rclPt); + switch (tSide) { + case Base::BoundBox3f::RIGHT: { + unsigned long nX = 0; + while ((fMinDist > ((clBB.MinX - rclPt.x) + (float(nX) * _fGridLenX))) + && (nX < _ulCtGridsX)) { + for (unsigned long i = 0; i < _ulCtGridsY; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + SearchNearestFacetInGrid(nX, i, j, rclPt, fMinDist, ulFacetInd); + } + } + nX++; + } + break; + } + case Base::BoundBox3f::LEFT: { + unsigned long nX = _ulCtGridsX - 1; + while ((fMinDist > ((rclPt.x - clBB.MinX) + (float(nX) * _fGridLenX))) + && (nX < _ulCtGridsX)) { + for (unsigned long i = 0; i < _ulCtGridsY; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + SearchNearestFacetInGrid(nX, i, j, rclPt, fMinDist, ulFacetInd); + } + } + nX--; + } + break; + } + case Base::BoundBox3f::TOP: { + unsigned long nY = 0; + while ((fMinDist > ((clBB.MinY - rclPt.y) + (float(nY) * _fGridLenY))) + && (nY < _ulCtGridsY)) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + SearchNearestFacetInGrid(i, nY, j, rclPt, fMinDist, ulFacetInd); + } + } + nY++; + } + break; + } + case Base::BoundBox3f::BOTTOM: { + unsigned long nY = _ulCtGridsY - 1; + while ((fMinDist > ((rclPt.y - clBB.MinY) + (float(nY) * _fGridLenY))) + && (nY < _ulCtGridsY)) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsZ; j++) { + SearchNearestFacetInGrid(i, nY, j, rclPt, fMinDist, ulFacetInd); + } + } + nY--; + } + break; + } + case Base::BoundBox3f::BACK: { + unsigned long nZ = 0; + while ((fMinDist > ((clBB.MinZ - rclPt.z) + (float(nZ) * _fGridLenZ))) + && (nZ < _ulCtGridsZ)) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsY; j++) { + SearchNearestFacetInGrid(i, j, nZ, rclPt, fMinDist, ulFacetInd); + } + } + nZ++; + } + break; + } + case Base::BoundBox3f::FRONT: { + unsigned long nZ = _ulCtGridsZ - 1; + while ((fMinDist > ((rclPt.z - clBB.MinZ) + (float(nZ) * _fGridLenZ))) + && (nZ < _ulCtGridsZ)) { + for (unsigned long i = 0; i < _ulCtGridsX; i++) { + for (unsigned long j = 0; j < _ulCtGridsY; j++) { + SearchNearestFacetInGrid(i, j, nZ, rclPt, fMinDist, ulFacetInd); + } + } + nZ--; + } + break; + } + default: + break; } - break; - } - case Base::BoundBox3f::LEFT: - { - unsigned long nX = _ulCtGridsX - 1; - while ((fMinDist > ((rclPt.x - clBB.MinX) + (float(nX) * _fGridLenX))) && (nX < _ulCtGridsX)) - { - for (unsigned long i = 0; i < _ulCtGridsY; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - SearchNearestFacetInGrid(nX, i, j, rclPt, fMinDist, ulFacetInd); - } - nX--; - } - break; - } - case Base::BoundBox3f::TOP: - { - unsigned long nY = 0; - while ((fMinDist > ((clBB.MinY - rclPt.y) + (float(nY) * _fGridLenY))) && (nY < _ulCtGridsY)) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - SearchNearestFacetInGrid(i, nY, j, rclPt, fMinDist, ulFacetInd); - } - nY++; - } - break; - } - case Base::BoundBox3f::BOTTOM: - { - unsigned long nY = _ulCtGridsY - 1; - while ((fMinDist > ((rclPt.y - clBB.MinY) + (float(nY) * _fGridLenY))) && (nY < _ulCtGridsY)) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsZ; j++) - SearchNearestFacetInGrid(i, nY, j, rclPt, fMinDist, ulFacetInd); - } - nY--; - } - break; - } - case Base::BoundBox3f::BACK: - { - unsigned long nZ = 0; - while ((fMinDist > ((clBB.MinZ - rclPt.z) + (float(nZ) * _fGridLenZ))) && (nZ < _ulCtGridsZ)) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsY; j++) - SearchNearestFacetInGrid(i, j, nZ, rclPt, fMinDist, ulFacetInd); - } - nZ++; - } - break; - } - case Base::BoundBox3f::FRONT: - { - unsigned long nZ = _ulCtGridsZ - 1; - while ((fMinDist > ((rclPt.z - clBB.MinZ) + (float(nZ) * _fGridLenZ))) && (nZ < _ulCtGridsZ)) - { - for (unsigned long i = 0; i < _ulCtGridsX; i++) - { - for (unsigned long j = 0; j < _ulCtGridsY; j++) - SearchNearestFacetInGrid(i, j, nZ, rclPt, fMinDist, ulFacetInd); - } - nZ--; - } - break; - } - default: - break; } - } - return ulFacetInd; + return ulFacetInd; } -unsigned long MeshFacetGrid::SearchNearestFromPoint (const Base::Vector3f &rclPt, float fMaxSearchArea) const +unsigned long MeshFacetGrid::SearchNearestFromPoint(const Base::Vector3f& rclPt, + float fMaxSearchArea) const { - std::vector aulFacets; - ElementIndex ulFacetInd = ELEMENT_INDEX_MAX; - float fMinDist = fMaxSearchArea; + std::vector aulFacets; + ElementIndex ulFacetInd = ELEMENT_INDEX_MAX; + float fMinDist = fMaxSearchArea; - MeshAlgorithm clFTool(*_pclMesh); + MeshAlgorithm clFTool(*_pclMesh); - Base::BoundBox3f clBB(rclPt.x - fMaxSearchArea, rclPt.y - fMaxSearchArea, rclPt.z - fMaxSearchArea, - rclPt.x + fMaxSearchArea, rclPt.y + fMaxSearchArea, rclPt.z + fMaxSearchArea); + Base::BoundBox3f clBB(rclPt.x - fMaxSearchArea, + rclPt.y - fMaxSearchArea, + rclPt.z - fMaxSearchArea, + rclPt.x + fMaxSearchArea, + rclPt.y + fMaxSearchArea, + rclPt.z + fMaxSearchArea); - Inside(clBB, aulFacets, rclPt, fMaxSearchArea, true); + Inside(clBB, aulFacets, rclPt, fMaxSearchArea, true); - for (ElementIndex facet : aulFacets) - { - float fDist; + for (ElementIndex facet : aulFacets) { + float fDist; - if (clFTool.Distance(rclPt, facet, fMinDist, fDist)) - { - fMinDist = fDist; - ulFacetInd = facet; + if (clFTool.Distance(rclPt, facet, fMinDist, fDist)) { + fMinDist = fDist; + ulFacetInd = facet; + } } - } - return ulFacetInd; + return ulFacetInd; } -void MeshFacetGrid::SearchNearestFacetInHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, - unsigned long ulDistance, const Base::Vector3f &rclPt, - ElementIndex &rulFacetInd, float &rfMinDist) const +void MeshFacetGrid::SearchNearestFacetInHull(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + unsigned long ulDistance, + const Base::Vector3f& rclPt, + ElementIndex& rulFacetInd, + float& rfMinDist) const { - int nX1 = std::max(0, int(ulX) - int(ulDistance)); - int nY1 = std::max(0, int(ulY) - int(ulDistance)); - int nZ1 = std::max(0, int(ulZ) - int(ulDistance)); - int nX2 = std::min(int(_ulCtGridsX) - 1, int(ulX) + int(ulDistance)); - int nY2 = std::min(int(_ulCtGridsY) - 1, int(ulY) + int(ulDistance)); - int nZ2 = std::min(int(_ulCtGridsZ) - 1, int(ulZ) + int(ulDistance)); + int nX1 = std::max(0, int(ulX) - int(ulDistance)); + int nY1 = std::max(0, int(ulY) - int(ulDistance)); + int nZ1 = std::max(0, int(ulZ) - int(ulDistance)); + int nX2 = std::min(int(_ulCtGridsX) - 1, int(ulX) + int(ulDistance)); + int nY2 = std::min(int(_ulCtGridsY) - 1, int(ulY) + int(ulDistance)); + int nZ2 = std::min(int(_ulCtGridsZ) - 1, int(ulZ) + int(ulDistance)); - int i, j; + int i, j; - // top plane - for (i = nX1; i <= nX2; i++) - { - for (j = nY1; j <= nY2; j++) - { - SearchNearestFacetInGrid(static_cast(i), - static_cast(j), - static_cast(nZ1), - rclPt, rfMinDist, rulFacetInd); + // top plane + for (i = nX1; i <= nX2; i++) { + for (j = nY1; j <= nY2; j++) { + SearchNearestFacetInGrid(static_cast(i), + static_cast(j), + static_cast(nZ1), + rclPt, + rfMinDist, + rulFacetInd); + } } - } - // bottom plane - for (i = nX1; i <= nX2; i++) - { - for (j = nY1; j <= nY2; j++) - { - SearchNearestFacetInGrid(static_cast(i), - static_cast(j), - static_cast(nZ2), - rclPt, rfMinDist, rulFacetInd); + // bottom plane + for (i = nX1; i <= nX2; i++) { + for (j = nY1; j <= nY2; j++) { + SearchNearestFacetInGrid(static_cast(i), + static_cast(j), + static_cast(nZ2), + rclPt, + rfMinDist, + rulFacetInd); + } } - } - // left plane - for (i = nY1; i <= nY2; i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - SearchNearestFacetInGrid(static_cast(nX1), - static_cast(i), - static_cast(j), - rclPt, rfMinDist, rulFacetInd); + // left plane + for (i = nY1; i <= nY2; i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + SearchNearestFacetInGrid(static_cast(nX1), + static_cast(i), + static_cast(j), + rclPt, + rfMinDist, + rulFacetInd); + } } - } - // right plane - for (i = nY1; i <= nY2; i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - SearchNearestFacetInGrid(static_cast(nX2), - static_cast(i), - static_cast(j), - rclPt, rfMinDist, rulFacetInd); + // right plane + for (i = nY1; i <= nY2; i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + SearchNearestFacetInGrid(static_cast(nX2), + static_cast(i), + static_cast(j), + rclPt, + rfMinDist, + rulFacetInd); + } } - } - // front plane - for (i = (nX1+1); i <= (nX2-1); i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - SearchNearestFacetInGrid(static_cast(i), - static_cast(nY1), - static_cast(j), - rclPt, rfMinDist, rulFacetInd); + // front plane + for (i = (nX1 + 1); i <= (nX2 - 1); i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + SearchNearestFacetInGrid(static_cast(i), + static_cast(nY1), + static_cast(j), + rclPt, + rfMinDist, + rulFacetInd); + } } - } - // back plane - for (i = (nX1+1); i <= (nX2-1); i++) - { - for (j = (nZ1+1); j <= (nZ2-1); j++) - { - SearchNearestFacetInGrid(static_cast(i), - static_cast(nY2), - static_cast(j), - rclPt, rfMinDist, rulFacetInd); + // back plane + for (i = (nX1 + 1); i <= (nX2 - 1); i++) { + for (j = (nZ1 + 1); j <= (nZ2 - 1); j++) { + SearchNearestFacetInGrid(static_cast(i), + static_cast(nY2), + static_cast(j), + rclPt, + rfMinDist, + rulFacetInd); + } } - } } -void MeshFacetGrid::SearchNearestFacetInGrid(unsigned long ulX, unsigned long ulY, unsigned long ulZ, - const Base::Vector3f &rclPt, float &rfMinDist, - ElementIndex &rulFacetInd) const +void MeshFacetGrid::SearchNearestFacetInGrid(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + const Base::Vector3f& rclPt, + float& rfMinDist, + ElementIndex& rulFacetInd) const { - const std::set &rclSet = _aulGrid[ulX][ulY][ulZ]; - for (ElementIndex pI : rclSet) - { - float fDist = _pclMesh->GetFacet(pI).DistanceToPoint(rclPt); - if (fDist < rfMinDist) - { - rfMinDist = fDist; - rulFacetInd = pI; + const std::set& rclSet = _aulGrid[ulX][ulY][ulZ]; + for (ElementIndex pI : rclSet) { + float fDist = _pclMesh->GetFacet(pI).DistanceToPoint(rclPt); + if (fDist < rfMinDist) { + rfMinDist = fDist; + rulFacetInd = pI; + } } - } } //---------------------------------------------------------------------------- -MeshPointGrid::MeshPointGrid (const MeshKernel &rclM) - : MeshGrid(rclM) +MeshPointGrid::MeshPointGrid(const MeshKernel& rclM) + : MeshGrid(rclM) { - RebuildGrid(); -} - -MeshPointGrid::MeshPointGrid () - : MeshGrid() -{ -} - -MeshPointGrid::MeshPointGrid (const MeshKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ) - : MeshGrid(rclM) -{ - Rebuild(ulX, ulY, ulZ); -} - -MeshPointGrid::MeshPointGrid (const MeshKernel &rclM, int iCtGridPerAxis) - : MeshGrid(rclM) -{ - Rebuild(iCtGridPerAxis); -} - -MeshPointGrid::MeshPointGrid (const MeshKernel &rclM, float fGridLen) - : MeshGrid(rclM) -{ - Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); - Rebuild(std::max(static_cast(clBBMesh.LengthX() / fGridLen), 1), - std::max(static_cast(clBBMesh.LengthY() / fGridLen), 1), - std::max(static_cast(clBBMesh.LengthZ() / fGridLen), 1)); -} - -void MeshPointGrid::AddPoint (const MeshPoint &rclPt, ElementIndex ulPtIndex, float fEpsilon) -{ - (void)fEpsilon; - unsigned long ulX, ulY, ulZ; - Pos(Base::Vector3f(rclPt.x, rclPt.y, rclPt.z), ulX, ulY, ulZ); - if ( (ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ) ) - _aulGrid[ulX][ulY][ulZ].insert(ulPtIndex); -} - -void MeshPointGrid::Validate (const MeshKernel &rclMesh) -{ - if (_pclMesh != &rclMesh) - Attach(rclMesh); - else if (rclMesh.CountPoints() != _ulCtElements) RebuildGrid(); } -void MeshPointGrid::Validate () -{ - if (!_pclMesh) - return; +MeshPointGrid::MeshPointGrid() + : MeshGrid() +{} - if (_pclMesh->CountPoints() != _ulCtElements) - RebuildGrid(); +MeshPointGrid::MeshPointGrid(const MeshKernel& rclM, + unsigned long ulX, + unsigned long ulY, + unsigned long ulZ) + : MeshGrid(rclM) +{ + Rebuild(ulX, ulY, ulZ); +} + +MeshPointGrid::MeshPointGrid(const MeshKernel& rclM, int iCtGridPerAxis) + : MeshGrid(rclM) +{ + Rebuild(iCtGridPerAxis); +} + +MeshPointGrid::MeshPointGrid(const MeshKernel& rclM, float fGridLen) + : MeshGrid(rclM) +{ + Base::BoundBox3f clBBMesh = _pclMesh->GetBoundBox(); + Rebuild(std::max(static_cast(clBBMesh.LengthX() / fGridLen), 1), + std::max(static_cast(clBBMesh.LengthY() / fGridLen), 1), + std::max(static_cast(clBBMesh.LengthZ() / fGridLen), 1)); +} + +void MeshPointGrid::AddPoint(const MeshPoint& rclPt, ElementIndex ulPtIndex, float fEpsilon) +{ + (void)fEpsilon; + unsigned long ulX, ulY, ulZ; + Pos(Base::Vector3f(rclPt.x, rclPt.y, rclPt.z), ulX, ulY, ulZ); + if ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)) { + _aulGrid[ulX][ulY][ulZ].insert(ulPtIndex); + } +} + +void MeshPointGrid::Validate(const MeshKernel& rclMesh) +{ + if (_pclMesh != &rclMesh) { + Attach(rclMesh); + } + else if (rclMesh.CountPoints() != _ulCtElements) { + RebuildGrid(); + } +} + +void MeshPointGrid::Validate() +{ + if (!_pclMesh) { + return; + } + + if (_pclMesh->CountPoints() != _ulCtElements) { + RebuildGrid(); + } } bool MeshPointGrid::Verify() const { - if ( !_pclMesh ) - return false; // no mesh attached - if (_pclMesh->CountFacets() != _ulCtElements) - return false; // not up-to-date - - MeshGridIterator it(*this); - MeshPointIterator cP(*_pclMesh); - for ( it.Init(); it.More(); it.Next() ) - { - std::vector aulElements; - it.GetElements( aulElements ); - for (ElementIndex element : aulElements) - { - cP.Set( element ); - if (!it.GetBoundBox().IsInBox(*cP)) - return false; // point doesn't lie inside the grid element + if (!_pclMesh) { + return false; // no mesh attached + } + if (_pclMesh->CountFacets() != _ulCtElements) { + return false; // not up-to-date } - } - return true; + MeshGridIterator it(*this); + MeshPointIterator cP(*_pclMesh); + for (it.Init(); it.More(); it.Next()) { + std::vector aulElements; + it.GetElements(aulElements); + for (ElementIndex element : aulElements) { + cP.Set(element); + if (!it.GetBoundBox().IsInBox(*cP)) { + return false; // point doesn't lie inside the grid element + } + } + } + + return true; } -void MeshPointGrid::RebuildGrid () +void MeshPointGrid::RebuildGrid() { - _ulCtElements = _pclMesh->CountPoints(); + _ulCtElements = _pclMesh->CountPoints(); - InitGrid(); + InitGrid(); - // Fill data structure + // Fill data structure - MeshPointIterator cPIter(*_pclMesh); + MeshPointIterator cPIter(*_pclMesh); - unsigned long i = 0; - for (cPIter.Init(); cPIter.More(); cPIter.Next()) - { - AddPoint(*cPIter, i++); - } + unsigned long i = 0; + for (cPIter.Init(); cPIter.More(); cPIter.Next()) { + AddPoint(*cPIter, i++); + } } -void MeshPointGrid::Pos (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const +void MeshPointGrid::Pos(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const { - rulX = static_cast((rclPoint.x - _fMinX) / _fGridLenX); - rulY = static_cast((rclPoint.y - _fMinY) / _fGridLenY); - rulZ = static_cast((rclPoint.z - _fMinZ) / _fGridLenZ); + rulX = static_cast((rclPoint.x - _fMinX) / _fGridLenX); + rulY = static_cast((rclPoint.y - _fMinY) / _fGridLenY); + rulZ = static_cast((rclPoint.z - _fMinZ) / _fGridLenZ); } -unsigned long MeshPointGrid::FindElements (const Base::Vector3f &rclPoint, std::set& aulElements) const +unsigned long MeshPointGrid::FindElements(const Base::Vector3f& rclPoint, + std::set& aulElements) const { - unsigned long ulX, ulY, ulZ; - Pos(rclPoint, ulX, ulY, ulZ); + unsigned long ulX, ulY, ulZ; + Pos(rclPoint, ulX, ulY, ulZ); - // check if the given point is inside the grid structure - if ( (ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ) ) - { - return GetElements(ulX, ulY, ulZ, aulElements); - } + // check if the given point is inside the grid structure + if ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)) { + return GetElements(ulX, ulY, ulZ, aulElements); + } - return 0; + return 0; } // ---------------------------------------------------------------- -MeshGridIterator::MeshGridIterator (const MeshGrid &rclG) - : _rclGrid(rclG) - , _clPt(0.0f, 0.0f, 0.0f) - , _clDir(0.0f, 0.0f, 0.0f) +MeshGridIterator::MeshGridIterator(const MeshGrid& rclG) + : _rclGrid(rclG) + , _clPt(0.0f, 0.0f, 0.0f) + , _clDir(0.0f, 0.0f, 0.0f) +{} + +bool MeshGridIterator::InitOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + float fMaxSearchArea, + std::vector& raulElements) { + bool ret = InitOnRay(rclPt, rclDir, raulElements); + _fMaxSearchArea = fMaxSearchArea; + return ret; } -bool MeshGridIterator::InitOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxSearchArea, - std::vector &raulElements) +bool MeshGridIterator::InitOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + std::vector& raulElements) { - bool ret = InitOnRay (rclPt, rclDir, raulElements); - _fMaxSearchArea = fMaxSearchArea; - return ret; -} + // needed in NextOnRay() to avoid an infinite loop + _cSearchPositions.clear(); -bool MeshGridIterator::InitOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, - std::vector &raulElements) -{ - // needed in NextOnRay() to avoid an infinite loop - _cSearchPositions.clear(); + _fMaxSearchArea = FLOAT_MAX; - _fMaxSearchArea = FLOAT_MAX; + raulElements.clear(); - raulElements.clear(); + _clPt = rclPt; + _clDir = rclDir; + _bValidRay = false; - _clPt = rclPt; - _clDir = rclDir; - _bValidRay = false; - - // point lies within global BB - if (_rclGrid.GetBoundBox().IsInBox(rclPt)) - { // Determine the voxel by the starting point - _rclGrid.Position(rclPt, _ulX, _ulY, _ulZ); - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - _bValidRay = true; - } - else - { // Start point outside - Base::Vector3f cP0, cP1; - if (_rclGrid.GetBoundBox().IntersectWithLine(rclPt, rclDir, cP0, cP1)) - { // determine the next point - if ((cP0 - rclPt).Length() < (cP1 - rclPt).Length()) - _rclGrid.Position(cP0, _ulX, _ulY, _ulZ); - else - _rclGrid.Position(cP1, _ulX, _ulY, _ulZ); - - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - _bValidRay = true; + // point lies within global BB + if (_rclGrid.GetBoundBox().IsInBox(rclPt)) { // Determine the voxel by the starting point + _rclGrid.Position(rclPt, _ulX, _ulY, _ulZ); + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + _bValidRay = true; } - } + else { // Start point outside + Base::Vector3f cP0, cP1; + if (_rclGrid.GetBoundBox().IntersectWithLine(rclPt, + rclDir, + cP0, + cP1)) { // determine the next point + if ((cP0 - rclPt).Length() < (cP1 - rclPt).Length()) { + _rclGrid.Position(cP0, _ulX, _ulY, _ulZ); + } + else { + _rclGrid.Position(cP1, _ulX, _ulY, _ulZ); + } - return _bValidRay; -} - -bool MeshGridIterator::NextOnRay (std::vector &raulElements) -{ - if (!_bValidRay) - return false; // not initialized or beam exited - - raulElements.clear(); - - Base::Vector3f clIntersectPoint; - - // Look for the next adjacent BB on the search beam - Base::BoundBox3f::SIDE tSide = _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ).GetSideFromRay(_clPt, _clDir, clIntersectPoint); - - // Search area - // - if ((_clPt-clIntersectPoint).Length() > _fMaxSearchArea) - { - _bValidRay = false; - } - else - { - switch (tSide) - { - case Base::BoundBox3f::LEFT: _ulX--; break; - case Base::BoundBox3f::RIGHT: _ulX++; break; - case Base::BoundBox3f::BOTTOM: _ulY--; break; - case Base::BoundBox3f::TOP: _ulY++; break; - case Base::BoundBox3f::FRONT: _ulZ--; break; - case Base::BoundBox3f::BACK: _ulZ++; break; - - default: - case Base::BoundBox3f::INVALID: - _bValidRay = false; - break; + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + _bValidRay = true; + } } - GridElement pos(_ulX, _ulY, _ulZ); - if ( _cSearchPositions.find( pos ) != _cSearchPositions.end() ) - _bValidRay = false; // grid element already visited => result from GetSideFromRay invalid - } - - if (_bValidRay && _rclGrid.CheckPos(_ulX, _ulY, _ulZ)) - { - GridElement pos(_ulX, _ulY, _ulZ); _cSearchPositions.insert(pos); - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - } - else - _bValidRay = false; // Beam leaked - - return _bValidRay; + return _bValidRay; +} + +bool MeshGridIterator::NextOnRay(std::vector& raulElements) +{ + if (!_bValidRay) { + return false; // not initialized or beam exited + } + + raulElements.clear(); + + Base::Vector3f clIntersectPoint; + + // Look for the next adjacent BB on the search beam + Base::BoundBox3f::SIDE tSide = + _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ).GetSideFromRay(_clPt, _clDir, clIntersectPoint); + + // Search area + // + if ((_clPt - clIntersectPoint).Length() > _fMaxSearchArea) { + _bValidRay = false; + } + else { + switch (tSide) { + case Base::BoundBox3f::LEFT: + _ulX--; + break; + case Base::BoundBox3f::RIGHT: + _ulX++; + break; + case Base::BoundBox3f::BOTTOM: + _ulY--; + break; + case Base::BoundBox3f::TOP: + _ulY++; + break; + case Base::BoundBox3f::FRONT: + _ulZ--; + break; + case Base::BoundBox3f::BACK: + _ulZ++; + break; + + default: + case Base::BoundBox3f::INVALID: + _bValidRay = false; + break; + } + + GridElement pos(_ulX, _ulY, _ulZ); + if (_cSearchPositions.find(pos) != _cSearchPositions.end()) { + _bValidRay = + false; // grid element already visited => result from GetSideFromRay invalid + } + } + + if (_bValidRay && _rclGrid.CheckPos(_ulX, _ulY, _ulZ)) { + GridElement pos(_ulX, _ulY, _ulZ); + _cSearchPositions.insert(pos); + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + } + else { + _bValidRay = false; // Beam leaked + } + + return _bValidRay; } diff --git a/src/Mod/Mesh/App/Core/Grid.h b/src/Mod/Mesh/App/Core/Grid.h index 3873ec3177..ab9ebd5be9 100644 --- a/src/Mod/Mesh/App/Core/Grid.h +++ b/src/Mod/Mesh/App/Core/Grid.h @@ -30,12 +30,13 @@ #include "MeshKernel.h" -#define MESH_CT_GRID 256 // Default value for number of elements per grid -#define MESH_MAX_GRIDS 100000 // Default value for maximum number of grids -#define MESH_CT_GRID_PER_AXIS 20 +#define MESH_CT_GRID 256 // Default value for number of elements per grid +#define MESH_MAX_GRIDS 100000 // Default value for maximum number of grids +#define MESH_CT_GRID_PER_AXIS 20 -namespace MeshCore { +namespace MeshCore +{ class MeshKernel; class MeshGeomFacet; @@ -54,123 +55,162 @@ class MeshGrid; class MeshExport MeshGrid { protected: - /** @name Construction */ - //@{ - /// Construction - explicit MeshGrid (const MeshKernel &rclM); - /// Construction - MeshGrid (); - //@} + /** @name Construction */ + //@{ + /// Construction + explicit MeshGrid(const MeshKernel& rclM); + /// Construction + MeshGrid(); + //@} public: - /// Destruction - virtual ~MeshGrid () = default; + /// Destruction + virtual ~MeshGrid() = default; public: - /** Attaches the mesh kernel to this grid, an already attached mesh gets detached. The grid gets rebuilt - * automatically. */ - virtual void Attach (const MeshKernel &rclM); - /** Rebuilds the grid structure. */ - virtual void Rebuild (unsigned long ulPerGrid = MESH_CT_GRID, unsigned long ulMaxGrid = MESH_MAX_GRIDS); - /** Rebuilds the grid structure. */ - virtual void Rebuild (int iCtGridPerAxis = MESH_CT_GRID_PER_AXIS); - /** Rebuilds the grid structure. */ - virtual void Rebuild (unsigned long ulX, unsigned long ulY, unsigned long ulZ); + /** Attaches the mesh kernel to this grid, an already attached mesh gets detached. The grid gets + * rebuilt automatically. */ + virtual void Attach(const MeshKernel& rclM); + /** Rebuilds the grid structure. */ + virtual void Rebuild(unsigned long ulPerGrid = MESH_CT_GRID, + unsigned long ulMaxGrid = MESH_MAX_GRIDS); + /** Rebuilds the grid structure. */ + virtual void Rebuild(int iCtGridPerAxis = MESH_CT_GRID_PER_AXIS); + /** Rebuilds the grid structure. */ + virtual void Rebuild(unsigned long ulX, unsigned long ulY, unsigned long ulZ); - /** @name Search */ - //@{ - /** Searches for elements lying in the intersection area of the grid and the bounding box. */ - virtual unsigned long Inside (const Base::BoundBox3f &rclBB, std::vector &raulElements, bool bDelDoubles = true) const; - /** Searches for elements lying in the intersection area of the grid and the bounding box. */ - virtual unsigned long Inside (const Base::BoundBox3f &rclBB, std::set &raulElementss) const; - /** Searches for elements lying in the intersection area of the grid and the bounding box. */ - virtual unsigned long Inside (const Base::BoundBox3f &rclBB, std::vector &raulElements, - const Base::Vector3f &rclOrg, float fMaxDist, bool bDelDoubles = true) const; - /** Searches for the nearest grids that contain elements from a point, the result are grid indices. */ - void SearchNearestFromPoint (const Base::Vector3f &rclPt, std::set &rclInd) const; - //@} + /** @name Search */ + //@{ + /** Searches for elements lying in the intersection area of the grid and the bounding box. */ + virtual unsigned long Inside(const Base::BoundBox3f& rclBB, + std::vector& raulElements, + bool bDelDoubles = true) const; + /** Searches for elements lying in the intersection area of the grid and the bounding box. */ + virtual unsigned long Inside(const Base::BoundBox3f& rclBB, + std::set& raulElementss) const; + /** Searches for elements lying in the intersection area of the grid and the bounding box. */ + virtual unsigned long Inside(const Base::BoundBox3f& rclBB, + std::vector& raulElements, + const Base::Vector3f& rclOrg, + float fMaxDist, + bool bDelDoubles = true) const; + /** Searches for the nearest grids that contain elements from a point, the result are grid + * indices. */ + void SearchNearestFromPoint(const Base::Vector3f& rclPt, std::set& rclInd) const; + //@} - /** @name Getters */ - //@{ - /** Returns the indices of the elements in the given grid. */ - unsigned long GetElements (unsigned long ulX, unsigned long ulY, unsigned long ulZ, std::set &raclInd) const; - unsigned long GetElements (const Base::Vector3f &rclPoint, std::vector& aulFacets) const; - //@} + /** @name Getters */ + //@{ + /** Returns the indices of the elements in the given grid. */ + unsigned long GetElements(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + std::set& raclInd) const; + unsigned long GetElements(const Base::Vector3f& rclPoint, + std::vector& aulFacets) const; + //@} - /** Returns the lengths of the grid elements in x,y and z direction. */ - virtual void GetGridLengths (float &rfLenX, float &rfLenY, float &rfLenZ) const - { rfLenX = _fGridLenX; rfLenY = _fGridLenY; rfLenZ = _fGridLenZ; } - /** Returns the number of grid elements in x,y and z direction. */ - virtual void GetCtGrids (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const - { rulX = _ulCtGridsX; rulY = _ulCtGridsY; rulZ = _ulCtGridsZ; } + /** Returns the lengths of the grid elements in x,y and z direction. */ + virtual void GetGridLengths(float& rfLenX, float& rfLenY, float& rfLenZ) const + { + rfLenX = _fGridLenX; + rfLenY = _fGridLenY; + rfLenZ = _fGridLenZ; + } + /** Returns the number of grid elements in x,y and z direction. */ + virtual void GetCtGrids(unsigned long& rulX, unsigned long& rulY, unsigned long& rulZ) const + { + rulX = _ulCtGridsX; + rulY = _ulCtGridsY; + rulZ = _ulCtGridsZ; + } - /** @name Boundings */ - //@{ - /** Returns the bounding box of a given grid element. */ - inline Base::BoundBox3f GetBoundBox (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; - /** Returns the bounding box of the whole. */ - inline Base::BoundBox3f GetBoundBox () const; - /** Returns an extended bounding box of the mesh object. */ - inline Base::BoundBox3f GetMeshBoundBox () const; - //@} - /** Returns an index for the given grid position. If the specified triple is not a valid grid position ULONG_MAX is returned. - * If the index is valid than its value is between zero and the number of grid elements. For each different grid position - * a different index is returned. - */ - unsigned long GetIndexToPosition(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; - /** Returns the grid position to the given index. If the index is equal to or higher than the number of grid elements false is returned - * and the triple is set to ULONG_MAX. - */ - bool GetPositionToIndex(unsigned long id, unsigned long& ulX, unsigned long& ulY, unsigned long& ulZ) const; - /** Returns the number of elements in a given grid. */ - unsigned long GetCtElements(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const - { return static_cast(_aulGrid[ulX][ulY][ulZ].size()); } - /** Validates the grid structure and rebuilds it if needed. Must be implemented in sub-classes. */ - virtual void Validate (const MeshKernel &rclM) = 0; - /** Verifies the grid structure and returns false if inconsistencies are found. */ - virtual bool Verify() const = 0; - /** Checks whether the point is inside the grid. In case it is inside true is returned with the grid position, - * otherwise false is returned and the grid position is undefined. - */ - bool CheckPosition (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const; - /** Returns the indices of the grid this point lies in. If the point is outside the grid the indices of - * the nearest grid element are taken.*/ - virtual void Position (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const; - /** Checks if this is a valid grid position. */ - inline bool CheckPos (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; - /** Get the indices of all elements lying in the grids around a given grid with distance \a ulDistance. */ - void GetHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, unsigned long ulDistance, std::set &raclInd) const; + /** @name Boundings */ + //@{ + /** Returns the bounding box of a given grid element. */ + inline Base::BoundBox3f + GetBoundBox(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; + /** Returns the bounding box of the whole. */ + inline Base::BoundBox3f GetBoundBox() const; + /** Returns an extended bounding box of the mesh object. */ + inline Base::BoundBox3f GetMeshBoundBox() const; + //@} + /** Returns an index for the given grid position. If the specified triple is not a valid grid + * position ULONG_MAX is returned. If the index is valid than its value is between zero and the + * number of grid elements. For each different grid position a different index is returned. + */ + unsigned long GetIndexToPosition(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; + /** Returns the grid position to the given index. If the index is equal to or higher than the + * number of grid elements false is returned and the triple is set to ULONG_MAX. + */ + bool GetPositionToIndex(unsigned long id, + unsigned long& ulX, + unsigned long& ulY, + unsigned long& ulZ) const; + /** Returns the number of elements in a given grid. */ + unsigned long GetCtElements(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const + { + return static_cast(_aulGrid[ulX][ulY][ulZ].size()); + } + /** Validates the grid structure and rebuilds it if needed. Must be implemented in sub-classes. + */ + virtual void Validate(const MeshKernel& rclM) = 0; + /** Verifies the grid structure and returns false if inconsistencies are found. */ + virtual bool Verify() const = 0; + /** Checks whether the point is inside the grid. In case it is inside true is returned with the + * grid position, otherwise false is returned and the grid position is undefined. + */ + bool CheckPosition(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const; + /** Returns the indices of the grid this point lies in. If the point is outside the grid the + * indices of the nearest grid element are taken.*/ + virtual void Position(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const; + /** Checks if this is a valid grid position. */ + inline bool CheckPos(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const; + /** Get the indices of all elements lying in the grids around a given grid with distance \a + * ulDistance. */ + void GetHull(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + unsigned long ulDistance, + std::set& raclInd) const; protected: - /** Initializes the size of the internal structure. */ - virtual void InitGrid (); - /** Deletes the grid structure. */ - virtual void Clear (); - /** Calculates the grid length dependent on maximum number of grids. */ - virtual void CalculateGridLength (unsigned long ulCtGrid, unsigned long ulMaxGrids); - /** Calculates the grid length dependent on the number of grids per axis. */ - virtual void CalculateGridLength (int iCtGridPerAxis); - /** Rebuilds the grid structure. Must be implemented in sub-classes. */ - virtual void RebuildGrid () = 0; - /** Returns the number of stored elements. Must be implemented in sub-classes. */ - virtual unsigned long HasElements () const = 0; + /** Initializes the size of the internal structure. */ + virtual void InitGrid(); + /** Deletes the grid structure. */ + virtual void Clear(); + /** Calculates the grid length dependent on maximum number of grids. */ + virtual void CalculateGridLength(unsigned long ulCtGrid, unsigned long ulMaxGrids); + /** Calculates the grid length dependent on the number of grids per axis. */ + virtual void CalculateGridLength(int iCtGridPerAxis); + /** Rebuilds the grid structure. Must be implemented in sub-classes. */ + virtual void RebuildGrid() = 0; + /** Returns the number of stored elements. Must be implemented in sub-classes. */ + virtual unsigned long HasElements() const = 0; protected: - std::vector > > > _aulGrid; /**< Grid data structure. */ - const MeshKernel* _pclMesh; /**< The mesh kernel. */ - unsigned long _ulCtElements;/**< Number of grid elements for validation issues. */ - unsigned long _ulCtGridsX; /**< Number of grid elements in z. */ - unsigned long _ulCtGridsY; /**< Number of grid elements in z. */ - unsigned long _ulCtGridsZ; /**< Number of grid elements in z. */ - float _fGridLenX; /**< Length of grid elements in x. */ - float _fGridLenY; /**< Length of grid elements in y. */ - float _fGridLenZ; /**< Length of grid elements in z. */ - float _fMinX; /**< Grid null position in x. */ - float _fMinY; /**< Grid null position in y. */ - float _fMinZ; /**< Grid null position in z. */ + std::vector>>> + _aulGrid; /**< Grid data structure. */ + const MeshKernel* _pclMesh; /**< The mesh kernel. */ + unsigned long _ulCtElements; /**< Number of grid elements for validation issues. */ + unsigned long _ulCtGridsX; /**< Number of grid elements in z. */ + unsigned long _ulCtGridsY; /**< Number of grid elements in z. */ + unsigned long _ulCtGridsZ; /**< Number of grid elements in z. */ + float _fGridLenX; /**< Length of grid elements in x. */ + float _fGridLenY; /**< Length of grid elements in y. */ + float _fGridLenZ; /**< Length of grid elements in z. */ + float _fMinX; /**< Grid null position in x. */ + float _fMinY; /**< Grid null position in y. */ + float _fMinZ; /**< Grid null position in z. */ - // friends - friend class MeshGridIterator; + // friends + friend class MeshGridIterator; }; /** @@ -180,58 +220,79 @@ protected: class MeshExport MeshFacetGrid: public MeshGrid { public: - /** @name Construction */ - //@{ - /// Construction - explicit MeshFacetGrid (const MeshKernel &rclM); - /// Construction - MeshFacetGrid () : MeshGrid() { } - /// Construction - MeshFacetGrid (const MeshKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ); - /// Construction - MeshFacetGrid (const MeshKernel &rclM, int iCtGridPerAxis); - /// Construction - MeshFacetGrid (const MeshKernel &rclM, float fGridLen); - /// Destruction - ~MeshFacetGrid () override = default; - //@} + /** @name Construction */ + //@{ + /// Construction + explicit MeshFacetGrid(const MeshKernel& rclM); + /// Construction + MeshFacetGrid() + : MeshGrid() + {} + /// Construction + MeshFacetGrid(const MeshKernel& rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ); + /// Construction + MeshFacetGrid(const MeshKernel& rclM, int iCtGridPerAxis); + /// Construction + MeshFacetGrid(const MeshKernel& rclM, float fGridLen); + /// Destruction + ~MeshFacetGrid() override = default; + //@} - /** @name Search */ - //@{ - /** Searches for the nearest facet from a point. */ - unsigned long SearchNearestFromPoint (const Base::Vector3f &rclPt) const; - /** Searches for the nearest facet from a point with the maximum search area. */ - unsigned long SearchNearestFromPoint (const Base::Vector3f &rclPt, float fMaxSearchArea) const; - /** Searches for the nearest facet in a given grid element and returns the facet index and the actual distance. */ - void SearchNearestFacetInGrid(unsigned long ulX, unsigned long ulY, unsigned long ulZ, const Base::Vector3f &rclPt, - float &rfMinDist, ElementIndex &rulFacetInd) const; - /** Does basically the same as the method above unless that grid neighbours up to the order of \a ulDistance - * are introduced into the search. */ - void SearchNearestFacetInHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, unsigned long ulDistance, - const Base::Vector3f &rclPt, ElementIndex &rulFacetInd, float &rfMinDist) const; - //@} + /** @name Search */ + //@{ + /** Searches for the nearest facet from a point. */ + unsigned long SearchNearestFromPoint(const Base::Vector3f& rclPt) const; + /** Searches for the nearest facet from a point with the maximum search area. */ + unsigned long SearchNearestFromPoint(const Base::Vector3f& rclPt, float fMaxSearchArea) const; + /** Searches for the nearest facet in a given grid element and returns the facet index and the + * actual distance. */ + void SearchNearestFacetInGrid(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + const Base::Vector3f& rclPt, + float& rfMinDist, + ElementIndex& rulFacetInd) const; + /** Does basically the same as the method above unless that grid neighbours up to the order of + * \a ulDistance are introduced into the search. */ + void SearchNearestFacetInHull(unsigned long ulX, + unsigned long ulY, + unsigned long ulZ, + unsigned long ulDistance, + const Base::Vector3f& rclPt, + ElementIndex& rulFacetInd, + float& rfMinDist) const; + //@} - /** Validates the grid structure and rebuilds it if needed. */ - void Validate (const MeshKernel &rclM) override; - /** Validates the grid structure and rebuilds it if needed. */ - virtual void Validate (); - /** Verifies the grid structure and returns false if inconsistencies are found. */ - bool Verify() const override; + /** Validates the grid structure and rebuilds it if needed. */ + void Validate(const MeshKernel& rclM) override; + /** Validates the grid structure and rebuilds it if needed. */ + virtual void Validate(); + /** Verifies the grid structure and returns false if inconsistencies are found. */ + bool Verify() const override; protected: - /** Returns the grid numbers to the given point \a rclPoint. */ - inline void Pos (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const; - /** Returns the grid numbers to the given point \a rclPoint. */ - inline void PosWithCheck (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const; - /** Adds a new facet element to the grid structure. \a rclFacet is the geometric facet and \a ulFacetIndex - * the corresponding index in the mesh kernel. The facet is added to each grid element that intersects - * the facet. */ - inline void AddFacet (const MeshGeomFacet &rclFacet, ElementIndex ulFacetIndex, float fEpsilon = 0.0f); - /** Returns the number of stored elements. */ - unsigned long HasElements () const override - { return _pclMesh->CountFacets(); } - /** Rebuilds the grid structure. */ - void RebuildGrid () override; + /** Returns the grid numbers to the given point \a rclPoint. */ + inline void Pos(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const; + /** Returns the grid numbers to the given point \a rclPoint. */ + inline void PosWithCheck(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const; + /** Adds a new facet element to the grid structure. \a rclFacet is the geometric facet and \a + * ulFacetIndex the corresponding index in the mesh kernel. The facet is added to each grid + * element that intersects the facet. */ + inline void + AddFacet(const MeshGeomFacet& rclFacet, ElementIndex ulFacetIndex, float fEpsilon = 0.0f); + /** Returns the number of stored elements. */ + unsigned long HasElements() const override + { + return _pclMesh->CountFacets(); + } + /** Rebuilds the grid structure. */ + void RebuildGrid() override; }; /** @@ -241,42 +302,48 @@ protected: class MeshExport MeshPointGrid: public MeshGrid { public: - /** @name Construction */ - //@{ - /// Construction - MeshPointGrid (); - /// Construction - explicit MeshPointGrid (const MeshKernel &rclM); - /// Construction - MeshPointGrid (const MeshKernel &rclM, int iCtGridPerAxis); - /// Construction - MeshPointGrid (const MeshKernel &rclM, float fGridLen); - /// Construction - MeshPointGrid (const MeshKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ); - /// Destruction - ~MeshPointGrid () override = default; - //@} + /** @name Construction */ + //@{ + /// Construction + MeshPointGrid(); + /// Construction + explicit MeshPointGrid(const MeshKernel& rclM); + /// Construction + MeshPointGrid(const MeshKernel& rclM, int iCtGridPerAxis); + /// Construction + MeshPointGrid(const MeshKernel& rclM, float fGridLen); + /// Construction + MeshPointGrid(const MeshKernel& rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ); + /// Destruction + ~MeshPointGrid() override = default; + //@} - /** Finds all points that lie in the same grid as the point \a rclPoint. */ - unsigned long FindElements(const Base::Vector3f &rclPoint, std::set& aulElements) const; - /** Validates the grid structure and rebuilds it if needed. */ - void Validate (const MeshKernel &rclM) override; - /** Validates the grid structure and rebuilds it if needed. */ - virtual void Validate (); - /** Verifies the grid structure and returns false if inconsistencies are found. */ - bool Verify() const override; + /** Finds all points that lie in the same grid as the point \a rclPoint. */ + unsigned long FindElements(const Base::Vector3f& rclPoint, + std::set& aulElements) const; + /** Validates the grid structure and rebuilds it if needed. */ + void Validate(const MeshKernel& rclM) override; + /** Validates the grid structure and rebuilds it if needed. */ + virtual void Validate(); + /** Verifies the grid structure and returns false if inconsistencies are found. */ + bool Verify() const override; protected: - /** Adds a new point element to the grid structure. \a rclPt is the geometric point and \a ulPtIndex - * the corresponding index in the mesh kernel. */ - void AddPoint (const MeshPoint &rclPt, ElementIndex ulPtIndex, float fEpsilon = 0.0f); - /** Returns the grid numbers to the given point \a rclPoint. */ - void Pos(const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const; - /** Returns the number of stored elements. */ - unsigned long HasElements () const override - { return _pclMesh->CountPoints(); } - /** Rebuilds the grid structure. */ - void RebuildGrid () override; + /** Adds a new point element to the grid structure. \a rclPt is the geometric point and \a + * ulPtIndex the corresponding index in the mesh kernel. */ + void AddPoint(const MeshPoint& rclPt, ElementIndex ulPtIndex, float fEpsilon = 0.0f); + /** Returns the grid numbers to the given point \a rclPoint. */ + void Pos(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const; + /** Returns the number of stored elements. */ + unsigned long HasElements() const override + { + return _pclMesh->CountPoints(); + } + /** Rebuilds the grid structure. */ + void RebuildGrid() override; }; /** @@ -286,201 +353,255 @@ protected: class MeshExport MeshGridIterator { public: - /// Construction - explicit MeshGridIterator (const MeshGrid &rclG); - /** Returns the bounding box of the current grid element. */ - Base::BoundBox3f GetBoundBox () const - { return _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ); } - /** Returns indices of the elements in the current grid. */ - void GetElements (std::vector &raulElements) const - { - raulElements.insert(raulElements.end(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); - } - /** Returns the number of elements in the current grid. */ - unsigned long GetCtElements() const - { - return _rclGrid.GetCtElements(_ulX, _ulY, _ulZ); - } - /** @name Iteration */ - //@{ - /** Sets the iterator to the first element*/ - void Init () - { _ulX = _ulY = _ulZ = 0; } - /** Checks if the iterator has not yet reached the end position. */ - bool More () const - { return (_ulZ < _rclGrid._ulCtGridsZ); } - /** Go to the next grid. */ - void Next () - { - if (++_ulX >= (_rclGrid._ulCtGridsX)) _ulX = 0; else return; - if (++_ulY >= (_rclGrid._ulCtGridsY)) { _ulY = 0; _ulZ++; } else return; - } - //@} + /// Construction + explicit MeshGridIterator(const MeshGrid& rclG); + /** Returns the bounding box of the current grid element. */ + Base::BoundBox3f GetBoundBox() const + { + return _rclGrid.GetBoundBox(_ulX, _ulY, _ulZ); + } + /** Returns indices of the elements in the current grid. */ + void GetElements(std::vector& raulElements) const + { + raulElements.insert(raulElements.end(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].begin(), + _rclGrid._aulGrid[_ulX][_ulY][_ulZ].end()); + } + /** Returns the number of elements in the current grid. */ + unsigned long GetCtElements() const + { + return _rclGrid.GetCtElements(_ulX, _ulY, _ulZ); + } + /** @name Iteration */ + //@{ + /** Sets the iterator to the first element*/ + void Init() + { + _ulX = _ulY = _ulZ = 0; + } + /** Checks if the iterator has not yet reached the end position. */ + bool More() const + { + return (_ulZ < _rclGrid._ulCtGridsZ); + } + /** Go to the next grid. */ + void Next() + { + if (++_ulX >= (_rclGrid._ulCtGridsX)) { + _ulX = 0; + } + else { + return; + } + if (++_ulY >= (_rclGrid._ulCtGridsY)) { + _ulY = 0; + _ulZ++; + } + else { + return; + } + } + //@} - /** @name Tests with rays */ - //@{ - /** Searches for facets around the ray. */ - bool InitOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, std::vector &raulElements); - /** Searches for facets around the ray. */ - bool InitOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxSearchArea, std::vector &raulElements); - /** Searches for facets around the ray. */ - bool NextOnRay (std::vector &raulElements); - //@} + /** @name Tests with rays */ + //@{ + /** Searches for facets around the ray. */ + bool InitOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + std::vector& raulElements); + /** Searches for facets around the ray. */ + bool InitOnRay(const Base::Vector3f& rclPt, + const Base::Vector3f& rclDir, + float fMaxSearchArea, + std::vector& raulElements); + /** Searches for facets around the ray. */ + bool NextOnRay(std::vector& raulElements); + //@} - /** Returns the grid number of the current position. */ - void GetGridPos (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const - { rulX = _ulX; rulY = _ulY; rulZ = _ulZ; } + /** Returns the grid number of the current position. */ + void GetGridPos(unsigned long& rulX, unsigned long& rulY, unsigned long& rulZ) const + { + rulX = _ulX; + rulY = _ulY; + rulZ = _ulZ; + } protected: - const MeshGrid& _rclGrid; /**< The mesh kernel. */ - unsigned long _ulX{0}; /**< Number of grids in x. */ - unsigned long _ulY{0}; /**< Number of grids in y. */ - unsigned long _ulZ{0}; /**< Number of grids in z. */ - Base::Vector3f _clPt; /**< Base point of search ray. */ - Base::Vector3f _clDir; /**< Direction of search ray. */ - bool _bValidRay{false}; /**< Search ray ok? */ - float _fMaxSearchArea{FLOAT_MAX}; - /** Checks if a grid position is already visited by NextOnRay(). */ - struct GridElement - { - GridElement( unsigned long x, unsigned long y, unsigned long z) - { this->x = x; this->y = y; this->z = z; } - bool operator < (const GridElement& pos) const + const MeshGrid& _rclGrid; /**< The mesh kernel. */ + unsigned long _ulX {0}; /**< Number of grids in x. */ + unsigned long _ulY {0}; /**< Number of grids in y. */ + unsigned long _ulZ {0}; /**< Number of grids in z. */ + Base::Vector3f _clPt; /**< Base point of search ray. */ + Base::Vector3f _clDir; /**< Direction of search ray. */ + bool _bValidRay {false}; /**< Search ray ok? */ + float _fMaxSearchArea {FLOAT_MAX}; + /** Checks if a grid position is already visited by NextOnRay(). */ + struct GridElement { - if ( x == pos.x) - { if ( y == pos.y) return z < pos.z; else return y < pos.y; } - else - { return x < pos.x; } - } - private: - unsigned long x,y,z; - }; - std::set _cSearchPositions; + GridElement(unsigned long x, unsigned long y, unsigned long z) + { + this->x = x; + this->y = y; + this->z = z; + } + bool operator<(const GridElement& pos) const + { + if (x == pos.x) { + if (y == pos.y) { + return z < pos.z; + } + else { + return y < pos.y; + } + } + else { + return x < pos.x; + } + } + + private: + unsigned long x, y, z; + }; + std::set _cSearchPositions; }; // -------------------------------------------------------------- -inline Base::BoundBox3f MeshGrid::GetBoundBox (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const +inline Base::BoundBox3f +MeshGrid::GetBoundBox(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const { - float fX, fY, fZ; + float fX, fY, fZ; - fX = _fMinX + (float(ulX) * _fGridLenX); - fY = _fMinY + (float(ulY) * _fGridLenY); - fZ = _fMinZ + (float(ulZ) * _fGridLenZ); + fX = _fMinX + (float(ulX) * _fGridLenX); + fY = _fMinY + (float(ulY) * _fGridLenY); + fZ = _fMinZ + (float(ulZ) * _fGridLenZ); - return Base::BoundBox3f(fX, fY, fZ, fX + _fGridLenX, fY + _fGridLenY, fZ + _fGridLenZ); + return Base::BoundBox3f(fX, fY, fZ, fX + _fGridLenX, fY + _fGridLenY, fZ + _fGridLenZ); } -inline Base::BoundBox3f MeshGrid::GetBoundBox () const +inline Base::BoundBox3f MeshGrid::GetBoundBox() const { - return Base::BoundBox3f(_fMinX, _fMinY, _fMinZ, _fMinX + (_fGridLenX * float(_ulCtGridsX)), - _fMinY + (_fGridLenY * float(_ulCtGridsY)), _fMinZ + (_fGridLenZ * float(_ulCtGridsZ))); + return Base::BoundBox3f(_fMinX, + _fMinY, + _fMinZ, + _fMinX + (_fGridLenX * float(_ulCtGridsX)), + _fMinY + (_fGridLenY * float(_ulCtGridsY)), + _fMinZ + (_fGridLenZ * float(_ulCtGridsZ))); } -inline Base::BoundBox3f MeshGrid::GetMeshBoundBox () const +inline Base::BoundBox3f MeshGrid::GetMeshBoundBox() const { - Base::BoundBox3f clBBenlarged = _pclMesh->GetBoundBox(); - clBBenlarged.Enlarge(MESHGRID_BBOX_EXTENSION); + Base::BoundBox3f clBBenlarged = _pclMesh->GetBoundBox(); + clBBenlarged.Enlarge(MESHGRID_BBOX_EXTENSION); - return clBBenlarged; + return clBBenlarged; } -inline bool MeshGrid::CheckPos (unsigned long ulX, unsigned long ulY, unsigned long ulZ) const +inline bool MeshGrid::CheckPos(unsigned long ulX, unsigned long ulY, unsigned long ulZ) const { - return ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)); + return ((ulX < _ulCtGridsX) && (ulY < _ulCtGridsY) && (ulZ < _ulCtGridsZ)); } // -------------------------------------------------------------- -inline void MeshFacetGrid::Pos (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const +inline void MeshFacetGrid::Pos(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const { - rulX = static_cast((rclPoint.x - _fMinX) / _fGridLenX); - rulY = static_cast((rclPoint.y - _fMinY) / _fGridLenY); - rulZ = static_cast((rclPoint.z - _fMinZ) / _fGridLenZ); - - assert((rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ)); -} - -inline void MeshFacetGrid::PosWithCheck (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const -{ - if ( rclPoint.x < _fMinX) - rulX = 0; - else - { rulX = static_cast((rclPoint.x - _fMinX) / _fGridLenX); - if (rulX >= _ulCtGridsX) - rulX = (_ulCtGridsX-1); - } - - if ( rclPoint.y < _fMinY) - rulY = 0; - else - { rulY = static_cast((rclPoint.y - _fMinY) / _fGridLenY); - if (rulY >= _ulCtGridsY) - rulY = (_ulCtGridsY-1); - } - - if ( rclPoint.z < _fMinZ) - rulZ = 0; - else - { rulZ = static_cast((rclPoint.z - _fMinZ) / _fGridLenZ); - if (rulZ >= _ulCtGridsZ) - rulZ = (_ulCtGridsZ-1); - } - assert((rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ)); + assert((rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ)); } -inline void MeshFacetGrid::AddFacet (const MeshGeomFacet &rclFacet, ElementIndex ulFacetIndex, float /*fEpsilon*/) +inline void MeshFacetGrid::PosWithCheck(const Base::Vector3f& rclPoint, + unsigned long& rulX, + unsigned long& rulY, + unsigned long& rulZ) const { - unsigned long ulX, ulY, ulZ; - - unsigned long ulX1, ulY1, ulZ1, ulX2, ulY2, ulZ2; - - Base::BoundBox3f clBB; - - clBB.Add(rclFacet._aclPoints[0]); - clBB.Add(rclFacet._aclPoints[1]); - clBB.Add(rclFacet._aclPoints[2]); - - //float fDiagonalLength = clBB.CalcDiagonalLength(); - - //clBB.Enlarge(fEpsilon*fDiagonalLength); - - Pos(Base::Vector3f(clBB.MinX,clBB.MinY,clBB.MinZ), ulX1, ulY1, ulZ1); - Pos(Base::Vector3f(clBB.MaxX,clBB.MaxY,clBB.MaxZ), ulX2, ulY2, ulZ2); - - /* - if (ulX1 > 0) ulX1--; - if (ulY1 > 0) ulY1--; - if (ulZ1 > 0) ulZ1--; - - if (ulX2 < (_ulCtGridsX-1)) ulX2++; - if (ulY2 < (_ulCtGridsY-1)) ulY2++; - if (ulZ2 < (_ulCtGridsZ-1)) ulZ2++; - */ - - // falls Facet ueber mehrere BB reicht - if ((ulX1 < ulX2) || (ulY1 < ulY2) || (ulZ1 < ulZ2)) - { - for (ulX = ulX1; ulX <= ulX2; ulX++) - { - for (ulY = ulY1; ulY <= ulY2; ulY++) - { - for (ulZ = ulZ1; ulZ <= ulZ2; ulZ++) - { - if ( rclFacet.IntersectBoundingBox( GetBoundBox(ulX, ulY, ulZ) ) ) - _aulGrid[ulX][ulY][ulZ].insert(ulFacetIndex); - } - } + if (rclPoint.x < _fMinX) { + rulX = 0; } - } - else - _aulGrid[ulX1][ulY1][ulZ1].insert(ulFacetIndex); + else { + rulX = static_cast((rclPoint.x - _fMinX) / _fGridLenX); + if (rulX >= _ulCtGridsX) { + rulX = (_ulCtGridsX - 1); + } + } + + if (rclPoint.y < _fMinY) { + rulY = 0; + } + else { + rulY = static_cast((rclPoint.y - _fMinY) / _fGridLenY); + if (rulY >= _ulCtGridsY) { + rulY = (_ulCtGridsY - 1); + } + } + + if (rclPoint.z < _fMinZ) { + rulZ = 0; + } + else { + rulZ = static_cast((rclPoint.z - _fMinZ) / _fGridLenZ); + if (rulZ >= _ulCtGridsZ) { + rulZ = (_ulCtGridsZ - 1); + } + } + + assert((rulX < _ulCtGridsX) && (rulY < _ulCtGridsY) && (rulZ < _ulCtGridsZ)); } -} // namespace MeshCore +inline void MeshFacetGrid::AddFacet(const MeshGeomFacet& rclFacet, + ElementIndex ulFacetIndex, + float /*fEpsilon*/) +{ + unsigned long ulX, ulY, ulZ; -#endif // MESH_GRID_H + unsigned long ulX1, ulY1, ulZ1, ulX2, ulY2, ulZ2; + + Base::BoundBox3f clBB; + + clBB.Add(rclFacet._aclPoints[0]); + clBB.Add(rclFacet._aclPoints[1]); + clBB.Add(rclFacet._aclPoints[2]); + + // float fDiagonalLength = clBB.CalcDiagonalLength(); + + // clBB.Enlarge(fEpsilon*fDiagonalLength); + + Pos(Base::Vector3f(clBB.MinX, clBB.MinY, clBB.MinZ), ulX1, ulY1, ulZ1); + Pos(Base::Vector3f(clBB.MaxX, clBB.MaxY, clBB.MaxZ), ulX2, ulY2, ulZ2); + + /* + if (ulX1 > 0) ulX1--; + if (ulY1 > 0) ulY1--; + if (ulZ1 > 0) ulZ1--; + + if (ulX2 < (_ulCtGridsX-1)) ulX2++; + if (ulY2 < (_ulCtGridsY-1)) ulY2++; + if (ulZ2 < (_ulCtGridsZ-1)) ulZ2++; + */ + + // falls Facet ueber mehrere BB reicht + if ((ulX1 < ulX2) || (ulY1 < ulY2) || (ulZ1 < ulZ2)) { + for (ulX = ulX1; ulX <= ulX2; ulX++) { + for (ulY = ulY1; ulY <= ulY2; ulY++) { + for (ulZ = ulZ1; ulZ <= ulZ2; ulZ++) { + if (rclFacet.IntersectBoundingBox(GetBoundBox(ulX, ulY, ulZ))) { + _aulGrid[ulX][ulY][ulZ].insert(ulFacetIndex); + } + } + } + } + } + else { + _aulGrid[ulX1][ulY1][ulZ1].insert(ulFacetIndex); + } +} + +} // namespace MeshCore + +#endif // MESH_GRID_H diff --git a/src/Mod/Mesh/App/Core/Helpers.h b/src/Mod/Mesh/App/Core/Helpers.h index b5dbc4390b..0e7ab2f5bc 100644 --- a/src/Mod/Mesh/App/Core/Helpers.h +++ b/src/Mod/Mesh/App/Core/Helpers.h @@ -26,26 +26,31 @@ #include "Elements.h" -namespace MeshCore { +namespace MeshCore +{ /** * Helper class for points. */ struct MeshExport MeshHelpPoint { - inline void Set (FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f &rclPt); + inline void Set(FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f& rclPt); - inline bool operator < (const MeshHelpPoint &rclObj) const; - inline bool operator == (const MeshHelpPoint &rclObj) const; + inline bool operator<(const MeshHelpPoint& rclObj) const; + inline bool operator==(const MeshHelpPoint& rclObj) const; - FacetIndex Index () const - { return _ulInd >> 2; } + FacetIndex Index() const + { + return _ulInd >> 2; + } - FacetIndex Corner () const - { return _ulInd & 3; } + FacetIndex Corner() const + { + return _ulInd & 3; + } - MeshPoint _clPt; - FacetIndex _ulInd; + MeshPoint _clPt; + FacetIndex _ulInd; }; /** @@ -53,7 +58,7 @@ struct MeshExport MeshHelpPoint */ struct MeshPointBuilder: public std::vector { - inline void Add (FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f &rclPt); + inline void Add(FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f& rclPt); }; /** @@ -61,24 +66,27 @@ struct MeshPointBuilder: public std::vector */ struct MeshExport MeshHelpBuilderEdge { - FacetIndex Side () const - { return _ulFIndex & 3; } + FacetIndex Side() const + { + return _ulFIndex & 3; + } - FacetIndex Index () const - { return _ulFIndex >> 2; } + FacetIndex Index() const + { + return _ulFIndex >> 2; + } - inline void Set (PointIndex ulInd1, PointIndex ulInd2, - FacetIndex ulSide, FacetIndex ulFInd); + inline void Set(PointIndex ulInd1, PointIndex ulInd2, FacetIndex ulSide, FacetIndex ulFInd); - inline bool operator < (const MeshHelpBuilderEdge &rclObj) const; + inline bool operator<(const MeshHelpBuilderEdge& rclObj) const; - inline bool operator == (const MeshHelpBuilderEdge &rclObj) const; + inline bool operator==(const MeshHelpBuilderEdge& rclObj) const; - inline bool operator != (const MeshHelpBuilderEdge &rclObj) const; + inline bool operator!=(const MeshHelpBuilderEdge& rclObj) const; - FacetIndex _ulFIndex; // facet index - PointIndex _aulInd[2]; // point index + FacetIndex _ulFIndex; // facet index + PointIndex _aulInd[2]; // point index }; /** @@ -86,84 +94,87 @@ struct MeshExport MeshHelpBuilderEdge */ struct MeshEdgeBuilder: public std::vector { - using _TIterator = std::vector::iterator; - inline void Add (PointIndex ulInd1, PointIndex ulInd2, FacetIndex ulSide, FacetIndex ulFInd); + using _TIterator = std::vector::iterator; + inline void Add(PointIndex ulInd1, PointIndex ulInd2, FacetIndex ulSide, FacetIndex ulFInd); }; -inline void MeshHelpPoint::Set (FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f &rclPt) +inline void MeshHelpPoint::Set(FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f& rclPt) { - _ulInd = (ulFacet << 2) | ulCorner; - _clPt = rclPt; + _ulInd = (ulFacet << 2) | ulCorner; + _clPt = rclPt; } -inline bool MeshHelpPoint::operator < (const MeshHelpPoint &rclObj) const +inline bool MeshHelpPoint::operator<(const MeshHelpPoint& rclObj) const { - if (_clPt.x == rclObj._clPt.x) - { - if (_clPt.y == rclObj._clPt.y) - return _clPt.z < rclObj._clPt.z; - else - return _clPt.y < rclObj._clPt.y; - } - else - return _clPt.x < rclObj._clPt.x; + if (_clPt.x == rclObj._clPt.x) { + if (_clPt.y == rclObj._clPt.y) { + return _clPt.z < rclObj._clPt.z; + } + else { + return _clPt.y < rclObj._clPt.y; + } + } + else { + return _clPt.x < rclObj._clPt.x; + } } -inline bool MeshHelpPoint::operator == (const MeshHelpPoint &rclObj) const +inline bool MeshHelpPoint::operator==(const MeshHelpPoint& rclObj) const { - return Base::DistanceP2(_clPt, rclObj._clPt) < MeshDefinitions::_fMinPointDistanceP2; + return Base::DistanceP2(_clPt, rclObj._clPt) < MeshDefinitions::_fMinPointDistanceP2; } -inline void MeshPointBuilder::Add (FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f &rclPt) +inline void +MeshPointBuilder::Add(FacetIndex ulCorner, FacetIndex ulFacet, const Base::Vector3f& rclPt) { - MeshHelpPoint clObj; - clObj.Set(ulCorner, ulFacet, rclPt); - push_back(clObj); + MeshHelpPoint clObj; + clObj.Set(ulCorner, ulFacet, rclPt); + push_back(clObj); } -inline void MeshHelpBuilderEdge::Set (PointIndex ulInd1, PointIndex ulInd2, - FacetIndex ulSide, FacetIndex ulFInd) +inline void +MeshHelpBuilderEdge::Set(PointIndex ulInd1, PointIndex ulInd2, FacetIndex ulSide, FacetIndex ulFInd) { - if (ulInd1 < ulInd2) - { - _aulInd[0] = ulInd1; - _aulInd[1] = ulInd2; - } - else - { - _aulInd[0] = ulInd2; - _aulInd[1] = ulInd1; - } - _ulFIndex = (ulFInd << 2) | ulSide; + if (ulInd1 < ulInd2) { + _aulInd[0] = ulInd1; + _aulInd[1] = ulInd2; + } + else { + _aulInd[0] = ulInd2; + _aulInd[1] = ulInd1; + } + _ulFIndex = (ulFInd << 2) | ulSide; } -inline bool MeshHelpBuilderEdge::operator < (const MeshHelpBuilderEdge &rclObj) const +inline bool MeshHelpBuilderEdge::operator<(const MeshHelpBuilderEdge& rclObj) const { - if (_aulInd[0] == rclObj._aulInd[0]) - return _aulInd[1] < rclObj._aulInd[1]; - else - return _aulInd[0] < rclObj._aulInd[0]; + if (_aulInd[0] == rclObj._aulInd[0]) { + return _aulInd[1] < rclObj._aulInd[1]; + } + else { + return _aulInd[0] < rclObj._aulInd[0]; + } } -inline bool MeshHelpBuilderEdge::operator == (const MeshHelpBuilderEdge &rclObj) const +inline bool MeshHelpBuilderEdge::operator==(const MeshHelpBuilderEdge& rclObj) const { - return (_aulInd[0] == rclObj._aulInd[0]) && (_aulInd[1] == rclObj._aulInd[1]); + return (_aulInd[0] == rclObj._aulInd[0]) && (_aulInd[1] == rclObj._aulInd[1]); } -inline bool MeshHelpBuilderEdge::operator != (const MeshHelpBuilderEdge &rclObj) const +inline bool MeshHelpBuilderEdge::operator!=(const MeshHelpBuilderEdge& rclObj) const { - return (_aulInd[0] != rclObj._aulInd[0]) || (_aulInd[1] != rclObj._aulInd[1]); + return (_aulInd[0] != rclObj._aulInd[0]) || (_aulInd[1] != rclObj._aulInd[1]); } -inline void MeshEdgeBuilder::Add (PointIndex ulInd1, PointIndex ulInd2, - FacetIndex ulSide, FacetIndex ulFInd) +inline void +MeshEdgeBuilder::Add(PointIndex ulInd1, PointIndex ulInd2, FacetIndex ulSide, FacetIndex ulFInd) { - MeshHelpBuilderEdge clObj; - clObj.Set(ulInd1, ulInd2, ulSide, ulFInd); - push_back(clObj); + MeshHelpBuilderEdge clObj; + clObj.Set(ulInd1, ulInd2, ulSide, ulFInd); + push_back(clObj); } -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_HELPERS_H +#endif // MESH_HELPERS_H diff --git a/src/Mod/Mesh/App/Core/IO/Reader3MF.cpp b/src/Mod/Mesh/App/Core/IO/Reader3MF.cpp index 5dbe53dbb5..eeb595cd76 100644 --- a/src/Mod/Mesh/App/Core/IO/Reader3MF.cpp +++ b/src/Mod/Mesh/App/Core/IO/Reader3MF.cpp @@ -22,19 +22,19 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif +#include "Core/MeshIO.h" +#include "Core/MeshKernel.h" #include #include #include -#include "Core/MeshIO.h" -#include "Core/MeshKernel.h" #include #include "Reader3MF.h" @@ -43,7 +43,7 @@ using namespace MeshCore; XERCES_CPP_NAMESPACE_USE -Reader3MF::Reader3MF(std::istream &str) +Reader3MF::Reader3MF(std::istream& str) { zipios::ZipHeader zipHeader(str); if (zipHeader.isValid()) { @@ -51,7 +51,7 @@ Reader3MF::Reader3MF(std::istream &str) } } -Reader3MF::Reader3MF(const std::string &filename) +Reader3MF::Reader3MF(const std::string& filename) { zipios::ZipFile zipFile(filename); if (zipFile.isValid()) { @@ -73,8 +73,9 @@ std::vector Reader3MF::GetMeshIds() const bool Reader3MF::Load() { try { - if (!zip) + if (!zip) { return false; + } return LoadModel(*zip); } catch (const std::exception&) { @@ -107,12 +108,14 @@ bool Reader3MF::LoadModel(std::istream& str) bool Reader3MF::LoadModel(DOMDocument& xmlDocument) { - DOMNodeList *nodes = xmlDocument.getElementsByTagName(XStr("model").unicodeForm()); + DOMNodeList* nodes = xmlDocument.getElementsByTagName(XStr("model").unicodeForm()); for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* node = nodes->item(i); if (node->getNodeType() == DOMNode::ELEMENT_NODE) { - bool resource = LoadResources(static_cast(node)->getElementsByTagName(XStr("resources").unicodeForm())); - bool build = LoadBuild(static_cast(node)->getElementsByTagName(XStr("build").unicodeForm())); + bool resource = LoadResources(static_cast(node)->getElementsByTagName( + XStr("resources").unicodeForm())); + bool build = LoadBuild( + static_cast(node)->getElementsByTagName(XStr("build").unicodeForm())); return (resource && build); } } @@ -122,13 +125,15 @@ bool Reader3MF::LoadModel(DOMDocument& xmlDocument) bool Reader3MF::LoadResources(DOMNodeList* nodes) { - if (!nodes) + if (!nodes) { return false; + } for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* node = nodes->item(i); if (node->getNodeType() == DOMNode::ELEMENT_NODE) { - DOMNodeList *objectList = static_cast(node)->getElementsByTagName(XStr("object").unicodeForm()); + DOMNodeList* objectList = + static_cast(node)->getElementsByTagName(XStr("object").unicodeForm()); return LoadObjects(objectList); } } @@ -138,13 +143,15 @@ bool Reader3MF::LoadResources(DOMNodeList* nodes) bool Reader3MF::LoadBuild(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) { - if (!nodes) + if (!nodes) { return false; + } for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* node = nodes->item(i); if (node->getNodeType() == DOMNode::ELEMENT_NODE) { - DOMNodeList *objectList = static_cast(node)->getElementsByTagName(XStr("item").unicodeForm()); + DOMNodeList* objectList = + static_cast(node)->getElementsByTagName(XStr("item").unicodeForm()); return LoadItems(objectList); } } @@ -155,8 +162,9 @@ bool Reader3MF::LoadBuild(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) bool Reader3MF::LoadItems(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) { const std::size_t numEntries = 12; - if (!nodes) + if (!nodes) { return false; + } for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* itemNode = nodes->item(i); @@ -166,11 +174,12 @@ bool Reader3MF::LoadItems(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) int idValue = std::stoi(id); Base::Matrix4D mat; - DOMNode* transformAttr = itemNode->getAttributes()->getNamedItem(XStr("transform").unicodeForm()); + DOMNode* transformAttr = + itemNode->getAttributes()->getNamedItem(XStr("transform").unicodeForm()); if (transformAttr) { std::string transform = StrX(transformAttr->getNodeValue()).c_str(); boost::char_separator sep(" ,"); - boost::tokenizer > tokens(transform, sep); + boost::tokenizer> tokens(transform, sep); std::vector token_results; token_results.assign(tokens.begin(), tokens.end()); if (token_results.size() == numEntries) { @@ -202,8 +211,9 @@ bool Reader3MF::LoadItems(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) bool Reader3MF::LoadObjects(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) { - if (!nodes) + if (!nodes) { return false; + } for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* objectNode = nodes->item(i); @@ -211,7 +221,8 @@ bool Reader3MF::LoadObjects(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) DOMNode* idAttr = objectNode->getAttributes()->getNamedItem(XStr("id").unicodeForm()); if (idAttr) { int id = std::stoi(StrX(idAttr->getNodeValue()).c_str()); - DOMNodeList *meshList = static_cast(objectNode)->getElementsByTagName(XStr("mesh").unicodeForm()); + DOMNodeList* meshList = static_cast(objectNode) + ->getElementsByTagName(XStr("mesh").unicodeForm()); LoadMesh(meshList, id); } } @@ -222,16 +233,21 @@ bool Reader3MF::LoadObjects(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes) void Reader3MF::LoadMesh(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes, int id) { - if (!nodes) + if (!nodes) { return; + } for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* node = nodes->item(i); if (node->getNodeType() == DOMNode::ELEMENT_NODE) { MeshPointArray points; MeshFacetArray facets; - LoadVertices(static_cast(node)->getElementsByTagName(XStr("vertices").unicodeForm()), points); - LoadTriangles(static_cast(node)->getElementsByTagName(XStr("triangles").unicodeForm()), facets); + LoadVertices(static_cast(node)->getElementsByTagName( + XStr("vertices").unicodeForm()), + points); + LoadTriangles(static_cast(node)->getElementsByTagName( + XStr("triangles").unicodeForm()), + facets); MeshCleanup meshCleanup(points, facets); meshCleanup.RemoveInvalids(); @@ -245,15 +261,18 @@ void Reader3MF::LoadMesh(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes, int } } -void Reader3MF::LoadVertices(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes, MeshPointArray& points) +void Reader3MF::LoadVertices(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes, + MeshPointArray& points) { - if (!nodes) + if (!nodes) { return; + } for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* node = nodes->item(i); if (node->getNodeType() == DOMNode::ELEMENT_NODE) { - DOMNodeList *vertexList = static_cast(node)->getElementsByTagName(XStr("vertex").unicodeForm()); + DOMNodeList* vertexList = + static_cast(node)->getElementsByTagName(XStr("vertex").unicodeForm()); if (vertexList) { XMLSize_t numVertices = vertexList->getLength(); points.reserve(numVertices); @@ -277,15 +296,18 @@ void Reader3MF::LoadVertices(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes, } } -void Reader3MF::LoadTriangles(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes, MeshFacetArray& facets) +void Reader3MF::LoadTriangles(XERCES_CPP_NAMESPACE_QUALIFIER DOMNodeList* nodes, + MeshFacetArray& facets) { - if (!nodes) + if (!nodes) { return; + } for (XMLSize_t i = 0; i < nodes->getLength(); i++) { DOMNode* node = nodes->item(i); if (node->getNodeType() == DOMNode::ELEMENT_NODE) { - DOMNodeList *triangleList = static_cast(node)->getElementsByTagName(XStr("triangle").unicodeForm()); + DOMNodeList* triangleList = static_cast(node)->getElementsByTagName( + XStr("triangle").unicodeForm()); if (triangleList) { XMLSize_t numTriangles = triangleList->getLength(); facets.reserve(numTriangles); diff --git a/src/Mod/Mesh/App/Core/IO/Reader3MF.h b/src/Mod/Mesh/App/Core/IO/Reader3MF.h index 439e70de10..93c705b940 100644 --- a/src/Mod/Mesh/App/Core/IO/Reader3MF.h +++ b/src/Mod/Mesh/App/Core/IO/Reader3MF.h @@ -24,12 +24,12 @@ #ifndef MESH_IO_READER_3MF_H #define MESH_IO_READER_3MF_H +#include +#include #include #include #include #include -#include -#include XERCES_CPP_NAMESPACE_BEGIN class DOMDocument; @@ -49,7 +49,7 @@ public: * * Passes an input stream to the constructor. */ - explicit Reader3MF(std::istream &str); + explicit Reader3MF(std::istream& str); /*! * \brief Reader3MF @@ -57,17 +57,19 @@ public: * * Passes a file name to the constructor */ - explicit Reader3MF(const std::string &filename); + explicit Reader3MF(const std::string& filename); /*! * \brief Load the mesh from the input stream or file * \return true on success and false otherwise */ bool Load(); std::vector GetMeshIds() const; - const MeshKernel& GetMesh(int id) const { + const MeshKernel& GetMesh(int id) const + { return meshes.at(id).first; } - const Base::Matrix4D& GetTransform(int id) const { + const Base::Matrix4D& GetTransform(int id) const + { return meshes.at(id).second; } @@ -88,7 +90,7 @@ private: std::unique_ptr zip; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_IO_READER_3MF_H diff --git a/src/Mod/Mesh/App/Core/IO/ReaderOBJ.cpp b/src/Mod/Mesh/App/Core/IO/ReaderOBJ.cpp index a601a4025b..706442f87c 100644 --- a/src/Mod/Mesh/App/Core/IO/ReaderOBJ.cpp +++ b/src/Mod/Mesh/App/Core/IO/ReaderOBJ.cpp @@ -22,15 +22,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif -#include #include "Core/MeshIO.h" #include "Core/MeshKernel.h" +#include #include "ReaderOBJ.h" @@ -38,53 +38,54 @@ using namespace MeshCore; ReaderOBJ::ReaderOBJ(MeshKernel& kernel, Material* material) - : _kernel(kernel) - , _material(material) -{ -} + : _kernel(kernel) + , _material(material) +{} -bool ReaderOBJ::Load(std::istream &str) +bool ReaderOBJ::Load(std::istream& str) { boost::regex rx_m("^mtllib\\s+(.+)\\s*$"); boost::regex rx_u(R"(^usemtl\s+([\x21-\x7E]+)\s*$)"); boost::regex rx_g(R"(^g\s+([\x21-\x7E]+)\s*$)"); boost::regex rx_p("^v\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); boost::regex rx_c("^v\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+(\\d{1,3})\\s+(\\d{1,3})\\s+(\\d{1,3})\\s*$"); + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+(\\d{1,3})\\s+(\\d{1,3})\\s+(\\d{1,3})\\s*$"); boost::regex rx_t("^v\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); boost::regex rx_f3("^f\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" - "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" - "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*\\s*$"); + "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" + "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*\\s*$"); boost::regex rx_f4("^f\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" - "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" - "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" - "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*\\s*$"); + "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" + "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*" + "\\s+([-+]?[0-9]+)/?[-+]?[0-9]*/?[-+]?[0-9]*\\s*$"); boost::cmatch what; - unsigned long segment=0; + unsigned long segment = 0; MeshPointArray meshPoints; MeshFacetArray meshFacets; std::string line; float fX, fY, fZ; - int i1=1, i2=1, i3=1, i4=1; + int i1 = 1, i2 = 1, i3 = 1, i4 = 1; MeshFacet item; - if (!str || str.bad()) + if (!str || str.bad()) { return false; + } std::streambuf* buf = str.rdbuf(); - if (!buf) + if (!buf) { return false; + } MeshIO::Binding rgb_value = MeshIO::OVERALL; bool new_segment = true; @@ -108,7 +109,7 @@ bool ReaderOBJ::Load(std::istream &str) float b = std::min(std::atof(what[12].first), 255) / 255.0f; meshPoints.push_back(MeshPoint(Base::Vector3f(fX, fY, fZ))); - App::Color c(r,g,b); + App::Color c(r, g, b); unsigned long prop = static_cast(c.getPackedValue()); meshPoints.back().SetProperty(prop); rgb_value = MeshIO::PER_VERTEX; @@ -122,7 +123,7 @@ bool ReaderOBJ::Load(std::istream &str) float b = static_cast(std::atof(what[16].first)); meshPoints.push_back(MeshPoint(Base::Vector3f(fX, fY, fZ))); - App::Color c(r,g,b); + App::Color c(r, g, b); unsigned long prop = static_cast(c.getPackedValue()); meshPoints.back().SetProperty(prop); rgb_value = MeshIO::PER_VERTEX; @@ -132,8 +133,9 @@ bool ReaderOBJ::Load(std::istream &str) groupName = Base::Tools::escapedUnicodeToUtf8(what[1].first); } else if (boost::regex_match(line.c_str(), what, rx_m)) { - if (_material) + if (_material) { _material->library = Base::Tools::escapedUnicodeToUtf8(what[1].first); + } } else if (boost::regex_match(line.c_str(), what, rx_u)) { if (!materialName.empty()) { @@ -155,12 +157,12 @@ bool ReaderOBJ::Load(std::istream &str) // 3-vertex face i1 = std::atoi(what[1].first); - i1 = i1 > 0 ? i1-1 : i1+static_cast(meshPoints.size()); + i1 = i1 > 0 ? i1 - 1 : i1 + static_cast(meshPoints.size()); i2 = std::atoi(what[2].first); - i2 = i2 > 0 ? i2-1 : i2+static_cast(meshPoints.size()); + i2 = i2 > 0 ? i2 - 1 : i2 + static_cast(meshPoints.size()); i3 = std::atoi(what[3].first); - i3 = i3 > 0 ? i3-1 : i3+static_cast(meshPoints.size()); - item.SetVertices(i1,i2,i3); + i3 = i3 > 0 ? i3 - 1 : i3 + static_cast(meshPoints.size()); + item.SetVertices(i1, i2, i3); item.SetProperty(segment); meshFacets.push_back(item); countMaterialFacets++; @@ -178,20 +180,20 @@ bool ReaderOBJ::Load(std::istream &str) // 4-vertex face i1 = std::atoi(what[1].first); - i1 = i1 > 0 ? i1-1 : i1+static_cast(meshPoints.size()); + i1 = i1 > 0 ? i1 - 1 : i1 + static_cast(meshPoints.size()); i2 = std::atoi(what[2].first); - i2 = i2 > 0 ? i2-1 : i2+static_cast(meshPoints.size()); + i2 = i2 > 0 ? i2 - 1 : i2 + static_cast(meshPoints.size()); i3 = std::atoi(what[3].first); - i3 = i3 > 0 ? i3-1 : i3+static_cast(meshPoints.size()); + i3 = i3 > 0 ? i3 - 1 : i3 + static_cast(meshPoints.size()); i4 = std::atoi(what[4].first); - i4 = i4 > 0 ? i4-1 : i4+static_cast(meshPoints.size()); + i4 = i4 > 0 ? i4 - 1 : i4 + static_cast(meshPoints.size()); - item.SetVertices(i1,i2,i3); + item.SetVertices(i1, i2, i3); item.SetProperty(segment); meshFacets.push_back(item); countMaterialFacets++; - item.SetVertices(i3,i4,i1); + item.SetVertices(i3, i4, i1); item.SetProperty(segment); meshFacets.push_back(item); countMaterialFacets++; @@ -209,7 +211,7 @@ bool ReaderOBJ::Load(std::istream &str) _material->binding = MeshIO::PER_VERTEX; _material->diffuseColor.reserve(meshPoints.size()); - for (const auto & it : meshPoints) { + for (const auto& it : meshPoints) { unsigned long prop = it._ulProp; App::Color c; c.setPackedValue(static_cast(prop)); @@ -218,40 +220,44 @@ bool ReaderOBJ::Load(std::istream &str) } } else if (!materialName.empty()) { - // At this point the materials from the .mtl file are not known and will be read-in by the calling instance - // but the color list is pre-filled with a default value + // At this point the materials from the .mtl file are not known and will be read-in by the + // calling instance but the color list is pre-filled with a default value if (_material) { _material->binding = MeshIO::PER_FACE; _material->diffuseColor.resize(meshFacets.size(), App::Color(0.8f, 0.8f, 0.8f)); } } - _kernel.Clear(); // remove all data before + _kernel.Clear(); // remove all data before MeshCleanup meshCleanup(meshPoints, meshFacets); - if (_material) + if (_material) { meshCleanup.SetMaterial(_material); + } meshCleanup.RemoveInvalids(); - MeshPointFacetAdjacency meshAdj(meshPoints.size(),meshFacets); + MeshPointFacetAdjacency meshAdj(meshPoints.size(), meshFacets); meshAdj.SetFacetNeighbourhood(); - _kernel.Adopt(meshPoints,meshFacets); + _kernel.Adopt(meshPoints, meshFacets); return true; } -bool ReaderOBJ::LoadMaterial(std::istream &str) +bool ReaderOBJ::LoadMaterial(std::istream& str) { std::string line; - if (!_material) + if (!_material) { return false; + } - if (!str || str.bad()) + if (!str || str.bad()) { return false; + } std::streambuf* buf = str.rdbuf(); - if (!buf) + if (!buf) { return false; + } std::map materialAmbientColor; std::map materialDiffuseColor; @@ -281,9 +287,9 @@ bool ReaderOBJ::LoadMaterial(std::istream &str) while (std::getline(str, line)) { boost::char_separator sep(" "); - boost::tokenizer > tokens(line, sep); + boost::tokenizer> tokens(line, sep); std::vector token_results; - token_results.assign(tokens.begin(),tokens.end()); + token_results.assign(tokens.begin(), tokens.end()); try { if (token_results.size() >= 2) { @@ -312,7 +318,7 @@ bool ReaderOBJ::LoadMaterial(std::istream &str) } } - for (const auto & it : _materialNames) { + for (const auto& it : _materialNames) { { auto jt = materialAmbientColor.find(it.first); if (jt != materialAmbientColor.end()) { diff --git a/src/Mod/Mesh/App/Core/IO/ReaderOBJ.h b/src/Mod/Mesh/App/Core/IO/ReaderOBJ.h index 96ac75cb94..e951a959e0 100644 --- a/src/Mod/Mesh/App/Core/IO/ReaderOBJ.h +++ b/src/Mod/Mesh/App/Core/IO/ReaderOBJ.h @@ -24,9 +24,9 @@ #ifndef MESH_IO_READER_OBJ_H #define MESH_IO_READER_OBJ_H -#include #include #include +#include namespace MeshCore { @@ -46,16 +46,17 @@ public: * \brief Load the mesh from the input stream * \return true on success and false otherwise */ - bool Load(std::istream &str); + bool Load(std::istream& str); /*! * \brief Load the material file to the corresponding OBJ file. * This function must be called after \ref Load(). * \param str * \return true on success and false otherwise */ - bool LoadMaterial(std::istream &str); + bool LoadMaterial(std::istream& str); - const std::vector& GetGroupNames() const { + const std::vector& GetGroupNames() const + { return _groupNames; } @@ -63,10 +64,10 @@ private: MeshKernel& _kernel; Material* _material; std::vector _groupNames; - std::vector > _materialNames; + std::vector> _materialNames; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_IO_READER_OBJ_H diff --git a/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp b/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp index 15c29286da..05937ca3e8 100644 --- a/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp +++ b/src/Mod/Mesh/App/Core/IO/Writer3MF.cpp @@ -22,28 +22,28 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif -#include #include "Core/Evaluation.h" #include "Core/MeshKernel.h" +#include #include "Writer3MF.h" using namespace MeshCore; -Writer3MF::Writer3MF(std::ostream &str) - : zip(str) +Writer3MF::Writer3MF(std::ostream& str) + : zip(str) { zip.putNextEntry("3D/3dmodel.model"); Initialize(zip); } -Writer3MF::Writer3MF(const std::string &filename) - : zip(filename) +Writer3MF::Writer3MF(const std::string& filename) + : zip(filename) { zip.putNextEntry("3D/3dmodel.model"); Initialize(zip); @@ -54,15 +54,16 @@ void Writer3MF::SetForceModel(bool model) forceModel = model; } -void Writer3MF::Initialize(std::ostream &str) +void Writer3MF::Initialize(std::ostream& str) { str << "\n" - "\n" + "\n" " FreeCAD\n"; str << Base::blanks(1) << "\n"; } -void Writer3MF::Finish(std::ostream &str) +void Writer3MF::Finish(std::ostream& str) { str << Base::blanks(1) << "\n"; str << Base::blanks(1) << "\n"; @@ -110,7 +111,7 @@ bool Writer3MF::Save() return true; } -bool Writer3MF::SaveObject(std::ostream &str, int id, const MeshKernel& mesh) const +bool Writer3MF::SaveObject(std::ostream& str, int id, const MeshKernel& mesh) const { // NOLINTBEGIN(readability-magic-numbers, cppcoreguidelines-avoid-magic-numbers) const MeshPointArray& rPoints = mesh.GetPoints(); @@ -127,20 +128,16 @@ bool Writer3MF::SaveObject(std::ostream &str, int id, const MeshKernel& mesh) co str << Base::blanks(4) << "\n"; std::size_t index = 0; for (auto it = rPoints.begin(); it != rPoints.end(); ++it, ++index) { - str << Base::blanks(5) << "x - << "\" y=\"" << it->y - << "\" z=\"" << it->z - << "\" />\n"; + str << Base::blanks(5) << "x << "\" y=\"" << it->y << "\" z=\"" + << it->z << "\" />\n"; } str << Base::blanks(4) << "\n"; // facet indices str << Base::blanks(4) << "\n"; - for (const auto & it : rFacets) { - str << Base::blanks(5) << "\n"; + for (const auto& it : rFacets) { + str << Base::blanks(5) << "\n"; } str << Base::blanks(4) << "\n"; @@ -173,25 +170,24 @@ std::string Writer3MF::DumpMatrix(const Base::Matrix4D& mat) // 3D Manufacturing Format / Core Specification & Reference Guide v1.2.3 // Chapter: 3.3 3D Matrices (page 9) std::stringstream str; - str << mat[0][0] << " " << mat[1][0] << " " << mat[2][0] << " " - << mat[0][1] << " " << mat[1][1] << " " << mat[2][1] << " " - << mat[0][2] << " " << mat[1][2] << " " << mat[2][2] << " " + str << mat[0][0] << " " << mat[1][0] << " " << mat[2][0] << " " << mat[0][1] << " " << mat[1][1] + << " " << mat[2][1] << " " << mat[0][2] << " " << mat[1][2] << " " << mat[2][2] << " " << mat[0][3] << " " << mat[1][3] << " " << mat[2][3]; return str.str(); // NOLINTEND(cppcoreguidelines-pro-bounds-pointer-arithmetic) } -bool Writer3MF::SaveRels(std::ostream &str) const +bool Writer3MF::SaveRels(std::ostream& str) const { // NOLINTBEGIN(modernize-raw-string-literal) int ids = 1; str << "\n" - << "\n" + << "\n" << " \n"; for (const auto& it : resources) { - str << " \n"; } str << "\n"; @@ -199,15 +195,17 @@ bool Writer3MF::SaveRels(std::ostream &str) const // NOLINTEND(modernize-raw-string-literal) } -bool Writer3MF::SaveContent(std::ostream &str) const +bool Writer3MF::SaveContent(std::ostream& str) const { str << "\n" << "\n" - << " \n" - << " \n"; + << " \n" + << " \n"; for (const auto& it : resources) { - str << " \n"; + str << " \n"; } str << ""; return true; diff --git a/src/Mod/Mesh/App/Core/IO/Writer3MF.h b/src/Mod/Mesh/App/Core/IO/Writer3MF.h index cb5f5df834..af0813dec8 100644 --- a/src/Mod/Mesh/App/Core/IO/Writer3MF.h +++ b/src/Mod/Mesh/App/Core/IO/Writer3MF.h @@ -24,11 +24,12 @@ #ifndef MESH_IO_WRITER_3MF_H #define MESH_IO_WRITER_3MF_H +#include #include #include -#include -namespace Base { +namespace Base +{ class Matrix4D; } @@ -36,7 +37,8 @@ namespace MeshCore { class MeshKernel; -struct Resource3MF { +struct Resource3MF +{ std::string extension; std::string contentType; std::string relationshipTarget; @@ -54,14 +56,14 @@ public: * Passes an output stream to the constructor. * \param str */ - explicit Writer3MF(std::ostream &str); + explicit Writer3MF(std::ostream& str); /*! * \brief Writer3MF * Passes a file name to the constructor * \param filename */ - explicit Writer3MF(const std::string &filename); + explicit Writer3MF(const std::string& filename); /*! * \brief SetForceModel * Forcces to write the mesh as model even if itsn't a solid. @@ -88,14 +90,14 @@ public: bool Save(); private: - static void Initialize(std::ostream &str); - void Finish(std::ostream &str); + static void Initialize(std::ostream& str); + void Finish(std::ostream& str); std::string GetType(const MeshKernel& mesh) const; void SaveBuildItem(int id, const Base::Matrix4D& mat); static std::string DumpMatrix(const Base::Matrix4D& mat); - bool SaveObject(std::ostream &str, int id, const MeshKernel& mesh) const; - bool SaveRels(std::ostream &str) const; - bool SaveContent(std::ostream &str) const; + bool SaveObject(std::ostream& str, int id, const MeshKernel& mesh) const; + bool SaveRels(std::ostream& str) const; + bool SaveContent(std::ostream& str) const; private: zipios::ZipOutputStream zip; @@ -105,7 +107,7 @@ private: bool forceModel = true; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_IO_WRITER_3MF_H diff --git a/src/Mod/Mesh/App/Core/IO/WriterInventor.cpp b/src/Mod/Mesh/App/Core/IO/WriterInventor.cpp index f19487ed66..aa401c2091 100644 --- a/src/Mod/Mesh/App/Core/IO/WriterInventor.cpp +++ b/src/Mod/Mesh/App/Core/IO/WriterInventor.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" +#include "Core/Iterator.h" #include #include -#include "Core/Iterator.h" #include "WriterInventor.h" @@ -43,8 +43,7 @@ public: WriterInventorImp(Base::InventorBuilder& builder) : builder(builder) - { - } + {} void setupStream(std::ostream& out) { @@ -54,31 +53,29 @@ public: void addInfoNode() { - Base::InfoItem info{"Created by FreeCAD "}; + Base::InfoItem info {"Created by FreeCAD "}; builder.addNode(info); } void addLabel(const MeshCore::MeshKernel& kernel) { std::stringstream str; - str << "Triangle mesh contains " - << kernel.CountPoints() - << " vertices and " - << kernel.CountFacets() - << " faces"; - Base::LabelItem label{str.str().c_str()}; + str << "Triangle mesh contains " << kernel.CountPoints() << " vertices and " + << kernel.CountFacets() << " faces"; + Base::LabelItem label {str.str().c_str()}; builder.addNode(label); } void addTransformNode(const Base::Matrix4D& mat, bool append) { - if (!append) + if (!append) { return; + } Base::Placement placement; placement.fromMatrix(mat); - Base::TransformItem item{placement}; + Base::TransformItem item {placement}; builder.addNode(item); } @@ -100,7 +97,7 @@ public: ++clIter; } - builder.addNode(Base::NormalItem{normals}); + builder.addNode(Base::NormalItem {normals}); Base::NormalBindingItem binding; binding.setValue(Base::BindingElement::Binding::PerFace); @@ -116,20 +113,24 @@ public: coords.reserve(points.size()); coords.insert(coords.begin(), points.begin(), points.end()); - builder.addNode(Base::Coordinate3Item{coords}); + builder.addNode(Base::Coordinate3Item {coords}); } void addMaterialNode(const Material* material) { - if (!material) + if (!material) { return; + } auto transformColors = [](const std::vector& input) { std::vector output; output.reserve(input.size()); - std::transform(input.cbegin(), input.cend(), std::back_inserter(output), [](const App::Color& col) { - return Base::ColorRGB{col.r, col.g, col.b}; - }); + std::transform(input.cbegin(), + input.cend(), + std::back_inserter(output), + [](const App::Color& col) { + return Base::ColorRGB {col.r, col.g, col.b}; + }); return output; }; @@ -146,20 +147,21 @@ public: void addMaterialBindingNode(const Material* material) { - if (!material) + if (!material) { return; + } Base::MaterialBindingItem binding; switch (material->binding) { - case MeshIO::PER_FACE: - binding.setValue(Base::BindingElement::Binding::PerFace); - break; - case MeshIO::PER_VERTEX: - binding.setValue(Base::BindingElement::Binding::PerVertex); - break; - default: - binding.setValue(Base::BindingElement::Binding::Overall); - break; + case MeshIO::PER_FACE: + binding.setValue(Base::BindingElement::Binding::PerFace); + break; + case MeshIO::PER_VERTEX: + binding.setValue(Base::BindingElement::Binding::PerVertex); + break; + default: + binding.setValue(Base::BindingElement::Binding::Overall); + break; } builder.addNode(binding); @@ -178,32 +180,33 @@ public: indices.push_back(-1); } - builder.addNode(Base::IndexedFaceSetItem{indices}); + builder.addNode(Base::IndexedFaceSetItem {indices}); } }; WriterInventor::WriterInventor(const MeshKernel& kernel, const Material* material) - : _kernel(kernel) - , _material(material) -{ -} + : _kernel(kernel) + , _material(material) +{} void WriterInventor::SetTransform(const Base::Matrix4D& mat) { _transform = mat; - if (mat != Base::Matrix4D()) + if (mat != Base::Matrix4D()) { apply_transform = true; + } } bool WriterInventor::Save(std::ostream& out) { - if (WriterInventorImp::isStreamInvalid(out)) + if (WriterInventorImp::isStreamInvalid(out)) { return false; + } Base::InventorBuilder builder(out); builder.beginSeparator(); - WriterInventorImp writer{builder}; + WriterInventorImp writer {builder}; writer.setupStream(out); writer.addInfoNode(); writer.addLabel(_kernel); diff --git a/src/Mod/Mesh/App/Core/IO/WriterInventor.h b/src/Mod/Mesh/App/Core/IO/WriterInventor.h index 5d25c188e1..fa56725166 100644 --- a/src/Mod/Mesh/App/Core/IO/WriterInventor.h +++ b/src/Mod/Mesh/App/Core/IO/WriterInventor.h @@ -24,8 +24,8 @@ #ifndef MESH_IO_WRITER_IV_H #define MESH_IO_WRITER_IV_H -#include #include +#include namespace MeshCore { @@ -52,10 +52,10 @@ private: const MeshKernel& _kernel; const Material* _material; Base::Matrix4D _transform; - bool apply_transform{false}; + bool apply_transform {false}; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_IO_WRITER_IV_H diff --git a/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp b/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp index 534bed80a7..6ae501772b 100644 --- a/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp +++ b/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp @@ -22,10 +22,10 @@ #include "PreCompiled.h" +#include "Core/Iterator.h" #include #include #include -#include "Core/Iterator.h" #include "WriterOBJ.h" @@ -34,24 +34,25 @@ using namespace MeshCore; struct WriterOBJ::Color_Less { - bool operator()(const App::Color& x, - const App::Color& y) const + bool operator()(const App::Color& x, const App::Color& y) const { - if (x.r != y.r) + if (x.r != y.r) { return x.r < y.r; - if (x.g != y.g) + } + if (x.g != y.g) { return x.g < y.g; - if (x.b != y.b) + } + if (x.b != y.b) { return x.b < y.b; - return false; // equal colors + } + return false; // equal colors } }; WriterOBJ::WriterOBJ(const MeshKernel& kernel, const Material* material) - : _kernel(kernel) - , _material(material) -{ -} + : _kernel(kernel) + , _material(material) +{} void WriterOBJ::SetGroups(const std::vector& g) { @@ -61,8 +62,9 @@ void WriterOBJ::SetGroups(const std::vector& g) void WriterOBJ::SetTransform(const Base::Matrix4D& mat) { _transform = mat; - if (mat != Base::Matrix4D()) + if (mat != Base::Matrix4D()) { apply_transform = true; + } } bool WriterOBJ::Save(std::ostream& out) @@ -70,8 +72,9 @@ bool WriterOBJ::Save(std::ostream& out) const MeshPointArray& rPoints = _kernel.GetPoints(); const MeshFacetArray& rFacets = _kernel.GetFacets(); - if (!out || out.bad()) + if (!out || out.bad()) { return false; + } Base::SequencerLauncher seq("saving...", _kernel.CountPoints() + _kernel.CountFacets()); bool exportColorPerVertex = false; @@ -80,7 +83,8 @@ bool WriterOBJ::Save(std::ostream& out) if (_material) { if (_material->binding == MeshIO::PER_FACE) { if (_material->diffuseColor.size() != rFacets.size()) { - Base::Console().Warning("Cannot export color information because there is a different number of faces and colors"); + Base::Console().Warning("Cannot export color information because there is a " + "different number of faces and colors"); } else { exportColorPerFace = true; @@ -88,7 +92,8 @@ bool WriterOBJ::Save(std::ostream& out) } else if (_material->binding == MeshIO::PER_VERTEX) { if (_material->diffuseColor.size() != rPoints.size()) { - Base::Console().Warning("Cannot export color information because there is a different number of points and colors"); + Base::Console().Warning("Cannot export color information because there is a " + "different number of points and colors"); } else { exportColorPerVertex = true; @@ -96,7 +101,8 @@ bool WriterOBJ::Save(std::ostream& out) } else if (_material->binding == MeshIO::OVERALL) { if (_material->diffuseColor.empty()) { - Base::Console().Warning("Cannot export color information because there is no color defined"); + Base::Console().Warning( + "Cannot export color information because there is no color defined"); } else { exportColorPerVertex = true; @@ -137,12 +143,13 @@ bool WriterOBJ::Save(std::ostream& out) int g = static_cast(c.g * 255.0f); int b = static_cast(c.b * 255.0f); - out << "v " << pt.x << " " << pt.y << " " << pt.z << " " << r << " " << g << " " << b << '\n'; + out << "v " << pt.x << " " << pt.y << " " << pt.z << " " << r << " " << g << " " << b + << '\n'; } else { out << "v " << pt.x << " " << pt.y << " " << pt.z << '\n'; } - seq.next(true); // allow to cancel + seq.next(true); // allow to cancel } // Export normals MeshFacetIterator clIter(_kernel), clEnd(_kernel); @@ -153,11 +160,10 @@ bool WriterOBJ::Save(std::ostream& out) while (clIter < clEnd) { pclFacet = &(*clIter); - out << "vn " << pclFacet->GetNormal().x << " " - << pclFacet->GetNormal().y << " " + out << "vn " << pclFacet->GetNormal().x << " " << pclFacet->GetNormal().y << " " << pclFacet->GetNormal().z << '\n'; ++clIter; - seq.next(true); // allow to cancel + seq.next(true); // allow to cancel } if (_groups.empty()) { @@ -173,29 +179,31 @@ bool WriterOBJ::Save(std::ostream& out) App::Color prev; int faceIdx = 1; const std::vector& Kd = _material->diffuseColor; - for (MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); ++it, index++) { + for (MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); + ++it, index++) { if (index == 0 || prev != Kd[index]) { prev = Kd[index]; - std::vector::iterator c_it = std::find(colors.begin(), colors.end(), prev); + std::vector::iterator c_it = + std::find(colors.begin(), colors.end(), prev); if (c_it != colors.end()) { out << "usemtl material_" << (c_it - colors.begin()) << '\n'; } } - out << "f " << it->_aulPoints[0]+1 << "//" << faceIdx << " " - << it->_aulPoints[1]+1 << "//" << faceIdx << " " - << it->_aulPoints[2]+1 << "//" << faceIdx << '\n'; - seq.next(true); // allow to cancel + out << "f " << it->_aulPoints[0] + 1 << "//" << faceIdx << " " + << it->_aulPoints[1] + 1 << "//" << faceIdx << " " << it->_aulPoints[2] + 1 + << "//" << faceIdx << '\n'; + seq.next(true); // allow to cancel faceIdx++; } } else { // facet indices (no texture and normal indices) std::size_t faceIdx = 1; - for (const auto & it : rFacets) { - out << "f " << it._aulPoints[0]+1 << "//" << faceIdx << " " - << it._aulPoints[1]+1 << "//" << faceIdx << " " - << it._aulPoints[2]+1 << "//" << faceIdx << '\n'; - seq.next(true); // allow to cancel + for (const auto& it : rFacets) { + out << "f " << it._aulPoints[0] + 1 << "//" << faceIdx << " " + << it._aulPoints[1] + 1 << "//" << faceIdx << " " << it._aulPoints[2] + 1 + << "//" << faceIdx << '\n'; + seq.next(true); // allow to cancel faceIdx++; } } @@ -211,35 +219,36 @@ bool WriterOBJ::Save(std::ostream& out) App::Color prev; const std::vector& Kd = _material->diffuseColor; - for (const auto & gt : _groups) { + for (const auto& gt : _groups) { out << "g " << Base::Tools::escapedUnicodeFromUtf8(gt.name.c_str()) << '\n'; for (FacetIndex it : gt.indices) { const MeshFacet& f = rFacets[it]; if (first || prev != Kd[it]) { first = false; prev = Kd[it]; - std::vector::iterator c_it = std::find(colors.begin(), colors.end(), prev); + std::vector::iterator c_it = + std::find(colors.begin(), colors.end(), prev); if (c_it != colors.end()) { out << "usemtl material_" << (c_it - colors.begin()) << '\n'; } } - out << "f " << f._aulPoints[0]+1 << "//" << it + 1 << " " - << f._aulPoints[1]+1 << "//" << it + 1 << " " - << f._aulPoints[2]+1 << "//" << it + 1 << '\n'; - seq.next(true); // allow to cancel + out << "f " << f._aulPoints[0] + 1 << "//" << it + 1 << " " + << f._aulPoints[1] + 1 << "//" << it + 1 << " " << f._aulPoints[2] + 1 + << "//" << it + 1 << '\n'; + seq.next(true); // allow to cancel } } } else { - for (const auto & gt : _groups) { + for (const auto& gt : _groups) { out << "g " << Base::Tools::escapedUnicodeFromUtf8(gt.name.c_str()) << '\n'; for (FacetIndex it : gt.indices) { const MeshFacet& f = rFacets[it]; - out << "f " << f._aulPoints[0]+1 << "//" << it + 1 << " " - << f._aulPoints[1]+1 << "//" << it + 1 << " " - << f._aulPoints[2]+1 << "//" << it + 1 << '\n'; - seq.next(true); // allow to cancel + out << "f " << f._aulPoints[0] + 1 << "//" << it + 1 << " " + << f._aulPoints[1] + 1 << "//" << it + 1 << " " << f._aulPoints[2] + 1 + << "//" << it + 1 << '\n'; + seq.next(true); // allow to cancel } } } @@ -250,8 +259,9 @@ bool WriterOBJ::Save(std::ostream& out) bool WriterOBJ::SaveMaterial(std::ostream& out) { - if (!out || out.bad()) + if (!out || out.bad()) { return false; + } if (_material) { if (_material->binding == MeshIO::PER_FACE) { @@ -265,7 +275,7 @@ bool WriterOBJ::SaveMaterial(std::ostream& out) out << "# Created by FreeCAD : 'None'\n"; out << "# Material Count: " << Kd.size() << '\n'; - for (std::size_t i=0; i #include +#include namespace MeshCore { @@ -66,11 +66,11 @@ private: const MeshKernel& _kernel; const Material* _material; Base::Matrix4D _transform; - bool apply_transform{false}; + bool apply_transform {false}; std::vector _groups; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_IO_WRITER_OBJ_H diff --git a/src/Mod/Mesh/App/Core/Info.cpp b/src/Mod/Mesh/App/Core/Info.cpp index a7f80fe47b..2269f567b5 100644 --- a/src/Mod/Mesh/App/Core/Info.cpp +++ b/src/Mod/Mesh/App/Core/Info.cpp @@ -23,10 +23,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include "Info.h" @@ -35,218 +35,205 @@ using namespace MeshCore; -MeshInfo::MeshInfo (const MeshKernel &rclM) -: _rclMesh(rclM) +MeshInfo::MeshInfo(const MeshKernel& rclM) + : _rclMesh(rclM) +{} + +std::ostream& MeshInfo::GeneralInformation(std::ostream& rclStream) const { + unsigned long ulCtPt, ulCtEd, ulCtFc; + ulCtPt = _rclMesh.CountPoints(); + ulCtFc = _rclMesh.CountFacets(); + ulCtEd = _rclMesh.CountEdges(); + + rclStream << "Mesh: [" << ulCtFc << " Faces, "; + rclStream << ulCtEd << " Edges, "; + rclStream << ulCtPt << " Points" + << "]" << std::endl; + + return rclStream; } -std::ostream& MeshInfo::GeneralInformation (std::ostream &rclStream) const +std::ostream& MeshInfo::DetailedPointInfo(std::ostream& rclStream) const { - unsigned long ulCtPt, ulCtEd, ulCtFc; - ulCtPt = _rclMesh.CountPoints(); - ulCtFc = _rclMesh.CountFacets(); - ulCtEd = _rclMesh.CountEdges(); + // print points + rclStream << _rclMesh.CountPoints() << " Points:" << std::endl; + MeshPointIterator pPIter(_rclMesh), pPEnd(_rclMesh); + pPIter.Begin(); + pPEnd.End(); + PointIndex i = 0; - rclStream << "Mesh: [" - << ulCtFc << " Faces, "; - rclStream << ulCtEd << " Edges, "; - rclStream << ulCtPt << " Points" - << "]" << std::endl; - - return rclStream; -} - -std::ostream& MeshInfo::DetailedPointInfo (std::ostream& rclStream) const -{ - // print points - rclStream << _rclMesh.CountPoints() << " Points:" << std::endl; - MeshPointIterator pPIter(_rclMesh), pPEnd(_rclMesh); - pPIter.Begin(); - pPEnd.End(); - PointIndex i = 0; - - rclStream.precision(3); - rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); - while (pPIter < pPEnd) - { - rclStream << "P " << std::setw(4) << (i++) << ": (" - << std::setw(8) << (*pPIter).x << ", " - << std::setw(8) << (*pPIter).y << ", " - << std::setw(8) << (*pPIter).z << ")" << std::endl; - ++pPIter; - } - - return rclStream; -} - -std::ostream& MeshInfo::DetailedEdgeInfo (std::ostream& rclStream) const -{ - // print edges - // get edges from facets - std::map, int > lEdges; - - const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - MeshFacetArray::_TConstIterator pFIter; - pFIter = rFacets.begin(); - while (pFIter < rFacets.end()) - { - const MeshFacet& rFacet = *pFIter; - for ( int j=0; j<3; j++ ) - { - PointIndex ulPt0 = std::min(rFacet._aulPoints[j], rFacet._aulPoints[(j+1)%3]); - PointIndex ulPt1 = std::max(rFacet._aulPoints[j], rFacet._aulPoints[(j+1)%3]); - std::pair cEdge(ulPt0, ulPt1); - lEdges[ cEdge ]++; + rclStream.precision(3); + rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); + while (pPIter < pPEnd) { + rclStream << "P " << std::setw(4) << (i++) << ": (" << std::setw(8) << (*pPIter).x << ", " + << std::setw(8) << (*pPIter).y << ", " << std::setw(8) << (*pPIter).z << ")" + << std::endl; + ++pPIter; } - pFIter++; - } - - // print edges - rclStream << lEdges.size() << " Edges:" << std::endl; - std::map, int >::const_iterator pEIter; - pEIter = lEdges.begin(); - - rclStream.precision(3); - rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); - unsigned long i=0; - const MeshPointArray& rPoints = _rclMesh.GetPoints(); - while (pEIter != lEdges.end()) - { - int ct = pEIter->second; - const Base::Vector3f& rP0 = rPoints[ pEIter->first.first ]; - const Base::Vector3f& rP1 = rPoints[ pEIter->first.second ]; - - rclStream << "E " << std::setw(4) << (i++) << ": " - << " P (" << std::setw(8) << rP0.x << ", " - << std::setw(8) << rP0.y << ", " - << std::setw(8) << rP0.z << "); " - << " P (" << std::setw(8) << rP1.x << ", " - << std::setw(8) << rP1.y << ", " - << std::setw(8) << rP1.z << "), B: " << (ct == 2 ? "n" : "y") << std::endl; - ++pEIter; - } - - return rclStream; + return rclStream; } -std::ostream& MeshInfo::DetailedFacetInfo (std::ostream& rclStream) const +std::ostream& MeshInfo::DetailedEdgeInfo(std::ostream& rclStream) const { - // print facets - unsigned long i, j; - rclStream << _rclMesh.CountFacets() << " Faces:" << std::endl; - MeshFacetIterator pFIter(_rclMesh), pFEnd(_rclMesh); - pFIter.Begin(); - pFEnd.End(); - i = 0; + // print edges + // get edges from facets + std::map, int> lEdges; - rclStream.precision(3); - rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); - while (pFIter < pFEnd) - { - rclStream << "F " << std::setw(4) << (i++) << ":" << std::endl; - rclStream << " N (" << std::setw(8) << (*pFIter).GetNormal().x << ", " - << std::setw(8) << (*pFIter).GetNormal().y << ", " - << std::setw(8) << (*pFIter).GetNormal().z << ")" << std::endl; - for (j = 0; j < 3; j++) - { - rclStream << " P (" << std::setw(8) << (*pFIter)._aclPoints[j].x << ", " - << std::setw(8) << (*pFIter)._aclPoints[j].y << ", " - << std::setw(8) << (*pFIter)._aclPoints[j].z << ")" << std::endl; + const MeshFacetArray& rFacets = _rclMesh.GetFacets(); + MeshFacetArray::_TConstIterator pFIter; + pFIter = rFacets.begin(); + while (pFIter < rFacets.end()) { + const MeshFacet& rFacet = *pFIter; + for (int j = 0; j < 3; j++) { + PointIndex ulPt0 = + std::min(rFacet._aulPoints[j], rFacet._aulPoints[(j + 1) % 3]); + PointIndex ulPt1 = + std::max(rFacet._aulPoints[j], rFacet._aulPoints[(j + 1) % 3]); + std::pair cEdge(ulPt0, ulPt1); + lEdges[cEdge]++; + } + + pFIter++; } - ++pFIter; - } - return rclStream; + // print edges + rclStream << lEdges.size() << " Edges:" << std::endl; + std::map, int>::const_iterator pEIter; + pEIter = lEdges.begin(); + + rclStream.precision(3); + rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); + unsigned long i = 0; + const MeshPointArray& rPoints = _rclMesh.GetPoints(); + while (pEIter != lEdges.end()) { + int ct = pEIter->second; + const Base::Vector3f& rP0 = rPoints[pEIter->first.first]; + const Base::Vector3f& rP1 = rPoints[pEIter->first.second]; + + rclStream << "E " << std::setw(4) << (i++) << ": " + << " P (" << std::setw(8) << rP0.x << ", " << std::setw(8) << rP0.y << ", " + << std::setw(8) << rP0.z << "); " + << " P (" << std::setw(8) << rP1.x << ", " << std::setw(8) << rP1.y << ", " + << std::setw(8) << rP1.z << "), B: " << (ct == 2 ? "n" : "y") << std::endl; + ++pEIter; + } + + return rclStream; } -std::ostream& MeshInfo::DetailedInformation (std::ostream& rclStream) const +std::ostream& MeshInfo::DetailedFacetInfo(std::ostream& rclStream) const { - DetailedPointInfo( rclStream ); - DetailedEdgeInfo ( rclStream ); - DetailedFacetInfo( rclStream ); + // print facets + unsigned long i, j; + rclStream << _rclMesh.CountFacets() << " Faces:" << std::endl; + MeshFacetIterator pFIter(_rclMesh), pFEnd(_rclMesh); + pFIter.Begin(); + pFEnd.End(); + i = 0; - return rclStream; + rclStream.precision(3); + rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); + while (pFIter < pFEnd) { + rclStream << "F " << std::setw(4) << (i++) << ":" << std::endl; + rclStream << " N (" << std::setw(8) << (*pFIter).GetNormal().x << ", " << std::setw(8) + << (*pFIter).GetNormal().y << ", " << std::setw(8) << (*pFIter).GetNormal().z + << ")" << std::endl; + for (j = 0; j < 3; j++) { + rclStream << " P (" << std::setw(8) << (*pFIter)._aclPoints[j].x << ", " + << std::setw(8) << (*pFIter)._aclPoints[j].y << ", " << std::setw(8) + << (*pFIter)._aclPoints[j].z << ")" << std::endl; + } + ++pFIter; + } + + return rclStream; } -std::ostream& MeshInfo::InternalPointInfo (std::ostream& rclStream) const +std::ostream& MeshInfo::DetailedInformation(std::ostream& rclStream) const { - // print points - unsigned long i; - rclStream << _rclMesh.CountPoints() << " Points:" << std::endl; - MeshPointIterator pPIter(_rclMesh), pPEnd(_rclMesh); - pPIter.Begin(); - pPEnd.End(); - i = 0; + DetailedPointInfo(rclStream); + DetailedEdgeInfo(rclStream); + DetailedFacetInfo(rclStream); - rclStream.precision(3); - rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); - while (pPIter < pPEnd) - { - rclStream << "P " << std::setw(4) << (i++) << ": (" - << std::setw(8) << (*pPIter).x << ", " - << std::setw(8) << (*pPIter).y << ", " - << std::setw(8) << (*pPIter).z << ")"; - if (pPIter->IsValid()) - rclStream << std::endl; - else - rclStream << " invalid" << std::endl; - ++pPIter; - } - - return rclStream; + return rclStream; } -std::ostream& MeshInfo::InternalFacetInfo (std::ostream& rclStream) const +std::ostream& MeshInfo::InternalPointInfo(std::ostream& rclStream) const { - // print facets - unsigned long i; - rclStream << _rclMesh.CountFacets() << " Faces:" << std::endl; + // print points + unsigned long i; + rclStream << _rclMesh.CountPoints() << " Points:" << std::endl; + MeshPointIterator pPIter(_rclMesh), pPEnd(_rclMesh); + pPIter.Begin(); + pPEnd.End(); + i = 0; - const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - MeshFacetArray::_TConstIterator pFIter; - pFIter = rFacets.begin(); - i = 0; - while (pFIter < rFacets.end()) - { - rclStream << "F " << std::setw(4) << (i++) << ": P (" - << std::setw(4) << pFIter->_aulPoints[0] << ", " - << std::setw(4) << pFIter->_aulPoints[1] << ", " - << std::setw(4) << pFIter->_aulPoints[2] << ") " - << "N (" << std::setw(4) << pFIter->_aulNeighbours[0] << ", " - << std::setw(4) << pFIter->_aulNeighbours[1] << ", " - << std::setw(4) << pFIter->_aulNeighbours[2] << ") "; + rclStream.precision(3); + rclStream.setf(std::ios::fixed | std::ios::showpoint | std::ios::showpos); + while (pPIter < pPEnd) { + rclStream << "P " << std::setw(4) << (i++) << ": (" << std::setw(8) << (*pPIter).x << ", " + << std::setw(8) << (*pPIter).y << ", " << std::setw(8) << (*pPIter).z << ")"; + if (pPIter->IsValid()) { + rclStream << std::endl; + } + else { + rclStream << " invalid" << std::endl; + } + ++pPIter; + } - if (pFIter->IsValid()) - rclStream << std::endl; - else - rclStream << " invalid" << std::endl; - - pFIter++; - } - - return rclStream; + return rclStream; } -std::ostream& MeshInfo::InternalInformation (std::ostream& rclStream) const +std::ostream& MeshInfo::InternalFacetInfo(std::ostream& rclStream) const { - InternalPointInfo( rclStream ); - InternalFacetInfo( rclStream ); + // print facets + unsigned long i; + rclStream << _rclMesh.CountFacets() << " Faces:" << std::endl; - return rclStream; + const MeshFacetArray& rFacets = _rclMesh.GetFacets(); + MeshFacetArray::_TConstIterator pFIter; + pFIter = rFacets.begin(); + i = 0; + while (pFIter < rFacets.end()) { + rclStream << "F " << std::setw(4) << (i++) << ": P (" << std::setw(4) + << pFIter->_aulPoints[0] << ", " << std::setw(4) << pFIter->_aulPoints[1] << ", " + << std::setw(4) << pFIter->_aulPoints[2] << ") " + << "N (" << std::setw(4) << pFIter->_aulNeighbours[0] << ", " << std::setw(4) + << pFIter->_aulNeighbours[1] << ", " << std::setw(4) << pFIter->_aulNeighbours[2] + << ") "; + + if (pFIter->IsValid()) { + rclStream << std::endl; + } + else { + rclStream << " invalid" << std::endl; + } + + pFIter++; + } + + return rclStream; } -std::ostream& MeshInfo::TopologyInformation (std::ostream& rclStream) const +std::ostream& MeshInfo::InternalInformation(std::ostream& rclStream) const +{ + InternalPointInfo(rclStream); + InternalFacetInfo(rclStream); + + return rclStream; +} + +std::ostream& MeshInfo::TopologyInformation(std::ostream& rclStream) const { unsigned long index = 0; const MeshFacetArray& rFAry = _rclMesh.GetFacets(); for (MeshFacetArray::_TConstIterator it = rFAry.begin(); it != rFAry.end(); ++it, ++index) { - rclStream << "F " << std::setw(4) << index << ": P (" - << it->_aulPoints[0] << ", " - << it->_aulPoints[1] << ", " - << it->_aulPoints[2] << "), N (" - << it->_aulNeighbours[0] << ", " - << it->_aulNeighbours[1] << ", " + rclStream << "F " << std::setw(4) << index << ": P (" << it->_aulPoints[0] << ", " + << it->_aulPoints[1] << ", " << it->_aulPoints[2] << "), N (" + << it->_aulNeighbours[0] << ", " << it->_aulNeighbours[1] << ", " << it->_aulNeighbours[2] << ")" << std::endl; } diff --git a/src/Mod/Mesh/App/Core/Info.h b/src/Mod/Mesh/App/Core/Info.h index eb224e9916..930c89a54e 100644 --- a/src/Mod/Mesh/App/Core/Info.h +++ b/src/Mod/Mesh/App/Core/Info.h @@ -26,7 +26,8 @@ #include "MeshKernel.h" -namespace MeshCore { +namespace MeshCore +{ class MeshKernel; @@ -36,56 +37,56 @@ class MeshKernel; class MeshExport MeshInfo { public: - explicit MeshInfo (const MeshKernel &rclM); - virtual ~MeshInfo () = default; - /** - * Writes general information about the mesh structure into the stream. - */ - std::ostream& GeneralInformation (std::ostream& rclStream) const; - /** - * Writes detailed information about the mesh structure into the stream. - */ - std::ostream& DetailedInformation (std::ostream& rclStream) const; - /** - * Writes internal information about the mesh structure into the stream. - */ - std::ostream& InternalInformation (std::ostream& rclStream) const; - /** - * Writes topological information about the mesh structure into the stream. - */ - std::ostream& TopologyInformation (std::ostream& rclStream) const; + explicit MeshInfo(const MeshKernel& rclM); + virtual ~MeshInfo() = default; + /** + * Writes general information about the mesh structure into the stream. + */ + std::ostream& GeneralInformation(std::ostream& rclStream) const; + /** + * Writes detailed information about the mesh structure into the stream. + */ + std::ostream& DetailedInformation(std::ostream& rclStream) const; + /** + * Writes internal information about the mesh structure into the stream. + */ + std::ostream& InternalInformation(std::ostream& rclStream) const; + /** + * Writes topological information about the mesh structure into the stream. + */ + std::ostream& TopologyInformation(std::ostream& rclStream) const; protected: - /** - * Writes detailed point information. - */ - std::ostream& DetailedPointInfo (std::ostream& rclStream) const; - /** - * Writes detailed edge information. - */ - std::ostream& DetailedEdgeInfo (std::ostream& rclStream) const; - /** - * Writes detailed facet information. - */ - std::ostream& DetailedFacetInfo (std::ostream& rclStream) const; - /** - * Writes internal point information. - */ - std::ostream& InternalPointInfo (std::ostream& rclStream) const; - /** - * Writes internal facet information. - */ - std::ostream& InternalFacetInfo (std::ostream& rclStream) const; + /** + * Writes detailed point information. + */ + std::ostream& DetailedPointInfo(std::ostream& rclStream) const; + /** + * Writes detailed edge information. + */ + std::ostream& DetailedEdgeInfo(std::ostream& rclStream) const; + /** + * Writes detailed facet information. + */ + std::ostream& DetailedFacetInfo(std::ostream& rclStream) const; + /** + * Writes internal point information. + */ + std::ostream& InternalPointInfo(std::ostream& rclStream) const; + /** + * Writes internal facet information. + */ + std::ostream& InternalFacetInfo(std::ostream& rclStream) const; protected: - const MeshKernel &_rclMesh; // const reference to mesh data structure + const MeshKernel& _rclMesh; // const reference to mesh data structure public: - MeshInfo() = delete; // not accessible default constructor + MeshInfo() = delete; // not accessible default constructor }; -} // namespace MeshCore +} // namespace MeshCore #endif diff --git a/src/Mod/Mesh/App/Core/Iterator.h b/src/Mod/Mesh/App/Core/Iterator.h index bba1755bd9..ec10a72bdd 100644 --- a/src/Mod/Mesh/App/Core/Iterator.h +++ b/src/Mod/Mesh/App/Core/Iterator.h @@ -30,7 +30,8 @@ #include "MeshKernel.h" -namespace MeshCore { +namespace MeshCore +{ class MeshKernel; class MeshGeomFacet; @@ -48,433 +49,539 @@ class MeshHelpEdge; class MeshFacetIterator { public: - /** @name Construction */ - //@{ - /// construction - inline explicit MeshFacetIterator (const MeshKernel &rclM); - /// construction - inline MeshFacetIterator (const MeshKernel &rclM, FacetIndex ulPos); - /// construction - inline MeshFacetIterator (const MeshFacetIterator &rclI); - //@} + /** @name Construction */ + //@{ + /// construction + inline explicit MeshFacetIterator(const MeshKernel& rclM); + /// construction + inline MeshFacetIterator(const MeshKernel& rclM, FacetIndex ulPos); + /// construction + inline MeshFacetIterator(const MeshFacetIterator& rclI); + //@} - /** @name Transformation */ - //@{ - /// Transforms the returned facet points with the current transformation - inline void Transform( const Base::Matrix4D& rclTrf ); - //@} + /** @name Transformation */ + //@{ + /// Transforms the returned facet points with the current transformation + inline void Transform(const Base::Matrix4D& rclTrf); + //@} - /** @name Access methods */ - //@{ - /// Access to the element the iterator points to. - const MeshGeomFacet& operator*() - { return Dereference(); } - /// Access to the element the iterator points to. - const MeshGeomFacet* operator->() - { return &Dereference(); } - /// Increments the iterator. It points then to the next element if the - /// end is not reached. - const MeshFacetIterator& operator ++ () - { ++_clIter; return *this; } - /// Decrements the iterator. It points then to the previous element if the beginning - /// is not reached. - const MeshFacetIterator& operator -- () - { --_clIter; return *this; } - /// Increments the iterator by \a k positions. - const MeshFacetIterator& operator += (int k) - { _clIter += k; return *this; } - /// Decrements the iterator by \a k positions. - const MeshFacetIterator& operator -= (int k) - { _clIter -= k; return *this; } - /// Assignment. - inline MeshFacetIterator& operator = (const MeshFacetIterator &rpI); - /// Compares if this iterator points to a lower element than the other one. - bool operator < (const MeshFacetIterator &rclI) const - { return _clIter < rclI._clIter; } - /// Compares if this iterator points to a higher element than the other one. - bool operator > (const MeshFacetIterator &rclI) const - { return _clIter > rclI._clIter; } - /// Checks if the iterators points to the same element. - bool operator == (const MeshFacetIterator &rclI) const - { return _clIter == rclI._clIter; } - /// Sets the iterator to the beginning of the array. - void Begin () - { _clIter = _rclFAry.begin(); } - /// Sets the iterator to the end of the array. - void End () - { _clIter = _rclFAry.end(); } - /// Returns the current position of the iterator in the array. - FacetIndex Position () const - { return _clIter - _rclFAry.begin(); } - /// Checks if the end is already reached. - bool EndReached () const - { return !(_clIter < _rclFAry.end()); } - /// Sets the iterator to the beginning of the array. - void Init () - { Begin(); } - /// Checks if the end is not yet reached. - bool More () const - { return !EndReached(); } - /// Increments the iterator. - void Next () - { operator++(); } - /// Sets the iterator to a given position. - inline bool Set (FacetIndex ulIndex); - /// Returns the topologic facet. - inline MeshFacet GetIndices () const - { return *_clIter; } - /// Returns the topologic facet. - inline const MeshFacet& GetReference () const - { return *_clIter; } - /// Returns iterators pointing to the current facet's neighbours. - inline void GetNeighbours (MeshFacetIterator &rclN0, MeshFacetIterator &rclN1, MeshFacetIterator &rclN2) const; - /// Sets the iterator to the current facet's neighbour of the side \a usN. - inline void SetToNeighbour (unsigned short usN); - /// Returns the property information to the current facet. - inline unsigned long GetProperty () const; - /// Checks if the iterator points to a valid element inside the array. - inline bool IsValid () const - { return (_clIter >= _rclFAry.begin()) && (_clIter < _rclFAry.end()); } - //@} - /** @name Flag state - */ - //@{ - void SetFlag (MeshFacet::TFlagType tF) const - { this->_clIter->SetFlag(tF); } - void ResetFlag (MeshFacet::TFlagType tF) const - { this->_clIter->ResetFlag(tF); } - bool IsFlag (MeshFacet::TFlagType tF) const - { return this->_clIter->IsFlag(tF); } - void SetProperty(unsigned long uP) const - { this->_clIter->SetProperty(uP); } - //@} + /** @name Access methods */ + //@{ + /// Access to the element the iterator points to. + const MeshGeomFacet& operator*() + { + return Dereference(); + } + /// Access to the element the iterator points to. + const MeshGeomFacet* operator->() + { + return &Dereference(); + } + /// Increments the iterator. It points then to the next element if the + /// end is not reached. + const MeshFacetIterator& operator++() + { + ++_clIter; + return *this; + } + /// Decrements the iterator. It points then to the previous element if the beginning + /// is not reached. + const MeshFacetIterator& operator--() + { + --_clIter; + return *this; + } + /// Increments the iterator by \a k positions. + const MeshFacetIterator& operator+=(int k) + { + _clIter += k; + return *this; + } + /// Decrements the iterator by \a k positions. + const MeshFacetIterator& operator-=(int k) + { + _clIter -= k; + return *this; + } + /// Assignment. + inline MeshFacetIterator& operator=(const MeshFacetIterator& rpI); + /// Compares if this iterator points to a lower element than the other one. + bool operator<(const MeshFacetIterator& rclI) const + { + return _clIter < rclI._clIter; + } + /// Compares if this iterator points to a higher element than the other one. + bool operator>(const MeshFacetIterator& rclI) const + { + return _clIter > rclI._clIter; + } + /// Checks if the iterators points to the same element. + bool operator==(const MeshFacetIterator& rclI) const + { + return _clIter == rclI._clIter; + } + /// Sets the iterator to the beginning of the array. + void Begin() + { + _clIter = _rclFAry.begin(); + } + /// Sets the iterator to the end of the array. + void End() + { + _clIter = _rclFAry.end(); + } + /// Returns the current position of the iterator in the array. + FacetIndex Position() const + { + return _clIter - _rclFAry.begin(); + } + /// Checks if the end is already reached. + bool EndReached() const + { + return !(_clIter < _rclFAry.end()); + } + /// Sets the iterator to the beginning of the array. + void Init() + { + Begin(); + } + /// Checks if the end is not yet reached. + bool More() const + { + return !EndReached(); + } + /// Increments the iterator. + void Next() + { + operator++(); + } + /// Sets the iterator to a given position. + inline bool Set(FacetIndex ulIndex); + /// Returns the topologic facet. + inline MeshFacet GetIndices() const + { + return *_clIter; + } + /// Returns the topologic facet. + inline const MeshFacet& GetReference() const + { + return *_clIter; + } + /// Returns iterators pointing to the current facet's neighbours. + inline void GetNeighbours(MeshFacetIterator& rclN0, + MeshFacetIterator& rclN1, + MeshFacetIterator& rclN2) const; + /// Sets the iterator to the current facet's neighbour of the side \a usN. + inline void SetToNeighbour(unsigned short usN); + /// Returns the property information to the current facet. + inline unsigned long GetProperty() const; + /// Checks if the iterator points to a valid element inside the array. + inline bool IsValid() const + { + return (_clIter >= _rclFAry.begin()) && (_clIter < _rclFAry.end()); + } + //@} + /** @name Flag state + */ + //@{ + void SetFlag(MeshFacet::TFlagType tF) const + { + this->_clIter->SetFlag(tF); + } + void ResetFlag(MeshFacet::TFlagType tF) const + { + this->_clIter->ResetFlag(tF); + } + bool IsFlag(MeshFacet::TFlagType tF) const + { + return this->_clIter->IsFlag(tF); + } + void SetProperty(unsigned long uP) const + { + this->_clIter->SetProperty(uP); + } + //@} protected: - inline const MeshGeomFacet& Dereference (); + inline const MeshGeomFacet& Dereference(); protected: - const MeshKernel& _rclMesh; - const MeshFacetArray& _rclFAry; - const MeshPointArray& _rclPAry; - MeshFacetArray::_TConstIterator _clIter; - MeshGeomFacet _clFacet; - bool _bApply; - Base::Matrix4D _clTrf; + const MeshKernel& _rclMesh; + const MeshFacetArray& _rclFAry; + const MeshPointArray& _rclPAry; + MeshFacetArray::_TConstIterator _clIter; + MeshGeomFacet _clFacet; + bool _bApply; + Base::Matrix4D _clTrf; - // friends - friend class MeshKernel; + // friends + friend class MeshKernel; }; /** - * The MeshPointIterator allows to iterate over the vertices of the mesh and provides access to their - * geometric information. - * \note This class is not thread-safe. + * The MeshPointIterator allows to iterate over the vertices of the mesh and provides access to + * their geometric information. \note This class is not thread-safe. */ class MeshExport MeshPointIterator { public: - /** @name Construction */ - //@{ - inline explicit MeshPointIterator (const MeshKernel &rclM); - inline MeshPointIterator (const MeshKernel &rclM, PointIndex ulPos); - inline MeshPointIterator (const MeshPointIterator &rclI); - //@} + /** @name Construction */ + //@{ + inline explicit MeshPointIterator(const MeshKernel& rclM); + inline MeshPointIterator(const MeshKernel& rclM, PointIndex ulPos); + inline MeshPointIterator(const MeshPointIterator& rclI); + //@} - /** @name Transformation */ - //@{ - /// Transforms the returned points with the current transformation - inline void Transform( const Base::Matrix4D& rclTrf ); - //@} + /** @name Transformation */ + //@{ + /// Transforms the returned points with the current transformation + inline void Transform(const Base::Matrix4D& rclTrf); + //@} - /** @name Access methods */ - //@{ - /// Access to the element the iterator points to. - const MeshPoint& operator*() const - { return Dereference(); } - /// Access to the element the iterator points to. - const MeshPoint* operator->() const - { return &Dereference(); } - /// Increments the iterator. It points then to the next element if the - /// end is not reached. - const MeshPointIterator& operator ++ () - { ++_clIter; return *this; } - /// Decrements the iterator. It points then to the previous element if the beginning - /// is not reached. - const MeshPointIterator& operator -- () - { --_clIter; return *this; } - /// Assignment. - inline MeshPointIterator& operator = (const MeshPointIterator &rpI); - /// Compares if this iterator points to a lower element than the other one. - bool operator < (const MeshPointIterator &rclI) const - { return _clIter < rclI._clIter; } - /// Compares if this iterator points to a higher element than the other one. - bool operator > (const MeshPointIterator &rclI) const - { return _clIter > rclI._clIter; } - /// Checks if the iterators points to the same element. - bool operator == (const MeshPointIterator &rclI) const - { return _clIter == rclI._clIter; } - /// Sets the iterator to the beginning of the array. - void Begin () - { _clIter = _rclPAry.begin(); } - /// Sets the iterator to the end of the array. - void End () - { _clIter = _rclPAry.end(); } - /// Returns the current position of the iterator in the array. - PointIndex Position () const - { return _clIter - _rclPAry.begin(); } - /// Checks if the end is already reached. - bool EndReached () const - { return !(_clIter < _rclPAry.end()); } - /// Sets the iterator to the beginning of the array. - void Init () - { Begin(); } - /// Checks if the end is not yet reached. - bool More () const - { return !EndReached(); } - /// Increments the iterator. - void Next () - { operator++(); } - /// Sets the iterator to a given position. - inline bool Set (PointIndex ulIndex); - /// Checks if the iterator points to a valid element inside the array. - inline bool IsValid () const - { return (_clIter >= _rclPAry.begin()) && (_clIter < _rclPAry.end()); } - //@} - /** @name Flag state - */ - //@{ - void SetFlag (MeshPoint::TFlagType tF) const - { this->_clIter->SetFlag(tF); } - void ResetFlag (MeshPoint::TFlagType tF) const - { this->_clIter->ResetFlag(tF); } - bool IsFlag (MeshPoint::TFlagType tF) const - { return this->_clIter->IsFlag(tF); } - void SetProperty(unsigned long uP) const - { this->_clIter->SetProperty(uP); } - //@} + /** @name Access methods */ + //@{ + /// Access to the element the iterator points to. + const MeshPoint& operator*() const + { + return Dereference(); + } + /// Access to the element the iterator points to. + const MeshPoint* operator->() const + { + return &Dereference(); + } + /// Increments the iterator. It points then to the next element if the + /// end is not reached. + const MeshPointIterator& operator++() + { + ++_clIter; + return *this; + } + /// Decrements the iterator. It points then to the previous element if the beginning + /// is not reached. + const MeshPointIterator& operator--() + { + --_clIter; + return *this; + } + /// Assignment. + inline MeshPointIterator& operator=(const MeshPointIterator& rpI); + /// Compares if this iterator points to a lower element than the other one. + bool operator<(const MeshPointIterator& rclI) const + { + return _clIter < rclI._clIter; + } + /// Compares if this iterator points to a higher element than the other one. + bool operator>(const MeshPointIterator& rclI) const + { + return _clIter > rclI._clIter; + } + /// Checks if the iterators points to the same element. + bool operator==(const MeshPointIterator& rclI) const + { + return _clIter == rclI._clIter; + } + /// Sets the iterator to the beginning of the array. + void Begin() + { + _clIter = _rclPAry.begin(); + } + /// Sets the iterator to the end of the array. + void End() + { + _clIter = _rclPAry.end(); + } + /// Returns the current position of the iterator in the array. + PointIndex Position() const + { + return _clIter - _rclPAry.begin(); + } + /// Checks if the end is already reached. + bool EndReached() const + { + return !(_clIter < _rclPAry.end()); + } + /// Sets the iterator to the beginning of the array. + void Init() + { + Begin(); + } + /// Checks if the end is not yet reached. + bool More() const + { + return !EndReached(); + } + /// Increments the iterator. + void Next() + { + operator++(); + } + /// Sets the iterator to a given position. + inline bool Set(PointIndex ulIndex); + /// Checks if the iterator points to a valid element inside the array. + inline bool IsValid() const + { + return (_clIter >= _rclPAry.begin()) && (_clIter < _rclPAry.end()); + } + //@} + /** @name Flag state + */ + //@{ + void SetFlag(MeshPoint::TFlagType tF) const + { + this->_clIter->SetFlag(tF); + } + void ResetFlag(MeshPoint::TFlagType tF) const + { + this->_clIter->ResetFlag(tF); + } + bool IsFlag(MeshPoint::TFlagType tF) const + { + return this->_clIter->IsFlag(tF); + } + void SetProperty(unsigned long uP) const + { + this->_clIter->SetProperty(uP); + } + //@} protected: - inline const MeshPoint& Dereference () const; + inline const MeshPoint& Dereference() const; protected: - const MeshKernel& _rclMesh; - const MeshPointArray& _rclPAry; - mutable MeshPoint _clPoint; - MeshPointArray::_TConstIterator _clIter; - bool _bApply; - Base::Matrix4D _clTrf; + const MeshKernel& _rclMesh; + const MeshPointArray& _rclPAry; + mutable MeshPoint _clPoint; + MeshPointArray::_TConstIterator _clIter; + bool _bApply; + Base::Matrix4D _clTrf; - // friends - friend class MeshKernel; + // friends + friend class MeshKernel; }; class MeshFastFacetIterator { public: - inline explicit MeshFastFacetIterator (const MeshKernel &rclM); - virtual ~MeshFastFacetIterator () = default; + inline explicit MeshFastFacetIterator(const MeshKernel& rclM); + virtual ~MeshFastFacetIterator() = default; - void Init () { _clIter = _rclFAry.begin(); } - inline void Next (); - bool More () { return _clIter != _rclFAry.end(); } + void Init() + { + _clIter = _rclFAry.begin(); + } + inline void Next(); + bool More() + { + return _clIter != _rclFAry.end(); + } - Base::Vector3f _afPoints[3]; + Base::Vector3f _afPoints[3]; protected: - const MeshKernel& _rclMesh; - const MeshFacetArray& _rclFAry; - const MeshPointArray& _rclPAry; - MeshFacetArray::_TConstIterator _clIter; + const MeshKernel& _rclMesh; + const MeshFacetArray& _rclFAry; + const MeshPointArray& _rclPAry; + MeshFacetArray::_TConstIterator _clIter; public: - MeshFastFacetIterator (const MeshFastFacetIterator&) = delete; - void operator = (const MeshFastFacetIterator&) = delete; + MeshFastFacetIterator(const MeshFastFacetIterator&) = delete; + void operator=(const MeshFastFacetIterator&) = delete; }; -inline MeshFastFacetIterator::MeshFastFacetIterator (const MeshKernel &rclM) -: _rclMesh(rclM), - _rclFAry(rclM._aclFacetArray), - _rclPAry(rclM._aclPointArray), - _clIter(_rclFAry.begin()) +inline MeshFastFacetIterator::MeshFastFacetIterator(const MeshKernel& rclM) + : _rclMesh(rclM) + , _rclFAry(rclM._aclFacetArray) + , _rclPAry(rclM._aclPointArray) + , _clIter(_rclFAry.begin()) +{} + +inline void MeshFastFacetIterator::Next() { + const PointIndex* paulPt = _clIter->_aulPoints; + Base::Vector3f* pfPt = _afPoints; + *(pfPt++) = _rclPAry[*(paulPt++)]; + *(pfPt++) = _rclPAry[*(paulPt++)]; + *pfPt = _rclPAry[*paulPt]; } -inline void MeshFastFacetIterator::Next () +inline MeshFacetIterator::MeshFacetIterator(const MeshKernel& rclM) + : _rclMesh(rclM) + , _rclFAry(rclM._aclFacetArray) + , _rclPAry(rclM._aclPointArray) + , _clIter(rclM._aclFacetArray.begin()) + , _bApply(false) +{} + +inline MeshFacetIterator::MeshFacetIterator(const MeshKernel& rclM, FacetIndex ulPos) + : _rclMesh(rclM) + , _rclFAry(rclM._aclFacetArray) + , _rclPAry(rclM._aclPointArray) + , _clIter(rclM._aclFacetArray.begin() + ulPos) + , _bApply(false) +{} + +inline MeshFacetIterator::MeshFacetIterator(const MeshFacetIterator& rclI) + : _rclMesh(rclI._rclMesh) + , _rclFAry(rclI._rclFAry) + , _rclPAry(rclI._rclPAry) + , _clIter(rclI._clIter) + , _bApply(rclI._bApply) + , _clTrf(rclI._clTrf) +{} + +inline void MeshFacetIterator::Transform(const Base::Matrix4D& rclTrf) { - const PointIndex *paulPt = _clIter->_aulPoints; - Base::Vector3f *pfPt = _afPoints; - *(pfPt++) = _rclPAry[*(paulPt++)]; - *(pfPt++) = _rclPAry[*(paulPt++)]; - *pfPt = _rclPAry[*paulPt]; + _clTrf = rclTrf; + Base::Matrix4D tmp; + // checks for unit matrix + _clTrf != tmp ? _bApply = true : _bApply = false; } -inline MeshFacetIterator::MeshFacetIterator (const MeshKernel &rclM) -: _rclMesh(rclM), - _rclFAry(rclM._aclFacetArray), - _rclPAry(rclM._aclPointArray), - _clIter(rclM._aclFacetArray.begin()), - _bApply(false) +inline const MeshGeomFacet& MeshFacetIterator::Dereference() { + MeshFacet rclF = *_clIter; + const PointIndex* paulPt = &(_clIter->_aulPoints[0]); + Base::Vector3f* pclPt = _clFacet._aclPoints; + *(pclPt++) = _rclPAry[*(paulPt++)]; + *(pclPt++) = _rclPAry[*(paulPt++)]; + *pclPt = _rclPAry[*paulPt]; + _clFacet._ulProp = rclF._ulProp; + _clFacet._ucFlag = rclF._ucFlag; + _clFacet.NormalInvalid(); + if (_bApply) { + _clFacet._aclPoints[0] = _clTrf * _clFacet._aclPoints[0]; + _clFacet._aclPoints[1] = _clTrf * _clFacet._aclPoints[1]; + _clFacet._aclPoints[2] = _clTrf * _clFacet._aclPoints[2]; + } + return _clFacet; } -inline MeshFacetIterator::MeshFacetIterator (const MeshKernel &rclM, FacetIndex ulPos) -: _rclMesh(rclM), - _rclFAry(rclM._aclFacetArray), - _rclPAry(rclM._aclPointArray), - _clIter(rclM._aclFacetArray.begin() + ulPos), - _bApply(false) +inline bool MeshFacetIterator::Set(FacetIndex ulIndex) { + if (ulIndex < _rclFAry.size()) { + _clIter = _rclFAry.begin() + ulIndex; + return true; + } + else { + _clIter = _rclFAry.end(); + return false; + } } -inline MeshFacetIterator::MeshFacetIterator (const MeshFacetIterator &rclI) -: _rclMesh(rclI._rclMesh), - _rclFAry(rclI._rclFAry), - _rclPAry(rclI._rclPAry), - _clIter(rclI._clIter), - _bApply(rclI._bApply), - _clTrf(rclI._clTrf) +inline MeshFacetIterator& MeshFacetIterator::operator=(const MeshFacetIterator& rpI) { + _clIter = rpI._clIter; + _bApply = rpI._bApply; + _clTrf = rpI._clTrf; + return *this; } -inline void MeshFacetIterator::Transform( const Base::Matrix4D& rclTrf ) +inline unsigned long MeshFacetIterator::GetProperty() const { - _clTrf = rclTrf; - Base::Matrix4D tmp; - // checks for unit matrix - _clTrf != tmp ? _bApply = true : _bApply = false; + return _clIter->_ulProp; } -inline const MeshGeomFacet& MeshFacetIterator::Dereference () +inline void MeshFacetIterator::GetNeighbours(MeshFacetIterator& rclN0, + MeshFacetIterator& rclN1, + MeshFacetIterator& rclN2) const { - MeshFacet rclF = *_clIter; - const PointIndex *paulPt = &(_clIter->_aulPoints[0]); - Base::Vector3f *pclPt = _clFacet._aclPoints; - *(pclPt++) = _rclPAry[*(paulPt++)]; - *(pclPt++) = _rclPAry[*(paulPt++)]; - *pclPt = _rclPAry[*paulPt]; - _clFacet._ulProp = rclF._ulProp; - _clFacet._ucFlag = rclF._ucFlag; - _clFacet.NormalInvalid(); - if ( _bApply ) - { - _clFacet._aclPoints[0] = _clTrf * _clFacet._aclPoints[0]; - _clFacet._aclPoints[1] = _clTrf * _clFacet._aclPoints[1]; - _clFacet._aclPoints[2] = _clTrf * _clFacet._aclPoints[2]; - } - return _clFacet; + if (_clIter->_aulNeighbours[0] != FACET_INDEX_MAX) { + rclN0.Set(_clIter->_aulNeighbours[0]); + } + else { + rclN0.End(); + } + + if (_clIter->_aulNeighbours[1] != FACET_INDEX_MAX) { + rclN1.Set(_clIter->_aulNeighbours[1]); + } + else { + rclN1.End(); + } + + if (_clIter->_aulNeighbours[2] != FACET_INDEX_MAX) { + rclN2.Set(_clIter->_aulNeighbours[2]); + } + else { + rclN2.End(); + } } -inline bool MeshFacetIterator::Set (FacetIndex ulIndex) +inline void MeshFacetIterator::SetToNeighbour(unsigned short usN) { - if (ulIndex < _rclFAry.size()) - { - _clIter = _rclFAry.begin() + ulIndex; - return true; - } - else - { - _clIter = _rclFAry.end(); - return false; - } + if (_clIter->_aulNeighbours[usN] != FACET_INDEX_MAX) { + _clIter = _rclFAry.begin() + _clIter->_aulNeighbours[usN]; + } + else { + End(); + } } -inline MeshFacetIterator& MeshFacetIterator::operator = (const MeshFacetIterator &rpI) +inline MeshPointIterator::MeshPointIterator(const MeshKernel& rclM) + : _rclMesh(rclM) + , _rclPAry(_rclMesh._aclPointArray) + , _bApply(false) { - _clIter = rpI._clIter; - _bApply = rpI._bApply; - _clTrf = rpI._clTrf; - return *this; + _clIter = _rclPAry.begin(); } -inline unsigned long MeshFacetIterator::GetProperty () const +inline MeshPointIterator::MeshPointIterator(const MeshKernel& rclM, PointIndex ulPos) + : _rclMesh(rclM) + , _rclPAry(_rclMesh._aclPointArray) + , _bApply(false) { - return _clIter->_ulProp; + _clIter = _rclPAry.begin() + ulPos; } -inline void MeshFacetIterator::GetNeighbours (MeshFacetIterator &rclN0, MeshFacetIterator &rclN1, MeshFacetIterator &rclN2) const +inline MeshPointIterator::MeshPointIterator(const MeshPointIterator& rclI) + : _rclMesh(rclI._rclMesh) + , _rclPAry(rclI._rclPAry) + , _clIter(rclI._clIter) + , _bApply(rclI._bApply) + , _clTrf(rclI._clTrf) +{} + +inline void MeshPointIterator::Transform(const Base::Matrix4D& rclTrf) { - if (_clIter->_aulNeighbours[0] != FACET_INDEX_MAX) - rclN0.Set(_clIter->_aulNeighbours[0]); - else - rclN0.End(); - - if (_clIter->_aulNeighbours[1] != FACET_INDEX_MAX) - rclN1.Set(_clIter->_aulNeighbours[1]); - else - rclN1.End(); - - if (_clIter->_aulNeighbours[2] != FACET_INDEX_MAX) - rclN2.Set(_clIter->_aulNeighbours[2]); - else - rclN2.End(); + _clTrf = rclTrf; + Base::Matrix4D tmp; + // checks for unit matrix + _clTrf != tmp ? _bApply = true : _bApply = false; } -inline void MeshFacetIterator::SetToNeighbour (unsigned short usN) +inline const MeshPoint& MeshPointIterator::Dereference() const { - if (_clIter->_aulNeighbours[usN] != FACET_INDEX_MAX) - _clIter = _rclFAry.begin() + _clIter->_aulNeighbours[usN]; - else - End(); + // We change only the value of the point but not the actual iterator + _clPoint = *_clIter; + if (_bApply) { + _clPoint = _clTrf * _clPoint; + } + return _clPoint; } -inline MeshPointIterator::MeshPointIterator (const MeshKernel &rclM) -: _rclMesh(rclM), _rclPAry(_rclMesh._aclPointArray), _bApply(false) +inline bool MeshPointIterator::Set(PointIndex ulIndex) { - _clIter = _rclPAry.begin(); + if (ulIndex < _rclPAry.size()) { + _clIter = _rclPAry.begin() + ulIndex; + return true; + } + else { + _clIter = _rclPAry.end(); + return false; + } } -inline MeshPointIterator::MeshPointIterator (const MeshKernel &rclM, PointIndex ulPos) -: _rclMesh(rclM), _rclPAry(_rclMesh._aclPointArray), _bApply(false) +inline MeshPointIterator& MeshPointIterator::operator=(const MeshPointIterator& rpI) { - _clIter = _rclPAry.begin() + ulPos; -} - -inline MeshPointIterator::MeshPointIterator (const MeshPointIterator &rclI) -: _rclMesh(rclI._rclMesh), _rclPAry(rclI._rclPAry), _clIter(rclI._clIter), _bApply(rclI._bApply), _clTrf(rclI._clTrf) -{ -} - -inline void MeshPointIterator::Transform( const Base::Matrix4D& rclTrf ) -{ - _clTrf = rclTrf; - Base::Matrix4D tmp; - // checks for unit matrix - _clTrf != tmp ? _bApply = true : _bApply = false; -} - -inline const MeshPoint& MeshPointIterator::Dereference () const -{ - // We change only the value of the point but not the actual iterator - _clPoint = *_clIter; - if ( _bApply ) - _clPoint = _clTrf * _clPoint; - return _clPoint; -} - -inline bool MeshPointIterator::Set (PointIndex ulIndex) -{ - if (ulIndex < _rclPAry.size()) - { - _clIter = _rclPAry.begin() + ulIndex; - return true; - } - else - { - _clIter = _rclPAry.end(); - return false; - } -} - -inline MeshPointIterator& MeshPointIterator::operator = (const MeshPointIterator &rpI) -{ - _clIter = rpI._clIter; - _bApply = rpI._bApply; - _clTrf = rpI._clTrf; - return *this; + _clIter = rpI._clIter; + _bApply = rpI._bApply; + _clTrf = rpI._clTrf; + return *this; } -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_ITERATOR_H +#endif // MESH_ITERATOR_H diff --git a/src/Mod/Mesh/App/Core/KDTree.cpp b/src/Mod/Mesh/App/Core/KDTree.cpp index e7c50a88c9..9e262454b4 100644 --- a/src/Mod/Mesh/App/Core/KDTree.cpp +++ b/src/Mod/Mesh/App/Core/KDTree.cpp @@ -22,57 +22,59 @@ #include "PreCompiled.h" #ifdef _MSC_VER -# pragma warning(disable : 4396) +#pragma warning(disable : 4396) #endif -#include #include "KDTree.h" +#include using namespace MeshCore; struct Point3d { - using value_type = float; + using value_type = float; - Point3d(const Base::Vector3f& f, PointIndex i) : p(f), i(i) - { - } + Point3d(const Base::Vector3f& f, PointIndex i) + : p(f) + , i(i) + {} - Point3d(const Point3d& pnt) = default; + Point3d(const Point3d& pnt) = default; - Point3d(Point3d&& pnt) : p(pnt.p), i(pnt.i) - { - } + Point3d(Point3d&& pnt) + : p(pnt.p) + , i(pnt.i) + {} - ~Point3d() = default; + ~Point3d() = default; - inline value_type operator[](const int N) const - { - return p[N]; - } + inline value_type operator[](const int N) const + { + return p[N]; + } - inline bool operator==(const Point3d& other) const - { - return (this->p) == (other.p); - } + inline bool operator==(const Point3d& other) const + { + return (this->p) == (other.p); + } - inline bool operator!=(const Point3d& other) const - { - return (this->p) != (other.p); - } + inline bool operator!=(const Point3d& other) const + { + return (this->p) != (other.p); + } - inline Point3d& operator=(const Point3d& other) = default; + inline Point3d& operator=(const Point3d& other) = default; - inline Point3d& operator=(Point3d&& other) - { - this->p = other.p; - this->i = other.i; - return *this; - } + inline Point3d& operator=(Point3d&& other) + { + this->p = other.p; + this->i = other.i; + return *this; + } - Base::Vector3f p; - PointIndex i; + Base::Vector3f p; + PointIndex i; }; using MyKDTree = KDTree::KDTree<3, Point3d>; @@ -83,22 +85,24 @@ public: MyKDTree kd_tree; }; -MeshKDTree::MeshKDTree() : d(new Private) -{ -} +MeshKDTree::MeshKDTree() + : d(new Private) +{} -MeshKDTree::MeshKDTree(const std::vector& points) : d(new Private) +MeshKDTree::MeshKDTree(const std::vector& points) + : d(new Private) { - PointIndex index=0; + PointIndex index = 0; for (auto it : points) { d->kd_tree.insert(Point3d(it, index++)); } } -MeshKDTree::MeshKDTree(const MeshPointArray& points) : d(new Private) +MeshKDTree::MeshKDTree(const MeshPointArray& points) + : d(new Private) { - PointIndex index=0; - for (const auto & it : points) { + PointIndex index = 0; + for (const auto& it : points) { d->kd_tree.insert(Point3d(it, index++)); } } @@ -110,13 +114,13 @@ MeshKDTree::~MeshKDTree() void MeshKDTree::AddPoint(const Base::Vector3f& point) { - PointIndex index=d->kd_tree.size(); + PointIndex index = d->kd_tree.size(); d->kd_tree.insert(Point3d(point, index)); } void MeshKDTree::AddPoints(const std::vector& points) { - PointIndex index=d->kd_tree.size(); + PointIndex index = d->kd_tree.size(); for (auto it : points) { d->kd_tree.insert(Point3d(it, index++)); } @@ -124,8 +128,8 @@ void MeshKDTree::AddPoints(const std::vector& points) void MeshKDTree::AddPoints(const MeshPointArray& points) { - PointIndex index=d->kd_tree.size(); - for (const auto & it : points) { + PointIndex index = d->kd_tree.size(); + for (const auto& it : points) { d->kd_tree.insert(Point3d(it, index++)); } } @@ -148,22 +152,26 @@ void MeshKDTree::Optimize() PointIndex MeshKDTree::FindNearest(const Base::Vector3f& p, Base::Vector3f& n, float& dist) const { std::pair it = - d->kd_tree.find_nearest(Point3d(p,0)); - if (it.first == d->kd_tree.end()) + d->kd_tree.find_nearest(Point3d(p, 0)); + if (it.first == d->kd_tree.end()) { return POINT_INDEX_MAX; + } PointIndex index = it.first->i; n = it.first->p; dist = it.second; return index; } -PointIndex MeshKDTree::FindNearest(const Base::Vector3f& p, float max_dist, - Base::Vector3f& n, float& dist) const +PointIndex MeshKDTree::FindNearest(const Base::Vector3f& p, + float max_dist, + Base::Vector3f& n, + float& dist) const { std::pair it = - d->kd_tree.find_nearest(Point3d(p,0), max_dist); - if (it.first == d->kd_tree.end()) + d->kd_tree.find_nearest(Point3d(p, 0), max_dist); + if (it.first == d->kd_tree.end()) { return POINT_INDEX_MAX; + } PointIndex index = it.first->i; n = it.first->p; dist = it.second; @@ -172,19 +180,22 @@ PointIndex MeshKDTree::FindNearest(const Base::Vector3f& p, float max_dist, PointIndex MeshKDTree::FindExact(const Base::Vector3f& p) const { - MyKDTree::const_iterator it = - d->kd_tree.find_exact(Point3d(p,0)); - if (it == d->kd_tree.end()) + MyKDTree::const_iterator it = d->kd_tree.find_exact(Point3d(p, 0)); + if (it == d->kd_tree.end()) { return POINT_INDEX_MAX; + } PointIndex index = it->i; return index; } -void MeshKDTree::FindInRange(const Base::Vector3f& p, float range, std::vector& indices) const +void MeshKDTree::FindInRange(const Base::Vector3f& p, + float range, + std::vector& indices) const { std::vector v; - d->kd_tree.find_within_range(Point3d(p,0), range, std::back_inserter(v)); + d->kd_tree.find_within_range(Point3d(p, 0), range, std::back_inserter(v)); indices.reserve(v.size()); - for (const auto & it : v) + for (const auto& it : v) { indices.push_back(it.i); + } } diff --git a/src/Mod/Mesh/App/Core/KDTree.h b/src/Mod/Mesh/App/Core/KDTree.h index fbe74c2254..4116cf6915 100644 --- a/src/Mod/Mesh/App/Core/KDTree.h +++ b/src/Mod/Mesh/App/Core/KDTree.h @@ -46,8 +46,8 @@ public: void Optimize(); PointIndex FindNearest(const Base::Vector3f& p, Base::Vector3f& n, float&) const; - PointIndex FindNearest(const Base::Vector3f& p, float max_dist, - Base::Vector3f& n, float&) const; + PointIndex + FindNearest(const Base::Vector3f& p, float max_dist, Base::Vector3f& n, float&) const; PointIndex FindExact(const Base::Vector3f& p) const; void FindInRange(const Base::Vector3f&, float, std::vector&) const; @@ -57,10 +57,10 @@ private: public: MeshKDTree(const MeshKDTree&) = delete; - void operator= (const MeshKDTree&) = delete; + void operator=(const MeshKDTree&) = delete; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_KDTREE_H diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index fc090c0c1a..9f3319e2ad 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -23,11 +23,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -36,6 +36,11 @@ #include #include +#include "IO/Reader3MF.h" +#include "IO/ReaderOBJ.h" +#include "IO/Writer3MF.h" +#include "IO/WriterInventor.h" +#include "IO/WriterOBJ.h" #include #include #include @@ -46,36 +51,34 @@ #include #include #include -#include "IO/Reader3MF.h" -#include "IO/ReaderOBJ.h" -#include "IO/Writer3MF.h" -#include "IO/WriterInventor.h" -#include "IO/WriterOBJ.h" #include #include -#include "MeshIO.h" #include "Builder.h" #include "Definitions.h" #include "Degeneration.h" #include "Iterator.h" +#include "MeshIO.h" #include "MeshKernel.h" using namespace MeshCore; -namespace MeshCore { +namespace MeshCore +{ std::string& ltrim(std::string& str) { - std::string::size_type pos=0; + std::string::size_type pos = 0; for (char it : str) { - if (it != 0x20 && it != 0x09) + if (it != 0x20 && it != 0x09) { break; + } pos++; } - if (pos > 0) + if (pos > 0) { str = str.substr(pos); + } return str; } @@ -92,34 +95,50 @@ int numDigits(int number) } /* Usage by CMeshNastran, CMeshCadmouldFE. Added by Sergey Sukhov (26.04.2002)*/ -struct NODE {float x, y, z;}; -struct TRIA {int iV[3];}; -struct QUAD {int iV[4];}; +struct NODE +{ + float x, y, z; +}; +struct TRIA +{ + int iV[3]; +}; +struct QUAD +{ + int iV[4]; +}; -} +} // namespace MeshCore // -------------------------------------------------------------- -bool Material::operator == (const Material& mat) const +bool Material::operator==(const Material& mat) const { - if (binding != mat.binding) + if (binding != mat.binding) { return false; - if (ambientColor != mat.ambientColor) + } + if (ambientColor != mat.ambientColor) { return false; - if (diffuseColor != mat.diffuseColor) + } + if (diffuseColor != mat.diffuseColor) { return false; - if (specularColor != mat.specularColor) + } + if (specularColor != mat.specularColor) { return false; - if (emissiveColor != mat.emissiveColor) + } + if (emissiveColor != mat.emissiveColor) { return false; - if (shininess != mat.shininess) + } + if (shininess != mat.shininess) { return false; - if (transparency != mat.transparency) + } + if (transparency != mat.transparency) { return false; + } return true; } -bool Material::operator != (const Material& mat) const +bool Material::operator!=(const Material& mat) const { return !operator==(mat); } @@ -143,41 +162,43 @@ std::vector MeshInput::supportedMeshFormats() MeshIO::Format MeshInput::getFormat(const char* FileName) { - Base::FileInfo fi(FileName); - if (fi.hasExtension("bms")) { - return MeshIO::Format::BMS; - } - else if (fi.hasExtension("ply")) { - return MeshIO::Format::PLY; - } - else if (fi.hasExtension("stl")) { - return MeshIO::Format::STL; - } - else if (fi.hasExtension("ast")) { - return MeshIO::Format::ASTL; - } - else if (fi.hasExtension("obj")) { - return MeshIO::Format::OBJ; - } - else if (fi.hasExtension("off")) { - return MeshIO::Format::OFF; - } - else if (fi.hasExtension("smf")) { - return MeshIO::Format::SMF; - } - else { - throw Base::FileException("File extension not supported", FileName); - } + Base::FileInfo fi(FileName); + if (fi.hasExtension("bms")) { + return MeshIO::Format::BMS; + } + else if (fi.hasExtension("ply")) { + return MeshIO::Format::PLY; + } + else if (fi.hasExtension("stl")) { + return MeshIO::Format::STL; + } + else if (fi.hasExtension("ast")) { + return MeshIO::Format::ASTL; + } + else if (fi.hasExtension("obj")) { + return MeshIO::Format::OBJ; + } + else if (fi.hasExtension("off")) { + return MeshIO::Format::OFF; + } + else if (fi.hasExtension("smf")) { + return MeshIO::Format::SMF; + } + else { + throw Base::FileException("File extension not supported", FileName); + } } bool MeshInput::LoadAny(const char* FileName) { // ask for read permission Base::FileInfo fi(FileName); - if (!fi.exists() || !fi.isFile()) + if (!fi.exists() || !fi.isFile()) { throw Base::FileException("File does not exist", FileName); - if (!fi.isReadable()) + } + if (!fi.isReadable()) { throw Base::FileException("No permission on the file", FileName); + } Base::ifstream str(fi, std::ios::in | std::ios::binary); @@ -192,27 +213,28 @@ bool MeshInput::LoadAny(const char* FileName) ok = LoadSTL(str); } else if (fi.hasExtension("iv")) { - ok = LoadInventor( str ); - if (ok && _rclMesh.CountFacets() == 0) + ok = LoadInventor(str); + if (ok && _rclMesh.CountFacets() == 0) { Base::Console().Warning("No usable mesh found in file '%s'", FileName); + } } else if (fi.hasExtension({"nas", "bdf"})) { - ok = LoadNastran( str ); + ok = LoadNastran(str); } else if (fi.hasExtension("obj")) { - ok = LoadOBJ( str, FileName ); + ok = LoadOBJ(str, FileName); } else if (fi.hasExtension("smf")) { - ok = LoadSMF( str ); + ok = LoadSMF(str); } else if (fi.hasExtension("3mf")) { - ok = Load3MF( str ); + ok = Load3MF(str); } else if (fi.hasExtension("off")) { - ok = LoadOFF( str ); + ok = LoadOFF(str); } else if (fi.hasExtension("ply")) { - ok = LoadPLY( str ); + ok = LoadPLY(str); } else { throw Base::FileException("File extension not supported", FileName); @@ -222,71 +244,77 @@ bool MeshInput::LoadAny(const char* FileName) } } -bool MeshInput::LoadFormat(std::istream &str, MeshIO::Format fmt) +bool MeshInput::LoadFormat(std::istream& str, MeshIO::Format fmt) { switch (fmt) { - case MeshIO::BMS: - _rclMesh.Read(str); - return true; - case MeshIO::APLY: - case MeshIO::PLY: - return LoadPLY(str); - case MeshIO::ASTL: - return LoadAsciiSTL(str); - case MeshIO::BSTL: - return LoadBinarySTL(str); - case MeshIO::STL: - return LoadSTL(str); - case MeshIO::OBJ: - return LoadOBJ(str); - case MeshIO::SMF: - return LoadSMF(str); - case MeshIO::ThreeMF: - return Load3MF(str); - case MeshIO::OFF: - return LoadOFF(str); - case MeshIO::IV: - return LoadInventor(str); - case MeshIO::NAS: - return LoadNastran(str); - default: - throw Base::FileException("Unsupported file format"); + case MeshIO::BMS: + _rclMesh.Read(str); + return true; + case MeshIO::APLY: + case MeshIO::PLY: + return LoadPLY(str); + case MeshIO::ASTL: + return LoadAsciiSTL(str); + case MeshIO::BSTL: + return LoadBinarySTL(str); + case MeshIO::STL: + return LoadSTL(str); + case MeshIO::OBJ: + return LoadOBJ(str); + case MeshIO::SMF: + return LoadSMF(str); + case MeshIO::ThreeMF: + return Load3MF(str); + case MeshIO::OFF: + return LoadOFF(str); + case MeshIO::IV: + return LoadInventor(str); + case MeshIO::NAS: + return LoadNastran(str); + default: + throw Base::FileException("Unsupported file format"); } } /** Loads an STL file either in binary or ASCII format. * Therefore the file header gets checked to decide if the file is binary or not. */ -bool MeshInput::LoadSTL (std::istream &rstrIn) +bool MeshInput::LoadSTL(std::istream& rstrIn) { char szBuf[200]; - if (!rstrIn || rstrIn.bad()) + if (!rstrIn || rstrIn.bad()) { return false; + } - // Read in 50 characters from position 80 on and check for keywords like 'SOLID', 'FACET', 'NORMAL', - // 'VERTEX', 'ENDFACET' or 'ENDLOOP'. - // As the file can be binary with one triangle only we must not read in more than (max.) 54 bytes because - // the file size has only 134 bytes in this case. On the other hand we must overread the first 80 bytes - // because it can happen that the file is binary but contains one of these keywords. + // Read in 50 characters from position 80 on and check for keywords like 'SOLID', 'FACET', + // 'NORMAL', 'VERTEX', 'ENDFACET' or 'ENDLOOP'. As the file can be binary with one triangle only + // we must not read in more than (max.) 54 bytes because the file size has only 134 bytes in + // this case. On the other hand we must overread the first 80 bytes because it can happen that + // the file is binary but contains one of these keywords. std::streambuf* buf = rstrIn.rdbuf(); - if (!buf) + if (!buf) { return false; + } buf->pubseekoff(80, std::ios::beg, std::ios::in); - uint32_t ulCt, ulBytes=50; + uint32_t ulCt, ulBytes = 50; rstrIn.read((char*)&ulCt, sizeof(ulCt)); // if we have a binary STL with a single triangle we can only read-in 50 bytes - if (ulCt > 1) + if (ulCt > 1) { ulBytes = 100; - // Either it's really an invalid STL file or it's just empty. In this case the number of facets must be 0. - if (!rstrIn.read(szBuf, ulBytes)) - return (ulCt==0); + } + // Either it's really an invalid STL file or it's just empty. In this case the number of facets + // must be 0. + if (!rstrIn.read(szBuf, ulBytes)) { + return (ulCt == 0); + } szBuf[ulBytes] = 0; boost::algorithm::to_upper(szBuf); try { - if (!strstr(szBuf, "SOLID") && !strstr(szBuf, "FACET") && !strstr(szBuf, "NORMAL") && - !strstr(szBuf, "VERTEX") && !strstr(szBuf, "ENDFACET") && !strstr(szBuf, "ENDLOOP")) { + if (!strstr(szBuf, "SOLID") && !strstr(szBuf, "FACET") && !strstr(szBuf, "NORMAL") + && !strstr(szBuf, "VERTEX") && !strstr(szBuf, "ENDFACET") + && !strstr(szBuf, "ENDLOOP")) { // probably binary STL buf->pubseekoff(0, std::ios::beg, std::ios::in); return LoadBinarySTL(rstrIn); @@ -299,7 +327,7 @@ bool MeshInput::LoadSTL (std::istream &rstrIn) } catch (const Base::MemoryException&) { _rclMesh.Clear(); - throw; // Throw the same instance of Base::MemoryException + throw; // Throw the same instance of Base::MemoryException } catch (const Base::AbortException&) { _rclMesh.Clear(); @@ -318,7 +346,7 @@ bool MeshInput::LoadSTL (std::istream &rstrIn) } /** Loads an OBJ file. */ -bool MeshInput::LoadOBJ (std::istream &rstrIn) +bool MeshInput::LoadOBJ(std::istream& rstrIn) { ReaderOBJ reader(this->_rclMesh, this->_material); if (reader.Load(rstrIn)) { @@ -329,10 +357,10 @@ bool MeshInput::LoadOBJ (std::istream &rstrIn) return false; } -bool MeshInput::LoadOBJ (std::istream &str, const char* filename) +bool MeshInput::LoadOBJ(std::istream& str, const char* filename) { ReaderOBJ reader(this->_rclMesh, this->_material); - if (reader.Load( str )) { + if (reader.Load(str)) { _groupNames = reader.GetGroupNames(); if (this->_material && this->_material->binding == MeshCore::MeshIO::PER_FACE) { Base::FileInfo fi(filename); @@ -350,31 +378,33 @@ bool MeshInput::LoadOBJ (std::istream &str, const char* filename) } /** Loads an SMF file. */ -bool MeshInput::LoadSMF (std::istream &rstrIn) +bool MeshInput::LoadSMF(std::istream& rstrIn) { boost::regex rx_p("^v\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*$"); boost::regex rx_f3("^f\\s+([-+]?[0-9]+)" - "\\s+([-+]?[0-9]+)" - "\\s+([-+]?[0-9]+)\\s*$"); + "\\s+([-+]?[0-9]+)" + "\\s+([-+]?[0-9]+)\\s*$"); boost::cmatch what; - unsigned long segment=0; + unsigned long segment = 0; MeshPointArray meshPoints; MeshFacetArray meshFacets; std::string line; float fX, fY, fZ; - int i1=1,i2=1,i3=1; + int i1 = 1, i2 = 1, i3 = 1; MeshFacet item; - if (!rstrIn || rstrIn.bad()) + if (!rstrIn || rstrIn.bad()) { return false; + } std::streambuf* buf = rstrIn.rdbuf(); - if (!buf) + if (!buf) { return false; + } while (std::getline(rstrIn, line)) { if (boost::regex_match(line.c_str(), what, rx_p)) { @@ -386,30 +416,30 @@ bool MeshInput::LoadSMF (std::istream &rstrIn) else if (boost::regex_match(line.c_str(), what, rx_f3)) { // 3-vertex face i1 = std::atoi(what[1].first); - i1 = i1 > 0 ? i1-1 : i1+static_cast(meshPoints.size()); + i1 = i1 > 0 ? i1 - 1 : i1 + static_cast(meshPoints.size()); i2 = std::atoi(what[2].first); - i2 = i2 > 0 ? i2-1 : i2+static_cast(meshPoints.size()); + i2 = i2 > 0 ? i2 - 1 : i2 + static_cast(meshPoints.size()); i3 = std::atoi(what[3].first); - i3 = i3 > 0 ? i3-1 : i3+static_cast(meshPoints.size()); - item.SetVertices(i1,i2,i3); + i3 = i3 > 0 ? i3 - 1 : i3 + static_cast(meshPoints.size()); + item.SetVertices(i1, i2, i3); item.SetProperty(segment); meshFacets.push_back(item); } } - this->_rclMesh.Clear(); // remove all data before + this->_rclMesh.Clear(); // remove all data before - MeshCleanup meshCleanup(meshPoints,meshFacets); + MeshCleanup meshCleanup(meshPoints, meshFacets); meshCleanup.RemoveInvalids(); - MeshPointFacetAdjacency meshAdj(meshPoints.size(),meshFacets); + MeshPointFacetAdjacency meshAdj(meshPoints.size(), meshFacets); meshAdj.SetFacetNeighbourhood(); - this->_rclMesh.Adopt(meshPoints,meshFacets); + this->_rclMesh.Adopt(meshPoints, meshFacets); return true; } /** Loads an OFF file. */ -bool MeshInput::LoadOFF (std::istream &rstrIn) +bool MeshInput::LoadOFF(std::istream& rstrIn) { // http://edutechwiki.unige.ch/en/3D_file_format boost::regex rx_n(R"(^\s*([0-9]+)\s+([0-9]+)\s+([0-9]+)\s*$)"); @@ -423,12 +453,14 @@ bool MeshInput::LoadOFF (std::istream &rstrIn) std::string line; MeshFacet item; - if (!rstrIn || rstrIn.bad()) + if (!rstrIn || rstrIn.bad()) { return false; + } std::streambuf* buf = rstrIn.rdbuf(); - if (!buf) + if (!buf) { return false; + } std::getline(rstrIn, line); boost::algorithm::to_lower(line); @@ -437,11 +469,11 @@ bool MeshInput::LoadOFF (std::istream &rstrIn) colorPerVertex = true; } else if (line.find("off") == std::string::npos) { - return false; // not an OFF file + return false; // not an OFF file } // get number of vertices and faces - int numPoints=0, numFaces=0; + int numPoints = 0, numFaces = 0; while (true) { std::getline(rstrIn, line); @@ -453,25 +485,30 @@ bool MeshInput::LoadOFF (std::istream &rstrIn) } } - if (numPoints == 0 || numFaces == 0) + if (numPoints == 0 || numFaces == 0) { return false; + } meshPoints.reserve(numPoints); meshFacets.reserve(numFaces); - if (colorPerVertex) + if (colorPerVertex) { diffuseColor.reserve(numPoints); - else + } + else { diffuseColor.reserve(numFaces); + } int cntPoints = 0; while (cntPoints < numPoints) { - if (!std::getline(rstrIn, line)) + if (!std::getline(rstrIn, line)) { break; + } std::istringstream str(line); str.unsetf(std::ios_base::skipws); str >> std::ws; - if (str.eof()) - continue; // empty line + if (str.eof()) { + continue; // empty line + } float fX, fY, fZ; str >> fX >> std::ws >> fY >> std::ws >> fZ; @@ -482,19 +519,20 @@ bool MeshInput::LoadOFF (std::istream &rstrIn) if (colorPerVertex) { std::size_t pos = std::size_t(str.tellg()); if (line.size() > pos) { - float r,g,b,a; + float r, g, b, a; str >> std::ws >> r >> std::ws >> g >> std::ws >> b; if (str) { str >> std::ws >> a; // no transparency - if (!str) + if (!str) { a = 0.0f; + } if (r > 1.0f || g > 1.0f || b > 1.0f || a > 1.0f) { - r = static_cast(r)/255.0f; - g = static_cast(g)/255.0f; - b = static_cast(b)/255.0f; - a = static_cast(a)/255.0f; + r = static_cast(r) / 255.0f; + g = static_cast(g) / 255.0f; + b = static_cast(b) / 255.0f; + a = static_cast(a) / 255.0f; } diffuseColor.emplace_back(r, g, b, a); } @@ -505,13 +543,15 @@ bool MeshInput::LoadOFF (std::istream &rstrIn) int cntFaces = 0; while (cntFaces < numFaces) { - if (!std::getline(rstrIn, line)) + if (!std::getline(rstrIn, line)) { break; + } std::istringstream str(line); str.unsetf(std::ios_base::skipws); str >> std::ws; - if (str.eof()) - continue; // empty line + if (str.eof()) { + continue; // empty line + } int count, index; str >> count; if (count >= 3) { @@ -524,29 +564,30 @@ bool MeshInput::LoadOFF (std::istream &rstrIn) faces.push_back(index); } - for (int i = 0; i < count-2; i++) { - item.SetVertices(faces[0],faces[i+1],faces[i+2]); + for (int i = 0; i < count - 2; i++) { + item.SetVertices(faces[0], faces[i + 1], faces[i + 2]); meshFacets.push_back(item); } cntFaces++; std::size_t pos = std::size_t(str.tellg()); if (line.size() > pos) { - float r,g,b,a; + float r, g, b, a; str >> std::ws >> r >> std::ws >> g >> std::ws >> b; if (str) { str >> std::ws >> a; // no transparency - if (!str) + if (!str) { a = 0.0f; + } if (r > 1.0f || g > 1.0f || b > 1.0f || a > 1.0f) { - r = static_cast(r)/255.0f; - g = static_cast(g)/255.0f; - b = static_cast(b)/255.0f; - a = static_cast(a)/255.0f; + r = static_cast(r) / 255.0f; + g = static_cast(g) / 255.0f; + b = static_cast(b) / 255.0f; + a = static_cast(a) / 255.0f; } - for (int i = 0; i < count-2; i++) { + for (int i = 0; i < count - 2; i++) { diffuseColor.emplace_back(r, g, b, a); } } @@ -568,68 +609,86 @@ bool MeshInput::LoadOFF (std::istream &rstrIn) } } } - this->_rclMesh.Clear(); // remove all data before + this->_rclMesh.Clear(); // remove all data before - MeshCleanup meshCleanup(meshPoints,meshFacets); - if (_material) + MeshCleanup meshCleanup(meshPoints, meshFacets); + if (_material) { meshCleanup.SetMaterial(_material); + } meshCleanup.RemoveInvalids(); - MeshPointFacetAdjacency meshAdj(meshPoints.size(),meshFacets); + MeshPointFacetAdjacency meshAdj(meshPoints.size(), meshFacets); meshAdj.SetFacetNeighbourhood(); - this->_rclMesh.Adopt(meshPoints,meshFacets); + this->_rclMesh.Adopt(meshPoints, meshFacets); return true; } -namespace MeshCore { - namespace Ply { - enum Number { - int8, uint8, int16, uint16, int32, uint32, float32, float64 - }; - struct Property - { - using first_argument_type = std::pair; - using second_argument_type = std::string; - using result_type = bool; +namespace MeshCore +{ +namespace Ply +{ +enum Number +{ + int8, + uint8, + int16, + uint16, + int32, + uint32, + float32, + float64 +}; +struct Property +{ + using first_argument_type = std::pair; + using second_argument_type = std::string; + using result_type = bool; - bool operator()(const std::pair& x, - const std::string& y) const - { - return x.first == y; - } - }; + bool operator()(const std::pair& x, const std::string& y) const + { + return x.first == y; } - using namespace Ply; -} +}; +} // namespace Ply +using namespace Ply; +} // namespace MeshCore -bool MeshInput::LoadPLY (std::istream &inp) +bool MeshInput::LoadPLY(std::istream& inp) { // http://local.wasp.uwa.edu.au/~pbourke/dataformats/ply/ - std::size_t v_count=0, f_count=0; + std::size_t v_count = 0, f_count = 0; MeshPointArray meshPoints; MeshFacetArray meshFacets; - enum { - unknown, ascii, binary_little_endian, binary_big_endian + enum + { + unknown, + ascii, + binary_little_endian, + binary_big_endian } format = unknown; - if (!inp || inp.bad()) + if (!inp || inp.bad()) { return false; + } std::streambuf* buf = inp.rdbuf(); - if (!buf) + if (!buf) { return false; + } // read in the first three characters char ply[3]; inp.read(ply, 3); inp.ignore(1); - if (!inp) + if (!inp) { return false; - if ((ply[0] != 'p') || (ply[1] != 'l') || (ply[2] != 'y')) - return false; // wrong header + } + if ((ply[0] != 'p') || (ply[1] != 'l') || (ply[2] != 'y')) { + return false; // wrong header + } - std::vector > vertex_props; + std::vector> vertex_props; std::vector face_props; std::string line, element; @@ -638,19 +697,18 @@ bool MeshInput::LoadPLY (std::istream &inp) std::istringstream str(line); str.unsetf(std::ios_base::skipws); str >> std::ws; - if (str.eof()) - continue; // empty line + if (str.eof()) { + continue; // empty line + } std::string kw; str >> kw; if (kw == "format") { std::string format_string, version; char space_format_string, space_format_version; - str >> space_format_string >> std::ws - >> format_string >> space_format_version + str >> space_format_string >> std::ws >> format_string >> space_format_version >> std::ws >> version; if (/*!str || !str.eof() ||*/ - !std::isspace(space_format_string) || - !std::isspace(space_format_version)) { + !std::isspace(space_format_string) || !std::isspace(space_format_version)) { return false; } if (format_string == "ascii") { @@ -675,12 +733,9 @@ bool MeshInput::LoadPLY (std::istream &inp) std::string name; std::size_t count; char space_element_name, space_name_count; - str >> space_element_name >> std::ws - >> name >> space_name_count >> std::ws - >> count; + str >> space_element_name >> std::ws >> name >> space_name_count >> std::ws >> count; if (/*!str || !str.eof() ||*/ - !std::isspace(space_element_name) || - !std::isspace(space_name_count)) { + !std::isspace(space_element_name) || !std::isspace(space_name_count)) { return false; } else if (name == "vertex") { @@ -701,8 +756,7 @@ bool MeshInput::LoadPLY (std::istream &inp) std::string type, name; char space; if (element == "vertex") { - str >> space >> std::ws - >> type >> space >> std::ws >> name >> std::ws; + str >> space >> std::ws >> type >> space >> std::ws >> name >> std::ws; Ply::Number number; if (type == "char" || type == "int8") { @@ -739,11 +793,9 @@ bool MeshInput::LoadPLY (std::istream &inp) } else if (element == "face") { std::string list, uchr; - str >> space >> std::ws - >> list >> std::ws; + str >> space >> std::ws >> list >> std::ws; if (list == "list") { - str >> uchr >> std::ws - >> type >> std::ws >> name >> std::ws; + str >> uchr >> std::ws >> type >> std::ws >> name >> std::ws; } else { // not a 'list' @@ -787,46 +839,71 @@ bool MeshInput::LoadPLY (std::istream &inp) } } else if (kw == "end_header") { - break; // end of the header, now read the data + break; // end of the header, now read the data } } // check if valid 3d points Property property; - std::size_t num_x = std::count_if(vertex_props.begin(), vertex_props.end(), - [&property](const std::pair& p) { return property(p, "x"); }); - if (num_x != 1) + std::size_t num_x = std::count_if(vertex_props.begin(), + vertex_props.end(), + [&property](const std::pair& p) { + return property(p, "x"); + }); + if (num_x != 1) { return false; + } - std::size_t num_y = std::count_if(vertex_props.begin(), vertex_props.end(), - [&property](const std::pair& p) { return property(p, "y"); }); - if (num_y != 1) + std::size_t num_y = std::count_if(vertex_props.begin(), + vertex_props.end(), + [&property](const std::pair& p) { + return property(p, "y"); + }); + if (num_y != 1) { return false; + } - std::size_t num_z = std::count_if(vertex_props.begin(), vertex_props.end(), - [&property](const std::pair& p) { return property(p, "z"); }); - if (num_z != 1) + std::size_t num_z = std::count_if(vertex_props.begin(), + vertex_props.end(), + [&property](const std::pair& p) { + return property(p, "z"); + }); + if (num_z != 1) { return false; + } - for (auto & it : vertex_props) { - if (it.first == "diffuse_red") + for (auto& it : vertex_props) { + if (it.first == "diffuse_red") { it.first = "red"; - else if (it.first == "diffuse_green") + } + else if (it.first == "diffuse_green") { it.first = "green"; - else if (it.first == "diffuse_blue") + } + else if (it.first == "diffuse_blue") { it.first = "blue"; + } } // check if valid colors are set - std::size_t num_r = std::count_if(vertex_props.begin(), vertex_props.end(), - [&property](const std::pair& p) { return property(p, "red"); }); - std::size_t num_g = std::count_if(vertex_props.begin(), vertex_props.end(), - [&property](const std::pair& p) { return property(p, "green"); }); - std::size_t num_b = std::count_if(vertex_props.begin(), vertex_props.end(), - [&property](const std::pair& p) { return property(p, "blue"); }); + std::size_t num_r = std::count_if(vertex_props.begin(), + vertex_props.end(), + [&property](const std::pair& p) { + return property(p, "red"); + }); + std::size_t num_g = std::count_if(vertex_props.begin(), + vertex_props.end(), + [&property](const std::pair& p) { + return property(p, "green"); + }); + std::size_t num_b = std::count_if(vertex_props.begin(), + vertex_props.end(), + [&property](const std::pair& p) { + return property(p, "blue"); + }); std::size_t rgb_colors = num_r + num_g + num_b; - if (rgb_colors != 0 && rgb_colors != 3) + if (rgb_colors != 0 && rgb_colors != 3) { return false; + } // only if set per vertex if (rgb_colors == 3) { @@ -847,12 +924,11 @@ bool MeshInput::LoadPLY (std::istream &inp) for (std::size_t i = 0; i < v_count && std::getline(inp, line); i++) { // go through the vertex properties std::map prop_values; - for (const auto & it : vertex_props) { + for (const auto& it : vertex_props) { switch (it.second) { - case int8: - case int16: - case int32: - { + case int8: + case int16: + case int32: { if (boost::regex_search(line, what, rx_s)) { int v; v = boost::lexical_cast(what[1]); @@ -863,10 +939,9 @@ bool MeshInput::LoadPLY (std::istream &inp) return false; } } break; - case uint8: - case uint16: - case uint32: - { + case uint8: + case uint16: + case uint32: { if (boost::regex_search(line, what, rx_u)) { int v; v = boost::lexical_cast(what[1]); @@ -877,9 +952,8 @@ bool MeshInput::LoadPLY (std::istream &inp) return false; } } break; - case float32: - case float64: - { + case float32: + case float64: { if (boost::regex_search(line, what, rx_d)) { double v; v = boost::lexical_cast(what[1]); @@ -890,8 +964,8 @@ bool MeshInput::LoadPLY (std::istream &inp) return false; } } break; - default: - return false; + default: + return false; } } @@ -915,65 +989,67 @@ bool MeshInput::LoadPLY (std::istream &inp) f1 = boost::lexical_cast(what[1]); f2 = boost::lexical_cast(what[2]); f3 = boost::lexical_cast(what[3]); - meshFacets.push_back(MeshFacet(f1,f2,f3)); + meshFacets.push_back(MeshFacet(f1, f2, f3)); } } } // binary else { Base::InputStream is(inp); - if (format == binary_little_endian) + if (format == binary_little_endian) { is.setByteOrder(Base::Stream::LittleEndian); - else + } + else { is.setByteOrder(Base::Stream::BigEndian); + } for (std::size_t i = 0; i < v_count; i++) { // go through the vertex properties std::map prop_values; - for (const auto & it : vertex_props) { + for (const auto& it : vertex_props) { switch (it.second) { - case int8: - { - int8_t v; is >> v; + case int8: { + int8_t v; + is >> v; prop_values[it.first] = static_cast(v); } break; - case uint8: - { - uint8_t v; is >> v; + case uint8: { + uint8_t v; + is >> v; prop_values[it.first] = static_cast(v); } break; - case int16: - { - int16_t v; is >> v; + case int16: { + int16_t v; + is >> v; prop_values[it.first] = static_cast(v); } break; - case uint16: - { - uint16_t v; is >> v; + case uint16: { + uint16_t v; + is >> v; prop_values[it.first] = static_cast(v); } break; - case int32: - { - int32_t v; is >> v; + case int32: { + int32_t v; + is >> v; prop_values[it.first] = static_cast(v); } break; - case uint32: - { - uint32_t v; is >> v; + case uint32: { + uint32_t v; + is >> v; prop_values[it.first] = static_cast(v); } break; - case float32: - { - float v; is >> v; + case float32: { + float v; + is >> v; prop_values[it.first] = v; } break; - case float64: - { - double v; is >> v; + case float64: { + double v; + is >> v; prop_values[it.first] = static_cast(v); } break; - default: - return false; + default: + return false; } } @@ -995,72 +1071,74 @@ bool MeshInput::LoadPLY (std::istream &inp) uint32_t f1, f2, f3; for (std::size_t i = 0; i < f_count; i++) { is >> n; - if (n==3) { + if (n == 3) { is >> f1 >> f2 >> f3; - if (f1 < v_count && f2 < v_count && f3 < v_count) - meshFacets.push_back(MeshFacet(f1,f2,f3)); + if (f1 < v_count && f2 < v_count && f3 < v_count) { + meshFacets.push_back(MeshFacet(f1, f2, f3)); + } for (auto it : face_props) { switch (it) { - case int8: - { - int8_t v; is >> v; + case int8: { + int8_t v; + is >> v; } break; - case uint8: - { - uint8_t v; is >> v; + case uint8: { + uint8_t v; + is >> v; } break; - case int16: - { - int16_t v; is >> v; + case int16: { + int16_t v; + is >> v; } break; - case uint16: - { - uint16_t v; is >> v; + case uint16: { + uint16_t v; + is >> v; } break; - case int32: - { - int32_t v; is >> v; + case int32: { + int32_t v; + is >> v; } break; - case uint32: - { - uint32_t v; is >> v; + case uint32: { + uint32_t v; + is >> v; } break; - case float32: - { + case float32: { is >> n; float v; - for (unsigned char j=0; j> v; + } } break; - case float64: - { + case float64: { is >> n; double v; - for (unsigned char j=0; j> v; + } } break; - default: - return false; + default: + return false; } } } } } - this->_rclMesh.Clear(); // remove all data before + this->_rclMesh.Clear(); // remove all data before - MeshCleanup meshCleanup(meshPoints,meshFacets); - if (_material) + MeshCleanup meshCleanup(meshPoints, meshFacets); + if (_material) { meshCleanup.SetMaterial(_material); + } meshCleanup.RemoveInvalids(); - MeshPointFacetAdjacency meshAdj(meshPoints.size(),meshFacets); + MeshPointFacetAdjacency meshAdj(meshPoints.size(), meshFacets); meshAdj.SetFacetNeighbourhood(); - this->_rclMesh.Adopt(meshPoints,meshFacets); + this->_rclMesh.Adopt(meshPoints, meshFacets); return true; } -bool MeshInput::LoadMeshNode (std::istream &rstrIn) +bool MeshInput::LoadMeshNode(std::istream& rstrIn) { boost::regex rx_p("^v\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" @@ -1074,15 +1152,17 @@ bool MeshInput::LoadMeshNode (std::istream &rstrIn) std::string line; float fX, fY, fZ; - unsigned int i1=1,i2=1,i3=1; + unsigned int i1 = 1, i2 = 1, i3 = 1; MeshGeomFacet clFacet; - if (!rstrIn || rstrIn.bad()) + if (!rstrIn || rstrIn.bad()) { return false; + } std::streambuf* buf = rstrIn.rdbuf(); - if (!buf) + if (!buf) { return false; + } while (std::getline(rstrIn, line)) { boost::algorithm::to_lower(line); @@ -1096,26 +1176,26 @@ bool MeshInput::LoadMeshNode (std::istream &rstrIn) i1 = std::atoi(what[1].first); i2 = std::atoi(what[2].first); i3 = std::atoi(what[3].first); - meshFacets.push_back(MeshFacet(i1-1,i2-1,i3-1)); + meshFacets.push_back(MeshFacet(i1 - 1, i2 - 1, i3 - 1)); } else if (boost::regex_match(line.c_str(), what, rx_e)) { break; } } - this->_rclMesh.Clear(); // remove all data before + this->_rclMesh.Clear(); // remove all data before - MeshCleanup meshCleanup(meshPoints,meshFacets); + MeshCleanup meshCleanup(meshPoints, meshFacets); meshCleanup.RemoveInvalids(); - MeshPointFacetAdjacency meshAdj(meshPoints.size(),meshFacets); + MeshPointFacetAdjacency meshAdj(meshPoints.size(), meshFacets); meshAdj.SetFacetNeighbourhood(); - this->_rclMesh.Adopt(meshPoints,meshFacets); + this->_rclMesh.Adopt(meshPoints, meshFacets); return true; } /** Loads an ASCII STL file. */ -bool MeshInput::LoadAsciiSTL (std::istream &rstrIn) +bool MeshInput::LoadAsciiSTL(std::istream& rstrIn) { boost::regex rx_p("^\\s*VERTEX\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" @@ -1127,11 +1207,12 @@ bool MeshInput::LoadAsciiSTL (std::istream &rstrIn) std::string line; float fX, fY, fZ; - unsigned long ulVertexCt, ulFacetCt=0; + unsigned long ulVertexCt, ulFacetCt = 0; MeshGeomFacet clFacet; - if (!rstrIn || rstrIn.bad()) + if (!rstrIn || rstrIn.bad()) { return false; + } std::streamoff ulSize = 0; std::streambuf* buf = rstrIn.rdbuf(); @@ -1142,13 +1223,16 @@ bool MeshInput::LoadAsciiSTL (std::istream &rstrIn) // count facets while (std::getline(rstrIn, line)) { boost::algorithm::to_upper(line); - if (line.find("ENDFACET") != std::string::npos) + if (line.find("ENDFACET") != std::string::npos) { ulFacetCt++; + } // prevent from reading EOF (as I don't know how to reread the file then) - if (rstrIn.tellg() > ulSize) + if (rstrIn.tellg() > ulSize) { break; - else if (line.find("ENDSOLID") != std::string::npos) + } + else if (line.find("ENDSOLID") != std::string::npos) { break; + } } // restart from the beginning @@ -1188,23 +1272,25 @@ bool MeshInput::LoadAsciiSTL (std::istream &rstrIn) } /** Loads a binary STL file. */ -bool MeshInput::LoadBinarySTL (std::istream &rstrIn) +bool MeshInput::LoadBinarySTL(std::istream& rstrIn) { char szInfo[80]; Base::Vector3f clVects[4]; uint16_t usAtt = 0; uint32_t ulCt = 0; - if (!rstrIn || rstrIn.bad()) + if (!rstrIn || rstrIn.bad()) { return false; + } // Header-Info ueberlesen rstrIn.read(szInfo, sizeof(szInfo)); // Anzahl Facets rstrIn.read((char*)&ulCt, sizeof(ulCt)); - if (rstrIn.bad()) + if (rstrIn.bad()) { return false; + } // get file size and calculate the number of facets std::streamoff ulSize = 0; @@ -1219,8 +1305,9 @@ bool MeshInput::LoadBinarySTL (std::istream &rstrIn) uint32_t ulFac = (ulSize - (80 + sizeof(uint32_t))) / 50; // compare the calculated with the read value - if (ulCt > ulFac) - return false;// not a valid STL file + if (ulCt > ulFac) { + return false; // not a valid STL file + } #if 0 MeshBuilder builder(this->_rclMesh); @@ -1246,18 +1333,18 @@ bool MeshInput::LoadBinarySTL (std::istream &rstrIn) } /** Loads the mesh object from an XML file. */ -void MeshInput::LoadXML (Base::XMLReader &reader) +void MeshInput::LoadXML(Base::XMLReader& reader) { MeshPointArray cPoints; MeshFacetArray cFacets; -// reader.readElement("Mesh"); + // reader.readElement("Mesh"); reader.readElement("Points"); int Cnt = reader.getAttributeAsInteger("Count"); cPoints.resize(Cnt); - for (int i=0 ;i mNode; - std::map mTria; - std::map mQuad; + std::map mNode; + std::map mTria; + std::map mQuad; int badElementCounter = 0; @@ -1380,8 +1474,9 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) // Skip all the following tests } else if (line.rfind("GRID*", 0) == 0) { - // This element is the 16-digit-precision GRID element, which occupies two lines of the card. Note that - // FreeCAD discards the extra precision, downcasting to an four-byte float. + // This element is the 16-digit-precision GRID element, which occupies two lines of the + // card. Note that FreeCAD discards the extra precision, downcasting to an four-byte + // float. // // The two lines are: // 1 8 24 40 56 @@ -1389,32 +1484,33 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) // * z(at least one) // // The first character is typically the sign, and may be omitted for positive numbers, - // so it is possible for a field to begin with a blank. Trailing zeros may be omitted, so - // a field may also end with blanks. No space or other delimiter is required between + // so it is possible for a field to begin with a blank. Trailing zeros may be omitted, + // so a field may also end with blanks. No space or other delimiter is required between // the numbers. The following is a valid NASTRAN GRID* element: // // GRID* 1 0.1234567890120. // * 1. // - if (line.length() < 8 + 16 + 16 + 16 + 1) { // Element type(8), index(16), empty(16), x(16), y(>=1) + if (line.length() + < 8 + 16 + 16 + 16 + 1) { // Element type(8), index(16), empty(16), x(16), y(>=1) badElementCounter++; continue; } auto indexView = std::string_view(&line[8], 16); - //auto blankView = std::string_view(&line[8+16], 16); // No data is needed here - auto xView = std::string_view(&line[8+16+16], 16); - auto yView = std::string_view(&line[8+16+16+16]); + // auto blankView = std::string_view(&line[8+16], 16); // No data is needed here + auto xView = std::string_view(&line[8 + 16 + 16], 16); + auto yView = std::string_view(&line[8 + 16 + 16 + 16]); std::string line2; std::getline(rstrIn, line2); - if ((!line2.empty() && line2[0] != '*') || - line2.length() < 9) { + if ((!line2.empty() && line2[0] != '*') || line2.length() < 9) { badElementCounter++; - continue; // File format error: second line is not a continuation line + continue; // File format error: second line is not a continuation line } auto zView = std::string_view(&line2[8]); - // We have to strip off any whitespace (technically really just any *trailing* whitespace): + // We have to strip off any whitespace (technically really just any *trailing* + // whitespace): auto indexString = boost::trim_copy(std::string(indexView)); auto xString = boost::trim_copy(std::string(xView)); auto yString = boost::trim_copy(std::string(yView)); @@ -1427,7 +1523,8 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) badElementCounter++; continue; } - index = indexCheck.get() - 1; // Minus one so we are zero-indexed to match existing code + index = + indexCheck.get() - 1; // Minus one so we are zero-indexed to match existing code // Get the high-precision versions first auto x = boost::convert(xString, converter); @@ -1448,13 +1545,13 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) else if (line.rfind("GRID", 0) == 0) { boost::regex rx_spaceDelimited("\\s*GRID\\s+([0-9]+)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" - "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*"); + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)" + "\\s+([-+]?[0-9]*)\\.?([0-9]+([eE][-+]?[0-9]+)?)\\s*"); if (boost::regex_match(line.c_str(), what, rx_spaceDelimited)) { // insert the read-in vertex into a map to preserve the order - index = std::atol(what[1].first)-1; + index = std::atol(what[1].first) - 1; mNode[index].x = (float)std::atof(what[2].first); mNode[index].y = (float)std::atof(what[5].first); mNode[index].z = (float)std::atof(what[8].first); @@ -1466,7 +1563,8 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) // GRID 1 1.2345671.2345671.234567 // GRID 112 6.0000000.5000000.00E+00 - if (line.length() < 41) { // Element type(8), id(8), cp(8), x(8), y(8), z(at least 1) + if (line.length() + < 41) { // Element type(8), id(8), cp(8), x(8), y(8), z(at least 1) badElementCounter++; continue; } @@ -1487,7 +1585,8 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) badElementCounter++; continue; } - index = indexCheck.get() - 1; // Minus one so we are zero-indexed to match existing code + index = indexCheck.get() + - 1; // Minus one so we are zero-indexed to match existing code auto x = boost::convert(xString, converter); auto y = boost::convert(yString, converter); @@ -1507,20 +1606,20 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) else if (line.rfind("CTRIA3 ", 0) == 0) { if (boost::regex_match(line.c_str(), what, rx_t)) { // insert the read-in triangle into a map to preserve the order - index = std::atol(what[1].first)-1; - mTria[index].iV[0] = std::atol(what[3].first)-1; - mTria[index].iV[1] = std::atol(what[4].first)-1; - mTria[index].iV[2] = std::atol(what[5].first)-1; + index = std::atol(what[1].first) - 1; + mTria[index].iV[0] = std::atol(what[3].first) - 1; + mTria[index].iV[1] = std::atol(what[4].first) - 1; + mTria[index].iV[2] = std::atol(what[5].first) - 1; } } else if (line.rfind("CQUAD4", 0) == 0) { if (boost::regex_match(line.c_str(), what, rx_q)) { // insert the read-in quadrangle into a map to preserve the order - index = std::atol(what[1].first)-1; - mQuad[index].iV[0] = std::atol(what[3].first)-1; - mQuad[index].iV[1] = std::atol(what[4].first)-1; - mQuad[index].iV[2] = std::atol(what[5].first)-1; - mQuad[index].iV[3] = std::atol(what[6].first)-1; + index = std::atol(what[1].first) - 1; + mQuad[index].iV[0] = std::atol(what[3].first) - 1; + mQuad[index].iV[1] = std::atol(what[4].first) - 1; + mQuad[index].iV[2] = std::atol(what[5].first) - 1; + mQuad[index].iV[3] = std::atol(what[6].first) - 1; } } } @@ -1533,7 +1632,8 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) for (const auto& tri : mTria) { for (int i : tri.second.iV) { if (mNode.find(i) == mNode.end()) { - Base::Console().Error("CTRIA3 element refers to a node that does not exist, or could not be read.\n"); + Base::Console().Error( + "CTRIA3 element refers to a node that does not exist, or could not be read.\n"); return false; } } @@ -1543,41 +1643,44 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) for (const auto& quad : mQuad) { for (int i : quad.second.iV) { if (mNode.find(i) == mNode.end()) { - Base::Console().Error("CQUAD4 element refers to a node that does not exist, or could not be read.\n"); + Base::Console().Error( + "CQUAD4 element refers to a node that does not exist, or could not be read.\n"); return false; } } } float fLength[2]; - if (mTria.empty()) + if (mTria.empty()) { index = 0; - else + } + else { index = mTria.rbegin()->first + 1; - for (const auto & QI : mQuad) { + } + for (const auto& QI : mQuad) { for (int i = 0; i < 2; i++) { - float fDx = mNode[QI.second.iV[i+2]].x - mNode[QI.second.iV[i]].x; - float fDy = mNode[QI.second.iV[i+2]].y - mNode[QI.second.iV[i]].y; - float fDz = mNode[QI.second.iV[i+2]].z - mNode[QI.second.iV[i]].z; - fLength[i] = fDx*fDx + fDy*fDy + fDz*fDz; + float fDx = mNode[QI.second.iV[i + 2]].x - mNode[QI.second.iV[i]].x; + float fDy = mNode[QI.second.iV[i + 2]].y - mNode[QI.second.iV[i]].y; + float fDz = mNode[QI.second.iV[i + 2]].z - mNode[QI.second.iV[i]].z; + fLength[i] = fDx * fDx + fDy * fDy + fDz * fDz; } if (fLength[0] < fLength[1]) { mTria[index].iV[0] = QI.second.iV[0]; mTria[index].iV[1] = QI.second.iV[1]; mTria[index].iV[2] = QI.second.iV[2]; - mTria[index+1].iV[0] = QI.second.iV[0]; - mTria[index+1].iV[1] = QI.second.iV[2]; - mTria[index+1].iV[2] = QI.second.iV[3]; + mTria[index + 1].iV[0] = QI.second.iV[0]; + mTria[index + 1].iV[1] = QI.second.iV[2]; + mTria[index + 1].iV[2] = QI.second.iV[3]; } else { mTria[index].iV[0] = QI.second.iV[0]; mTria[index].iV[1] = QI.second.iV[1]; mTria[index].iV[2] = QI.second.iV[3]; - mTria[index+1].iV[0] = QI.second.iV[1]; - mTria[index+1].iV[1] = QI.second.iV[2]; - mTria[index+1].iV[2] = QI.second.iV[3]; + mTria[index + 1].iV[0] = QI.second.iV[1]; + mTria[index + 1].iV[1] = QI.second.iV[2]; + mTria[index + 1].iV[2] = QI.second.iV[3]; } index += 2; @@ -1585,17 +1688,17 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) // Applying the nodes vVertices.reserve(mNode.size()); - for (const auto & MI : mNode) { + for (const auto& MI : mNode) { vVertices.push_back(Base::Vector3f(MI.second.x, MI.second.y, MI.second.z)); } // Converting data to Mesh. Negative conversion for right orientation of normal-vectors. vTriangle.reserve(mTria.size()); - for (const auto & MI : mTria) { + for (const auto& MI : mTria) { clMeshFacet._aulPoints[0] = MI.second.iV[1]; clMeshFacet._aulPoints[1] = MI.second.iV[0]; clMeshFacet._aulPoints[2] = MI.second.iV[2]; - vTriangle.push_back (clMeshFacet); + vTriangle.push_back(clMeshFacet); } // make sure to add only vertices which are referenced by the triangles @@ -1605,10 +1708,11 @@ bool MeshInput::LoadNastran (std::istream &rstrIn) } /** Loads a Cadmould FE file. */ -bool MeshInput::LoadCadmouldFE (std::ifstream &rstrIn) +bool MeshInput::LoadCadmouldFE(std::ifstream& rstrIn) { - if (!rstrIn || rstrIn.bad()) + if (!rstrIn || rstrIn.bad()) { return false; + } assert(0); return false; } @@ -1644,8 +1748,9 @@ void MeshOutput::SetAsymptoteSize(const std::string& w, const std::string& h) void MeshOutput::Transform(const Base::Matrix4D& mat) { _transform = mat; - if (mat != Base::Matrix4D()) + if (mat != Base::Matrix4D()) { apply_transform = true; + } } std::vector MeshOutput::supportedMeshFormats() @@ -1742,8 +1847,9 @@ bool MeshOutput::SaveAny(const char* FileName, MeshIO::Format format) const // ask for write permission Base::FileInfo file(FileName); Base::FileInfo directory(file.dirPath()); - if ((file.exists() && !file.isWritable()) || !directory.exists() || !directory.isWritable()) - throw Base::FileException("No write permission for file",FileName); + if ((file.exists() && !file.isWritable()) || !directory.exists() || !directory.isWritable()) { + throw Base::FileException("No write permission for file", FileName); + } MeshIO::Format fileformat = format; if (fileformat == MeshIO::Undefined) { @@ -1761,10 +1867,10 @@ bool MeshOutput::SaveAny(const char* FileName, MeshIO::Format format) const // write file bool ok = false; - ok = aWriter.SaveBinarySTL( str ); - if (!ok) - throw Base::FileException("Export of STL mesh failed",FileName); - + ok = aWriter.SaveBinarySTL(str); + if (!ok) { + throw Base::FileException("Export of STL mesh failed", FileName); + } } else if (fileformat == MeshIO::ASTL) { MeshOutput aWriter(_rclMesh); @@ -1773,103 +1879,121 @@ bool MeshOutput::SaveAny(const char* FileName, MeshIO::Format format) const // write file bool ok = false; - ok = aWriter.SaveAsciiSTL( str ); - if (!ok) - throw Base::FileException("Export of STL mesh failed",FileName); + ok = aWriter.SaveAsciiSTL(str); + if (!ok) { + throw Base::FileException("Export of STL mesh failed", FileName); + } } else if (fileformat == MeshIO::OBJ) { // write file - if (!SaveOBJ(str, FileName)) - throw Base::FileException("Export of OBJ mesh failed",FileName); + if (!SaveOBJ(str, FileName)) { + throw Base::FileException("Export of OBJ mesh failed", FileName); + } } else if (fileformat == MeshIO::SMF) { // write file - if (!SaveSMF(str)) - throw Base::FileException("Export of SMF mesh failed",FileName); + if (!SaveSMF(str)) { + throw Base::FileException("Export of SMF mesh failed", FileName); + } } else if (fileformat == MeshIO::OFF) { // write file - if (!SaveOFF(str)) - throw Base::FileException("Export of OFF mesh failed",FileName); + if (!SaveOFF(str)) { + throw Base::FileException("Export of OFF mesh failed", FileName); + } } else if (fileformat == MeshIO::PLY) { // write file - if (!SaveBinaryPLY(str)) - throw Base::FileException("Export of PLY mesh failed",FileName); + if (!SaveBinaryPLY(str)) { + throw Base::FileException("Export of PLY mesh failed", FileName); + } } else if (fileformat == MeshIO::APLY) { // write file - if (!SaveAsciiPLY(str)) - throw Base::FileException("Export of PLY mesh failed",FileName); + if (!SaveAsciiPLY(str)) { + throw Base::FileException("Export of PLY mesh failed", FileName); + } } else if (fileformat == MeshIO::IDTF) { // write file - if (!SaveIDTF(str)) - throw Base::FileException("Export of IDTF mesh failed",FileName); + if (!SaveIDTF(str)) { + throw Base::FileException("Export of IDTF mesh failed", FileName); + } } else if (fileformat == MeshIO::MGL) { // write file - if (!SaveMGL(str)) - throw Base::FileException("Export of MGL mesh failed",FileName); + if (!SaveMGL(str)) { + throw Base::FileException("Export of MGL mesh failed", FileName); + } } else if (fileformat == MeshIO::IV) { // write file - if (!SaveInventor(str)) - throw Base::FileException("Export of Inventor mesh failed",FileName); + if (!SaveInventor(str)) { + throw Base::FileException("Export of Inventor mesh failed", FileName); + } } else if (fileformat == MeshIO::X3D) { // write file - if (!SaveX3D(str)) - throw Base::FileException("Export of X3D failed",FileName); + if (!SaveX3D(str)) { + throw Base::FileException("Export of X3D failed", FileName); + } } else if (fileformat == MeshIO::X3DZ) { // Compressed X3D is nothing else than a GZIP'ped X3D ascii file zipios::GZIPOutputStream gzip(str); // write file - if (!SaveX3D(gzip)) - throw Base::FileException("Export of compressed X3D mesh failed",FileName); + if (!SaveX3D(gzip)) { + throw Base::FileException("Export of compressed X3D mesh failed", FileName); + } } else if (fileformat == MeshIO::X3DOM) { // write file - if (!SaveX3DOM(str)) - throw Base::FileException("Export of X3DOM failed",FileName); + if (!SaveX3DOM(str)) { + throw Base::FileException("Export of X3DOM failed", FileName); + } } else if (fileformat == MeshIO::ThreeMF) { // write file - if (!Save3MF(str)) - throw Base::FileException("Export of 3MF failed",FileName); + if (!Save3MF(str)) { + throw Base::FileException("Export of 3MF failed", FileName); + } } else if (fileformat == MeshIO::PY) { // write file - if (!SavePython(str)) - throw Base::FileException("Export of Python mesh failed",FileName); + if (!SavePython(str)) { + throw Base::FileException("Export of Python mesh failed", FileName); + } } else if (fileformat == MeshIO::VRML) { // write file - if (!SaveVRML(str)) - throw Base::FileException("Export of VRML mesh failed",FileName); + if (!SaveVRML(str)) { + throw Base::FileException("Export of VRML mesh failed", FileName); + } } else if (fileformat == MeshIO::WRZ) { // Compressed VRML is nothing else than a GZIP'ped VRML ascii file // str.close(); - //Base::ogzstream gzip(FileName, std::ios::out | std::ios::binary); - //Hint: The compression level seems to be higher than with ogzstream - //which leads to problems to load the wrz file in debug mode, the - //application simply crashes. + // Base::ogzstream gzip(FileName, std::ios::out | std::ios::binary); + // Hint: The compression level seems to be higher than with ogzstream + // which leads to problems to load the wrz file in debug mode, the + // application simply crashes. zipios::GZIPOutputStream gzip(str); // write file - if (!SaveVRML(gzip)) - throw Base::FileException("Export of compressed VRML mesh failed",FileName); + if (!SaveVRML(gzip)) { + throw Base::FileException("Export of compressed VRML mesh failed", FileName); + } } else if (fileformat == MeshIO::NAS) { // write file - if (!SaveNastran(str)) - throw Base::FileException("Export of NASTRAN mesh failed",FileName); + if (!SaveNastran(str)) { + throw Base::FileException("Export of NASTRAN mesh failed", FileName); + } } else if (fileformat == MeshIO::ASY) { // write file - if (!SaveAsymptote(str)) - throw Base::FileException("Export of ASY mesh failed",FileName); + if (!SaveAsymptote(str)) { + throw Base::FileException("Export of ASY mesh failed", FileName); + } } else { throw Base::FileException("File format not supported", FileName); @@ -1878,72 +2002,75 @@ bool MeshOutput::SaveAny(const char* FileName, MeshIO::Format format) const return true; } -bool MeshOutput::SaveFormat(std::ostream &str, MeshIO::Format fmt) const +bool MeshOutput::SaveFormat(std::ostream& str, MeshIO::Format fmt) const { switch (fmt) { - case MeshIO::BMS: - _rclMesh.Write(str); - return true; - case MeshIO::ASTL: - return SaveAsciiSTL(str); - case MeshIO::BSTL: - return SaveBinarySTL(str); - case MeshIO::OBJ: - return SaveOBJ(str); - case MeshIO::SMF: - return SaveSMF(str); - case MeshIO::OFF: - return SaveOFF(str); - case MeshIO::IDTF: - return SaveIDTF(str); - case MeshIO::MGL: - return SaveMGL(str); - case MeshIO::IV: - return SaveInventor(str); - case MeshIO::X3D: - return SaveX3D(str); - case MeshIO::X3DOM: - return SaveX3DOM(str); - case MeshIO::VRML: - return SaveVRML(str); - case MeshIO::WRZ: - // it's up to the client to create the needed stream - return SaveVRML(str); - case MeshIO::ThreeMF: - return Save3MF(str); - case MeshIO::NAS: - return SaveNastran(str); - case MeshIO::PLY: - return SaveBinaryPLY(str); - case MeshIO::APLY: - return SaveAsciiPLY(str); - case MeshIO::PY: - return SavePython(str); - case MeshIO::ASY: - return SaveAsymptote(str); - default: - throw Base::FileException("Unsupported file format"); + case MeshIO::BMS: + _rclMesh.Write(str); + return true; + case MeshIO::ASTL: + return SaveAsciiSTL(str); + case MeshIO::BSTL: + return SaveBinarySTL(str); + case MeshIO::OBJ: + return SaveOBJ(str); + case MeshIO::SMF: + return SaveSMF(str); + case MeshIO::OFF: + return SaveOFF(str); + case MeshIO::IDTF: + return SaveIDTF(str); + case MeshIO::MGL: + return SaveMGL(str); + case MeshIO::IV: + return SaveInventor(str); + case MeshIO::X3D: + return SaveX3D(str); + case MeshIO::X3DOM: + return SaveX3DOM(str); + case MeshIO::VRML: + return SaveVRML(str); + case MeshIO::WRZ: + // it's up to the client to create the needed stream + return SaveVRML(str); + case MeshIO::ThreeMF: + return Save3MF(str); + case MeshIO::NAS: + return SaveNastran(str); + case MeshIO::PLY: + return SaveBinaryPLY(str); + case MeshIO::APLY: + return SaveAsciiPLY(str); + case MeshIO::PY: + return SavePython(str); + case MeshIO::ASY: + return SaveAsymptote(str); + default: + throw Base::FileException("Unsupported file format"); } } /** Saves the mesh object into an ASCII file. */ -bool MeshOutput::SaveAsciiSTL (std::ostream &rstrOut) const +bool MeshOutput::SaveAsciiSTL(std::ostream& rstrOut) const { MeshFacetIterator clIter(_rclMesh), clEnd(_rclMesh); clIter.Transform(this->_transform); - const MeshGeomFacet *pclFacet; + const MeshGeomFacet* pclFacet; - if (!rstrOut || rstrOut.bad() || _rclMesh.CountFacets() == 0) + if (!rstrOut || rstrOut.bad() || _rclMesh.CountFacets() == 0) { return false; + } rstrOut.precision(6); rstrOut.setf(std::ios::fixed | std::ios::showpoint); Base::SequencerLauncher seq("saving...", _rclMesh.CountFacets() + 1); - if (this->objectName.empty()) + if (this->objectName.empty()) { rstrOut << "solid Mesh\n"; - else + } + else { rstrOut << "solid " << this->objectName << '\n'; + } clIter.Begin(); clEnd.End(); @@ -1951,23 +2078,20 @@ bool MeshOutput::SaveAsciiSTL (std::ostream &rstrOut) const pclFacet = &(*clIter); // normal - rstrOut << " facet normal " << pclFacet->GetNormal().x << " " - << pclFacet->GetNormal().y << " " - << pclFacet->GetNormal().z << '\n'; + rstrOut << " facet normal " << pclFacet->GetNormal().x << " " << pclFacet->GetNormal().y + << " " << pclFacet->GetNormal().z << '\n'; rstrOut << " outer loop\n"; // vertices for (const auto& pnt : pclFacet->_aclPoints) { - rstrOut << " vertex " << pnt.x << " " - << pnt.y << " " - << pnt.z << '\n'; + rstrOut << " vertex " << pnt.x << " " << pnt.y << " " << pnt.z << '\n'; } rstrOut << " endloop\n"; rstrOut << " endfacet\n"; ++clIter; - seq.next(true);// allow to cancel + seq.next(true); // allow to cancel } rstrOut << "endsolid Mesh\n"; @@ -1976,17 +2100,18 @@ bool MeshOutput::SaveAsciiSTL (std::ostream &rstrOut) const } /** Saves the mesh object into a binary file. */ -bool MeshOutput::SaveBinarySTL (std::ostream &rstrOut) const +bool MeshOutput::SaveBinarySTL(std::ostream& rstrOut) const { MeshFacetIterator clIter(_rclMesh), clEnd(_rclMesh); clIter.Transform(this->_transform); - const MeshGeomFacet *pclFacet; + const MeshGeomFacet* pclFacet; uint32_t i; uint16_t usAtt; char szInfo[81]; - if (!rstrOut || rstrOut.bad() /*|| _rclMesh.CountFacets() == 0*/) + if (!rstrOut || rstrOut.bad() /*|| _rclMesh.CountFacets() == 0*/) { return false; + } Base::SequencerLauncher seq("saving...", _rclMesh.CountFacets() + 1); @@ -2019,14 +2144,14 @@ bool MeshOutput::SaveBinarySTL (std::ostream &rstrOut) const rstrOut.write((const char*)&usAtt, sizeof(usAtt)); ++clIter; - seq.next(true); // allow to cancel + seq.next(true); // allow to cancel } return true; } /** Saves an OBJ file. */ -bool MeshOutput::SaveOBJ (std::ostream &out) const +bool MeshOutput::SaveOBJ(std::ostream& out) const { WriterOBJ writer(this->_rclMesh, this->_material); writer.SetTransform(this->_transform); @@ -2034,7 +2159,7 @@ bool MeshOutput::SaveOBJ (std::ostream &out) const return writer.Save(out); } -bool MeshOutput::SaveOBJ (std::ostream &out, const char* filename) const +bool MeshOutput::SaveOBJ(std::ostream& out, const char* filename) const { WriterOBJ writer(this->_rclMesh, this->_material); writer.SetTransform(this->_transform); @@ -2056,14 +2181,15 @@ bool MeshOutput::SaveOBJ (std::ostream &out, const char* filename) const } /** Saves an SMF file. */ -bool MeshOutput::SaveSMF (std::ostream &out) const +bool MeshOutput::SaveSMF(std::ostream& out) const { // http://people.sc.fsu.edu/~jburkardt/data/smf/smf.txt const MeshPointArray& rPoints = _rclMesh.GetPoints(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - if (!out || out.bad()) + if (!out || out.bad()) { return false; + } Base::SequencerLauncher seq("saving...", _rclMesh.CountPoints() + _rclMesh.CountFacets()); @@ -2089,22 +2215,21 @@ bool MeshOutput::SaveSMF (std::ostream &out) const } out << "v " << pt.x << " " << pt.y << " " << pt.z << '\n'; - seq.next(true); // allow to cancel + seq.next(true); // allow to cancel } // facet indices - for (const auto & it : rFacets) { - out << "f " << it._aulPoints[0]+1 << " " - << it._aulPoints[1]+1 << " " - << it._aulPoints[2]+1 << '\n'; - seq.next(true); // allow to cancel + for (const auto& it : rFacets) { + out << "f " << it._aulPoints[0] + 1 << " " << it._aulPoints[1] + 1 << " " + << it._aulPoints[2] + 1 << '\n'; + seq.next(true); // allow to cancel } return true; } /** Saves an Asymptote file. */ -bool MeshOutput::SaveAsymptote(std::ostream &out) const +bool MeshOutput::SaveAsymptote(std::ostream& out) const { out << "/*\n" " * Created by FreeCAD \n" @@ -2114,8 +2239,9 @@ bool MeshOutput::SaveAsymptote(std::ostream &out) const if (!asyWidth.empty()) { out << "size(" << asyWidth; - if (!asyHeight.empty()) + if (!asyHeight.empty()) { out << ", " << asyHeight; + } out << ");\n\n"; } @@ -2128,23 +2254,21 @@ bool MeshOutput::SaveAsymptote(std::ostream &out) const Base::Vector3f upvec(0.0f, 0.0f, 1.0f); out << "// CA:Camera, OB:Camera\n" - << "currentprojection = orthographic(camera = (" << camera.x << ", " - << camera.y << ", " - << camera.z << "),\n" - << " target = (" << target.x << ", " - << target.y << ", " - << target.z << "),\n" + << "currentprojection = orthographic(camera = (" << camera.x << ", " << camera.y << ", " + << camera.z << "),\n" + << " target = (" << target.x << ", " << target.y << ", " + << target.z + << "),\n" " showtarget = false,\n" - " up = (" << upvec.x << ", " - << upvec.y << ", " - << upvec.z << "));\n\n"; + " up = (" + << upvec.x << ", " << upvec.y << ", " << upvec.z << "));\n\n"; - //out << "// LA:Spot, OB:Lamp\n" - // << "// WO:World\n" - // << "currentlight = light(diffuse = rgb(1, 1, 1),\n" - // " specular = rgb(1, 1, 1),\n" - // " background = rgb(0.078281, 0.16041, 0.25),\n" - // " 0.56639, 0.21839, 0.79467);\n\n"; + // out << "// LA:Spot, OB:Lamp\n" + // << "// WO:World\n" + // << "currentlight = light(diffuse = rgb(1, 1, 1),\n" + // " specular = rgb(1, 1, 1),\n" + // " background = rgb(0.078281, 0.16041, 0.25),\n" + // " 0.56639, 0.21839, 0.79467);\n\n"; out << "// ME:Mesh, OB:Mesh\n"; @@ -2155,19 +2279,18 @@ bool MeshOutput::SaveAsymptote(std::ostream &out) const const MeshPointArray& rPoints = _rclMesh.GetPoints(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - bool saveVertexColor = (_material && _material->binding == MeshIO::PER_VERTEX && - _material->diffuseColor.size() == rPoints.size()); - bool saveFaceColor = (_material && _material->binding == MeshIO::PER_FACE && - _material->diffuseColor.size() == rFacets.size()); + bool saveVertexColor = (_material && _material->binding == MeshIO::PER_VERTEX + && _material->diffuseColor.size() == rPoints.size()); + bool saveFaceColor = (_material && _material->binding == MeshIO::PER_FACE + && _material->diffuseColor.size() == rFacets.size()); // global mesh color App::Color mc(0.8f, 0.8f, 0.8f); - if (_material && _material->binding == MeshIO::OVERALL && - _material->diffuseColor.size() == 1) { + if (_material && _material->binding == MeshIO::OVERALL && _material->diffuseColor.size() == 1) { mc = _material->diffuseColor[0]; } std::size_t index = 0; - const MeshGeomFacet *pclFacet; + const MeshGeomFacet* pclFacet; while (clIter < clEnd) { pclFacet = &(*clIter); @@ -2175,9 +2298,7 @@ bool MeshOutput::SaveAsymptote(std::ostream &out) const // vertices for (const auto& pnt : pclFacet->_aclPoints) { - out << '(' << pnt.x << ", " - << pnt.y << ", " - << pnt.z << ")--"; + out << '(' << pnt.x << ", " << pnt.y << ", " << pnt.z << ")--"; } out << "cycle"; @@ -2188,8 +2309,9 @@ bool MeshOutput::SaveAsymptote(std::ostream &out) const for (int i = 0; i < 3; i++) { const App::Color& c = _material->diffuseColor[face._aulPoints[i]]; out << "rgb(" << c.r << ", " << c.g << ", " << c.b << ")"; - if (i < 2) + if (i < 2) { out << ", "; + } } out << "}));\n"; } @@ -2209,24 +2331,27 @@ bool MeshOutput::SaveAsymptote(std::ostream &out) const } /** Saves an OFF file. */ -bool MeshOutput::SaveOFF (std::ostream &out) const +bool MeshOutput::SaveOFF(std::ostream& out) const { const MeshPointArray& rPoints = _rclMesh.GetPoints(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - if (!out || out.bad()) + if (!out || out.bad()) { return false; + } Base::SequencerLauncher seq("saving...", _rclMesh.CountPoints() + _rclMesh.CountFacets()); bool exportColor = false; if (_material) { if (_material->binding == MeshIO::PER_FACE) { - Base::Console().Warning("Cannot export color information because it's defined per face"); + Base::Console().Warning( + "Cannot export color information because it's defined per face"); } else if (_material->binding == MeshIO::PER_VERTEX) { if (_material->diffuseColor.size() != rPoints.size()) { - Base::Console().Warning("Cannot export color information because there is a different number of points and colors"); + Base::Console().Warning("Cannot export color information because there is a " + "different number of points and colors"); } else { exportColor = true; @@ -2234,7 +2359,8 @@ bool MeshOutput::SaveOFF (std::ostream &out) const } else if (_material->binding == MeshIO::OVERALL) { if (_material->diffuseColor.empty()) { - Base::Console().Warning("Cannot export color information because there is no color defined"); + Base::Console().Warning( + "Cannot export color information because there is no color defined"); } else { exportColor = true; @@ -2242,10 +2368,12 @@ bool MeshOutput::SaveOFF (std::ostream &out) const } } - if (exportColor) + if (exportColor) { out << "COFF\n"; - else + } + else { out << "OFF\n"; + } out << rPoints.size() << " " << rFacets.size() << " 0\n"; // vertices @@ -2273,35 +2401,36 @@ bool MeshOutput::SaveOFF (std::ostream &out) const int b = static_cast(c.b * 255.0f); int a = static_cast(c.a * 255.0f); - out << pt.x << " " << pt.y << " " << pt.z << " " << r << " " << g << " " << b << " " << a << '\n'; + out << pt.x << " " << pt.y << " " << pt.z << " " << r << " " << g << " " << b << " " + << a << '\n'; } else { out << pt.x << " " << pt.y << " " << pt.z << '\n'; } - seq.next(true); // allow to cancel + seq.next(true); // allow to cancel } // facet indices (no texture and normal indices) - for (const auto & it : rFacets) { - out << "3 " << it._aulPoints[0] - << " " << it._aulPoints[1] - << " " << it._aulPoints[2] << '\n'; - seq.next(true); // allow to cancel + for (const auto& it : rFacets) { + out << "3 " << it._aulPoints[0] << " " << it._aulPoints[1] << " " << it._aulPoints[2] + << '\n'; + seq.next(true); // allow to cancel } return true; } -bool MeshOutput::SaveBinaryPLY (std::ostream &out) const +bool MeshOutput::SaveBinaryPLY(std::ostream& out) const { const MeshPointArray& rPoints = _rclMesh.GetPoints(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); std::size_t v_count = rPoints.size(); std::size_t f_count = rFacets.size(); - if (!out || out.bad()) + if (!out || out.bad()) { return false; + } bool saveVertexColor = (_material && _material->binding == MeshIO::PER_VERTEX - && _material->diffuseColor.size() == rPoints.size()); + && _material->diffuseColor.size() == rPoints.size()); out << "ply\n" << "format binary_little_endian 1.0\n" << "comment Created by FreeCAD \n" @@ -2352,17 +2481,18 @@ bool MeshOutput::SaveBinaryPLY (std::ostream &out) const return true; } -bool MeshOutput::SaveAsciiPLY (std::ostream &out) const +bool MeshOutput::SaveAsciiPLY(std::ostream& out) const { const MeshPointArray& rPoints = _rclMesh.GetPoints(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); std::size_t v_count = rPoints.size(); std::size_t f_count = rFacets.size(); - if (!out || out.bad()) + if (!out || out.bad()) { return false; + } bool saveVertexColor = (_material && _material->binding == MeshIO::PER_VERTEX - && _material->diffuseColor.size() == rPoints.size()); + && _material->diffuseColor.size() == rPoints.size()); out << "ply\n" << "format ascii 1.0\n" << "comment Created by FreeCAD \n" @@ -2425,33 +2555,33 @@ bool MeshOutput::SaveAsciiPLY (std::ostream &out) const return true; } -bool MeshOutput::SaveMeshNode (std::ostream &rstrOut) +bool MeshOutput::SaveMeshNode(std::ostream& rstrOut) { const MeshPointArray& rPoints = _rclMesh.GetPoints(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); - if (!rstrOut || rstrOut.bad()) + if (!rstrOut || rstrOut.bad()) { return false; + } // vertices rstrOut << "[" << '\n'; if (this->apply_transform) { Base::Vector3f pt; - for (const auto & it : rPoints) { + for (const auto& it : rPoints) { pt = this->_transform * it; rstrOut << "v " << pt.x << " " << pt.y << " " << pt.z << '\n'; } } else { - for (const auto & it : rPoints) { + for (const auto& it : rPoints) { rstrOut << "v " << it.x << " " << it.y << " " << it.z << '\n'; } } // facet indices (no texture and normal indices) - for (const auto & it : rFacets) { - rstrOut << "f " << it._aulPoints[0]+1 << " " - << it._aulPoints[1]+1 << " " - << it._aulPoints[2]+1 << '\n'; + for (const auto& it : rFacets) { + rstrOut << "f " << it._aulPoints[0] + 1 << " " << it._aulPoints[1] + 1 << " " + << it._aulPoints[2] + 1 << '\n'; } rstrOut << "]" << '\n'; @@ -2459,7 +2589,7 @@ bool MeshOutput::SaveMeshNode (std::ostream &rstrOut) } /** Saves the mesh object into an XML file. */ -void MeshOutput::SaveXML (Base::Writer &writer) const +void MeshOutput::SaveXML(Base::Writer& writer) const { const MeshPointArray& rPoints = _rclMesh.GetPoints(); const MeshFacetArray& rFacets = _rclMesh.GetFacets(); @@ -2467,27 +2597,26 @@ void MeshOutput::SaveXML (Base::Writer &writer) const // writer << writer.ind() << "" << '\n'; writer.incInd(); - writer.Stream() << writer.ind() << "" << '\n'; + writer.Stream() << writer.ind() << "" + << '\n'; writer.incInd(); if (this->apply_transform) { Base::Vector3f pt; - for (const auto & it : rPoints) { + for (const auto& it : rPoints) { pt = this->_transform * it; - writer.Stream() << writer.ind() << "

" - << '\n'; + writer.Stream() << writer.ind() << "

" << '\n'; } } else { - for (const auto & it : rPoints) { - writer.Stream() << writer.ind() << "

" - << '\n'; + for (const auto& it : rPoints) { + writer.Stream() << writer.ind() << "

" << '\n'; } } writer.decInd(); @@ -2497,15 +2626,14 @@ void MeshOutput::SaveXML (Base::Writer &writer) const writer.Stream() << writer.ind() << "" << '\n'; writer.incInd(); - for (const auto & it : rFacets) { + for (const auto& it : rFacets) { writer.Stream() << writer.ind() << "" - << '\n'; + << "p0=\"" << it._aulPoints[0] << "\" " + << "p1=\"" << it._aulPoints[1] << "\" " + << "p2=\"" << it._aulPoints[2] << "\" " + << "n0=\"" << it._aulNeighbours[0] << "\" " + << "n1=\"" << it._aulNeighbours[1] << "\" " + << "n2=\"" << it._aulNeighbours[2] << "\"/>" << '\n'; } writer.decInd(); writer.Stream() << writer.ind() << "" << '\n'; @@ -2515,7 +2643,7 @@ void MeshOutput::SaveXML (Base::Writer &writer) const } /** Saves the mesh object into a 3MF file. */ -bool MeshOutput::Save3MF(std::ostream &str) const +bool MeshOutput::Save3MF(std::ostream& str) const { Writer3MF writer(str); writer.AddMesh(_rclMesh, _transform); @@ -2523,16 +2651,18 @@ bool MeshOutput::Save3MF(std::ostream &str) const } /** Writes an IDTF file. */ -bool MeshOutput::SaveIDTF (std::ostream &str) const +bool MeshOutput::SaveIDTF(std::ostream& str) const { - if (!str || str.bad() || (_rclMesh.CountFacets() == 0)) + if (!str || str.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } const MeshPointArray& pts = _rclMesh.GetPoints(); const MeshFacetArray& fts = _rclMesh.GetFacets(); std::string resource = objectName; - if (resource.empty()) + if (resource.empty()) { resource = "Resource"; + } str.precision(6); str.setf(std::ios::fixed | std::ios::showpoint); @@ -2565,7 +2695,7 @@ bool MeshOutput::SaveIDTF (std::ostream &str) const str << Base::tabs(2) << "MESH {\n"; str << Base::tabs(3) << "FACE_COUNT " << fts.size() << '\n'; str << Base::tabs(3) << "MODEL_POSITION_COUNT " << pts.size() << '\n'; - str << Base::tabs(3) << "MODEL_NORMAL_COUNT " << 3*fts.size() << '\n'; + str << Base::tabs(3) << "MODEL_NORMAL_COUNT " << 3 * fts.size() << '\n'; str << Base::tabs(3) << "MODEL_DIFFUSE_COLOR_COUNT 0\n"; str << Base::tabs(3) << "MODEL_SPECULAR_COLOR_COUNT 0\n"; str << Base::tabs(3) << "MODEL_TEXTURE_COORD_COUNT 0\n"; @@ -2578,8 +2708,9 @@ bool MeshOutput::SaveIDTF (std::ostream &str) const str << Base::tabs(4) << "}\n"; str << Base::tabs(3) << "}\n"; str << Base::tabs(3) << "MESH_FACE_POSITION_LIST {\n"; - for (const auto & ft : fts) { - str << Base::tabs(4) << ft._aulPoints[0] << " " << ft._aulPoints[1] << " " << ft._aulPoints[2] << '\n'; + for (const auto& ft : fts) { + str << Base::tabs(4) << ft._aulPoints[0] << " " << ft._aulPoints[1] << " " + << ft._aulPoints[2] << '\n'; } str << Base::tabs(3) << "}\n"; str << Base::tabs(3) << "MESH_FACE_NORMAL_LIST {\n"; @@ -2595,12 +2726,12 @@ bool MeshOutput::SaveIDTF (std::ostream &str) const } str << Base::tabs(3) << "}\n"; str << Base::tabs(3) << "MODEL_POSITION_LIST {\n"; - for (const auto & pt : pts) { + for (const auto& pt : pts) { str << Base::tabs(4) << pt.x << " " << pt.y << " " << pt.z << '\n'; } str << Base::tabs(3) << "}\n"; str << Base::tabs(3) << "MODEL_NORMAL_LIST {\n"; - for (const auto & ft : fts) { + for (const auto& ft : fts) { MeshGeomFacet face = _rclMesh.GetFacet(ft); Base::Vector3f normal = face.GetNormal(); str << Base::tabs(4) << normal.x << " " << normal.y << " " << normal.z << '\n'; @@ -2617,19 +2748,20 @@ bool MeshOutput::SaveIDTF (std::ostream &str) const } /** Writes an MGL file. */ -bool MeshOutput::SaveMGL (std::ostream &str) const +bool MeshOutput::SaveMGL(std::ostream& str) const { -/* -light on -list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3 -list xt 1 1 0 0 -list yt -1 -1 1 0 -list zt -1 -1 -1 1 -triplot t xt yt zt 'b' -#triplot t xt yt zt '#k' -*/ - if (!str || str.bad() || (_rclMesh.CountFacets() == 0)) + /* + light on + list t 0 1 2 | 0 1 3 | 0 2 3 | 1 2 3 + list xt 1 1 0 0 + list yt -1 -1 1 0 + list zt -1 -1 -1 1 + triplot t xt yt zt 'b' + #triplot t xt yt zt '#k' + */ + if (!str || str.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } const MeshPointArray& pts = _rclMesh.GetPoints(); const MeshFacetArray& fts = _rclMesh.GetFacets(); @@ -2639,25 +2771,25 @@ triplot t xt yt zt 'b' str << "light on\n"; str << "list t "; - for (const auto & ft : fts) { + for (const auto& ft : fts) { str << ft._aulPoints[0] << " " << ft._aulPoints[1] << " " << ft._aulPoints[2] << " | "; } str << std::endl; str << "list xt "; - for (const auto & pt : pts) { + for (const auto& pt : pts) { str << pt.x << " "; } str << std::endl; str << "list yt "; - for (const auto & pt : pts) { + for (const auto& pt : pts) { str << pt.y << " "; } str << std::endl; str << "list zt "; - for (const auto & pt : pts) { + for (const auto& pt : pts) { str << pt.z << " "; } str << std::endl; @@ -2669,7 +2801,7 @@ triplot t xt yt zt 'b' } /** Writes an OpenInventor file. */ -bool MeshOutput::SaveInventor (std::ostream &rstrOut) const +bool MeshOutput::SaveInventor(std::ostream& rstrOut) const { WriterInventor writer(_rclMesh, _material); writer.SetTransform(_transform); @@ -2677,10 +2809,11 @@ bool MeshOutput::SaveInventor (std::ostream &rstrOut) const } /** Writes an X3D file. */ -bool MeshOutput::SaveX3D (std::ostream &out) const +bool MeshOutput::SaveX3D(std::ostream& out) const { - if (!out || out.bad() || (_rclMesh.CountFacets() == 0)) + if (!out || out.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } // XML header info out << "\n"; @@ -2689,26 +2822,29 @@ bool MeshOutput::SaveX3D (std::ostream &out) const } /** Writes an X3D file. */ -bool MeshOutput::SaveX3DContent (std::ostream &out, bool exportViewpoints) const +bool MeshOutput::SaveX3DContent(std::ostream& out, bool exportViewpoints) const { - if (!out || out.bad() || (_rclMesh.CountFacets() == 0)) + if (!out || out.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } const MeshPointArray& pts = _rclMesh.GetPoints(); const MeshFacetArray& fts = _rclMesh.GetFacets(); Base::BoundBox3f bbox = _rclMesh.GetBoundBox(); - if (apply_transform) + if (apply_transform) { bbox = bbox.Transformed(_transform); + } App::Color mat(0.65f, 0.65f, 0.65f); if (_material && _material->binding == MeshIO::Binding::OVERALL) { - if (!_material->diffuseColor.empty()) + if (!_material->diffuseColor.empty()) { mat = _material->diffuseColor.front(); + } } - bool saveVertexColor = (_material && _material->binding == MeshIO::PER_VERTEX && - _material->diffuseColor.size() == pts.size()); - bool saveFaceColor = (_material && _material->binding == MeshIO::PER_FACE && - _material->diffuseColor.size() == fts.size()); + bool saveVertexColor = (_material && _material->binding == MeshIO::PER_VERTEX + && _material->diffuseColor.size() == pts.size()); + bool saveFaceColor = (_material && _material->binding == MeshIO::PER_FACE + && _material->diffuseColor.size() == fts.size()); Base::SequencerLauncher seq("Saving...", _rclMesh.CountFacets() + 1); out.precision(6); @@ -2717,7 +2853,8 @@ bool MeshOutput::SaveX3DContent (std::ostream &out, bool exportViewpoints) const // Header info out << R"(\n"; + << "\"http://www.web3d.org/specifications/x3d-3.2.xsd\" width=\"1280px\" " + "height=\"1024px\">\n"; out << " \n" << " \n" << " \n" @@ -2728,52 +2865,78 @@ bool MeshOutput::SaveX3DContent (std::ostream &out, bool exportViewpoints) const out << " \n"; if (exportViewpoints) { - auto viewpoint = [&out](const char* text, const Base::Vector3f& cnt, - const Base::Vector3f& pos, const Base::Vector3f& axis, float angle) { - out << " )" + auto viewpoint = [&out](const char* text, + const Base::Vector3f& cnt, + const Base::Vector3f& pos, + const Base::Vector3f& axis, + float angle) { + out << " )" << "\n"; }; Base::Vector3f cnt = bbox.GetCenter(); float dist = 1.2f * bbox.CalcDiagonalLength(); - float dist3 = 0.577350f * dist; // sqrt(1/3) * dist + float dist3 = 0.577350f * dist; // sqrt(1/3) * dist - viewpoint("Iso", cnt, Base::Vector3f(cnt.x + dist3, cnt.y - dist3, cnt.z + dist3), Base::Vector3f(0.742906f, 0.307722f, 0.594473f), 1.21712f); - viewpoint("Front", cnt, Base::Vector3f(cnt.x, cnt.y - dist, cnt.z), Base::Vector3f(1.0f, 0.0f, 0.0f), 1.5707964f); - viewpoint("Back", cnt, Base::Vector3f(cnt.x, cnt.y + dist, cnt.z), Base::Vector3f(0.0f, 0.707106f, 0.707106f), 3.141592f); - viewpoint("Right", cnt, Base::Vector3f(cnt.x + dist, cnt.y, cnt.z), Base::Vector3f(0.577350f, 0.577350f, 0.577350f), 2.094395f); - viewpoint("Left", cnt, Base::Vector3f(cnt.x - dist, cnt.y, cnt.z), Base::Vector3f(-0.577350f, 0.577350f, 0.577350f), 4.188790f); - viewpoint("Top", cnt, Base::Vector3f(cnt.x, cnt.y, cnt.z + dist), Base::Vector3f(0.0f, 0.0f, 1.0f), 0.0f); - viewpoint("Bottom", cnt, Base::Vector3f(cnt.x, cnt.y, cnt.z - dist), Base::Vector3f(1.0f, 0.0f, 0.0f), 3.141592f); + viewpoint("Iso", + cnt, + Base::Vector3f(cnt.x + dist3, cnt.y - dist3, cnt.z + dist3), + Base::Vector3f(0.742906f, 0.307722f, 0.594473f), + 1.21712f); + viewpoint("Front", + cnt, + Base::Vector3f(cnt.x, cnt.y - dist, cnt.z), + Base::Vector3f(1.0f, 0.0f, 0.0f), + 1.5707964f); + viewpoint("Back", + cnt, + Base::Vector3f(cnt.x, cnt.y + dist, cnt.z), + Base::Vector3f(0.0f, 0.707106f, 0.707106f), + 3.141592f); + viewpoint("Right", + cnt, + Base::Vector3f(cnt.x + dist, cnt.y, cnt.z), + Base::Vector3f(0.577350f, 0.577350f, 0.577350f), + 2.094395f); + viewpoint("Left", + cnt, + Base::Vector3f(cnt.x - dist, cnt.y, cnt.z), + Base::Vector3f(-0.577350f, 0.577350f, 0.577350f), + 4.188790f); + viewpoint("Top", + cnt, + Base::Vector3f(cnt.x, cnt.y, cnt.z + dist), + Base::Vector3f(0.0f, 0.0f, 1.0f), + 0.0f); + viewpoint("Bottom", + cnt, + Base::Vector3f(cnt.x, cnt.y, cnt.z - dist), + Base::Vector3f(1.0f, 0.0f, 0.0f), + 3.141592f); } if (apply_transform) { Base::Placement p(_transform); const Base::Vector3d& v = p.getPosition(); const Base::Rotation& r = p.getRotation(); - Base::Vector3d axis; double angle; + Base::Vector3d axis; + double angle; r.getValue(axis, angle); out << " \n"; + << "translation='" << v.x << " " << v.y << " " << v.z << "' " + << "rotation='" << axis.x << " " << axis.y << " " << axis.z << " " << angle << "'>\n"; } else { out << " \n"; } out << " \n"; out << " \n" - " \n" + " \n" " \n"; out << " \n"; out << " \n"; @@ -2818,24 +2981,29 @@ bool MeshOutput::SaveX3DContent (std::ostream &out, bool exportViewpoints) const } /** Writes an X3DOM file. */ -bool MeshOutput::SaveX3DOM (std::ostream &out) const +bool MeshOutput::SaveX3DOM(std::ostream& out) const { - if (!out || out.bad() || (_rclMesh.CountFacets() == 0)) + if (!out || out.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } // See: // https://stackoverflow.com/questions/31976056/unable-to-color-faces-using-indexedfaceset-in-x3dom // out << "\n" - << "\n"; + << "\n"; out << "\n" << " \n" - << " \n" - << " \n" + << " \n" + << " \n" << " \n"; auto onclick = [&out](const char* text) { - out << " \n"; + out << " \n"; }; onclick("Iso"); @@ -2846,7 +3014,7 @@ bool MeshOutput::SaveX3DOM (std::ostream &out) const onclick("Top"); onclick("Bottom"); -#if 0 // https://stackoverflow.com/questions/32305678/x3dom-how-to-make-zoom-buttons +#if 0 // https://stackoverflow.com/questions/32305678/x3dom-how-to-make-zoom-buttons function zoom (delta) { var x3d = document.getElementById("right"); var vpt = x3d.getElementsByTagName("Viewpoint")[0]; @@ -2864,10 +3032,11 @@ bool MeshOutput::SaveX3DOM (std::ostream &out) const } /** Writes a Nastran file. */ -bool MeshOutput::SaveNastran (std::ostream &rstrOut) const +bool MeshOutput::SaveNastran(std::ostream& rstrOut) const { - if (!rstrOut || rstrOut.bad() || (_rclMesh.CountFacets() == 0)) + if (!rstrOut || rstrOut.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } MeshPointIterator clPIter(_rclMesh); clPIter.Transform(this->_transform); @@ -2887,8 +3056,8 @@ bool MeshOutput::SaveNastran (std::ostream &rstrOut) const rstrOut << std::setfill(' ') << std::setw(12) << iIndx; rstrOut << std::setfill(' ') << std::setw(16) << x; - rstrOut << std::setfill(' ') << std::setw(8) << y; - rstrOut << std::setfill(' ') << std::setw(8) << z; + rstrOut << std::setfill(' ') << std::setw(8) << y; + rstrOut << std::setfill(' ') << std::setw(8) << z; rstrOut << '\n'; iIndx++; @@ -2901,9 +3070,9 @@ bool MeshOutput::SaveNastran (std::ostream &rstrOut) const rstrOut << std::setfill(' ') << std::setw(10) << iIndx; rstrOut << std::setfill(' ') << std::setw(8) << (int)0; - rstrOut << std::setfill(' ') << std::setw(8) << clTIter.GetIndices()._aulPoints[1]+1; - rstrOut << std::setfill(' ') << std::setw(8) << clTIter.GetIndices()._aulPoints[0]+1; - rstrOut << std::setfill(' ') << std::setw(8) << clTIter.GetIndices()._aulPoints[2]+1; + rstrOut << std::setfill(' ') << std::setw(8) << clTIter.GetIndices()._aulPoints[1] + 1; + rstrOut << std::setfill(' ') << std::setw(8) << clTIter.GetIndices()._aulPoints[0] + 1; + rstrOut << std::setfill(' ') << std::setw(8) << clTIter.GetIndices()._aulPoints[2] + 1; rstrOut << '\n'; iIndx++; @@ -2916,16 +3085,17 @@ bool MeshOutput::SaveNastran (std::ostream &rstrOut) const } /** Writes a Cadmould FE file. */ -bool MeshOutput::SaveCadmouldFE (std::ostream & /*rstrOut*/) const +bool MeshOutput::SaveCadmouldFE(std::ostream& /*rstrOut*/) const { return false; } /** Writes a Python module */ -bool MeshOutput::SavePython (std::ostream &str) const +bool MeshOutput::SavePython(std::ostream& str) const { - if (!str || str.bad() || (_rclMesh.CountFacets() == 0)) + if (!str || str.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } MeshFacetIterator clIter(_rclMesh); clIter.Transform(this->_transform); @@ -2936,10 +3106,7 @@ bool MeshOutput::SavePython (std::ostream &str) const for (clIter.Init(); clIter.More(); clIter.Next()) { const MeshGeomFacet& rFacet = *clIter; for (const auto& pnt : rFacet._aclPoints) { - str << "[" << pnt.x - << "," << pnt.y - << "," << pnt.z - << "],"; + str << "[" << pnt.x << "," << pnt.y << "," << pnt.z << "],"; } str << '\n'; } @@ -2950,15 +3117,16 @@ bool MeshOutput::SavePython (std::ostream &str) const } /** Writes a VRML file. */ -bool MeshOutput::SaveVRML (std::ostream &rstrOut) const +bool MeshOutput::SaveVRML(std::ostream& rstrOut) const { - if (!rstrOut || rstrOut.bad() || (_rclMesh.CountFacets() == 0)) + if (!rstrOut || rstrOut.bad() || (_rclMesh.CountFacets() == 0)) { return false; + } Base::BoundBox3f clBB = _rclMesh.GetBoundBox(); Base::SequencerLauncher seq("Saving VRML file...", - _rclMesh.CountPoints() + _rclMesh.CountFacets()); + _rclMesh.CountPoints() + _rclMesh.CountFacets()); rstrOut << "#VRML V2.0 utf8\n"; rstrOut << "WorldInfo {\n" @@ -2974,14 +3142,8 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const << " scale 1 1 1\n" << " rotation 0 0 1 0\n" << " scaleOrientation 0 0 1 0\n" - << " center " - << 0.0f << " " - << 0.0f << " " - << 0.0f << "\n" - << " translation " - << 0.0f << " " - << 0.0f << " " - << 0.0f << "\n"; + << " center " << 0.0f << " " << 0.0f << " " << 0.0f << "\n" + << " translation " << 0.0f << " " << 0.0f << " " << 0.0f << "\n"; rstrOut << " children\n"; rstrOut << " Shape { \n"; @@ -2994,10 +3156,7 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const if (_material && _material->binding == MeshIO::OVERALL) { if (!_material->diffuseColor.empty()) { App::Color c = _material->diffuseColor.front(); - rstrOut << " diffuseColor " - << c.r << " " - << c.g << " " - << c.b << "\n"; + rstrOut << " diffuseColor " << c.r << " " << c.g << " " << c.b << "\n"; } else { rstrOut << " diffuseColor 0.8 0.8 0.8\n"; @@ -3006,7 +3165,7 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const else { rstrOut << " diffuseColor 0.8 0.8 0.8\n"; } - rstrOut << " }\n }\n"; // end write appearance + rstrOut << " }\n }\n"; // end write appearance // write IndexedFaceSet @@ -3024,14 +3183,13 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const rstrOut.precision(3); rstrOut.setf(std::ios::fixed | std::ios::showpoint); for (pPIter.Init(); pPIter.More(); pPIter.Next()) { - rstrOut << " " - << pPIter->x << " " - << pPIter->y << " " - << pPIter->z; - if (i++ < (k-1)) + rstrOut << " " << pPIter->x << " " << pPIter->y << " " << pPIter->z; + if (i++ < (k - 1)) { rstrOut << ",\n"; - else + } + else { rstrOut << "\n"; + } seq.next(); } @@ -3044,22 +3202,25 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const rstrOut.precision(3); rstrOut.setf(std::ios::fixed | std::ios::showpoint); for (std::vector::const_iterator pCIter = _material->diffuseColor.begin(); - pCIter != _material->diffuseColor.end(); ++pCIter) { - rstrOut << " " - << float(pCIter->r) << " " - << float(pCIter->g) << " " + pCIter != _material->diffuseColor.end(); + ++pCIter) { + rstrOut << " " << float(pCIter->r) << " " << float(pCIter->g) << " " << float(pCIter->b); - if (pCIter < (_material->diffuseColor.end() - 1)) + if (pCIter < (_material->diffuseColor.end() - 1)) { rstrOut << ",\n"; - else + } + else { rstrOut << "\n"; + } } rstrOut << " ]\n }\n"; - if (_material->binding == MeshIO::PER_VERTEX) + if (_material->binding == MeshIO::PER_VERTEX) { rstrOut << " colorPerVertex TRUE\n"; - else + } + else { rstrOut << " colorPerVertex FALSE\n"; + } } // write face index @@ -3070,21 +3231,21 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const for (pFIter.Init(); pFIter.More(); pFIter.Next()) { MeshFacet clFacet = pFIter.GetIndices(); - rstrOut << " " - << clFacet._aulPoints[0] << ", " - << clFacet._aulPoints[1] << ", " + rstrOut << " " << clFacet._aulPoints[0] << ", " << clFacet._aulPoints[1] << ", " << clFacet._aulPoints[2] << ", -1"; - if (i++ < (k-1)) + if (i++ < (k - 1)) { rstrOut << ",\n"; - else + } + else { rstrOut << "\n"; + } seq.next(); } rstrOut << " ]\n }\n"; // End IndexedFaceSet - rstrOut << " }\n"; // End Shape - rstrOut << "}\n"; // close children and Transform + rstrOut << " }\n"; // End Shape + rstrOut << "}\n"; // close children and Transform return true; } @@ -3092,10 +3253,9 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const // ---------------------------------------------------------------------------- MeshCleanup::MeshCleanup(MeshPointArray& p, MeshFacetArray& f) - : pointArray(p) - , facetArray(f) -{ -} + : pointArray(p) + , facetArray(f) +{} void MeshCleanup::SetMaterial(Material* mat) { @@ -3111,7 +3271,7 @@ void MeshCleanup::RemoveInvalids() // Now go through the facets and invalidate facets with wrong indices // If a facet is valid all its referenced points are validated again // Points that are not referenced are still invalid and thus can be deleted - for (auto & it : facetArray) { + for (auto& it : facetArray) { for (PointIndex point : it._aulPoints) { // vertex index out of range if (point >= numPoints) { @@ -3136,13 +3296,15 @@ void MeshCleanup::RemoveInvalids() void MeshCleanup::RemoveInvalidFacets() { MeshIsFlag flag; - std::size_t countInvalidFacets = std::count_if(facetArray.begin(), facetArray.end(), - [flag](const MeshFacet& f) { return flag(f, MeshFacet::INVALID); }); + std::size_t countInvalidFacets = + std::count_if(facetArray.begin(), facetArray.end(), [flag](const MeshFacet& f) { + return flag(f, MeshFacet::INVALID); + }); if (countInvalidFacets > 0) { // adjust the material array if needed - if (materialArray && materialArray->binding == MeshIO::PER_FACE && - materialArray->diffuseColor.size() == facetArray.size()) { + if (materialArray && materialArray->binding == MeshIO::PER_FACE + && materialArray->diffuseColor.size() == facetArray.size()) { std::vector colors; colors.reserve(facetArray.size() - countInvalidFacets); for (std::size_t index = 0; index < facetArray.size(); index++) { @@ -3156,8 +3318,12 @@ void MeshCleanup::RemoveInvalidFacets() MeshFacetArray copy_facets(facetArray.size() - countInvalidFacets); // copy all valid facets to the new array - std::remove_copy_if(facetArray.begin(), facetArray.end(), copy_facets.begin(), - [flag](const MeshFacet& f) { return flag(f, MeshFacet::INVALID); }); + std::remove_copy_if(facetArray.begin(), + facetArray.end(), + copy_facets.begin(), + [flag](const MeshFacet& f) { + return flag(f, MeshFacet::INVALID); + }); facetArray.swap(copy_facets); } } @@ -3165,8 +3331,10 @@ void MeshCleanup::RemoveInvalidFacets() void MeshCleanup::RemoveInvalidPoints() { MeshIsFlag flag; - std::size_t countInvalidPoints = std::count_if(pointArray.begin(), pointArray.end(), - [flag](const MeshPoint& p) { return flag(p, MeshPoint::INVALID); }); + std::size_t countInvalidPoints = + std::count_if(pointArray.begin(), pointArray.end(), [flag](const MeshPoint& p) { + return flag(p, MeshPoint::INVALID); + }); if (countInvalidPoints > 0) { // generate array of decrements std::vector decrements; @@ -3175,10 +3343,12 @@ void MeshCleanup::RemoveInvalidPoints() MeshPointArray::_TIterator p_end = pointArray.end(); std::vector::iterator decr_it = decrements.begin(); - for (MeshPointArray::_TIterator p_it = pointArray.begin(); p_it != p_end; ++p_it, ++decr_it) { + for (MeshPointArray::_TIterator p_it = pointArray.begin(); p_it != p_end; + ++p_it, ++decr_it) { *decr_it = decr; - if (!p_it->IsValid()) + if (!p_it->IsValid()) { decr++; + } } // correct point indices of the facets @@ -3193,8 +3363,8 @@ void MeshCleanup::RemoveInvalidPoints() std::size_t validPoints = pointArray.size() - countInvalidPoints; // adjust the material array if needed - if (materialArray && materialArray->binding == MeshIO::PER_VERTEX && - materialArray->diffuseColor.size() == pointArray.size()) { + if (materialArray && materialArray->binding == MeshIO::PER_VERTEX + && materialArray->diffuseColor.size() == pointArray.size()) { std::vector colors; colors.reserve(validPoints); for (std::size_t index = 0; index < pointArray.size(); index++) { @@ -3208,8 +3378,12 @@ void MeshCleanup::RemoveInvalidPoints() MeshPointArray copy_points(validPoints); // copy all valid facets to the new array - std::remove_copy_if(pointArray.begin(), pointArray.end(), copy_points.begin(), - [flag](const MeshPoint& p) { return flag(p, MeshPoint::INVALID); }); + std::remove_copy_if(pointArray.begin(), + pointArray.end(), + copy_points.begin(), + [flag](const MeshPoint& p) { + return flag(p, MeshPoint::INVALID); + }); pointArray.swap(copy_points); } } @@ -3217,8 +3391,8 @@ void MeshCleanup::RemoveInvalidPoints() // ---------------------------------------------------------------------------- MeshPointFacetAdjacency::MeshPointFacetAdjacency(std::size_t p, MeshFacetArray& f) - : numPoints(p) - , facets(f) + : numPoints(p) + , facets(f) { Build(); } @@ -3226,15 +3400,16 @@ MeshPointFacetAdjacency::MeshPointFacetAdjacency(std::size_t p, MeshFacetArray& void MeshPointFacetAdjacency::Build() { std::vector numFacetAdjacency(numPoints); - for (const auto & it : facets) { + for (const auto& it : facets) { numFacetAdjacency[it._aulPoints[0]]++; numFacetAdjacency[it._aulPoints[1]]++; numFacetAdjacency[it._aulPoints[2]]++; } pointFacetAdjacency.resize(numPoints); - for (std::size_t i = 0; i < numPoints; i++) + for (std::size_t i = 0; i < numPoints; i++) { pointFacetAdjacency[i].reserve(numFacetAdjacency[i]); + } std::size_t numFacets = facets.size(); for (std::size_t i = 0; i < numFacets; i++) { @@ -3251,7 +3426,7 @@ void MeshPointFacetAdjacency::SetFacetNeighbourhood() MeshFacet& facet1 = facets[index]; for (int i = 0; i < 3; i++) { std::size_t n1 = facet1._aulPoints[i]; - std::size_t n2 = facet1._aulPoints[(i+1)%3]; + std::size_t n2 = facet1._aulPoints[(i + 1) % 3]; bool success = false; const std::vector& refFacets = pointFacetAdjacency[n1]; diff --git a/src/Mod/Mesh/App/Core/MeshIO.h b/src/Mod/Mesh/App/Core/MeshIO.h index 7f3e38a5e6..8f110d1008 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.h +++ b/src/Mod/Mesh/App/Core/MeshIO.h @@ -29,52 +29,57 @@ #include "MeshKernel.h" -namespace Base { +namespace Base +{ class XMLReader; class Writer; -} +} // namespace Base -namespace MeshCore { +namespace MeshCore +{ class MeshKernel; -namespace MeshIO { - enum Format { - Undefined, - BMS, - ASTL, - BSTL, - STL, - OBJ, - OFF, - IDTF, - MGL, - IV, - X3D, - X3DZ, - X3DOM, - VRML, - WRZ, - NAS, - PLY, - APLY, - PY, - AMF, - SMF, - ASY, - ThreeMF - }; - enum Binding { - OVERALL, - PER_VERTEX, - PER_FACE - }; -} +namespace MeshIO +{ +enum Format +{ + Undefined, + BMS, + ASTL, + BSTL, + STL, + OBJ, + OFF, + IDTF, + MGL, + IV, + X3D, + X3DZ, + X3DOM, + VRML, + WRZ, + NAS, + PLY, + APLY, + PY, + AMF, + SMF, + ASY, + ThreeMF +}; +enum Binding +{ + OVERALL, + PER_VERTEX, + PER_FACE +}; +} // namespace MeshIO struct MeshExport Material { Material() = default; - MeshIO::Binding binding{MeshIO::OVERALL}; + MeshIO::Binding binding {MeshIO::OVERALL}; mutable std::string library; std::vector ambientColor; /**< Defines the ambient color. */ @@ -84,8 +89,8 @@ struct MeshExport Material std::vector shininess; std::vector transparency; - bool operator == (const Material& mat) const; - bool operator != (const Material& mat) const; + bool operator==(const Material& mat) const; + bool operator!=(const Material& mat) const; }; struct MeshExport Group @@ -101,54 +106,59 @@ struct MeshExport Group class MeshExport MeshInput { public: - explicit MeshInput (MeshKernel &rclM) - : _rclMesh(rclM), _material(nullptr){} - MeshInput (MeshKernel &rclM, Material* m) - : _rclMesh(rclM), _material(m){} - const std::vector& GetGroupNames() const { + explicit MeshInput(MeshKernel& rclM) + : _rclMesh(rclM) + , _material(nullptr) + {} + MeshInput(MeshKernel& rclM, Material* m) + : _rclMesh(rclM) + , _material(m) + {} + const std::vector& GetGroupNames() const + { return _groupNames; } /// Loads the file, decided by extension bool LoadAny(const char* FileName); /// Loads from a stream and the given format - bool LoadFormat(std::istream &str, MeshIO::Format fmt); + bool LoadFormat(std::istream& str, MeshIO::Format fmt); /** Loads an STL file either in binary or ASCII format. * Therefore the file header gets checked to decide if the file is binary or not. */ - bool LoadSTL (std::istream &rstrIn); + bool LoadSTL(std::istream& rstrIn); /** Loads an ASCII STL file. */ - bool LoadAsciiSTL (std::istream &rstrIn); + bool LoadAsciiSTL(std::istream& rstrIn); /** Loads a binary STL file. */ - bool LoadBinarySTL (std::istream &rstrIn); + bool LoadBinarySTL(std::istream& rstrIn); /** Loads an OBJ Mesh file. */ - bool LoadOBJ (std::istream &rstrIn); + bool LoadOBJ(std::istream& rstrIn); /** Loads an OBJ Mesh file. */ - bool LoadOBJ (std::istream &rstrIn, const char* filename); + bool LoadOBJ(std::istream& rstrIn, const char* filename); /** Loads an SMF Mesh file. */ - bool LoadSMF (std::istream &rstrIn); + bool LoadSMF(std::istream& rstrIn); /** Loads an OFF Mesh file. */ - bool LoadOFF (std::istream &rstrIn); + bool LoadOFF(std::istream& rstrIn); /** Loads a PLY Mesh file. */ - bool LoadPLY (std::istream &rstrIn); + bool LoadPLY(std::istream& rstrIn); /** Loads the mesh object from an XML file. */ - void LoadXML (Base::XMLReader &reader); + void LoadXML(Base::XMLReader& reader); /** Loads the mesh object from a 3MF file. */ - bool Load3MF (std::istream &str); + bool Load3MF(std::istream& str); /** Loads a node from an OpenInventor file. */ - bool LoadMeshNode (std::istream &rstrIn); + bool LoadMeshNode(std::istream& rstrIn); /** Loads an OpenInventor file. */ - bool LoadInventor (std::istream &rstrIn); + bool LoadInventor(std::istream& rstrIn); /** Loads a Nastran file. */ - bool LoadNastran (std::istream &rstrIn); + bool LoadNastran(std::istream& rstrIn); /** Loads a Cadmould FE file. */ - bool LoadCadmouldFE (std::ifstream &rstrIn); + bool LoadCadmouldFE(std::ifstream& rstrIn); static std::vector supportedMeshFormats(); static MeshIO::Format getFormat(const char* FileName); protected: - MeshKernel &_rclMesh; /**< reference to mesh data structure */ + MeshKernel& _rclMesh; /**< reference to mesh data structure */ Material* _material; std::vector _groupNames; }; @@ -160,13 +170,22 @@ protected: class MeshExport MeshOutput { public: - explicit MeshOutput (const MeshKernel &rclM) - : _rclMesh(rclM), _material(nullptr), apply_transform(false){} - MeshOutput (const MeshKernel &rclM, const Material* m) - : _rclMesh(rclM), _material(m), apply_transform(false){} + explicit MeshOutput(const MeshKernel& rclM) + : _rclMesh(rclM) + , _material(nullptr) + , apply_transform(false) + {} + MeshOutput(const MeshKernel& rclM, const Material* m) + : _rclMesh(rclM) + , _material(m) + , apply_transform(false) + {} void SetObjectName(const std::string& n) - { objectName = n; } - void SetGroups(const std::vector& g) { + { + objectName = n; + } + void SetGroups(const std::vector& g) + { _groups = g; } @@ -184,61 +203,61 @@ public: /// Determine the mesh format by file extension static MeshIO::Format GetFormat(const char* FileName); /// Saves the file, decided by extension if not explicitly given - bool SaveAny(const char* FileName, MeshIO::Format f=MeshIO::Undefined) const; + bool SaveAny(const char* FileName, MeshIO::Format f = MeshIO::Undefined) const; /// Saves to a stream and the given format - bool SaveFormat(std::ostream &str, MeshIO::Format fmt) const; + bool SaveFormat(std::ostream& str, MeshIO::Format fmt) const; /** Saves the mesh object into an ASCII STL file. */ - bool SaveAsciiSTL (std::ostream &rstrOut) const; + bool SaveAsciiSTL(std::ostream& rstrOut) const; /** Saves the mesh object into a binary STL file. */ - bool SaveBinarySTL (std::ostream &rstrOut) const; + bool SaveBinarySTL(std::ostream& rstrOut) const; /** Saves the mesh object into an OBJ file. */ - bool SaveOBJ (std::ostream &rstrOut) const; + bool SaveOBJ(std::ostream& rstrOut) const; /** Saves the mesh object into an OBJ file. */ - bool SaveOBJ (std::ostream &rstrOut, const char* filename) const; + bool SaveOBJ(std::ostream& rstrOut, const char* filename) const; /** Saves the mesh object into an SMF file. */ - bool SaveSMF (std::ostream &rstrOut) const; + bool SaveSMF(std::ostream& rstrOut) const; /** Saves the mesh object into an OFF file. */ - bool SaveOFF (std::ostream &rstrOut) const; + bool SaveOFF(std::ostream& rstrOut) const; /** Saves the mesh object into a binary PLY file. */ - bool SaveBinaryPLY (std::ostream &rstrOut) const; + bool SaveBinaryPLY(std::ostream& rstrOut) const; /** Saves the mesh object into an ASCII PLY file. */ - bool SaveAsciiPLY (std::ostream &rstrOut) const; + bool SaveAsciiPLY(std::ostream& rstrOut) const; /** Saves the mesh object into an asymptote file. */ - bool SaveAsymptote (std::ostream &rstrOut) const; + bool SaveAsymptote(std::ostream& rstrOut) const; /** Saves the mesh object into an XML file. */ - void SaveXML (Base::Writer &writer) const; + void SaveXML(Base::Writer& writer) const; /** Saves the mesh object into a 3MF file. */ - bool Save3MF (std::ostream &str) const; + bool Save3MF(std::ostream& str) const; /** Saves a node to an OpenInventor file. */ - bool SaveMeshNode (std::ostream &rstrIn); + bool SaveMeshNode(std::ostream& rstrIn); /** Writes an IDTF file. */ - bool SaveIDTF (std::ostream &rstrOut) const; + bool SaveIDTF(std::ostream& rstrOut) const; /** Writes an MGL file. */ - bool SaveMGL (std::ostream &rstrOut) const; + bool SaveMGL(std::ostream& rstrOut) const; /** Writes an OpenInventor file. */ - bool SaveInventor (std::ostream &rstrOut) const; + bool SaveInventor(std::ostream& rstrOut) const; /** Writes an X3D file. */ - bool SaveX3D (std::ostream &rstrOut) const; + bool SaveX3D(std::ostream& rstrOut) const; /** Writes an X3dom file. */ - bool SaveX3DOM (std::ostream &rstrOut) const; + bool SaveX3DOM(std::ostream& rstrOut) const; /** Writes a VRML file. */ - bool SaveVRML (std::ostream &rstrOut) const; + bool SaveVRML(std::ostream& rstrOut) const; /** Writes a Nastran file. */ - bool SaveNastran (std::ostream &rstrOut) const; + bool SaveNastran(std::ostream& rstrOut) const; /** Writes a Cadmould FE file. */ - bool SaveCadmouldFE (std::ostream &rstrOut) const; + bool SaveCadmouldFE(std::ostream& rstrOut) const; /** Writes a python module which creates a mesh */ - bool SavePython (std::ostream &rstrOut) const; + bool SavePython(std::ostream& rstrOut) const; static std::vector supportedMeshFormats(); protected: /** Writes an X3D file. */ - bool SaveX3DContent (std::ostream &rstrOut, bool exportViewpoints) const; + bool SaveX3DContent(std::ostream& rstrOut, bool exportViewpoints) const; protected: - const MeshKernel &_rclMesh; /**< reference to mesh data structure */ + const MeshKernel& _rclMesh; /**< reference to mesh data structure */ const Material* _material; Base::Matrix4D _transform; bool apply_transform; @@ -289,7 +308,7 @@ private: private: MeshPointArray& pointArray; MeshFacetArray& facetArray; - Material* materialArray{nullptr}; + Material* materialArray {nullptr}; }; /*! @@ -322,10 +341,10 @@ private: private: std::size_t numPoints; MeshFacetArray& facets; - std::vector< std::vector > pointFacetAdjacency; + std::vector> pointFacetAdjacency; }; -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_IO_H +#endif // MESH_IO_H diff --git a/src/Mod/Mesh/App/Core/MeshKernel.cpp b/src/Mod/Mesh/App/Core/MeshKernel.cpp index 45063ddf86..f760c75ad0 100644 --- a/src/Mod/Mesh/App/Core/MeshKernel.cpp +++ b/src/Mod/Mesh/App/Core/MeshKernel.cpp @@ -23,22 +23,22 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include #include #include -#include "MeshKernel.h" #include "Algorithm.h" #include "Builder.h" #include "Evaluation.h" #include "Iterator.h" #include "MeshIO.h" +#include "MeshKernel.h" #include "Smoothing.h" @@ -49,42 +49,46 @@ MeshKernel::MeshKernel() _clBoundBox.SetVoid(); } -MeshKernel::MeshKernel (const MeshKernel &rclMesh) +MeshKernel::MeshKernel(const MeshKernel& rclMesh) { *this = rclMesh; } -MeshKernel& MeshKernel::operator = (const MeshKernel &rclMesh) +MeshKernel& MeshKernel::operator=(const MeshKernel& rclMesh) { - if (this != &rclMesh) { // must be a different instance - this->_aclPointArray = rclMesh._aclPointArray; - this->_aclFacetArray = rclMesh._aclFacetArray; - this->_clBoundBox = rclMesh._clBoundBox; - this->_bValid = rclMesh._bValid; + if (this != &rclMesh) { // must be a different instance + this->_aclPointArray = rclMesh._aclPointArray; + this->_aclFacetArray = rclMesh._aclFacetArray; + this->_clBoundBox = rclMesh._clBoundBox; + this->_bValid = rclMesh._bValid; } return *this; } -MeshKernel& MeshKernel::operator = (const std::vector &rclFAry) +MeshKernel& MeshKernel::operator=(const std::vector& rclFAry) { MeshBuilder builder(*this); builder.Initialize(rclFAry.size()); - for (const auto & it : rclFAry) + for (const auto& it : rclFAry) { builder.AddFacet(it); + } builder.Finish(); return *this; } -void MeshKernel::Assign(const MeshPointArray& rPoints, const MeshFacetArray& rFacets, bool checkNeighbourHood) +void MeshKernel::Assign(const MeshPointArray& rPoints, + const MeshFacetArray& rFacets, + bool checkNeighbourHood) { _aclPointArray = rPoints; _aclFacetArray = rFacets; RecalcBoundBox(); - if (checkNeighbourHood) + if (checkNeighbourHood) { RebuildNeighbours(); + } } void MeshKernel::Adopt(MeshPointArray& rPoints, MeshFacetArray& rFacets, bool checkNeighbourHood) @@ -92,8 +96,9 @@ void MeshKernel::Adopt(MeshPointArray& rPoints, MeshFacetArray& rFacets, bool ch _aclPointArray.swap(rPoints); _aclFacetArray.swap(rFacets); RecalcBoundBox(); - if (checkNeighbourHood) + if (checkNeighbourHood) { RebuildNeighbours(); + } } void MeshKernel::Swap(MeshKernel& mesh) @@ -103,13 +108,13 @@ void MeshKernel::Swap(MeshKernel& mesh) this->_clBoundBox = mesh._clBoundBox; } -MeshKernel& MeshKernel::operator += (const MeshGeomFacet &rclSFacet) +MeshKernel& MeshKernel::operator+=(const MeshGeomFacet& rclSFacet) { this->AddFacet(rclSFacet); return *this; } -void MeshKernel::AddFacet(const MeshGeomFacet &rclSFacet) +void MeshKernel::AddFacet(const MeshGeomFacet& rclSFacet) { MeshFacet clFacet; @@ -129,10 +134,11 @@ void MeshKernel::AddFacet(const MeshGeomFacet &rclSFacet) PointIndex ulP1 = clFacet._aulPoints[1]; PointIndex ulP2 = clFacet._aulPoints[2]; FacetIndex ulCC = 0; - for (TMeshFacetArray::iterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); ++pF, ulCC++) { - for (int i=0; i<3;i++) { + for (TMeshFacetArray::iterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); + ++pF, ulCC++) { + for (int i = 0; i < 3; i++) { PointIndex ulP = pF->_aulPoints[i]; - PointIndex ulQ = pF->_aulPoints[(i+1)%3]; + PointIndex ulQ = pF->_aulPoints[(i + 1) % 3]; if (ulQ == ulP0 && ulP == ulP1) { clFacet._aulNeighbours[0] = ulCC; pF->_aulNeighbours[i] = ulCt; @@ -152,13 +158,13 @@ void MeshKernel::AddFacet(const MeshGeomFacet &rclSFacet) _aclFacetArray.push_back(clFacet); } -MeshKernel& MeshKernel::operator += (const std::vector &rclFAry) +MeshKernel& MeshKernel::operator+=(const std::vector& rclFAry) { this->AddFacets(rclFAry); return *this; } -void MeshKernel::AddFacets(const std::vector &rclFAry) +void MeshKernel::AddFacets(const std::vector& rclFAry) { // Create a temp. kernel to get the topology of the passed triangles // and merge them with this kernel. This keeps properties and flags @@ -168,8 +174,7 @@ void MeshKernel::AddFacets(const std::vector &rclFAry) Merge(tmp); } -unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, - bool checkManifolds) +unsigned long MeshKernel::AddFacets(const std::vector& rclFAry, bool checkManifolds) { // Build map of edges of the referencing facets we want to append #ifdef FC_DEBUG @@ -183,7 +188,7 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, _aclFacetArray.reserve(countFacets + countValid); // just add all faces now - for (const auto & pF : rclFAry) { + for (const auto& pF : rclFAry) { _aclFacetArray.push_back(pF); } @@ -193,17 +198,18 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, this->_aclPointArray.ResetInvalid(); FacetIndex k = CountFacets(); - std::map, std::list > edgeMap; - for (std::vector::const_iterator pF = rclFAry.begin(); pF != rclFAry.end(); ++pF, k++) { + std::map, std::list> edgeMap; + for (std::vector::const_iterator pF = rclFAry.begin(); pF != rclFAry.end(); + ++pF, k++) { // reset INVALID flag for all candidates pF->ResetFlag(MeshFacet::INVALID); - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { #ifdef FC_DEBUG - assert( pF->_aulPoints[i] < countPoints ); + assert(pF->_aulPoints[i] < countPoints); #endif this->_aclPointArray[pF->_aulPoints[i]].SetFlag(MeshPoint::INVALID); PointIndex ulT0 = pF->_aulPoints[i]; - PointIndex ulT1 = pF->_aulPoints[(i+1)%3]; + PointIndex ulT1 = pF->_aulPoints[(i + 1) % 3]; PointIndex ulP0 = std::min(ulT0, ulT1); PointIndex ulP1 = std::max(ulT0, ulT1); edgeMap[std::make_pair(ulP0, ulP1)].push_front(k); @@ -211,20 +217,23 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, } // Check for the above edges in the current facet array - k=0; - for (MeshFacetArray::_TIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); ++pF, k++) { + k = 0; + for (MeshFacetArray::_TIterator pF = _aclFacetArray.begin(); pF != _aclFacetArray.end(); + ++pF, k++) { // if none of the points references one of the edges ignore the facet - if (!this->_aclPointArray[pF->_aulPoints[0]].IsFlag(MeshPoint::INVALID) && - !this->_aclPointArray[pF->_aulPoints[1]].IsFlag(MeshPoint::INVALID) && - !this->_aclPointArray[pF->_aulPoints[2]].IsFlag(MeshPoint::INVALID)) + if (!this->_aclPointArray[pF->_aulPoints[0]].IsFlag(MeshPoint::INVALID) + && !this->_aclPointArray[pF->_aulPoints[1]].IsFlag(MeshPoint::INVALID) + && !this->_aclPointArray[pF->_aulPoints[2]].IsFlag(MeshPoint::INVALID)) { continue; - for (int i=0; i<3; i++) { + } + for (int i = 0; i < 3; i++) { PointIndex ulT0 = pF->_aulPoints[i]; - PointIndex ulT1 = pF->_aulPoints[(i+1)%3]; + PointIndex ulT1 = pF->_aulPoints[(i + 1) % 3]; PointIndex ulP0 = std::min(ulT0, ulT1); PointIndex ulP1 = std::max(ulT0, ulT1); std::pair edge = std::make_pair(ulP0, ulP1); - std::map, std::list >::iterator pI = edgeMap.find(edge); + std::map, std::list>::iterator pI = + edgeMap.find(edge); // Does the current facet share the same edge? if (pI != edgeMap.end()) { pI->second.push_front(k); @@ -234,15 +243,13 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, this->_aclPointArray.ResetInvalid(); - // Now let's see for which edges we might get manifolds, if so we don't add the corresponding candidates + // Now let's see for which edges we might get manifolds, if so we don't add the corresponding + // candidates FacetIndex countFacets = CountFacets(); - std::map, std::list >::iterator pE; - for (pE = edgeMap.begin(); pE != edgeMap.end(); ++pE) - { - if (pE->second.size() > 2) - { - for (FacetIndex it : pE->second) - { + std::map, std::list>::iterator pE; + for (pE = edgeMap.begin(); pE != edgeMap.end(); ++pE) { + if (pE->second.size() > 2) { + for (FacetIndex it : pE->second) { if (it >= countFacets) { // this is a candidate FacetIndex index = it - countFacets; @@ -255,13 +262,15 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, // Do not insert directly to the data structure because we should get the correct size of new // facets, otherwise std::vector reallocates too much memory which can't be freed so easily MeshIsNotFlag flag; - FacetIndex countValid = std::count_if(rclFAry.begin(), rclFAry.end(), [flag](const MeshFacet& f) { - return flag(f, MeshFacet::INVALID); - }); - _aclFacetArray.reserve( _aclFacetArray.size() + countValid ); - // now start inserting the facets to the data structure and set the correct neighbourhood as well + FacetIndex countValid = + std::count_if(rclFAry.begin(), rclFAry.end(), [flag](const MeshFacet& f) { + return flag(f, MeshFacet::INVALID); + }); + _aclFacetArray.reserve(_aclFacetArray.size() + countValid); + // now start inserting the facets to the data structure and set the correct neighbourhood as + // well FacetIndex startIndex = CountFacets(); - for (const auto & pF : rclFAry) { + for (const auto& pF : rclFAry) { if (!pF.IsFlag(MeshFacet::INVALID)) { _aclFacetArray.push_back(pF); pF.SetProperty(startIndex++); @@ -269,8 +278,7 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, } // resolve neighbours - for (pE = edgeMap.begin(); pE != edgeMap.end(); ++pE) - { + for (pE = edgeMap.begin(); pE != edgeMap.end(); ++pE) { PointIndex ulP0 = pE->first.first; PointIndex ulP1 = pE->first.second; if (pE->second.size() == 1) // border facet @@ -279,14 +287,16 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, if (ulF0 >= countFacets) { ulF0 -= countFacets; std::vector::const_iterator pF = rclFAry.begin() + ulF0; - if (!pF->IsFlag(MeshFacet::INVALID)) + if (!pF->IsFlag(MeshFacet::INVALID)) { ulF0 = pF->_ulProp; - else + } + else { ulF0 = FACET_INDEX_MAX; + } } if (ulF0 != FACET_INDEX_MAX) { - unsigned short usSide = _aclFacetArray[ulF0].Side(ulP0, ulP1); + unsigned short usSide = _aclFacetArray[ulF0].Side(ulP0, ulP1); assert(usSide != USHRT_MAX); _aclFacetArray[ulF0]._aulNeighbours[usSide] = FACET_INDEX_MAX; } @@ -298,19 +308,23 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, if (ulF0 >= countFacets) { ulF0 -= countFacets; std::vector::const_iterator pF = rclFAry.begin() + ulF0; - if (!pF->IsFlag(MeshFacet::INVALID)) + if (!pF->IsFlag(MeshFacet::INVALID)) { ulF0 = pF->_ulProp; - else + } + else { ulF0 = FACET_INDEX_MAX; + } } FacetIndex ulF1 = pE->second.back(); if (ulF1 >= countFacets) { ulF1 -= countFacets; std::vector::const_iterator pF = rclFAry.begin() + ulF1; - if (!pF->IsFlag(MeshFacet::INVALID)) + if (!pF->IsFlag(MeshFacet::INVALID)) { ulF1 = pF->_ulProp; - else + } + else { ulF1 = FACET_INDEX_MAX; + } } if (ulF0 != FACET_INDEX_MAX) { @@ -330,12 +344,13 @@ unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, return _aclFacetArray.size(); } -unsigned long MeshKernel::AddFacets(const std::vector &rclFAry, +unsigned long MeshKernel::AddFacets(const std::vector& rclFAry, const std::vector& rclPAry, bool checkManifolds) { - for (auto it : rclPAry) + for (auto it : rclPAry) { _clBoundBox.Add(it); + } this->_aclPointArray.insert(this->_aclPointArray.end(), rclPAry.begin(), rclPAry.end()); return this->AddFacets(rclFAry, checkManifolds); } @@ -344,15 +359,16 @@ void MeshKernel::Merge(const MeshKernel& rKernel) { if (this != &rKernel) { const MeshPointArray& rPoints = rKernel._aclPointArray; - const MeshFacetArray& rFacets = rKernel._aclFacetArray; + const MeshFacetArray& rFacets = rKernel._aclFacetArray; Merge(rPoints, rFacets); } } void MeshKernel::Merge(const MeshPointArray& rPoints, const MeshFacetArray& rFaces) { - if (rPoints.empty() || rFaces.empty()) - return; // nothing to do + if (rPoints.empty() || rFaces.empty()) { + return; // nothing to do + } std::vector increments(rPoints.size()); FacetIndex countFacets = this->_aclFacetArray.size(); @@ -361,7 +377,7 @@ void MeshKernel::Merge(const MeshPointArray& rPoints, const MeshFacetArray& rFac // Copy the new faces immediately to the facet array MeshFacet face; - for(const auto & it : rFaces) { + for (const auto& it : rFaces) { face = it; for (PointIndex point : it._aulPoints) { increments[point]++; @@ -371,9 +387,10 @@ void MeshKernel::Merge(const MeshPointArray& rPoints, const MeshFacetArray& rFac this->_aclFacetArray.push_back(face); } - std::size_t countNewPoints = std::count_if(increments.begin(), increments.end(),[](PointIndex v) { - return v > 0; - }); + std::size_t countNewPoints = + std::count_if(increments.begin(), increments.end(), [](PointIndex v) { + return v > 0; + }); // Reserve the additional memory to append the new points PointIndex index = this->_aclPointArray.size(); this->_aclPointArray.reserve(this->_aclPointArray.size() + countNewPoints); @@ -383,14 +400,15 @@ void MeshKernel::Merge(const MeshPointArray& rPoints, const MeshFacetArray& rFac if (*it > 0) { // set the index of the point array *it = index++; - const MeshPoint& rPt = rPoints[it-increments.begin()]; + const MeshPoint& rPt = rPoints[it - increments.begin()]; this->_aclPointArray.push_back(rPt); _clBoundBox.Add(rPt); } } - for (MeshFacetArray::_TIterator pF = this->_aclFacetArray.begin()+countFacets; - pF != this->_aclFacetArray.end(); ++pF) { + for (MeshFacetArray::_TIterator pF = this->_aclFacetArray.begin() + countFacets; + pF != this->_aclFacetArray.end(); + ++pF) { for (PointIndex& index : pF->_aulPoints) { index = increments[index]; } @@ -409,7 +427,7 @@ void MeshKernel::Cleanup() meshCleanup.RemoveInvalids(); } -void MeshKernel::Clear () +void MeshKernel::Clear() { _aclPointArray.clear(); _aclFacetArray.clear(); @@ -421,12 +439,13 @@ void MeshKernel::Clear () _clBoundBox.SetVoid(); } -bool MeshKernel::DeleteFacet (const MeshFacetIterator &rclIter) +bool MeshKernel::DeleteFacet(const MeshFacetIterator& rclIter) { FacetIndex ulNFacet, ulInd; - if (rclIter._clIter >= _aclFacetArray.end()) + if (rclIter._clIter >= _aclFacetArray.end()) { return false; + } // index of the facet to delete ulInd = rclIter._clIter - _aclFacetArray.begin(); @@ -446,10 +465,10 @@ bool MeshKernel::DeleteFacet (const MeshFacetIterator &rclIter) // erase corner point if needed for (int i = 0; i < 3; i++) { - if ((rclIter._clIter->_aulNeighbours[i] == FACET_INDEX_MAX) && - (rclIter._clIter->_aulNeighbours[(i+1)%3] == FACET_INDEX_MAX)) { + if ((rclIter._clIter->_aulNeighbours[i] == FACET_INDEX_MAX) + && (rclIter._clIter->_aulNeighbours[(i + 1) % 3] == FACET_INDEX_MAX)) { // no neighbours, possibly delete point - ErasePoint(rclIter._clIter->_aulPoints[(i+1)%3], ulInd); + ErasePoint(rclIter._clIter->_aulPoints[(i + 1) % 3], ulInd); } } @@ -459,10 +478,11 @@ bool MeshKernel::DeleteFacet (const MeshFacetIterator &rclIter) return true; } -bool MeshKernel::DeleteFacet (FacetIndex ulInd) +bool MeshKernel::DeleteFacet(FacetIndex ulInd) { - if (ulInd >= _aclFacetArray.size()) + if (ulInd >= _aclFacetArray.size()) { return false; + } MeshFacetIterator clIter(*this); clIter.Set(ulInd); @@ -470,12 +490,12 @@ bool MeshKernel::DeleteFacet (FacetIndex ulInd) return DeleteFacet(clIter); } -void MeshKernel::DeleteFacets (const std::vector &raulFacets) +void MeshKernel::DeleteFacets(const std::vector& raulFacets) { _aclPointArray.SetProperty(0); // number of referencing facets per point - for (const auto & pF : _aclFacetArray) { + for (const auto& pF : _aclFacetArray) { _aclPointArray[pF._aulPoints[0]]._ulProp++; _aclPointArray[pF._aulPoints[1]]._ulProp++; _aclPointArray[pF._aulPoints[2]]._ulProp++; @@ -484,7 +504,7 @@ void MeshKernel::DeleteFacets (const std::vector &raulFacets) // invalidate facet and adjust number of point references _aclFacetArray.ResetInvalid(); for (FacetIndex index : raulFacets) { - MeshFacet &rclFacet = _aclFacetArray[index]; + MeshFacet& rclFacet = _aclFacetArray[index]; rclFacet.SetInvalid(); _aclPointArray[rclFacet._aulPoints[0]]._ulProp--; _aclPointArray[rclFacet._aulPoints[1]]._ulProp--; @@ -493,19 +513,21 @@ void MeshKernel::DeleteFacets (const std::vector &raulFacets) // invalidate all unreferenced points _aclPointArray.ResetInvalid(); - for (auto & pP : _aclPointArray) { - if (pP._ulProp == 0) + for (auto& pP : _aclPointArray) { + if (pP._ulProp == 0) { pP.SetInvalid(); + } } RemoveInvalids(); RecalcBoundBox(); } -bool MeshKernel::DeletePoint (PointIndex ulInd) +bool MeshKernel::DeletePoint(PointIndex ulInd) { - if (ulInd >= _aclPointArray.size()) + if (ulInd >= _aclPointArray.size()) { return false; + } MeshPointIterator clIter(*this); clIter.Set(ulInd); @@ -513,10 +535,10 @@ bool MeshKernel::DeletePoint (PointIndex ulInd) return DeletePoint(clIter); } -bool MeshKernel::DeletePoint (const MeshPointIterator &rclIter) +bool MeshKernel::DeletePoint(const MeshPointIterator& rclIter) { MeshFacetIterator pFIter(*this), pFEnd(*this); - std::vector clToDel; + std::vector clToDel; PointIndex ulInd; // index of the point to delete @@ -528,8 +550,9 @@ bool MeshKernel::DeletePoint (const MeshPointIterator &rclIter) // check corner points of all facets while (pFIter < pFEnd) { for (PointIndex ptIndex : pFIter._clIter->_aulPoints) { - if (ulInd == ptIndex) + if (ulInd == ptIndex) { clToDel.push_back(pFIter); + } } ++pFIter; } @@ -539,23 +562,25 @@ bool MeshKernel::DeletePoint (const MeshPointIterator &rclIter) // delete each facet separately (from back to front to avoid to // invalidate the iterators) - for (size_t i = clToDel.size(); i > 0; i--) - DeleteFacet(clToDel[i-1]); + for (size_t i = clToDel.size(); i > 0; i--) { + DeleteFacet(clToDel[i - 1]); + } return true; } -void MeshKernel::DeletePoints (const std::vector &raulPoints) +void MeshKernel::DeletePoints(const std::vector& raulPoints) { _aclPointArray.ResetInvalid(); - for (PointIndex ptIndex : raulPoints) + for (PointIndex ptIndex : raulPoints) { _aclPointArray[ptIndex].SetInvalid(); + } // delete facets if at least one corner point is invalid _aclPointArray.SetProperty(0); - for (auto & pF : _aclFacetArray) { - MeshPoint &rclP0 = _aclPointArray[pF._aulPoints[0]]; - MeshPoint &rclP1 = _aclPointArray[pF._aulPoints[1]]; - MeshPoint &rclP2 = _aclPointArray[pF._aulPoints[2]]; + for (auto& pF : _aclFacetArray) { + MeshPoint& rclP0 = _aclPointArray[pF._aulPoints[0]]; + MeshPoint& rclP1 = _aclPointArray[pF._aulPoints[1]]; + MeshPoint& rclP2 = _aclPointArray[pF._aulPoints[2]]; if (!rclP0.IsValid() || !rclP1.IsValid() || !rclP2.IsValid()) { pF.SetInvalid(); @@ -569,28 +594,30 @@ void MeshKernel::DeletePoints (const std::vector &raulPoints) } // invalidate all unreferenced points to delete them - for (auto & pP : _aclPointArray) { - if (pP._ulProp == 0) + for (auto& pP : _aclPointArray) { + if (pP._ulProp == 0) { pP.SetInvalid(); + } } RemoveInvalids(); RecalcBoundBox(); } -void MeshKernel::ErasePoint (PointIndex ulIndex, FacetIndex ulFacetIndex, bool bOnlySetInvalid) +void MeshKernel::ErasePoint(PointIndex ulIndex, FacetIndex ulFacetIndex, bool bOnlySetInvalid) { std::vector::iterator pFIter, pFEnd, pFNot; pFIter = _aclFacetArray.begin(); - pFNot = _aclFacetArray.begin() + ulFacetIndex; - pFEnd = _aclFacetArray.end(); + pFNot = _aclFacetArray.begin() + ulFacetIndex; + pFEnd = _aclFacetArray.end(); // check all facets while (pFIter < pFNot) { for (PointIndex ptIndex : pFIter->_aulPoints) { - if (ptIndex == ulIndex) - return; // point still referenced ==> do not delete + if (ptIndex == ulIndex) { + return; // point still referenced ==> do not delete + } } ++pFIter; } @@ -598,8 +625,9 @@ void MeshKernel::ErasePoint (PointIndex ulIndex, FacetIndex ulFacetIndex, bool b ++pFIter; while (pFIter < pFEnd) { for (PointIndex ptIndex : pFIter->_aulPoints) { - if (ptIndex == ulIndex) - return; // point still referenced ==> do not delete + if (ptIndex == ulIndex) { + return; // point still referenced ==> do not delete + } } ++pFIter; } @@ -612,18 +640,20 @@ void MeshKernel::ErasePoint (PointIndex ulIndex, FacetIndex ulFacetIndex, bool b // correct point indices of the facets pFIter = _aclFacetArray.begin(); while (pFIter < pFEnd) { - for (PointIndex & ptIndex : pFIter->_aulPoints) { - if (ptIndex > ulIndex) + for (PointIndex& ptIndex : pFIter->_aulPoints) { + if (ptIndex > ulIndex) { ptIndex--; + } } ++pFIter; } } - else // only invalidate + else { // only invalidate _aclPointArray[ulIndex].SetInvalid(); + } } -void MeshKernel::RemoveInvalids () +void MeshKernel::RemoveInvalids() { std::vector aulDecrements; std::vector::iterator pDIter; @@ -634,16 +664,17 @@ void MeshKernel::RemoveInvalids () // generate array of decrements aulDecrements.resize(_aclPointArray.size()); pDIter = aulDecrements.begin(); - ulDec = 0; - pPEnd = _aclPointArray.end(); + ulDec = 0; + pPEnd = _aclPointArray.end(); for (pPIter = _aclPointArray.begin(); pPIter != pPEnd; ++pPIter) { *pDIter++ = ulDec; - if (!pPIter->IsValid()) + if (!pPIter->IsValid()) { ulDec++; + } } // correct point indices of the facets - pFEnd = _aclFacetArray.end(); + pFEnd = _aclFacetArray.end(); for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter) { if (pFIter->IsValid()) { pFIter->_aulPoints[0] -= aulDecrements[pFIter->_aulPoints[0]]; @@ -653,59 +684,68 @@ void MeshKernel::RemoveInvalids () } // delete point, number of valid points - unsigned long ulNewPts = std::count_if(_aclPointArray.begin(), _aclPointArray.end(), - [](const MeshPoint& p) { return p.IsValid(); }); + unsigned long ulNewPts = + std::count_if(_aclPointArray.begin(), _aclPointArray.end(), [](const MeshPoint& p) { + return p.IsValid(); + }); // tmp. point array - MeshPointArray aclTempPt(ulNewPts); + MeshPointArray aclTempPt(ulNewPts); MeshPointArray::_TIterator pPTemp = aclTempPt.begin(); pPEnd = _aclPointArray.end(); for (pPIter = _aclPointArray.begin(); pPIter != pPEnd; ++pPIter) { - if (pPIter->IsValid()) + if (pPIter->IsValid()) { *pPTemp++ = *pPIter; + } } // free memory //_aclPointArray = aclTempPt; - //aclTempPt.clear(); + // aclTempPt.clear(); _aclPointArray.swap(aclTempPt); MeshPointArray().swap(aclTempPt); // generate array of facet decrements aulDecrements.resize(_aclFacetArray.size()); pDIter = aulDecrements.begin(); - ulDec = 0; - pFEnd = _aclFacetArray.end(); + ulDec = 0; + pFEnd = _aclFacetArray.end(); for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter, ++pDIter) { *pDIter = ulDec; - if (!pFIter->IsValid()) + if (!pFIter->IsValid()) { ulDec++; + } } // correct neighbour indices of the facets pFEnd = _aclFacetArray.end(); for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter) { if (pFIter->IsValid()) { - for (FacetIndex & nbIndex : pFIter->_aulNeighbours) { + for (FacetIndex& nbIndex : pFIter->_aulNeighbours) { FacetIndex k = nbIndex; if (k != FACET_INDEX_MAX) { - if (_aclFacetArray[k].IsValid()) + if (_aclFacetArray[k].IsValid()) { nbIndex -= aulDecrements[k]; - else + } + else { nbIndex = FACET_INDEX_MAX; + } } } } } // delete facets, number of valid facets - unsigned long ulDelFacets = std::count_if(_aclFacetArray.begin(), _aclFacetArray.end(), - [](const MeshFacet& f) { return f.IsValid(); }); + unsigned long ulDelFacets = + std::count_if(_aclFacetArray.begin(), _aclFacetArray.end(), [](const MeshFacet& f) { + return f.IsValid(); + }); MeshFacetArray aclFArray(ulDelFacets); MeshFacetArray::_TIterator pFTemp = aclFArray.begin(); - pFEnd = _aclFacetArray.end(); + pFEnd = _aclFacetArray.end(); for (pFIter = _aclFacetArray.begin(); pFIter != pFEnd; ++pFIter) { - if (pFIter->IsValid()) + if (pFIter->IsValid()) { *pFTemp++ = *pFIter; + } } // free memory @@ -713,21 +753,28 @@ void MeshKernel::RemoveInvalids () _aclFacetArray.swap(aclFArray); } -void MeshKernel::CutFacets(const MeshFacetGrid& rclGrid, const Base::ViewProjMethod* pclProj, - const Base::Polygon2d& rclPoly, bool bCutInner, std::vector &raclFacets) +void MeshKernel::CutFacets(const MeshFacetGrid& rclGrid, + const Base::ViewProjMethod* pclProj, + const Base::Polygon2d& rclPoly, + bool bCutInner, + std::vector& raclFacets) { std::vector aulFacets; - MeshAlgorithm(*this).CheckFacets(rclGrid, pclProj, rclPoly, bCutInner, aulFacets ); + MeshAlgorithm(*this).CheckFacets(rclGrid, pclProj, rclPoly, bCutInner, aulFacets); - for (FacetIndex it : aulFacets) + for (FacetIndex it : aulFacets) { raclFacets.push_back(GetFacet(it)); + } DeleteFacets(aulFacets); } -void MeshKernel::CutFacets(const MeshFacetGrid& rclGrid, const Base::ViewProjMethod* pclProj, - const Base::Polygon2d& rclPoly, bool bInner, std::vector &raclCutted) +void MeshKernel::CutFacets(const MeshFacetGrid& rclGrid, + const Base::ViewProjMethod* pclProj, + const Base::Polygon2d& rclPoly, + bool bInner, + std::vector& raclCutted) { MeshAlgorithm(*this).CheckFacets(rclGrid, pclProj, rclPoly, bInner, raclCutted); DeleteFacets(raclCutted); @@ -753,18 +800,18 @@ std::vector MeshKernel::GetPointFacets(const std::vector { _aclPointArray.ResetFlag(MeshPoint::TMP0); _aclFacetArray.ResetFlag(MeshFacet::TMP0); - for (PointIndex point : points) + for (PointIndex point : points) { _aclPointArray[point].SetFlag(MeshPoint::TMP0); + } // mark facets if at least one corner point is marked - for (const auto & pF : _aclFacetArray) { - const MeshPoint &rclP0 = _aclPointArray[pF._aulPoints[0]]; - const MeshPoint &rclP1 = _aclPointArray[pF._aulPoints[1]]; - const MeshPoint &rclP2 = _aclPointArray[pF._aulPoints[2]]; + for (const auto& pF : _aclFacetArray) { + const MeshPoint& rclP0 = _aclPointArray[pF._aulPoints[0]]; + const MeshPoint& rclP1 = _aclPointArray[pF._aulPoints[1]]; + const MeshPoint& rclP2 = _aclPointArray[pF._aulPoints[2]]; - if (rclP0.IsFlag(MeshPoint::TMP0) || - rclP1.IsFlag(MeshPoint::TMP0) || - rclP2.IsFlag(MeshPoint::TMP0)) { + if (rclP0.IsFlag(MeshPoint::TMP0) || rclP1.IsFlag(MeshPoint::TMP0) + || rclP2.IsFlag(MeshPoint::TMP0)) { pF.SetFlag(MeshFacet::TMP0); } } @@ -774,15 +821,15 @@ std::vector MeshKernel::GetPointFacets(const std::vector return facets; } -std::vector MeshKernel::HasFacets (const MeshPointIterator &rclIter) const +std::vector MeshKernel::HasFacets(const MeshPointIterator& rclIter) const { PointIndex ulPtInd = rclIter.Position(); - std::vector::const_iterator pFIter = _aclFacetArray.begin(); - std::vector::const_iterator pFBegin = _aclFacetArray.begin(); - std::vector::const_iterator pFEnd = _aclFacetArray.end(); + std::vector::const_iterator pFIter = _aclFacetArray.begin(); + std::vector::const_iterator pFBegin = _aclFacetArray.begin(); + std::vector::const_iterator pFEnd = _aclFacetArray.end(); std::vector aulBelongs; - while (pFIter < pFEnd) { + while (pFIter < pFEnd) { for (PointIndex point : pFIter->_aulPoints) { if (point == ulPtInd) { aulBelongs.push_back(pFIter - pFBegin); @@ -799,8 +846,9 @@ MeshPointArray MeshKernel::GetPoints(const std::vector& indices) con { MeshPointArray ary; ary.reserve(indices.size()); - for (PointIndex it : indices) + for (PointIndex it : indices) { ary.push_back(this->_aclPointArray[it]); + } return ary; } @@ -808,15 +856,17 @@ MeshFacetArray MeshKernel::GetFacets(const std::vector& indices) con { MeshFacetArray ary; ary.reserve(indices.size()); - for (FacetIndex it : indices) + for (FacetIndex it : indices) { ary.push_back(this->_aclFacetArray[it]); + } return ary; } -void MeshKernel::Write (std::ostream &rclOut) const +void MeshKernel::Write(std::ostream& rclOut) const { - if (!rclOut || rclOut.bad()) + if (!rclOut || rclOut.bad()) { return; + } Base::OutputStream str(rclOut); @@ -824,24 +874,24 @@ void MeshKernel::Write (std::ostream &rclOut) const str << static_cast(0xA0B0C0D0); str << static_cast(0x010000); - char szInfo[257]; // needs an additional byte for zero-termination - strcpy(szInfo, "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-" - "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-" - "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-" - "MESH-MESH-MESH-\n"); + char szInfo[257]; // needs an additional byte for zero-termination + strcpy(szInfo, + "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-" + "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-" + "MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-MESH-" + "MESH-MESH-MESH-\n"); rclOut.write(szInfo, 256); // write the number of points and facets str << static_cast(CountPoints()) << static_cast(CountFacets()); // write the data - for (const auto & it : _aclPointArray) { + for (const auto& it : _aclPointArray) { str << it.x << it.y << it.z; } - for (const auto & it : _aclFacetArray) { - str << static_cast(it._aulPoints[0]) - << static_cast(it._aulPoints[1]) + for (const auto& it : _aclFacetArray) { + str << static_cast(it._aulPoints[0]) << static_cast(it._aulPoints[1]) << static_cast(it._aulPoints[2]); str << static_cast(it._aulNeighbours[0]) << static_cast(it._aulNeighbours[1]) @@ -853,10 +903,11 @@ void MeshKernel::Write (std::ostream &rclOut) const str << _clBoundBox.MinZ << _clBoundBox.MaxZ; } -void MeshKernel::Read (std::istream &rclIn) +void MeshKernel::Read(std::istream& rclIn) { - if (!rclIn || rclIn.bad()) + if (!rclIn || rclIn.bad()) { return; + } // get header Base::InputStream str(rclIn); @@ -864,9 +915,11 @@ void MeshKernel::Read (std::istream &rclIn) // Read the header with a "magic number" and a version uint32_t magic, version, swap_magic, swap_version; str >> magic >> version; - swap_magic = magic; Base::SwapEndian(swap_magic); - swap_version = version; Base::SwapEndian(swap_version); - uint32_t open_edge = 0xffffffff; // value to mark an open edge + swap_magic = magic; + Base::SwapEndian(swap_magic); + swap_version = version; + Base::SwapEndian(swap_version); + uint32_t open_edge = 0xffffffff; // value to mark an open edge // is it the new or old format? bool new_format = false; @@ -883,14 +936,14 @@ void MeshKernel::Read (std::istream &rclIn) rclIn.read(szInfo, 256); // read the number of points and facets - uint32_t uCtPts=0, uCtFts=0; + uint32_t uCtPts = 0, uCtFts = 0; str >> uCtPts >> uCtFts; try { // read the data MeshPointArray pointArray; pointArray.resize(uCtPts); - for (auto & it : pointArray) { + for (auto& it : pointArray) { str >> it.x >> it.y >> it.z; } @@ -898,12 +951,13 @@ void MeshKernel::Read (std::istream &rclIn) facetArray.resize(uCtFts); uint32_t v1, v2, v3; - for (auto & it : facetArray) { + for (auto& it : facetArray) { str >> v1 >> v2 >> v3; // make sure to have valid indices - if (v1 >= uCtPts || v2 >= uCtPts || v3 >= uCtPts) + if (v1 >= uCtPts || v2 >= uCtPts || v3 >= uCtPts) { throw Base::BadFormatError("Invalid data structure"); + } it._aulPoints[0] = v1; it._aulPoints[1] = v2; @@ -916,27 +970,36 @@ void MeshKernel::Read (std::istream &rclIn) str >> v1 >> v2 >> v3; // make sure to have valid indices - if (v1 >= uCtFts && v1 < open_edge) + if (v1 >= uCtFts && v1 < open_edge) { throw Base::BadFormatError("Invalid data structure"); - if (v2 >= uCtFts && v2 < open_edge) + } + if (v2 >= uCtFts && v2 < open_edge) { throw Base::BadFormatError("Invalid data structure"); - if (v3 >= uCtFts && v3 < open_edge) + } + if (v3 >= uCtFts && v3 < open_edge) { throw Base::BadFormatError("Invalid data structure"); + } - if (v1 < open_edge) + if (v1 < open_edge) { it._aulNeighbours[0] = v1; - else + } + else { it._aulNeighbours[0] = FACET_INDEX_MAX; + } - if (v2 < open_edge) + if (v2 < open_edge) { it._aulNeighbours[1] = v2; - else + } + else { it._aulNeighbours[1] = FACET_INDEX_MAX; + } - if (v3 < open_edge) + if (v3 < open_edge) { it._aulNeighbours[2] = v3; - else + } + else { it._aulNeighbours[2] = FACET_INDEX_MAX; + } } str >> _clBoundBox.MinX >> _clBoundBox.MaxX; @@ -954,7 +1017,7 @@ void MeshKernel::Read (std::istream &rclIn) } else { // The old formats - unsigned long uCtPts=magic, uCtFts=version; + unsigned long uCtPts = magic, uCtFts = version; MeshPointArray pointArray; MeshFacetArray facetArray; @@ -968,30 +1031,30 @@ void MeshKernel::Read (std::istream &rclIn) // the stored mesh kernel might be empty if (uCtPts > 0) { pointArray.resize(uCtPts); - rclIn.read((char*)&(pointArray[0]), uCtPts*sizeof(MeshPoint)); + rclIn.read((char*)&(pointArray[0]), uCtPts * sizeof(MeshPoint)); } if (uCtFts > 0) { facetArray.resize(uCtFts); - rclIn.read((char*)&(facetArray[0]), uCtFts*sizeof(MeshFacet)); + rclIn.read((char*)&(facetArray[0]), uCtFts * sizeof(MeshFacet)); } rclIn.read((char*)&_clBoundBox, sizeof(Base::BoundBox3f)); } else { // with edge array - unsigned long uCtEdges=uCtFts; + unsigned long uCtEdges = uCtFts; str >> magic; uCtFts = magic; pointArray.resize(uCtPts); - for (auto & it : pointArray) { + for (auto& it : pointArray) { str >> it.x >> it.y >> it.z; } uint32_t dummy; - for (unsigned long i=0; i> dummy; } uint32_t v1, v2, v3; facetArray.resize(uCtFts); - for (auto & it : facetArray) { + for (auto& it : facetArray) { str >> v1 >> v2 >> v3; it._aulNeighbours[0] = v1; it._aulNeighbours[1] = v2; @@ -1003,20 +1066,18 @@ void MeshKernel::Read (std::istream &rclIn) str >> it._ucFlag; } - str >> _clBoundBox.MinX - >> _clBoundBox.MinY - >> _clBoundBox.MinZ - >> _clBoundBox.MaxX - >> _clBoundBox.MaxY - >> _clBoundBox.MaxZ; + str >> _clBoundBox.MinX >> _clBoundBox.MinY >> _clBoundBox.MinZ >> _clBoundBox.MaxX + >> _clBoundBox.MaxY >> _clBoundBox.MaxZ; } - for (auto & it : facetArray) { - for (int i=0; i<3; i++) { - if (it._aulPoints[i] >= uCtPts) + for (auto& it : facetArray) { + for (int i = 0; i < 3; i++) { + if (it._aulPoints[i] >= uCtPts) { throw Base::BadFormatError("Invalid data structure"); - if (it._aulNeighbours[i] < FACET_INDEX_MAX && it._aulNeighbours[i] >= uCtFts) + } + if (it._aulNeighbours[i] < FACET_INDEX_MAX && it._aulNeighbours[i] >= uCtFts) { throw Base::BadFormatError("Invalid data structure"); + } } } @@ -1025,14 +1086,14 @@ void MeshKernel::Read (std::istream &rclIn) } } -void MeshKernel::operator *= (const Base::Matrix4D &rclMat) +void MeshKernel::operator*=(const Base::Matrix4D& rclMat) { this->Transform(rclMat); } -void MeshKernel::Transform (const Base::Matrix4D &rclMat) +void MeshKernel::Transform(const Base::Matrix4D& rclMat) { - MeshPointArray::_TIterator clPIter = _aclPointArray.begin(), clPEIter = _aclPointArray.end(); + MeshPointArray::_TIterator clPIter = _aclPointArray.begin(), clPEIter = _aclPointArray.end(); Base::Matrix4D clMatrix(rclMat); _clBoundBox.SetVoid(); @@ -1049,11 +1110,12 @@ void MeshKernel::Smooth(int iterations, float stepsize) LaplaceSmoothing(*this).Smooth(iterations); } -void MeshKernel::RecalcBoundBox () const +void MeshKernel::RecalcBoundBox() const { _clBoundBox.SetVoid(); - for (const auto & pI : _aclPointArray) + for (const auto& pI : _aclPointArray) { _clBoundBox.Add(pI); + } } std::vector MeshKernel::CalcVertexNormals() const @@ -1062,11 +1124,11 @@ std::vector MeshKernel::CalcVertexNormals() const normals.resize(CountPoints()); - PointIndex p1,p2,p3; + PointIndex p1, p2, p3; unsigned int ct = CountFacets(); - for (unsigned int pFIter = 0;pFIter < ct; pFIter++) { - GetFacetPoints(pFIter,p1,p2,p3); - Base::Vector3f Norm = (GetPoint(p2)-GetPoint(p1)) % (GetPoint(p3)-GetPoint(p1)); + for (unsigned int pFIter = 0; pFIter < ct; pFIter++) { + GetFacetPoints(pFIter, p1, p2, p3); + Base::Vector3f Norm = (GetPoint(p2) - GetPoint(p1)) % (GetPoint(p3) - GetPoint(p1)); normals[p1] += Norm; normals[p2] += Norm; @@ -1101,13 +1163,14 @@ float MeshKernel::GetSurface() const { float fSurface = 0.0; MeshFacetIterator cIter(*this); - for (cIter.Init(); cIter.More(); cIter.Next()) + for (cIter.Init(); cIter.More(); cIter.Next()) { fSurface += cIter->Area(); + } return fSurface; } -float MeshKernel::GetSurface( const std::vector& aSegment ) const +float MeshKernel::GetSurface(const std::vector& aSegment) const { float fSurface = 0.0; MeshFacetIterator cIter(*this); @@ -1122,20 +1185,21 @@ float MeshKernel::GetSurface( const std::vector& aSegment ) const float MeshKernel::GetVolume() const { - //MeshEvalSolid cSolid(*this); - //if ( !cSolid.Evaluate() ) - // return 0.0f; // no solid + // MeshEvalSolid cSolid(*this); + // if ( !cSolid.Evaluate() ) + // return 0.0f; // no solid float fVolume = 0.0; MeshFacetIterator cIter(*this); - Base::Vector3f p1,p2,p3; + Base::Vector3f p1, p2, p3; for (cIter.Init(); cIter.More(); cIter.Next()) { const MeshGeomFacet& rclF = *cIter; p1 = rclF._aclPoints[0]; p2 = rclF._aclPoints[1]; p3 = rclF._aclPoints[2]; - fVolume += (-p3.x*p2.y*p1.z + p2.x*p3.y*p1.z + p3.x*p1.y*p2.z - p1.x*p3.y*p2.z - p2.x*p1.y*p3.z + p1.x*p2.y*p3.z); + fVolume += (-p3.x * p2.y * p1.z + p2.x * p3.y * p1.z + p3.x * p1.y * p2.z + - p1.x * p3.y * p2.z - p2.x * p1.y * p3.z + p1.x * p2.y * p3.z); } fVolume /= 6.0f; @@ -1166,27 +1230,31 @@ bool MeshKernel::HasSelfIntersections() const MeshFacetIterator MeshKernel::FacetIterator() const { MeshFacetIterator it(*this); - it.Begin(); return it; + it.Begin(); + return it; } MeshPointIterator MeshKernel::PointIterator() const { MeshPointIterator it(*this); - it.Begin(); return it; + it.Begin(); + return it; } -void MeshKernel::GetEdges (std::vector& edges) const +void MeshKernel::GetEdges(std::vector& edges) const { std::set tmp; - for (const auto & it : _aclFacetArray) { + for (const auto& it : _aclFacetArray) { for (int i = 0; i < 3; i++) { - tmp.insert(MeshBuilder::Edge(it._aulPoints[i], it._aulPoints[(i+1)%3], it._aulNeighbours[i])); + tmp.insert(MeshBuilder::Edge(it._aulPoints[i], + it._aulPoints[(i + 1) % 3], + it._aulNeighbours[i])); } } edges.reserve(tmp.size()); - for (const auto & it2 : tmp) { + for (const auto& it2 : tmp) { MeshGeomEdge edge; edge._aclPoints[0] = this->_aclPointArray[it2.pt1]; edge._aclPoints[1] = this->_aclPointArray[it2.pt2]; @@ -1196,19 +1264,20 @@ void MeshKernel::GetEdges (std::vector& edges) const } } -unsigned long MeshKernel::CountEdges () const +unsigned long MeshKernel::CountEdges() const { unsigned long openEdges = 0, closedEdges = 0; - for (const auto & it : _aclFacetArray) { + for (const auto& it : _aclFacetArray) { for (FacetIndex nbFacet : it._aulNeighbours) { - if (nbFacet == FACET_INDEX_MAX) + if (nbFacet == FACET_INDEX_MAX) { openEdges++; - else + } + else { closedEdges++; + } } } return (openEdges + (closedEdges / 2)); } - diff --git a/src/Mod/Mesh/App/Core/MeshKernel.h b/src/Mod/Mesh/App/Core/MeshKernel.h index d2b1322856..390a1cf01d 100644 --- a/src/Mod/Mesh/App/Core/MeshKernel.h +++ b/src/Mod/Mesh/App/Core/MeshKernel.h @@ -32,12 +32,14 @@ #include "Helpers.h" -namespace Base{ - class Polygon2d; - class ViewProjMethod; -} +namespace Base +{ +class Polygon2d; +class ViewProjMethod; +} // namespace Base -namespace MeshCore { +namespace MeshCore +{ // forward declarations class MeshFacetIterator; @@ -63,48 +65,58 @@ class MeshExport MeshKernel { public: /// Construction - MeshKernel (); + MeshKernel(); /// Construction - MeshKernel (const MeshKernel &rclMesh); + MeshKernel(const MeshKernel& rclMesh); /// Destruction - ~MeshKernel () - { Clear(); } + ~MeshKernel() + { + Clear(); + } /** @name I/O methods */ //@{ /// Binary streaming of data - void Write (std::ostream &rclOut) const; - void Read (std::istream &rclIn); + void Write(std::ostream& rclOut) const; + void Read(std::istream& rclIn); //@} /** @name Querying */ //@{ /// Returns the number of facets - unsigned long CountFacets () const - { return static_cast(_aclFacetArray.size()); } + unsigned long CountFacets() const + { + return static_cast(_aclFacetArray.size()); + } /// Returns the number of edge - unsigned long CountEdges () const; + unsigned long CountEdges() const; // Returns the number of points - unsigned long CountPoints () const - { return static_cast(_aclPointArray.size()); } + unsigned long CountPoints() const + { + return static_cast(_aclPointArray.size()); + } /// Returns the number of required memory in bytes - unsigned int GetMemSize () const - { return static_cast(_aclPointArray.size() * sizeof(MeshPoint) + - _aclFacetArray.size() * sizeof(MeshFacet)); } + unsigned int GetMemSize() const + { + return static_cast(_aclPointArray.size() * sizeof(MeshPoint) + + _aclFacetArray.size() * sizeof(MeshFacet)); + } /// Determines the bounding box - const Base::BoundBox3f& GetBoundBox () const - { return _clBoundBox; } + const Base::BoundBox3f& GetBoundBox() const + { + return _clBoundBox; + } /** Forces a recalculation of the bounding box. This method should be called after * the removal of points.or after a transformation of the data structure. */ - void RecalcBoundBox () const; + void RecalcBoundBox() const; /** Returns the point at the given index. This method is rather slow and should be * called occasionally only. For fast access the MeshPointIterator interfsce should * be used. */ - inline MeshPoint GetPoint (PointIndex ulIndex) const; + inline MeshPoint GetPoint(PointIndex ulIndex) const; /** Returns an array of the vertex normals of the mesh. A vertex normal gets calculated * by summarizing the normals of the associated facets. @@ -116,34 +128,43 @@ public: * called occasionally only. For fast access the MeshFacetIterator interface should * be used. */ - inline MeshGeomFacet GetFacet (FacetIndex ulIndex) const; - inline MeshGeomFacet GetFacet (const MeshFacet &rclFacet) const; + inline MeshGeomFacet GetFacet(FacetIndex ulIndex) const; + inline MeshGeomFacet GetFacet(const MeshFacet& rclFacet) const; /** Returns the point indices of the given facet index. */ - inline void GetFacetPoints (FacetIndex ulFaIndex, PointIndex &rclP0, - PointIndex &rclP1, PointIndex &rclP2) const; + inline void GetFacetPoints(FacetIndex ulFaIndex, + PointIndex& rclP0, + PointIndex& rclP1, + PointIndex& rclP2) const; /** Returns the point indices of the given facet index. */ - inline void SetFacetPoints (FacetIndex ulFaIndex, PointIndex rclP0, - PointIndex rclP1, PointIndex rclP2); + inline void + SetFacetPoints(FacetIndex ulFaIndex, PointIndex rclP0, PointIndex rclP1, PointIndex rclP2); /** Returns the point indices of the given facet indices. */ std::vector GetFacetPoints(const std::vector&) const; /** Returns the facet indices that share the given point indices. */ std::vector GetPointFacets(const std::vector&) const; /** Returns the indices of the neighbour facets of the given facet index. */ - inline void GetFacetNeighbours (FacetIndex ulIndex, FacetIndex &rulNIdx0, - FacetIndex &rulNIdx1, FacetIndex &rulNIdx2) const; + inline void GetFacetNeighbours(FacetIndex ulIndex, + FacetIndex& rulNIdx0, + FacetIndex& rulNIdx1, + FacetIndex& rulNIdx2) const; /** Determines all facets that are associated to this point. This method is very * slow and should be called occasionally only. */ - std::vector HasFacets (const MeshPointIterator &rclIter) const; + std::vector HasFacets(const MeshPointIterator& rclIter) const; /** Returns true if the data structure is valid. */ - bool IsValid () const - { return _bValid; } + bool IsValid() const + { + return _bValid; + } /** Returns the array of all data points. */ - const MeshPointArray& GetPoints () const { return _aclPointArray; } + const MeshPointArray& GetPoints() const + { + return _aclPointArray; + } /** Returns an array of points to the given indices. The indices * must not be out of range. */ @@ -156,7 +177,10 @@ public: } /** Returns the array of all facets */ - const MeshFacetArray& GetFacets () const { return _aclFacetArray; } + const MeshFacetArray& GetFacets() const + { + return _aclFacetArray; + } /** Returns an array of facets to the given indices. The indices * must not be out of range. */ @@ -172,7 +196,7 @@ public: * Notice: The Edgelist will be temporary generated. Changes on the mesh * structure does not affect the Edgelist */ - void GetEdges (std::vector&) const; + void GetEdges(std::vector&) const; //@} /** @name Evaluation */ @@ -180,11 +204,11 @@ public: /** Calculates the surface area of the mesh object. */ float GetSurface() const; /** Calculates the surface area of the segment defined by \a aSegment. */ - float GetSurface( const std::vector& aSegment ) const; + float GetSurface(const std::vector& aSegment) const; /** Calculates the volume of the mesh object. Therefore the mesh must be a solid, if not 0 * is returned. */ - float GetVolume () const; + float GetVolume() const; /** Checks whether the mesh has open edges. */ bool HasOpenEdges() const; /** Checks whether the mesh has non.manifold edges. An edge is regarded as non-manifolds if it @@ -214,15 +238,17 @@ public: * of the given MeshFacetVisitor gets invoked. * If there are no unvisited neighbours any more the algorithms returns immediately and returns * the number of visited facets. - * \note For the start facet \a ulStartFacet MeshFacetVisitor::Visit() does not get invoked though - * the facet gets marked as VISIT. + * \note For the start facet \a ulStartFacet MeshFacetVisitor::Visit() does not get invoked + * though the facet gets marked as VISIT. */ - unsigned long VisitNeighbourFacets (MeshFacetVisitor &rclFVisitor, FacetIndex ulStartFacet) const; + unsigned long VisitNeighbourFacets(MeshFacetVisitor& rclFVisitor, + FacetIndex ulStartFacet) const; /** * Does basically the same as the method above unless the facets that share just a common point * are regared as neighbours. */ - unsigned long VisitNeighbourFacetsOverCorners (MeshFacetVisitor &rclFVisitor, FacetIndex ulStartFacet) const; + unsigned long VisitNeighbourFacetsOverCorners(MeshFacetVisitor& rclFVisitor, + FacetIndex ulStartFacet) const; //@} /** @name Point visitors @@ -234,17 +260,17 @@ public: */ //@{ /** - * This method visits all neighbour points starting from the point associated to index \a ulStartPoint. - * All points having set the VISIT flag are ignored. Therefore the user have to set or unset this flag - * if needed before the algorithm starts. - * All points that get visited during this algorithm are marked as VISIT and the Visit() method - * of the given MeshPointVisitor gets invoked. - * If there are no unvisited neighbours any more the algorithms returns immediately and returns - * the number of visited points. - * \note For the start facet \a ulStartPoint MeshPointVisitor::Visit() does not get invoked though - * the point gets marked as VISIT. + * This method visits all neighbour points starting from the point associated to index \a + * ulStartPoint. All points having set the VISIT flag are ignored. Therefore the user have to + * set or unset this flag if needed before the algorithm starts. All points that get visited + * during this algorithm are marked as VISIT and the Visit() method of the given + * MeshPointVisitor gets invoked. If there are no unvisited neighbours any more the algorithms + * returns immediately and returns the number of visited points. \note For the start facet \a + * ulStartPoint MeshPointVisitor::Visit() does not get invoked though the point gets marked as + * VISIT. */ - unsigned long VisitNeighbourPoints (MeshPointVisitor &rclPVisitor, PointIndex ulStartPoint) const; + unsigned long VisitNeighbourPoints(MeshPointVisitor& rclPVisitor, + PointIndex ulStartPoint) const; //@} /** @name Iterators @@ -277,19 +303,19 @@ public: /** Adds a single facet to the data structure. This method is very slow and should * be called occasionally only. */ - MeshKernel& operator += (const MeshGeomFacet &rclSFacet); + MeshKernel& operator+=(const MeshGeomFacet& rclSFacet); /** Adds a single facet to the data structure. This method is very slow and should * be called occasionally only. This does the same as the += operator above. */ - void AddFacet(const MeshGeomFacet &rclSFacet); + void AddFacet(const MeshGeomFacet& rclSFacet); /** Adds an array of facets to the data structure. This method keeps temporarily * set properties and flags. */ - MeshKernel& operator += (const std::vector &rclFAry); + MeshKernel& operator+=(const std::vector& rclFAry); /** Adds an array of facets to the data structure. This method keeps temporarily * set properties and flags. This does the same as the += operator above. */ - void AddFacets(const std::vector &rclFAry); + void AddFacets(const std::vector& rclFAry); /** * Adds an array of topologic facets to the data structure without inserting new points. * Facets which would create non-manifolds are not inserted. @@ -298,13 +324,13 @@ public: * This method might be useful to close gaps or fill up holes in a mesh. * @note This method is quite expensive and should be rarely used. */ - unsigned long AddFacets(const std::vector &rclFAry, bool checkManifolds); + unsigned long AddFacets(const std::vector& rclFAry, bool checkManifolds); /** * Adds new points and facets to the data structure. The client programmer must make sure * that all new points are referenced by the new facets. - * All points in \a rclPAry get copied at the end of the internal point array to keep their order. - * The point indices of the facets must be related to the internal point array, not the passed - * array \a rclPAry. + * All points in \a rclPAry get copied at the end of the internal point array to keep their + * order. The point indices of the facets must be related to the internal point array, not the + * passed array \a rclPAry. * * Example: * We have a mesh with p points and f facets where we want append new points and facets to. @@ -313,17 +339,17 @@ public: * that facets of \a rclFAry can also reference point indices of the internal point array. * @note This method is quite expensive and should be rarely used. */ - unsigned long AddFacets(const std::vector &rclFAry, + unsigned long AddFacets(const std::vector& rclFAry, const std::vector& rclPAry, bool checkManifolds); /** * Adds all facets and referenced points to the underlying mesh structure. The client programmer - * must be sure that both meshes don't have geometric overlaps, otherwise the resulting mesh might - * be invalid, i.e. has self-intersections. - * @note The method guarantees that the order of the arrays of the underlying mesh and of the given - * array is kept. - * @note Not all points of \a rKernel are necessarily appended to the underlying mesh but only these - * points which are referenced by facets of \a rKernel. + * must be sure that both meshes don't have geometric overlaps, otherwise the resulting mesh + * might be invalid, i.e. has self-intersections. + * @note The method guarantees that the order of the arrays of the underlying mesh and of the + * given array is kept. + * @note Not all points of \a rKernel are necessarily appended to the underlying mesh but only + * these points which are referenced by facets of \a rKernel. */ void Merge(const MeshKernel& rKernel); /** @@ -343,112 +369,120 @@ public: * @note After deletion of the facet \a rclIter becomes invalid and must not * be used before setting to a new position. */ - bool DeleteFacet (const MeshFacetIterator &rclIter); + bool DeleteFacet(const MeshFacetIterator& rclIter); /** * Does basically the same as the method above unless that the index of the facet is given. */ - bool DeleteFacet (FacetIndex ulInd); + bool DeleteFacet(FacetIndex ulInd); /** Removes several facets from the data structure. * @note This method overwrites the free usable property of each mesh point. * @note This method also removes points from the structure that are no longer * referenced by the facets. * @note This method is very slow and should only be called occasionally. */ - void DeleteFacets (const std::vector &raulFacets); - /** Deletes the point the iterator points to. The deletion of a point requires the following step: - * \li Find all associated facets to this point. - * \li Delete these facets. - * True is returned if the point could be deleted. + void DeleteFacets(const std::vector& raulFacets); + /** Deletes the point the iterator points to. The deletion of a point requires the following + * step: \li Find all associated facets to this point. \li Delete these facets. True is returned + * if the point could be deleted. * @note This method is very slow and should only be called occasionally. * @note After deletion of the point \a rclIter becomes invalid and must not * be used before setting to a new position. */ - bool DeletePoint (const MeshPointIterator &rclIter); + bool DeletePoint(const MeshPointIterator& rclIter); /** * Does basically the same as the method above unless that the index of the facet is given. */ - bool DeletePoint (PointIndex ulInd); + bool DeletePoint(PointIndex ulInd); /** Removes several points from the data structure. * @note This method overwrites the free usable property of each mesh point. */ - void DeletePoints (const std::vector &raulPoints); + void DeletePoints(const std::vector& raulPoints); /** Removes all as INVALID marked points and facets from the structure. */ - void RemoveInvalids (); + void RemoveInvalids(); /** Rebuilds the neighbour indices for all facets. */ - void RebuildNeighbours (); + void RebuildNeighbours(); /** Removes unreferenced points or facets with invalid indices from the mesh. */ void Cleanup(); /** Clears the whole data structure. */ - void Clear (); + void Clear(); /** Replaces the current data structure with the structure built up of the array * of triangles given in \a rclFAry. */ - MeshKernel& operator = (const std::vector &rclFAry); + MeshKernel& operator=(const std::vector& rclFAry); /** Assignment operator. */ - MeshKernel& operator = (const MeshKernel &rclMesh); - /** This allows to assign the mesh structure directly. The caller must make sure that the point indices are - * correctly set but the neighbourhood gets checked and corrected if \a checkNeighbourHood is true. + MeshKernel& operator=(const MeshKernel& rclMesh); + /** This allows to assign the mesh structure directly. The caller must make sure that the point + * indices are correctly set but the neighbourhood gets checked and corrected if \a + * checkNeighbourHood is true. */ - void Assign(const MeshPointArray& rPoints, const MeshFacetArray& rFaces, bool checkNeighbourHood=false); - /** This method does basically the same as Assign() unless that it swaps the content of both arrays. - * These arrays may be empty after assigning to the kernel. This method is a convenient way to build up - * the mesh structure from outside and assign to a mesh kernel without copying the data. - * Especially for huge meshes this saves memory and increases speed. + void Assign(const MeshPointArray& rPoints, + const MeshFacetArray& rFaces, + bool checkNeighbourHood = false); + /** This method does basically the same as Assign() unless that it swaps the content of both + * arrays. These arrays may be empty after assigning to the kernel. This method is a convenient + * way to build up the mesh structure from outside and assign to a mesh kernel without copying + * the data. Especially for huge meshes this saves memory and increases speed. */ - void Adopt(MeshPointArray& rPoints, MeshFacetArray& rFaces, bool checkNeighbourHood=false); + void Adopt(MeshPointArray& rPoints, MeshFacetArray& rFaces, bool checkNeighbourHood = false); /// Swaps the content of this kernel and \a mesh void Swap(MeshKernel& mesh); /// Transform the data structure with the given transformation matrix. - void operator *= (const Base::Matrix4D &rclMat); + void operator*=(const Base::Matrix4D& rclMat); /** Transform the data structure with the given transformation matrix. * It does exactly the same as the '*=' operator. */ - void Transform (const Base::Matrix4D &rclMat); + void Transform(const Base::Matrix4D& rclMat); /** Moves the point at the given index along the vector \a rclTrans. */ - inline void MovePoint (PointIndex ulPtIndex, const Base::Vector3f &rclTrans); + inline void MovePoint(PointIndex ulPtIndex, const Base::Vector3f& rclTrans); /** Sets the point at the given index to the new \a rPoint. */ - inline void SetPoint (PointIndex ulPtIndex, const Base::Vector3f &rPoint); + inline void SetPoint(PointIndex ulPtIndex, const Base::Vector3f& rPoint); /** Sets the point at the given index to the new \a rPoint. */ - inline void SetPoint (PointIndex ulPtIndex, float x, float y, float z); + inline void SetPoint(PointIndex ulPtIndex, float x, float y, float z); /** Smoothes the mesh kernel. */ void Smooth(int iterations, float d_max); /** - * CheckFacets() is invoked within this method and all found facets get deleted from the mesh structure. - * The facets to be deleted are returned with their geometric representation. + * CheckFacets() is invoked within this method and all found facets get deleted from the mesh + * structure. The facets to be deleted are returned with their geometric representation. * @see CheckFacets(). */ - void CutFacets (const MeshFacetGrid& rclGrid, const Base::ViewProjMethod *pclP, const Base::Polygon2d& rclPoly, - bool bCutInner, std::vector &raclFacets); + void CutFacets(const MeshFacetGrid& rclGrid, + const Base::ViewProjMethod* pclP, + const Base::Polygon2d& rclPoly, + bool bCutInner, + std::vector& raclFacets); /** - * Does basically the same as method above unless that the facets to be deleted are returned with their - * index number in the facet array of the mesh structure. + * Does basically the same as method above unless that the facets to be deleted are returned + * with their index number in the facet array of the mesh structure. */ - void CutFacets (const MeshFacetGrid& rclGrid, const Base::ViewProjMethod* pclP, const Base::Polygon2d& rclPoly, - bool bCutInner, std::vector &raclCutted); + void CutFacets(const MeshFacetGrid& rclGrid, + const Base::ViewProjMethod* pclP, + const Base::Polygon2d& rclPoly, + bool bCutInner, + std::vector& raclCutted); //@} protected: /** Rebuilds the neighbour indices for subset of all facets from index \a index on. */ - void RebuildNeighbours (FacetIndex); + void RebuildNeighbours(FacetIndex); /** Checks if this point is associated to no other facet and deletes if so. * The point indices of the facets get adjusted. * \a ulIndex is the index of the point to be deleted. \a ulFacetIndex is the index * of the quasi deleted facet and is ignored. If \a bOnlySetInvalid is true the point * doesn't get deleted but marked as invalid. */ - void ErasePoint (PointIndex ulIndex, FacetIndex ulFacetIndex, bool bOnlySetInvalid = false); + void ErasePoint(PointIndex ulIndex, FacetIndex ulFacetIndex, bool bOnlySetInvalid = false); /** Adjusts the facet's orierntation to the given normal direction. */ - inline void AdjustNormal (MeshFacet &rclFacet, const Base::Vector3f &rclNormal); + inline void AdjustNormal(MeshFacet& rclFacet, const Base::Vector3f& rclNormal); /** Calculates the normal to the given facet. */ - inline Base::Vector3f GetNormal (const MeshFacet &rclFacet) const; + inline Base::Vector3f GetNormal(const MeshFacet& rclFacet) const; /** Calculates the gravity point to the given facet. */ - inline Base::Vector3f GetGravityPoint (const MeshFacet &rclFacet) const; + inline Base::Vector3f GetGravityPoint(const MeshFacet& rclFacet) const; - MeshPointArray _aclPointArray; /**< Holds the array of geometric points. */ - MeshFacetArray _aclFacetArray; /**< Holds the array of facets. */ - mutable Base::BoundBox3f _clBoundBox; /**< The current calculated bounding box. */ - bool _bValid{true}; /**< Current state of validality. */ + MeshPointArray _aclPointArray; /**< Holds the array of geometric points. */ + MeshFacetArray _aclFacetArray; /**< Holds the array of facets. */ + mutable Base::BoundBox3f _clBoundBox; /**< The current calculated bounding box. */ + bool _bValid {true}; /**< Current state of validality. */ // friends friend class MeshPointIterator; @@ -461,46 +495,48 @@ protected: friend class MeshTrimming; }; -inline MeshPoint MeshKernel::GetPoint (PointIndex ulIndex) const +inline MeshPoint MeshKernel::GetPoint(PointIndex ulIndex) const { assert(ulIndex < _aclPointArray.size()); return _aclPointArray[ulIndex]; } -inline MeshGeomFacet MeshKernel::GetFacet (FacetIndex ulIndex) const +inline MeshGeomFacet MeshKernel::GetFacet(FacetIndex ulIndex) const { assert(ulIndex < _aclFacetArray.size()); - const MeshFacet *pclF = &_aclFacetArray[ulIndex]; - MeshGeomFacet clFacet; + const MeshFacet* pclF = &_aclFacetArray[ulIndex]; + MeshGeomFacet clFacet; clFacet._aclPoints[0] = _aclPointArray[pclF->_aulPoints[0]]; clFacet._aclPoints[1] = _aclPointArray[pclF->_aulPoints[1]]; clFacet._aclPoints[2] = _aclPointArray[pclF->_aulPoints[2]]; - clFacet._ulProp = pclF->_ulProp; - clFacet._ucFlag = pclF->_ucFlag; + clFacet._ulProp = pclF->_ulProp; + clFacet._ucFlag = pclF->_ucFlag; clFacet.CalcNormal(); return clFacet; } -inline MeshGeomFacet MeshKernel::GetFacet (const MeshFacet &rclFacet) const +inline MeshGeomFacet MeshKernel::GetFacet(const MeshFacet& rclFacet) const { assert(rclFacet._aulPoints[0] < _aclPointArray.size()); assert(rclFacet._aulPoints[1] < _aclPointArray.size()); assert(rclFacet._aulPoints[2] < _aclPointArray.size()); - MeshGeomFacet clFacet; + MeshGeomFacet clFacet; clFacet._aclPoints[0] = _aclPointArray[rclFacet._aulPoints[0]]; clFacet._aclPoints[1] = _aclPointArray[rclFacet._aulPoints[1]]; clFacet._aclPoints[2] = _aclPointArray[rclFacet._aulPoints[2]]; - clFacet._ulProp = rclFacet._ulProp; - clFacet._ucFlag = rclFacet._ucFlag; + clFacet._ulProp = rclFacet._ulProp; + clFacet._ucFlag = rclFacet._ucFlag; clFacet.CalcNormal(); - return clFacet; + return clFacet; } -inline void MeshKernel::GetFacetNeighbours (FacetIndex ulIndex, FacetIndex &rulNIdx0, - FacetIndex &rulNIdx1, FacetIndex &rulNIdx2) const +inline void MeshKernel::GetFacetNeighbours(FacetIndex ulIndex, + FacetIndex& rulNIdx0, + FacetIndex& rulNIdx1, + FacetIndex& rulNIdx2) const { assert(ulIndex < _aclFacetArray.size()); @@ -509,50 +545,54 @@ inline void MeshKernel::GetFacetNeighbours (FacetIndex ulIndex, FacetIndex &rulN rulNIdx2 = _aclFacetArray[ulIndex]._aulNeighbours[2]; } -inline void MeshKernel::MovePoint (PointIndex ulPtIndex, const Base::Vector3f &rclTrans) +inline void MeshKernel::MovePoint(PointIndex ulPtIndex, const Base::Vector3f& rclTrans) { _aclPointArray[ulPtIndex] += rclTrans; } -inline void MeshKernel::SetPoint (PointIndex ulPtIndex, const Base::Vector3f &rPoint) +inline void MeshKernel::SetPoint(PointIndex ulPtIndex, const Base::Vector3f& rPoint) { _aclPointArray[ulPtIndex] = rPoint; } -inline void MeshKernel::SetPoint (PointIndex ulPtIndex, float x, float y, float z) +inline void MeshKernel::SetPoint(PointIndex ulPtIndex, float x, float y, float z) { - _aclPointArray[ulPtIndex].Set(x,y,z); + _aclPointArray[ulPtIndex].Set(x, y, z); } -inline void MeshKernel::AdjustNormal (MeshFacet &rclFacet, const Base::Vector3f &rclNormal) +inline void MeshKernel::AdjustNormal(MeshFacet& rclFacet, const Base::Vector3f& rclNormal) { - Base::Vector3f clN = (_aclPointArray[rclFacet._aulPoints[1]] - _aclPointArray[rclFacet._aulPoints[0]]) % - (_aclPointArray[rclFacet._aulPoints[2]] - _aclPointArray[rclFacet._aulPoints[0]]); + Base::Vector3f clN = + (_aclPointArray[rclFacet._aulPoints[1]] - _aclPointArray[rclFacet._aulPoints[0]]) + % (_aclPointArray[rclFacet._aulPoints[2]] - _aclPointArray[rclFacet._aulPoints[0]]); if ((clN * rclNormal) < 0.0f) { rclFacet.FlipNormal(); } } -inline Base::Vector3f MeshKernel::GetNormal (const MeshFacet &rclFacet) const +inline Base::Vector3f MeshKernel::GetNormal(const MeshFacet& rclFacet) const { - Base::Vector3f clN = (_aclPointArray[rclFacet._aulPoints[1]] - _aclPointArray[rclFacet._aulPoints[0]]) % - (_aclPointArray[rclFacet._aulPoints[2]] - _aclPointArray[rclFacet._aulPoints[0]]); + Base::Vector3f clN = + (_aclPointArray[rclFacet._aulPoints[1]] - _aclPointArray[rclFacet._aulPoints[0]]) + % (_aclPointArray[rclFacet._aulPoints[2]] - _aclPointArray[rclFacet._aulPoints[0]]); clN.Normalize(); return clN; } -inline Base::Vector3f MeshKernel::GetGravityPoint (const MeshFacet &rclFacet) const +inline Base::Vector3f MeshKernel::GetGravityPoint(const MeshFacet& rclFacet) const { const Base::Vector3f& p0 = _aclPointArray[rclFacet._aulPoints[0]]; const Base::Vector3f& p1 = _aclPointArray[rclFacet._aulPoints[1]]; const Base::Vector3f& p2 = _aclPointArray[rclFacet._aulPoints[2]]; - return Base::Vector3f((p0.x+p1.x+p2.x)/3.0f, - (p0.y+p1.y+p2.y)/3.0f, - (p0.z+p1.z+p2.z)/3.0f); + return Base::Vector3f((p0.x + p1.x + p2.x) / 3.0f, + (p0.y + p1.y + p2.y) / 3.0f, + (p0.z + p1.z + p2.z) / 3.0f); } -inline void MeshKernel::GetFacetPoints (FacetIndex ulFaIndex, PointIndex &rclP0, - PointIndex &rclP1, PointIndex &rclP2) const +inline void MeshKernel::GetFacetPoints(FacetIndex ulFaIndex, + PointIndex& rclP0, + PointIndex& rclP1, + PointIndex& rclP2) const { assert(ulFaIndex < _aclFacetArray.size()); const MeshFacet& rclFacet = _aclFacetArray[ulFaIndex]; @@ -561,8 +601,10 @@ inline void MeshKernel::GetFacetPoints (FacetIndex ulFaIndex, PointIndex &rclP0, rclP2 = rclFacet._aulPoints[2]; } -inline void MeshKernel::SetFacetPoints (FacetIndex ulFaIndex, PointIndex rclP0, - PointIndex rclP1, PointIndex rclP2) +inline void MeshKernel::SetFacetPoints(FacetIndex ulFaIndex, + PointIndex rclP0, + PointIndex rclP1, + PointIndex rclP2) { assert(ulFaIndex < _aclFacetArray.size()); MeshFacet& rclFacet = _aclFacetArray[ulFaIndex]; @@ -572,6 +614,6 @@ inline void MeshKernel::SetFacetPoints (FacetIndex ulFaIndex, PointIndex rclP0, } -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_KERNEL_H +#endif // MESH_KERNEL_H diff --git a/src/Mod/Mesh/App/Core/Projection.cpp b/src/Mod/Mesh/App/Core/Projection.cpp index cd80d9b6c4..0f66047541 100644 --- a/src/Mod/Mesh/App/Core/Projection.cpp +++ b/src/Mod/Mesh/App/Core/Projection.cpp @@ -22,14 +22,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif -#include "Projection.h" #include "Grid.h" #include "Iterator.h" #include "MeshKernel.h" +#include "Projection.h" using namespace MeshCore; @@ -37,9 +37,8 @@ using namespace MeshCore; // ------------------------------------------------------------------------ MeshProjection::MeshProjection(const MeshKernel& mesh) - : kernel(mesh) -{ -} + : kernel(mesh) +{} bool MeshProjection::bboxInsideRectangle(const Base::BoundBox3f& bbox, const Base::Vector3f& p1, @@ -54,16 +53,16 @@ bool MeshProjection::bboxInsideRectangle(const Base::BoundBox3f& bbox, dir.Normalize(); Base::Vector3f cnt(bbox.GetCenter()); - return (fabs(cnt.DistanceToPlane(p1, dir)) + fabs(cnt.DistanceToPlane(p2, dir))) <= - (bbox.CalcDiagonalLength() + (p2 - p1).Length()); + return (fabs(cnt.DistanceToPlane(p1, dir)) + fabs(cnt.DistanceToPlane(p2, dir))) + <= (bbox.CalcDiagonalLength() + (p2 - p1).Length()); } return false; } -bool MeshProjection::isPointInsideDistance (const Base::Vector3f& p1, - const Base::Vector3f& p2, - const Base::Vector3f& pt) const +bool MeshProjection::isPointInsideDistance(const Base::Vector3f& p1, + const Base::Vector3f& p2, + const Base::Vector3f& pt) const { // project point on line Base::Vector3f proj, dir(p2 - p1); @@ -73,46 +72,50 @@ bool MeshProjection::isPointInsideDistance (const Base::Vector3f& p1, return (((p1 - proj) * (p2 - proj)) < 0.0f); } -bool MeshProjection::connectLines(std::list< std::pair >& cutLines, - const Base::Vector3f& startPoint, const Base::Vector3f& endPoint, +bool MeshProjection::connectLines(std::list>& cutLines, + const Base::Vector3f& startPoint, + const Base::Vector3f& endPoint, std::vector& polyline) const { - const float fMaxDist = float(sqrt(FLOAT_MAX)); // max. length of a gap - const float fMinEps = 1.0e-4f; + const float fMaxDist = float(sqrt(FLOAT_MAX)); // max. length of a gap + const float fMinEps = 1.0e-4f; polyline.clear(); polyline.push_back(startPoint); Base::Vector3f curr(startPoint); while ((curr != endPoint) && (!cutLines.empty())) { - std::list< std::pair >::iterator it, pCurr = cutLines.end(); + std::list>::iterator it, pCurr = cutLines.end(); // get nearest line - float fMin = fMaxDist * fMaxDist; + float fMin = fMaxDist * fMaxDist; - bool bPos = false; + bool bPos = false; for (it = cutLines.begin(); it != cutLines.end(); ++it) { float fD1 = Base::DistanceP2(curr, it->first); float fD2 = Base::DistanceP2(curr, it->second); if (std::min(fD1, fD2) < fMin) { pCurr = it; - bPos = fD1 < fD2; - fMin = std::min(fD1, fD2); - if (fMin < fMinEps) // abort because next line already found + bPos = fD1 < fD2; + fMin = std::min(fD1, fD2); + if (fMin < fMinEps) { // abort because next line already found break; + } } } if (pCurr != cutLines.end()) { if (bPos) { - if (fMin > fMinEps) // gap, insert point + if (fMin > fMinEps) { // gap, insert point polyline.push_back(pCurr->first); + } polyline.push_back(pCurr->second); curr = pCurr->second; } else { - if (fMin > fMinEps) // gap, insert point + if (fMin > fMinEps) { // gap, insert point polyline.push_back(pCurr->second); + } polyline.push_back(pCurr->first); curr = pCurr->first; } @@ -128,8 +131,10 @@ bool MeshProjection::connectLines(std::list< std::pair& polyline) { @@ -152,15 +157,16 @@ bool MeshProjection::projectLineOnMesh(const MeshFacetGrid& grid, MeshGridIterator gridIter(grid); for (gridIter.Init(); gridIter.More(); gridIter.Next()) { // bbox cuts plane - if (bboxInsideRectangle(gridIter.GetBoundBox(), v1, v2, vd)) + if (bboxInsideRectangle(gridIter.GetBoundBox(), v1, v2, vd)) { gridIter.GetElements(facets); + } } std::sort(facets.begin(), facets.end()); facets.erase(std::unique(facets.begin(), facets.end()), facets.end()); // cut all facets with plane - std::list< std::pair > cutLine; + std::list> cutLine; for (FacetIndex facet : facets) { Base::Vector3f e1, e2; MeshGeomFacet tria = kernel.GetFacet(facet); @@ -168,30 +174,33 @@ bool MeshProjection::projectLineOnMesh(const MeshFacetGrid& grid, if (tria.IntersectWithPlane(base, normal, e1, e2)) { if ((facet != f1) && (facet != f2)) { // inside cut line - if (!isPointInsideDistance(v1, v2, e1) || - !isPointInsideDistance(v1, v2, e2)) { + if (!isPointInsideDistance(v1, v2, e1) || !isPointInsideDistance(v1, v2, e2)) { continue; } cutLine.emplace_back(e1, e2); } else { - if (facet == f1) { // start facet - if (((e2 - v1) * dir) > 0.0f) + if (facet == f1) { // start facet + if (((e2 - v1) * dir) > 0.0f) { cutLine.emplace_back(v1, e2); - else + } + else { cutLine.emplace_back(v1, e1); + } - //start = it - facets.begin(); + // start = it - facets.begin(); } - if (facet == f2) { // end facet - if (((e2 - v2) * -dir) > 0.0f) + if (facet == f2) { // end facet + if (((e2 - v2) * -dir) > 0.0f) { cutLine.emplace_back(v2, e2); - else + } + else { cutLine.emplace_back(v2, e1); + } - //end = it - facets.begin(); + // end = it - facets.begin(); } } } diff --git a/src/Mod/Mesh/App/Core/Projection.h b/src/Mod/Mesh/App/Core/Projection.h index dba05e0920..2ba5551301 100644 --- a/src/Mod/Mesh/App/Core/Projection.h +++ b/src/Mod/Mesh/App/Core/Projection.h @@ -23,8 +23,8 @@ #ifndef MESH_PROJECTION_H #define MESH_PROJECTION_H -#include #include +#include #include "Elements.h" @@ -48,19 +48,31 @@ class MeshExport MeshProjection public: explicit MeshProjection(const MeshKernel&); - bool projectLineOnMesh(const MeshFacetGrid& grid, const Base::Vector3f& p1, FacetIndex f1, - const Base::Vector3f& p2, FacetIndex f2, const Base::Vector3f& view, - std::vector& polyline); + bool projectLineOnMesh(const MeshFacetGrid& grid, + const Base::Vector3f& p1, + FacetIndex f1, + const Base::Vector3f& p2, + FacetIndex f2, + const Base::Vector3f& view, + std::vector& polyline); + protected: - bool bboxInsideRectangle (const Base::BoundBox3f& bbox, const Base::Vector3f& p1, const Base::Vector3f& p2, const Base::Vector3f& view) const; - bool isPointInsideDistance (const Base::Vector3f& p1, const Base::Vector3f& p2, const Base::Vector3f& pt) const; - bool connectLines(std::list< std::pair >& cutLines, const Base::Vector3f& startPoint, - const Base::Vector3f& endPoint, std::vector& polyline) const; + bool bboxInsideRectangle(const Base::BoundBox3f& bbox, + const Base::Vector3f& p1, + const Base::Vector3f& p2, + const Base::Vector3f& view) const; + bool isPointInsideDistance(const Base::Vector3f& p1, + const Base::Vector3f& p2, + const Base::Vector3f& pt) const; + bool connectLines(std::list>& cutLines, + const Base::Vector3f& startPoint, + const Base::Vector3f& endPoint, + std::vector& polyline) const; private: const MeshKernel& kernel; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_PROJECTION_H diff --git a/src/Mod/Mesh/App/Core/Segmentation.cpp b/src/Mod/Mesh/App/Core/Segmentation.cpp index df265d0359..dd4bde4e3b 100644 --- a/src/Mod/Mesh/App/Core/Segmentation.cpp +++ b/src/Mod/Mesh/App/Core/Segmentation.cpp @@ -25,15 +25,14 @@ #include #endif -#include "Segmentation.h" #include "Algorithm.h" #include "Approximation.h" +#include "Segmentation.h" using namespace MeshCore; void MeshSurfaceSegment::Initialize(FacetIndex) -{ -} +{} bool MeshSurfaceSegment::TestInitialFacet(FacetIndex) const { @@ -41,8 +40,7 @@ bool MeshSurfaceSegment::TestInitialFacet(FacetIndex) const } void MeshSurfaceSegment::AddFacet(const MeshFacet&) -{ -} +{} void MeshSurfaceSegment::AddSegment(const std::vector& segm) { @@ -53,9 +51,10 @@ void MeshSurfaceSegment::AddSegment(const std::vector& segm) MeshSegment MeshSurfaceSegment::FindSegment(FacetIndex index) const { - for (const auto & segment : segments) { - if (std::find(segment.begin(), segment.end(), index) != segment.end()) + for (const auto& segment : segments) { + if (std::find(segment.begin(), segment.end(), index) != segment.end()) { return segment; + } } return {}; @@ -63,10 +62,12 @@ MeshSegment MeshSurfaceSegment::FindSegment(FacetIndex index) const // -------------------------------------------------------- -MeshDistancePlanarSegment::MeshDistancePlanarSegment(const MeshKernel& mesh, unsigned long minFacets, float tol) - : MeshDistanceSurfaceSegment(mesh, minFacets, tol), fitter(new PlaneFit) -{ -} +MeshDistancePlanarSegment::MeshDistancePlanarSegment(const MeshKernel& mesh, + unsigned long minFacets, + float tol) + : MeshDistanceSurfaceSegment(mesh, minFacets, tol) + , fitter(new PlaneFit) +{} MeshDistancePlanarSegment::~MeshDistancePlanarSegment() { @@ -85,14 +86,16 @@ void MeshDistancePlanarSegment::Initialize(FacetIndex index) fitter->AddPoint(triangle._aclPoints[2]); } -bool MeshDistancePlanarSegment::TestFacet (const MeshFacet& face) const +bool MeshDistancePlanarSegment::TestFacet(const MeshFacet& face) const { - if (!fitter->Done()) + if (!fitter->Done()) { fitter->Fit(); + } MeshGeomFacet triangle = kernel.GetFacet(face); for (auto pnt : triangle._aclPoints) { - if (fabs(fitter->GetDistanceToPlane(pnt)) > tolerance) + if (fabs(fitter->GetDistanceToPlane(pnt)) > tolerance) { return false; + } } return true; @@ -108,15 +111,13 @@ void MeshDistancePlanarSegment::AddFacet(const MeshFacet& face) PlaneSurfaceFit::PlaneSurfaceFit() : fitter(new PlaneFit) -{ -} +{} PlaneSurfaceFit::PlaneSurfaceFit(const Base::Vector3f& b, const Base::Vector3f& n) : basepoint(b) , normal(n) , fitter(nullptr) -{ -} +{} PlaneSurfaceFit::~PlaneSurfaceFit() { @@ -145,32 +146,39 @@ bool PlaneSurfaceFit::TestTriangle(const MeshGeomFacet&) const void PlaneSurfaceFit::AddTriangle(const MeshCore::MeshGeomFacet& tria) { - if (fitter) + if (fitter) { fitter->AddPoint(tria.GetGravityPoint()); + } } bool PlaneSurfaceFit::Done() const { - if (!fitter) + if (!fitter) { return true; - else + } + else { return fitter->Done(); + } } float PlaneSurfaceFit::Fit() { - if (!fitter) + if (!fitter) { return 0; - else + } + else { return fitter->Fit(); + } } float PlaneSurfaceFit::GetDistanceToSurface(const Base::Vector3f& pnt) const { - if (!fitter) + if (!fitter) { return pnt.DistanceToPlane(basepoint, normal); - else + } + else { return fitter->GetDistanceToPlane(pnt); + } } std::vector PlaneSurfaceFit::Parameters() const @@ -197,7 +205,7 @@ std::vector PlaneSurfaceFit::Parameters() const CylinderSurfaceFit::CylinderSurfaceFit() : fitter(new CylinderFit) { - axis.Set(0,0,0); + axis.Set(0, 0, 0); radius = FLOAT_MAX; } @@ -210,8 +218,7 @@ CylinderSurfaceFit::CylinderSurfaceFit(const Base::Vector3f& b, const Base::Vect , axis(a) , radius(r) , fitter(nullptr) -{ -} +{} CylinderSurfaceFit::~CylinderSurfaceFit() { @@ -256,8 +263,9 @@ bool CylinderSurfaceFit::Done() const float CylinderSurfaceFit::Fit() { - if (!fitter) + if (!fitter) { return 0; + } float fit = fitter->Fit(); if (fit < FLOAT_MAX) { @@ -305,7 +313,7 @@ std::vector CylinderSurfaceFit::Parameters() const SphereSurfaceFit::SphereSurfaceFit() : fitter(new SphereFit) { - center.Set(0,0,0); + center.Set(0, 0, 0); radius = FLOAT_MAX; } @@ -313,9 +321,7 @@ SphereSurfaceFit::SphereSurfaceFit(const Base::Vector3f& c, float r) : center(c) , radius(r) , fitter(nullptr) -{ - -} +{} SphereSurfaceFit::~SphereSurfaceFit() { @@ -358,8 +364,9 @@ bool SphereSurfaceFit::Done() const float SphereSurfaceFit::Fit() { - if (!fitter) + if (!fitter) { return 0; + } float fit = fitter->Fit(); if (fit < FLOAT_MAX) { @@ -398,10 +405,9 @@ MeshDistanceGenericSurfaceFitSegment::MeshDistanceGenericSurfaceFitSegment(Abstr const MeshKernel& mesh, unsigned long minFacets, float tol) - : MeshDistanceSurfaceSegment(mesh, minFacets, tol) - , fitter(fit) -{ -} + : MeshDistanceSurfaceSegment(mesh, minFacets, tol) + , fitter(fit) +{} MeshDistanceGenericSurfaceFitSegment::~MeshDistanceGenericSurfaceFitSegment() { @@ -418,20 +424,23 @@ bool MeshDistanceGenericSurfaceFitSegment::TestInitialFacet(FacetIndex index) co { MeshGeomFacet triangle = kernel.GetFacet(index); for (auto pnt : triangle._aclPoints) { - if (fabs(fitter->GetDistanceToSurface(pnt)) > tolerance) + if (fabs(fitter->GetDistanceToSurface(pnt)) > tolerance) { return false; + } } return fitter->TestTriangle(triangle); } -bool MeshDistanceGenericSurfaceFitSegment::TestFacet (const MeshFacet& face) const +bool MeshDistanceGenericSurfaceFitSegment::TestFacet(const MeshFacet& face) const { - if (!fitter->Done()) + if (!fitter->Done()) { fitter->Fit(); + } MeshGeomFacet triangle = kernel.GetFacet(face); for (auto ptIndex : triangle._aclPoints) { - if (fabs(fitter->GetDistanceToSurface(ptIndex)) > tolerance) + if (fabs(fitter->GetDistanceToSurface(ptIndex)) > tolerance) { return false; + } } return fitter->TestTriangle(triangle); @@ -450,60 +459,69 @@ std::vector MeshDistanceGenericSurfaceFitSegment::Parameters() const // -------------------------------------------------------- -bool MeshCurvaturePlanarSegment::TestFacet (const MeshFacet &rclFacet) const +bool MeshCurvaturePlanarSegment::TestFacet(const MeshFacet& rclFacet) const { for (PointIndex ptIndex : rclFacet._aulPoints) { const CurvatureInfo& ci = info[ptIndex]; - if (fabs(ci.fMinCurvature) > tolerance) + if (fabs(ci.fMinCurvature) > tolerance) { return false; - if (fabs(ci.fMaxCurvature) > tolerance) + } + if (fabs(ci.fMaxCurvature) > tolerance) { return false; + } } return true; } -bool MeshCurvatureCylindricalSegment::TestFacet (const MeshFacet &rclFacet) const +bool MeshCurvatureCylindricalSegment::TestFacet(const MeshFacet& rclFacet) const { for (PointIndex ptIndex : rclFacet._aulPoints) { const CurvatureInfo& ci = info[ptIndex]; float fMax = std::max(fabs(ci.fMaxCurvature), fabs(ci.fMinCurvature)); float fMin = std::min(fabs(ci.fMaxCurvature), fabs(ci.fMinCurvature)); - if (fMin > toleranceMin) + if (fMin > toleranceMin) { return false; - if (fabs(fMax - curvature) > toleranceMax) + } + if (fabs(fMax - curvature) > toleranceMax) { return false; + } } return true; } -bool MeshCurvatureSphericalSegment::TestFacet (const MeshFacet &rclFacet) const +bool MeshCurvatureSphericalSegment::TestFacet(const MeshFacet& rclFacet) const { for (PointIndex ptIndex : rclFacet._aulPoints) { const CurvatureInfo& ci = info[ptIndex]; - if (ci.fMaxCurvature * ci.fMinCurvature < 0) + if (ci.fMaxCurvature * ci.fMinCurvature < 0) { return false; + } float diff; diff = fabs(ci.fMinCurvature) - curvature; - if (fabs(diff) > tolerance) + if (fabs(diff) > tolerance) { return false; + } diff = fabs(ci.fMaxCurvature) - curvature; - if (fabs(diff) > tolerance) + if (fabs(diff) > tolerance) { return false; + } } return true; } -bool MeshCurvatureFreeformSegment::TestFacet (const MeshFacet &rclFacet) const +bool MeshCurvatureFreeformSegment::TestFacet(const MeshFacet& rclFacet) const { for (PointIndex ptIndex : rclFacet._aulPoints) { const CurvatureInfo& ci = info[ptIndex]; - if (fabs(ci.fMinCurvature-c2) > toleranceMin) + if (fabs(ci.fMinCurvature - c2) > toleranceMin) { return false; - if (fabs(ci.fMaxCurvature-c1) > toleranceMax) + } + if (fabs(ci.fMaxCurvature - c1) > toleranceMax) { return false; + } } return true; @@ -511,19 +529,24 @@ bool MeshCurvatureFreeformSegment::TestFacet (const MeshFacet &rclFacet) const // -------------------------------------------------------- -MeshSurfaceVisitor::MeshSurfaceVisitor (MeshSurfaceSegment& segm, std::vector &indices) - : indices(indices), segm(segm) -{ -} +MeshSurfaceVisitor::MeshSurfaceVisitor(MeshSurfaceSegment& segm, std::vector& indices) + : indices(indices) + , segm(segm) +{} -bool MeshSurfaceVisitor::AllowVisit (const MeshFacet& face, const MeshFacet&, - FacetIndex, unsigned long, unsigned short) +bool MeshSurfaceVisitor::AllowVisit(const MeshFacet& face, + const MeshFacet&, + FacetIndex, + unsigned long, + unsigned short) { return segm.TestFacet(face); } -bool MeshSurfaceVisitor::Visit (const MeshFacet & face, const MeshFacet &, - FacetIndex ulFInd, unsigned long) +bool MeshSurfaceVisitor::Visit(const MeshFacet& face, + const MeshFacet&, + FacetIndex ulFInd, + unsigned long) { indices.push_back(ulFInd); segm.AddFacet(face); @@ -548,7 +571,7 @@ void MeshSegmentAlgorithm::FindSegments(std::vector& segm cAlgo.CountFacetFlag(MeshCore::MeshFacet::VISIT); std::vector resetVisited; - for (auto & it : segm) { + for (auto& it : segm) { cAlgo.ResetFacetsFlag(resetVisited, MeshCore::MeshFacet::VISIT); resetVisited.clear(); @@ -556,16 +579,19 @@ void MeshSegmentAlgorithm::FindSegments(std::vector& segm iCur = std::find_if(iBeg, iEnd, [flag](const MeshFacet& f) { return flag(f, MeshFacet::VISIT); }); - if (iCur < iEnd) + if (iCur < iEnd) { startFacet = iCur - iBeg; - else + } + else { startFacet = FACET_INDEX_MAX; + } while (startFacet != FACET_INDEX_MAX) { // collect all facets of the same geometry std::vector indices; it->Initialize(startFacet); - if (it->TestInitialFacet(startFacet)) + if (it->TestInitialFacet(startFacet)) { indices.push_back(startFacet); + } MeshSurfaceVisitor pv(*it, indices); myKernel.VisitNeighbourFacets(pv, startFacet); @@ -581,10 +607,12 @@ void MeshSegmentAlgorithm::FindSegments(std::vector& segm iCur = std::find_if(iCur, iEnd, [flag](const MeshFacet& f) { return flag(f, MeshFacet::VISIT); }); - if (iCur < iEnd) + if (iCur < iEnd) { startFacet = iCur - iBeg; - else + } + else { startFacet = FACET_INDEX_MAX; + } } } } diff --git a/src/Mod/Mesh/App/Core/Segmentation.h b/src/Mod/Mesh/App/Core/Segmentation.h index 1941770a51..ad7fe653e2 100644 --- a/src/Mod/Mesh/App/Core/Segmentation.h +++ b/src/Mod/Mesh/App/Core/Segmentation.h @@ -31,7 +31,8 @@ #include "Visitor.h" -namespace MeshCore { +namespace MeshCore +{ class PlaneFit; class CylinderFit; @@ -43,15 +44,19 @@ class MeshExport MeshSurfaceSegment { public: explicit MeshSurfaceSegment(unsigned long minFacets) - : minFacets(minFacets) {} + : minFacets(minFacets) + {} virtual ~MeshSurfaceSegment() = default; - virtual bool TestFacet (const MeshFacet &rclFacet) const = 0; + virtual bool TestFacet(const MeshFacet& rclFacet) const = 0; virtual const char* GetType() const = 0; virtual void Initialize(FacetIndex); virtual bool TestInitialFacet(FacetIndex) const; virtual void AddFacet(const MeshFacet& rclFacet); void AddSegment(const std::vector&); - const std::vector& GetSegments() const { return segments; } + const std::vector& GetSegments() const + { + return segments; + } MeshSegment FindSegment(FacetIndex) const; protected: @@ -62,24 +67,30 @@ using MeshSurfaceSegmentPtr = std::shared_ptr; // -------------------------------------------------------- -class MeshExport MeshDistanceSurfaceSegment : public MeshSurfaceSegment +class MeshExport MeshDistanceSurfaceSegment: public MeshSurfaceSegment { public: MeshDistanceSurfaceSegment(const MeshKernel& mesh, unsigned long minFacets, float tol) - : MeshSurfaceSegment(minFacets), kernel(mesh), tolerance(tol) {} + : MeshSurfaceSegment(minFacets) + , kernel(mesh) + , tolerance(tol) + {} protected: const MeshKernel& kernel; float tolerance; }; -class MeshExport MeshDistancePlanarSegment : public MeshDistanceSurfaceSegment +class MeshExport MeshDistancePlanarSegment: public MeshDistanceSurfaceSegment { public: MeshDistancePlanarSegment(const MeshKernel& mesh, unsigned long minFacets, float tol); ~MeshDistancePlanarSegment() override; - bool TestFacet (const MeshFacet& rclFacet) const override; - const char* GetType() const override { return "Plane"; } + bool TestFacet(const MeshFacet& rclFacet) const override; + const char* GetType() const override + { + return "Plane"; + } void Initialize(FacetIndex) override; void AddFacet(const MeshFacet& rclFacet) override; @@ -104,13 +115,16 @@ public: virtual std::vector Parameters() const = 0; }; -class MeshExport PlaneSurfaceFit : public AbstractSurfaceFit +class MeshExport PlaneSurfaceFit: public AbstractSurfaceFit { public: PlaneSurfaceFit(); PlaneSurfaceFit(const Base::Vector3f& b, const Base::Vector3f& n); ~PlaneSurfaceFit() override; - const char* GetType() const override { return "Plane"; } + const char* GetType() const override + { + return "Plane"; + } void Initialize(const MeshGeomFacet&) override; bool TestTriangle(const MeshGeomFacet&) const override; void AddTriangle(const MeshGeomFacet&) override; @@ -125,13 +139,16 @@ private: PlaneFit* fitter; }; -class MeshExport CylinderSurfaceFit : public AbstractSurfaceFit +class MeshExport CylinderSurfaceFit: public AbstractSurfaceFit { public: CylinderSurfaceFit(); CylinderSurfaceFit(const Base::Vector3f& b, const Base::Vector3f& a, float r); ~CylinderSurfaceFit() override; - const char* GetType() const override { return "Cylinder"; } + const char* GetType() const override + { + return "Cylinder"; + } void Initialize(const MeshGeomFacet&) override; bool TestTriangle(const MeshGeomFacet&) const override; void AddTriangle(const MeshGeomFacet&) override; @@ -147,13 +164,16 @@ private: CylinderFit* fitter; }; -class MeshExport SphereSurfaceFit : public AbstractSurfaceFit +class MeshExport SphereSurfaceFit: public AbstractSurfaceFit { public: SphereSurfaceFit(); SphereSurfaceFit(const Base::Vector3f& c, float r); ~SphereSurfaceFit() override; - const char* GetType() const override { return "Sphere"; } + const char* GetType() const override + { + return "Sphere"; + } void Initialize(const MeshGeomFacet&) override; bool TestTriangle(const MeshGeomFacet&) const override; void AddTriangle(const MeshGeomFacet&) override; @@ -168,14 +188,19 @@ private: SphereFit* fitter; }; -class MeshExport MeshDistanceGenericSurfaceFitSegment : public MeshDistanceSurfaceSegment +class MeshExport MeshDistanceGenericSurfaceFitSegment: public MeshDistanceSurfaceSegment { public: - MeshDistanceGenericSurfaceFitSegment(AbstractSurfaceFit*, const MeshKernel& mesh, - unsigned long minFacets, float tol); + MeshDistanceGenericSurfaceFitSegment(AbstractSurfaceFit*, + const MeshKernel& mesh, + unsigned long minFacets, + float tol); ~MeshDistanceGenericSurfaceFitSegment() override; - bool TestFacet (const MeshFacet& rclFacet) const override; - const char* GetType() const override { return fitter->GetType(); } + bool TestFacet(const MeshFacet& rclFacet) const override; + const char* GetType() const override + { + return fitter->GetType(); + } void Initialize(FacetIndex) override; bool TestInitialFacet(FacetIndex) const override; void AddFacet(const MeshFacet& rclFacet) override; @@ -187,36 +212,56 @@ protected: // -------------------------------------------------------- -class MeshExport MeshCurvatureSurfaceSegment : public MeshSurfaceSegment +class MeshExport MeshCurvatureSurfaceSegment: public MeshSurfaceSegment { public: MeshCurvatureSurfaceSegment(const std::vector& ci, unsigned long minFacets) - : MeshSurfaceSegment(minFacets), info(ci) {} + : MeshSurfaceSegment(minFacets) + , info(ci) + {} protected: const std::vector& info; }; -class MeshExport MeshCurvaturePlanarSegment : public MeshCurvatureSurfaceSegment +class MeshExport MeshCurvaturePlanarSegment: public MeshCurvatureSurfaceSegment { public: - MeshCurvaturePlanarSegment(const std::vector& ci, unsigned long minFacets, float tol) - : MeshCurvatureSurfaceSegment(ci, minFacets), tolerance(tol) {} - bool TestFacet (const MeshFacet &rclFacet) const override; - const char* GetType() const override { return "Plane"; } + MeshCurvaturePlanarSegment(const std::vector& ci, + unsigned long minFacets, + float tol) + : MeshCurvatureSurfaceSegment(ci, minFacets) + , tolerance(tol) + {} + bool TestFacet(const MeshFacet& rclFacet) const override; + const char* GetType() const override + { + return "Plane"; + } private: float tolerance; }; -class MeshExport MeshCurvatureCylindricalSegment : public MeshCurvatureSurfaceSegment +class MeshExport MeshCurvatureCylindricalSegment: public MeshCurvatureSurfaceSegment { public: - MeshCurvatureCylindricalSegment(const std::vector& ci, unsigned long minFacets, - float tolMin, float tolMax, float curv) - : MeshCurvatureSurfaceSegment(ci, minFacets), toleranceMin(tolMin), toleranceMax(tolMax) { curvature = curv;} - bool TestFacet (const MeshFacet &rclFacet) const override; - const char* GetType() const override { return "Cylinder"; } + MeshCurvatureCylindricalSegment(const std::vector& ci, + unsigned long minFacets, + float tolMin, + float tolMax, + float curv) + : MeshCurvatureSurfaceSegment(ci, minFacets) + , toleranceMin(tolMin) + , toleranceMax(tolMax) + { + curvature = curv; + } + bool TestFacet(const MeshFacet& rclFacet) const override; + const char* GetType() const override + { + return "Cylinder"; + } private: float curvature; @@ -224,28 +269,49 @@ private: float toleranceMax; }; -class MeshExport MeshCurvatureSphericalSegment : public MeshCurvatureSurfaceSegment +class MeshExport MeshCurvatureSphericalSegment: public MeshCurvatureSurfaceSegment { public: - MeshCurvatureSphericalSegment(const std::vector& ci, unsigned long minFacets, float tol, float curv) - : MeshCurvatureSurfaceSegment(ci, minFacets), tolerance(tol) { curvature = curv;} - bool TestFacet (const MeshFacet &rclFacet) const override; - const char* GetType() const override { return "Sphere"; } + MeshCurvatureSphericalSegment(const std::vector& ci, + unsigned long minFacets, + float tol, + float curv) + : MeshCurvatureSurfaceSegment(ci, minFacets) + , tolerance(tol) + { + curvature = curv; + } + bool TestFacet(const MeshFacet& rclFacet) const override; + const char* GetType() const override + { + return "Sphere"; + } private: float curvature; float tolerance; }; -class MeshExport MeshCurvatureFreeformSegment : public MeshCurvatureSurfaceSegment +class MeshExport MeshCurvatureFreeformSegment: public MeshCurvatureSurfaceSegment { public: - MeshCurvatureFreeformSegment(const std::vector& ci, unsigned long minFacets, - float tolMin, float tolMax, float c1, float c2) - : MeshCurvatureSurfaceSegment(ci, minFacets), c1(c1), c2(c2), - toleranceMin(tolMin), toleranceMax(tolMax) {} - bool TestFacet (const MeshFacet &rclFacet) const override; - const char* GetType() const override { return "Freeform"; } + MeshCurvatureFreeformSegment(const std::vector& ci, + unsigned long minFacets, + float tolMin, + float tolMax, + float c1, + float c2) + : MeshCurvatureSurfaceSegment(ci, minFacets) + , c1(c1) + , c2(c2) + , toleranceMin(tolMin) + , toleranceMax(tolMax) + {} + bool TestFacet(const MeshFacet& rclFacet) const override; + const char* GetType() const override + { + return "Freeform"; + } private: float c1, c2; @@ -253,30 +319,34 @@ private: float toleranceMax; }; -class MeshExport MeshSurfaceVisitor : public MeshFacetVisitor +class MeshExport MeshSurfaceVisitor: public MeshFacetVisitor { public: - MeshSurfaceVisitor (MeshSurfaceSegment& segm, std::vector &indices); - bool AllowVisit (const MeshFacet& face, const MeshFacet&, - FacetIndex, unsigned long, unsigned short neighbourIndex) override; - bool Visit (const MeshFacet & face, const MeshFacet &, - FacetIndex ulFInd, unsigned long) override; + MeshSurfaceVisitor(MeshSurfaceSegment& segm, std::vector& indices); + bool AllowVisit(const MeshFacet& face, + const MeshFacet&, + FacetIndex, + unsigned long, + unsigned short neighbourIndex) override; + bool Visit(const MeshFacet& face, const MeshFacet&, FacetIndex ulFInd, unsigned long) override; protected: - std::vector &indices; + std::vector& indices; MeshSurfaceSegment& segm; }; class MeshExport MeshSegmentAlgorithm { public: - explicit MeshSegmentAlgorithm(const MeshKernel& kernel) : myKernel(kernel) {} + explicit MeshSegmentAlgorithm(const MeshKernel& kernel) + : myKernel(kernel) + {} void FindSegments(std::vector&); private: const MeshKernel& myKernel; }; -} // MeshCore +} // namespace MeshCore -#endif // MESHCORE_SEGMENTATION_H +#endif // MESHCORE_SEGMENTATION_H diff --git a/src/Mod/Mesh/App/Core/SetOperations.cpp b/src/Mod/Mesh/App/Core/SetOperations.cpp index 2c8671864e..2819b18b81 100644 --- a/src/Mod/Mesh/App/Core/SetOperations.cpp +++ b/src/Mod/Mesh/App/Core/SetOperations.cpp @@ -23,20 +23,20 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include #include -#include "SetOperations.h" #include "Algorithm.h" #include "Builder.h" #include "Definitions.h" #include "Elements.h" #include "Grid.h" #include "Iterator.h" +#include "SetOperations.h" #include "Triangulation.h" #include "Visitor.h" @@ -45,458 +45,451 @@ using namespace Base; using namespace MeshCore; -SetOperations::SetOperations (const MeshKernel &cutMesh1, const MeshKernel &cutMesh2, MeshKernel &result, OperationType opType, float minDistanceToPoint) -: _cutMesh0(cutMesh1), - _cutMesh1(cutMesh2), - _resultMesh(result), - _operationType(opType), - _minDistanceToPoint(minDistanceToPoint) +SetOperations::SetOperations(const MeshKernel& cutMesh1, + const MeshKernel& cutMesh2, + MeshKernel& result, + OperationType opType, + float minDistanceToPoint) + : _cutMesh0(cutMesh1) + , _cutMesh1(cutMesh2) + , _resultMesh(result) + , _operationType(opType) + , _minDistanceToPoint(minDistanceToPoint) +{} + +void SetOperations::Do() { -} + _minDistanceToPoint = 0.000001f; + float saveMinMeshDistance = MeshDefinitions::_fMinPointDistance; + MeshDefinitions::SetMinPointDistance(0.000001f); -void SetOperations::Do () -{ - _minDistanceToPoint = 0.000001f; - float saveMinMeshDistance = MeshDefinitions::_fMinPointDistance; - MeshDefinitions::SetMinPointDistance(0.000001f); + // Base::Sequencer().start("set operation", 5); -// Base::Sequencer().start("set operation", 5); + // _builder.clear(); - // _builder.clear(); + // Base::Sequencer().next(); + std::set facetsCuttingEdge0, facetsCuttingEdge1; + Cut(facetsCuttingEdge0, facetsCuttingEdge1); - //Base::Sequencer().next(); - std::set facetsCuttingEdge0, facetsCuttingEdge1; - Cut(facetsCuttingEdge0, facetsCuttingEdge1); + // no intersection curve of the meshes found + if (facetsCuttingEdge0.empty() || facetsCuttingEdge1.empty()) { + switch (_operationType) { + case Union: { + _resultMesh = _cutMesh0; + _resultMesh.Merge(_cutMesh1); + } break; + case Intersect: { + _resultMesh.Clear(); + } break; + case Difference: + case Inner: + case Outer: { + _resultMesh = _cutMesh0; + } break; + default: { + _resultMesh.Clear(); + break; + } + } - // no intersection curve of the meshes found - if (facetsCuttingEdge0.empty() || facetsCuttingEdge1.empty()) - { - switch (_operationType) - { - case Union: - { - _resultMesh = _cutMesh0; - _resultMesh.Merge(_cutMesh1); - } break; - case Intersect: - { - _resultMesh.Clear(); - } break; - case Difference: - case Inner: - case Outer: - { - _resultMesh = _cutMesh0; - } break; - default: - { - _resultMesh.Clear(); - break; - } + MeshDefinitions::SetMinPointDistance(saveMinMeshDistance); + return; } + unsigned long i; + for (i = 0; i < _cutMesh0.CountFacets(); i++) { + if (facetsCuttingEdge0.find(i) == facetsCuttingEdge0.end()) { + _newMeshFacets[0].push_back(_cutMesh0.GetFacet(i)); + } + } + + for (i = 0; i < _cutMesh1.CountFacets(); i++) { + if (facetsCuttingEdge1.find(i) == facetsCuttingEdge1.end()) { + _newMeshFacets[1].push_back(_cutMesh1.GetFacet(i)); + } + } + + // Base::Sequencer().next(); + TriangulateMesh(_cutMesh0, 0); + + // Base::Sequencer().next(); + TriangulateMesh(_cutMesh1, 1); + + float mult0, mult1; + switch (_operationType) { + case Union: + mult0 = -1.0f; + mult1 = -1.0f; + break; + case Intersect: + mult0 = 1.0f; + mult1 = 1.0f; + break; + case Difference: + mult0 = -1.0f; + mult1 = 1.0f; + break; + case Inner: + mult0 = 1.0f; + mult1 = 0.0f; + break; + case Outer: + mult0 = -1.0f; + mult1 = 0.0f; + break; + default: + mult0 = 0.0f; + mult1 = 0.0f; + break; + } + + // Base::Sequencer().next(); + CollectFacets(0, mult0); + // Base::Sequencer().next(); + CollectFacets(1, mult1); + + std::vector facets; + + std::vector::iterator itf; + for (itf = _facetsOf[0].begin(); itf != _facetsOf[0].end(); ++itf) { + if (_operationType == Difference) { // toggle normal + std::swap(itf->_aclPoints[0], itf->_aclPoints[1]); + itf->CalcNormal(); + } + + facets.push_back(*itf); + } + + for (itf = _facetsOf[1].begin(); itf != _facetsOf[1].end(); ++itf) { + facets.push_back(*itf); + } + + _resultMesh = facets; + + // Base::Sequencer().stop(); + // _builder.saveToFile("c:/temp/vdbg.iv"); + MeshDefinitions::SetMinPointDistance(saveMinMeshDistance); - return; - } - - unsigned long i; - for (i = 0; i < _cutMesh0.CountFacets(); i++) - { - if (facetsCuttingEdge0.find(i) == facetsCuttingEdge0.end()) - _newMeshFacets[0].push_back(_cutMesh0.GetFacet(i)); - } - - for (i = 0; i < _cutMesh1.CountFacets(); i++) - { - if (facetsCuttingEdge1.find(i) == facetsCuttingEdge1.end()) - _newMeshFacets[1].push_back(_cutMesh1.GetFacet(i)); - } - - //Base::Sequencer().next(); - TriangulateMesh(_cutMesh0, 0); - - //Base::Sequencer().next(); - TriangulateMesh(_cutMesh1, 1); - - float mult0, mult1; - switch (_operationType) - { - case Union: mult0 = -1.0f; mult1 = -1.0f; break; - case Intersect: mult0 = 1.0f; mult1 = 1.0f; break; - case Difference: mult0 = -1.0f; mult1 = 1.0f; break; - case Inner: mult0 = 1.0f; mult1 = 0.0f; break; - case Outer: mult0 = -1.0f; mult1 = 0.0f; break; - default: mult0 = 0.0f; mult1 = 0.0f; break; - } - - //Base::Sequencer().next(); - CollectFacets(0, mult0); - //Base::Sequencer().next(); - CollectFacets(1, mult1); - - std::vector facets; - - std::vector::iterator itf; - for (itf = _facetsOf[0].begin(); itf != _facetsOf[0].end(); ++itf) - { - if (_operationType == Difference) - { // toggle normal - std::swap(itf->_aclPoints[0], itf->_aclPoints[1]); - itf->CalcNormal(); - } - - facets.push_back(*itf); - } - - for (itf = _facetsOf[1].begin(); itf != _facetsOf[1].end(); ++itf) - { - facets.push_back(*itf); - } - - _resultMesh = facets; - - //Base::Sequencer().stop(); - // _builder.saveToFile("c:/temp/vdbg.iv"); - - MeshDefinitions::SetMinPointDistance(saveMinMeshDistance); } -void SetOperations::Cut (std::set& facetsCuttingEdge0, std::set& facetsCuttingEdge1) +void SetOperations::Cut(std::set& facetsCuttingEdge0, + std::set& facetsCuttingEdge1) { - MeshFacetGrid grid1(_cutMesh0, 20); - MeshFacetGrid grid2(_cutMesh1, 20); + MeshFacetGrid grid1(_cutMesh0, 20); + MeshFacetGrid grid2(_cutMesh1, 20); - unsigned long ctGx1, ctGy1, ctGz1; - grid1.GetCtGrids(ctGx1, ctGy1, ctGz1); + unsigned long ctGx1, ctGy1, ctGz1; + grid1.GetCtGrids(ctGx1, ctGy1, ctGz1); - unsigned long gx1; - for (gx1 = 0; gx1 < ctGx1; gx1++) - { - unsigned long gy1; - for (gy1 = 0; gy1 < ctGy1; gy1++) - { - unsigned long gz1; - for (gz1 = 0; gz1 < ctGz1; gz1++) - { - if (grid1.GetCtElements(gx1, gy1, gz1) > 0) - { - std::vector vecFacets2; - grid2.Inside(grid1.GetBoundBox(gx1, gy1, gz1), vecFacets2); + unsigned long gx1; + for (gx1 = 0; gx1 < ctGx1; gx1++) { + unsigned long gy1; + for (gy1 = 0; gy1 < ctGy1; gy1++) { + unsigned long gz1; + for (gz1 = 0; gz1 < ctGz1; gz1++) { + if (grid1.GetCtElements(gx1, gy1, gz1) > 0) { + std::vector vecFacets2; + grid2.Inside(grid1.GetBoundBox(gx1, gy1, gz1), vecFacets2); - if (!vecFacets2.empty()) - { - std::set vecFacets1; - grid1.GetElements(gx1, gy1, gz1, vecFacets1); + if (!vecFacets2.empty()) { + std::set vecFacets1; + grid1.GetElements(gx1, gy1, gz1, vecFacets1); - std::set::iterator it1; - for (it1 = vecFacets1.begin(); it1 != vecFacets1.end(); ++it1) - { - FacetIndex fidx1 = *it1; - MeshGeomFacet f1 = _cutMesh0.GetFacet(*it1); + std::set::iterator it1; + for (it1 = vecFacets1.begin(); it1 != vecFacets1.end(); ++it1) { + FacetIndex fidx1 = *it1; + MeshGeomFacet f1 = _cutMesh0.GetFacet(*it1); - std::vector::iterator it2; - for (it2 = vecFacets2.begin(); it2 != vecFacets2.end(); ++it2) - { - FacetIndex fidx2 = *it2; - MeshGeomFacet f2 = _cutMesh1.GetFacet(fidx2); + std::vector::iterator it2; + for (it2 = vecFacets2.begin(); it2 != vecFacets2.end(); ++it2) { + FacetIndex fidx2 = *it2; + MeshGeomFacet f2 = _cutMesh1.GetFacet(fidx2); - MeshPoint p0, p1; + MeshPoint p0, p1; - int isect = f1.IntersectWithFacet(f2, p0, p1); - if (isect > 0) - { - // optimize cut line if distance to nearest point is too small - float minDist1 = _minDistanceToPoint, minDist2 = _minDistanceToPoint; - MeshPoint np0 = p0, np1 = p1; - int i; - for (i = 0; i < 3; i++) - { - float d1 = (f1._aclPoints[i] - p0).Length(); - float d2 = (f1._aclPoints[i] - p1).Length(); - if (d1 < minDist1) - { - minDist1 = d1; - np0 = f1._aclPoints[i]; - } - if (d2 < minDist2) - { - minDist2 = d2; - p1 = f1._aclPoints[i]; - } - } // for (int i = 0; i < 3; i++) + int isect = f1.IntersectWithFacet(f2, p0, p1); + if (isect > 0) { + // optimize cut line if distance to nearest point is too small + float minDist1 = _minDistanceToPoint, + minDist2 = _minDistanceToPoint; + MeshPoint np0 = p0, np1 = p1; + int i; + for (i = 0; i < 3; i++) { + float d1 = (f1._aclPoints[i] - p0).Length(); + float d2 = (f1._aclPoints[i] - p1).Length(); + if (d1 < minDist1) { + minDist1 = d1; + np0 = f1._aclPoints[i]; + } + if (d2 < minDist2) { + minDist2 = d2; + p1 = f1._aclPoints[i]; + } + } // for (int i = 0; i < 3; i++) - // optimize cut line if distance to nearest point is too small - for (i = 0; i < 3; i++) - { - float d1 = (f2._aclPoints[i] - p0).Length(); - float d2 = (f2._aclPoints[i] - p1).Length(); - if (d1 < minDist1) - { - minDist1 = d1; - np0 = f2._aclPoints[i]; - } - if (d2 < minDist2) - { - minDist2 = d2; - np1 = f2._aclPoints[i]; - } - } // for (int i = 0; i < 3; i++) + // optimize cut line if distance to nearest point is too small + for (i = 0; i < 3; i++) { + float d1 = (f2._aclPoints[i] - p0).Length(); + float d2 = (f2._aclPoints[i] - p1).Length(); + if (d1 < minDist1) { + minDist1 = d1; + np0 = f2._aclPoints[i]; + } + if (d2 < minDist2) { + minDist2 = d2; + np1 = f2._aclPoints[i]; + } + } // for (int i = 0; i < 3; i++) - MeshPoint mp0 = np0; - MeshPoint mp1 = np1; + MeshPoint mp0 = np0; + MeshPoint mp1 = np1; - if (mp0 != mp1) - { - facetsCuttingEdge0.insert(fidx1); - facetsCuttingEdge1.insert(fidx2); + if (mp0 != mp1) { + facetsCuttingEdge0.insert(fidx1); + facetsCuttingEdge1.insert(fidx2); - _cutPoints.insert(mp0); - _cutPoints.insert(mp1); + _cutPoints.insert(mp0); + _cutPoints.insert(mp1); - std::pair::iterator, bool> pit0 = _cutPoints.insert(mp0); - std::pair::iterator, bool> pit1 = _cutPoints.insert(mp1); + std::pair::iterator, bool> pit0 = + _cutPoints.insert(mp0); + std::pair::iterator, bool> pit1 = + _cutPoints.insert(mp1); - _edges[Edge(mp0, mp1)] = EdgeInfo(); + _edges[Edge(mp0, mp1)] = EdgeInfo(); - _facet2points[0][fidx1].push_back(pit0.first); - _facet2points[0][fidx1].push_back(pit1.first); - _facet2points[1][fidx2].push_back(pit0.first); - _facet2points[1][fidx2].push_back(pit1.first); + _facet2points[0][fidx1].push_back(pit0.first); + _facet2points[0][fidx1].push_back(pit1.first); + _facet2points[1][fidx2].push_back(pit0.first); + _facet2points[1][fidx2].push_back(pit1.first); + } + else { + std::pair::iterator, bool> pit = + _cutPoints.insert(mp0); - } - else - { - std::pair::iterator, bool> pit = _cutPoints.insert(mp0); + // do not insert a facet when only one corner point cuts the + // edge if (!((mp0 == f1._aclPoints[0]) || (mp0 == + // f1._aclPoints[1]) || (mp0 == f1._aclPoints[2]))) + { + facetsCuttingEdge0.insert(fidx1); + _facet2points[0][fidx1].push_back(pit.first); + } - // do not insert a facet when only one corner point cuts the edge - // if (!((mp0 == f1._aclPoints[0]) || (mp0 == f1._aclPoints[1]) || (mp0 == f1._aclPoints[2]))) - { - facetsCuttingEdge0.insert(fidx1); - _facet2points[0][fidx1].push_back(pit.first); - } + // if (!((mp0 == f2._aclPoints[0]) || (mp0 == + // f2._aclPoints[1]) || (mp0 == f2._aclPoints[2]))) + { + facetsCuttingEdge1.insert(fidx2); + _facet2points[1][fidx2].push_back(pit.first); + } + } - // if (!((mp0 == f2._aclPoints[0]) || (mp0 == f2._aclPoints[1]) || (mp0 == f2._aclPoints[2]))) - { - facetsCuttingEdge1.insert(fidx2); - _facet2points[1][fidx2].push_back(pit.first); - } - } - - } // if (f1.IntersectWithFacet(f2, p0, p1)) - } // for (it2 = vecFacets2.begin(); it2 != vecFacets2.end(); ++it2) - } // for (it1 = vecFacets1.begin(); it1 != vecFacets1.end(); ++it1) - } // if (vecFacets2.size() > 0) - } // if (grid1.GetCtElements(gx1, gy1, gz1) > 0) - } // for (gz1 = 0; gz1 < ctGz1; gz1++) - } // for (gy1 = 0; gy1 < ctGy1; gy1++) - } // for (gx1 = 0; gx1 < ctGx1; gx1++) + } // if (f1.IntersectWithFacet(f2, p0, p1)) + } // for (it2 = vecFacets2.begin(); it2 != vecFacets2.end(); ++it2) + } // for (it1 = vecFacets1.begin(); it1 != vecFacets1.end(); ++it1) + } // if (vecFacets2.size() > 0) + } // if (grid1.GetCtElements(gx1, gy1, gz1) > 0) + } // for (gz1 = 0; gz1 < ctGz1; gz1++) + } // for (gy1 = 0; gy1 < ctGy1; gy1++) + } // for (gx1 = 0; gx1 < ctGx1; gx1++) } -void SetOperations::TriangulateMesh (const MeshKernel &cutMesh, int side) +void SetOperations::TriangulateMesh(const MeshKernel& cutMesh, int side) { - // Triangulate Mesh - std::map::iterator> >::iterator it1; - for (it1 = _facet2points[side].begin(); it1 != _facet2points[side].end(); ++it1) - { - std::vector points; - std::set pointsSet; + // Triangulate Mesh + std::map::iterator>>::iterator it1; + for (it1 = _facet2points[side].begin(); it1 != _facet2points[side].end(); ++it1) { + std::vector points; + std::set pointsSet; - FacetIndex fidx = it1->first; - MeshGeomFacet f = cutMesh.GetFacet(fidx); + FacetIndex fidx = it1->first; + MeshGeomFacet f = cutMesh.GetFacet(fidx); - //if (side == 1) - // _builder.addSingleTriangle(f._aclPoints[0], f._aclPoints[1], f._aclPoints[2], 3, 0, 1, 1); + // if (side == 1) + // _builder.addSingleTriangle(f._aclPoints[0], f._aclPoints[1], f._aclPoints[2], 3, 0, + // 1, 1); - // facet corner points - //const MeshFacet& mf = cutMesh._aclFacetArray[fidx]; - int i; - for (i = 0; i < 3; i++) - { - pointsSet.insert(f._aclPoints[i]); - points.push_back(f._aclPoints[i]); - } - - // triangulated facets - std::list::iterator>::iterator it2; - for (it2 = it1->second.begin(); it2 != it1->second.end(); ++it2) - { - if (pointsSet.find(*(*it2)) == pointsSet.end()) - { - pointsSet.insert(*(*it2)); - points.push_back(*(*it2)); - } - - } - - Vector3f normal = f.GetNormal(); - Vector3f base = points[0]; - Vector3f dirX = points[1] - points[0]; - dirX.Normalize(); - Vector3f dirY = dirX % normal; - - // project points to 2D plane - std::vector::iterator it; - std::vector vertices; - for (it = points.begin(); it != points.end(); ++it) - { - Vector3f pv = *it; - pv.TransformToCoordinateSystem(base, dirX, dirY); - vertices.push_back(pv); - } - - DelaunayTriangulator tria; - tria.SetPolygon(vertices); - tria.TriangulatePolygon(); - - std::vector facets = tria.GetFacets(); - for (auto & it : facets) - { - if ((it._aulPoints[0] == it._aulPoints[1]) || - (it._aulPoints[1] == it._aulPoints[2]) || - (it._aulPoints[2] == it._aulPoints[0])) - { // two same triangle corner points - continue; - } - - MeshGeomFacet facet(points[it._aulPoints[0]], - points[it._aulPoints[1]], - points[it._aulPoints[2]]); - - //if (side == 1) - // _builder.addSingleTriangle(facet._aclPoints[0], facet._aclPoints[1], facet._aclPoints[2], true, 3, 0, 1, 1); - - //if (facet.Area() < 0.0001f) - //{ // too small facet - // continue; - //} - - float dist0 = facet._aclPoints[0].DistanceToLine - (facet._aclPoints[1],facet._aclPoints[1] - facet._aclPoints[2]); - float dist1 = facet._aclPoints[1].DistanceToLine - (facet._aclPoints[0],facet._aclPoints[0] - facet._aclPoints[2]); - float dist2 = facet._aclPoints[2].DistanceToLine - (facet._aclPoints[0],facet._aclPoints[0] - facet._aclPoints[1]); - - if ((dist0 < _minDistanceToPoint) || - (dist1 < _minDistanceToPoint) || - (dist2 < _minDistanceToPoint)) - { - continue; - } - - //dist0 = (facet._aclPoints[0] - facet._aclPoints[1]).Length(); - //dist1 = (facet._aclPoints[1] - facet._aclPoints[2]).Length(); - //dist2 = (facet._aclPoints[2] - facet._aclPoints[3]).Length(); - - //if ((dist0 < _minDistanceToPoint) || (dist1 < _minDistanceToPoint) || (dist2 < _minDistanceToPoint)) - //{ - // continue; - //} - - facet.CalcNormal(); - if ((facet.GetNormal() * f.GetNormal()) < 0.0f) - { // adjust normal - std::swap(facet._aclPoints[0], facet._aclPoints[1]); - facet.CalcNormal(); - } - - - int j; - for (j = 0; j < 3; j++) - { - std::map::iterator eit = _edges.find(Edge(facet._aclPoints[j], facet._aclPoints[(j+1)%3])); - - if (eit != _edges.end()) - { - - if (eit->second.fcounter[side] < 2) - { - //if (side == 0) - // _builder.addSingleTriangle(facet._aclPoints[0], facet._aclPoints[1], facet._aclPoints[2], true, 3, 0, 1, 1); - - eit->second.facet[side] = fidx; - eit->second.facets[side][eit->second.fcounter[side]] = facet; - eit->second.fcounter[side]++; - facet.SetFlag(MeshFacet::MARKED); // set all facets connected to an edge: MARKED - - } + // facet corner points + // const MeshFacet& mf = cutMesh._aclFacetArray[fidx]; + int i; + for (i = 0; i < 3; i++) { + pointsSet.insert(f._aclPoints[i]); + points.push_back(f._aclPoints[i]); } - } - _newMeshFacets[side].push_back(facet); + // triangulated facets + std::list::iterator>::iterator it2; + for (it2 = it1->second.begin(); it2 != it1->second.end(); ++it2) { + if (pointsSet.find(*(*it2)) == pointsSet.end()) { + pointsSet.insert(*(*it2)); + points.push_back(*(*it2)); + } + } - } // for (i = 0; i < (out->numberoftriangles * 3); i += 3) - } // for (it1 = _facet2points[side].begin(); it1 != _facet2points[side].end(); ++it1) + Vector3f normal = f.GetNormal(); + Vector3f base = points[0]; + Vector3f dirX = points[1] - points[0]; + dirX.Normalize(); + Vector3f dirY = dirX % normal; + + // project points to 2D plane + std::vector::iterator it; + std::vector vertices; + for (it = points.begin(); it != points.end(); ++it) { + Vector3f pv = *it; + pv.TransformToCoordinateSystem(base, dirX, dirY); + vertices.push_back(pv); + } + + DelaunayTriangulator tria; + tria.SetPolygon(vertices); + tria.TriangulatePolygon(); + + std::vector facets = tria.GetFacets(); + for (auto& it : facets) { + if ((it._aulPoints[0] == it._aulPoints[1]) || (it._aulPoints[1] == it._aulPoints[2]) + || (it._aulPoints[2] == it._aulPoints[0])) { // two same triangle corner points + continue; + } + + MeshGeomFacet facet(points[it._aulPoints[0]], + points[it._aulPoints[1]], + points[it._aulPoints[2]]); + + // if (side == 1) + // _builder.addSingleTriangle(facet._aclPoints[0], facet._aclPoints[1], + // facet._aclPoints[2], true, 3, 0, 1, 1); + + // if (facet.Area() < 0.0001f) + //{ // too small facet + // continue; + // } + + float dist0 = + facet._aclPoints[0].DistanceToLine(facet._aclPoints[1], + facet._aclPoints[1] - facet._aclPoints[2]); + float dist1 = + facet._aclPoints[1].DistanceToLine(facet._aclPoints[0], + facet._aclPoints[0] - facet._aclPoints[2]); + float dist2 = + facet._aclPoints[2].DistanceToLine(facet._aclPoints[0], + facet._aclPoints[0] - facet._aclPoints[1]); + + if ((dist0 < _minDistanceToPoint) || (dist1 < _minDistanceToPoint) + || (dist2 < _minDistanceToPoint)) { + continue; + } + + // dist0 = (facet._aclPoints[0] - facet._aclPoints[1]).Length(); + // dist1 = (facet._aclPoints[1] - facet._aclPoints[2]).Length(); + // dist2 = (facet._aclPoints[2] - facet._aclPoints[3]).Length(); + + // if ((dist0 < _minDistanceToPoint) || (dist1 < _minDistanceToPoint) || (dist2 < + // _minDistanceToPoint)) + //{ + // continue; + // } + + facet.CalcNormal(); + if ((facet.GetNormal() * f.GetNormal()) < 0.0f) { // adjust normal + std::swap(facet._aclPoints[0], facet._aclPoints[1]); + facet.CalcNormal(); + } + + + int j; + for (j = 0; j < 3; j++) { + std::map::iterator eit = + _edges.find(Edge(facet._aclPoints[j], facet._aclPoints[(j + 1) % 3])); + + if (eit != _edges.end()) { + + if (eit->second.fcounter[side] < 2) { + // if (side == 0) + // _builder.addSingleTriangle(facet._aclPoints[0], facet._aclPoints[1], + // facet._aclPoints[2], true, 3, 0, 1, 1); + + eit->second.facet[side] = fidx; + eit->second.facets[side][eit->second.fcounter[side]] = facet; + eit->second.fcounter[side]++; + facet.SetFlag( + MeshFacet::MARKED); // set all facets connected to an edge: MARKED + } + } + } + + _newMeshFacets[side].push_back(facet); + + } // for (i = 0; i < (out->numberoftriangles * 3); i += 3) + } // for (it1 = _facet2points[side].begin(); it1 != _facet2points[side].end(); ++it1) } -void SetOperations::CollectFacets (int side, float mult) +void SetOperations::CollectFacets(int side, float mult) { - // float distSave = MeshDefinitions::_fMinPointDistance; - //MeshDefinitions::SetMinPointDistance(1.0e-4f); + // float distSave = MeshDefinitions::_fMinPointDistance; + // MeshDefinitions::SetMinPointDistance(1.0e-4f); - MeshKernel mesh; - MeshBuilder mb(mesh); - mb.Initialize(_newMeshFacets[side].size()); - std::vector::iterator it; - for (it = _newMeshFacets[side].begin(); it != _newMeshFacets[side].end(); ++it) - { - //if (it->IsFlag(MeshFacet::MARKED)) - //{ - // _builder.addSingleTriangle(it->_aclPoints[0], it->_aclPoints[1], it->_aclPoints[2], true, 3.0, 0.0, 1.0, 1.0); - //} - mb.AddFacet(*it, true); - } - mb.Finish(); - - MeshAlgorithm algo(mesh); - algo.ResetFacetFlag(static_cast(MeshFacet::VISIT | MeshFacet::TMP0)); - - // bool hasFacetsNotVisited = true; // until facets not visited - // search for facet not visited - MeshFacetArray::_TConstIterator itf; - const MeshFacetArray& rFacets = mesh.GetFacets(); - for (itf = rFacets.begin(); itf != rFacets.end(); ++itf) - { - if (!itf->IsFlag(MeshFacet::VISIT)) - { // Facet found, visit neighbours - std::vector facets; - facets.push_back(itf - rFacets.begin()); // add seed facet - CollectFacetVisitor visitor(mesh, facets, _edges, side, mult, _builder); - mesh.VisitNeighbourFacets(visitor, itf - rFacets.begin()); - - if (visitor._addFacets == 0) - { // mark all facets to add it to the result - algo.SetFacetsFlag(facets, MeshFacet::TMP0); - } + MeshKernel mesh; + MeshBuilder mb(mesh); + mb.Initialize(_newMeshFacets[side].size()); + std::vector::iterator it; + for (it = _newMeshFacets[side].begin(); it != _newMeshFacets[side].end(); ++it) { + // if (it->IsFlag(MeshFacet::MARKED)) + //{ + // _builder.addSingleTriangle(it->_aclPoints[0], it->_aclPoints[1], it->_aclPoints[2], + // true, 3.0, 0.0, 1.0, 1.0); + // } + mb.AddFacet(*it, true); } - } + mb.Finish(); - // add all facets to the result vector - for (itf = rFacets.begin(); itf != rFacets.end(); ++itf) - { - if (itf->IsFlag(MeshFacet::TMP0)) - { - _facetsOf[side].push_back(mesh.GetFacet(*itf)); + MeshAlgorithm algo(mesh); + algo.ResetFacetFlag(static_cast(MeshFacet::VISIT | MeshFacet::TMP0)); + + // bool hasFacetsNotVisited = true; // until facets not visited + // search for facet not visited + MeshFacetArray::_TConstIterator itf; + const MeshFacetArray& rFacets = mesh.GetFacets(); + for (itf = rFacets.begin(); itf != rFacets.end(); ++itf) { + if (!itf->IsFlag(MeshFacet::VISIT)) { // Facet found, visit neighbours + std::vector facets; + facets.push_back(itf - rFacets.begin()); // add seed facet + CollectFacetVisitor visitor(mesh, facets, _edges, side, mult, _builder); + mesh.VisitNeighbourFacets(visitor, itf - rFacets.begin()); + + if (visitor._addFacets == 0) { // mark all facets to add it to the result + algo.SetFacetsFlag(facets, MeshFacet::TMP0); + } + } } - } - // MeshDefinitions::SetMinPointDistance(distSave); + // add all facets to the result vector + for (itf = rFacets.begin(); itf != rFacets.end(); ++itf) { + if (itf->IsFlag(MeshFacet::TMP0)) { + _facetsOf[side].push_back(mesh.GetFacet(*itf)); + } + } + + // MeshDefinitions::SetMinPointDistance(distSave); } -SetOperations::CollectFacetVisitor::CollectFacetVisitor (const MeshKernel& mesh, std::vector& facets, - std::map& edges, int side, float mult, - Base::Builder3D& builder) - : _facets(facets) - , _mesh(mesh) - , _edges(edges) - , _side(side) - , _mult(mult) - , _builder(builder) -{ -} +SetOperations::CollectFacetVisitor::CollectFacetVisitor(const MeshKernel& mesh, + std::vector& facets, + std::map& edges, + int side, + float mult, + Base::Builder3D& builder) + : _facets(facets) + , _mesh(mesh) + , _edges(edges) + , _side(side) + , _mult(mult) + , _builder(builder) +{} -bool SetOperations::CollectFacetVisitor::Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, - FacetIndex ulFInd, unsigned long ulLevel) +bool SetOperations::CollectFacetVisitor::Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) { (void)rclFacet; (void)rclFrom; @@ -505,16 +498,19 @@ bool SetOperations::CollectFacetVisitor::Visit (const MeshFacet &rclFacet, const return true; } -//static int matchCounter = 0; -bool SetOperations::CollectFacetVisitor::AllowVisit (const MeshFacet& rclFacet, const MeshFacet& rclFrom, - FacetIndex ulFInd, unsigned long ulLevel, - unsigned short neighbourIndex) +// static int matchCounter = 0; +bool SetOperations::CollectFacetVisitor::AllowVisit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel, + unsigned short neighbourIndex) { (void)ulFInd; (void)ulLevel; if (rclFacet.IsFlag(MeshFacet::MARKED) && rclFrom.IsFlag(MeshFacet::MARKED)) { // facet connected to an edge - PointIndex pt0 = rclFrom._aulPoints[neighbourIndex], pt1 = rclFrom._aulPoints[(neighbourIndex+1)%3]; + PointIndex pt0 = rclFrom._aulPoints[neighbourIndex], + pt1 = rclFrom._aulPoints[(neighbourIndex + 1) % 3]; Edge edge(_mesh.GetPoint(pt0), _mesh.GetPoint(pt1)); std::map::iterator it = _edges.find(edge); @@ -522,35 +518,46 @@ bool SetOperations::CollectFacetVisitor::AllowVisit (const MeshFacet& rclFacet, if (it != _edges.end()) { if (_addFacets == -1) { // determine if the facets should add or not only once - MeshGeomFacet facet = _mesh.GetFacet(rclFrom); // triangulated facet - MeshGeomFacet facetOther = it->second.facets[1-_side][0]; // triangulated facet from same edge and other mesh + MeshGeomFacet facet = _mesh.GetFacet(rclFrom); // triangulated facet + MeshGeomFacet facetOther = + it->second + .facets[1 - _side][0]; // triangulated facet from same edge and other mesh Vector3f normalOther = facetOther.GetNormal(); - //Vector3f normal = facet.GetNormal(); + // Vector3f normal = facet.GetNormal(); Vector3f edgeDir = it->first.pt1 - it->first.pt2; Vector3f ocDir = (edgeDir % (facet.GetGravityPoint() - it->first.pt1)) % edgeDir; ocDir.Normalize(); - Vector3f ocDirOther = (edgeDir % (facetOther.GetGravityPoint() - it->first.pt1)) % edgeDir; + Vector3f ocDirOther = + (edgeDir % (facetOther.GetGravityPoint() - it->first.pt1)) % edgeDir; ocDirOther.Normalize(); - //Vector3f dir = ocDir % normal; - //Vector3f dirOther = ocDirOther % normalOther; + // Vector3f dir = ocDir % normal; + // Vector3f dirOther = ocDirOther % normalOther; bool match = ((ocDir * normalOther) * _mult) < 0.0f; - //if (matchCounter == 1) + // if (matchCounter == 1) //{ - // // _builder.addSingleArrow(it->second.pt1, it->second.pt1 + edgeDir, 3, 0.0, 1.0, 0.0); + // // _builder.addSingleArrow(it->second.pt1, it->second.pt1 + edgeDir, 3, + // 0.0, 1.0, 0.0); - // _builder.addSingleTriangle(facet._aclPoints[0], facet._aclPoints[1], facet._aclPoints[2], true, 3.0, 1.0, 0.0, 0.0); - // // _builder.addSingleArrow(facet.GetGravityPoint(), facet.GetGravityPoint() + ocDir, 3, 1.0, 0.0, 0.0); - // _builder.addSingleArrow(facet.GetGravityPoint(), facet.GetGravityPoint() + normal, 3, 1.0, 0.5, 0.0); - // // _builder.addSingleArrow(facet.GetGravityPoint(), facet.GetGravityPoint() + dir, 3, 1.0, 1.0, 0.0); + // _builder.addSingleTriangle(facet._aclPoints[0], facet._aclPoints[1], + // facet._aclPoints[2], true, 3.0, 1.0, 0.0, 0.0); + // // _builder.addSingleArrow(facet.GetGravityPoint(), facet.GetGravityPoint() + + // ocDir, 3, 1.0, 0.0, 0.0); _builder.addSingleArrow(facet.GetGravityPoint(), + // facet.GetGravityPoint() + normal, 3, 1.0, 0.5, 0.0); + // // _builder.addSingleArrow(facet.GetGravityPoint(), facet.GetGravityPoint() + + // dir, 3, 1.0, 1.0, 0.0); - // _builder.addSingleTriangle(facetOther._aclPoints[0], facetOther._aclPoints[1], facetOther._aclPoints[2], true, 3.0, 0.0, 0.0, 1.0); - // // _builder.addSingleArrow(facetOther.GetGravityPoint(), facetOther.GetGravityPoint() + ocDirOther, 3, 0.0, 0.0, 1.0); - // _builder.addSingleArrow(facetOther.GetGravityPoint(), facetOther.GetGravityPoint() + normalOther, 3, 0.0, 0.5, 1.0); - // // _builder.addSingleArrow(facetOther.GetGravityPoint(), facetOther.GetGravityPoint() + dirOther, 3, 0.0, 1.0, 1.0); + // _builder.addSingleTriangle(facetOther._aclPoints[0], facetOther._aclPoints[1], + // facetOther._aclPoints[2], true, 3.0, 0.0, 0.0, 1.0); + // // _builder.addSingleArrow(facetOther.GetGravityPoint(), + // facetOther.GetGravityPoint() + ocDirOther, 3, 0.0, 0.0, 1.0); + // _builder.addSingleArrow(facetOther.GetGravityPoint(), + // facetOther.GetGravityPoint() + normalOther, 3, 0.0, 0.5, 1.0); + // // _builder.addSingleArrow(facetOther.GetGravityPoint(), + // facetOther.GetGravityPoint() + dirOther, 3, 0.0, 1.0, 1.0); //} @@ -558,34 +565,35 @@ bool SetOperations::CollectFacetVisitor::AllowVisit (const MeshFacet& rclFacet, // bool match = scalar > 0.0f; - //MeshPoint pt0 = it->first.pt1; - //MeshPoint pt1 = it->first.pt2; + // MeshPoint pt0 = it->first.pt1; + // MeshPoint pt1 = it->first.pt2; - //int i, n0 = -1, n1 = -1, m0 = -1, m1 = -1; - //for (i = 0; i < 3; i++) + // int i, n0 = -1, n1 = -1, m0 = -1, m1 = -1; + // for (i = 0; i < 3; i++) //{ - // if ((n0 == -1) && (facet._aclPoints[i] == pt0)) - // n0 = i; - // if ((n1 == -1) && (facet._aclPoints[i] == pt1)) - // n1 = i; - // if ((m0 == -1) && (facetOther._aclPoints[i] == pt0)) - // m0 = i; - // if ((m1 == -1) && (facetOther._aclPoints[i] == pt1)) - // m1 = i; - //} + // if ((n0 == -1) && (facet._aclPoints[i] == pt0)) + // n0 = i; + // if ((n1 == -1) && (facet._aclPoints[i] == pt1)) + // n1 = i; + // if ((m0 == -1) && (facetOther._aclPoints[i] == pt0)) + // m0 = i; + // if ((m1 == -1) && (facetOther._aclPoints[i] == pt1)) + // m1 = i; + // } - //if ((n0 != -1) && (n1 != -1) && (m0 != -1) && (m1 != -1)) + // if ((n0 != -1) && (n1 != -1) && (m0 != -1) && (m1 != -1)) //{ - // bool orient_n = n1 > n0; - // bool orient_m = m1 > m0; + // bool orient_n = n1 > n0; + // bool orient_m = m1 > m0; // Vector3f dirN = facet._aclPoints[n1] - facet._aclPoints[n0]; // Vector3f dirM = facetOther._aclPoints[m1] - facetOther._aclPoints[m0]; // if (matchCounter == 1) // { - // _builder.addSingleArrow(facet.GetGravityPoint(), facet.GetGravityPoint() + dirN, 3, 1.0, 1.0, 0.0); - // _builder.addSingleArrow(facetOther.GetGravityPoint(), facetOther.GetGravityPoint() + dirM, 3, 0.0, 1.0, 1.0); + // _builder.addSingleArrow(facet.GetGravityPoint(), facet.GetGravityPoint() + + // dirN, 3, 1.0, 1.0, 0.0); _builder.addSingleArrow(facetOther.GetGravityPoint(), + // facetOther.GetGravityPoint() + dirM, 3, 0.0, 1.0, 1.0); // } // if (_mult > 0.0) @@ -594,12 +602,14 @@ bool SetOperations::CollectFacetVisitor::AllowVisit (const MeshFacet& rclFacet, // match = orient_n != orient_m; //} - if (match) + if (match) { _addFacets = 0; - else + } + else { _addFacets = 1; + } - //matchCounter++; + // matchCounter++; } return false; @@ -615,11 +625,13 @@ bool MeshIntersection::hasIntersection() const { Base::BoundBox3f bbox1 = kernel1.GetBoundBox(); Base::BoundBox3f bbox2 = kernel2.GetBoundBox(); - if (!(bbox1 && bbox2)) + if (!(bbox1 && bbox2)) { return false; + } - if (testIntersection(kernel1, kernel2)) + if (testIntersection(kernel1, kernel2)) { return true; + } return false; } @@ -679,8 +691,7 @@ void MeshIntersection::getIntersection(std::list& intsc } } -bool MeshIntersection::testIntersection(const MeshKernel& k1, - const MeshKernel& k2) +bool MeshIntersection::testIntersection(const MeshKernel& k1, const MeshKernel& k2) { // Contains bounding boxes for every facet of 'k1' std::vector boxes1; @@ -730,8 +741,9 @@ bool MeshIntersection::testIntersection(const MeshKernel& k1, return false; } -void MeshIntersection::connectLines(bool onlyclosed, const std::list& rdata, - std::list< std::list >& lines) +void MeshIntersection::connectLines(bool onlyclosed, + const std::list& rdata, + std::list>& lines) { float fMinEps = minDistance * minDistance; @@ -744,10 +756,10 @@ void MeshIntersection::connectLines(bool onlyclosed, const std::listf1; front.f2 = data.begin()->f2; - front.p = data.begin()->p1; // current start point of the polyline + front.p = data.begin()->p1; // current start point of the polyline back.f1 = data.begin()->f1; back.f2 = data.begin()->f2; - back.p = data.begin()->p2; // current end point of the polyline + back.p = data.begin()->p2; // current end point of the polyline newPoly.push_back(front); newPoly.push_back(back); data.erase(data.begin()); @@ -756,33 +768,33 @@ void MeshIntersection::connectLines(bool onlyclosed, const std::list::iterator pFront, pEnd; bool bFoundLine; do { - float fFrontMin = fMinEps, fEndMin = fMinEps; - bool bFrontFirst=false, bEndFirst=false; + float fFrontMin = fMinEps, fEndMin = fMinEps; + bool bFrontFirst = false, bEndFirst = false; pFront = data.end(); - pEnd = data.end(); + pEnd = data.end(); bFoundLine = false; for (pF = data.begin(); pF != data.end(); ++pF) { if (Base::DistanceP2(front.p, pF->p1) < fFrontMin) { - fFrontMin = Base::DistanceP2(front.p, pF->p1); - pFront = pF; + fFrontMin = Base::DistanceP2(front.p, pF->p1); + pFront = pF; bFrontFirst = true; } else if (Base::DistanceP2(back.p, pF->p1) < fEndMin) { - fEndMin = Base::DistanceP2(back.p, pF->p1); - pEnd = pF; - bEndFirst = true; + fEndMin = Base::DistanceP2(back.p, pF->p1); + pEnd = pF; + bEndFirst = true; } else if (Base::DistanceP2(front.p, pF->p2) < fFrontMin) { - fFrontMin = Base::DistanceP2(front.p, pF->p2); - pFront = pF; + fFrontMin = Base::DistanceP2(front.p, pF->p2); + pFront = pF; bFrontFirst = false; } else if (Base::DistanceP2(back.p, pF->p2) < fEndMin) { - fEndMin = Base::DistanceP2(back.p, pF->p2); - pEnd = pF; - bEndFirst = false; + fEndMin = Base::DistanceP2(back.p, pF->p2); + pEnd = pF; + bEndFirst = false; } if (fFrontMin == 0.0f || fEndMin == 0.0f) { @@ -825,12 +837,13 @@ void MeshIntersection::connectLines(bool onlyclosed, const std::list 2 && Base::DistanceP2(newPoly.front().p, newPoly.back().p) < fMinEps) + if (newPoly.size() > 2 + && Base::DistanceP2(newPoly.front().p, newPoly.back().p) < fMinEps) { lines.push_back(newPoly); + } } else { lines.push_back(newPoly); diff --git a/src/Mod/Mesh/App/Core/SetOperations.h b/src/Mod/Mesh/App/Core/SetOperations.h index 24593a44b4..bd7054fe4f 100644 --- a/src/Mod/Mesh/App/Core/SetOperations.h +++ b/src/Mod/Mesh/App/Core/SetOperations.h @@ -53,130 +53,153 @@ class MeshFacetIterator; class MeshExport SetOperations { public: - enum OperationType { Union, Intersect, Difference, Inner, Outer }; + enum OperationType + { + Union, + Intersect, + Difference, + Inner, + Outer + }; - /// Construction - SetOperations (const MeshKernel &cutMesh1, const MeshKernel &cutMesh2, MeshKernel &result, OperationType opType, float minDistanceToPoint = 1e-5f); + /// Construction + SetOperations(const MeshKernel& cutMesh1, + const MeshKernel& cutMesh2, + MeshKernel& result, + OperationType opType, + float minDistanceToPoint = 1e-5f); public: - - /** Cut this mesh with another one. The result is a list of polylines - * If the distance of the polyline to one of the points is less than minDistanceToPoint the polyline goes direct to the point - */ - void Do (); + /** Cut this mesh with another one. The result is a list of polylines + * If the distance of the polyline to one of the points is less than minDistanceToPoint the + * polyline goes direct to the point + */ + void Do(); protected: - const MeshKernel &_cutMesh0; /** Mesh for set operations source 1 */ - const MeshKernel &_cutMesh1; /** Mesh for set operations source 2 */ - MeshKernel &_resultMesh; /** Result mesh */ - OperationType _operationType; /** Set Operation Type */ - float _minDistanceToPoint; /** Minimal distance to facet corner points */ + const MeshKernel& _cutMesh0; /** Mesh for set operations source 1 */ + const MeshKernel& _cutMesh1; /** Mesh for set operations source 2 */ + MeshKernel& _resultMesh; /** Result mesh */ + OperationType _operationType; /** Set Operation Type */ + float _minDistanceToPoint; /** Minimal distance to facet corner points */ private: - // Helper class cutting edge to its two attached facets - class Edge - { + // Helper class cutting edge to its two attached facets + class Edge + { public: - MeshPoint pt1, pt2; // edge + MeshPoint pt1, pt2; // edge - Edge () = default; + Edge() = default; - Edge (MeshPoint p1, MeshPoint p2) - { - if (p1 < p2) + Edge(MeshPoint p1, MeshPoint p2) { - pt1 = p1; - pt2 = p2; + if (p1 < p2) { + pt1 = p1; + pt2 = p2; + } + else { + pt2 = p1; + pt1 = p2; + } } - else + + bool operator==(const Edge& edge) const { - pt2 = p1; - pt1 = p2; + return (pt1 == edge.pt1) && (pt2 == edge.pt2); } - } - bool operator == (const Edge &edge) const - { - return (pt1 == edge.pt1) && (pt2 == edge.pt2); - } + bool operator<(const Edge& edge) const + { + return (pt1 == edge.pt1) ? (pt2 < edge.pt2) : (pt1 < edge.pt1); + } + }; - bool operator < (const Edge &edge) const - { - return (pt1 == edge.pt1) ? (pt2 < edge.pt2) : (pt1 < edge.pt1); - } - }; - - class EdgeInfo - { + class EdgeInfo + { public: - int fcounter[2]; // counter of facets attacted to the edge - MeshGeomFacet facets[2][2]; // Geom-Facets attached to the edge - FacetIndex facet[2]; // underlying Facet-Index + int fcounter[2]; // counter of facets attacted to the edge + MeshGeomFacet facets[2][2]; // Geom-Facets attached to the edge + FacetIndex facet[2]; // underlying Facet-Index - EdgeInfo () - { - fcounter[0] = 0; - fcounter[1] = 0; - facet[0] = 0; - facet[1] = 0; - } - }; + EdgeInfo() + { + fcounter[0] = 0; + fcounter[1] = 0; + facet[0] = 0; + facet[1] = 0; + } + }; - //class CollectFacetVisitor : public MeshFacetVisitor - //{ - // public: - // std::vector &_facets; - // MeshKernel &_mesh; - // std::map &_edges; - // int _side; - // float _mult; - // int _addFacets; // 0: add facets to the result 1: do not add facets to the result - // Base::Builder3D& _builder; + // class CollectFacetVisitor : public MeshFacetVisitor + //{ + // public: + // std::vector &_facets; + // MeshKernel &_mesh; + // std::map &_edges; + // int _side; + // float _mult; + // int _addFacets; // 0: add facets to the result 1: do not add + // facets to the result Base::Builder3D& _builder; - // CollectFacetVisitor (MeshKernel& mesh, std::vector& facets, std::map& edges, int side, float mult, Base::Builder3D& builder); - // bool Visit (MeshFacet &rclFacet, const MeshFacet &rclFrom, unsigned long ulFInd, unsigned long ulLevel); - // bool AllowVisit (MeshFacet& rclFacet, MeshFacet& rclFrom, unsigned long ulFInd, unsigned long ulLevel, unsigned short neighbourIndex); - //}; + // CollectFacetVisitor (MeshKernel& mesh, std::vector& facets, std::map& edges, int side, float mult, Base::Builder3D& builder); bool Visit (MeshFacet + // &rclFacet, const MeshFacet &rclFrom, unsigned long ulFInd, unsigned long ulLevel); bool + // AllowVisit (MeshFacet& rclFacet, MeshFacet& rclFrom, unsigned long ulFInd, unsigned long + // ulLevel, unsigned short neighbourIndex); + //}; - class CollectFacetVisitor : public MeshFacetVisitor - { + class CollectFacetVisitor: public MeshFacetVisitor + { public: - std::vector &_facets; - const MeshKernel &_mesh; - std::map &_edges; - int _side; - float _mult; - int _addFacets{-1}; // 0: add facets to the result 1: do not add facets to the result - Base::Builder3D& _builder; + std::vector& _facets; + const MeshKernel& _mesh; + std::map& _edges; + int _side; + float _mult; + int _addFacets {-1}; // 0: add facets to the result 1: do not add facets to the result + Base::Builder3D& _builder; - CollectFacetVisitor (const MeshKernel& mesh, std::vector& facets, std::map& edges, int side, float mult, Base::Builder3D& builder); - bool Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, FacetIndex ulFInd, unsigned long ulLevel) override; - bool AllowVisit (const MeshFacet& rclFacet, const MeshFacet& rclFrom, FacetIndex ulFInd, unsigned long ulLevel, unsigned short neighbourIndex) override; - }; + CollectFacetVisitor(const MeshKernel& mesh, + std::vector& facets, + std::map& edges, + int side, + float mult, + Base::Builder3D& builder); + bool Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) override; + bool AllowVisit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel, + unsigned short neighbourIndex) override; + }; - /** all points from cut */ - std::set _cutPoints; - /** all edges */ - std::map _edges; - /** map from facet index to its cut points (mesh 1 and mesh 2) Key: Facet-Index Value: List of iterators of set */ - std::map::iterator> > _facet2points[2]; - /** Facets collected from region growing */ - std::vector _facetsOf[2]; + /** all points from cut */ + std::set _cutPoints; + /** all edges */ + std::map _edges; + /** map from facet index to its cut points (mesh 1 and mesh 2) Key: Facet-Index Value: List of + * iterators of set */ + std::map::iterator>> _facet2points[2]; + /** Facets collected from region growing */ + std::vector _facetsOf[2]; - std::vector _newMeshFacets[2]; + std::vector _newMeshFacets[2]; - /** Cut mesh 1 with mesh 2 */ - void Cut (std::set& facetsNotCuttingEdge0, std::set& facetsCuttingEdge1); - /** Trianglute each facets cut with its cutting points */ - void TriangulateMesh (const MeshKernel &cutMesh, int side); - /** search facets for adding (with region growing) */ - void CollectFacets (int side, float mult); - /** close gap in the mesh */ - void CloseGaps (MeshBuilder& meshBuilder); - - /** visual debugger */ - Base::Builder3D _builder; + /** Cut mesh 1 with mesh 2 */ + void Cut(std::set& facetsNotCuttingEdge0, std::set& facetsCuttingEdge1); + /** Trianglute each facets cut with its cutting points */ + void TriangulateMesh(const MeshKernel& cutMesh, int side); + /** search facets for adding (with region growing) */ + void CollectFacets(int side, float mult); + /** close gap in the mesh */ + void CloseGaps(MeshBuilder& meshBuilder); + /** visual debugger */ + Base::Builder3D _builder; }; /*! @@ -185,35 +208,36 @@ private: class MeshExport MeshIntersection { public: - struct Tuple { + struct Tuple + { Base::Vector3f p1, p2; FacetIndex f1, f2; }; - struct Triple { + struct Triple + { Base::Vector3f p; FacetIndex f1, f2; }; - struct Pair { + struct Pair + { Base::Vector3f p; FacetIndex f; }; - MeshIntersection(const MeshKernel& m1, - const MeshKernel& m2, - float dist) + MeshIntersection(const MeshKernel& m1, const MeshKernel& m2, float dist) : kernel1(m1) , kernel2(m2) , minDistance(dist) - { - } + {} bool hasIntersection() const; void getIntersection(std::list&) const; /*! - From an unsorted list of intersection points make a list of sorted intersection points. If parameter \a onlyclosed - is set to true then only closed intersection curves are taken and all other curves are filtered out. + From an unsorted list of intersection points make a list of sorted intersection points. If + parameter \a onlyclosed is set to true then only closed intersection curves are taken and all + other curves are filtered out. */ - void connectLines(bool onlyclosed, const std::list&, std::list< std::list >&); + void connectLines(bool onlyclosed, const std::list&, std::list>&); private: static bool testIntersection(const MeshKernel& k1, const MeshKernel& k2); @@ -225,6 +249,6 @@ private: }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_SETOPERATIONS_H diff --git a/src/Mod/Mesh/App/Core/Simplify.h b/src/Mod/Mesh/App/Core/Simplify.h index 1be04ec744..e2c0cd6672 100644 --- a/src/Mod/Mesh/App/Core/Simplify.h +++ b/src/Mod/Mesh/App/Core/Simplify.h @@ -1,3 +1,4 @@ +// clang-format off // http://voxels.blogspot.de/2014/05/quadric-mesh-simplification-with-source.html // https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification // @@ -538,3 +539,4 @@ double Simplify::calculate_error(int id_v1, int id_v2, vec3f &p_result) } /////////////////////////////////////////// +// clang-format on diff --git a/src/Mod/Mesh/App/Core/Smoothing.cpp b/src/Mod/Mesh/App/Core/Smoothing.cpp index 3226032c2a..ffeb67d757 100644 --- a/src/Mod/Mesh/App/Core/Smoothing.cpp +++ b/src/Mod/Mesh/App/Core/Smoothing.cpp @@ -24,20 +24,19 @@ #include -#include "Smoothing.h" #include "Algorithm.h" #include "Approximation.h" #include "Iterator.h" #include "MeshKernel.h" +#include "Smoothing.h" using namespace MeshCore; AbstractSmoothing::AbstractSmoothing(MeshKernel& m) - : kernel(m) -{ -} + : kernel(m) +{} AbstractSmoothing::~AbstractSmoothing() = default; @@ -48,9 +47,8 @@ void AbstractSmoothing::initialize(Component comp, Continuity cont) } PlaneFitSmoothing::PlaneFitSmoothing(MeshKernel& m) - : AbstractSmoothing(m) -{ -} + : AbstractSmoothing(m) +{} void PlaneFitSmoothing::Smooth(unsigned int iterations) { @@ -61,24 +59,25 @@ void PlaneFitSmoothing::Smooth(unsigned int iterations) MeshCore::MeshRefPointToPoints vv_it(kernel); MeshCore::MeshPointArray::_TConstIterator v_beg = kernel.GetPoints().begin(); - for (unsigned int i=0; i& cv = vv_it[v_it.Position()]; - if (cv.size() < 3) + if (cv.size() < 3) { continue; + } std::set::const_iterator cv_it; - for (cv_it = cv.begin(); cv_it !=cv.end(); ++cv_it) { + for (cv_it = cv.begin(); cv_it != cv.end(); ++cv_it) { pf.AddPoint(v_beg[*cv_it]); center += v_beg[*cv_it]; } - float scale = 1.0f/(static_cast(cv.size())+1.0f); - center.Scale(scale,scale,scale); + float scale = 1.0f / (static_cast(cv.size()) + 1.0f); + center.Scale(scale, scale, scale); // get the mean plane of the current vertex with the surrounding vertices pf.Fit(); @@ -87,12 +86,13 @@ void PlaneFitSmoothing::Smooth(unsigned int iterations) // look in which direction we should move the vertex L.Set(v_it->x - center.x, v_it->y - center.y, v_it->z - center.z); - if (N*L < 0.0f) + if (N * L < 0.0f) { N.Scale(-1.0, -1.0, -1.0); + } // maximum value to move is distance to mean plane - float d = std::min(fabs(this->maximum),fabs(N*L)); - N.Scale(d,d,d); + float d = std::min(fabs(this->maximum), fabs(N * L)); + N.Scale(d, d, d); PointArray[v_it.Position()].Set(v_it->x - N.x, v_it->y - N.y, v_it->z - N.z); } @@ -105,7 +105,8 @@ void PlaneFitSmoothing::Smooth(unsigned int iterations) } } -void PlaneFitSmoothing::SmoothPoints(unsigned int iterations, const std::vector& point_indices) +void PlaneFitSmoothing::SmoothPoints(unsigned int iterations, + const std::vector& point_indices) { MeshCore::MeshPoint center; MeshCore::MeshPointArray PointArray = kernel.GetPoints(); @@ -114,7 +115,7 @@ void PlaneFitSmoothing::SmoothPoints(unsigned int iterations, const std::vector< MeshCore::MeshRefPointToPoints vv_it(kernel); MeshCore::MeshPointArray::_TConstIterator v_beg = kernel.GetPoints().begin(); - for (unsigned int i=0; i& cv = vv_it[v_it.Position()]; - if (cv.size() < 3) + if (cv.size() < 3) { continue; + } std::set::const_iterator cv_it; - for (cv_it = cv.begin(); cv_it !=cv.end(); ++cv_it) { + for (cv_it = cv.begin(); cv_it != cv.end(); ++cv_it) { pf.AddPoint(v_beg[*cv_it]); center += v_beg[*cv_it]; } - float scale = 1.0f/(static_cast(cv.size())+1.0f); - center.Scale(scale,scale,scale); + float scale = 1.0f / (static_cast(cv.size()) + 1.0f); + center.Scale(scale, scale, scale); // get the mean plane of the current vertex with the surrounding vertices pf.Fit(); @@ -141,12 +143,13 @@ void PlaneFitSmoothing::SmoothPoints(unsigned int iterations, const std::vector< // look in which direction we should move the vertex L.Set(v_it->x - center.x, v_it->y - center.y, v_it->z - center.z); - if (N*L < 0.0f) + if (N * L < 0.0f) { N.Scale(-1.0, -1.0, -1.0); + } // maximum value to move is distance to mean plane - float d = std::min(fabs(this->maximum),fabs(N*L)); - N.Scale(d,d,d); + float d = std::min(fabs(this->maximum), fabs(N * L)); + N.Scale(d, d, d); PointArray[v_it.Position()].Set(v_it->x - N.x, v_it->y - N.y, v_it->z - N.z); } @@ -160,22 +163,22 @@ void PlaneFitSmoothing::SmoothPoints(unsigned int iterations, const std::vector< } LaplaceSmoothing::LaplaceSmoothing(MeshKernel& m) - : AbstractSmoothing(m) -{ -} + : AbstractSmoothing(m) +{} void LaplaceSmoothing::Umbrella(const MeshRefPointToPoints& vv_it, - const MeshRefPointToFacets& vf_it, double stepsize) + const MeshRefPointToFacets& vf_it, + double stepsize) { const MeshCore::MeshPointArray& points = kernel.GetPoints(); - MeshCore::MeshPointArray::_TConstIterator v_it, - v_beg = points.begin(), v_end = points.end(); + MeshCore::MeshPointArray::_TConstIterator v_it, v_beg = points.begin(), v_end = points.end(); PointIndex pos = 0; - for (v_it = points.begin(); v_it != v_end; ++v_it,++pos) { + for (v_it = points.begin(); v_it != v_end; ++v_it, ++pos) { const std::set& cv = vv_it[pos]; - if (cv.size() < 3) + if (cv.size() < 3) { continue; + } if (cv.size() != vf_it[pos].size()) { // do nothing for border points continue; @@ -183,25 +186,26 @@ void LaplaceSmoothing::Umbrella(const MeshRefPointToPoints& vv_it, size_t n_count = cv.size(); double w; - w=1.0/double(n_count); + w = 1.0 / double(n_count); - double delx=0.0,dely=0.0,delz=0.0; + double delx = 0.0, dely = 0.0, delz = 0.0; std::set::const_iterator cv_it; - for (cv_it = cv.begin(); cv_it !=cv.end(); ++cv_it) { - delx += w*static_cast((v_beg[*cv_it]).x-v_it->x); - dely += w*static_cast((v_beg[*cv_it]).y-v_it->y); - delz += w*static_cast((v_beg[*cv_it]).z-v_it->z); + for (cv_it = cv.begin(); cv_it != cv.end(); ++cv_it) { + delx += w * static_cast((v_beg[*cv_it]).x - v_it->x); + dely += w * static_cast((v_beg[*cv_it]).y - v_it->y); + delz += w * static_cast((v_beg[*cv_it]).z - v_it->z); } - float x = static_cast(static_cast(v_it->x)+stepsize*delx); - float y = static_cast(static_cast(v_it->y)+stepsize*dely); - float z = static_cast(static_cast(v_it->z)+stepsize*delz); - kernel.SetPoint(pos,x,y,z); + float x = static_cast(static_cast(v_it->x) + stepsize * delx); + float y = static_cast(static_cast(v_it->y) + stepsize * dely); + float z = static_cast(static_cast(v_it->z) + stepsize * delz); + kernel.SetPoint(pos, x, y, z); } } void LaplaceSmoothing::Umbrella(const MeshRefPointToPoints& vv_it, - const MeshRefPointToFacets& vf_it, double stepsize, + const MeshRefPointToFacets& vf_it, + double stepsize, const std::vector& point_indices) { const MeshCore::MeshPointArray& points = kernel.GetPoints(); @@ -209,8 +213,9 @@ void LaplaceSmoothing::Umbrella(const MeshRefPointToPoints& vv_it, for (PointIndex it : point_indices) { const std::set& cv = vv_it[it]; - if (cv.size() < 3) + if (cv.size() < 3) { continue; + } if (cv.size() != vf_it[it].size()) { // do nothing for border points continue; @@ -218,20 +223,20 @@ void LaplaceSmoothing::Umbrella(const MeshRefPointToPoints& vv_it, size_t n_count = cv.size(); double w; - w=1.0/double(n_count); + w = 1.0 / double(n_count); - double delx=0.0,dely=0.0,delz=0.0; + double delx = 0.0, dely = 0.0, delz = 0.0; std::set::const_iterator cv_it; - for (cv_it = cv.begin(); cv_it !=cv.end(); ++cv_it) { - delx += w*static_cast((v_beg[*cv_it]).x-(v_beg[it]).x); - dely += w*static_cast((v_beg[*cv_it]).y-(v_beg[it]).y); - delz += w*static_cast((v_beg[*cv_it]).z-(v_beg[it]).z); + for (cv_it = cv.begin(); cv_it != cv.end(); ++cv_it) { + delx += w * static_cast((v_beg[*cv_it]).x - (v_beg[it]).x); + dely += w * static_cast((v_beg[*cv_it]).y - (v_beg[it]).y); + delz += w * static_cast((v_beg[*cv_it]).z - (v_beg[it]).z); } - float x = static_cast(static_cast((v_beg[it]).x)+stepsize*delx); - float y = static_cast(static_cast((v_beg[it]).y)+stepsize*dely); - float z = static_cast(static_cast((v_beg[it]).z)+stepsize*delz); - kernel.SetPoint(it,x,y,z); + float x = static_cast(static_cast((v_beg[it]).x) + stepsize * delx); + float y = static_cast(static_cast((v_beg[it]).y) + stepsize * dely); + float z = static_cast(static_cast((v_beg[it]).z) + stepsize * delz); + kernel.SetPoint(it, x, y, z); } } @@ -240,25 +245,25 @@ void LaplaceSmoothing::Smooth(unsigned int iterations) MeshCore::MeshRefPointToPoints vv_it(kernel); MeshCore::MeshRefPointToFacets vf_it(kernel); - for (unsigned int i=0; i& point_indices) +void LaplaceSmoothing::SmoothPoints(unsigned int iterations, + const std::vector& point_indices) { MeshCore::MeshRefPointToPoints vv_it(kernel); MeshCore::MeshRefPointToFacets vf_it(kernel); - for (unsigned int i=0; i& point_indices) +void TaubinSmoothing::SmoothPoints(unsigned int iterations, + const std::vector& point_indices) { MeshCore::MeshRefPointToPoints vv_it(kernel); MeshCore::MeshRefPointToFacets vf_it(kernel); // Theoretically Taubin does not shrink the surface - iterations = (iterations+1)/2; // two steps per iteration - for (unsigned int i=0; i; -inline Base::Vector3d find_median(std::vector &container) +inline Base::Vector3d find_median(std::vector& container) { auto compare_angle_normal = [](const AngleNormal& an1, const AngleNormal& an2) { return an1.first < an2.first; }; size_t n = container.size() / 2; - std::nth_element(container.begin(), container.begin() + n, container.end(), compare_angle_normal); + std::nth_element(container.begin(), + container.begin() + n, + container.end(), + compare_angle_normal); if ((container.size() % 2) == 1) { return container[n].second; } else { // even sized vector -> average the two middle values - auto max_it = std::max_element(container.begin(), container.begin() + n, compare_angle_normal); + auto max_it = + std::max_element(container.begin(), container.begin() + n, compare_angle_normal); Base::Vector3d vec = (max_it->second + container[n].second) / 2.0; vec.Normalize(); return vec; } } -} +} // namespace MedianFilterSmoothing::MedianFilterSmoothing(MeshKernel& m) - : AbstractSmoothing(m) -{ -} + : AbstractSmoothing(m) +{} void MedianFilterSmoothing::Smooth(unsigned int iterations) { @@ -321,17 +331,18 @@ void MedianFilterSmoothing::Smooth(unsigned int iterations) MeshCore::MeshRefFacetToFacets ff_it(kernel); MeshCore::MeshRefPointToFacets vf_it(kernel); - for (unsigned int i=0; i& point_indices) +void MedianFilterSmoothing::SmoothPoints(unsigned int iterations, + const std::vector& point_indices) { MeshCore::MeshRefFacetToFacets ff_it(kernel); MeshCore::MeshRefPointToFacets vf_it(kernel); - for (unsigned int i=0; i&) override; private: - float maximum{FLT_MAX}; + float maximum {FLT_MAX}; }; -class MeshExport LaplaceSmoothing : public AbstractSmoothing +class MeshExport LaplaceSmoothing: public AbstractSmoothing { public: explicit LaplaceSmoothing(MeshKernel&); void Smooth(unsigned int) override; void SmoothPoints(unsigned int, const std::vector&) override; - void SetLambda(double l) { lambda = l;} + void SetLambda(double l) + { + lambda = l; + } protected: + void Umbrella(const MeshRefPointToPoints&, const MeshRefPointToFacets&, double); void Umbrella(const MeshRefPointToPoints&, - const MeshRefPointToFacets&, double); - void Umbrella(const MeshRefPointToPoints&, - const MeshRefPointToFacets&, double, + const MeshRefPointToFacets&, + double, const std::vector&); protected: - double lambda{0.6307}; + double lambda {0.6307}; }; -class MeshExport TaubinSmoothing : public LaplaceSmoothing +class MeshExport TaubinSmoothing: public LaplaceSmoothing { public: explicit TaubinSmoothing(MeshKernel&); void Smooth(unsigned int) override; void SmoothPoints(unsigned int, const std::vector&) override; - void SetMicro(double m) { micro = m;} + void SetMicro(double m) + { + micro = m; + } protected: - double micro{0.0424}; + double micro {0.0424}; }; /*! @@ -117,11 +126,12 @@ protected: * Smoothing based on median filter from the paper: * Mesh Median Filter for Smoothing 3-D Polygonal Surfaces */ -class MeshExport MedianFilterSmoothing : public AbstractSmoothing +class MeshExport MedianFilterSmoothing: public AbstractSmoothing { public: explicit MedianFilterSmoothing(MeshKernel&); - void SetWeight(int w) { + void SetWeight(int w) + { weights = w; } void Smooth(unsigned int) override; @@ -133,10 +143,10 @@ private: const std::vector&); private: - int weights{1}; + int weights {1}; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_SMOOTHING_H diff --git a/src/Mod/Mesh/App/Core/SphereFit.cpp b/src/Mod/Mesh/App/Core/SphereFit.cpp index f87a8c72c9..310f1cca0c 100644 --- a/src/Mod/Mesh/App/Core/SphereFit.cpp +++ b/src/Mod/Mesh/App/Core/SphereFit.cpp @@ -23,9 +23,9 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include #endif #include "SphereFit.h" @@ -34,64 +34,76 @@ using namespace MeshCoreFit; SphereFit::SphereFit() - : _vCenter(0, 0, 0) + : _vCenter(0, 0, 0) {} // Set approximations before calling the fitting -void SphereFit::SetApproximations(double radius, const Base::Vector3d ¢er) +void SphereFit::SetApproximations(double radius, const Base::Vector3d& center) { - _bIsFitted = false; - _fLastResult = FLOAT_MAX; - _numIter = 0; - _dRadius = radius; - _vCenter = center; + _bIsFitted = false; + _fLastResult = FLOAT_MAX; + _numIter = 0; + _dRadius = radius; + _vCenter = center; } // Set iteration convergence criteria for the fit if special values are needed. // The default values set in the constructor are suitable for most uses void SphereFit::SetConvergenceCriteria(double posConvLimit, double vConvLimit, int maxIter) { - if (posConvLimit > 0.0) - _posConvLimit = posConvLimit; - if (vConvLimit > 0.0) - _vConvLimit = vConvLimit; - if (maxIter > 0) - _maxIter = maxIter; + if (posConvLimit > 0.0) { + _posConvLimit = posConvLimit; + } + if (vConvLimit > 0.0) { + _vConvLimit = vConvLimit; + } + if (maxIter > 0) { + _maxIter = maxIter; + } } double SphereFit::GetRadius() const { - if (_bIsFitted) - return _dRadius; - else - return 0.0; + if (_bIsFitted) { + return _dRadius; + } + else { + return 0.0; + } } Base::Vector3d SphereFit::GetCenter() const { - if (_bIsFitted) + if (_bIsFitted) { return _vCenter; - else + } + else { return Base::Vector3d(); + } } int SphereFit::GetNumIterations() const { - if (_bIsFitted) - return _numIter; - else - return 0; + if (_bIsFitted) { + return _numIter; + } + else { + return 0; + } } -float SphereFit::GetDistanceToSphere(const Base::Vector3f &rcPoint) const +float SphereFit::GetDistanceToSphere(const Base::Vector3f& rcPoint) const { - float fResult = FLOAT_MAX; - if (_bIsFitted) - { - fResult = Base::Vector3d((double)rcPoint.x - _vCenter.x, (double)rcPoint.y - _vCenter.y, (double)rcPoint.z - _vCenter.z).Length() - _dRadius; - } - return fResult; + float fResult = FLOAT_MAX; + if (_bIsFitted) { + fResult = Base::Vector3d((double)rcPoint.x - _vCenter.x, + (double)rcPoint.y - _vCenter.y, + (double)rcPoint.z - _vCenter.z) + .Length() + - _dRadius; + } + return fResult; } float SphereFit::GetStdDeviation() const @@ -99,13 +111,14 @@ float SphereFit::GetStdDeviation() const // Mean: M=(1/N)*SUM Xi // Variance: VAR=(N/N-1)*[(1/N)*SUM(Xi^2)-M^2] // Standard deviation: SD=SQRT(VAR) - if (!_bIsFitted) + if (!_bIsFitted) { return FLOAT_MAX; + } double sumXi = 0.0, sumXi2 = 0.0, dist = 0.0; for (auto it : _vPoints) { - dist = GetDistanceToSphere( it ); - sumXi += dist; + dist = GetDistanceToSphere(it); + sumXi += dist; sumXi2 += (dist * dist); } @@ -116,28 +129,28 @@ float SphereFit::GetStdDeviation() const void SphereFit::ProjectToSphere() { - for (auto & cPnt : _vPoints) { - // Compute unit vector from sphere centre to point. - // Because this vector is orthogonal to the sphere's surface at the - // intersection point we can easily compute the projection point on the - // closest surface point using the radius of the sphere - Base::Vector3d diff((double)cPnt.x - _vCenter.x, (double)cPnt.y - _vCenter.y, (double)cPnt.z - _vCenter.z); - double length = diff.Length(); - if (length == 0.0) - { - // Point is exactly at the sphere center, so it can be projected in any direction onto the sphere! - // So here just project in +Z direction - cPnt.z += (float)_dRadius; - } - else - { - diff /= length; // normalizing the vector - Base::Vector3d proj = _vCenter + diff * _dRadius; - cPnt.x = (float)proj.x; - cPnt.y = (float)proj.y; - cPnt.z = (float)proj.z; - } - } + for (auto& cPnt : _vPoints) { + // Compute unit vector from sphere centre to point. + // Because this vector is orthogonal to the sphere's surface at the + // intersection point we can easily compute the projection point on the + // closest surface point using the radius of the sphere + Base::Vector3d diff((double)cPnt.x - _vCenter.x, + (double)cPnt.y - _vCenter.y, + (double)cPnt.z - _vCenter.z); + double length = diff.Length(); + if (length == 0.0) { + // Point is exactly at the sphere center, so it can be projected in any direction onto + // the sphere! So here just project in +Z direction + cPnt.z += (float)_dRadius; + } + else { + diff /= length; // normalizing the vector + Base::Vector3d proj = _vCenter + diff * _dRadius; + cPnt.x = (float)proj.x; + cPnt.y = (float)proj.y; + cPnt.z = (float)proj.z; + } + } } // Compute approximations for the parameters using all points: @@ -145,119 +158,127 @@ void SphereFit::ProjectToSphere() // distance from the centre of gravity to the points. void SphereFit::ComputeApproximations() { - _bIsFitted = false; - _fLastResult = FLOAT_MAX; - _numIter = 0; - _vCenter.Set(0.0, 0.0, 0.0); - _dRadius = 0.0; - if (!_vPoints.empty()) - { - std::list< Base::Vector3f >::const_iterator cIt; - for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) - { - _vCenter.x += cIt->x; - _vCenter.y += cIt->y; - _vCenter.z += cIt->z; - } - _vCenter /= (double)_vPoints.size(); + _bIsFitted = false; + _fLastResult = FLOAT_MAX; + _numIter = 0; + _vCenter.Set(0.0, 0.0, 0.0); + _dRadius = 0.0; + if (!_vPoints.empty()) { + std::list::const_iterator cIt; + for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) { + _vCenter.x += cIt->x; + _vCenter.y += cIt->y; + _vCenter.z += cIt->z; + } + _vCenter /= (double)_vPoints.size(); - for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) - { - Base::Vector3d diff((double)cIt->x - _vCenter.x, (double)cIt->y - _vCenter.y, (double)cIt->z - _vCenter.z); - _dRadius += diff.Length(); - } - _dRadius /= (double)_vPoints.size(); - } + for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt) { + Base::Vector3d diff((double)cIt->x - _vCenter.x, + (double)cIt->y - _vCenter.y, + (double)cIt->z - _vCenter.z); + _dRadius += diff.Length(); + } + _dRadius /= (double)_vPoints.size(); + } } float SphereFit::Fit() { - _bIsFitted = false; - _fLastResult = FLOAT_MAX; - _numIter = 0; + _bIsFitted = false; + _fLastResult = FLOAT_MAX; + _numIter = 0; - // A minimum of 4 surface points is needed to define a sphere - if (CountPoints() < 4) - return FLOAT_MAX; + // A minimum of 4 surface points is needed to define a sphere + if (CountPoints() < 4) { + return FLOAT_MAX; + } - // If approximations have not been set/computed then compute some now - if (_dRadius == 0.0) - ComputeApproximations(); + // If approximations have not been set/computed then compute some now + if (_dRadius == 0.0) { + ComputeApproximations(); + } - // Initialise some matrices and vectors - std::vector< Base::Vector3d > residuals(CountPoints(), Base::Vector3d(0.0, 0.0, 0.0)); - Matrix4x4 atpa; - Eigen::VectorXd atpl(4); + // Initialise some matrices and vectors + std::vector residuals(CountPoints(), Base::Vector3d(0.0, 0.0, 0.0)); + Matrix4x4 atpa; + Eigen::VectorXd atpl(4); - // Iteration loop... - double sigma0; - bool cont = true; - while (cont && (_numIter < _maxIter)) - { - ++_numIter; + // Iteration loop... + double sigma0; + bool cont = true; + while (cont && (_numIter < _maxIter)) { + ++_numIter; - // Set up the quasi parametric normal equations - setupNormalEquationMatrices(residuals, atpa, atpl); + // Set up the quasi parametric normal equations + setupNormalEquationMatrices(residuals, atpa, atpl); - // Solve the equations for the unknown corrections - Eigen::LLT< Matrix4x4 > llt(atpa); - if (llt.info() != Eigen::Success) - return FLOAT_MAX; - Eigen::VectorXd x = llt.solve(atpl); + // Solve the equations for the unknown corrections + Eigen::LLT llt(atpa); + if (llt.info() != Eigen::Success) { + return FLOAT_MAX; + } + Eigen::VectorXd x = llt.solve(atpl); - // Check parameter convergence (order of parameters: X,Y,Z,R) - cont = false; - if ((fabs(x(0)) > _posConvLimit) || (fabs(x(1)) > _posConvLimit) || - (fabs(x(2)) > _posConvLimit) || (fabs(x(3)) > _posConvLimit)) - cont = true; + // Check parameter convergence (order of parameters: X,Y,Z,R) + cont = false; + if ((fabs(x(0)) > _posConvLimit) || (fabs(x(1)) > _posConvLimit) + || (fabs(x(2)) > _posConvLimit) || (fabs(x(3)) > _posConvLimit)) { + cont = true; + } - // Before updating the unknowns, compute the residuals and sigma0 and check the residual convergence - bool vConverged; - if (!computeResiduals(x, residuals, sigma0, _vConvLimit, vConverged)) - return FLOAT_MAX; - if (!vConverged) - cont = true; + // Before updating the unknowns, compute the residuals and sigma0 and check the residual + // convergence + bool vConverged; + if (!computeResiduals(x, residuals, sigma0, _vConvLimit, vConverged)) { + return FLOAT_MAX; + } + if (!vConverged) { + cont = true; + } - // Update the parameters (order of parameters: X,Y,Z,R) - _vCenter.x += x(0); - _vCenter.y += x(1); - _vCenter.z += x(2); - _dRadius += x(3); - } + // Update the parameters (order of parameters: X,Y,Z,R) + _vCenter.x += x(0); + _vCenter.y += x(1); + _vCenter.z += x(2); + _dRadius += x(3); + } - // Check for convergence - if (cont) - return FLOAT_MAX; + // Check for convergence + if (cont) { + return FLOAT_MAX; + } - _bIsFitted = true; - _fLastResult = sigma0; + _bIsFitted = true; + _fLastResult = sigma0; - return _fLastResult; + return _fLastResult; } // Set up the normal equation matrices // atpa ... 4x4 normal matrix // atpl ... 4x1 matrix (right-hand side of equation) -void SphereFit::setupNormalEquationMatrices(const std::vector< Base::Vector3d > &residuals, Matrix4x4 &atpa, Eigen::VectorXd &atpl) const +void SphereFit::setupNormalEquationMatrices(const std::vector& residuals, + Matrix4x4& atpa, + Eigen::VectorXd& atpl) const { - // Zero matrices - atpa.setZero(); - atpl.setZero(); + // Zero matrices + atpa.setZero(); + atpl.setZero(); - // For each point, setup the observation equation coefficients and add their - // contribution into the normal equation matrices - double a[4], b[3]; - double f0, qw; - std::vector< Base::Vector3d >::const_iterator vIt = residuals.begin(); - std::list< Base::Vector3f >::const_iterator cIt; - for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) - { - // if (using this point) { // currently all given points are used (could modify this if eliminating outliers, etc.... - setupObservation(*cIt, *vIt, a, f0, qw, b); - addObservationU(a, f0, qw, atpa, atpl); - // } - } - setLowerPart(atpa); + // For each point, setup the observation equation coefficients and add their + // contribution into the normal equation matrices + double a[4], b[3]; + double f0, qw; + std::vector::const_iterator vIt = residuals.begin(); + std::list::const_iterator cIt; + for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) { + // if (using this point) { // currently all given points are used (could modify this if + // eliminating outliers, etc.... + setupObservation(*cIt, *vIt, a, f0, qw, b); + addObservationU(a, f0, qw, atpa, atpl); + // } + } + setLowerPart(atpa); } // Sets up contributions of given observation to the quasi parametric @@ -266,40 +287,46 @@ void SphereFit::setupNormalEquationMatrices(const std::vector< Base::Vector3d > // residual ... residual for this point computed from previous iteration (zero for first iteration) // a[4] ... parameter partials (order of parameters: X,Y,Z,R) // f0 ... reference to f0 term -// qw ... reference to quasi weight (here we are assuming equal unit weights for each observed point coordinate) -// b[3] ... observation partials -void SphereFit::setupObservation(const Base::Vector3f &point, const Base::Vector3d &residual, double a[4], double &f0, double &qw, double b[3]) const +// qw ... reference to quasi weight (here we are assuming equal unit weights for each observed +// point coordinate) b[3] ... observation partials +void SphereFit::setupObservation(const Base::Vector3f& point, + const Base::Vector3d& residual, + double a[4], + double& f0, + double& qw, + double b[3]) const { - // This adjustment requires an update of the observation approximations - // because the residuals do not have a linear relationship. - // New estimates for the observations: - double xEstimate = (double)point.x + residual.x; - double yEstimate = (double)point.y + residual.y; - double zEstimate = (double)point.z + residual.z; + // This adjustment requires an update of the observation approximations + // because the residuals do not have a linear relationship. + // New estimates for the observations: + double xEstimate = (double)point.x + residual.x; + double yEstimate = (double)point.y + residual.y; + double zEstimate = (double)point.z + residual.z; - // partials of the observations - double dx = xEstimate - _vCenter.x; - double dy = yEstimate - _vCenter.y; - double dz = zEstimate - _vCenter.z; - b[0] = 2.0 * dx; - b[1] = 2.0 * dy; - b[2] = 2.0 * dz; + // partials of the observations + double dx = xEstimate - _vCenter.x; + double dy = yEstimate - _vCenter.y; + double dz = zEstimate - _vCenter.z; + b[0] = 2.0 * dx; + b[1] = 2.0 * dy; + b[2] = 2.0 * dz; - // partials of the parameters - a[0] = -b[0]; - a[1] = -b[1]; - a[2] = -b[2]; - a[3] = -2.0 * _dRadius; + // partials of the parameters + a[0] = -b[0]; + a[1] = -b[1]; + a[2] = -b[2]; + a[3] = -2.0 * _dRadius; - // free term - f0 = _dRadius * _dRadius - dx * dx - dy * dy - dz * dz + b[0] * residual.x + b[1] * residual.y + b[2] * residual.z; + // free term + f0 = _dRadius * _dRadius - dx * dx - dy * dy - dz * dz + b[0] * residual.x + b[1] * residual.y + + b[2] * residual.z; - // quasi weight (using equal weights for sphere point coordinate observations) - //w[0] = 1.0; - //w[1] = 1.0; - //w[2] = 1.0; - //qw = 1.0 / (b[0] * b[0] / w[0] + b[1] * b[1] / w[1] + b[2] * b[2] / w[2]); - qw = 1.0 / (b[0] * b[0] + b[1] * b[1] + b[2] * b[2]); + // quasi weight (using equal weights for sphere point coordinate observations) + // w[0] = 1.0; + // w[1] = 1.0; + // w[2] = 1.0; + // qw = 1.0 / (b[0] * b[0] / w[0] + b[1] * b[1] / w[1] + b[2] * b[2] / w[2]); + qw = 1.0 / (b[0] * b[0] + b[1] * b[1] + b[2] * b[2]); } // Computes contribution of the given observation equation on the normal equation matrices @@ -312,101 +339,113 @@ void SphereFit::setupObservation(const Base::Vector3f &point, const Base::Vector // pi ... weight of observation (= quasi weight qw for this solution) // atpa ... 4x4 normal equation matrix // atpl ... 4x1 matrix/vector (right-hand side of equations) -void SphereFit::addObservationU(double a[4], double li, double pi, Matrix4x4 &atpa, Eigen::VectorXd &atpl) const +void SphereFit::addObservationU(double a[4], + double li, + double pi, + Matrix4x4& atpa, + Eigen::VectorXd& atpl) const { - for (int i = 0; i < 4; ++i) - { - double aipi = a[i] * pi; - for (int j = i; j < 4; ++j) - { - atpa(i, j) += aipi * a[j]; - //atpa(j, i) = atpa(i, j); // it's a symmetrical matrix, we'll set this later after all observations processed - } - atpl(i) += aipi * li; - } + for (int i = 0; i < 4; ++i) { + double aipi = a[i] * pi; + for (int j = i; j < 4; ++j) { + atpa(i, j) += aipi * a[j]; + // atpa(j, i) = atpa(i, j); // it's a symmetrical matrix, we'll set this later after all + // observations processed + } + atpl(i) += aipi * li; + } } // Set the lower part of the normal matrix equal to the upper part // This is done after all the observations have been added -void SphereFit::setLowerPart(Matrix4x4 &atpa) const +void SphereFit::setLowerPart(Matrix4x4& atpa) const { - for (int i = 0; i < 4; ++i) - { - for (int j = i+1; j < 4; ++j) // skip the diagonal elements - atpa(j, i) = atpa(i, j); - } + for (int i = 0; i < 4; ++i) { + for (int j = i + 1; j < 4; ++j) { // skip the diagonal elements + atpa(j, i) = atpa(i, j); + } + } } // Compute the residuals and sigma0 and check the residual convergence -bool SphereFit::computeResiduals(const Eigen::VectorXd &x, std::vector< Base::Vector3d > &residuals, double &sigma0, double vConvLimit, bool &vConverged) const +bool SphereFit::computeResiduals(const Eigen::VectorXd& x, + std::vector& residuals, + double& sigma0, + double vConvLimit, + bool& vConverged) const { - vConverged = true; - int nPtsUsed = 0; - sigma0 = 0.0; - double a[4], b[3]; - double f0, qw; - //double maxdVx = 0.0; - //double maxdVy = 0.0; - //double maxdVz = 0.0; - //double rmsVv = 0.0; - std::vector< Base::Vector3d >::iterator vIt = residuals.begin(); - std::list< Base::Vector3f >::const_iterator cIt; - for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) - { - // if (using this point) { // currently all given points are used (could modify this if eliminating outliers, etc.... - ++nPtsUsed; - Base::Vector3d &v = *vIt; - setupObservation(*cIt, v, a, f0, qw, b); - double qv = -f0; - for (int i = 0; i < 4; ++i) - qv += a[i] * x(i); + vConverged = true; + int nPtsUsed = 0; + sigma0 = 0.0; + double a[4], b[3]; + double f0, qw; + // double maxdVx = 0.0; + // double maxdVy = 0.0; + // double maxdVz = 0.0; + // double rmsVv = 0.0; + std::vector::iterator vIt = residuals.begin(); + std::list::const_iterator cIt; + for (cIt = _vPoints.begin(); cIt != _vPoints.end(); ++cIt, ++vIt) { + // if (using this point) { // currently all given points are used (could modify this if + // eliminating outliers, etc.... + ++nPtsUsed; + Base::Vector3d& v = *vIt; + setupObservation(*cIt, v, a, f0, qw, b); + double qv = -f0; + for (int i = 0; i < 4; ++i) { + qv += a[i] * x(i); + } - // We are using equal weights for sphere point coordinate observations (see setupObservation) - // i.e. w[0] = w[1] = w[2] = 1.0; - //double vx = -qw * qv * b[0] / w[0]; - //double vy = -qw * qv * b[1] / w[1]; - //double vz = -qw * qv * b[2] / w[2]; - double vx = -qw * qv * b[0]; - double vy = -qw * qv * b[1]; - double vz = -qw * qv * b[2]; - double dVx = fabs(vx - v.x); - double dVy = fabs(vy - v.y); - double dVz = fabs(vz - v.z); - v.x = vx; - v.y = vy; - v.z = vz; + // We are using equal weights for sphere point coordinate observations (see + // setupObservation) i.e. w[0] = w[1] = w[2] = 1.0; + // double vx = -qw * qv * b[0] / w[0]; + // double vy = -qw * qv * b[1] / w[1]; + // double vz = -qw * qv * b[2] / w[2]; + double vx = -qw * qv * b[0]; + double vy = -qw * qv * b[1]; + double vz = -qw * qv * b[2]; + double dVx = fabs(vx - v.x); + double dVy = fabs(vy - v.y); + double dVz = fabs(vz - v.z); + v.x = vx; + v.y = vy; + v.z = vz; - //double vv = v.x * v.x + v.y * v.y + v.z * v.z; - //rmsVv += vv * vv; + // double vv = v.x * v.x + v.y * v.y + v.z * v.z; + // rmsVv += vv * vv; - //sigma0 += v.x * w[0] * v.x + v.y * w[1] * v.y + v.z * w[2] * v.z; - sigma0 += v.x * v.x + v.y * v.y + v.z * v.z; + // sigma0 += v.x * w[0] * v.x + v.y * w[1] * v.y + v.z * w[2] * v.z; + sigma0 += v.x * v.x + v.y * v.y + v.z * v.z; - if ((dVx > vConvLimit) || (dVy > vConvLimit) || (dVz > vConvLimit)) - vConverged = false; + if ((dVx > vConvLimit) || (dVy > vConvLimit) || (dVz > vConvLimit)) { + vConverged = false; + } - //if (dVx > maxdVx) - // maxdVx = dVx; - //if (dVy > maxdVy) - // maxdVy = dVy; - //if (dVz > maxdVz) - // maxdVz = dVz; - } + // if (dVx > maxdVx) + // maxdVx = dVx; + // if (dVy > maxdVy) + // maxdVy = dVy; + // if (dVz > maxdVz) + // maxdVz = dVz; + } - // Compute degrees of freedom and sigma0 - if (nPtsUsed < 4) // A minimum of 4 surface points is needed to define a sphere - { - sigma0 = 0.0; - return false; - } - int df = nPtsUsed - 4; - if (df == 0) - sigma0 = 0.0; - else - sigma0 = sqrt (sigma0 / (double)df); + // Compute degrees of freedom and sigma0 + if (nPtsUsed < 4) // A minimum of 4 surface points is needed to define a sphere + { + sigma0 = 0.0; + return false; + } + int df = nPtsUsed - 4; + if (df == 0) { + sigma0 = 0.0; + } + else { + sigma0 = sqrt(sigma0 / (double)df); + } - //rmsVv = sqrt(rmsVv / (double)nPtsUsed); - //Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS Vv: %0.4f\n", x(0), x(1), x(2), x(3), maxdVx, maxdVy, maxdVz, rmsVv); + // rmsVv = sqrt(rmsVv / (double)nPtsUsed); + // Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS Vv: + // %0.4f\n", x(0), x(1), x(2), x(3), maxdVx, maxdVy, maxdVz, rmsVv); - return true; + return true; } diff --git a/src/Mod/Mesh/App/Core/SphereFit.h b/src/Mod/Mesh/App/Core/SphereFit.h index 64c2e80a25..f392c66226 100644 --- a/src/Mod/Mesh/App/Core/SphereFit.h +++ b/src/Mod/Mesh/App/Core/SphereFit.h @@ -23,19 +23,20 @@ #ifndef MESH_SPHERE_FIT_H #define MESH_SPHERE_FIT_H -#include #include "Approximation.h" +#include // ------------------------------------------------------------------------------- -namespace MeshCoreFit { +namespace MeshCoreFit +{ -using Matrix4x4 = Eigen::Matrix; +using Matrix4x4 = Eigen::Matrix; /** * Best-fit sphere for a given set of points. */ -class MeshExport SphereFit : public MeshCore::Approximation +class MeshExport SphereFit: public MeshCore::Approximation { public: /** @@ -46,28 +47,30 @@ public: /** * Set approximations before calling Fit() */ - void SetApproximations(double radius, const Base::Vector3d ¢er); + void SetApproximations(double radius, const Base::Vector3d& center); /** - * Set iteration convergence criteria for the fit if special values are needed. - * The default values set in the constructor are suitable for most uses + * Set iteration convergence criteria for the fit if special values are needed. + * The default values set in the constructor are suitable for most uses */ - void SetConvergenceCriteria(double posConvLimit, double vConvLimit, int maxIter); + void SetConvergenceCriteria(double posConvLimit, double vConvLimit, int maxIter); /** * Returns the radius of the fitted sphere. If Fit() has not been called then zero is returned. */ double GetRadius() const; /** - * Returns the center of the fitted sphere. If Fit() has not been called the null vector is returned. + * Returns the center of the fitted sphere. If Fit() has not been called the null vector is + * returned. */ Base::Vector3d GetCenter() const; /** - * Returns the number of iterations that Fit() needed to converge. If Fit() has not been called then zero is returned. + * Returns the number of iterations that Fit() needed to converge. If Fit() has not been called + * then zero is returned. */ - int GetNumIterations() const; + int GetNumIterations() const; /** - * Compute approximations for the parameters using all points + * Compute approximations for the parameters using all points */ - void ComputeApproximations(); + void ComputeApproximations(); /** * Fit a sphere onto the given points. If the fit fails FLOAT_MAX is returned. */ @@ -76,7 +79,7 @@ public: * Returns the distance from the point \a rcPoint to the fitted sphere. If Fit() has not been * called FLOAT_MAX is returned. */ - float GetDistanceToSphere(const Base::Vector3f &rcPoint) const; + float GetDistanceToSphere(const Base::Vector3f& rcPoint) const; /** * Returns the standard deviation from the points to the fitted sphere. If Fit() has not been * called FLOAT_MAX is returned. @@ -88,39 +91,53 @@ public: void ProjectToSphere(); protected: - /** - * Set up the normal equations + /** + * Set up the normal equations */ - void setupNormalEquationMatrices(const std::vector< Base::Vector3d > &residuals, Matrix4x4 &atpa, Eigen::VectorXd &atpl) const; - /** - * Sets up contributions of given observation to the normal equation matrices. + void setupNormalEquationMatrices(const std::vector& residuals, + Matrix4x4& atpa, + Eigen::VectorXd& atpl) const; + /** + * Sets up contributions of given observation to the normal equation matrices. */ - void setupObservation(const Base::Vector3f &point, const Base::Vector3d &residual, double a[4], double &f0, double &qw, double b[3]) const; - /** - * Computes contribution of the given observation equation on the normal equation matrices + void setupObservation(const Base::Vector3f& point, + const Base::Vector3d& residual, + double a[4], + double& f0, + double& qw, + double b[3]) const; + /** + * Computes contribution of the given observation equation on the normal equation matrices */ - void addObservationU(double a[4], double li, double pi, Matrix4x4 &atpa, Eigen::VectorXd &atpl) const; - /** - * Set the lower part of the normal matrix equal to the upper part + void addObservationU(double a[4], + double li, + double pi, + Matrix4x4& atpa, + Eigen::VectorXd& atpl) const; + /** + * Set the lower part of the normal matrix equal to the upper part */ - void setLowerPart(Matrix4x4 &atpa) const; + void setLowerPart(Matrix4x4& atpa) const; - /** - * Compute the residuals and sigma0 and check the residual convergence + /** + * Compute the residuals and sigma0 and check the residual convergence */ - bool computeResiduals(const Eigen::VectorXd &x, std::vector< Base::Vector3d > &residuals, double &sigma0, double vConvLimit, bool &vConverged) const; + bool computeResiduals(const Eigen::VectorXd& x, + std::vector& residuals, + double& sigma0, + double vConvLimit, + bool& vConverged) const; protected: - Base::Vector3d _vCenter;/**< Center of sphere. */ - double _dRadius{0}; /**< Radius of the sphere. */ - int _numIter{0}; /**< Number of iterations for solution to converge. */ - double _posConvLimit{0.0001}; /**< Position and radius parameter convergence threshold. */ - double _vConvLimit{0.001}; /**< Residual convergence threshold. */ - int _maxIter{50}; /**< Maximum number of iterations. */ - + Base::Vector3d _vCenter; /**< Center of sphere. */ + double _dRadius {0}; /**< Radius of the sphere. */ + int _numIter {0}; /**< Number of iterations for solution to converge. */ + double _posConvLimit {0.0001}; /**< Position and radius parameter convergence threshold. */ + double _vConvLimit {0.001}; /**< Residual convergence threshold. */ + int _maxIter {50}; /**< Maximum number of iterations. */ }; -} // namespace MeshCore +} // namespace MeshCoreFit -#endif // MESH_SPHERE_FIT_H +#endif // MESH_SPHERE_FIT_H diff --git a/src/Mod/Mesh/App/Core/Tools.cpp b/src/Mod/Mesh/App/Core/Tools.cpp index b9547649bf..df8cf28d61 100644 --- a/src/Mod/Mesh/App/Core/Tools.cpp +++ b/src/Mod/Mesh/App/Core/Tools.cpp @@ -23,7 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "Tools.h" @@ -31,33 +31,37 @@ using namespace MeshCore; -MeshSearchNeighbours::MeshSearchNeighbours (const MeshKernel &rclM, float fSampleDistance) - : _rclMesh(rclM) - , _rclFAry(rclM.GetFacets()) - , _rclPAry(rclM.GetPoints()) - , _clPt2Fa(rclM) - , _fSampleDistance(fSampleDistance) +MeshSearchNeighbours::MeshSearchNeighbours(const MeshKernel& rclM, float fSampleDistance) + : _rclMesh(rclM) + , _rclFAry(rclM.GetFacets()) + , _rclPAry(rclM.GetPoints()) + , _clPt2Fa(rclM) + , _fSampleDistance(fSampleDistance) { MeshAlgorithm(_rclMesh).ResetFacetFlag(MeshFacet::MARKED); MeshAlgorithm(_rclMesh).ResetPointFlag(MeshPoint::MARKED); } -void MeshSearchNeighbours::Reinit (float fSampleDistance) +void MeshSearchNeighbours::Reinit(float fSampleDistance) { _fSampleDistance = fSampleDistance; MeshAlgorithm(_rclMesh).ResetFacetFlag(MeshFacet::MARKED); MeshAlgorithm(_rclMesh).ResetPointFlag(MeshPoint::MARKED); } -unsigned long MeshSearchNeighbours::NeighboursFromFacet (FacetIndex ulFacetIdx, float fDistance, unsigned long ulMinPoints, std::vector &raclResultPoints) +unsigned long +MeshSearchNeighbours::NeighboursFromFacet(FacetIndex ulFacetIdx, + float fDistance, + unsigned long ulMinPoints, + std::vector& raclResultPoints) { bool bAddPoints = false; _fMaxDistanceP2 = fDistance * fDistance; - _clCenter = _rclMesh.GetFacet(ulFacetIdx).GetGravityPoint(); + _clCenter = _rclMesh.GetFacet(ulFacetIdx).GetGravityPoint(); unsigned long ulVisited = 1; - std::vector aclTestedFacet; + std::vector aclTestedFacet; _aclResult.clear(); _aclOuter.clear(); @@ -81,16 +85,16 @@ unsigned long MeshSearchNeighbours::NeighboursFromFacet (FacetIndex ulFacetIdx, std::set aclTmp; aclTmp.swap(_aclOuter); for (PointIndex pI : aclTmp) { - const std::set &rclISet = _clPt2Fa[pI]; + const std::set& rclISet = _clPt2Fa[pI]; // search all facets hanging on this point for (FacetIndex pJ : rclISet) { - const MeshFacet &rclF = f_beg[pJ]; + const MeshFacet& rclF = f_beg[pJ]; if (!rclF.IsFlag(MeshFacet::MARKED)) { bool bLF = CheckDistToFacet(rclF); bFound = bFound || bLF; rclF.SetFlag(MeshFacet::MARKED); - aclTestedFacet.push_back(f_beg+pJ); + aclTestedFacet.push_back(f_beg + pJ); } } ulVisited += rclISet.size(); @@ -102,22 +106,27 @@ unsigned long MeshSearchNeighbours::NeighboursFromFacet (FacetIndex ulFacetIdx, bAddPoints = true; bFound = ExpandRadius(ulMinPoints); } - else + else { nCtExpandRadius = 0; + } } // reset marked facets, points - for (auto & pF : aclTestedFacet) + for (auto& pF : aclTestedFacet) { pF->ResetFlag(MeshFacet::MARKED); - for (PointIndex pR : _aclResult) + } + for (PointIndex pR : _aclResult) { _rclPAry[pR].ResetFlag(MeshPoint::MARKED); + } // copy points in result container raclResultPoints.resize(_aclResult.size()); size_t i = 0; - for (std::set::iterator pI = _aclResult.begin(); pI != _aclResult.end(); ++pI, i++) + for (std::set::iterator pI = _aclResult.begin(); pI != _aclResult.end(); + ++pI, i++) { raclResultPoints[i] = _rclPAry[*pI]; + } if (bAddPoints) { // sort points, remove points lying furthest from center @@ -128,10 +137,11 @@ unsigned long MeshSearchNeighbours::NeighboursFromFacet (FacetIndex ulFacetIdx, return ulVisited; } -void MeshSearchNeighbours::SampleAllFacets () +void MeshSearchNeighbours::SampleAllFacets() { - if (_aclSampledFacets.size() == _rclMesh.CountFacets()) - return; // already sampled, do nothing + if (_aclSampledFacets.size() == _rclMesh.CountFacets()) { + return; // already sampled, do nothing + } _aclSampledFacets.resize(_rclMesh.CountFacets()); MeshFacetIterator clFIter(_rclMesh); @@ -144,18 +154,21 @@ void MeshSearchNeighbours::SampleAllFacets () } } -unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets (FacetIndex ulFacetIdx, float fDistance, std::vector &raclResultPoints) +unsigned long +MeshSearchNeighbours::NeighboursFromSampledFacets(FacetIndex ulFacetIdx, + float fDistance, + std::vector& raclResultPoints) { SampleAllFacets(); _fMaxDistanceP2 = fDistance * fDistance; - _clCenter = _rclMesh.GetFacet(ulFacetIdx).GetGravityPoint(); + _clCenter = _rclMesh.GetFacet(ulFacetIdx).GetGravityPoint(); _akSphere.Center = Wm4::Vector3(_clCenter.x, _clCenter.y, _clCenter.z); _akSphere.Radius = fDistance; unsigned long ulVisited = 1; - std::vector aclTestedFacet; + std::vector aclTestedFacet; _aclResult.clear(); _aclOuter.clear(); @@ -173,16 +186,16 @@ unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets (FacetIndex ulFa std::set aclTmp; aclTmp.swap(_aclOuter); for (PointIndex pI : aclTmp) { - const std::set &rclISet = _clPt2Fa[pI]; + const std::set& rclISet = _clPt2Fa[pI]; // search all facets hanging on this point for (FacetIndex pJ : rclISet) { - const MeshFacet &rclF = f_beg[pJ]; + const MeshFacet& rclF = f_beg[pJ]; if (!rclF.IsFlag(MeshFacet::MARKED)) { bool bLF = AccumulateNeighbours(rclF, pJ); bFound = bFound || bLF; rclF.SetFlag(MeshFacet::MARKED); - aclTestedFacet.push_back(f_beg+pJ); + aclTestedFacet.push_back(f_beg + pJ); } } ulVisited += rclISet.size(); @@ -190,8 +203,9 @@ unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets (FacetIndex ulFa } // reset marked facets - for (auto & pF : aclTestedFacet) + for (auto& pF : aclTestedFacet) { pF->ResetFlag(MeshFacet::MARKED); + } // copy points in result container raclResultPoints.resize(_aclPointsResult.size()); @@ -199,40 +213,45 @@ unsigned long MeshSearchNeighbours::NeighboursFromSampledFacets (FacetIndex ulFa // facet points for (PointIndex pI : _aclResult) { - if (InnerPoint(_rclPAry[pI])) + if (InnerPoint(_rclPAry[pI])) { raclResultPoints.push_back(_rclPAry[pI]); + } } return ulVisited; } -bool MeshSearchNeighbours::AccumulateNeighbours (const MeshFacet &rclF, FacetIndex ulFIdx) +bool MeshSearchNeighbours::AccumulateNeighbours(const MeshFacet& rclF, FacetIndex ulFIdx) { - int k = 0; + int k = 0; for (PointIndex ulPIdx : rclF._aulPoints) { _aclOuter.insert(ulPIdx); _aclResult.insert(ulPIdx); - if (Base::DistanceP2(_clCenter, _rclPAry[ulPIdx]) < _fMaxDistanceP2) + if (Base::DistanceP2(_clCenter, _rclPAry[ulPIdx]) < _fMaxDistanceP2) { k++; + } } bool bFound = false; if (k == 3) { // add all sample points - _aclPointsResult.insert(_aclPointsResult.end(), _aclSampledFacets[ulFIdx].begin(), _aclSampledFacets[ulFIdx].end()); + _aclPointsResult.insert(_aclPointsResult.end(), + _aclSampledFacets[ulFIdx].begin(), + _aclSampledFacets[ulFIdx].end()); bFound = true; } else { // add points inner radius bFound = TriangleCutsSphere(rclF); if (bFound) { - const std::vector &rclT = _aclSampledFacets[ulFIdx]; + const std::vector& rclT = _aclSampledFacets[ulFIdx]; std::vector clTmp; clTmp.reserve(rclT.size()); - for (const auto & pI : rclT) { - if (InnerPoint(pI)) + for (const auto& pI : rclT) { + if (InnerPoint(pI)) { clTmp.push_back(pI); + } } _aclPointsResult.insert(_aclPointsResult.end(), clTmp.begin(), clTmp.end()); } @@ -241,30 +260,36 @@ bool MeshSearchNeighbours::AccumulateNeighbours (const MeshFacet &rclF, FacetInd return bFound; } -bool MeshSearchNeighbours::ExpandRadius (unsigned long ulMinPoints) +bool MeshSearchNeighbours::ExpandRadius(unsigned long ulMinPoints) { // add facets from current level _aclResult.insert(_aclOuter.begin(), _aclOuter.end()); - for (PointIndex pI : _aclOuter) + for (PointIndex pI : _aclOuter) { _rclPAry[pI].SetFlag(MeshPoint::MARKED); + } if (_aclResult.size() < ulMinPoints) { _fMaxDistanceP2 *= float(ulMinPoints) / float(_aclResult.size()); return true; } - else + else { return false; + } } -unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet (FacetIndex ulFacetIdx, float fDistance, std::vector &raclResultPoints, std::vector &raclResultFacets) +unsigned long +MeshSearchNeighbours::NeighboursFacetFromFacet(FacetIndex ulFacetIdx, + float fDistance, + std::vector& raclResultPoints, + std::vector& raclResultFacets) { std::set aulFacetSet; _fMaxDistanceP2 = fDistance * fDistance; - _clCenter = _rclMesh.GetFacet(ulFacetIdx).GetGravityPoint(); + _clCenter = _rclMesh.GetFacet(ulFacetIdx).GetGravityPoint(); - unsigned long ulVisited = 1; - std::vector aclTestedFacet; + unsigned long ulVisited = 1; + std::vector aclTestedFacet; _aclResult.clear(); _aclOuter.clear(); @@ -284,10 +309,10 @@ unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet (FacetIndex ulFacet std::set aclTmp; aclTmp.swap(_aclOuter); for (PointIndex pI : aclTmp) { - const std::set &rclISet = _clPt2Fa[pI]; + const std::set& rclISet = _clPt2Fa[pI]; // search all facets hanging on this point for (FacetIndex pJ : rclISet) { - const MeshFacet &rclF = f_beg[pJ]; + const MeshFacet& rclF = f_beg[pJ]; for (PointIndex ptIndex : rclF._aulPoints) { if (Base::DistanceP2(_clCenter, _rclPAry[ptIndex]) < _fMaxDistanceP2) { @@ -301,7 +326,7 @@ unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet (FacetIndex ulFacet bFound = bFound || bLF; rclF.SetFlag(MeshFacet::MARKED); - aclTestedFacet.push_back(f_beg+pJ); + aclTestedFacet.push_back(f_beg + pJ); } } ulVisited += rclISet.size(); @@ -309,16 +334,20 @@ unsigned long MeshSearchNeighbours::NeighboursFacetFromFacet (FacetIndex ulFacet } // reset marked facets, points - for (auto & pF : aclTestedFacet) + for (auto& pF : aclTestedFacet) { pF->ResetFlag(MeshFacet::MARKED); - for (PointIndex pR : _aclResult) + } + for (PointIndex pR : _aclResult) { _rclPAry[pR].ResetFlag(MeshPoint::MARKED); + } // copy points in result container raclResultPoints.resize(_aclResult.size()); size_t i = 0; - for (std::set::iterator pI = _aclResult.begin(); pI != _aclResult.end(); ++pI, i++) + for (std::set::iterator pI = _aclResult.begin(); pI != _aclResult.end(); + ++pI, i++) { raclResultPoints[i] = _rclPAry[*pI]; + } // copy facets in result container raclResultFacets.insert(raclResultFacets.begin(), aulFacetSet.begin(), aulFacetSet.end()); diff --git a/src/Mod/Mesh/App/Core/Tools.h b/src/Mod/Mesh/App/Core/Tools.h index 9920e1d7ee..84eb95bbcc 100644 --- a/src/Mod/Mesh/App/Core/Tools.h +++ b/src/Mod/Mesh/App/Core/Tools.h @@ -33,7 +33,8 @@ #include "MeshKernel.h" -namespace MeshCore { +namespace MeshCore +{ /** * The MeshSearchNeighbours class provides methods to get all points @@ -42,109 +43,122 @@ namespace MeshCore { class MeshSearchNeighbours { public: - explicit MeshSearchNeighbours ( const MeshKernel &rclM, float fSampleDistance = 1.0f); - ~MeshSearchNeighbours () = default; - /** Re-initilaizes internal structures. */ - void Reinit (float fSampleDistance); - /** Collects all neighbour points from the facet (by index), the result are the points of the facets lying - * inside a sphere of radius \a fDistance, center \a center of the original facet. This method uses the - * MARKED flags. - */ - unsigned long NeighboursFromFacet (FacetIndex ulFacetIdx, float fDistance, unsigned long ulMinPoints, std::vector &raclResultPoints); - /** Searches for facets from the start facet, sample the neighbour facets and accumulates the points. */ - unsigned long NeighboursFromSampledFacets (FacetIndex ulFacetIdx, float fDistance, std::vector &raclResultPoints); - /** Searches for facets from the start facet. */ - unsigned long NeighboursFacetFromFacet (FacetIndex ulFacetIdx, float fDistance, std::vector &raclResultPoints, - std::vector &raclResultFacets); + explicit MeshSearchNeighbours(const MeshKernel& rclM, float fSampleDistance = 1.0f); + ~MeshSearchNeighbours() = default; + /** Re-initilaizes internal structures. */ + void Reinit(float fSampleDistance); + /** Collects all neighbour points from the facet (by index), the result are the points of the + * facets lying inside a sphere of radius \a fDistance, center \a center of the original facet. + * This method uses the MARKED flags. + */ + unsigned long NeighboursFromFacet(FacetIndex ulFacetIdx, + float fDistance, + unsigned long ulMinPoints, + std::vector& raclResultPoints); + /** Searches for facets from the start facet, sample the neighbour facets and accumulates the + * points. */ + unsigned long NeighboursFromSampledFacets(FacetIndex ulFacetIdx, + float fDistance, + std::vector& raclResultPoints); + /** Searches for facets from the start facet. */ + unsigned long NeighboursFacetFromFacet(FacetIndex ulFacetIdx, + float fDistance, + std::vector& raclResultPoints, + std::vector& raclResultFacets); protected: - /** Subsamples the mesh. */ - void SampleAllFacets (); - inline bool CheckDistToFacet (const MeshFacet &rclF); // check distance to facet, add points inner radius - bool AccumulateNeighbours (const MeshFacet &rclF, FacetIndex ulFIdx); // accumulate the sample neighbours facet - inline bool InnerPoint (const Base::Vector3f &rclPt) const; - inline bool TriangleCutsSphere (const MeshFacet &rclF) const; - bool ExpandRadius (unsigned long ulMinPoints); + /** Subsamples the mesh. */ + void SampleAllFacets(); + inline bool + CheckDistToFacet(const MeshFacet& rclF); // check distance to facet, add points inner radius + bool AccumulateNeighbours(const MeshFacet& rclF, + FacetIndex ulFIdx); // accumulate the sample neighbours facet + inline bool InnerPoint(const Base::Vector3f& rclPt) const; + inline bool TriangleCutsSphere(const MeshFacet& rclF) const; + bool ExpandRadius(unsigned long ulMinPoints); - struct CDistRad - { - explicit CDistRad (const Base::Vector3f clCenter) : _clCenter(clCenter) {} - bool operator()(const Base::Vector3f &rclPt1, const Base::Vector3f &rclPt2) { return Base::DistanceP2(_clCenter, rclPt1) < Base::DistanceP2(_clCenter, rclPt2); } - Base::Vector3f _clCenter; - }; + struct CDistRad + { + explicit CDistRad(const Base::Vector3f clCenter) + : _clCenter(clCenter) + {} + bool operator()(const Base::Vector3f& rclPt1, const Base::Vector3f& rclPt2) + { + return Base::DistanceP2(_clCenter, rclPt1) < Base::DistanceP2(_clCenter, rclPt2); + } + Base::Vector3f _clCenter; + }; protected: - const MeshKernel &_rclMesh; - const MeshFacetArray &_rclFAry; - const MeshPointArray &_rclPAry; - MeshRefPointToFacets _clPt2Fa; - float _fMaxDistanceP2{0}; // square distance - Base::Vector3f _clCenter; // center points of start facet - std::set _aclResult; // result container (point indices) - std::set _aclOuter; // next searching points - std::vector _aclPointsResult; // result as vertex - std::vector > _aclSampledFacets; // sample points from each facet - float _fSampleDistance; // distance between two sampled points - Wm4::Sphere3 _akSphere; - bool _bTooFewPoints{false}; + const MeshKernel& _rclMesh; + const MeshFacetArray& _rclFAry; + const MeshPointArray& _rclPAry; + MeshRefPointToFacets _clPt2Fa; + float _fMaxDistanceP2 {0}; // square distance + Base::Vector3f _clCenter; // center points of start facet + std::set _aclResult; // result container (point indices) + std::set _aclOuter; // next searching points + std::vector _aclPointsResult; // result as vertex + std::vector> _aclSampledFacets; // sample points from each facet + float _fSampleDistance; // distance between two sampled points + Wm4::Sphere3 _akSphere; + bool _bTooFewPoints {false}; public: - MeshSearchNeighbours (const MeshSearchNeighbours&) = delete; - void operator = (const MeshSearchNeighbours&) = delete; + MeshSearchNeighbours(const MeshSearchNeighbours&) = delete; + void operator=(const MeshSearchNeighbours&) = delete; }; -inline bool MeshSearchNeighbours::CheckDistToFacet (const MeshFacet &rclF) +inline bool MeshSearchNeighbours::CheckDistToFacet(const MeshFacet& rclF) { - bool bFound = false; + bool bFound = false; - for (PointIndex ulPIdx : rclF._aulPoints) - { - if (!_rclPAry[ulPIdx].IsFlag(MeshPoint::MARKED)) - { - if (Base::DistanceP2(_clCenter, _rclPAry[ulPIdx]) < _fMaxDistanceP2) - { - bFound = true; - { - _aclResult.insert(ulPIdx); - _rclPAry[ulPIdx].SetFlag(MeshPoint::MARKED); + for (PointIndex ulPIdx : rclF._aulPoints) { + if (!_rclPAry[ulPIdx].IsFlag(MeshPoint::MARKED)) { + if (Base::DistanceP2(_clCenter, _rclPAry[ulPIdx]) < _fMaxDistanceP2) { + bFound = true; + { + _aclResult.insert(ulPIdx); + _rclPAry[ulPIdx].SetFlag(MeshPoint::MARKED); + } + } + _aclOuter.insert(ulPIdx); } - } - _aclOuter.insert(ulPIdx); } - } - return bFound; + return bFound; } -inline bool MeshSearchNeighbours::InnerPoint (const Base::Vector3f &rclPt) const +inline bool MeshSearchNeighbours::InnerPoint(const Base::Vector3f& rclPt) const { - return Base::DistanceP2(_clCenter, rclPt) < _fMaxDistanceP2; + return Base::DistanceP2(_clCenter, rclPt) < _fMaxDistanceP2; } -inline bool MeshSearchNeighbours::TriangleCutsSphere (const MeshFacet &rclF) const +inline bool MeshSearchNeighbours::TriangleCutsSphere(const MeshFacet& rclF) const { - Base::Vector3f cP0 = _rclPAry[rclF._aulPoints[0]]; - Base::Vector3f cP1 = _rclPAry[rclF._aulPoints[1]]; - Base::Vector3f cP2 = _rclPAry[rclF._aulPoints[2]]; + Base::Vector3f cP0 = _rclPAry[rclF._aulPoints[0]]; + Base::Vector3f cP1 = _rclPAry[rclF._aulPoints[1]]; + Base::Vector3f cP2 = _rclPAry[rclF._aulPoints[2]]; - Wm4::Vector3 akP0(cP0.x, cP0.y, cP0.z); - Wm4::Vector3 akP1(cP1.x, cP1.y, cP1.z); - Wm4::Vector3 akP2(cP2.x, cP2.y, cP2.z); + Wm4::Vector3 akP0(cP0.x, cP0.y, cP0.z); + Wm4::Vector3 akP1(cP1.x, cP1.y, cP1.z); + Wm4::Vector3 akP2(cP2.x, cP2.y, cP2.z); - Wm4::Triangle3 akTri(akP0, akP1, akP2); - Wm4::DistVector3Triangle3 akDistVecTri(_akSphere.Center, akTri); + Wm4::Triangle3 akTri(akP0, akP1, akP2); + Wm4::DistVector3Triangle3 akDistVecTri(_akSphere.Center, akTri); - float fSqrDist = akDistVecTri.GetSquared(); - float fRSqr = _akSphere.Radius*_akSphere.Radius; - return fSqrDist < fRSqr; + float fSqrDist = akDistVecTri.GetSquared(); + float fRSqr = _akSphere.Radius * _akSphere.Radius; + return fSqrDist < fRSqr; } class MeshFaceIterator { public: explicit MeshFaceIterator(const MeshKernel& mesh) - : it(mesh) {} - Base::Vector3f operator() (FacetIndex index) + : it(mesh) + {} + Base::Vector3f operator()(FacetIndex index) { it.Set(index); return it->GetGravityPoint(); @@ -158,8 +172,9 @@ class MeshVertexIterator { public: explicit MeshVertexIterator(const MeshKernel& mesh) - : it(mesh) {} - Base::Vector3f operator() (PointIndex index) + : it(mesh) + {} + Base::Vector3f operator()(PointIndex index) { it.Set(index); return *it; @@ -169,14 +184,20 @@ private: MeshPointIterator it; }; -template +template class MeshNearestIndexToPlane { public: using Index = typename T::Index; - MeshNearestIndexToPlane(const MeshKernel& mesh, const Base::Vector3f& b, const Base::Vector3f& n) - : nearest_index(-1), it(mesh), base(b), normal(n) {} - void operator() (Index index) + MeshNearestIndexToPlane(const MeshKernel& mesh, + const Base::Vector3f& b, + const Base::Vector3f& n) + : nearest_index(-1) + , it(mesh) + , base(b) + , normal(n) + {} + void operator()(Index index) { float dist = (float)fabs(it(index).DistanceToPlane(base, normal)); if (dist < nearest_dist) { @@ -186,15 +207,14 @@ public: } Index nearest_index; - float nearest_dist{FLOAT_MAX}; + float nearest_dist {FLOAT_MAX}; private: T it; Base::Vector3f base, normal; }; -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_TOOLS_H - diff --git a/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp b/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp index e33d338304..f09ad7c596 100644 --- a/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp +++ b/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp @@ -23,143 +23,150 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include #include -#include "TopoAlgorithm.h" #include "Evaluation.h" #include "Iterator.h" #include "MeshKernel.h" +#include "TopoAlgorithm.h" #include "Triangulation.h" using namespace MeshCore; -MeshTopoAlgorithm::MeshTopoAlgorithm (MeshKernel &rclM) -: _rclMesh(rclM) +MeshTopoAlgorithm::MeshTopoAlgorithm(MeshKernel& rclM) + : _rclMesh(rclM) +{} + +MeshTopoAlgorithm::~MeshTopoAlgorithm() { + if (_needsCleanup) { + Cleanup(); + } + EndCache(); } -MeshTopoAlgorithm::~MeshTopoAlgorithm () +bool MeshTopoAlgorithm::InsertVertex(FacetIndex ulFacetPos, const Base::Vector3f& rclPoint) { - if ( _needsCleanup ) - Cleanup(); - EndCache(); -} + MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; + MeshFacet clNewFacet1, clNewFacet2; -bool MeshTopoAlgorithm::InsertVertex(FacetIndex ulFacetPos, const Base::Vector3f& rclPoint) -{ - MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; - MeshFacet clNewFacet1, clNewFacet2; + // insert new point + PointIndex ulPtCnt = _rclMesh._aclPointArray.size(); + PointIndex ulPtInd = this->GetOrAddIndex(rclPoint); + FacetIndex ulSize = _rclMesh._aclFacetArray.size(); - // insert new point - PointIndex ulPtCnt = _rclMesh._aclPointArray.size(); - PointIndex ulPtInd = this->GetOrAddIndex(rclPoint); - FacetIndex ulSize = _rclMesh._aclFacetArray.size(); + if (ulPtInd < ulPtCnt) { + return false; // the given point is already part of the mesh => creating new facets would + // be an illegal operation + } - if ( ulPtInd < ulPtCnt ) - return false; // the given point is already part of the mesh => creating new facets would be an illegal operation + // adjust the facets + // + // first new facet + clNewFacet1._aulPoints[0] = rclF._aulPoints[1]; + clNewFacet1._aulPoints[1] = rclF._aulPoints[2]; + clNewFacet1._aulPoints[2] = ulPtInd; + clNewFacet1._aulNeighbours[0] = rclF._aulNeighbours[1]; + clNewFacet1._aulNeighbours[1] = ulSize + 1; + clNewFacet1._aulNeighbours[2] = ulFacetPos; + // second new facet + clNewFacet2._aulPoints[0] = rclF._aulPoints[2]; + clNewFacet2._aulPoints[1] = rclF._aulPoints[0]; + clNewFacet2._aulPoints[2] = ulPtInd; + clNewFacet2._aulNeighbours[0] = rclF._aulNeighbours[2]; + clNewFacet2._aulNeighbours[1] = ulFacetPos; + clNewFacet2._aulNeighbours[2] = ulSize; + // adjust the neighbour facet + if (rclF._aulNeighbours[1] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclF._aulNeighbours[1]].ReplaceNeighbour(ulFacetPos, ulSize); + } + if (rclF._aulNeighbours[2] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclF._aulNeighbours[2]].ReplaceNeighbour(ulFacetPos, ulSize + 1); + } + // original facet + rclF._aulPoints[2] = ulPtInd; + rclF._aulNeighbours[1] = ulSize; + rclF._aulNeighbours[2] = ulSize + 1; - // adjust the facets - // - // first new facet - clNewFacet1._aulPoints[0] = rclF._aulPoints[1]; - clNewFacet1._aulPoints[1] = rclF._aulPoints[2]; - clNewFacet1._aulPoints[2] = ulPtInd; - clNewFacet1._aulNeighbours[0] = rclF._aulNeighbours[1]; - clNewFacet1._aulNeighbours[1] = ulSize+1; - clNewFacet1._aulNeighbours[2] = ulFacetPos; - // second new facet - clNewFacet2._aulPoints[0] = rclF._aulPoints[2]; - clNewFacet2._aulPoints[1] = rclF._aulPoints[0]; - clNewFacet2._aulPoints[2] = ulPtInd; - clNewFacet2._aulNeighbours[0] = rclF._aulNeighbours[2]; - clNewFacet2._aulNeighbours[1] = ulFacetPos; - clNewFacet2._aulNeighbours[2] = ulSize; - // adjust the neighbour facet - if (rclF._aulNeighbours[1] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclF._aulNeighbours[1]].ReplaceNeighbour(ulFacetPos, ulSize); - if (rclF._aulNeighbours[2] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclF._aulNeighbours[2]].ReplaceNeighbour(ulFacetPos, ulSize+1); - // original facet - rclF._aulPoints[2] = ulPtInd; - rclF._aulNeighbours[1] = ulSize; - rclF._aulNeighbours[2] = ulSize+1; + // insert new facets + _rclMesh._aclFacetArray.push_back(clNewFacet1); + _rclMesh._aclFacetArray.push_back(clNewFacet2); - // insert new facets - _rclMesh._aclFacetArray.push_back(clNewFacet1); - _rclMesh._aclFacetArray.push_back(clNewFacet2); - - return true; + return true; } bool MeshTopoAlgorithm::SnapVertex(FacetIndex ulFacetPos, const Base::Vector3f& rP) { - MeshFacet& rFace = _rclMesh._aclFacetArray[ulFacetPos]; - if (!rFace.HasOpenEdge()) - return false; - Base::Vector3f cNo1 = _rclMesh.GetNormal(rFace); - for (unsigned short i=0; i<3; i++) - { - if (rFace._aulNeighbours[i]==FACET_INDEX_MAX) - { - const Base::Vector3f& rPt1 = _rclMesh._aclPointArray[rFace._aulPoints[i]]; - const Base::Vector3f& rPt2 = _rclMesh._aclPointArray[rFace._aulPoints[(i+1)%3]]; - Base::Vector3f cNo2 = (rPt2 - rPt1) % cNo1; - Base::Vector3f cNo3 = (rP - rPt1) % (rPt2 - rPt1); - float fD2 = Base::DistanceP2(rPt1, rPt2); - float fTV = (rP-rPt1) * (rPt2-rPt1); - - // Point is on the edge - if ( cNo3.Length() < FLOAT_EPS ) - { - return SplitOpenEdge(ulFacetPos, i, rP); - } - else if ( (rP - rPt1)*cNo2 > 0.0f && fD2 >= fTV && fTV >= 0.0f ) - { - MeshFacet cTria; - cTria._aulPoints[0] = this->GetOrAddIndex(rP); - cTria._aulPoints[1] = rFace._aulPoints[(i+1)%3]; - cTria._aulPoints[2] = rFace._aulPoints[i]; - cTria._aulNeighbours[1] = ulFacetPos; - rFace._aulNeighbours[i] = _rclMesh.CountFacets(); - _rclMesh._aclFacetArray.push_back(cTria); - return true; - } + MeshFacet& rFace = _rclMesh._aclFacetArray[ulFacetPos]; + if (!rFace.HasOpenEdge()) { + return false; } - } + Base::Vector3f cNo1 = _rclMesh.GetNormal(rFace); + for (unsigned short i = 0; i < 3; i++) { + if (rFace._aulNeighbours[i] == FACET_INDEX_MAX) { + const Base::Vector3f& rPt1 = _rclMesh._aclPointArray[rFace._aulPoints[i]]; + const Base::Vector3f& rPt2 = _rclMesh._aclPointArray[rFace._aulPoints[(i + 1) % 3]]; + Base::Vector3f cNo2 = (rPt2 - rPt1) % cNo1; + Base::Vector3f cNo3 = (rP - rPt1) % (rPt2 - rPt1); + float fD2 = Base::DistanceP2(rPt1, rPt2); + float fTV = (rP - rPt1) * (rPt2 - rPt1); - return false; + // Point is on the edge + if (cNo3.Length() < FLOAT_EPS) { + return SplitOpenEdge(ulFacetPos, i, rP); + } + else if ((rP - rPt1) * cNo2 > 0.0f && fD2 >= fTV && fTV >= 0.0f) { + MeshFacet cTria; + cTria._aulPoints[0] = this->GetOrAddIndex(rP); + cTria._aulPoints[1] = rFace._aulPoints[(i + 1) % 3]; + cTria._aulPoints[2] = rFace._aulPoints[i]; + cTria._aulNeighbours[1] = ulFacetPos; + rFace._aulNeighbours[i] = _rclMesh.CountFacets(); + _rclMesh._aclFacetArray.push_back(cTria); + return true; + } + } + } + + return false; } void MeshTopoAlgorithm::OptimizeTopology(float fMaxAngle) { // For each internal edge get the adjacent facets. When doing an edge swap we must update // this structure. - std::map, std::vector > aEdge2Face; - for (MeshFacetArray::_TIterator pI = _rclMesh._aclFacetArray.begin(); pI != _rclMesh._aclFacetArray.end(); ++pI) { + std::map, std::vector> aEdge2Face; + for (MeshFacetArray::_TIterator pI = _rclMesh._aclFacetArray.begin(); + pI != _rclMesh._aclFacetArray.end(); + ++pI) { for (int i = 0; i < 3; i++) { // ignore open edges if (pI->_aulNeighbours[i] != FACET_INDEX_MAX) { - PointIndex ulPt0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - PointIndex ulPt1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - aEdge2Face[std::pair(ulPt0, ulPt1)].push_back(pI - _rclMesh._aclFacetArray.begin()); + PointIndex ulPt0 = + std::min(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + PointIndex ulPt1 = + std::max(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + aEdge2Face[std::pair(ulPt0, ulPt1)].push_back( + pI - _rclMesh._aclFacetArray.begin()); } } } // fill up this list with all internal edges and perform swap edges until this list is empty - std::list > aEdgeList; - std::map, std::vector >::iterator pE; + std::list> aEdgeList; + std::map, std::vector>::iterator pE; for (pE = aEdge2Face.begin(); pE != aEdge2Face.end(); ++pE) { - if (pE->second.size() == 2) // make sure that we really have an internal edge + if (pE->second.size() == 2) { // make sure that we really have an internal edge aEdgeList.push_back(pE->first); + } } // to be sure to avoid an endless loop @@ -173,18 +180,20 @@ void MeshTopoAlgorithm::OptimizeTopology(float fMaxAngle) uMaxIter--; // get the adjacent facets to this edge - pE = aEdge2Face.find( aEdge ); + pE = aEdge2Face.find(aEdge); // this edge has been removed some iterations before - if (pE == aEdge2Face.end()) + if (pE == aEdge2Face.end()) { continue; + } // Is swap edge allowed and sensible? - if (!ShouldSwapEdge(pE->second[0], pE->second[1], fMaxAngle)) + if (!ShouldSwapEdge(pE->second[0], pE->second[1], fMaxAngle)) { continue; + } // ok, here we should perform a swap edge to minimize the maximum angle - if ( /*fMax12 > fMax34*/true ) { + if (/*fMax12 > fMax34*/ true) { // swap the edge SwapEdge(pE->second[0], pE->second[1]); @@ -194,36 +203,44 @@ void MeshTopoAlgorithm::OptimizeTopology(float fMaxAngle) unsigned short side2 = rF2.Side(aEdge.first, aEdge.second); // adjust the edge list - for (int i=0; i<3; i++) { - std::map, std::vector >::iterator it; + for (int i = 0; i < 3; i++) { + std::map, std::vector>::iterator it; // first facet - PointIndex ulPt0 = std::min(rF1._aulPoints[i], rF1._aulPoints[(i+1)%3]); - PointIndex ulPt1 = std::max(rF1._aulPoints[i], rF1._aulPoints[(i+1)%3]); - it = aEdge2Face.find( std::make_pair(ulPt0, ulPt1) ); + PointIndex ulPt0 = + std::min(rF1._aulPoints[i], rF1._aulPoints[(i + 1) % 3]); + PointIndex ulPt1 = + std::max(rF1._aulPoints[i], rF1._aulPoints[(i + 1) % 3]); + it = aEdge2Face.find(std::make_pair(ulPt0, ulPt1)); if (it != aEdge2Face.end()) { - if (it->second[0] == pE->second[1]) + if (it->second[0] == pE->second[1]) { it->second[0] = pE->second[0]; - else if (it->second[1] == pE->second[1]) + } + else if (it->second[1] == pE->second[1]) { it->second[1] = pE->second[0]; - aEdgeList.push_back( it->first ); + } + aEdgeList.push_back(it->first); } // second facet - ulPt0 = std::min(rF2._aulPoints[i], rF2._aulPoints[(i+1)%3]); - ulPt1 = std::max(rF2._aulPoints[i], rF2._aulPoints[(i+1)%3]); - it = aEdge2Face.find( std::make_pair(ulPt0, ulPt1) ); + ulPt0 = std::min(rF2._aulPoints[i], rF2._aulPoints[(i + 1) % 3]); + ulPt1 = std::max(rF2._aulPoints[i], rF2._aulPoints[(i + 1) % 3]); + it = aEdge2Face.find(std::make_pair(ulPt0, ulPt1)); if (it != aEdge2Face.end()) { - if (it->second[0] == pE->second[0]) + if (it->second[0] == pE->second[0]) { it->second[0] = pE->second[1]; - else if (it->second[1] == pE->second[0]) + } + else if (it->second[1] == pE->second[0]) { it->second[1] = pE->second[1]; - aEdgeList.push_back( it->first ); + } + aEdgeList.push_back(it->first); } } // Now we must remove the edge and replace it through the new edge - PointIndex ulPt0 = std::min(rF1._aulPoints[(side1+1)%3], rF2._aulPoints[(side2+1)%3]); - PointIndex ulPt1 = std::max(rF1._aulPoints[(side1+1)%3], rF2._aulPoints[(side2+1)%3]); + PointIndex ulPt0 = std::min(rF1._aulPoints[(side1 + 1) % 3], + rF2._aulPoints[(side2 + 1) % 3]); + PointIndex ulPt1 = std::max(rF1._aulPoints[(side1 + 1) % 3], + rF2._aulPoints[(side2 + 1) % 3]); std::pair aNewEdge = std::make_pair(ulPt0, ulPt1); aEdge2Face[aNewEdge] = pE->second; aEdge2Face.erase(pE); @@ -232,29 +249,32 @@ void MeshTopoAlgorithm::OptimizeTopology(float fMaxAngle) } // Cosine of the maximum angle in triangle (v1,v2,v3) -static float cos_maxangle(const Base::Vector3f &v1, - const Base::Vector3f &v2, - const Base::Vector3f &v3) +static float +cos_maxangle(const Base::Vector3f& v1, const Base::Vector3f& v2, const Base::Vector3f& v3) { - float a = Base::Distance(v2,v3); - float b = Base::Distance(v3,v1); - float c = Base::Distance(v1,v2); - float A = a * (b*b + c*c - a*a); - float B = b * (c*c + a*a - b*b); - float C = c * (a*a + b*b - c*c); - return 0.5f * std::min(std::min(A,B),C) / (a*b*c); // min cosine == max angle + float a = Base::Distance(v2, v3); + float b = Base::Distance(v3, v1); + float c = Base::Distance(v1, v2); + float A = a * (b * b + c * c - a * a); + float B = b * (c * c + a * a - b * b); + float C = c * (a * a + b * b - c * c); + return 0.5f * std::min(std::min(A, B), C) + / (a * b * c); // min cosine == max angle } -static float swap_benefit(const Base::Vector3f &v1, const Base::Vector3f &v2, - const Base::Vector3f &v3, const Base::Vector3f &v4) +static float swap_benefit(const Base::Vector3f& v1, + const Base::Vector3f& v2, + const Base::Vector3f& v3, + const Base::Vector3f& v4) { Base::Vector3f n124 = (v4 - v2) % (v1 - v2); Base::Vector3f n234 = (v3 - v2) % (v4 - v2); - if ((n124 * n234) <= 0.0f) - return 0.0f; // avoid normal flip + if ((n124 * n234) <= 0.0f) { + return 0.0f; // avoid normal flip + } - return std::max(-cos_maxangle(v1,v2,v3), -cos_maxangle(v1,v3,v4)) - - std::max(-cos_maxangle(v1,v2,v4), -cos_maxangle(v2,v3,v4)); + return std::max(-cos_maxangle(v1, v2, v3), -cos_maxangle(v1, v3, v4)) + - std::max(-cos_maxangle(v1, v2, v4), -cos_maxangle(v2, v3, v4)); } float MeshTopoAlgorithm::SwapEdgeBenefit(FacetIndex f, int e) const @@ -263,29 +283,29 @@ float MeshTopoAlgorithm::SwapEdgeBenefit(FacetIndex f, int e) const const MeshPointArray& vertices = _rclMesh.GetPoints(); FacetIndex n = faces[f]._aulNeighbours[e]; - if (n == FACET_INDEX_MAX) - return 0.0f; // border edge + if (n == FACET_INDEX_MAX) { + return 0.0f; // border edge + } PointIndex v1 = faces[f]._aulPoints[e]; - PointIndex v2 = faces[f]._aulPoints[(e+1)%3]; - PointIndex v3 = faces[f]._aulPoints[(e+2)%3]; + PointIndex v2 = faces[f]._aulPoints[(e + 1) % 3]; + PointIndex v3 = faces[f]._aulPoints[(e + 2) % 3]; unsigned short s = faces[n].Side(faces[f]); if (s == USHRT_MAX) { std::cerr << "MeshTopoAlgorithm::SwapEdgeBenefit: error in neighbourhood " << "of faces " << f << " and " << n << std::endl; - return 0.0f; // topological error + return 0.0f; // topological error } - PointIndex v4 = faces[n]._aulPoints[(s+2)%3]; + PointIndex v4 = faces[n]._aulPoints[(s + 2) % 3]; if (v3 == v4) { - std::cerr << "MeshTopoAlgorithm::SwapEdgeBenefit: duplicate faces " - << f << " and " << n << std::endl; - return 0.0f; // duplicate faces + std::cerr << "MeshTopoAlgorithm::SwapEdgeBenefit: duplicate faces " << f << " and " << n + << std::endl; + return 0.0f; // duplicate faces } - return swap_benefit(vertices[v2], vertices[v3], - vertices[v1], vertices[v4]); + return swap_benefit(vertices[v2], vertices[v3], vertices[v1], vertices[v4]); } -using FaceEdge = std::pair; // (face, edge) pair +using FaceEdge = std::pair; // (face, edge) pair using FaceEdgePriority = std::pair; void MeshTopoAlgorithm::OptimizeTopology() @@ -298,8 +318,9 @@ void MeshTopoAlgorithm::OptimizeTopology() for (FacetIndex i = 0; i < nf; i++) { for (int j = 0; j < 3; j++) { float b = SwapEdgeBenefit(i, j); - if (b > 0.0f) + if (b > 0.0f) { todo.push(std::make_pair(b, std::make_pair(i, j))); + } } } @@ -309,21 +330,24 @@ void MeshTopoAlgorithm::OptimizeTopology() int e = todo.top().second.second; todo.pop(); // Check again if the swap should still be done - if (SwapEdgeBenefit(f, e) <= 0.0f) + if (SwapEdgeBenefit(f, e) <= 0.0f) { continue; + } // OK, swap the edge FacetIndex f2 = faces[f]._aulNeighbours[e]; SwapEdge(f, f2); // Insert new edges into queue, if necessary for (int j = 0; j < 3; j++) { float b = SwapEdgeBenefit(f, j); - if (b > 0.0f) + if (b > 0.0f) { todo.push(std::make_pair(b, std::make_pair(f, j))); + } } for (int j = 0; j < 3; j++) { float b = SwapEdgeBenefit(f2, j); - if (b > 0.0f) + if (b > 0.0f) { todo.push(std::make_pair(b, std::make_pair(f2, j))); + } } } } @@ -331,9 +355,11 @@ void MeshTopoAlgorithm::OptimizeTopology() void MeshTopoAlgorithm::DelaunayFlip(float fMaxAngle) { // For each internal edge get the adjacent facets. - std::set > aEdge2Face; + std::set> aEdge2Face; FacetIndex index = 0; - for (MeshFacetArray::_TIterator pI = _rclMesh._aclFacetArray.begin(); pI != _rclMesh._aclFacetArray.end(); ++pI, index++) { + for (MeshFacetArray::_TIterator pI = _rclMesh._aclFacetArray.begin(); + pI != _rclMesh._aclFacetArray.end(); + ++pI, index++) { for (FacetIndex nbIndex : pI->_aulNeighbours) { // ignore open edges if (nbIndex != FACET_INDEX_MAX) { @@ -346,7 +372,7 @@ void MeshTopoAlgorithm::DelaunayFlip(float fMaxAngle) Base::Vector3f center; while (!aEdge2Face.empty()) { - std::set >::iterator it = aEdge2Face.begin(); + std::set>::iterator it = aEdge2Face.begin(); std::pair edge = *it; aEdge2Face.erase(it); if (ShouldSwapEdge(edge.first, edge.second, fMaxAngle)) { @@ -355,18 +381,24 @@ void MeshTopoAlgorithm::DelaunayFlip(float fMaxAngle) const MeshFacet& face_1 = _rclMesh._aclFacetArray[edge.first]; const MeshFacet& face_2 = _rclMesh._aclFacetArray[edge.second]; unsigned short side = face_2.Side(edge.first); - Base::Vector3f vertex = _rclMesh.GetPoint(face_2._aulPoints[(side+1)%3]); + Base::Vector3f vertex = _rclMesh.GetPoint(face_2._aulPoints[(side + 1) % 3]); if (Base::DistanceP2(center, vertex) < radius) { SwapEdge(edge.first, edge.second); - for (int i=0; i<3; i++) { - if (face_1._aulNeighbours[i] != FACET_INDEX_MAX && face_1._aulNeighbours[i] != edge.second) { - FacetIndex ulFt0 = std::min(edge.first, face_1._aulNeighbours[i]); - FacetIndex ulFt1 = std::max(edge.first, face_1._aulNeighbours[i]); + for (int i = 0; i < 3; i++) { + if (face_1._aulNeighbours[i] != FACET_INDEX_MAX + && face_1._aulNeighbours[i] != edge.second) { + FacetIndex ulFt0 = + std::min(edge.first, face_1._aulNeighbours[i]); + FacetIndex ulFt1 = + std::max(edge.first, face_1._aulNeighbours[i]); aEdge2Face.insert(std::pair(ulFt0, ulFt1)); } - if (face_2._aulNeighbours[i] != FACET_INDEX_MAX && face_2._aulNeighbours[i] != edge.first) { - FacetIndex ulFt0 = std::min(edge.second, face_2._aulNeighbours[i]); - FacetIndex ulFt1 = std::max(edge.second, face_2._aulNeighbours[i]); + if (face_2._aulNeighbours[i] != FACET_INDEX_MAX + && face_2._aulNeighbours[i] != edge.first) { + FacetIndex ulFt0 = + std::min(edge.second, face_2._aulNeighbours[i]); + FacetIndex ulFt1 = + std::max(edge.second, face_2._aulNeighbours[i]); aEdge2Face.insert(std::pair(ulFt0, ulFt1)); } } @@ -377,29 +409,31 @@ void MeshTopoAlgorithm::DelaunayFlip(float fMaxAngle) int MeshTopoAlgorithm::DelaunayFlip() { - int cnt_swap=0; + int cnt_swap = 0; _rclMesh._aclFacetArray.ResetFlag(MeshFacet::TMP0); size_t cnt_facets = _rclMesh._aclFacetArray.size(); - for (size_t i=0;i > aPnts; - MeshPointIterator cPIt( _rclMesh ); - aPnts.reserve(_rclMesh.CountPoints()); - for ( cPIt.Init(); cPIt.More(); cPIt.Next() ) - aPnts.emplace_back( cPIt->x, cPIt->y, cPIt->z ); - - // get all point connections - std::vector aIdx; - const MeshFacetArray& raFts = _rclMesh.GetFacets(); - aIdx.reserve( 3*raFts.size() ); - - // Build map of edges to the referencing facets - FacetIndex k = 0; - std::map, std::list > aclEdgeMap; - for ( std::vector::const_iterator jt = raFts.begin(); jt != raFts.end(); ++jt, k++ ) - { - for (int i=0; i<3; i++) - { - PointIndex ulT0 = jt->_aulPoints[i]; - PointIndex ulT1 = jt->_aulPoints[(i+1)%3]; - PointIndex ulP0 = std::min(ulT0, ulT1); - PointIndex ulP1 = std::max(ulT0, ulT1); - aclEdgeMap[std::make_pair(ulP0, ulP1)].push_front(k); - aIdx.push_back( static_cast(jt->_aulPoints[i]) ); + std::vector> aPnts; + MeshPointIterator cPIt(_rclMesh); + aPnts.reserve(_rclMesh.CountPoints()); + for (cPIt.Init(); cPIt.More(); cPIt.Next()) { + aPnts.emplace_back(cPIt->x, cPIt->y, cPIt->z); } - } - // compute vertex based curvatures - Wm4::MeshCurvature meshCurv(static_cast(_rclMesh.CountPoints()), &(aPnts[0]), - static_cast(_rclMesh.CountFacets()), &(aIdx[0])); + // get all point connections + std::vector aIdx; + const MeshFacetArray& raFts = _rclMesh.GetFacets(); + aIdx.reserve(3 * raFts.size()); - // get curvature information now - const Wm4::Vector3* aMaxCurvDir = meshCurv.GetMaxDirections(); - const Wm4::Vector3* aMinCurvDir = meshCurv.GetMinDirections(); - const float* aMaxCurv = meshCurv.GetMaxCurvatures(); - const float* aMinCurv = meshCurv.GetMinCurvatures(); - - raFts.ResetFlag(MeshFacet::VISIT); - const MeshPointArray& raPts = _rclMesh.GetPoints(); - for (auto & kt : aclEdgeMap) - { - if ( kt.second.size() == 2 ) { - PointIndex uPt1 = kt.first.first; - PointIndex uPt2 = kt.first.second; - FacetIndex uFt1 = kt.second.front(); - FacetIndex uFt2 = kt.second.back(); - - const MeshFacet& rFace1 = raFts[uFt1]; - const MeshFacet& rFace2 = raFts[uFt2]; - if ( rFace1.IsFlag(MeshFacet::VISIT) || rFace2.IsFlag(MeshFacet::VISIT) ) - continue; - - PointIndex uPt3, uPt4; - unsigned short side = rFace1.Side(uPt1, uPt2); - uPt3 = rFace1._aulPoints[(side+2)%3]; - side = rFace2.Side(uPt1, uPt2); - uPt4 = rFace2._aulPoints[(side+2)%3]; - - Wm4::Vector3 dir; - float fActCurvature; - if ( fabs(aMinCurv[uPt1]) > fabs(aMaxCurv[uPt1]) ) { - fActCurvature = aMinCurv[uPt1]; - dir = aMaxCurvDir[uPt1]; - } else { - fActCurvature = aMaxCurv[uPt1]; - dir = aMinCurvDir[uPt1]; - } - - Base::Vector3f cMinDir(dir.X(), dir.Y(), dir.Z()); - Base::Vector3f cEdgeDir1 = raPts[uPt1] - raPts[uPt2]; - Base::Vector3f cEdgeDir2 = raPts[uPt3] - raPts[uPt4]; - cMinDir.Normalize(); cEdgeDir1.Normalize(); cEdgeDir2.Normalize(); - - // get the plane and calculate the distance to the fourth point - MeshGeomFacet cPlane(raPts[uPt1], raPts[uPt2], raPts[uPt3]); - // positive or negative distance - float fDist = raPts[uPt4].DistanceToPlane(cPlane._aclPoints[0], cPlane.GetNormal()); - - float fLength12 = Base::Distance(raPts[uPt1], raPts[uPt2]); - float fLength34 = Base::Distance(raPts[uPt3], raPts[uPt4]); - if ( fabs(cEdgeDir1*cMinDir) < fabs(cEdgeDir2*cMinDir) ) - { - if ( IsSwapEdgeLegal(uFt1, uFt2) && fLength34 < 1.05f*fLength12 && fActCurvature*fDist > 0.0f) { - SwapEdge(uFt1, uFt2); - rFace1.SetFlag(MeshFacet::VISIT); - rFace2.SetFlag(MeshFacet::VISIT); + // Build map of edges to the referencing facets + FacetIndex k = 0; + std::map, std::list> aclEdgeMap; + for (std::vector::const_iterator jt = raFts.begin(); jt != raFts.end(); ++jt, k++) { + for (int i = 0; i < 3; i++) { + PointIndex ulT0 = jt->_aulPoints[i]; + PointIndex ulT1 = jt->_aulPoints[(i + 1) % 3]; + PointIndex ulP0 = std::min(ulT0, ulT1); + PointIndex ulP1 = std::max(ulT0, ulT1); + aclEdgeMap[std::make_pair(ulP0, ulP1)].push_front(k); + aIdx.push_back(static_cast(jt->_aulPoints[i])); + } + } + + // compute vertex based curvatures + Wm4::MeshCurvature meshCurv(static_cast(_rclMesh.CountPoints()), + &(aPnts[0]), + static_cast(_rclMesh.CountFacets()), + &(aIdx[0])); + + // get curvature information now + const Wm4::Vector3* aMaxCurvDir = meshCurv.GetMaxDirections(); + const Wm4::Vector3* aMinCurvDir = meshCurv.GetMinDirections(); + const float* aMaxCurv = meshCurv.GetMaxCurvatures(); + const float* aMinCurv = meshCurv.GetMinCurvatures(); + + raFts.ResetFlag(MeshFacet::VISIT); + const MeshPointArray& raPts = _rclMesh.GetPoints(); + for (auto& kt : aclEdgeMap) { + if (kt.second.size() == 2) { + PointIndex uPt1 = kt.first.first; + PointIndex uPt2 = kt.first.second; + FacetIndex uFt1 = kt.second.front(); + FacetIndex uFt2 = kt.second.back(); + + const MeshFacet& rFace1 = raFts[uFt1]; + const MeshFacet& rFace2 = raFts[uFt2]; + if (rFace1.IsFlag(MeshFacet::VISIT) || rFace2.IsFlag(MeshFacet::VISIT)) { + continue; + } + + PointIndex uPt3, uPt4; + unsigned short side = rFace1.Side(uPt1, uPt2); + uPt3 = rFace1._aulPoints[(side + 2) % 3]; + side = rFace2.Side(uPt1, uPt2); + uPt4 = rFace2._aulPoints[(side + 2) % 3]; + + Wm4::Vector3 dir; + float fActCurvature; + if (fabs(aMinCurv[uPt1]) > fabs(aMaxCurv[uPt1])) { + fActCurvature = aMinCurv[uPt1]; + dir = aMaxCurvDir[uPt1]; + } + else { + fActCurvature = aMaxCurv[uPt1]; + dir = aMinCurvDir[uPt1]; + } + + Base::Vector3f cMinDir(dir.X(), dir.Y(), dir.Z()); + Base::Vector3f cEdgeDir1 = raPts[uPt1] - raPts[uPt2]; + Base::Vector3f cEdgeDir2 = raPts[uPt3] - raPts[uPt4]; + cMinDir.Normalize(); + cEdgeDir1.Normalize(); + cEdgeDir2.Normalize(); + + // get the plane and calculate the distance to the fourth point + MeshGeomFacet cPlane(raPts[uPt1], raPts[uPt2], raPts[uPt3]); + // positive or negative distance + float fDist = raPts[uPt4].DistanceToPlane(cPlane._aclPoints[0], cPlane.GetNormal()); + + float fLength12 = Base::Distance(raPts[uPt1], raPts[uPt2]); + float fLength34 = Base::Distance(raPts[uPt3], raPts[uPt4]); + if (fabs(cEdgeDir1 * cMinDir) < fabs(cEdgeDir2 * cMinDir)) { + if (IsSwapEdgeLegal(uFt1, uFt2) && fLength34 < 1.05f * fLength12 + && fActCurvature * fDist > 0.0f) { + SwapEdge(uFt1, uFt2); + rFace1.SetFlag(MeshFacet::VISIT); + rFace2.SetFlag(MeshFacet::VISIT); + } + } } - } } - } } -bool MeshTopoAlgorithm::InsertVertexAndSwapEdge(FacetIndex ulFacetPos, const Base::Vector3f& rclPoint, float fMaxAngle) +bool MeshTopoAlgorithm::InsertVertexAndSwapEdge(FacetIndex ulFacetPos, + const Base::Vector3f& rclPoint, + float fMaxAngle) { - if ( !InsertVertex(ulFacetPos, rclPoint) ) - return false; - - // get the created elements - FacetIndex ulF1Ind = _rclMesh._aclFacetArray.size()-2; - FacetIndex ulF2Ind = _rclMesh._aclFacetArray.size()-1; - MeshFacet& rclF1 = _rclMesh._aclFacetArray[ulFacetPos]; - MeshFacet& rclF2 = _rclMesh._aclFacetArray[ulF1Ind]; - MeshFacet& rclF3 = _rclMesh._aclFacetArray[ulF2Ind]; - - // first facet - for (FacetIndex uNeighbour : rclF1._aulNeighbours) - { - if ( uNeighbour!=FACET_INDEX_MAX && uNeighbour!=ulF1Ind && uNeighbour!=ulF2Ind ) - { - if ( ShouldSwapEdge(ulFacetPos, uNeighbour, fMaxAngle) ) { - SwapEdge(ulFacetPos, uNeighbour); - break; - } + if (!InsertVertex(ulFacetPos, rclPoint)) { + return false; } - } - for (FacetIndex uNeighbour : rclF2._aulNeighbours) - { - // second facet - if ( uNeighbour!=FACET_INDEX_MAX && uNeighbour!=ulFacetPos && uNeighbour!=ulF2Ind ) - { - if ( ShouldSwapEdge(ulF1Ind, uNeighbour, fMaxAngle) ) { - SwapEdge(ulF1Ind, uNeighbour); - break; - } - } - } - // third facet - for (FacetIndex uNeighbour : rclF3._aulNeighbours) - { - if ( uNeighbour!=FACET_INDEX_MAX && uNeighbour!=ulFacetPos && uNeighbour!=ulF1Ind ) - { - if ( ShouldSwapEdge(ulF2Ind, uNeighbour, fMaxAngle) ) { - SwapEdge(ulF2Ind, uNeighbour); - break; - } - } - } + // get the created elements + FacetIndex ulF1Ind = _rclMesh._aclFacetArray.size() - 2; + FacetIndex ulF2Ind = _rclMesh._aclFacetArray.size() - 1; + MeshFacet& rclF1 = _rclMesh._aclFacetArray[ulFacetPos]; + MeshFacet& rclF2 = _rclMesh._aclFacetArray[ulF1Ind]; + MeshFacet& rclF3 = _rclMesh._aclFacetArray[ulF2Ind]; - return true; + // first facet + for (FacetIndex uNeighbour : rclF1._aulNeighbours) { + if (uNeighbour != FACET_INDEX_MAX && uNeighbour != ulF1Ind && uNeighbour != ulF2Ind) { + if (ShouldSwapEdge(ulFacetPos, uNeighbour, fMaxAngle)) { + SwapEdge(ulFacetPos, uNeighbour); + break; + } + } + } + for (FacetIndex uNeighbour : rclF2._aulNeighbours) { + // second facet + if (uNeighbour != FACET_INDEX_MAX && uNeighbour != ulFacetPos && uNeighbour != ulF2Ind) { + if (ShouldSwapEdge(ulF1Ind, uNeighbour, fMaxAngle)) { + SwapEdge(ulF1Ind, uNeighbour); + break; + } + } + } + + // third facet + for (FacetIndex uNeighbour : rclF3._aulNeighbours) { + if (uNeighbour != FACET_INDEX_MAX && uNeighbour != ulFacetPos && uNeighbour != ulF1Ind) { + if (ShouldSwapEdge(ulF2Ind, uNeighbour, fMaxAngle)) { + SwapEdge(ulF2Ind, uNeighbour); + break; + } + } + } + + return true; } bool MeshTopoAlgorithm::IsSwapEdgeLegal(FacetIndex ulFacetPos, FacetIndex ulNeighbour) const @@ -567,42 +602,50 @@ bool MeshTopoAlgorithm::IsSwapEdgeLegal(FacetIndex ulFacetPos, FacetIndex ulNeig unsigned short uFSide = rclF.Side(rclN); unsigned short uNSide = rclN.Side(rclF); - if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) - return false; // not neighbours + if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) { + return false; // not neighbours + } Base::Vector3f cP1 = _rclMesh._aclPointArray[rclF._aulPoints[uFSide]]; - Base::Vector3f cP2 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide+1)%3]]; - Base::Vector3f cP3 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide+2)%3]]; - Base::Vector3f cP4 = _rclMesh._aclPointArray[rclN._aulPoints[(uNSide+2)%3]]; + Base::Vector3f cP2 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide + 1) % 3]]; + Base::Vector3f cP3 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide + 2) % 3]]; + Base::Vector3f cP4 = _rclMesh._aclPointArray[rclN._aulPoints[(uNSide + 2) % 3]]; // do not allow to create degenerated triangles MeshGeomFacet cT3(cP4, cP3, cP1); - if (cT3.IsDegenerated(MeshDefinitions::_fMinPointDistanceP2)) + if (cT3.IsDegenerated(MeshDefinitions::_fMinPointDistanceP2)) { return false; + } MeshGeomFacet cT4(cP3, cP4, cP2); - if (cT4.IsDegenerated(MeshDefinitions::_fMinPointDistanceP2)) + if (cT4.IsDegenerated(MeshDefinitions::_fMinPointDistanceP2)) { return false; + } // We must make sure that the two adjacent triangles builds a convex polygon, otherwise // the swap edge operation is illegal - Base::Vector3f cU = cP2-cP1; - Base::Vector3f cV = cP4-cP3; + Base::Vector3f cU = cP2 - cP1; + Base::Vector3f cV = cP4 - cP3; // build a helper plane through cP1 that must separate cP3 and cP4 Base::Vector3f cN1 = (cU % cV) % cU; - if (((cP3-cP1)*cN1)*((cP4-cP1)*cN1) >= 0.0f) - return false; // not convex + if (((cP3 - cP1) * cN1) * ((cP4 - cP1) * cN1) >= 0.0f) { + return false; // not convex + } // build a helper plane through cP3 that must separate cP1 and cP2 Base::Vector3f cN2 = (cU % cV) % cV; - if (((cP1-cP3)*cN2)*((cP2-cP3)*cN2) >= 0.0f) - return false; // not convex + if (((cP1 - cP3) * cN2) * ((cP2 - cP3) * cN2) >= 0.0f) { + return false; // not convex + } return true; } -bool MeshTopoAlgorithm::ShouldSwapEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, float fMaxAngle) const +bool MeshTopoAlgorithm::ShouldSwapEdge(FacetIndex ulFacetPos, + FacetIndex ulNeighbour, + float fMaxAngle) const { - if (!IsSwapEdgeLegal(ulFacetPos, ulNeighbour)) + if (!IsSwapEdgeLegal(ulFacetPos, ulNeighbour)) { return false; + } MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; MeshFacet& rclN = _rclMesh._aclFacetArray[ulNeighbour]; @@ -611,25 +654,30 @@ bool MeshTopoAlgorithm::ShouldSwapEdge(FacetIndex ulFacetPos, FacetIndex ulNeigh unsigned short uNSide = rclN.Side(rclF); Base::Vector3f cP1 = _rclMesh._aclPointArray[rclF._aulPoints[uFSide]]; - Base::Vector3f cP2 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide+1)%3]]; - Base::Vector3f cP3 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide+2)%3]]; - Base::Vector3f cP4 = _rclMesh._aclPointArray[rclN._aulPoints[(uNSide+2)%3]]; + Base::Vector3f cP2 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide + 1) % 3]]; + Base::Vector3f cP3 = _rclMesh._aclPointArray[rclF._aulPoints[(uFSide + 2) % 3]]; + Base::Vector3f cP4 = _rclMesh._aclPointArray[rclN._aulPoints[(uNSide + 2) % 3]]; - MeshGeomFacet cT1(cP1, cP2, cP3); float fMax1 = cT1.MaximumAngle(); - MeshGeomFacet cT2(cP2, cP1, cP4); float fMax2 = cT2.MaximumAngle(); - MeshGeomFacet cT3(cP4, cP3, cP1); float fMax3 = cT3.MaximumAngle(); - MeshGeomFacet cT4(cP3, cP4, cP2); float fMax4 = cT4.MaximumAngle(); + MeshGeomFacet cT1(cP1, cP2, cP3); + float fMax1 = cT1.MaximumAngle(); + MeshGeomFacet cT2(cP2, cP1, cP4); + float fMax2 = cT2.MaximumAngle(); + MeshGeomFacet cT3(cP4, cP3, cP1); + float fMax3 = cT3.MaximumAngle(); + MeshGeomFacet cT4(cP3, cP4, cP2); + float fMax4 = cT4.MaximumAngle(); // get the angle between the triangles Base::Vector3f cN1 = cT1.GetNormal(); Base::Vector3f cN2 = cT2.GetNormal(); - if (cN1.GetAngle(cN2) > fMaxAngle) + if (cN1.GetAngle(cN2) > fMaxAngle) { return false; + } float fMax12 = std::max(fMax1, fMax2); float fMax34 = std::max(fMax3, fMax4); - return fMax12 > fMax34; + return fMax12 > fMax34; } void MeshTopoAlgorithm::SwapEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour) @@ -640,25 +688,33 @@ void MeshTopoAlgorithm::SwapEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour) unsigned short uFSide = rclF.Side(rclN); unsigned short uNSide = rclN.Side(rclF); - if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) - return; // not neighbours + if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) { + return; // not neighbours + } // adjust the neighbourhood - if (rclF._aulNeighbours[(uFSide+1)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide+1)%3]].ReplaceNeighbour(ulFacetPos, ulNeighbour); - if (rclN._aulNeighbours[(uNSide+1)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide+1)%3]].ReplaceNeighbour(ulNeighbour, ulFacetPos); + if (rclF._aulNeighbours[(uFSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide + 1) % 3]].ReplaceNeighbour( + ulFacetPos, + ulNeighbour); + } + if (rclN._aulNeighbours[(uNSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide + 1) % 3]].ReplaceNeighbour(ulNeighbour, + ulFacetPos); + } // swap the point and neighbour indices - rclF._aulPoints[(uFSide+1)%3] = rclN._aulPoints[(uNSide+2)%3]; - rclN._aulPoints[(uNSide+1)%3] = rclF._aulPoints[(uFSide+2)%3]; - rclF._aulNeighbours[uFSide] = rclN._aulNeighbours[(uNSide+1)%3]; - rclN._aulNeighbours[uNSide] = rclF._aulNeighbours[(uFSide+1)%3]; - rclF._aulNeighbours[(uFSide+1)%3] = ulNeighbour; - rclN._aulNeighbours[(uNSide+1)%3] = ulFacetPos; + rclF._aulPoints[(uFSide + 1) % 3] = rclN._aulPoints[(uNSide + 2) % 3]; + rclN._aulPoints[(uNSide + 1) % 3] = rclF._aulPoints[(uFSide + 2) % 3]; + rclF._aulNeighbours[uFSide] = rclN._aulNeighbours[(uNSide + 1) % 3]; + rclN._aulNeighbours[uNSide] = rclF._aulNeighbours[(uFSide + 1) % 3]; + rclF._aulNeighbours[(uFSide + 1) % 3] = ulNeighbour; + rclN._aulNeighbours[(uNSide + 1) % 3] = ulFacetPos; } -bool MeshTopoAlgorithm::SplitEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, const Base::Vector3f& rP) +bool MeshTopoAlgorithm::SplitEdge(FacetIndex ulFacetPos, + FacetIndex ulNeighbour, + const Base::Vector3f& rP) { MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; MeshFacet& rclN = _rclMesh._aclFacetArray[ulNeighbour]; @@ -666,8 +722,9 @@ bool MeshTopoAlgorithm::SplitEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, unsigned short uFSide = rclF.Side(rclN); unsigned short uNSide = rclN.Side(rclF); - if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) - return false; // not neighbours + if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) { + return false; // not neighbours + } PointIndex uPtCnt = _rclMesh._aclPointArray.size(); PointIndex uPtInd = this->GetOrAddIndex(rP); @@ -675,35 +732,40 @@ bool MeshTopoAlgorithm::SplitEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, // the given point is already part of the mesh => creating new facets would // be an illegal operation - if (uPtInd < uPtCnt) + if (uPtInd < uPtCnt) { return false; + } // adjust the neighbourhood - if (rclF._aulNeighbours[(uFSide+1)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide+1)%3]].ReplaceNeighbour(ulFacetPos, ulSize); - if (rclN._aulNeighbours[(uNSide+2)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide+2)%3]].ReplaceNeighbour(ulNeighbour, ulSize+1); + if (rclF._aulNeighbours[(uFSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide + 1) % 3]].ReplaceNeighbour(ulFacetPos, + ulSize); + } + if (rclN._aulNeighbours[(uNSide + 2) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide + 2) % 3]].ReplaceNeighbour(ulNeighbour, + ulSize + 1); + } MeshFacet cNew1, cNew2; cNew1._aulPoints[0] = uPtInd; - cNew1._aulPoints[1] = rclF._aulPoints[(uFSide+1)%3]; - cNew1._aulPoints[2] = rclF._aulPoints[(uFSide+2)%3]; - cNew1._aulNeighbours[0] = ulSize+1; - cNew1._aulNeighbours[1] = rclF._aulNeighbours[(uFSide+1)%3]; + cNew1._aulPoints[1] = rclF._aulPoints[(uFSide + 1) % 3]; + cNew1._aulPoints[2] = rclF._aulPoints[(uFSide + 2) % 3]; + cNew1._aulNeighbours[0] = ulSize + 1; + cNew1._aulNeighbours[1] = rclF._aulNeighbours[(uFSide + 1) % 3]; cNew1._aulNeighbours[2] = ulFacetPos; cNew2._aulPoints[0] = rclN._aulPoints[uNSide]; cNew2._aulPoints[1] = uPtInd; - cNew2._aulPoints[2] = rclN._aulPoints[(uNSide+2)%3]; + cNew2._aulPoints[2] = rclN._aulPoints[(uNSide + 2) % 3]; cNew2._aulNeighbours[0] = ulSize; cNew2._aulNeighbours[1] = ulNeighbour; - cNew2._aulNeighbours[2] = rclN._aulNeighbours[(uNSide+2)%3]; + cNew2._aulNeighbours[2] = rclN._aulNeighbours[(uNSide + 2) % 3]; // adjust the facets - rclF._aulPoints[(uFSide+1)%3] = uPtInd; - rclF._aulNeighbours[(uFSide+1)%3] = ulSize; + rclF._aulPoints[(uFSide + 1) % 3] = uPtInd; + rclF._aulNeighbours[(uFSide + 1) % 3] = ulSize; rclN._aulPoints[uNSide] = uPtInd; - rclN._aulNeighbours[(uNSide+2)%3] = ulSize+1; + rclN._aulNeighbours[(uNSide + 2) % 3] = ulSize + 1; // insert new facets _rclMesh._aclFacetArray.push_back(cNew1); @@ -712,49 +774,59 @@ bool MeshTopoAlgorithm::SplitEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, return true; } -bool MeshTopoAlgorithm::SplitOpenEdge(FacetIndex ulFacetPos, unsigned short uSide, const Base::Vector3f& rP) +bool MeshTopoAlgorithm::SplitOpenEdge(FacetIndex ulFacetPos, + unsigned short uSide, + const Base::Vector3f& rP) { MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; - if (rclF._aulNeighbours[uSide] != FACET_INDEX_MAX) - return false; // not open + if (rclF._aulNeighbours[uSide] != FACET_INDEX_MAX) { + return false; // not open + } PointIndex uPtCnt = _rclMesh._aclPointArray.size(); PointIndex uPtInd = this->GetOrAddIndex(rP); FacetIndex ulSize = _rclMesh._aclFacetArray.size(); - if (uPtInd < uPtCnt) - return false; // the given point is already part of the mesh => creating new facets would be an illegal operation + if (uPtInd < uPtCnt) { + return false; // the given point is already part of the mesh => creating new facets would + // be an illegal operation + } // adjust the neighbourhood - if (rclF._aulNeighbours[(uSide+1)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclF._aulNeighbours[(uSide+1)%3]].ReplaceNeighbour(ulFacetPos, ulSize); + if (rclF._aulNeighbours[(uSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclF._aulNeighbours[(uSide + 1) % 3]].ReplaceNeighbour(ulFacetPos, + ulSize); + } MeshFacet cNew; cNew._aulPoints[0] = uPtInd; - cNew._aulPoints[1] = rclF._aulPoints[(uSide+1)%3]; - cNew._aulPoints[2] = rclF._aulPoints[(uSide+2)%3]; + cNew._aulPoints[1] = rclF._aulPoints[(uSide + 1) % 3]; + cNew._aulPoints[2] = rclF._aulPoints[(uSide + 2) % 3]; cNew._aulNeighbours[0] = FACET_INDEX_MAX; - cNew._aulNeighbours[1] = rclF._aulNeighbours[(uSide+1)%3]; + cNew._aulNeighbours[1] = rclF._aulNeighbours[(uSide + 1) % 3]; cNew._aulNeighbours[2] = ulFacetPos; // adjust the facets - rclF._aulPoints[(uSide+1)%3] = uPtInd; - rclF._aulNeighbours[(uSide+1)%3] = ulSize; + rclF._aulPoints[(uSide + 1) % 3] = uPtInd; + rclF._aulNeighbours[(uSide + 1) % 3] = ulSize; // insert new facets _rclMesh._aclFacetArray.push_back(cNew); return true; } -bool MeshTopoAlgorithm::Vertex_Less::operator ()(const Base::Vector3f& u, - const Base::Vector3f& v) const +bool MeshTopoAlgorithm::Vertex_Less::operator()(const Base::Vector3f& u, + const Base::Vector3f& v) const { - if (fabs (u.x - v.x) > FLOAT_EPS) + if (fabs(u.x - v.x) > FLOAT_EPS) { return u.x < v.x; - if (fabs (u.y - v.y) > FLOAT_EPS) + } + if (fabs(u.y - v.y) > FLOAT_EPS) { return u.y < v.y; - if (fabs (u.z - v.z) > FLOAT_EPS) + } + if (fabs(u.z - v.z) > FLOAT_EPS) { return u.z < v.z; + } return false; } @@ -765,8 +837,8 @@ void MeshTopoAlgorithm::BeginCache() } _cache = new tCache(); PointIndex nbPoints = _rclMesh._aclPointArray.size(); - for (unsigned int pntCpt = 0 ; pntCpt < nbPoints ; ++pntCpt) { - _cache->insert(std::make_pair(_rclMesh._aclPointArray[pntCpt],pntCpt)); + for (unsigned int pntCpt = 0; pntCpt < nbPoints; ++pntCpt) { + _cache->insert(std::make_pair(_rclMesh._aclPointArray[pntCpt], pntCpt)); } } @@ -779,19 +851,22 @@ void MeshTopoAlgorithm::EndCache() } } -PointIndex MeshTopoAlgorithm::GetOrAddIndex (const MeshPoint &rclPoint) +PointIndex MeshTopoAlgorithm::GetOrAddIndex(const MeshPoint& rclPoint) { - if (!_cache) + if (!_cache) { return _rclMesh._aclPointArray.GetOrAddIndex(rclPoint); + } unsigned long sz = _rclMesh._aclPointArray.size(); - std::pair retval = _cache->insert(std::make_pair(rclPoint,sz)); - if (retval.second) + std::pair retval = _cache->insert(std::make_pair(rclPoint, sz)); + if (retval.second) { _rclMesh._aclPointArray.push_back(rclPoint); + } return retval.first->second; } -std::vector MeshTopoAlgorithm::GetFacetsToPoint(FacetIndex uFacetPos, PointIndex uPointPos) const +std::vector MeshTopoAlgorithm::GetFacetsToPoint(FacetIndex uFacetPos, + PointIndex uPointPos) const { // get all facets this point is referenced by std::list aReference; @@ -802,22 +877,24 @@ std::vector MeshTopoAlgorithm::GetFacetsToPoint(FacetIndex uFacetPos aReference.pop_front(); aRefFacet.insert(uIndex); MeshFacet& rFace = _rclMesh._aclFacetArray[uIndex]; - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { if (rFace._aulPoints[i] == uPointPos) { if (rFace._aulNeighbours[i] != FACET_INDEX_MAX) { - if (aRefFacet.find(rFace._aulNeighbours[i]) == aRefFacet.end()) - aReference.push_back( rFace._aulNeighbours[i] ); + if (aRefFacet.find(rFace._aulNeighbours[i]) == aRefFacet.end()) { + aReference.push_back(rFace._aulNeighbours[i]); + } } - if (rFace._aulNeighbours[(i+2)%3] != FACET_INDEX_MAX) { - if (aRefFacet.find(rFace._aulNeighbours[(i+2)%3]) == aRefFacet.end()) - aReference.push_back( rFace._aulNeighbours[(i+2)%3] ); + if (rFace._aulNeighbours[(i + 2) % 3] != FACET_INDEX_MAX) { + if (aRefFacet.find(rFace._aulNeighbours[(i + 2) % 3]) == aRefFacet.end()) { + aReference.push_back(rFace._aulNeighbours[(i + 2) % 3]); + } } break; } } } - //copy the items + // copy the items std::vector aRefs; aRefs.insert(aRefs.end(), aRefFacet.begin(), aRefFacet.end()); return aRefs; @@ -831,14 +908,17 @@ void MeshTopoAlgorithm::Cleanup() bool MeshTopoAlgorithm::CollapseVertex(const VertexCollapse& vc) { - if (vc._circumFacets.size() != vc._circumPoints.size()) + if (vc._circumFacets.size() != vc._circumPoints.size()) { return false; + } - if (vc._circumFacets.size() != 3) + if (vc._circumFacets.size() != 3) { return false; + } - if (!_rclMesh._aclPointArray[vc._point].IsValid()) - return false; // the point is marked invalid from a previous run + if (!_rclMesh._aclPointArray[vc._point].IsValid()) { + return false; // the point is marked invalid from a previous run + } MeshFacet& rFace1 = _rclMesh._aclFacetArray[vc._circumFacets[0]]; MeshFacet& rFace2 = _rclMesh._aclFacetArray[vc._circumFacets[1]]; @@ -854,15 +934,16 @@ bool MeshTopoAlgorithm::CollapseVertex(const VertexCollapse& vc) } } - if (ptIndex == POINT_INDEX_MAX) + if (ptIndex == POINT_INDEX_MAX) { return false; + } FacetIndex neighbour1 = FACET_INDEX_MAX; FacetIndex neighbour2 = FACET_INDEX_MAX; const std::vector& faces = vc._circumFacets; // get neighbours that are not part of the faces to be removed - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { if (std::find(faces.begin(), faces.end(), rFace2._aulNeighbours[i]) == faces.end()) { neighbour1 = rFace2._aulNeighbours[i]; } @@ -897,54 +978,67 @@ bool MeshTopoAlgorithm::CollapseVertex(const VertexCollapse& vc) bool MeshTopoAlgorithm::CollapseEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour) { - MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; - MeshFacet& rclN = _rclMesh._aclFacetArray[ulNeighbour]; + MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; + MeshFacet& rclN = _rclMesh._aclFacetArray[ulNeighbour]; - unsigned short uFSide = rclF.Side(rclN); - unsigned short uNSide = rclN.Side(rclF); + unsigned short uFSide = rclF.Side(rclN); + unsigned short uNSide = rclN.Side(rclF); - if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) - return false; // not neighbours + if (uFSide == USHRT_MAX || uNSide == USHRT_MAX) { + return false; // not neighbours + } - if (!rclF.IsValid() || !rclN.IsValid()) - return false; // the facets are marked invalid from a previous run + if (!rclF.IsValid() || !rclN.IsValid()) { + return false; // the facets are marked invalid from a previous run + } - // get the point index we want to remove - PointIndex ulPointPos = rclF._aulPoints[uFSide]; - PointIndex ulPointNew = rclN._aulPoints[uNSide]; + // get the point index we want to remove + PointIndex ulPointPos = rclF._aulPoints[uFSide]; + PointIndex ulPointNew = rclN._aulPoints[uNSide]; - // get all facets this point is referenced by - std::vector aRefs = GetFacetsToPoint(ulFacetPos, ulPointPos); - for (FacetIndex it : aRefs) - { - MeshFacet& rFace = _rclMesh._aclFacetArray[it]; - rFace.Transpose( ulPointPos, ulPointNew ); - } + // get all facets this point is referenced by + std::vector aRefs = GetFacetsToPoint(ulFacetPos, ulPointPos); + for (FacetIndex it : aRefs) { + MeshFacet& rFace = _rclMesh._aclFacetArray[it]; + rFace.Transpose(ulPointPos, ulPointNew); + } - // set the new neighbourhood - if (rclF._aulNeighbours[(uFSide+1)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide+1)%3]].ReplaceNeighbour(ulFacetPos, rclF._aulNeighbours[(uFSide+2)%3]); - if (rclF._aulNeighbours[(uFSide+2)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide+2)%3]].ReplaceNeighbour(ulFacetPos, rclF._aulNeighbours[(uFSide+1)%3]); - if (rclN._aulNeighbours[(uNSide+1)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide+1)%3]].ReplaceNeighbour(ulNeighbour, rclN._aulNeighbours[(uNSide+2)%3]); - if (rclN._aulNeighbours[(uNSide+2)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide+2)%3]].ReplaceNeighbour(ulNeighbour, rclN._aulNeighbours[(uNSide+1)%3]); + // set the new neighbourhood + if (rclF._aulNeighbours[(uFSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide + 1) % 3]].ReplaceNeighbour( + ulFacetPos, + rclF._aulNeighbours[(uFSide + 2) % 3]); + } + if (rclF._aulNeighbours[(uFSide + 2) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclF._aulNeighbours[(uFSide + 2) % 3]].ReplaceNeighbour( + ulFacetPos, + rclF._aulNeighbours[(uFSide + 1) % 3]); + } + if (rclN._aulNeighbours[(uNSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide + 1) % 3]].ReplaceNeighbour( + ulNeighbour, + rclN._aulNeighbours[(uNSide + 2) % 3]); + } + if (rclN._aulNeighbours[(uNSide + 2) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide + 2) % 3]].ReplaceNeighbour( + ulNeighbour, + rclN._aulNeighbours[(uNSide + 1) % 3]); + } - // isolate the both facets and the point - rclF._aulNeighbours[0] = FACET_INDEX_MAX; - rclF._aulNeighbours[1] = FACET_INDEX_MAX; - rclF._aulNeighbours[2] = FACET_INDEX_MAX; - rclF.SetInvalid(); - rclN._aulNeighbours[0] = FACET_INDEX_MAX; - rclN._aulNeighbours[1] = FACET_INDEX_MAX; - rclN._aulNeighbours[2] = FACET_INDEX_MAX; - rclN.SetInvalid(); - _rclMesh._aclPointArray[ulPointPos].SetInvalid(); + // isolate the both facets and the point + rclF._aulNeighbours[0] = FACET_INDEX_MAX; + rclF._aulNeighbours[1] = FACET_INDEX_MAX; + rclF._aulNeighbours[2] = FACET_INDEX_MAX; + rclF.SetInvalid(); + rclN._aulNeighbours[0] = FACET_INDEX_MAX; + rclN._aulNeighbours[1] = FACET_INDEX_MAX; + rclN._aulNeighbours[2] = FACET_INDEX_MAX; + rclN.SetInvalid(); + _rclMesh._aclPointArray[ulPointPos].SetInvalid(); - _needsCleanup = true; + _needsCleanup = true; - return true; + return true; } bool MeshTopoAlgorithm::IsCollapseEdgeLegal(const EdgeCollapse& ec) const @@ -953,9 +1047,11 @@ bool MeshTopoAlgorithm::IsCollapseEdgeLegal(const EdgeCollapse& ec) const // Check connectivity // std::vector commonPoints; - std::set_intersection(ec._adjacentFrom.begin(), ec._adjacentFrom.end(), - ec._adjacentTo.begin(), ec._adjacentTo.end(), - std::back_insert_iterator >(commonPoints)); + std::set_intersection(ec._adjacentFrom.begin(), + ec._adjacentFrom.end(), + ec._adjacentTo.begin(), + ec._adjacentTo.end(), + std::back_insert_iterator>(commonPoints)); if (commonPoints.size() > 2) { return false; } @@ -964,34 +1060,40 @@ bool MeshTopoAlgorithm::IsCollapseEdgeLegal(const EdgeCollapse& ec) const std::vector::const_iterator it; for (it = ec._changeFacets.begin(); it != ec._changeFacets.end(); ++it) { MeshFacet f = _rclMesh._aclFacetArray[*it]; - if (!f.IsValid()) + if (!f.IsValid()) { return false; + } // ignore the facet(s) at this edge - if (f.HasPoint(ec._fromPoint) && f.HasPoint(ec._toPoint)) + if (f.HasPoint(ec._fromPoint) && f.HasPoint(ec._toPoint)) { continue; + } MeshGeomFacet tria1 = _rclMesh.GetFacet(f); f.Transpose(ec._fromPoint, ec._toPoint); MeshGeomFacet tria2 = _rclMesh.GetFacet(f); - if (tria1.GetNormal() * tria2.GetNormal() < 0.0f) + if (tria1.GetNormal() * tria2.GetNormal() < 0.0f) { return false; + } } // If the data structure is valid and the algorithm works as expected // it should never happen to reject the edge-collapse here! for (it = ec._removeFacets.begin(); it != ec._removeFacets.end(); ++it) { MeshFacet f = _rclMesh._aclFacetArray[*it]; - if (!f.IsValid()) + if (!f.IsValid()) { return false; + } } - if (!_rclMesh._aclPointArray[ec._fromPoint].IsValid()) + if (!_rclMesh._aclPointArray[ec._fromPoint].IsValid()) { return false; + } - if (!_rclMesh._aclPointArray[ec._toPoint].IsValid()) + if (!_rclMesh._aclPointArray[ec._toPoint].IsValid()) { return false; + } return true; } @@ -1008,8 +1110,8 @@ bool MeshTopoAlgorithm::CollapseEdge(const EdgeCollapse& ec) for (FacetIndex nbIndex : f._aulNeighbours) { // get the neighbours of the facet that won't be invalidated if (nbIndex != FACET_INDEX_MAX) { - if (std::find(ec._removeFacets.begin(), ec._removeFacets.end(), - nbIndex) == ec._removeFacets.end()) { + if (std::find(ec._removeFacets.begin(), ec._removeFacets.end(), nbIndex) + == ec._removeFacets.end()) { neighbours.push_back(nbIndex); } } @@ -1041,8 +1143,9 @@ bool MeshTopoAlgorithm::CollapseEdge(const EdgeCollapse& ec) bool MeshTopoAlgorithm::CollapseFacet(FacetIndex ulFacetPos) { MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; - if (!rclF.IsValid()) - return false; // the facet is marked invalid from a previous run + if (!rclF.IsValid()) { + return false; // the facet is marked invalid from a previous run + } // get the point index we want to remove PointIndex ulPointInd0 = rclF._aulPoints[0]; @@ -1068,18 +1171,21 @@ bool MeshTopoAlgorithm::CollapseFacet(FacetIndex ulFacetPos) // set the neighbourhood of the circumjacent facets for (FacetIndex nbIndex : rclF._aulNeighbours) { - if (nbIndex == FACET_INDEX_MAX) + if (nbIndex == FACET_INDEX_MAX) { continue; + } MeshFacet& rclN = _rclMesh._aclFacetArray[nbIndex]; unsigned short uNSide = rclN.Side(rclF); - if (rclN._aulNeighbours[(uNSide+1)%3] != FACET_INDEX_MAX) { - _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide+1)%3]] - .ReplaceNeighbour(nbIndex,rclN._aulNeighbours[(uNSide+2)%3]); + if (rclN._aulNeighbours[(uNSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide + 1) % 3]].ReplaceNeighbour( + nbIndex, + rclN._aulNeighbours[(uNSide + 2) % 3]); } - if (rclN._aulNeighbours[(uNSide+2)%3] != FACET_INDEX_MAX) { - _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide+2)%3]] - .ReplaceNeighbour(nbIndex,rclN._aulNeighbours[(uNSide+1)%3]); + if (rclN._aulNeighbours[(uNSide + 2) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide + 2) % 3]].ReplaceNeighbour( + nbIndex, + rclN._aulNeighbours[(uNSide + 1) % 3]); } // Isolate the neighbours from the topology @@ -1102,7 +1208,9 @@ bool MeshTopoAlgorithm::CollapseFacet(FacetIndex ulFacetPos) return true; } -void MeshTopoAlgorithm::SplitFacet(FacetIndex ulFacetPos, const Base::Vector3f& rP1, const Base::Vector3f& rP2) +void MeshTopoAlgorithm::SplitFacet(FacetIndex ulFacetPos, + const Base::Vector3f& rP1, + const Base::Vector3f& rP2) { float fEps = MESH_MIN_EDGE_LEN; MeshFacet& rFace = _rclMesh._aclFacetArray[ulFacetPos]; @@ -1112,12 +1220,15 @@ void MeshTopoAlgorithm::SplitFacet(FacetIndex ulFacetPos, const Base::Vector3f& auto pointIndex = [=](const Base::Vector3f& rP) { unsigned short equalP = USHRT_MAX; - if (Base::Distance(rVertex0, rP) < fEps) + if (Base::Distance(rVertex0, rP) < fEps) { equalP = 0; - else if (Base::Distance(rVertex1, rP) < fEps) + } + else if (Base::Distance(rVertex1, rP) < fEps) { equalP = 1; - else if (Base::Distance(rVertex2, rP) < fEps) + } + else if (Base::Distance(rVertex2, rP) < fEps) { equalP = 2; + } return equalP; }; @@ -1125,8 +1236,9 @@ void MeshTopoAlgorithm::SplitFacet(FacetIndex ulFacetPos, const Base::Vector3f& unsigned short equalP2 = pointIndex(rP2); // both points are coincident with the corner points - if (equalP1 != USHRT_MAX && equalP2 != USHRT_MAX) - return; // must not split the facet + if (equalP1 != USHRT_MAX && equalP2 != USHRT_MAX) { + return; // must not split the facet + } if (equalP1 != USHRT_MAX) { // get the edge to the second given point and perform a split edge operation @@ -1147,9 +1259,9 @@ void MeshTopoAlgorithm::SplitFacetOnOneEdge(FacetIndex ulFacetPos, const Base::V unsigned short iEdgeNo = USHRT_MAX; MeshFacet& rFace = _rclMesh._aclFacetArray[ulFacetPos]; - for (unsigned short i=0; i<3; i++) { + for (unsigned short i = 0; i < 3; i++) { Base::Vector3f cBase(_rclMesh._aclPointArray[rFace._aulPoints[i]]); - Base::Vector3f cEnd (_rclMesh._aclPointArray[rFace._aulPoints[(i+1)%3]]); + Base::Vector3f cEnd(_rclMesh._aclPointArray[rFace._aulPoints[(i + 1) % 3]]); Base::Vector3f cDir = cEnd - cBase; float fDist = rP.DistanceToLine(cBase, cDir); @@ -1160,23 +1272,27 @@ void MeshTopoAlgorithm::SplitFacetOnOneEdge(FacetIndex ulFacetPos, const Base::V } if (fMinDist < 0.05f) { - if (rFace._aulNeighbours[iEdgeNo] != FACET_INDEX_MAX) + if (rFace._aulNeighbours[iEdgeNo] != FACET_INDEX_MAX) { SplitEdge(ulFacetPos, rFace._aulNeighbours[iEdgeNo], rP); - else + } + else { SplitOpenEdge(ulFacetPos, iEdgeNo, rP); + } } } -void MeshTopoAlgorithm::SplitFacetOnTwoEdges(FacetIndex ulFacetPos, const Base::Vector3f& rP1, const Base::Vector3f& rP2) +void MeshTopoAlgorithm::SplitFacetOnTwoEdges(FacetIndex ulFacetPos, + const Base::Vector3f& rP1, + const Base::Vector3f& rP2) { // search for the matching edges unsigned short iEdgeNo1 = USHRT_MAX, iEdgeNo2 = USHRT_MAX; float fMinDist1 = FLOAT_MAX, fMinDist2 = FLOAT_MAX; MeshFacet& rFace = _rclMesh._aclFacetArray[ulFacetPos]; - for (unsigned short i=0; i<3; i++) { + for (unsigned short i = 0; i < 3; i++) { Base::Vector3f cBase(_rclMesh._aclPointArray[rFace._aulPoints[i]]); - Base::Vector3f cEnd (_rclMesh._aclPointArray[rFace._aulPoints[(i+1)%3]]); + Base::Vector3f cEnd(_rclMesh._aclPointArray[rFace._aulPoints[(i + 1) % 3]]); Base::Vector3f cDir = cEnd - cBase; float fDist = rP1.DistanceToLine(cBase, cDir); @@ -1191,8 +1307,9 @@ void MeshTopoAlgorithm::SplitFacetOnTwoEdges(FacetIndex ulFacetPos, const Base:: } } - if (iEdgeNo1 == iEdgeNo2 || fMinDist1 >= 0.05f || fMinDist2 >= 0.05f) - return; // no valid configuration + if (iEdgeNo1 == iEdgeNo2 || fMinDist1 >= 0.05f || fMinDist2 >= 0.05f) { + return; // no valid configuration + } // make first point lying on the previous edge Base::Vector3f cP1 = rP1; @@ -1248,21 +1365,23 @@ void MeshTopoAlgorithm::SplitFacetOnTwoEdges(FacetIndex ulFacetPos, const Base:: if (n1 != FACET_INDEX_MAX) { fixIndices.push_back(n1); MeshFacet& rN = _rclMesh._aclFacetArray[n1]; - for (FacetIndex nbIndex : rN._aulNeighbours) + for (FacetIndex nbIndex : rN._aulNeighbours) { fixIndices.push_back(nbIndex); + } SplitFacet(n1, p1, p2, cntPts1); } if (n2 != FACET_INDEX_MAX) { fixIndices.push_back(n2); MeshFacet& rN = _rclMesh._aclFacetArray[n2]; - for (FacetIndex nbIndex : rN._aulNeighbours) + for (FacetIndex nbIndex : rN._aulNeighbours) { fixIndices.push_back(nbIndex); + } SplitFacet(n2, p2, p0, cntPts2); } FacetIndex cntFts2 = _rclMesh.CountFacets(); - for (FacetIndex i=cntFts; i& ulFac void MeshTopoAlgorithm::HarmonizeNeighbours(FacetIndex facet1, FacetIndex facet2) { - if (facet1 == facet2) + if (facet1 == facet2) { return; + } MeshFacet& rFace1 = _rclMesh._aclFacetArray[facet1]; MeshFacet& rFace2 = _rclMesh._aclFacetArray[facet2]; @@ -1343,36 +1470,40 @@ void MeshTopoAlgorithm::HarmonizeNeighbours(FacetIndex facet1, FacetIndex facet2 } } -void MeshTopoAlgorithm::SplitNeighbourFacet(FacetIndex ulFacetPos, unsigned short uFSide, const Base::Vector3f rPoint) +void MeshTopoAlgorithm::SplitNeighbourFacet(FacetIndex ulFacetPos, + unsigned short uFSide, + const Base::Vector3f rPoint) { - MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; + MeshFacet& rclF = _rclMesh._aclFacetArray[ulFacetPos]; - FacetIndex ulNeighbour = rclF._aulNeighbours[uFSide]; - MeshFacet& rclN = _rclMesh._aclFacetArray[ulNeighbour]; + FacetIndex ulNeighbour = rclF._aulNeighbours[uFSide]; + MeshFacet& rclN = _rclMesh._aclFacetArray[ulNeighbour]; - unsigned short uNSide = rclN.Side(rclF); + unsigned short uNSide = rclN.Side(rclF); - PointIndex uPtInd = this->GetOrAddIndex(rPoint); - FacetIndex ulSize = _rclMesh._aclFacetArray.size(); + PointIndex uPtInd = this->GetOrAddIndex(rPoint); + FacetIndex ulSize = _rclMesh._aclFacetArray.size(); - // adjust the neighbourhood - if (rclN._aulNeighbours[(uNSide+1)%3] != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide+1)%3]].ReplaceNeighbour(ulNeighbour, ulSize); + // adjust the neighbourhood + if (rclN._aulNeighbours[(uNSide + 1) % 3] != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[rclN._aulNeighbours[(uNSide + 1) % 3]].ReplaceNeighbour(ulNeighbour, + ulSize); + } - MeshFacet cNew; - cNew._aulPoints[0] = uPtInd; - cNew._aulPoints[1] = rclN._aulPoints[(uNSide+1)%3]; - cNew._aulPoints[2] = rclN._aulPoints[(uNSide+2)%3]; - cNew._aulNeighbours[0] = ulFacetPos; - cNew._aulNeighbours[1] = rclN._aulNeighbours[(uNSide+1)%3]; - cNew._aulNeighbours[2] = ulNeighbour; + MeshFacet cNew; + cNew._aulPoints[0] = uPtInd; + cNew._aulPoints[1] = rclN._aulPoints[(uNSide + 1) % 3]; + cNew._aulPoints[2] = rclN._aulPoints[(uNSide + 2) % 3]; + cNew._aulNeighbours[0] = ulFacetPos; + cNew._aulNeighbours[1] = rclN._aulNeighbours[(uNSide + 1) % 3]; + cNew._aulNeighbours[2] = ulNeighbour; - // adjust the facet - rclN._aulPoints[(uNSide+1)%3] = uPtInd; - rclN._aulNeighbours[(uNSide+1)%3] = ulSize; + // adjust the facet + rclN._aulPoints[(uNSide + 1) % 3] = uPtInd; + rclN._aulNeighbours[(uNSide + 1) % 3] = ulSize; - // insert new facet - _rclMesh._aclFacetArray.push_back(cNew); + // insert new facet + _rclMesh._aclFacetArray.push_back(cNew); } #if 0 @@ -1401,126 +1532,139 @@ void MeshTopoAlgorithm::SplitNeighbourFacet(FacetIndex ulFacetPos, unsigned shor bool MeshTopoAlgorithm::RemoveDegeneratedFacet(FacetIndex index) { - if (index >= _rclMesh._aclFacetArray.size()) - return false; - MeshFacet& rFace = _rclMesh._aclFacetArray[index]; - - // coincident corners (either topological or geometrical) - for (int i=0; i<3; i++) { - const MeshPoint& rE0 = _rclMesh._aclPointArray[rFace._aulPoints[i]]; - const MeshPoint& rE1 = _rclMesh._aclPointArray[rFace._aulPoints[(i+1)%3]]; - if (rE0 == rE1) { - FacetIndex uN1 = rFace._aulNeighbours[(i+1)%3]; - FacetIndex uN2 = rFace._aulNeighbours[(i+2)%3]; - if (uN2 != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[uN2].ReplaceNeighbour(index, uN1); - if (uN1 != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[uN1].ReplaceNeighbour(index, uN2); - - // isolate the face and remove it - rFace._aulNeighbours[0] = FACET_INDEX_MAX; - rFace._aulNeighbours[1] = FACET_INDEX_MAX; - rFace._aulNeighbours[2] = FACET_INDEX_MAX; - _rclMesh.DeleteFacet(index); - return true; + if (index >= _rclMesh._aclFacetArray.size()) { + return false; } - } + MeshFacet& rFace = _rclMesh._aclFacetArray[index]; - // We have a facet of the form - // P0 +----+------+P2 - // P1 - for (int j=0; j<3; j++) { - Base::Vector3f cVec1 = _rclMesh._aclPointArray[rFace._aulPoints[(j+1)%3]] - _rclMesh._aclPointArray[rFace._aulPoints[j]]; - Base::Vector3f cVec2 = _rclMesh._aclPointArray[rFace._aulPoints[(j+2)%3]] - _rclMesh._aclPointArray[rFace._aulPoints[j]]; + // coincident corners (either topological or geometrical) + for (int i = 0; i < 3; i++) { + const MeshPoint& rE0 = _rclMesh._aclPointArray[rFace._aulPoints[i]]; + const MeshPoint& rE1 = _rclMesh._aclPointArray[rFace._aulPoints[(i + 1) % 3]]; + if (rE0 == rE1) { + FacetIndex uN1 = rFace._aulNeighbours[(i + 1) % 3]; + FacetIndex uN2 = rFace._aulNeighbours[(i + 2) % 3]; + if (uN2 != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[uN2].ReplaceNeighbour(index, uN1); + } + if (uN1 != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[uN1].ReplaceNeighbour(index, uN2); + } - // adjust the neighbourhoods and point indices - if (cVec1 * cVec2 < 0.0f) { - FacetIndex uN1 = rFace._aulNeighbours[(j+1)%3]; - if (uN1 != FACET_INDEX_MAX) { - // get the neighbour and common edge side - MeshFacet& rNb = _rclMesh._aclFacetArray[uN1]; - unsigned short side = rNb.Side(index); - - // bend the point indices - rFace._aulPoints[(j+2)%3] = rNb._aulPoints[(side+2)%3]; - rNb._aulPoints[(side+1)%3] = rFace._aulPoints[j]; - - // set correct neighbourhood - FacetIndex uN2 = rFace._aulNeighbours[(j+2)%3]; - rNb._aulNeighbours[side] = uN2; - if (uN2 != FACET_INDEX_MAX) { - _rclMesh._aclFacetArray[uN2].ReplaceNeighbour(index, uN1); + // isolate the face and remove it + rFace._aulNeighbours[0] = FACET_INDEX_MAX; + rFace._aulNeighbours[1] = FACET_INDEX_MAX; + rFace._aulNeighbours[2] = FACET_INDEX_MAX; + _rclMesh.DeleteFacet(index); + return true; } - FacetIndex uN3 = rNb._aulNeighbours[(side+1)%3]; - rFace._aulNeighbours[(j+1)%3] = uN3; - if (uN3 != FACET_INDEX_MAX) { - _rclMesh._aclFacetArray[uN3].ReplaceNeighbour(uN1, index); - } - rNb._aulNeighbours[(side+1)%3] = index; - rFace._aulNeighbours[(j+2)%3] = uN1; - } - else - _rclMesh.DeleteFacet(index); - - return true; } - } - return false; + // We have a facet of the form + // P0 +----+------+P2 + // P1 + for (int j = 0; j < 3; j++) { + Base::Vector3f cVec1 = _rclMesh._aclPointArray[rFace._aulPoints[(j + 1) % 3]] + - _rclMesh._aclPointArray[rFace._aulPoints[j]]; + Base::Vector3f cVec2 = _rclMesh._aclPointArray[rFace._aulPoints[(j + 2) % 3]] + - _rclMesh._aclPointArray[rFace._aulPoints[j]]; + + // adjust the neighbourhoods and point indices + if (cVec1 * cVec2 < 0.0f) { + FacetIndex uN1 = rFace._aulNeighbours[(j + 1) % 3]; + if (uN1 != FACET_INDEX_MAX) { + // get the neighbour and common edge side + MeshFacet& rNb = _rclMesh._aclFacetArray[uN1]; + unsigned short side = rNb.Side(index); + + // bend the point indices + rFace._aulPoints[(j + 2) % 3] = rNb._aulPoints[(side + 2) % 3]; + rNb._aulPoints[(side + 1) % 3] = rFace._aulPoints[j]; + + // set correct neighbourhood + FacetIndex uN2 = rFace._aulNeighbours[(j + 2) % 3]; + rNb._aulNeighbours[side] = uN2; + if (uN2 != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[uN2].ReplaceNeighbour(index, uN1); + } + FacetIndex uN3 = rNb._aulNeighbours[(side + 1) % 3]; + rFace._aulNeighbours[(j + 1) % 3] = uN3; + if (uN3 != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[uN3].ReplaceNeighbour(uN1, index); + } + rNb._aulNeighbours[(side + 1) % 3] = index; + rFace._aulNeighbours[(j + 2) % 3] = uN1; + } + else { + _rclMesh.DeleteFacet(index); + } + + return true; + } + } + + return false; } bool MeshTopoAlgorithm::RemoveCorruptedFacet(FacetIndex index) { - if (index >= _rclMesh._aclFacetArray.size()) - return false; - MeshFacet& rFace = _rclMesh._aclFacetArray[index]; - - // coincident corners (topological) - for (int i=0; i<3; i++) { - if (rFace._aulPoints[i] == rFace._aulPoints[(i+1)%3]) { - FacetIndex uN1 = rFace._aulNeighbours[(i+1)%3]; - FacetIndex uN2 = rFace._aulNeighbours[(i+2)%3]; - if (uN2 != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[uN2].ReplaceNeighbour(index, uN1); - if (uN1 != FACET_INDEX_MAX) - _rclMesh._aclFacetArray[uN1].ReplaceNeighbour(index, uN2); - - // isolate the face and remove it - rFace._aulNeighbours[0] = FACET_INDEX_MAX; - rFace._aulNeighbours[1] = FACET_INDEX_MAX; - rFace._aulNeighbours[2] = FACET_INDEX_MAX; - _rclMesh.DeleteFacet(index); - return true; + if (index >= _rclMesh._aclFacetArray.size()) { + return false; } - } + MeshFacet& rFace = _rclMesh._aclFacetArray[index]; - return false; + // coincident corners (topological) + for (int i = 0; i < 3; i++) { + if (rFace._aulPoints[i] == rFace._aulPoints[(i + 1) % 3]) { + FacetIndex uN1 = rFace._aulNeighbours[(i + 1) % 3]; + FacetIndex uN2 = rFace._aulNeighbours[(i + 2) % 3]; + if (uN2 != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[uN2].ReplaceNeighbour(index, uN1); + } + if (uN1 != FACET_INDEX_MAX) { + _rclMesh._aclFacetArray[uN1].ReplaceNeighbour(index, uN2); + } + + // isolate the face and remove it + rFace._aulNeighbours[0] = FACET_INDEX_MAX; + rFace._aulNeighbours[1] = FACET_INDEX_MAX; + rFace._aulNeighbours[2] = FACET_INDEX_MAX; + _rclMesh.DeleteFacet(index); + return true; + } + } + + return false; } -void MeshTopoAlgorithm::FillupHoles(unsigned long length, int level, +void MeshTopoAlgorithm::FillupHoles(unsigned long length, + int level, AbstractPolygonTriangulator& cTria, - std::list >& aFailed) + std::list>& aFailed) { // get the mesh boundaries as an array of point indices - std::list > aBorders, aFillBorders; + std::list> aBorders, aFillBorders; MeshAlgorithm cAlgo(_rclMesh); cAlgo.GetMeshBorders(aBorders); // split boundary loops if needed cAlgo.SplitBoundaryLoops(aBorders); - for (const auto & aBorder : aBorders) { - if (aBorder.size()-1 <= length) // ignore boundary with too many edges + for (const auto& aBorder : aBorders) { + if (aBorder.size() - 1 <= length) { // ignore boundary with too many edges aFillBorders.push_back(aBorder); + } } - if (!aFillBorders.empty()) + if (!aFillBorders.empty()) { FillupHoles(level, cTria, aFillBorders, aFailed); + } } -void MeshTopoAlgorithm::FillupHoles(int level, AbstractPolygonTriangulator& cTria, - const std::list >& aBorders, - std::list >& aFailed) +void MeshTopoAlgorithm::FillupHoles(int level, + AbstractPolygonTriangulator& cTria, + const std::list>& aBorders, + std::list>& aFailed) { // get the facets to a point MeshRefPointToFacets cPt2Fac(_rclMesh); @@ -1529,25 +1673,27 @@ void MeshTopoAlgorithm::FillupHoles(int level, AbstractPolygonTriangulator& cTri MeshFacetArray newFacets; MeshPointArray newPoints; unsigned long numberOfOldPoints = _rclMesh._aclPointArray.size(); - for (const auto & aBorder : aBorders) { + for (const auto& aBorder : aBorders) { MeshFacetArray cFacets; MeshPointArray cPoints; std::vector bound = aBorder; if (cAlgo.FillupHole(bound, cTria, cFacets, cPoints, level, &cPt2Fac)) { - if (bound.front() == bound.back()) + if (bound.front() == bound.back()) { bound.pop_back(); - // the triangulation may produce additional points which we must take into account when appending to the mesh + } + // the triangulation may produce additional points which we must take into account when + // appending to the mesh if (cPoints.size() > bound.size()) { unsigned long countBoundaryPoints = bound.size(); unsigned long countDifference = cPoints.size() - countBoundaryPoints; MeshPointArray::_TIterator pt = cPoints.begin() + countBoundaryPoints; - for (unsigned long i=0; i= ctPoints || - newFacet._aulPoints[1] >= ctPoints || - newFacet._aulPoints[2] >= ctPoints) { + for (auto& newFacet : newFacets) { + if (newFacet._aulPoints[0] >= ctPoints || newFacet._aulPoints[1] >= ctPoints + || newFacet._aulPoints[2] >= ctPoints) { Base::Console().Log("Ignore invalid face <%d, %d, %d> (%d vertices)\n", - newFacet._aulPoints[0], newFacet._aulPoints[1], newFacet._aulPoints[2], ctPoints); + newFacet._aulPoints[0], + newFacet._aulPoints[1], + newFacet._aulPoints[2], + ctPoints); } else { addFacets.push_back(newFacet); @@ -1590,48 +1741,55 @@ void MeshTopoAlgorithm::FillupHoles(int level, AbstractPolygonTriangulator& cTri } void MeshTopoAlgorithm::FindHoles(unsigned long length, - std::list >& aBorders) const + std::list>& aBorders) const { - std::list > border; + std::list> border; MeshAlgorithm cAlgo(_rclMesh); cAlgo.GetMeshBorders(border); - for (const auto & it : border) { - if (it.size() <= length) + for (const auto& it : border) { + if (it.size() <= length) { aBorders.push_back(it); + } } } void MeshTopoAlgorithm::FindComponents(unsigned long count, std::vector& findIndices) { - std::vector > segments; - MeshComponents comp(_rclMesh); - comp.SearchForComponents(MeshComponents::OverEdge,segments); + std::vector> segments; + MeshComponents comp(_rclMesh); + comp.SearchForComponents(MeshComponents::OverEdge, segments); - for (const auto & segment : segments) { - if (segment.size() <= count) - findIndices.insert(findIndices.end(), segment.begin(), segment.end()); - } + for (const auto& segment : segments) { + if (segment.size() <= count) { + findIndices.insert(findIndices.end(), segment.begin(), segment.end()); + } + } } void MeshTopoAlgorithm::RemoveComponents(unsigned long count) { - std::vector removeFacets; - FindComponents(count, removeFacets); - if (!removeFacets.empty()) - _rclMesh.DeleteFacets(removeFacets); + std::vector removeFacets; + FindComponents(count, removeFacets); + if (!removeFacets.empty()) { + _rclMesh.DeleteFacets(removeFacets); + } } -void MeshTopoAlgorithm::HarmonizeNormals () +void MeshTopoAlgorithm::HarmonizeNormals() { - std::vector uIndices = MeshEvalOrientation(_rclMesh).GetIndices(); - for (FacetIndex index : uIndices) - _rclMesh._aclFacetArray[index].FlipNormal(); + std::vector uIndices = MeshEvalOrientation(_rclMesh).GetIndices(); + for (FacetIndex index : uIndices) { + _rclMesh._aclFacetArray[index].FlipNormal(); + } } -void MeshTopoAlgorithm::FlipNormals () +void MeshTopoAlgorithm::FlipNormals() { - for (MeshFacetArray::_TIterator i = _rclMesh._aclFacetArray.begin(); i < _rclMesh._aclFacetArray.end(); ++i) - i->FlipNormal(); + for (MeshFacetArray::_TIterator i = _rclMesh._aclFacetArray.begin(); + i < _rclMesh._aclFacetArray.end(); + ++i) { + i->FlipNormal(); + } } // --------------------------------------------------------------------------- @@ -1659,80 +1817,87 @@ void MeshTopoAlgorithm::FlipNormals () * See also http://max-limper.de/publications/Euler/ */ -MeshComponents::MeshComponents( const MeshKernel& rclMesh ) -: _rclMesh(rclMesh) +MeshComponents::MeshComponents(const MeshKernel& rclMesh) + : _rclMesh(rclMesh) +{} + +void MeshComponents::SearchForComponents(TMode tMode, + std::vector>& aclT) const { + // all facets + std::vector aulAllFacets(_rclMesh.CountFacets()); + FacetIndex k = 0; + for (FacetIndex& aulAllFacet : aulAllFacets) { + aulAllFacet = k++; + } + + SearchForComponents(tMode, aulAllFacets, aclT); } -void MeshComponents::SearchForComponents(TMode tMode, std::vector >& aclT) const +void MeshComponents::SearchForComponents(TMode tMode, + const std::vector& aSegment, + std::vector>& aclT) const { - // all facets - std::vector aulAllFacets(_rclMesh.CountFacets()); - FacetIndex k = 0; - for (FacetIndex & aulAllFacet : aulAllFacets) - aulAllFacet = k++; + FacetIndex ulStartFacet; - SearchForComponents( tMode, aulAllFacets, aclT ); -} + if (_rclMesh.CountFacets() == 0) { + return; + } -void MeshComponents::SearchForComponents(TMode tMode, const std::vector& aSegment, std::vector >& aclT) const -{ - FacetIndex ulStartFacet; + // reset VISIT flags + MeshAlgorithm cAlgo(_rclMesh); + cAlgo.SetFacetFlag(MeshFacet::VISIT); + cAlgo.ResetFacetsFlag(aSegment, MeshFacet::VISIT); - if (_rclMesh.CountFacets() == 0) - return; + const MeshFacetArray& rFAry = _rclMesh.GetFacets(); + MeshFacetArray::_TConstIterator iTri = rFAry.begin(); + MeshFacetArray::_TConstIterator iBeg = rFAry.begin(); + MeshFacetArray::_TConstIterator iEnd = rFAry.end(); - // reset VISIT flags - MeshAlgorithm cAlgo(_rclMesh); - cAlgo.SetFacetFlag(MeshFacet::VISIT); - cAlgo.ResetFacetsFlag(aSegment, MeshFacet::VISIT); - - const MeshFacetArray& rFAry = _rclMesh.GetFacets(); - MeshFacetArray::_TConstIterator iTri = rFAry.begin(); - MeshFacetArray::_TConstIterator iBeg = rFAry.begin(); - MeshFacetArray::_TConstIterator iEnd = rFAry.end(); - - // start from the first not visited facet - unsigned long ulVisited = cAlgo.CountFacetFlag(MeshFacet::VISIT); - MeshIsNotFlag flag; - iTri = std::find_if(iTri, iEnd, [flag](const MeshFacet& f) { - return flag(f, MeshFacet::VISIT); - }); - ulStartFacet = iTri - iBeg; - - // visitor - std::vector aclComponent; - std::vector > aclConnectComp; - MeshTopFacetVisitor clFVisitor( aclComponent ); - - while ( ulStartFacet != FACET_INDEX_MAX ) - { - // collect all facets of a component - aclComponent.clear(); - if (tMode == OverEdge) - ulVisited += _rclMesh.VisitNeighbourFacets(clFVisitor, ulStartFacet); - else if (tMode == OverPoint) - ulVisited += _rclMesh.VisitNeighbourFacetsOverCorners(clFVisitor, ulStartFacet); - - // get also start facet - aclComponent.push_back(ulStartFacet); - aclConnectComp.push_back(aclComponent); - - // if the mesh consists of several topologic independent components - // We can search from position 'iTri' on because all elements _before_ are already visited - // what we know from the previous iteration. + // start from the first not visited facet + unsigned long ulVisited = cAlgo.CountFacetFlag(MeshFacet::VISIT); + MeshIsNotFlag flag; iTri = std::find_if(iTri, iEnd, [flag](const MeshFacet& f) { return flag(f, MeshFacet::VISIT); }); + ulStartFacet = iTri - iBeg; - if (iTri < iEnd) - ulStartFacet = iTri - iBeg; - else - ulStartFacet = FACET_INDEX_MAX; - } + // visitor + std::vector aclComponent; + std::vector> aclConnectComp; + MeshTopFacetVisitor clFVisitor(aclComponent); - // sort components by size (descending order) - std::sort(aclConnectComp.begin(), aclConnectComp.end(), CNofFacetsCompare()); - aclT = aclConnectComp; - boost::ignore_unused(ulVisited); + while (ulStartFacet != FACET_INDEX_MAX) { + // collect all facets of a component + aclComponent.clear(); + if (tMode == OverEdge) { + ulVisited += _rclMesh.VisitNeighbourFacets(clFVisitor, ulStartFacet); + } + else if (tMode == OverPoint) { + ulVisited += _rclMesh.VisitNeighbourFacetsOverCorners(clFVisitor, ulStartFacet); + } + + // get also start facet + aclComponent.push_back(ulStartFacet); + aclConnectComp.push_back(aclComponent); + + // if the mesh consists of several topologic independent components + // We can search from position 'iTri' on because all elements _before_ are already visited + // what we know from the previous iteration. + iTri = std::find_if(iTri, iEnd, [flag](const MeshFacet& f) { + return flag(f, MeshFacet::VISIT); + }); + + if (iTri < iEnd) { + ulStartFacet = iTri - iBeg; + } + else { + ulStartFacet = FACET_INDEX_MAX; + } + } + + // sort components by size (descending order) + std::sort(aclConnectComp.begin(), aclConnectComp.end(), CNofFacetsCompare()); + aclT = aclConnectComp; + boost::ignore_unused(ulVisited); } diff --git a/src/Mod/Mesh/App/Core/TopoAlgorithm.h b/src/Mod/Mesh/App/Core/TopoAlgorithm.h index 9813067db2..02d140ac23 100644 --- a/src/Mod/Mesh/App/Core/TopoAlgorithm.h +++ b/src/Mod/Mesh/App/Core/TopoAlgorithm.h @@ -31,7 +31,8 @@ #include "MeshKernel.h" -namespace MeshCore { +namespace MeshCore +{ class AbstractPolygonTriangulator; struct EdgeCollapse; @@ -46,8 +47,8 @@ class MeshExport MeshTopoAlgorithm { public: // construction/destruction - explicit MeshTopoAlgorithm (MeshKernel &rclM); - ~MeshTopoAlgorithm (); + explicit MeshTopoAlgorithm(MeshKernel& rclM); + ~MeshTopoAlgorithm(); public: /** @name Topological Operations */ @@ -57,7 +58,7 @@ public: * triangles. The given point must lie inside the triangle not outside or on * an edge. */ - bool InsertVertex(FacetIndex ulFacetPos, const Base::Vector3f& rclPoint); + bool InsertVertex(FacetIndex ulFacetPos, const Base::Vector3f& rclPoint); /** * This method is provided for convenience. It inserts a new vertex to the * mesh and tries to swap the common edges of the newly created facets with @@ -67,8 +68,8 @@ public: * edges to build more well-formed triangles. * @see InsertVertex(), ShouldSwapEdge(), SwapEdge(). */ - bool InsertVertexAndSwapEdge(FacetIndex ulFacetPos, const Base::Vector3f& rclPoint, - float fMaxAngle); + bool + InsertVertexAndSwapEdge(FacetIndex ulFacetPos, const Base::Vector3f& rclPoint, float fMaxAngle); /** * Swaps the common edge of two adjacent facets even if the operation might * be illegal. To be sure that this operation is legal, check either with @@ -85,16 +86,14 @@ public: * that two new facets get created. If \a rP is coincident with a corner point * nothing happens. */ - bool SplitEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, - const Base::Vector3f& rP); + bool SplitEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, const Base::Vector3f& rP); /** * Splits the facet with index \a ulFacetPos on the edge side \a uSide into * two facets. This side must be an open edge otherwise nothing is done. The * point \a rP must be near to this edge and must not be coincident with any * corner vertices of the facet. */ - bool SplitOpenEdge(FacetIndex ulFacetPos, unsigned short uSide, - const Base::Vector3f& rP); + bool SplitOpenEdge(FacetIndex ulFacetPos, unsigned short uSide, const Base::Vector3f& rP); /** * Splits the facet with index \a ulFacetPos into up to three facets. The points * \a rP1 and \a rP2 should lie on two different edges of the facet. This method @@ -103,8 +102,7 @@ public: * is coincident with a corner point then the facet is split into two facets. * If both points are coincident with corner points of this facet nothing is done. */ - void SplitFacet(FacetIndex ulFacetPos, const Base::Vector3f& rP1, - const Base::Vector3f& rP2); + void SplitFacet(FacetIndex ulFacetPos, const Base::Vector3f& rP1, const Base::Vector3f& rP2); /** * Collapse a vertex. At the moment only removing inner vertexes referenced * by three facets is supposrted. @@ -217,8 +215,7 @@ public: * facets is decreased and if the angle between the facet normals does * not exceed \a fMaxAngle. */ - bool ShouldSwapEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, - float fMaxAngle) const; + bool ShouldSwapEdge(FacetIndex ulFacetPos, FacetIndex ulNeighbour, float fMaxAngle) const; /** Computes a value for the benefit of swapping the edge. */ float SwapEdgeBenefit(FacetIndex f, int e) const; /** @@ -240,21 +237,22 @@ public: * needs to be done then the points of the neighbours of \a level rings will be used. * Holes for which the triangulation failed are returned in \a aFailed. */ - void FillupHoles(unsigned long length, int level, - AbstractPolygonTriangulator&, - std::list >& aFailed); + void FillupHoles(unsigned long length, + int level, + AbstractPolygonTriangulator&, + std::list>& aFailed); /** * This is an overloaded method provided for convenience. It takes as first argument * the boundaries which must be filled up. */ - void FillupHoles(int level, AbstractPolygonTriangulator&, - const std::list >& aBorders, - std::list >& aFailed); + void FillupHoles(int level, + AbstractPolygonTriangulator&, + const std::list>& aBorders, + std::list>& aFailed); /** * Find holes which consists of up to \a length edges. */ - void FindHoles(unsigned long length, - std::list >& aBorders) const; + void FindHoles(unsigned long length, std::list>& aBorders) const; /** * Find topologic independent components with maximum \a count facets * and returns an array of the indices. @@ -267,11 +265,11 @@ public: /** * Harmonizes the normals. */ - void HarmonizeNormals (); + void HarmonizeNormals(); /** * Flips the normals. */ - void FlipNormals (); + void FlipNormals(); /** * Caching facility. */ @@ -282,32 +280,33 @@ private: /** * Splits the neighbour facet of \a ulFacetPos on side \a uSide. */ - void SplitNeighbourFacet(FacetIndex ulFacetPos, unsigned short uSide, - const Base::Vector3f rPoint); - void SplitFacetOnOneEdge(FacetIndex ulFacetPos, - const Base::Vector3f& rP1); + void + SplitNeighbourFacet(FacetIndex ulFacetPos, unsigned short uSide, const Base::Vector3f rPoint); + void SplitFacetOnOneEdge(FacetIndex ulFacetPos, const Base::Vector3f& rP1); void SplitFacetOnTwoEdges(FacetIndex ulFacetPos, const Base::Vector3f& rP1, const Base::Vector3f& rP2); - void SplitFacet(FacetIndex ulFacetPos, PointIndex P1, - PointIndex P2, PointIndex Pn); + void SplitFacet(FacetIndex ulFacetPos, PointIndex P1, PointIndex P2, PointIndex Pn); void AddFacet(PointIndex P1, PointIndex P2, PointIndex P3); - void AddFacet(PointIndex P1, PointIndex P2, PointIndex P3, - FacetIndex N1, FacetIndex N2, FacetIndex N3); + void AddFacet(PointIndex P1, + PointIndex P2, + PointIndex P3, + FacetIndex N1, + FacetIndex N2, + FacetIndex N3); void HarmonizeNeighbours(FacetIndex facet1, FacetIndex facet2); void HarmonizeNeighbours(const std::vector& ulFacets); /** * Returns all facets that references the point index \a uPointPos. \a uFacetPos * is a facet that must reference this point and is added to the list as well. */ - std::vector GetFacetsToPoint(FacetIndex uFacetPos, - PointIndex uPointPos) const; + std::vector GetFacetsToPoint(FacetIndex uFacetPos, PointIndex uPointPos) const; /** \internal */ - PointIndex GetOrAddIndex (const MeshPoint &rclPoint); + PointIndex GetOrAddIndex(const MeshPoint& rclPoint); private: MeshKernel& _rclMesh; - bool _needsCleanup{false}; + bool _needsCleanup {false}; struct Vertex_Less { @@ -315,8 +314,8 @@ private: }; // cache - using tCache = std::map; - tCache* _cache{nullptr}; + using tCache = std::map; + tCache* _cache {nullptr}; }; /** @@ -328,38 +327,43 @@ private: class MeshExport MeshComponents { public: - enum TMode {OverEdge, OverPoint}; + enum TMode + { + OverEdge, + OverPoint + }; - explicit MeshComponents( const MeshKernel& rclMesh ); + explicit MeshComponents(const MeshKernel& rclMesh); /** * Searches for 'isles' of the mesh. If \a tMode is \a OverEdge then facets * sharing the same edge are regarded as connected, if \a tMode is \a OverPoint * then facets sharing a common point are regarded as connected. */ - void SearchForComponents(TMode tMode, std::vector >& aclT) const; + void SearchForComponents(TMode tMode, std::vector>& aclT) const; /** * Does basically the same as the method above escept that only the faces in * \a aSegment are regarded. */ - void SearchForComponents(TMode tMode, const std::vector& aSegment, - std::vector >& aclT) const; + void SearchForComponents(TMode tMode, + const std::vector& aSegment, + std::vector>& aclT) const; protected: // for sorting of elements struct CNofFacetsCompare { - bool operator () (const std::vector &rclC1, - const std::vector &rclC2) + bool operator()(const std::vector& rclC1, const std::vector& rclC2) { return rclC1.size() > rclC2.size(); } }; + protected: const MeshKernel& _rclMesh; }; -} // namespace MeshCore +} // namespace MeshCore -#endif // MESH_TOPOALGORITHM_H +#endif // MESH_TOPOALGORITHM_H diff --git a/src/Mod/Mesh/App/Core/Triangulation.cpp b/src/Mod/Mesh/App/Core/Triangulation.cpp index 0816b40863..20049971b3 100644 --- a/src/Mod/Mesh/App/Core/Triangulation.cpp +++ b/src/Mod/Mesh/App/Core/Triangulation.cpp @@ -22,16 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include #include #include -#include "Triangulation.h" #include "Approximation.h" #include "MeshKernel.h" +#include "Triangulation.h" using namespace MeshCore; @@ -47,8 +47,7 @@ bool TriangulationVerifier::Accept(const Base::Vector3f& n, return (ref_dist * tri_dist <= 0.0f); } -bool TriangulationVerifier::MustFlip(const Base::Vector3f& n1, - const Base::Vector3f& n2) const +bool TriangulationVerifier::MustFlip(const Base::Vector3f& n1, const Base::Vector3f& n2) const { return n1.Dot(n2) <= 0.0f; } @@ -65,8 +64,7 @@ bool TriangulationVerifierV2::Accept(const Base::Vector3f& n, return true; } -bool TriangulationVerifierV2::MustFlip(const Base::Vector3f& n1, - const Base::Vector3f& n2) const +bool TriangulationVerifierV2::MustFlip(const Base::Vector3f& n1, const Base::Vector3f& n2) const { float dot = n1.Dot(n2); (void)dot; @@ -101,8 +99,9 @@ void AbstractPolygonTriangulator::SetPolygon(const std::vector& { this->_points = raclPoints; if (!this->_points.empty()) { - if (this->_points.front() == this->_points.back()) + if (this->_points.front() == this->_points.back()) { this->_points.pop_back(); + } } } @@ -115,9 +114,12 @@ float AbstractPolygonTriangulator::GetLength() const { float len = 0.0f; if (_points.size() > 2) { - for (std::vector::const_iterator it = _points.begin(); it != _points.end();++it) { + for (std::vector::const_iterator it = _points.begin(); it != _points.end(); + ++it) { std::vector::const_iterator jt = it + 1; - if (jt == _points.end()) jt = _points.begin(); + if (jt == _points.end()) { + jt = _points.begin(); + } len += Base::Distance(*it, *jt); } } @@ -130,19 +132,22 @@ std::vector AbstractPolygonTriangulator::AddedPoints() const // Apply the inverse transformation to project back to world coordinates std::vector added; added.reserve(_newpoints.size()); - for (auto point : _newpoints) + for (auto point : _newpoints) { added.push_back(_inverse * point); + } return added; } Base::Matrix4D AbstractPolygonTriangulator::GetTransformToFitPlane() const { PlaneFit planeFit; - for (auto point : _points) + for (auto point : _points) { planeFit.AddPoint(point); + } - if (planeFit.Fit() >= FLOAT_MAX) + if (planeFit.Fit() >= FLOAT_MAX) { throw Base::RuntimeError("Plane fit failed"); + } Base::Vector3f bs = planeFit.GetBase(); Base::Vector3f ex = planeFit.GetDirU(); @@ -183,8 +188,9 @@ std::vector AbstractPolygonTriangulator::ProjectToFitPlane() Base::Vector3f ey(static_cast(_inverse[0][1]), static_cast(_inverse[1][1]), static_cast(_inverse[2][1])); - for (auto & jt : proj) + for (auto& jt : proj) { jt.TransformToCoordinateSystem(bs, ex, ey); + } return proj; } @@ -211,8 +217,9 @@ void AbstractPolygonTriangulator::PostProcessing(const std::vector= uMinPts && polyFit.Fit() < FLOAT_MAX) { - for (auto & newpoint : _newpoints) + for (auto& newpoint : _newpoints) { newpoint.z = static_cast(polyFit.Value(newpoint.x, newpoint.y)); + } } } @@ -230,11 +237,15 @@ bool AbstractPolygonTriangulator::TriangulatePolygon() { try { if (!this->_indices.empty() && this->_points.size() != this->_indices.size()) { - Base::Console().Log("Triangulation: %d points <> %d indices\n", _points.size(), _indices.size()); + Base::Console().Log("Triangulation: %d points <> %d indices\n", + _points.size(), + _indices.size()); return false; } bool ok = Triangulate(); - if (ok) Done(); + if (ok) { + Done(); + } return ok; } catch (const Base::Exception& e) { @@ -264,8 +275,7 @@ void AbstractPolygonTriangulator::Discard() } void AbstractPolygonTriangulator::Reset() -{ -} +{} void AbstractPolygonTriangulator::Done() { @@ -286,33 +296,34 @@ bool EarClippingTriangulator::Triangulate() std::vector result; // Invoke the triangulator to triangulate this polygon. - Triangulate::Process(pts,result); + Triangulate::Process(pts, result); // print out the results. - size_t tcount = result.size()/3; + size_t tcount = result.size() / 3; - bool ok = tcount+2 == _points.size(); - if (tcount > _points.size()) - return false; // no valid triangulation + bool ok = tcount + 2 == _points.size(); + if (tcount > _points.size()) { + return false; // no valid triangulation + } MeshGeomFacet clFacet; MeshFacet clTopFacet; - for (size_t i=0; i &contour) +float EarClippingTriangulator::Triangulate::Area(const std::vector& contour) { int n = contour.size(); - float A=0.0f; + float A = 0.0f; - for(int p=n-1,q=0; q= FLOAT_EPS) && (bCROSScp >= FLOAT_EPS) && (cCROSSap >= FLOAT_EPS)); } -bool EarClippingTriangulator::Triangulate::Snip(const std::vector &contour, - int u,int v,int w,int n,int *V) +bool EarClippingTriangulator::Triangulate::Snip(const std::vector& contour, + int u, + int v, + int w, + int n, + int* V) { int p; float Ax, Ay, Bx, By, Cx, Cy, Px, Py; @@ -374,15 +400,19 @@ bool EarClippingTriangulator::Triangulate::Snip(const std::vector (((Bx-Ax)*(Cy-Ay)) - ((By-Ay)*(Cx-Ax)))) + if (FLOAT_EPS > (((Bx - Ax) * (Cy - Ay)) - ((By - Ay) * (Cx - Ax)))) { return false; + } - for (p=0;p &contour, - std::vector &result) +bool EarClippingTriangulator::Triangulate::Process(const std::vector& contour, + std::vector& result) { /* allocate and initialize list of Vertices in polygon */ int n = contour.size(); - if ( n < 3 ) + if (n < 3) { return false; + } - int *V = new int[n]; + int* V = new int[n]; /* we want a counter-clockwise polygon in V */ if (0.0f < Area(contour)) { - for (int v=0; v2; ) { + for (int v = nv - 1; nv > 2;) { /* if we loop, it is probably a non-simple polygon */ if (0 >= (count--)) { //** Triangulate: ERROR - probable bad polygon! - delete [] V; + delete[] V; return false; } /* three consecutive vertices in current polygon, */ - int u = v ; if (nv <= u) u = 0; /* previous */ - v = u+1; if (nv <= v) v = 0; /* new v */ - int w = v+1; if (nv <= w) w = 0; /* next */ + int u = v; + if (nv <= u) { + u = 0; /* previous */ + } + v = u + 1; + if (nv <= v) { + v = 0; /* new v */ + } + int w = v + 1; + if (nv <= w) { + w = 0; /* next */ + } - if (Snip(contour,u,v,w,nv,V)) { - int a,b,c,s,t; + if (Snip(contour, u, v, w, nv, V)) { + int a, b, c, s, t; /* true names of the vertices */ - a = V[u]; b = V[v]; c = V[w]; + a = V[u]; + b = V[v]; + c = V[w]; /* output Triangle */ - result.push_back( a ); - result.push_back( b ); - result.push_back( c ); + result.push_back(a); + result.push_back(b); + result.push_back(c); /* remove v from remaining polygon */ - for(s=v,t=v+1;t, std::vector > aEdge2Face; + std::map, std::vector> aEdge2Face; for (std::vector::iterator pI = _facets.begin(); pI != _facets.end(); ++pI) { for (int i = 0; i < 3; i++) { - PointIndex ulPt0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); - PointIndex ulPt1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i+1)%3]); + PointIndex ulPt0 = std::min(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); + PointIndex ulPt1 = std::max(pI->_aulPoints[i], pI->_aulPoints[(i + 1) % 3]); // ignore borderlines of the polygon - if ((ulPt1-ulPt0)%(_points.size()-1) > 1) - aEdge2Face[std::pair(ulPt0, ulPt1)].push_back(pI - _facets.begin()); + if ((ulPt1 - ulPt0) % (_points.size() - 1) > 1) { + aEdge2Face[std::pair(ulPt0, ulPt1)].push_back( + pI - _facets.begin()); + } } } // fill up this list with all internal edges and perform swap edges until this list is empty - std::list > aEdgeList; - std::map, std::vector >::iterator pE; - for (pE = aEdge2Face.begin(); pE != aEdge2Face.end(); ++pE) + std::list> aEdgeList; + std::map, std::vector>::iterator pE; + for (pE = aEdge2Face.begin(); pE != aEdge2Face.end(); ++pE) { aEdgeList.push_back(pE->first); + } // to be sure to avoid an endless loop size_t uMaxIter = 5 * aEdge2Face.size(); @@ -497,80 +548,95 @@ bool QuasiDelaunayTriangulator::Triangulate() uMaxIter--; // get the adjacent facets to this edge - pE = aEdge2Face.find( aEdge ); + pE = aEdge2Face.find(aEdge); // this edge has been removed some iterations before - if (pE == aEdge2Face.end()) + if (pE == aEdge2Face.end()) { continue; + } MeshFacet& rF1 = _facets[pE->second[0]]; MeshFacet& rF2 = _facets[pE->second[1]]; unsigned short side1 = rF1.Side(aEdge.first, aEdge.second); Base::Vector3f cP1 = _points[rF1._aulPoints[side1]]; - Base::Vector3f cP2 = _points[rF1._aulPoints[(side1+1)%3]]; - Base::Vector3f cP3 = _points[rF1._aulPoints[(side1+2)%3]]; + Base::Vector3f cP2 = _points[rF1._aulPoints[(side1 + 1) % 3]]; + Base::Vector3f cP3 = _points[rF1._aulPoints[(side1 + 2) % 3]]; unsigned short side2 = rF2.Side(aEdge.first, aEdge.second); - Base::Vector3f cP4 = _points[rF2._aulPoints[(side2+2)%3]]; + Base::Vector3f cP4 = _points[rF2._aulPoints[(side2 + 2) % 3]]; - MeshGeomFacet cT1(cP1, cP2, cP3); float fMax1 = cT1.MaximumAngle(); - MeshGeomFacet cT2(cP2, cP1, cP4); float fMax2 = cT2.MaximumAngle(); - MeshGeomFacet cT3(cP4, cP3, cP1); float fMax3 = cT3.MaximumAngle(); - MeshGeomFacet cT4(cP3, cP4, cP2); float fMax4 = cT4.MaximumAngle(); + MeshGeomFacet cT1(cP1, cP2, cP3); + float fMax1 = cT1.MaximumAngle(); + MeshGeomFacet cT2(cP2, cP1, cP4); + float fMax2 = cT2.MaximumAngle(); + MeshGeomFacet cT3(cP4, cP3, cP1); + float fMax3 = cT3.MaximumAngle(); + MeshGeomFacet cT4(cP3, cP4, cP2); + float fMax4 = cT4.MaximumAngle(); float fMax12 = std::max(fMax1, fMax2); float fMax34 = std::max(fMax3, fMax4); // We must make sure that the two adjacent triangles builds a convex polygon, otherwise // the swap edge operation is illegal - Base::Vector3f cU = cP2-cP1; - Base::Vector3f cV = cP4-cP3; + Base::Vector3f cU = cP2 - cP1; + Base::Vector3f cV = cP4 - cP3; // build a helper plane through cP1 that must separate cP3 and cP4 Base::Vector3f cN1 = (cU % cV) % cU; - if (((cP3-cP1)*cN1)*((cP4-cP1)*cN1) >= 0.0f) - continue; // not convex + if (((cP3 - cP1) * cN1) * ((cP4 - cP1) * cN1) >= 0.0f) { + continue; // not convex + } // build a helper plane through cP3 that must separate cP1 and cP2 Base::Vector3f cN2 = (cU % cV) % cV; - if (((cP1-cP3)*cN2)*((cP2-cP3)*cN2) >= 0.0f) - continue; // not convex + if (((cP1 - cP3) * cN2) * ((cP2 - cP3) * cN2) >= 0.0f) { + continue; // not convex + } // ok, here we should perform a swap edge to minimize the maximum angle if (fMax12 > fMax34) { - rF1._aulPoints[(side1+1)%3] = rF2._aulPoints[(side2+2)%3]; - rF2._aulPoints[(side2+1)%3] = rF1._aulPoints[(side1+2)%3]; + rF1._aulPoints[(side1 + 1) % 3] = rF2._aulPoints[(side2 + 2) % 3]; + rF2._aulPoints[(side2 + 1) % 3] = rF1._aulPoints[(side1 + 2) % 3]; // adjust the edge list - for (int i=0; i<3; i++) { - std::map, std::vector >::iterator it; + for (int i = 0; i < 3; i++) { + std::map, std::vector>::iterator it; // first facet - PointIndex ulPt0 = std::min(rF1._aulPoints[i], rF1._aulPoints[(i+1)%3]); - PointIndex ulPt1 = std::max(rF1._aulPoints[i], rF1._aulPoints[(i+1)%3]); - it = aEdge2Face.find( std::make_pair(ulPt0, ulPt1) ); + PointIndex ulPt0 = + std::min(rF1._aulPoints[i], rF1._aulPoints[(i + 1) % 3]); + PointIndex ulPt1 = + std::max(rF1._aulPoints[i], rF1._aulPoints[(i + 1) % 3]); + it = aEdge2Face.find(std::make_pair(ulPt0, ulPt1)); if (it != aEdge2Face.end()) { - if (it->second[0] == pE->second[1]) + if (it->second[0] == pE->second[1]) { it->second[0] = pE->second[0]; - else if (it->second[1] == pE->second[1]) + } + else if (it->second[1] == pE->second[1]) { it->second[1] = pE->second[0]; + } aEdgeList.push_back(it->first); } // second facet - ulPt0 = std::min(rF2._aulPoints[i], rF2._aulPoints[(i+1)%3]); - ulPt1 = std::max(rF2._aulPoints[i], rF2._aulPoints[(i+1)%3]); - it = aEdge2Face.find( std::make_pair(ulPt0, ulPt1) ); + ulPt0 = std::min(rF2._aulPoints[i], rF2._aulPoints[(i + 1) % 3]); + ulPt1 = std::max(rF2._aulPoints[i], rF2._aulPoints[(i + 1) % 3]); + it = aEdge2Face.find(std::make_pair(ulPt0, ulPt1)); if (it != aEdge2Face.end()) { - if (it->second[0] == pE->second[0]) + if (it->second[0] == pE->second[0]) { it->second[0] = pE->second[1]; - else if (it->second[1] == pE->second[0]) + } + else if (it->second[1] == pE->second[0]) { it->second[1] = pE->second[1]; + } aEdgeList.push_back(it->first); } } // Now we must remove the edge and replace it through the new edge - PointIndex ulPt0 = std::min(rF1._aulPoints[(side1+1)%3], rF2._aulPoints[(side2+1)%3]); - PointIndex ulPt1 = std::max(rF1._aulPoints[(side1+1)%3], rF2._aulPoints[(side2+1)%3]); + PointIndex ulPt0 = std::min(rF1._aulPoints[(side1 + 1) % 3], + rF2._aulPoints[(side2 + 1) % 3]); + PointIndex ulPt1 = std::max(rF1._aulPoints[(side1 + 1) % 3], + rF2._aulPoints[(side2 + 1) % 3]); std::pair aNewEdge = std::make_pair(ulPt0, ulPt1); aEdge2Face[aNewEdge] = pE->second; aEdge2Face.erase(pE); @@ -582,8 +648,10 @@ bool QuasiDelaunayTriangulator::Triangulate() // ------------------------------------------------------------- -namespace MeshCore { -namespace Triangulation { +namespace MeshCore +{ +namespace Triangulation +{ struct Vertex2d_Less { bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const @@ -605,15 +673,16 @@ struct Vertex2d_EqualTo { bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const { - if (fabs(p.x - q.x) < MeshDefinitions::_fMinPointDistanceD1 && - fabs(p.y - q.y) < MeshDefinitions::_fMinPointDistanceD1) + if (fabs(p.x - q.x) < MeshDefinitions::_fMinPointDistanceD1 + && fabs(p.y - q.y) < MeshDefinitions::_fMinPointDistanceD1) { return true; + } return false; } }; -} -} +} // namespace Triangulation +} // namespace MeshCore DelaunayTriangulator::DelaunayTriangulator() = default; @@ -625,39 +694,44 @@ bool DelaunayTriangulator::Triangulate() // sort the points ascending x,y coordinates std::sort(aPoints.begin(), aPoints.end(), Triangulation::Vertex2d_Less()); // if there are two adjacent points whose distance is less then an epsilon - if (std::adjacent_find(aPoints.begin(), aPoints.end(), - Triangulation::Vertex2d_EqualTo()) < aPoints.end()) + if (std::adjacent_find(aPoints.begin(), aPoints.end(), Triangulation::Vertex2d_EqualTo()) + < aPoints.end()) { return false; + } _facets.clear(); _triangles.clear(); std::vector akVertex; akVertex.reserve(_points.size()); - for (const auto & point : _points) { + for (const auto& point : _points) { akVertex.emplace_back(static_cast(point.x), static_cast(point.y)); } - Wm4::Delaunay2d del(static_cast(akVertex.size()), &(akVertex[0]), 0.001, false, Wm4::Query::QT_INT64); + Wm4::Delaunay2d del(static_cast(akVertex.size()), + &(akVertex[0]), + 0.001, + false, + Wm4::Query::QT_INT64); int iTQuantity = del.GetSimplexQuantity(); - std::vector aiTVertex(static_cast(3*iTQuantity)); + std::vector aiTVertex(static_cast(3 * iTQuantity)); bool succeeded = false; if (iTQuantity > 0) { - size_t uiSize = static_cast(3*iTQuantity)*sizeof(int); - Wm4::System::Memcpy(&(aiTVertex[0]),uiSize,del.GetIndices(),uiSize); + size_t uiSize = static_cast(3 * iTQuantity) * sizeof(int); + Wm4::System::Memcpy(&(aiTVertex[0]), uiSize, del.GetIndices(), uiSize); // If H is the number of hull edges and N is the number of vertices, // then the triangulation must have 2*N-2-H triangles and 3*N-3-H // edges. int iEQuantity = 0; int* aiIndex = nullptr; - del.GetHull(iEQuantity,aiIndex); + del.GetHull(iEQuantity, aiIndex); int iUniqueVQuantity = del.GetUniqueVertexQuantity(); - int iTVerify = 2*iUniqueVQuantity - 2 - iEQuantity; + int iTVerify = 2 * iUniqueVQuantity - 2 - iEQuantity; (void)iTVerify; // avoid warning in release build succeeded = (iTVerify == iTQuantity); - int iEVerify = 3*iUniqueVQuantity - 3 - iEQuantity; + int iEVerify = 3 * iUniqueVQuantity - 3 - iEQuantity; (void)iEVerify; // avoid warning about unused variable delete[] aiIndex; } @@ -665,8 +739,8 @@ bool DelaunayTriangulator::Triangulate() MeshGeomFacet triangle; MeshFacet facet; for (int i = 0; i < iTQuantity; i++) { - for (int j=0; j<3; j++) { - size_t index = static_cast(aiTVertex[static_cast(3*i+j)]); + for (int j = 0; j < 3; j++) { + size_t index = static_cast(aiTVertex[static_cast(3 * i + j)]); facet._aulPoints[j] = static_cast(index); triangle._aclPoints[j].x = static_cast(akVertex[index].X()); triangle._aclPoints[j].y = static_cast(akVertex[index].Y()); @@ -693,9 +767,9 @@ bool FlatTriangulator::Triangulate() // sort the points ascending x,y coordinates std::sort(tmp.begin(), tmp.end(), Triangulation::Vertex2d_Less()); // if there are two adjacent points whose distance is less then an epsilon - if (std::adjacent_find(tmp.begin(), tmp.end(), - Triangulation::Vertex2d_EqualTo()) < tmp.end() ) + if (std::adjacent_find(tmp.begin(), tmp.end(), Triangulation::Vertex2d_EqualTo()) < tmp.end()) { return false; + } _facets.clear(); _triangles.clear(); @@ -711,13 +785,12 @@ bool FlatTriangulator::Triangulate() } void FlatTriangulator::PostProcessing(const std::vector&) -{ -} +{} // ------------------------------------------------------------- ConstraintDelaunayTriangulator::ConstraintDelaunayTriangulator(float area) - : fMaxArea(area) + : fMaxArea(area) { // silent warning: -Wunused-private-field (void)fMaxArea; @@ -733,9 +806,9 @@ bool ConstraintDelaunayTriangulator::Triangulate() // sort the points ascending x,y coordinates std::sort(tmp.begin(), tmp.end(), Triangulation::Vertex2d_Less()); // if there are two adjacent points whose distance is less then an epsilon - if (std::adjacent_find(tmp.begin(), tmp.end(), - Triangulation::Vertex2d_EqualTo()) < tmp.end() ) + if (std::adjacent_find(tmp.begin(), tmp.end(), Triangulation::Vertex2d_EqualTo()) < tmp.end()) { return false; + } _facets.clear(); _triangles.clear(); diff --git a/src/Mod/Mesh/App/Core/Triangulation.h b/src/Mod/Mesh/App/Core/Triangulation.h index ef0ff4b9a0..fefbad3f36 100644 --- a/src/Mod/Mesh/App/Core/Triangulation.h +++ b/src/Mod/Mesh/App/Core/Triangulation.h @@ -39,19 +39,17 @@ public: const Base::Vector3f& p1, const Base::Vector3f& p2, const Base::Vector3f& p3) const; - virtual bool MustFlip(const Base::Vector3f& n1, - const Base::Vector3f& n2) const; + virtual bool MustFlip(const Base::Vector3f& n1, const Base::Vector3f& n2) const; }; -class MeshExport TriangulationVerifierV2 : public TriangulationVerifier +class MeshExport TriangulationVerifierV2: public TriangulationVerifier { public: bool Accept(const Base::Vector3f& n, - const Base::Vector3f& p1, - const Base::Vector3f& p2, - const Base::Vector3f& p3) const override; - bool MustFlip(const Base::Vector3f& n1, - const Base::Vector3f& n2) const override; + const Base::Vector3f& p1, + const Base::Vector3f& p2, + const Base::Vector3f& p3) const override; + bool MustFlip(const Base::Vector3f& n1, const Base::Vector3f& n2) const override; }; class MeshExport AbstractPolygonTriangulator @@ -62,7 +60,10 @@ public: /** Sets the polygon to be triangulated. */ void SetPolygon(const std::vector& raclPoints); - void SetIndices(const std::vector& d) {_indices = d;} + void SetIndices(const std::vector& d) + { + _indices = d; + } /** Set a verifier object that checks if the generated triangulation * can be accepted and added to the mesh kernel. * The triangulator takes ownership of the passed verifier. @@ -76,7 +77,10 @@ public: * of the mesh and thus do not need to be touched afterwards. In this * case the method should be reimplemented to return false. */ - virtual bool NeedsReindexing() const { return true; } + virtual bool NeedsReindexing() const + { + return true; + } /** Get the polygon points to be triangulated. The points may be * projected onto its average plane. */ @@ -105,9 +109,15 @@ public: */ virtual void PostProcessing(const std::vector&); /** Returns the geometric triangles of the polygon. */ - const std::vector& GetTriangles() const { return _triangles;} + const std::vector& GetTriangles() const + { + return _triangles; + } /** Returns the topologic facets of the polygon. */ - const std::vector& GetFacets() const { return _facets;} + const std::vector& GetFacets() const + { + return _facets; + } /** Returns the triangle to a given topologic facet. */ virtual MeshGeomFacet GetTriangle(const MeshPointArray&, const MeshFacet&) const; /** Returns the length of the polygon */ @@ -129,22 +139,22 @@ protected: void Done(); protected: - bool _discard; - Base::Matrix4D _inverse; - std::vector _indices; + bool _discard; + Base::Matrix4D _inverse; + std::vector _indices; std::vector _points; std::vector _newpoints; - std::vector _triangles; - std::vector _facets; - std::vector _info; - TriangulationVerifier* _verifier; + std::vector _triangles; + std::vector _facets; + std::vector _info; + TriangulationVerifier* _verifier; }; /** * The EarClippingTriangulator embeds an efficient algorithm to triangulate * polygons taken from http://www.flipcode.com/files/code/triangulate.cpp. */ -class MeshExport EarClippingTriangulator : public AbstractPolygonTriangulator +class MeshExport EarClippingTriangulator: public AbstractPolygonTriangulator { public: EarClippingTriangulator(); @@ -154,38 +164,45 @@ protected: private: /** - * Static class to triangulate any contour/polygon (without holes) efficiently. - * The original code snippet was submitted to FlipCode.com by John W. Ratcliff - * (jratcliff@verant.com) on July 22, 2000. - * The original vector of 2d points is replaced by a vector of 3d points where the - * z-coordinate is ignored. This is because the algorithm is often used for 3d points - * projected to a common plane. The result vector of 2d points is replaced by an - * array of indices to the points of the polygon. - */ + * Static class to triangulate any contour/polygon (without holes) efficiently. + * The original code snippet was submitted to FlipCode.com by John W. Ratcliff + * (jratcliff@verant.com) on July 22, 2000. + * The original vector of 2d points is replaced by a vector of 3d points where the + * z-coordinate is ignored. This is because the algorithm is often used for 3d points + * projected to a common plane. The result vector of 2d points is replaced by an + * array of indices to the points of the polygon. + */ class Triangulate { public: // triangulate a contour/polygon, places results in STL vector // as series of triangles.indicating the points - static bool Process(const std::vector &contour, - std::vector &result); + static bool Process(const std::vector& contour, + std::vector& result); // compute area of a contour/polygon - static float Area(const std::vector &contour); + static float Area(const std::vector& contour); // decide if point Px/Py is inside triangle defined by // (Ax,Ay) (Bx,By) (Cx,Cy) - static bool InsideTriangle(float Ax, float Ay, float Bx, float By, - float Cx, float Cy, float Px, float Py); + static bool InsideTriangle(float Ax, + float Ay, + float Bx, + float By, + float Cx, + float Cy, + float Px, + float Py); static bool _invert; + private: - static bool Snip(const std::vector &contour, - int u,int v,int w,int n,int *V); + static bool + Snip(const std::vector& contour, int u, int v, int w, int n, int* V); }; }; -class MeshExport QuasiDelaunayTriangulator : public EarClippingTriangulator +class MeshExport QuasiDelaunayTriangulator: public EarClippingTriangulator { public: QuasiDelaunayTriangulator(); @@ -194,7 +211,7 @@ protected: bool Triangulate() override; }; -class MeshExport DelaunayTriangulator : public AbstractPolygonTriangulator +class MeshExport DelaunayTriangulator: public AbstractPolygonTriangulator { public: DelaunayTriangulator(); @@ -203,7 +220,7 @@ protected: bool Triangulate() override; }; -class MeshExport FlatTriangulator : public AbstractPolygonTriangulator +class MeshExport FlatTriangulator: public AbstractPolygonTriangulator { public: FlatTriangulator(); @@ -214,7 +231,7 @@ protected: bool Triangulate() override; }; -class MeshExport ConstraintDelaunayTriangulator : public AbstractPolygonTriangulator +class MeshExport ConstraintDelaunayTriangulator: public AbstractPolygonTriangulator { public: explicit ConstraintDelaunayTriangulator(float area); @@ -246,7 +263,7 @@ protected: }; #endif -} // namespace MeshCore +} // namespace MeshCore #endif // MESH_TRIANGULATION_H diff --git a/src/Mod/Mesh/App/Core/Trim.cpp b/src/Mod/Mesh/App/Core/Trim.cpp index 5359c591b3..00c1b58a4f 100644 --- a/src/Mod/Mesh/App/Core/Trim.cpp +++ b/src/Mod/Mesh/App/Core/Trim.cpp @@ -22,38 +22,40 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include -#include "Trim.h" #include "Grid.h" #include "Iterator.h" +#include "Trim.h" using namespace MeshCore; -MeshTrimming::MeshTrimming(MeshKernel &rclM, const Base::ViewProjMethod* pclProj, +MeshTrimming::MeshTrimming(MeshKernel& rclM, + const Base::ViewProjMethod* pclProj, const Base::Polygon2d& rclPoly) - : myMesh(rclM), myProj(pclProj), myPoly(rclPoly) -{ -} + : myMesh(rclM) + , myProj(pclProj) + , myPoly(rclPoly) +{} void MeshTrimming::SetInnerOrOuter(TMode tMode) { - switch (tMode) - { - case INNER: - myInner = true; - break; - case OUTER: - myInner = false; - break; + switch (tMode) { + case INNER: + myInner = true; + break; + case OUTER: + myInner = false; + break; } } -void MeshTrimming::CheckFacets(const MeshFacetGrid& rclGrid, std::vector &raulFacets) const +void MeshTrimming::CheckFacets(const MeshFacetGrid& rclGrid, + std::vector& raulFacets) const { std::vector::iterator it; MeshFacetIterator clIter(myMesh, 0); @@ -79,14 +81,16 @@ void MeshTrimming::CheckFacets(const MeshFacetGrid& rclGrid, std::vectoroperator ()(pnt); - if (myPoly.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)) == myInner) + Base::Vector3f clPt2d = myProj->operator()(pnt); + if (myPoly.Contains(Base::Vector2d(clPt2d.x, clPt2d.y)) == myInner) { return true; - else + } + else { clPoly.Add(Base::Vector2d(clPt2d.x, clPt2d.y)); + } } // is corner of polygon inside the facet - for (size_t j=0; j(A.x*B.y+A.y*C.x+B.x*C.y-(B.y*C.x+A.y*B.x+A.x*C.y)); + fDetABC = + static_cast(A.x * B.y + A.y * C.x + B.x * C.y - (B.y * C.x + A.y * B.x + A.x * C.y)); - for (size_t j=0; j calculate the corresponding 3d-point if (clFacPoly.Contains(myPoly[j])) { P = myPoly[j]; - fDetPAC = static_cast(A.x*P.y+A.y*C.x+P.x*C.y-(P.y*C.x+A.y*P.x+A.x*C.y)); - fDetPBC = static_cast(P.x*B.y+P.y*C.x+B.x*C.y-(B.y*C.x+P.y*B.x+P.x*C.y)); - fDetPAB = static_cast(A.x*B.y+A.y*P.x+B.x*P.y-(B.y*P.x+A.y*B.x+A.x*P.y)); + fDetPAC = static_cast(A.x * P.y + A.y * C.x + P.x * C.y + - (P.y * C.x + A.y * P.x + A.x * C.y)); + fDetPBC = static_cast(P.x * B.y + P.y * C.x + B.x * C.y + - (B.y * C.x + P.y * B.x + P.x * C.y)); + fDetPAB = static_cast(A.x * B.y + A.y * P.x + B.x * P.y + - (B.y * P.x + A.y * B.x + A.x * P.y)); u = fDetPBC / fDetABC; v = fDetPAC / fDetABC; w = fDetPAB / fDetABC; // point is on edge or no valid convex combination - if (u == 0.0f || v == 0.0f || w == 0.0f || fabs(u+v+w-1.0f) >= 0.001f) + if (u == 0.0f || v == 0.0f || w == 0.0f || fabs(u + v + w - 1.0f) >= 0.001f) { return false; + } // 3d point - clPoint = u*rclFacet._aclPoints[0]+v*rclFacet._aclPoints[1]+w*rclFacet._aclPoints[2]; + clPoint = u * rclFacet._aclPoints[0] + v * rclFacet._aclPoints[1] + + w * rclFacet._aclPoints[2]; return true; } @@ -193,29 +209,33 @@ bool MeshTrimming::IsPolygonPointInFacet(FacetIndex ulIndex, Base::Vector3f& clP return false; } -bool MeshTrimming::GetIntersectionPointsOfPolygonAndFacet(FacetIndex ulIndex, int& iSide, std::vector& raclPoints) const +bool MeshTrimming::GetIntersectionPointsOfPolygonAndFacet( + FacetIndex ulIndex, + int& iSide, + std::vector& raclPoints) const { MeshGeomFacet clFac(myMesh.GetFacet(ulIndex)); Base::Vector2d S; Base::Line2d clFacLine, clPolyLine; - int iIntersections=0; - int iIntsctWithEdge0=0, iIntsctWithEdge1=0, iIntsctWithEdge2=0; + int iIntersections = 0; + int iIntsctWithEdge0 = 0, iIntsctWithEdge1 = 0, iIntsctWithEdge2 = 0; // Edge with no intersection iSide = -1; - for (size_t i=0; i((P2-P1).Length()); - float fSP1 = static_cast((P1-S).Length()); - float fSP2 = static_cast((P2-S).Length()); + bool bPushBack = true; + float fP1P2 = static_cast((P2 - P1).Length()); + float fSP1 = static_cast((P1 - S).Length()); + float fSP2 = static_cast((P2 - S).Length()); - float fP3P4 = static_cast((P4-P3).Length()); - float fSP3 = static_cast((P3-S).Length()); - float fSP4 = static_cast((P4-S).Length()); + float fP3P4 = static_cast((P4 - P3).Length()); + float fSP3 = static_cast((P3 - S).Length()); + float fSP4 = static_cast((P4 - S).Length()); // compute proportion of length float l = fSP1 / fP1P2; float m = fSP2 / fP1P2; @@ -246,62 +266,79 @@ bool MeshTrimming::GetIntersectionPointsOfPolygonAndFacet(FacetIndex ulIndex, in float s = fSP4 / fP3P4; // is intersection point convex combination? - if ((fabs(l+m-1.0f) < 0.001f) && (fabs(r+s-1.0f) < 0.001f)) { - Base::Vector3f clIntersection(m*clFac._aclPoints[j]+l*clFac._aclPoints[(j+1)%3]); + if ((fabs(l + m - 1.0f) < 0.001f) && (fabs(r + s - 1.0f) < 0.001f)) { + Base::Vector3f clIntersection(m * clFac._aclPoints[j] + + l * clFac._aclPoints[(j + 1) % 3]); iIntersections++; // only two intersections points per edge allowed if (j == 0) { - if (iIntsctWithEdge0 == 2) + if (iIntsctWithEdge0 == 2) { bPushBack = false; - else + } + else { iIntsctWithEdge0++; + } } else if (j == 1) { - if (iIntsctWithEdge1 == 2) + if (iIntsctWithEdge1 == 2) { bPushBack = false; - else + } + else { iIntsctWithEdge1++; + } } else { - if (iIntsctWithEdge2 == 2) + if (iIntsctWithEdge2 == 2) { bPushBack = false; - else + } + else { iIntsctWithEdge2++; + } } - if (bPushBack) + if (bPushBack) { raclPoints.push_back(clIntersection); + } } } } } // check for rotating facet later - if (iIntsctWithEdge0 == 0) + if (iIntsctWithEdge0 == 0) { iSide = 0; - else if (iIntsctWithEdge1 == 0) + } + else if (iIntsctWithEdge1 == 0) { iSide = 1; - else if (iIntsctWithEdge2 == 0) + } + else if (iIntsctWithEdge2 == 0) { iSide = 2; + } // further check (for rotating the facet) - if (iIntsctWithEdge0 == 0 && iIntsctWithEdge1 == 0) + if (iIntsctWithEdge0 == 0 && iIntsctWithEdge1 == 0) { iSide = 1; - else if (iIntsctWithEdge0 == 0 && iIntsctWithEdge2 == 0) + } + else if (iIntsctWithEdge0 == 0 && iIntsctWithEdge2 == 0) { iSide = 0; - else if (iIntsctWithEdge1 == 0 && iIntsctWithEdge2 == 0) + } + else if (iIntsctWithEdge1 == 0 && iIntsctWithEdge2 == 0) { iSide = 2; + } // and last another check if (iIntsctWithEdge0 * iIntsctWithEdge1 * iIntsctWithEdge2 > 0) { - if (iIntsctWithEdge0 == 2) + if (iIntsctWithEdge0 == 2) { iSide = 2; - else if (iIntsctWithEdge1 == 2) + } + else if (iIntsctWithEdge1 == 2) { iSide = 0; - else if (iIntsctWithEdge2 == 2) + } + else if (iIntsctWithEdge2 == 2) { iSide = 1; + } } return iIntersections > 0; @@ -333,33 +370,40 @@ void MeshTrimming::AdjustFacet(MeshFacet& facet, int iInd) } } -bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vector& raclPoints, std::vector& aclNewFacets) +bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, + int iSide, + const std::vector& raclPoints, + std::vector& aclNewFacets) { MeshGeomFacet clFac; // no valid triangulation possible - if (iSide == -1) + if (iSide == -1) { return false; + } // no intersection point found => triangle is only touched at a corner point if (raclPoints.empty()) { MeshFacet& facet = myMesh._aclFacetArray[ulFacetPos]; - int iCtPtsIn=0; - int iCtPtsOn=0; + int iCtPtsIn = 0; + int iCtPtsOn = 0; Base::Vector3f clFacPnt; Base::Vector2d clProjPnt; for (PointIndex ptIndex : facet._aulPoints) { clFacPnt = (*myProj)(myMesh._aclPointArray[ptIndex]); clProjPnt = Base::Vector2d(clFacPnt.x, clFacPnt.y); - if (myPoly.Intersect(clProjPnt, double(MESH_MIN_PT_DIST))) + if (myPoly.Intersect(clProjPnt, double(MESH_MIN_PT_DIST))) { ++iCtPtsOn; - else if (myPoly.Contains(clProjPnt) == myInner) + } + else if (myPoly.Contains(clProjPnt) == myInner) { ++iCtPtsIn; + } } // in this case we can use the original triangle - if (iCtPtsIn != (3 - iCtPtsOn)) + if (iCtPtsIn != (3 - iCtPtsOn)) { aclNewFacets.push_back(myMesh.GetFacet(ulFacetPos)); + } } // one intersection point found => triangle is also touched at a corner point else if (raclPoints.size() == 1) { @@ -370,9 +414,9 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec // determine the edge containing the intersection point Base::Line2d clFacLine; - for (int j=0; j<3; j++) { + for (int j = 0; j < 3; j++) { Base::Vector3f clP1((*myProj)(clFac._aclPoints[j])); - Base::Vector3f clP2((*myProj)(clFac._aclPoints[(j+1)%3])); + Base::Vector3f clP2((*myProj)(clFac._aclPoints[(j + 1) % 3])); Base::Vector2d P1(clP1.x, clP1.y); Base::Vector2d P2(clP2.x, clP2.y); clFacLine.clV1 = P1; @@ -382,15 +426,15 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec if (myPoly.Contains(P1) == myInner) { MeshGeomFacet clNew; clNew._aclPoints[0] = raclPoints[0]; - clNew._aclPoints[1] = clFac._aclPoints[(j+1)%3]; - clNew._aclPoints[2] = clFac._aclPoints[(j+2)%3]; + clNew._aclPoints[1] = clFac._aclPoints[(j + 1) % 3]; + clNew._aclPoints[2] = clFac._aclPoints[(j + 2) % 3]; aclNewFacets.push_back(clNew); break; } else if (myPoly.Contains(P2) == myInner) { MeshGeomFacet clNew; clNew._aclPoints[0] = raclPoints[0]; - clNew._aclPoints[1] = clFac._aclPoints[(j+2)%3]; + clNew._aclPoints[1] = clFac._aclPoints[(j + 2) % 3]; clNew._aclPoints[2] = clFac._aclPoints[j]; aclNewFacets.push_back(clNew); break; @@ -411,14 +455,15 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec } // check which facets can be inserted - int iCtPts=0; + int iCtPts = 0; Base::Vector3f clFacPnt; Base::Vector2d clProjPnt; for (PointIndex ptIndex : facet._aulPoints) { clFacPnt = (*myProj)(myMesh._aclPointArray[ptIndex]); clProjPnt = Base::Vector2d(clFacPnt.x, clFacPnt.y); - if (myPoly.Contains(clProjPnt) == myInner) + if (myPoly.Contains(clProjPnt) == myInner) { ++iCtPts; + } } if (iCtPts == 2) { @@ -440,8 +485,9 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec clFac._aclPoints[2] = clP2; aclNewFacets.push_back(clFac); } - else + else { return false; + } } // four intersection points found else if (raclPoints.size() == 4) { @@ -450,17 +496,19 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec clFac = myMesh.GetFacet(ulFacetPos); // intersection points - Base::Vector3f clP1(raclPoints[0]), clP2(raclPoints[1]), clP3(raclPoints[2]), clP4(raclPoints[3]); + Base::Vector3f clP1(raclPoints[0]), clP2(raclPoints[1]), clP3(raclPoints[2]), + clP4(raclPoints[3]); // check which facets can be inserted - int iCtPts=0; + int iCtPts = 0; Base::Vector3f clFacPnt; Base::Vector2d clProjPnt; for (PointIndex ptIndex : facet._aulPoints) { clFacPnt = (*myProj)(myMesh._aclPointArray[ptIndex]); clProjPnt = Base::Vector2d(clFacPnt.x, clFacPnt.y); - if (myPoly.Contains(clProjPnt) == myInner) + if (myPoly.Contains(clProjPnt) == myInner) { ++iCtPts; + } } // sort the intersection points in a certain order @@ -473,13 +521,13 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec clP4 = raclPoints[2]; } - if ((clP1-clFac._aclPoints[1]).Length() > (clP3-clFac._aclPoints[1]).Length()) { + if ((clP1 - clFac._aclPoints[1]).Length() > (clP3 - clFac._aclPoints[1]).Length()) { // swap P1 and P3 Base::Vector3f tmp(clP1); clP1 = clP3; clP3 = tmp; } - if ((clP2-clFac._aclPoints[0]).Length() > (clP4-clFac._aclPoints[0]).Length()) { + if ((clP2 - clFac._aclPoints[0]).Length() > (clP4 - clFac._aclPoints[0]).Length()) { // swap P2 and P4 Base::Vector3f tmp(clP2); clP2 = clP4; @@ -489,8 +537,10 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec else { if (iSide == 0) { Base::Vector3f clNormal(clFac.GetNormal()); - MeshGeomFacet clTmpFac; clTmpFac._aclPoints[0] = clFac._aclPoints[1]; - clTmpFac._aclPoints[1] = clP2; clTmpFac._aclPoints[2] = clP1; + MeshGeomFacet clTmpFac; + clTmpFac._aclPoints[0] = clFac._aclPoints[1]; + clTmpFac._aclPoints[1] = clP2; + clTmpFac._aclPoints[2] = clP1; if (clTmpFac.GetNormal() * clNormal > 0) { Base::Vector3f tmp(clP1); clP1 = clP2; @@ -505,7 +555,7 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec } } else if (iSide == 1) { - if ((clP2-clFac._aclPoints[1]).Length() > (clP4-clFac._aclPoints[1]).Length()) { + if ((clP2 - clFac._aclPoints[1]).Length() > (clP4 - clFac._aclPoints[1]).Length()) { Base::Vector3f tmp(clP1); clP1 = clP4; clP4 = tmp; @@ -523,7 +573,7 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec } } else { - if ((clP1-clFac._aclPoints[1]).Length() > (clP3-clFac._aclPoints[1]).Length()) { + if ((clP1 - clFac._aclPoints[1]).Length() > (clP3 - clFac._aclPoints[1]).Length()) { Base::Vector3f tmp(clP1); clP1 = clP3; clP3 = tmp; @@ -594,18 +644,23 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec aclNewFacets.push_back(clFac); } } - else + else { return false; + } return true; } -bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vector& raclPoints, Base::Vector3f& clP3, +bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, + int iSide, + const std::vector& raclPoints, + Base::Vector3f& clP3, std::vector& aclNewFacets) { // no valid triangulation possible - if (iSide == -1 || raclPoints.size() < 2) + if (iSide == -1 || raclPoints.size() < 2) { return false; + } Base::Vector3f clP1(raclPoints[0]); Base::Vector3f clP2(raclPoints[1]); @@ -615,12 +670,12 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec MeshGeomFacet clFac; - float fDistEdgeP1 = clP1.DistanceToLineSegment( - myMesh._aclPointArray[facet._aulPoints[1]], - myMesh._aclPointArray[facet._aulPoints[2]]).Length(); - float fDistEdgeP2 = clP2.DistanceToLineSegment( - myMesh._aclPointArray[facet._aulPoints[1]], - myMesh._aclPointArray[facet._aulPoints[2]]).Length(); + float fDistEdgeP1 = clP1.DistanceToLineSegment(myMesh._aclPointArray[facet._aulPoints[1]], + myMesh._aclPointArray[facet._aulPoints[2]]) + .Length(); + float fDistEdgeP2 = clP2.DistanceToLineSegment(myMesh._aclPointArray[facet._aulPoints[1]], + myMesh._aclPointArray[facet._aulPoints[2]]) + .Length(); // swap P1 and P2 if (fDistEdgeP2 < fDistEdgeP1) { @@ -630,18 +685,19 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec } // check which facets should be inserted - int iCtPts=0; + int iCtPts = 0; Base::Vector3f clFacPnt; Base::Vector2d clProjPnt; for (PointIndex ptIndex : facet._aulPoints) { clFacPnt = (*myProj)(myMesh._aclPointArray[ptIndex]); clProjPnt = Base::Vector2d(clFacPnt.x, clFacPnt.y); - if (myPoly.Contains(clProjPnt) == myInner) + if (myPoly.Contains(clProjPnt) == myInner) { ++iCtPts; + } } if (iCtPts == 3) { clFac = myMesh.GetFacet(ulFacetPos); - if ((clP1-clFac._aclPoints[1]).Length() > (clP2-clFac._aclPoints[1]).Length()) { + if ((clP1 - clFac._aclPoints[1]).Length() > (clP2 - clFac._aclPoints[1]).Length()) { Base::Vector3f tmp(clP1); clP1 = clP2; clP2 = tmp; @@ -683,7 +739,7 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec } else if (iCtPts == 0) { clFac = myMesh.GetFacet(ulFacetPos); - if ((clP1-clFac._aclPoints[1]).Length() > (clP2-clFac._aclPoints[1]).Length()) { + if ((clP1 - clFac._aclPoints[1]).Length() > (clP2 - clFac._aclPoints[1]).Length()) { Base::Vector3f tmp(clP1); clP1 = clP2; clP2 = tmp; @@ -713,7 +769,8 @@ bool MeshTrimming::CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vec return true; } -void MeshTrimming::TrimFacets(const std::vector& raulFacets, std::vector& aclNewFacets) +void MeshTrimming::TrimFacets(const std::vector& raulFacets, + std::vector& aclNewFacets) { Base::Vector3f clP; std::vector clIntsct; @@ -726,15 +783,17 @@ void MeshTrimming::TrimFacets(const std::vector& raulFacets, std::ve // facet must be trimmed if (!PolygonContainsCompleteFacet(myInner, index)) { // generate new facets - if (GetIntersectionPointsOfPolygonAndFacet(index, iSide, clIntsct)) + if (GetIntersectionPointsOfPolygonAndFacet(index, iSide, clIntsct)) { CreateFacets(index, iSide, clIntsct, myTriangles); + } } } // facet contains a polygon point else { // generate new facets - if (GetIntersectionPointsOfPolygonAndFacet(index, iSide, clIntsct)) + if (GetIntersectionPointsOfPolygonAndFacet(index, iSide, clIntsct)) { CreateFacets(index, iSide, clIntsct, clP, myTriangles); + } } seq.next(); } diff --git a/src/Mod/Mesh/App/Core/Trim.h b/src/Mod/Mesh/App/Core/Trim.h index 5360567a21..8ced23c795 100644 --- a/src/Mod/Mesh/App/Core/Trim.h +++ b/src/Mod/Mesh/App/Core/Trim.h @@ -28,7 +28,8 @@ #include "MeshKernel.h" -namespace MeshCore { +namespace MeshCore +{ /** * Checks the facets in 2D and then trim them in 3D @@ -36,21 +37,30 @@ namespace MeshCore { class MeshExport MeshTrimming { public: - enum TMode {INNER, OUTER}; + enum TMode + { + INNER, + OUTER + }; public: - MeshTrimming(MeshKernel& mesh, const Base::ViewProjMethod* pclProj, const Base::Polygon2d& rclPoly); + MeshTrimming(MeshKernel& mesh, + const Base::ViewProjMethod* pclProj, + const Base::Polygon2d& rclPoly); public: /** - * Checks all facets for intersection with the polygon and writes all touched facets into the vector + * Checks all facets for intersection with the polygon and writes all touched facets into the + * vector */ void CheckFacets(const MeshFacetGrid& rclGrid, std::vector& raulFacets) const; /** - * The facets from raulFacets will be trimmed or deleted and aclNewFacets gives the new generated facets + * The facets from raulFacets will be trimmed or deleted and aclNewFacets gives the new + * generated facets */ - void TrimFacets(const std::vector& raulFacets, std::vector& aclNewFacets); + void TrimFacets(const std::vector& raulFacets, + std::vector& aclNewFacets); /** * Setter: Trimm INNER or OUTER @@ -71,14 +81,19 @@ private: /** * Creates new facets from edge points of the facet */ - bool CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vector& raclPoints, - std::vector& aclNewFacets); + bool CreateFacets(FacetIndex ulFacetPos, + int iSide, + const std::vector& raclPoints, + std::vector& aclNewFacets); /** * Creates new facets from edge points of the facet and a point inside the facet */ - bool CreateFacets(FacetIndex ulFacetPos, int iSide, const std::vector& raclPoints, - Base::Vector3f& clP3, std::vector& aclNewFacets); + bool CreateFacets(FacetIndex ulFacetPos, + int iSide, + const std::vector& raclPoints, + Base::Vector3f& clP3, + std::vector& aclNewFacets); /** * Checks if a polygon point lies within a facet @@ -89,19 +104,20 @@ private: * Calculates the two intersection points between polygonline and facet in 2D * and project the points back into 3D (not very exactly) */ - bool GetIntersectionPointsOfPolygonAndFacet(FacetIndex ulIndex, int& iSide, - std::vector& raclPoints) const; + bool GetIntersectionPointsOfPolygonAndFacet(FacetIndex ulIndex, + int& iSide, + std::vector& raclPoints) const; void AdjustFacet(MeshFacet& facet, int iInd); private: MeshKernel& myMesh; - bool myInner{true}; + bool myInner {true}; std::vector myTriangles; const Base::ViewProjMethod* myProj; const Base::Polygon2d& myPoly; }; -} //namespace MeshCore +} // namespace MeshCore -#endif //MESHTRIM_H +#endif // MESHTRIM_H diff --git a/src/Mod/Mesh/App/Core/TrimByPlane.cpp b/src/Mod/Mesh/App/Core/TrimByPlane.cpp index f69504a6b4..0930725fdf 100644 --- a/src/Mod/Mesh/App/Core/TrimByPlane.cpp +++ b/src/Mod/Mesh/App/Core/TrimByPlane.cpp @@ -22,23 +22,25 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif -#include "TrimByPlane.h" #include "Grid.h" #include "Iterator.h" +#include "TrimByPlane.h" using namespace MeshCore; -MeshTrimByPlane::MeshTrimByPlane(MeshKernel &rclM) - : myMesh(rclM) -{ -} +MeshTrimByPlane::MeshTrimByPlane(MeshKernel& rclM) + : myMesh(rclM) +{} -void MeshTrimByPlane::CheckFacets(const MeshFacetGrid& rclGrid, const Base::Vector3f& base, const Base::Vector3f& normal, - std::vector &trimFacets, std::vector& removeFacets) const +void MeshTrimByPlane::CheckFacets(const MeshFacetGrid& rclGrid, + const Base::Vector3f& base, + const Base::Vector3f& normal, + std::vector& trimFacets, + std::vector& removeFacets) const { // Go through the grid and check for each cell if its bounding box intersects the plane. // If the box is completely below the plane all facets will be kept, if it's above the @@ -59,9 +61,10 @@ void MeshTrimByPlane::CheckFacets(const MeshFacetGrid& rclGrid, const Base::Vect // remove double elements std::sort(checkElements.begin(), checkElements.end()); - checkElements.erase(std::unique(checkElements.begin(), checkElements.end()), checkElements.end()); + checkElements.erase(std::unique(checkElements.begin(), checkElements.end()), + checkElements.end()); - trimFacets.reserve(checkElements.size()/2); // reserve some memory + trimFacets.reserve(checkElements.size() / 2); // reserve some memory for (FacetIndex element : checkElements) { MeshGeomFacet clFacet = myMesh.GetFacet(element); if (clFacet.IntersectWithPlane(base, normal)) { @@ -78,8 +81,11 @@ void MeshTrimByPlane::CheckFacets(const MeshFacetGrid& rclGrid, const Base::Vect removeFacets.erase(std::unique(removeFacets.begin(), removeFacets.end()), removeFacets.end()); } -void MeshTrimByPlane::CreateOneFacet(const Base::Vector3f& base, const Base::Vector3f& normal, unsigned short shift, - const MeshGeomFacet& facet, std::vector& trimmedFacets) const +void MeshTrimByPlane::CreateOneFacet(const Base::Vector3f& base, + const Base::Vector3f& normal, + unsigned short shift, + const MeshGeomFacet& facet, + std::vector& trimmedFacets) const { unsigned short nul = shift % 3; unsigned short one = (shift + 1) % 3; @@ -103,8 +109,11 @@ void MeshTrimByPlane::CreateOneFacet(const Base::Vector3f& base, const Base::Vec trimmedFacets.push_back(create); } -void MeshTrimByPlane::CreateTwoFacet(const Base::Vector3f& base, const Base::Vector3f& normal, unsigned short shift, - const MeshGeomFacet& facet, std::vector& trimmedFacets) const +void MeshTrimByPlane::CreateTwoFacet(const Base::Vector3f& base, + const Base::Vector3f& normal, + unsigned short shift, + const MeshGeomFacet& facet, + std::vector& trimmedFacets) const { unsigned short nul = shift % 3; unsigned short one = (shift + 1) % 3; @@ -133,8 +142,10 @@ void MeshTrimByPlane::CreateTwoFacet(const Base::Vector3f& base, const Base::Vec trimmedFacets.push_back(create); } -void MeshTrimByPlane::TrimFacets(const std::vector& trimFacets, const Base::Vector3f& base, - const Base::Vector3f& normal, std::vector& trimmedFacets) +void MeshTrimByPlane::TrimFacets(const std::vector& trimFacets, + const Base::Vector3f& base, + const Base::Vector3f& normal, + std::vector& trimmedFacets) { trimmedFacets.reserve(2 * trimFacets.size()); for (FacetIndex index : trimFacets) { diff --git a/src/Mod/Mesh/App/Core/TrimByPlane.h b/src/Mod/Mesh/App/Core/TrimByPlane.h index 65883fa7c7..d0ccc9d309 100644 --- a/src/Mod/Mesh/App/Core/TrimByPlane.h +++ b/src/Mod/Mesh/App/Core/TrimByPlane.h @@ -26,7 +26,8 @@ #include "MeshKernel.h" -namespace MeshCore { +namespace MeshCore +{ /** * Trim the facets in 3D with a plane @@ -39,27 +40,40 @@ public: public: /** - * Checks all facets for intersection with the plane and writes all touched facets into the vector + * Checks all facets for intersection with the plane and writes all touched facets into the + * vector */ - void CheckFacets(const MeshFacetGrid& rclGrid, const Base::Vector3f& base, const Base::Vector3f& normal, - std::vector& trimFacets, std::vector& removeFacets) const; + void CheckFacets(const MeshFacetGrid& rclGrid, + const Base::Vector3f& base, + const Base::Vector3f& normal, + std::vector& trimFacets, + std::vector& removeFacets) const; /** - * The facets from \a trimFacets will be trimmed or deleted and \a trimmedFacets holds the newly generated facets + * The facets from \a trimFacets will be trimmed or deleted and \a trimmedFacets holds the newly + * generated facets */ - void TrimFacets(const std::vector& trimFacets, const Base::Vector3f& base, - const Base::Vector3f& normal, std::vector& trimmedFacets); + void TrimFacets(const std::vector& trimFacets, + const Base::Vector3f& base, + const Base::Vector3f& normal, + std::vector& trimmedFacets); private: - void CreateOneFacet(const Base::Vector3f& base, const Base::Vector3f& normal, unsigned short shift, - const MeshGeomFacet& facet, std::vector& trimmedFacets) const; - void CreateTwoFacet(const Base::Vector3f& base, const Base::Vector3f& normal, unsigned short shift, - const MeshGeomFacet& facet, std::vector& trimmedFacets) const; + void CreateOneFacet(const Base::Vector3f& base, + const Base::Vector3f& normal, + unsigned short shift, + const MeshGeomFacet& facet, + std::vector& trimmedFacets) const; + void CreateTwoFacet(const Base::Vector3f& base, + const Base::Vector3f& normal, + unsigned short shift, + const MeshGeomFacet& facet, + std::vector& trimmedFacets) const; private: MeshKernel& myMesh; }; -} //namespace MeshCore +} // namespace MeshCore -#endif //MESHTRIM_BY_PLANE_H +#endif // MESHTRIM_BY_PLANE_H diff --git a/src/Mod/Mesh/App/Core/Utilities.h b/src/Mod/Mesh/App/Core/Utilities.h index 305e7c0b41..bb177836d9 100644 --- a/src/Mod/Mesh/App/Core/Utilities.h +++ b/src/Mod/Mesh/App/Core/Utilities.h @@ -27,32 +27,43 @@ #include -namespace Base { +namespace Base +{ // Specialization for Wm4::Vector3d -template <> -struct vec_traits { +template<> +struct vec_traits +{ using vec_type = Wm4::Vector3d; using float_type = double; - explicit vec_traits(const vec_type& v) : v(v){} - inline std::tuple get() const { + explicit vec_traits(const vec_type& v) + : v(v) + {} + inline std::tuple get() const + { return std::make_tuple(v.X(), v.Y(), v.Z()); } + private: const vec_type& v; }; // Specialization for Wm4::Vector3f -template <> -struct vec_traits { +template<> +struct vec_traits +{ using vec_type = Wm4::Vector3f; using float_type = float; - explicit vec_traits(const vec_type& v) : v(v){} - inline std::tuple get() const { + explicit vec_traits(const vec_type& v) + : v(v) + {} + inline std::tuple get() const + { return std::make_tuple(v.X(), v.Y(), v.Z()); } + private: const vec_type& v; }; -} +} // namespace Base -#endif // MESH_UTILITIES_H +#endif // MESH_UTILITIES_H diff --git a/src/Mod/Mesh/App/Core/Visitor.cpp b/src/Mod/Mesh/App/Core/Visitor.cpp index fce056f419..77927794fd 100644 --- a/src/Mod/Mesh/App/Core/Visitor.cpp +++ b/src/Mod/Mesh/App/Core/Visitor.cpp @@ -22,21 +22,22 @@ #include "PreCompiled.h" -#include "MeshKernel.h" // must be before Visitor.h -#include "Visitor.h" #include "Algorithm.h" #include "Approximation.h" +#include "MeshKernel.h" // must be before Visitor.h +#include "Visitor.h" using namespace MeshCore; -unsigned long MeshKernel::VisitNeighbourFacets (MeshFacetVisitor &rclFVisitor, FacetIndex ulStartFacet) const +unsigned long MeshKernel::VisitNeighbourFacets(MeshFacetVisitor& rclFVisitor, + FacetIndex ulStartFacet) const { unsigned long ulVisited = 0, j, ulLevel = 0; unsigned long ulCount = _aclFacetArray.size(); std::vector clCurrentLevel, clNextLevel; - std::vector::iterator clCurrIter; + std::vector::iterator clCurrIter; MeshFacetArray::_TConstIterator clCurrFacet, clNBFacet; // pick up start point @@ -51,26 +52,31 @@ unsigned long MeshKernel::VisitNeighbourFacets (MeshFacetVisitor &rclFVisitor, F // visit all neighbours of the current level if not yet done for (unsigned short i = 0; i < 3; i++) { - j = clCurrFacet->_aulNeighbours[i]; // index to neighbour facet - if (j == FACET_INDEX_MAX) - continue; // no neighbour facet + j = clCurrFacet->_aulNeighbours[i]; // index to neighbour facet + if (j == FACET_INDEX_MAX) { + continue; // no neighbour facet + } - if (j >= ulCount) - continue; // error in data structure + if (j >= ulCount) { + continue; // error in data structure + } clNBFacet = _aclFacetArray.begin() + j; - if (!rclFVisitor.AllowVisit(*clNBFacet, *clCurrFacet, j, ulLevel, i)) + if (!rclFVisitor.AllowVisit(*clNBFacet, *clCurrFacet, j, ulLevel, i)) { continue; - if (clNBFacet->IsFlag(MeshFacet::VISIT)) - continue; // neighbour facet already visited + } + if (clNBFacet->IsFlag(MeshFacet::VISIT)) { + continue; // neighbour facet already visited + } else { // visit and mark ulVisited++; clNextLevel.push_back(j); clNBFacet->SetFlag(MeshFacet::VISIT); - if (!rclFVisitor.Visit(*clNBFacet, *clCurrFacet, j, ulLevel)) + if (!rclFVisitor.Visit(*clNBFacet, *clCurrFacet, j, ulLevel)) { return ulVisited; + } } } } @@ -83,7 +89,8 @@ unsigned long MeshKernel::VisitNeighbourFacets (MeshFacetVisitor &rclFVisitor, F return ulVisited; } -unsigned long MeshKernel::VisitNeighbourFacetsOverCorners (MeshFacetVisitor &rclFVisitor, FacetIndex ulStartFacet) const +unsigned long MeshKernel::VisitNeighbourFacetsOverCorners(MeshFacetVisitor& rclFVisitor, + FacetIndex ulStartFacet) const { unsigned long ulVisited = 0, ulLevel = 0; MeshRefPointToFacets clRPF(*this); @@ -96,9 +103,11 @@ unsigned long MeshKernel::VisitNeighbourFacetsOverCorners (MeshFacetVisitor &rcl while (!aclCurrentLevel.empty()) { // visit all neighbours of the current level - for (std::vector::iterator pCurrFacet = aclCurrentLevel.begin(); pCurrFacet < aclCurrentLevel.end(); ++pCurrFacet) { + for (std::vector::iterator pCurrFacet = aclCurrentLevel.begin(); + pCurrFacet < aclCurrentLevel.end(); + ++pCurrFacet) { for (int i = 0; i < 3; i++) { - const MeshFacet &rclFacet = raclFAry[*pCurrFacet]; + const MeshFacet& rclFacet = raclFAry[*pCurrFacet]; const std::set& raclNB = clRPF[rclFacet._aulPoints[i]]; for (FacetIndex pINb : raclNB) { if (!pFBegin[pINb].IsFlag(MeshFacet::VISIT)) { @@ -107,8 +116,12 @@ unsigned long MeshKernel::VisitNeighbourFacetsOverCorners (MeshFacetVisitor &rcl FacetIndex ulFInd = pINb; aclNextLevel.push_back(ulFInd); pFBegin[pINb].SetFlag(MeshFacet::VISIT); - if (!rclFVisitor.Visit(pFBegin[pINb], raclFAry[*pCurrFacet], ulFInd, ulLevel)) + if (!rclFVisitor.Visit(pFBegin[pINb], + raclFAry[*pCurrFacet], + ulFInd, + ulLevel)) { return ulVisited; + } } } } @@ -121,11 +134,12 @@ unsigned long MeshKernel::VisitNeighbourFacetsOverCorners (MeshFacetVisitor &rcl return ulVisited; } -unsigned long MeshKernel::VisitNeighbourPoints (MeshPointVisitor &rclPVisitor, PointIndex ulStartPoint) const +unsigned long MeshKernel::VisitNeighbourPoints(MeshPointVisitor& rclPVisitor, + PointIndex ulStartPoint) const { unsigned long ulVisited = 0, ulLevel = 0; std::vector aclCurrentLevel, aclNextLevel; - std::vector::iterator clCurrIter; + std::vector::iterator clCurrIter; MeshPointArray::_TConstIterator pPBegin = _aclPointArray.begin(); MeshRefPointToPoints clNPs(*this); @@ -134,7 +148,8 @@ unsigned long MeshKernel::VisitNeighbourPoints (MeshPointVisitor &rclPVisitor, P while (!aclCurrentLevel.empty()) { // visit all neighbours of the current level - for (clCurrIter = aclCurrentLevel.begin(); clCurrIter < aclCurrentLevel.end(); ++clCurrIter) { + for (clCurrIter = aclCurrentLevel.begin(); clCurrIter < aclCurrentLevel.end(); + ++clCurrIter) { const std::set& raclNB = clNPs[*clCurrIter]; for (PointIndex pINb : raclNB) { if (!pPBegin[pINb].IsFlag(MeshPoint::VISIT)) { @@ -143,8 +158,12 @@ unsigned long MeshKernel::VisitNeighbourPoints (MeshPointVisitor &rclPVisitor, P PointIndex ulPInd = pINb; aclNextLevel.push_back(ulPInd); pPBegin[pINb].SetFlag(MeshPoint::VISIT); - if (!rclPVisitor.Visit(pPBegin[pINb], *(pPBegin + (*clCurrIter)), ulPInd, ulLevel)) + if (!rclPVisitor.Visit(pPBegin[pINb], + *(pPBegin + (*clCurrIter)), + ulPInd, + ulLevel)) { return ulVisited; + } } } } @@ -158,16 +177,15 @@ unsigned long MeshKernel::VisitNeighbourPoints (MeshPointVisitor &rclPVisitor, P // ------------------------------------------------------------------------- -MeshSearchNeighbourFacetsVisitor::MeshSearchNeighbourFacetsVisitor (const MeshKernel &rclMesh, - float fRadius, - FacetIndex ulStartFacetIdx) - : _rclMeshBase(rclMesh), - _clCenter(rclMesh.GetFacet(ulStartFacetIdx).GetGravityPoint()), - _fRadius(fRadius) -{ -} +MeshSearchNeighbourFacetsVisitor::MeshSearchNeighbourFacetsVisitor(const MeshKernel& rclMesh, + float fRadius, + FacetIndex ulStartFacetIdx) + : _rclMeshBase(rclMesh) + , _clCenter(rclMesh.GetFacet(ulStartFacetIdx).GetGravityPoint()) + , _fRadius(fRadius) +{} -std::vector MeshSearchNeighbourFacetsVisitor::GetAndReset () +std::vector MeshSearchNeighbourFacetsVisitor::GetAndReset() { MeshAlgorithm(_rclMeshBase).ResetFacetsFlag(_vecFacets, MeshFacet::VISIT); return _vecFacets; @@ -175,9 +193,14 @@ std::vector MeshSearchNeighbourFacetsVisitor::GetAndReset () // ------------------------------------------------------------------------- -MeshPlaneVisitor::MeshPlaneVisitor (const MeshKernel& mesh, FacetIndex index, - float deviation, std::vector &indices) - : mesh(mesh), indices(indices), max_deviation(deviation), fitter(new PlaneFit) +MeshPlaneVisitor::MeshPlaneVisitor(const MeshKernel& mesh, + FacetIndex index, + float deviation, + std::vector& indices) + : mesh(mesh) + , indices(indices) + , max_deviation(deviation) + , fitter(new PlaneFit) { MeshGeomFacet triangle = mesh.GetFacet(index); basepoint = triangle.GetGravityPoint(); @@ -187,26 +210,33 @@ MeshPlaneVisitor::MeshPlaneVisitor (const MeshKernel& mesh, FacetIndex index, fitter->AddPoint(triangle._aclPoints[2]); } -MeshPlaneVisitor::~MeshPlaneVisitor () +MeshPlaneVisitor::~MeshPlaneVisitor() { delete fitter; } -bool MeshPlaneVisitor::AllowVisit (const MeshFacet& face, const MeshFacet&, - FacetIndex, unsigned long, unsigned short) +bool MeshPlaneVisitor::AllowVisit(const MeshFacet& face, + const MeshFacet&, + FacetIndex, + unsigned long, + unsigned short) { - if (!fitter->Done()) + if (!fitter->Done()) { fitter->Fit(); + } MeshGeomFacet triangle = mesh.GetFacet(face); for (const auto& pnt : triangle._aclPoints) { - if (fabs(fitter->GetDistanceToPlane(pnt)) > max_deviation) + if (fabs(fitter->GetDistanceToPlane(pnt)) > max_deviation) { return false; + } } return true; } -bool MeshPlaneVisitor::Visit (const MeshFacet & face, const MeshFacet &, - FacetIndex ulFInd, unsigned long) +bool MeshPlaneVisitor::Visit(const MeshFacet& face, + const MeshFacet&, + FacetIndex ulFInd, + unsigned long) { MeshGeomFacet triangle = mesh.GetFacet(face); indices.push_back(ulFInd); diff --git a/src/Mod/Mesh/App/Core/Visitor.h b/src/Mod/Mesh/App/Core/Visitor.h index bf991f7799..ce7d89563d 100644 --- a/src/Mod/Mesh/App/Core/Visitor.h +++ b/src/Mod/Mesh/App/Core/Visitor.h @@ -23,11 +23,12 @@ #ifndef VISITOR_H #define VISITOR_H -#include #include "MeshKernel.h" +#include -namespace MeshCore { +namespace MeshCore +{ class MeshFacet; class MeshKernel; @@ -53,15 +54,19 @@ public: * If \a true is returned the next iteration is done if there are still facets to visit. * If \a false is returned the calling method stops immediately visiting further facets. */ - virtual bool Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, FacetIndex ulFInd, - unsigned long ulLevel) = 0; + virtual bool Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) = 0; /** Test before a facet will be flagged as VISIT, return false means: go on with * visiting the facets but not this one and set not the VISIT flag */ - virtual bool AllowVisit (const MeshFacet& rclFacet, const MeshFacet& rclFrom, - FacetIndex ulFInd, unsigned long ulLevel, - unsigned short neighbourIndex) + virtual bool AllowVisit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel, + unsigned short neighbourIndex) { (void)rclFacet; (void)rclFrom; @@ -75,32 +80,40 @@ public: /** * Special mesh visitor that searches for facets within a given search radius. */ -class MeshExport MeshSearchNeighbourFacetsVisitor : public MeshFacetVisitor +class MeshExport MeshSearchNeighbourFacetsVisitor: public MeshFacetVisitor { public: - MeshSearchNeighbourFacetsVisitor (const MeshKernel &rclMesh, float fRadius, FacetIndex ulStartFacetIdx); - ~MeshSearchNeighbourFacetsVisitor () override = default; + MeshSearchNeighbourFacetsVisitor(const MeshKernel& rclMesh, + float fRadius, + FacetIndex ulStartFacetIdx); + ~MeshSearchNeighbourFacetsVisitor() override = default; /** Checks the facet if it lies inside the search radius. */ - inline bool Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, FacetIndex ulFInd, unsigned long ulLevel) override; + inline bool Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) override; /** Resets the VISIT flag of already visited facets. */ - inline std::vector GetAndReset (); + inline std::vector GetAndReset(); protected: const MeshKernel& _rclMeshBase; /**< The mesh kernel. */ - Base::Vector3f _clCenter; /**< Center. */ - float _fRadius; /**< Search radius. */ - unsigned long _ulCurrentLevel{0}; - bool _bFacetsFoundInCurrentLevel{false}; - std::vector _vecFacets; /**< Found facets. */ + Base::Vector3f _clCenter; /**< Center. */ + float _fRadius; /**< Search radius. */ + unsigned long _ulCurrentLevel {0}; + bool _bFacetsFoundInCurrentLevel {false}; + std::vector _vecFacets; /**< Found facets. */ }; -inline bool MeshSearchNeighbourFacetsVisitor::Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, - FacetIndex ulFInd, unsigned long ulLevel) +inline bool MeshSearchNeighbourFacetsVisitor::Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long ulLevel) { (void)rclFrom; if (ulLevel > _ulCurrentLevel) { - if (!_bFacetsFoundInCurrentLevel) + if (!_bFacetsFoundInCurrentLevel) { return false; + } _ulCurrentLevel = ulLevel; _bFacetsFoundInCurrentLevel = false; } @@ -119,14 +132,18 @@ inline bool MeshSearchNeighbourFacetsVisitor::Visit (const MeshFacet &rclFacet, /** * The MeshTopFacetVisitor just collects the indices of all visited facets. */ -class MeshExport MeshTopFacetVisitor : public MeshFacetVisitor +class MeshExport MeshTopFacetVisitor: public MeshFacetVisitor { public: - MeshTopFacetVisitor (std::vector &raulNB) : _raulNeighbours(raulNB) {} - ~MeshTopFacetVisitor () override = default; + MeshTopFacetVisitor(std::vector& raulNB) + : _raulNeighbours(raulNB) + {} + ~MeshTopFacetVisitor() override = default; /** Collects the facet indices. */ - bool Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom, - FacetIndex ulFInd, unsigned long) override + bool Visit(const MeshFacet& rclFacet, + const MeshFacet& rclFrom, + FacetIndex ulFInd, + unsigned long) override { (void)rclFacet; (void)rclFrom; @@ -135,7 +152,7 @@ public: } protected: - std::vector &_raulNeighbours; /**< Indices of all visited facets. */ + std::vector& _raulNeighbours; /**< Indices of all visited facets. */ }; // ------------------------------------------------------------------------- @@ -144,22 +161,24 @@ protected: * The MeshPlaneVisitor collects all facets the are co-planar to the plane defined * by the start triangle. */ -class MeshPlaneVisitor : public MeshFacetVisitor +class MeshPlaneVisitor: public MeshFacetVisitor { public: - MeshPlaneVisitor (const MeshKernel& mesh, - FacetIndex index, - float deviation, - std::vector &indices); - ~MeshPlaneVisitor () override; - bool AllowVisit (const MeshFacet& face, const MeshFacet&, - FacetIndex, unsigned long, unsigned short neighbourIndex) override; - bool Visit (const MeshFacet & face, const MeshFacet &, - FacetIndex ulFInd, unsigned long) override; + MeshPlaneVisitor(const MeshKernel& mesh, + FacetIndex index, + float deviation, + std::vector& indices); + ~MeshPlaneVisitor() override; + bool AllowVisit(const MeshFacet& face, + const MeshFacet&, + FacetIndex, + unsigned long, + unsigned short neighbourIndex) override; + bool Visit(const MeshFacet& face, const MeshFacet&, FacetIndex ulFInd, unsigned long) override; protected: const MeshKernel& mesh; - std::vector &indices; + std::vector& indices; Base::Vector3f basepoint; Base::Vector3f normal; float max_deviation; @@ -184,11 +203,12 @@ public: * If \a true is returned the next iteration is done if there are still point to visit. If * \a false is returned the calling method stops immediately visiting further points. */ - virtual bool Visit (const MeshPoint &rclPoint, const MeshPoint &rclFrom, - FacetIndex ulPInd, unsigned long ulLevel) = 0; + virtual bool Visit(const MeshPoint& rclPoint, + const MeshPoint& rclFrom, + FacetIndex ulPInd, + unsigned long ulLevel) = 0; }; -} // namespace MeshCore - -#endif // VISITOR_H +} // namespace MeshCore +#endif // VISITOR_H diff --git a/src/Mod/Mesh/App/Core/tritritest.h b/src/Mod/Mesh/App/Core/tritritest.h index 44d790391f..ce65c67553 100644 --- a/src/Mod/Mesh/App/Core/tritritest.h +++ b/src/Mod/Mesh/App/Core/tritritest.h @@ -1,3 +1,4 @@ +// clang-format off /* Triangle/triangle intersection test routine, * by Tomas Moller, 1997. * See article "A Fast Triangle-Triangle Intersection Test", @@ -722,3 +723,4 @@ int tri_tri_intersect_with_isectline(float V0[3],float V1[3],float V2[3], return 1; } +// clang-format on diff --git a/src/Mod/Mesh/App/Edge.cpp b/src/Mod/Mesh/App/Edge.cpp index 787cf8cf82..1fa3ff4d75 100644 --- a/src/Mod/Mesh/App/Edge.cpp +++ b/src/Mod/Mesh/App/Edge.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "Edge.h" @@ -31,21 +31,21 @@ using namespace Mesh; -Edge::Edge() //NOLINT - : Mesh(nullptr) +Edge::Edge() // NOLINT + : Mesh(nullptr) { - for (int i=0; i<2; i++) { + for (int i = 0; i < 2; i++) { PIndex[i] = MeshCore::POINT_INDEX_MAX; NIndex[i] = MeshCore::FACET_INDEX_MAX; } } Edge::Edge(const Edge& e) - : MeshCore::MeshGeomEdge(e) - , Index(e.Index) - , Mesh(e.Mesh) + : MeshCore::MeshGeomEdge(e) + , Index(e.Index) + , Mesh(e.Mesh) { - for (int i=0; i<2; i++) { + for (int i = 0; i < 2; i++) { PIndex[i] = e.PIndex[i]; NIndex[i] = e.NIndex[i]; } @@ -53,12 +53,12 @@ Edge::Edge(const Edge& e) Edge::~Edge() = default; -void Edge::operator = (const Edge& e) +void Edge::operator=(const Edge& e) { - MeshCore::MeshGeomEdge::operator = (e); - Mesh = e.Mesh; + MeshCore::MeshGeomEdge::operator=(e); + Mesh = e.Mesh; Index = e.Index; - for (int i=0; i<2; i++) { + for (int i = 0; i < 2; i++) { PIndex[i] = e.PIndex[i]; NIndex[i] = e.NIndex[i]; } diff --git a/src/Mod/Mesh/App/Edge.h b/src/Mod/Mesh/App/Edge.h index 4da2c74cbc..27e7167160 100644 --- a/src/Mod/Mesh/App/Edge.h +++ b/src/Mod/Mesh/App/Edge.h @@ -38,24 +38,27 @@ class MeshObject; * convenient access to the Mesh data structure. This class should not be used * for programming algorithms in C++. Use Mesh Core classes instead! */ -class MeshExport Edge : public MeshCore::MeshGeomEdge +class MeshExport Edge: public MeshCore::MeshGeomEdge { public: Edge(); Edge(const Edge& f); ~Edge(); - bool isBound() const {return Index != -1;} + bool isBound() const + { + return Index != -1; + } void unbound(); - void operator = (const Edge& f); + void operator=(const Edge& f); - int Index{-1}; + int Index {-1}; MeshCore::PointIndex PIndex[2]; MeshCore::FacetIndex NIndex[2]; Base::Reference Mesh; }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_EDGE_H +#endif // MESH_EDGE_H diff --git a/src/Mod/Mesh/App/EdgePyImp.cpp b/src/Mod/Mesh/App/EdgePyImp.cpp index ad2b02e70b..bfed97e7b6 100644 --- a/src/Mod/Mesh/App/EdgePyImp.cpp +++ b/src/Mod/Mesh/App/EdgePyImp.cpp @@ -26,9 +26,11 @@ #include #include +// clang-format off #include "Edge.h" #include "EdgePy.h" #include "EdgePy.cpp" +// clang-format on using namespace Mesh; @@ -36,18 +38,28 @@ using namespace Mesh; // returns a string which represent the object e.g. when printed in python std::string EdgePy::representation() const { + // clang-format off EdgePy::PointerType ptr = getEdgePtr(); std::stringstream str; str << "Edge ("; - str << "(" << ptr->_aclPoints[0].x << ", " << ptr->_aclPoints[0].y << ", " << ptr->_aclPoints[0].z << ", Idx=" << ptr->PIndex[0] << "), "; - str << "(" << ptr->_aclPoints[1].x << ", " << ptr->_aclPoints[1].y << ", " << ptr->_aclPoints[1].z << ", Idx=" << ptr->PIndex[1] << "), "; - str << "Idx=" << ptr->Index << ", (" << ptr->NIndex[0] << ", " << ptr->NIndex[1] << ")"; + str << "(" << ptr->_aclPoints[0].x << ", " + << ptr->_aclPoints[0].y << ", " + << ptr->_aclPoints[0].z << ", Idx=" + << ptr->PIndex[0] << "), "; + str << "(" << ptr->_aclPoints[1].x << ", " + << ptr->_aclPoints[1].y << ", " + << ptr->_aclPoints[1].z << ", Idx=" + << ptr->PIndex[1] << "), "; + str << "Idx=" << ptr->Index << ", (" + << ptr->NIndex[0] << ", " + << ptr->NIndex[1] << ")"; str << ")"; + // clang-format on return str.str(); } -PyObject *EdgePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* EdgePy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of EdgePy and the Twin object return new EdgePy(new Edge); @@ -58,28 +70,38 @@ int EdgePy::PyInit(PyObject* args, PyObject* /*kwds*/) { PyObject* pt1 = nullptr; PyObject* pt2 = nullptr; - if (!PyArg_ParseTuple(args, "|O!O!", &Base::VectorPy::Type, &pt1 - , &Base::VectorPy::Type, &pt2)) + if (!PyArg_ParseTuple(args, + "|O!O!", + &Base::VectorPy::Type, + &pt1, + &Base::VectorPy::Type, + &pt2)) { return -1; + } - if (pt1) - getEdgePtr()->_aclPoints[0] = Base::convertTo(Py::Vector(pt1, false).toVector()); - if (pt2) - getEdgePtr()->_aclPoints[1] = Base::convertTo(Py::Vector(pt2, false).toVector()); + if (pt1) { + getEdgePtr()->_aclPoints[0] = + Base::convertTo(Py::Vector(pt1, false).toVector()); + } + if (pt2) { + getEdgePtr()->_aclPoints[1] = + Base::convertTo(Py::Vector(pt2, false).toVector()); + } return 0; } Py::Long EdgePy::getIndex() const { - return Py::Long((long) getEdgePtr()->Index); + return Py::Long((long)getEdgePtr()->Index); } -PyObject* EdgePy::intersectWithEdge(PyObject *args) +PyObject* EdgePy::intersectWithEdge(PyObject* args) { PyObject* object; - if (!PyArg_ParseTuple(args, "O!", &EdgePy::Type, &object)) + if (!PyArg_ParseTuple(args, "O!", &EdgePy::Type, &object)) { return nullptr; - EdgePy *edge = static_cast(object); + } + EdgePy* edge = static_cast(object); EdgePy::PointerType edge_ptr = edge->getEdgePtr(); EdgePy::PointerType this_ptr = this->getEdgePtr(); Base::Vector3f p; @@ -101,34 +123,37 @@ PyObject* EdgePy::intersectWithEdge(PyObject *args) } } -PyObject* EdgePy::isParallel(PyObject *args) +PyObject* EdgePy::isParallel(PyObject* args) { PyObject* object; - if (!PyArg_ParseTuple(args, "O!", &EdgePy::Type, &object)) + if (!PyArg_ParseTuple(args, "O!", &EdgePy::Type, &object)) { return nullptr; - EdgePy *edge = static_cast(object); + } + EdgePy* edge = static_cast(object); EdgePy::PointerType edge_ptr = edge->getEdgePtr(); EdgePy::PointerType this_ptr = this->getEdgePtr(); bool ok = this_ptr->IsParallel(*edge_ptr); return Py::new_reference_to(Py::Boolean(ok)); } -PyObject* EdgePy::isCollinear(PyObject *args) +PyObject* EdgePy::isCollinear(PyObject* args) { PyObject* object; - if (!PyArg_ParseTuple(args, "O!", &EdgePy::Type, &object)) + if (!PyArg_ParseTuple(args, "O!", &EdgePy::Type, &object)) { return nullptr; - EdgePy *edge = static_cast(object); + } + EdgePy* edge = static_cast(object); EdgePy::PointerType edge_ptr = edge->getEdgePtr(); EdgePy::PointerType this_ptr = this->getEdgePtr(); bool ok = this_ptr->IsCollinear(*edge_ptr); return Py::new_reference_to(Py::Boolean(ok)); } -PyObject* EdgePy::unbound(PyObject *args) +PyObject* EdgePy::unbound(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getEdgePtr()->unbound(); Py_Return; } @@ -143,7 +168,7 @@ Py::List EdgePy::getPoints() const EdgePy::PointerType edge = this->getEdgePtr(); Py::List pts; - for (const auto & pnt : edge->_aclPoints) { + for (const auto& pnt : edge->_aclPoints) { Py::Tuple pt(3); pt.setItem(0, Py::Float(pnt.x)); pt.setItem(1, Py::Float(pnt.y)); @@ -159,7 +184,7 @@ Py::Tuple EdgePy::getPointIndices() const EdgePy::PointerType edge = this->getEdgePtr(); Py::Tuple idxTuple(2); - for (int i=0; i<2; i++) { + for (int i = 0; i < 2; i++) { idxTuple.setItem(i, Py::Long(edge->PIndex[i])); } return idxTuple; @@ -170,7 +195,7 @@ Py::Tuple EdgePy::getNeighbourIndices() const EdgePy::PointerType edge = this->getEdgePtr(); Py::Tuple idxTuple(2); - for (int i=0; i<2; i++) { + for (int i = 0; i < 2; i++) { idxTuple.setItem(i, Py::Long(edge->NIndex[i])); } return idxTuple; @@ -182,12 +207,12 @@ Py::Float EdgePy::getLength() const return Py::Float(Base::Distance(edge->_aclPoints[0], edge->_aclPoints[1])); } -PyObject *EdgePy::getCustomAttributes(const char* /*attr*/) const +PyObject* EdgePy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } -int EdgePy::setCustomAttributes(const char* /*attr*/, PyObject * /*obj*/) +int EdgePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { return 0; } diff --git a/src/Mod/Mesh/App/Exporter.cpp b/src/Mod/Mesh/App/Exporter.cpp index 8ac2eb0655..00f9a8f57a 100644 --- a/src/Mod/Mesh/App/Exporter.cpp +++ b/src/Mod/Mesh/App/Exporter.cpp @@ -22,12 +22,14 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif +#include "Core/IO/Writer3MF.h" +#include "Core/Iterator.h" #include #include #include @@ -38,8 +40,6 @@ #include #include #include -#include "Core/Iterator.h" -#include "Core/IO/Writer3MF.h" #include #include "Exporter.h" @@ -48,13 +48,14 @@ using namespace Mesh; using namespace MeshCore; -static std::vector -expandSubObjectNames(const App::DocumentObject *obj, - std::map > &subObjectNameCache, - int depth) +static std::vector expandSubObjectNames( + const App::DocumentObject* obj, + std::map>& subObjectNameCache, + int depth) { - if (!App::GetApplication().checkLinkDepth(depth)) + if (!App::GetApplication().checkLinkDepth(depth)) { return {}; + } auto subs = obj->getSubObjects(); if (subs.empty()) { @@ -63,28 +64,33 @@ expandSubObjectNames(const App::DocumentObject *obj, } std::vector res; - for (auto & sub : subs) { + for (auto& sub : subs) { int vis = sub.empty() ? 1 : obj->isElementVisible(sub.c_str()); - if (vis == 0) + if (vis == 0) { continue; + } auto sobj = obj->getSubObject(sub.c_str()); - if (!sobj || (vis < 0 && !sobj->Visibility.getValue())) + if (!sobj || (vis < 0 && !sobj->Visibility.getValue())) { continue; + } auto linked = sobj->getLinkedObject(true); auto it = subObjectNameCache.find(linked); - if (it == subObjectNameCache.end()) - it = subObjectNameCache.emplace( - linked, expandSubObjectNames(linked, subObjectNameCache, depth+1)).first; - for (auto & ssub : it->second) + if (it == subObjectNameCache.end()) { + it = subObjectNameCache + .emplace(linked, expandSubObjectNames(linked, subObjectNameCache, depth + 1)) + .first; + } + for (auto& ssub : it->second) { res.push_back(sub + ssub); + } } return res; } Exporter::Exporter() = default; -//static -std::string Exporter::xmlEscape(const std::string &input) +// static +std::string Exporter::xmlEscape(const std::string& input) { std::string out(input); boost::replace_all(out, "&", "&"); @@ -95,30 +101,32 @@ std::string Exporter::xmlEscape(const std::string &input) return out; } -int Exporter::addObject(App::DocumentObject *obj, float tol) +int Exporter::addObject(App::DocumentObject* obj, float tol) { int count = 0; - for (std::string & sub : expandSubObjectNames(obj, subObjectNameCache, 0)) { + for (std::string& sub : expandSubObjectNames(obj, subObjectNameCache, 0)) { Base::Matrix4D matrix; auto sobj = obj->getSubObject(sub.c_str(), nullptr, &matrix); auto linked = sobj->getLinkedObject(true, &matrix, false); auto it = meshCache.find(linked); if (it == meshCache.end()) { if (linked->isDerivedFrom(Mesh::Feature::getClassTypeId())) { - it = meshCache.emplace(linked, - static_cast(linked)->Mesh.getValue()).first; + it = meshCache.emplace(linked, static_cast(linked)->Mesh.getValue()) + .first; it->second.setTransform(matrix); } else { Base::PyGILStateLocker lock; - PyObject *pyobj = nullptr; + PyObject* pyobj = nullptr; linked->getSubObject("", &pyobj, nullptr, false); - if (!pyobj) + if (!pyobj) { continue; + } if (PyObject_TypeCheck(pyobj, &Data::ComplexGeoDataPy::Type)) { std::vector aPoints; std::vector aTopo; - auto geoData = static_cast(pyobj)->getComplexGeoDataPtr(); + auto geoData = + static_cast(pyobj)->getComplexGeoDataPtr(); geoData->getFaces(aPoints, aTopo, tol); it = meshCache.emplace(linked, MeshObject()).first; it->second.setFacets(aTopo, aPoints); @@ -130,8 +138,9 @@ int Exporter::addObject(App::DocumentObject *obj, float tol) // Add a new mesh if (it != meshCache.end()) { - if (addMesh(sobj->Label.getValue(), it->second)) + if (addMesh(sobj->Label.getValue(), it->second)) { ++count; + } } } return count; @@ -150,9 +159,8 @@ void Exporter::throwIfNoPermission(const std::string& filename) // ---------------------------------------------------------------------------- MergeExporter::MergeExporter(std::string fileName, MeshIO::Format) - :fName(fileName) -{ -} + : fName(fileName) +{} MergeExporter::~MergeExporter() { @@ -176,40 +184,42 @@ void MergeExporter::write() } } -bool MergeExporter::addMesh(const char *name, const MeshObject & mesh) +bool MergeExporter::addMesh(const char* name, const MeshObject& mesh) { auto kernel = mesh.getKernel(); kernel.Transform(mesh.getTransform()); - auto countFacets( mergingMesh.countFacets() ); + auto countFacets(mergingMesh.countFacets()); if (countFacets == 0) { mergingMesh.setKernel(kernel); - } else { + } + else { mergingMesh.addMesh(kernel); } // if the mesh already has persistent segments then use them instead unsigned long numSegm = mesh.countSegments(); unsigned long canSave = 0; - for (unsigned long i=0; i 0) { - for (unsigned long i=0; i indices = segm.getIndices(); - std::for_each( indices.begin(), indices.end(), - [countFacets] (FacetIndex &v) { - v += countFacets; - } ); + std::for_each(indices.begin(), indices.end(), [countFacets](FacetIndex& v) { + v += countFacets; + }); Segment new_segm(&mergingMesh, indices, true); new_segm.setName(segm.getName()); mergingMesh.addSegment(new_segm); } } - } else { + } + else { // now create a segment for the added mesh std::vector indices; indices.resize(mergingMesh.countFacets() - countFacets); @@ -233,10 +243,12 @@ void GuiExtension3MFProducer::initialize() { Base::PyGILStateLocker lock; PyObject* module = PyImport_ImportModule("MeshGui"); - if (module) + if (module) { Py_DECREF(module); - else + } + else { PyErr_Clear(); + } } void Extension3MFFactory::addProducer(Extension3MFProducer* ext) @@ -257,21 +269,22 @@ std::vector Extension3MFFactory::createExtensions() std::vector ext; for (const auto& it : producer) { Extension3MFPtr ptr = std::dynamic_pointer_cast(it->create()); - if (ptr) + if (ptr) { ext.push_back(ptr); + } } return ext; } std::vector Extension3MFFactory::producer; -class Exporter3MF::Private { +class Exporter3MF::Private +{ public: - explicit Private(const std::string& filename, - const std::vector& ext) - : writer3mf(filename) - , ext(ext) { - } + explicit Private(const std::string& filename, const std::vector& ext) + : writer3mf(filename) + , ext(ext) + {} MeshCore::Writer3MF writer3mf; std::vector ext; }; @@ -287,7 +300,7 @@ Exporter3MF::~Exporter3MF() write(); } -bool Exporter3MF::addMesh(const char *name, const MeshObject & mesh) +bool Exporter3MF::addMesh(const char* name, const MeshObject& mesh) { boost::ignore_unused(name); bool ok = d->writer3mf.AddMesh(mesh.getKernel(), mesh.getTransform()); @@ -312,35 +325,35 @@ void Exporter3MF::write() // ---------------------------------------------------------------------------- -ExporterAMF::ExporterAMF( std::string fileName, - const std::map &meta, - bool compress ) +ExporterAMF::ExporterAMF(std::string fileName, + const std::map& meta, + bool compress) { // ask for write permission throwIfNoPermission(fileName); Base::FileInfo fi(fileName); if (compress) { - auto *zipStreamPtr( new zipios::ZipOutputStream(fi.filePath()) ); + auto* zipStreamPtr(new zipios::ZipOutputStream(fi.filePath())); // ISO 52915 specifies that compressed AMF files are zip-compressed and // must contain the AMF XML in an entry with the same name as the // compressed file. It's OK to have other files in the zip too. - zipStreamPtr->putNextEntry( zipios::ZipCDirEntry(fi.fileName()) ); + zipStreamPtr->putNextEntry(zipios::ZipCDirEntry(fi.fileName())); // Default compression seems to work fine. outputStreamPtr = zipStreamPtr; - - } else { + } + else { outputStreamPtr = new Base::ofstream(fi, std::ios::out | std::ios::binary); } if (outputStreamPtr) { *outputStreamPtr << "\n" << "\n"; - for (auto const &metaEntry : meta) { - *outputStreamPtr << "\t" << metaEntry.second << "\n"; + for (auto const& metaEntry : meta) { + *outputStreamPtr << "\t" + << metaEntry.second << "\n"; } } } @@ -370,25 +383,28 @@ void ExporterAMF::write() class ExporterAMF::VertLess { public: - bool operator()(const Base::Vector3f &a, const Base::Vector3f &b) const + bool operator()(const Base::Vector3f& a, const Base::Vector3f& b) const { if (a.x == b.x) { if (a.y == b.y) { if (a.z == b.z) { return false; - } else { + } + else { return a.z < b.z; } - } else { + } + else { return a.y < b.y; } - } else { + } + else { return a.x < b.x; } } }; -bool ExporterAMF::addMesh(const char *name, const MeshObject & mesh) +bool ExporterAMF::addMesh(const char* name, const MeshObject& mesh) { auto kernel = mesh.getKernel(); kernel.Transform(mesh.getTransform()); @@ -397,7 +413,7 @@ bool ExporterAMF::addMesh(const char *name, const MeshObject & mesh) return false; } - auto numFacets( kernel.CountFacets() ); + auto numFacets(kernel.CountFacets()); if (numFacets == 0) { return false; @@ -408,12 +424,11 @@ bool ExporterAMF::addMesh(const char *name, const MeshObject & mesh) Base::SequencerLauncher seq("Saving...", 2 * numFacets + 1); *outputStreamPtr << "\t\n"; - *outputStreamPtr << "\t\t" - << xmlEscape(name) << "\n"; + *outputStreamPtr << "\t\t" << xmlEscape(name) << "\n"; *outputStreamPtr << "\t\t\n" << "\t\t\t\n"; - const MeshCore::MeshGeomFacet *facet; + const MeshCore::MeshGeomFacet* facet; // Iterate through all facets of the mesh, and construct a: // * Cache (map) of used vertices, outputting each new unique vertex to @@ -427,14 +442,14 @@ bool ExporterAMF::addMesh(const char *name, const MeshObject & mesh) std::vector facets; // For each facet in mesh - for(clIter.Begin(), clEnd.End(); clIter < clEnd; ++clIter) { + for (clIter.Begin(), clEnd.End(); clIter < clEnd; ++clIter) { facet = &(*clIter); // For each vertex in facet for (auto pnt : facet->_aclPoints) { vertItr = vertices.find(pnt); - if ( vertItr == vertices.end() ) { + if (vertItr == vertices.end()) { facets.push_back(vertexCount); vertices[pnt] = vertexCount++; @@ -442,20 +457,20 @@ bool ExporterAMF::addMesh(const char *name, const MeshObject & mesh) // Output facet *outputStreamPtr << "\t\t\t\t\n" << "\t\t\t\t\t\n"; - for ( auto j(0); j < 3; ++j) { + for (auto j(0); j < 3; ++j) { char axis('x' + j); - *outputStreamPtr << "\t\t\t\t\t\t<" << axis << '>' - << pnt[j] - << "\n"; + *outputStreamPtr << "\t\t\t\t\t\t<" << axis << '>' << pnt[j] << "\n"; } *outputStreamPtr << "\t\t\t\t\t\n" << "\t\t\t\t\n"; - } else { + } + else { facets.push_back(vertItr->second); } } - seq.next(true); // allow to cancel + seq.next(true); // allow to cancel } *outputStreamPtr << "\t\t\t\n" @@ -463,14 +478,13 @@ bool ExporterAMF::addMesh(const char *name, const MeshObject & mesh) // Now that we've output all the vertices, we can // output the facets that refer to them! - for (auto triItr(facets.begin()); triItr != facets.end(); ) { + for (auto triItr(facets.begin()); triItr != facets.end();) { *outputStreamPtr << "\t\t\t\t\n"; for (auto i(1); i < 4; ++i) { - *outputStreamPtr << "\t\t\t\t\t' - << *(triItr++) << "\n"; + *outputStreamPtr << "\t\t\t\t\t' << *(triItr++) << "\n"; } *outputStreamPtr << "\t\t\t\t\n"; - seq.next(true); // allow to cancel + seq.next(true); // allow to cancel } *outputStreamPtr << "\t\t\t\n" diff --git a/src/Mod/Mesh/App/Exporter.h b/src/Mod/Mesh/App/Exporter.h index fd42f9042e..ad49921d2c 100644 --- a/src/Mod/Mesh/App/Exporter.h +++ b/src/Mod/Mesh/App/Exporter.h @@ -27,9 +27,9 @@ #include #include -#include "MeshFeature.h" -#include "Core/MeshIO.h" #include "Core/IO/Writer3MF.h" +#include "Core/MeshIO.h" +#include "MeshFeature.h" namespace Mesh @@ -57,27 +57,27 @@ public: * @return The number of objects/subobjects that was exported from the document. See the parameter `accuracy` of ComplexGeoData::getFaces */ - int addObject(App::DocumentObject *obj, float tol); + int addObject(App::DocumentObject* obj, float tol); - virtual bool addMesh(const char *name, const MeshObject & mesh) = 0; + virtual bool addMesh(const char* name, const MeshObject& mesh) = 0; protected: /// Does some simple escaping of characters for XML-type exports - static std::string xmlEscape(const std::string &input); + static std::string xmlEscape(const std::string& input); void throwIfNoPermission(const std::string&); - std::map > subObjectNameCache; - std::map meshCache; + std::map> subObjectNameCache; + std::map meshCache; }; /// Creates a single mesh, in a file, from one or more objects -class MergeExporter : public Exporter +class MergeExporter: public Exporter { public: MergeExporter(std::string fileName, MeshCore::MeshIO::Format fmt); ~MergeExporter() override; - bool addMesh(const char *name, const MeshObject & mesh) override; + bool addMesh(const char* name, const MeshObject& mesh) override; private: /// Write the meshes of the added objects to the output file @@ -109,12 +109,12 @@ using AbstractFormatExtensionPtr = std::shared_ptr; * \brief The Extension3MF class * Abstract base class for 3MF extensions */ -class MeshExport Extension3MF : public AbstractFormatExtension +class MeshExport Extension3MF: public AbstractFormatExtension { public: using Resource = MeshCore::Resource3MF; Extension3MF() = default; - virtual Resource addMesh(const MeshObject & mesh) = 0; + virtual Resource addMesh(const MeshObject& mesh) = 0; }; using Extension3MFPtr = std::shared_ptr; @@ -137,7 +137,7 @@ using AbstractExtensionProducerPtr = std::shared_ptr; * \brief The Extension3MFProducer class * Abstract base class to create an instance of an Extension3MF. */ -class MeshExport Extension3MFProducer : public AbstractExtensionProducer +class MeshExport Extension3MFProducer: public AbstractExtensionProducer { public: Extension3MFProducer() = default; @@ -150,7 +150,7 @@ using Extension3MFProducerPtr = std::shared_ptr; * \brief The GuiExtension3MFProducer class * This class tries to load the MeshGui module to register further 3MF extensions. */ -class MeshExport GuiExtension3MFProducer : public Extension3MFProducer +class MeshExport GuiExtension3MFProducer: public Extension3MFProducer { public: GuiExtension3MFProducer() = default; @@ -180,13 +180,13 @@ private: * The constructor and destructor write the beginning and end of the 3MF, * addObject() is used to add geometry */ -class Exporter3MF : public Exporter +class Exporter3MF: public Exporter { public: Exporter3MF(std::string fileName, const std::vector& = {}); ~Exporter3MF() override; - bool addMesh(const char *name, const MeshObject & mesh) override; + bool addMesh(const char* name, const MeshObject& mesh) override; /*! * \brief SetForceModel * Forcces to write the mesh as model even if itsn't a solid. @@ -208,7 +208,7 @@ private: * The constructor and destructor write the beginning and end of the AMF, * addObject() is used to add geometry */ -class ExporterAMF : public Exporter +class ExporterAMF: public Exporter { public: /// Writes AMF header @@ -216,26 +216,26 @@ public: * meta information passed in is applied at the tag level */ ExporterAMF(std::string fileName, - const std::map &meta, + const std::map& meta, bool compress = true); /// Writes AMF footer ~ExporterAMF() override; - bool addMesh(const char *name, const MeshObject & mesh) override; + bool addMesh(const char* name, const MeshObject& mesh) override; private: /// Write the meshes of the added objects to the output file void write(); private: - std::ostream *outputStreamPtr{nullptr}; - int nextObjectIndex{0}; + std::ostream* outputStreamPtr {nullptr}; + int nextObjectIndex {0}; /// Helper for putting Base::Vector3f objects into a std::map in addMesh() class VertLess; }; // class ExporterAMF -} // namespace Mesh +} // namespace Mesh -#endif // MESH_EXPORTER_H +#endif // MESH_EXPORTER_H diff --git a/src/Mod/Mesh/App/Facet.cpp b/src/Mod/Mesh/App/Facet.cpp index 3889f50886..c4535f1edc 100644 --- a/src/Mod/Mesh/App/Facet.cpp +++ b/src/Mod/Mesh/App/Facet.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include "Facet.h" @@ -32,14 +32,15 @@ using namespace Mesh; Facet::Facet(const MeshCore::MeshFacet& face, const MeshObject* obj, MeshCore::FacetIndex index) - : Index(index), Mesh(obj) + : Index(index) + , Mesh(obj) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { PIndex[i] = face._aulPoints[i]; NIndex[i] = face._aulNeighbours[i]; } if (Mesh.isValid() && index != MeshCore::FACET_INDEX_MAX) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { Base::Vector3d vert = Mesh->getPoint(PIndex[i]); _aclPoints[i].Set((float)vert.x, (float)vert.y, (float)vert.z); } @@ -47,9 +48,11 @@ Facet::Facet(const MeshCore::MeshFacet& face, const MeshObject* obj, MeshCore::F } Facet::Facet(const Facet& f) - : MeshCore::MeshGeomFacet(f), Index(f.Index), Mesh(f.Mesh) + : MeshCore::MeshGeomFacet(f) + , Index(f.Index) + , Mesh(f.Mesh) { - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { PIndex[i] = f.PIndex[i]; NIndex[i] = f.NIndex[i]; } @@ -57,12 +60,12 @@ Facet::Facet(const Facet& f) Facet::~Facet() = default; -void Facet::operator = (const Facet& f) +void Facet::operator=(const Facet& f) { - MeshCore::MeshGeomFacet::operator = (f); - Mesh = f.Mesh; + MeshCore::MeshGeomFacet::operator=(f); + Mesh = f.Mesh; Index = f.Index; - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { PIndex[i] = f.PIndex[i]; NIndex[i] = f.NIndex[i]; } diff --git a/src/Mod/Mesh/App/Facet.h b/src/Mod/Mesh/App/Facet.h index b149711c00..2ca4ca038a 100644 --- a/src/Mod/Mesh/App/Facet.h +++ b/src/Mod/Mesh/App/Facet.h @@ -36,15 +36,20 @@ class MeshObject; * convenient access to the Mesh data structure. This class should not be used * for programming algorithms in C++. Use Mesh Core classes instead! */ -class MeshExport Facet : public MeshCore::MeshGeomFacet +class MeshExport Facet: public MeshCore::MeshGeomFacet { public: - explicit Facet(const MeshCore::MeshFacet& face = MeshCore::MeshFacet(), const MeshObject* obj = nullptr, MeshCore::FacetIndex index = MeshCore::FACET_INDEX_MAX); + explicit Facet(const MeshCore::MeshFacet& face = MeshCore::MeshFacet(), + const MeshObject* obj = nullptr, + MeshCore::FacetIndex index = MeshCore::FACET_INDEX_MAX); Facet(const Facet& f); ~Facet(); - bool isBound() const {return Index != MeshCore::FACET_INDEX_MAX;} - void operator = (const Facet& f); + bool isBound() const + { + return Index != MeshCore::FACET_INDEX_MAX; + } + void operator=(const Facet& f); Edge getEdge(int) const; MeshCore::FacetIndex Index; @@ -53,7 +58,7 @@ public: Base::Reference Mesh; }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_FACET_H +#endif // MESH_FACET_H diff --git a/src/Mod/Mesh/App/FacetPyImp.cpp b/src/Mod/Mesh/App/FacetPyImp.cpp index f710801eb8..eb8ca46032 100644 --- a/src/Mod/Mesh/App/FacetPyImp.cpp +++ b/src/Mod/Mesh/App/FacetPyImp.cpp @@ -25,22 +25,26 @@ #include #include +// clang-format off #include "Facet.h" #include "FacetPy.h" #include "FacetPy.cpp" #include "EdgePy.h" #include "Mesh.h" +// clang-format on using namespace Mesh; -namespace { -class Index { +namespace +{ +class Index +{ FacetIndex index; public: Index(FacetIndex index) - : index{index} + : index {index} {} friend std::ostream& operator<<(std::ostream& os, Index idx) @@ -54,11 +58,12 @@ public: return os; } }; -} +} // namespace // returns a string which represent the object e.g. when printed in python std::string FacetPy::representation() const { + // clang-format off FacetPy::PointerType ptr = getFacetPtr(); std::stringstream str; str << "Facet ("; @@ -94,9 +99,10 @@ std::string FacetPy::representation() const str << ")"; return str.str(); + // clang-format on } -PyObject *FacetPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* FacetPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of FacetPy and the Twin object return new FacetPy(new Facet); @@ -105,25 +111,28 @@ PyObject *FacetPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Pyth // constructor method int FacetPy::PyInit(PyObject* args, PyObject* /*kwds*/) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return -1; + } return 0; } -PyObject* FacetPy::unbound(PyObject *args) +PyObject* FacetPy::unbound(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getFacetPtr()->Index = MeshCore::FACET_INDEX_MAX; getFacetPtr()->Mesh = nullptr; Py_Return; } -PyObject* FacetPy::getEdge(PyObject *args) +PyObject* FacetPy::getEdge(PyObject* args) { - int index{}; - if (!PyArg_ParseTuple(args, "i", &index)) + int index {}; + if (!PyArg_ParseTuple(args, "i", &index)) { return nullptr; + } Edge edge = getFacetPtr()->getEdge(index); return new EdgePy(new Edge(edge)); @@ -131,7 +140,7 @@ PyObject* FacetPy::getEdge(PyObject *args) Py::Long FacetPy::getIndex() const { - return Py::Long((long) getFacetPtr()->Index); + return Py::Long((long)getFacetPtr()->Index); } Py::Boolean FacetPy::getBound() const @@ -143,15 +152,16 @@ Py::Object FacetPy::getNormal() const { Base::VectorPy* normal = new Base::VectorPy(getFacetPtr()->GetNormal()); normal->setConst(); - return Py::Object(normal,true); + return Py::Object(normal, true); } -PyObject* FacetPy::intersect(PyObject *args) +PyObject* FacetPy::intersect(PyObject* args) { - PyObject* object{}; - if (!PyArg_ParseTuple(args, "O!", &FacetPy::Type, &object)) + PyObject* object {}; + if (!PyArg_ParseTuple(args, "O!", &FacetPy::Type, &object)) { return nullptr; - FacetPy *face = static_cast(object); + } + FacetPy* face = static_cast(object); FacetPy::PointerType face_ptr = face->getFacetPtr(); FacetPy::PointerType this_ptr = this->getFacetPtr(); Base::Vector3f p0, p1; @@ -182,11 +192,12 @@ PyObject* FacetPy::intersect(PyObject *args) } } -PyObject* FacetPy::isDegenerated(PyObject *args) +PyObject* FacetPy::isDegenerated(PyObject* args) { float fEpsilon = MeshCore::MeshDefinitions::_fMinPointDistanceP2; - if (!PyArg_ParseTuple(args, "|f", &fEpsilon)) + if (!PyArg_ParseTuple(args, "|f", &fEpsilon)) { return nullptr; + } FacetPy::PointerType face = this->getFacetPtr(); if (!face->isBound()) { @@ -198,12 +209,13 @@ PyObject* FacetPy::isDegenerated(PyObject *args) return Py::new_reference_to(Py::Boolean(tria.IsDegenerated(fEpsilon))); } -PyObject* FacetPy::isDeformed(PyObject *args) +PyObject* FacetPy::isDeformed(PyObject* args) { - float fMinAngle{}; - float fMaxAngle{}; - if (!PyArg_ParseTuple(args, "ff", &fMinAngle, &fMaxAngle)) + float fMinAngle {}; + float fMaxAngle {}; + if (!PyArg_ParseTuple(args, "ff", &fMinAngle, &fMaxAngle)) { return nullptr; + } FacetPy::PointerType face = this->getFacetPtr(); if (!face->isBound()) { @@ -236,11 +248,12 @@ Py::List FacetPy::getPoints() const Py::Tuple FacetPy::getPointIndices() const { FacetPy::PointerType face = this->getFacetPtr(); - if (!face->isBound()) - { return Py::Tuple(); } + if (!face->isBound()) { + return Py::Tuple(); + } Py::Tuple idxTuple(3); - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { idxTuple.setItem(i, Py::Long(face->PIndex[i])); } return idxTuple; @@ -254,7 +267,7 @@ Py::Tuple FacetPy::getNeighbourIndices() const } Py::Tuple idxTuple(3); - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { auto index = face->NIndex[i]; if (index < MeshCore::FACET_INDEX_MAX) { idxTuple.setItem(i, Py::Long(index)); @@ -348,14 +361,12 @@ Py::Tuple FacetPy::getInCircle() const return tuple; } -PyObject *FacetPy::getCustomAttributes(const char* /*attr*/) const +PyObject* FacetPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } -int FacetPy::setCustomAttributes(const char* /*attr*/, PyObject * /*obj*/) +int FacetPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) { return 0; } - - diff --git a/src/Mod/Mesh/App/FeatureMeshCurvature.cpp b/src/Mod/Mesh/App/FeatureMeshCurvature.cpp index 70394e65b0..85a4cac98c 100644 --- a/src/Mod/Mesh/App/FeatureMeshCurvature.cpp +++ b/src/Mod/Mesh/App/FeatureMeshCurvature.cpp @@ -35,23 +35,25 @@ PROPERTY_SOURCE(Mesh::Curvature, App::DocumentObject) Curvature::Curvature() { - ADD_PROPERTY(Source,(nullptr)); + ADD_PROPERTY(Source, (nullptr)); ADD_PROPERTY(CurvInfo, (CurvatureInfo())); } short Curvature::mustExecute() const { - if (Source.isTouched()) + if (Source.isTouched()) { return 1; - if (Source.getValue() && Source.getValue()->isTouched()) + } + if (Source.getValue() && Source.getValue()->isTouched()) { return 1; + } return 0; } -App::DocumentObjectExecReturn *Curvature::execute() +App::DocumentObjectExecReturn* Curvature::execute() { - Mesh::Feature *pcFeat = dynamic_cast(Source.getValue()); - if(!pcFeat || pcFeat->isError()) { + Mesh::Feature* pcFeat = dynamic_cast(Source.getValue()); + if (!pcFeat || pcFeat->isError()) { return new App::DocumentObjectExecReturn("No mesh object attached."); } @@ -63,7 +65,7 @@ App::DocumentObjectExecReturn *Curvature::execute() std::vector values; values.reserve(curv.size()); - for (const auto & it : curv) { + for (const auto& it : curv) { CurvatureInfo ci; ci.cMaxCurvDir = it.cMaxCurvDir; ci.cMinCurvDir = it.cMinCurvDir; diff --git a/src/Mod/Mesh/App/FeatureMeshCurvature.h b/src/Mod/Mesh/App/FeatureMeshCurvature.h index b923950079..35a5fd2551 100644 --- a/src/Mod/Mesh/App/FeatureMeshCurvature.h +++ b/src/Mod/Mesh/App/FeatureMeshCurvature.h @@ -36,7 +36,7 @@ namespace Mesh * The Curvature class calculates the curvature values of a related mesh feature. * @author Werner Mayer */ -class MeshExport Curvature : public App::DocumentObject +class MeshExport Curvature: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Curvature); @@ -49,15 +49,16 @@ public: /** @name methods override Feature */ //@{ /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "MeshGui::ViewProviderMeshCurvature"; } - //@} + //@} }; -} +} // namespace Mesh -#endif // Curvature_H +#endif // Curvature_H diff --git a/src/Mod/Mesh/App/FeatureMeshDefects.cpp b/src/Mod/Mesh/App/FeatureMeshDefects.cpp index aa61026193..68a95abad0 100644 --- a/src/Mod/Mesh/App/FeatureMeshDefects.cpp +++ b/src/Mod/Mesh/App/FeatureMeshDefects.cpp @@ -22,9 +22,9 @@ #include "PreCompiled.h" -#include #include "Core/Degeneration.h" #include "Core/Triangulation.h" +#include #include "FeatureMeshDefects.h" @@ -40,20 +40,21 @@ PROPERTY_SOURCE(Mesh::FixDefects, Mesh::Feature) FixDefects::FixDefects() { - ADD_PROPERTY(Source ,(nullptr)); - ADD_PROPERTY(Epsilon ,(0)); + ADD_PROPERTY(Source, (nullptr)); + ADD_PROPERTY(Epsilon, (0)); } short FixDefects::mustExecute() const { - if (Source.isTouched()) + if (Source.isTouched()) { return 1; + } return 0; } -App::DocumentObjectExecReturn *FixDefects::execute() +App::DocumentObjectExecReturn* FixDefects::execute() { - return App::DocumentObject::StdReturn; + return App::DocumentObject::StdReturn; } // ---------------------------------------------------------------------- @@ -62,11 +63,12 @@ PROPERTY_SOURCE(Mesh::HarmonizeNormals, Mesh::FixDefects) HarmonizeNormals::HarmonizeNormals() = default; -App::DocumentObjectExecReturn *HarmonizeNormals::execute() +App::DocumentObjectExecReturn* HarmonizeNormals::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); @@ -85,11 +87,12 @@ PROPERTY_SOURCE(Mesh::FlipNormals, Mesh::FixDefects) FlipNormals::FlipNormals() = default; -App::DocumentObjectExecReturn *FlipNormals::execute() +App::DocumentObjectExecReturn* FlipNormals::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); @@ -108,11 +111,12 @@ PROPERTY_SOURCE(Mesh::FixNonManifolds, Mesh::FixDefects) FixNonManifolds::FixNonManifolds() = default; -App::DocumentObjectExecReturn *FixNonManifolds::execute() +App::DocumentObjectExecReturn* FixNonManifolds::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); @@ -131,11 +135,12 @@ PROPERTY_SOURCE(Mesh::FixDuplicatedFaces, Mesh::FixDefects) FixDuplicatedFaces::FixDuplicatedFaces() = default; -App::DocumentObjectExecReturn *FixDuplicatedFaces::execute() +App::DocumentObjectExecReturn* FixDuplicatedFaces::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); @@ -154,11 +159,12 @@ PROPERTY_SOURCE(Mesh::FixDuplicatedPoints, Mesh::FixDefects) FixDuplicatedPoints::FixDuplicatedPoints() = default; -App::DocumentObjectExecReturn *FixDuplicatedPoints::execute() +App::DocumentObjectExecReturn* FixDuplicatedPoints::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); @@ -177,11 +183,12 @@ PROPERTY_SOURCE(Mesh::FixDegenerations, Mesh::FixDefects) FixDegenerations::FixDegenerations() = default; -App::DocumentObjectExecReturn *FixDegenerations::execute() +App::DocumentObjectExecReturn* FixDegenerations::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); @@ -200,22 +207,22 @@ PROPERTY_SOURCE(Mesh::FixDeformations, Mesh::FixDefects) FixDeformations::FixDeformations() { - ADD_PROPERTY(MaxAngle ,(5.0f)); + ADD_PROPERTY(MaxAngle, (5.0f)); } -App::DocumentObjectExecReturn *FixDeformations::execute() +App::DocumentObjectExecReturn* FixDeformations::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); std::unique_ptr mesh(new MeshObject); *mesh = kernel->getValue(); float maxAngle = Base::toRadians(MaxAngle.getValue()); - mesh->validateDeformations(maxAngle, - static_cast(Epsilon.getValue())); + mesh->validateDeformations(maxAngle, static_cast(Epsilon.getValue())); this->Mesh.setValuePtr(mesh.release()); } @@ -228,11 +235,12 @@ PROPERTY_SOURCE(Mesh::FixIndices, Mesh::FixDefects) FixIndices::FixIndices() = default; -App::DocumentObjectExecReturn *FixIndices::execute() +App::DocumentObjectExecReturn* FixIndices::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); @@ -251,22 +259,23 @@ PROPERTY_SOURCE(Mesh::FillHoles, Mesh::FixDefects) FillHoles::FillHoles() { - ADD_PROPERTY(FillupHolesOfLength,(0)); - ADD_PROPERTY(MaxArea,(0.1f)); + ADD_PROPERTY(FillupHolesOfLength, (0)); + ADD_PROPERTY(MaxArea, (0.1f)); } -App::DocumentObjectExecReturn *FillHoles::execute() +App::DocumentObjectExecReturn* FillHoles::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); std::unique_ptr mesh(new MeshObject); *mesh = kernel->getValue(); MeshCore::ConstraintDelaunayTriangulator cTria((float)MaxArea.getValue()); - //MeshCore::Triangulator cTria(mesh->getKernel()); + // MeshCore::Triangulator cTria(mesh->getKernel()); mesh->fillupHoles(FillupHolesOfLength.getValue(), 1, cTria); this->Mesh.setValuePtr(mesh.release()); } @@ -280,14 +289,15 @@ PROPERTY_SOURCE(Mesh::RemoveComponents, Mesh::FixDefects) RemoveComponents::RemoveComponents() { - ADD_PROPERTY(RemoveCompOfSize,(0)); + ADD_PROPERTY(RemoveCompOfSize, (0)); } -App::DocumentObjectExecReturn *RemoveComponents::execute() +App::DocumentObjectExecReturn* RemoveComponents::execute() { App::DocumentObject* link = Source.getValue(); - if (!link) + if (!link) { return new App::DocumentObjectExecReturn("No mesh linked"); + } App::Property* prop = link->getPropertyByName("Mesh"); if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { Mesh::PropertyMeshKernel* kernel = static_cast(prop); diff --git a/src/Mod/Mesh/App/FeatureMeshDefects.h b/src/Mod/Mesh/App/FeatureMeshDefects.h index 00efe63dd9..abbce7c23a 100644 --- a/src/Mod/Mesh/App/FeatureMeshDefects.h +++ b/src/Mod/Mesh/App/FeatureMeshDefects.h @@ -35,229 +35,230 @@ namespace Mesh * The FixDefects class fixes defects in the attached mesh kernel. * @author Werner Mayer */ -class MeshExport FixDefects : public Mesh::Feature +class MeshExport FixDefects: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDefects); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDefects); public: - /// Constructor - FixDefects(); + /// Constructor + FixDefects(); - /** @name Properties */ - //@{ - App::PropertyLink Source; - App::PropertyFloat Epsilon; - //@} + /** @name Properties */ + //@{ + App::PropertyLink Source; + App::PropertyFloat Epsilon; + //@} - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + //@} - /// returns the type name of the ViewProvider -// virtual const char* getViewProviderName(void) const {return "MeshGui::ViewProviderDefects";} + /// returns the type name of the ViewProvider + // virtual const char* getViewProviderName(void) const {return "MeshGui::ViewProviderDefects";} }; /** * The HarmonizeNormals class harmonizes the normals of the faces. * @author Werner Mayer */ -class MeshExport HarmonizeNormals : public Mesh::FixDefects +class MeshExport HarmonizeNormals: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::HarmonizeNormals); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::HarmonizeNormals); public: - /// Constructor - HarmonizeNormals(); + /// Constructor + HarmonizeNormals(); - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FlipNormals class flips the normals of all faces. * @author Werner Mayer */ -class MeshExport FlipNormals : public Mesh::FixDefects +class MeshExport FlipNormals: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FlipNormals); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FlipNormals); public: - /// Constructor - FlipNormals(); + /// Constructor + FlipNormals(); - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FixNonManifolds class tries to fix edges with more than two faces attached. * @author Werner Mayer */ -class MeshExport FixNonManifolds : public Mesh::FixDefects +class MeshExport FixNonManifolds: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixNonManifolds); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixNonManifolds); public: - /// Constructor - FixNonManifolds(); + /// Constructor + FixNonManifolds(); - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FixDuplicatedFaces class removes duplicated faces from the mesh. * @author Werner Mayer */ -class MeshExport FixDuplicatedFaces : public Mesh::FixDefects +class MeshExport FixDuplicatedFaces: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDuplicatedFaces); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDuplicatedFaces); public: - /// Constructor - FixDuplicatedFaces(); + /// Constructor + FixDuplicatedFaces(); - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FixDuplicatedPoints class removes duplicated points from the mesh. * @author Werner Mayer */ -class MeshExport FixDuplicatedPoints : public Mesh::FixDefects +class MeshExport FixDuplicatedPoints: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDuplicatedPoints); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDuplicatedPoints); public: - /// Constructor - FixDuplicatedPoints(); + /// Constructor + FixDuplicatedPoints(); - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FixDegenerations class removes degenerated faces from the mesh. * @author Werner Mayer */ -class MeshExport FixDegenerations : public Mesh::FixDefects +class MeshExport FixDegenerations: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDegenerations); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDegenerations); public: - /// Constructor - FixDegenerations(); + /// Constructor + FixDegenerations(); - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FixDeformations class tries to repair deformed faces by swapping edge operations. * @author Werner Mayer */ -class MeshExport FixDeformations : public Mesh::FixDefects +class MeshExport FixDeformations: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDeformations); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixDeformations); public: - /// Constructor - FixDeformations(); + /// Constructor + FixDeformations(); - /** @name Properties */ - //@{ - App::PropertyFloat MaxAngle; /**< Maximum allowed angle */ - //@} - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name Properties */ + //@{ + App::PropertyFloat MaxAngle; /**< Maximum allowed angle */ + //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FixIndices class tries to validate invalid indices of the internal mesh data structure. * @author Werner Mayer */ -class MeshExport FixIndices : public Mesh::FixDefects +class MeshExport FixIndices: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixIndices); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FixIndices); public: - /// Constructor - FixIndices(); + /// Constructor + FixIndices(); - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** * The FillHoles class tries to fill up holes in the internal mesh data structure. * @author Werner Mayer */ -class MeshExport FillHoles : public Mesh::FixDefects +class MeshExport FillHoles: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FillHoles); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::FillHoles); public: - /// Constructor - FillHoles(); - App::PropertyInteger FillupHolesOfLength; - App::PropertyFloat MaxArea; + /// Constructor + FillHoles(); + App::PropertyInteger FillupHolesOfLength; + App::PropertyFloat MaxArea; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; /** - * The RemoveComponents class removes topologic independent components up to a certain size from the mesh data structure. + * The RemoveComponents class removes topologic independent components up to a certain size from the + * mesh data structure. * @author Werner Mayer */ -class MeshExport RemoveComponents : public Mesh::FixDefects +class MeshExport RemoveComponents: public Mesh::FixDefects { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::RemoveComponents); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::RemoveComponents); public: - /// Constructor - RemoveComponents(); - App::PropertyInteger RemoveCompOfSize; + /// Constructor + RemoveComponents(); + App::PropertyInteger RemoveCompOfSize; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + //@} }; -} //namespace Mesh +} // namespace Mesh -#endif // MESH_FEATURE_MESH_DEFECTS_H +#endif // MESH_FEATURE_MESH_DEFECTS_H diff --git a/src/Mod/Mesh/App/FeatureMeshExport.cpp b/src/Mod/Mesh/App/FeatureMeshExport.cpp index 0ac9ae5007..81682c889c 100644 --- a/src/Mod/Mesh/App/FeatureMeshExport.cpp +++ b/src/Mod/Mesh/App/FeatureMeshExport.cpp @@ -41,20 +41,23 @@ Export::Export() short Export::mustExecute() const { if (Source.getValue()) { - if (Source.isTouched()) + if (Source.isTouched()) { return 1; - if (FileName.isTouched()) + } + if (FileName.isTouched()) { return 1; - if (Format.isTouched()) + } + if (Format.isTouched()) { return 1; + } } return 0; } -App::DocumentObjectExecReturn *Export::execute() +App::DocumentObjectExecReturn* Export::execute() { - Mesh::Feature *pcFeat = dynamic_cast(Source.getValue()); - if(!pcFeat || pcFeat->isError()) { + Mesh::Feature* pcFeat = dynamic_cast(Source.getValue()); + if (!pcFeat || pcFeat->isError()) { return new App::DocumentObjectExecReturn("Cannot export invalid mesh feature"); } diff --git a/src/Mod/Mesh/App/FeatureMeshExport.h b/src/Mod/Mesh/App/FeatureMeshExport.h index 28647652ea..90498cb5ca 100644 --- a/src/Mod/Mesh/App/FeatureMeshExport.h +++ b/src/Mod/Mesh/App/FeatureMeshExport.h @@ -27,7 +27,7 @@ #include #ifndef MESH_GLOBAL_H -# include +#include #endif namespace Mesh @@ -37,28 +37,29 @@ namespace Mesh * The Export class writes any supported mesh format into a file. * @author Werner Mayer */ -class MeshExport Export : public App::DocumentObject +class MeshExport Export: public App::DocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Export); public: Export(); - App::PropertyLink Source; + App::PropertyLink Source; App::PropertyString FileName; App::PropertyString Format; - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "MeshGui::ViewProviderExport"; } /** @name methods override feature */ //@{ /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; //@} }; -} +} // namespace Mesh -#endif // MESH_FEATUREMESHEXPORT_H +#endif // MESH_FEATUREMESHEXPORT_H diff --git a/src/Mod/Mesh/App/FeatureMeshImport.cpp b/src/Mod/Mesh/App/FeatureMeshImport.cpp index b16d173df8..c7b0612178 100644 --- a/src/Mod/Mesh/App/FeatureMeshImport.cpp +++ b/src/Mod/Mesh/App/FeatureMeshImport.cpp @@ -31,18 +31,20 @@ using namespace MeshCore; PROPERTY_SOURCE(Mesh::Import, Mesh::Feature) -Mesh::Import::Import() { +Mesh::Import::Import() +{ ADD_PROPERTY(FileName, ("")); } short Mesh::Import::mustExecute() const { - if (FileName.isTouched()) + if (FileName.isTouched()) { return 1; + } return 0; } -App::DocumentObjectExecReturn *Mesh::Import::execute() +App::DocumentObjectExecReturn* Mesh::Import::execute() { std::unique_ptr apcKernel(new MeshObject()); apcKernel->load(FileName.getValue()); @@ -50,4 +52,3 @@ App::DocumentObjectExecReturn *Mesh::Import::execute() return App::DocumentObject::StdReturn; } - diff --git a/src/Mod/Mesh/App/FeatureMeshImport.h b/src/Mod/Mesh/App/FeatureMeshImport.h index c73dc6aa54..90c45ce9f8 100644 --- a/src/Mod/Mesh/App/FeatureMeshImport.h +++ b/src/Mod/Mesh/App/FeatureMeshImport.h @@ -36,23 +36,23 @@ namespace Mesh * into the FreeCAD workspace. * @author Werner Mayer */ -class Import : public Mesh::Feature +class Import: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Import); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Import); public: - Import(); + Import(); - App::PropertyFile FileName; + App::PropertyFile FileName; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + //@} }; -} +} // namespace Mesh -#endif // FEATURE_MESH_IMPORT_H +#endif // FEATURE_MESH_IMPORT_H diff --git a/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.cpp b/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.cpp index 61fb3d625e..5df89ecef7 100644 --- a/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.cpp +++ b/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.cpp @@ -46,30 +46,36 @@ SegmentByMesh::SegmentByMesh() short SegmentByMesh::mustExecute() const { - if (Source.isTouched() || Tool.isTouched()) + if (Source.isTouched() || Tool.isTouched()) { return 1; - if (Source.getValue() && Source.getValue()->isTouched()) + } + if (Source.getValue() && Source.getValue()->isTouched()) { return 1; - if (Tool.getValue() && Tool.getValue()->isTouched()) + } + if (Tool.getValue() && Tool.getValue()->isTouched()) { return 1; + } return 0; } -App::DocumentObjectExecReturn *SegmentByMesh::execute() +App::DocumentObjectExecReturn* SegmentByMesh::execute() { - Mesh::PropertyMeshKernel *kernel=nullptr; + Mesh::PropertyMeshKernel* kernel = nullptr; App::DocumentObject* mesh = Source.getValue(); if (mesh) { App::Property* prop = mesh->getPropertyByName("Mesh"); - if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) + if (prop && prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { kernel = static_cast(prop); + } } - if (!kernel) + if (!kernel) { return new App::DocumentObjectExecReturn("No mesh specified.\n"); - else if (mesh->isError()) + } + else if (mesh->isError()) { return new App::DocumentObjectExecReturn("No valid mesh.\n"); + } - Mesh::PropertyMeshKernel *toolmesh=nullptr; + Mesh::PropertyMeshKernel* toolmesh = nullptr; App::DocumentObject* tool = Tool.getValue(); if (tool) { App::Property* prop = tool->getPropertyByName("Mesh"); @@ -86,12 +92,12 @@ App::DocumentObjectExecReturn *SegmentByMesh::execute() // the clipping plane Base::Vector3f cBase, cNormal; - cBase = Base::convertTo(Base.getValue()); + cBase = Base::convertTo(Base.getValue()); cNormal = Base::convertTo(Normal.getValue()); const MeshKernel& rMeshKernel = kernel->getValue().getKernel(); - const MeshKernel& rToolMesh = toolmesh->getValue().getKernel(); + const MeshKernel& rToolMesh = toolmesh->getValue().getKernel(); // check if the toolmesh is a solid if (!MeshEvalSolid(rToolMesh).Evaluate()) { @@ -102,15 +108,17 @@ App::DocumentObjectExecReturn *SegmentByMesh::execute() std::vector aFaces; MeshAlgorithm cAlg(rMeshKernel); - if (cNormal.Length() > 0.1f) // not a null vector + if (cNormal.Length() > 0.1f) { // not a null vector cAlg.GetFacetsFromToolMesh(rToolMesh, cNormal, faces); - else + } + else { cAlg.GetFacetsFromToolMesh(rToolMesh, Base::Vector3f(0.0, 1.0f, 0.0f), faces); + } // if the clipping plane was set then we want only the visible facets - if ( cNormal.Length() > 0.1f ) { // not a null vector - // now we have too many facets since we have (invisible) facets near to the back clipping plane, - // so we need the nearest facet to the front clipping plane + if (cNormal.Length() > 0.1f) { // not a null vector + // now we have too many facets since we have (invisible) facets near to the back clipping + // plane, so we need the nearest facet to the front clipping plane // float fDist = FLOAT_MAX; MeshCore::FacetIndex uIdx = MeshCore::FACET_INDEX_MAX; @@ -119,17 +127,17 @@ App::DocumentObjectExecReturn *SegmentByMesh::execute() // get the nearest facet to the user (front clipping plane) for (MeshCore::FacetIndex it : faces) { cFIt.Set(it); - float dist = (float)fabs(cFIt->GetGravityPoint().DistanceToPlane( cBase, cNormal )); - if ( dist < fDist ) { + float dist = (float)fabs(cFIt->GetGravityPoint().DistanceToPlane(cBase, cNormal)); + if (dist < fDist) { fDist = dist; uIdx = it; } } // succeeded - if ( uIdx != MeshCore::FACET_INDEX_MAX ) { + if (uIdx != MeshCore::FACET_INDEX_MAX) { // set VISIT-Flag to all outer facets - cAlg.SetFacetFlag( MeshFacet::VISIT ); + cAlg.SetFacetFlag(MeshFacet::VISIT); cAlg.ResetFacetsFlag(faces, MeshFacet::VISIT); faces.clear(); @@ -141,8 +149,9 @@ App::DocumentObjectExecReturn *SegmentByMesh::execute() } } - for (MeshCore::FacetIndex it : faces) - aFaces.push_back( rMeshKernel.GetFacet(it) ); + for (MeshCore::FacetIndex it : faces) { + aFaces.push_back(rMeshKernel.GetFacet(it)); + } std::unique_ptr pcKernel(new MeshObject); pcKernel->addFacets(aFaces); @@ -150,4 +159,3 @@ App::DocumentObjectExecReturn *SegmentByMesh::execute() return App::DocumentObject::StdReturn; } - diff --git a/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.h b/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.h index 17cdc9ae2b..7732fac57f 100644 --- a/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.h +++ b/src/Mod/Mesh/App/FeatureMeshSegmentByMesh.h @@ -36,27 +36,27 @@ namespace Mesh * the facets of the first mesh that lie inside the second mesh build up the segment. * @author Werner Mayer */ -class SegmentByMesh : public Mesh::Feature +class SegmentByMesh: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::SegmentByMesh); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::SegmentByMesh); public: - SegmentByMesh(); + SegmentByMesh(); - App::PropertyLink Source; - App::PropertyLink Tool; - App::PropertyVector Base; - App::PropertyVector Normal; + App::PropertyLink Source; + App::PropertyLink Tool; + App::PropertyVector Base; + App::PropertyVector Normal; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + //@} }; -} +} // namespace Mesh -#endif // FEATURE_MESH_SEGMENTBYMESH_H +#endif // FEATURE_MESH_SEGMENTBYMESH_H diff --git a/src/Mod/Mesh/App/FeatureMeshSetOperations.cpp b/src/Mod/Mesh/App/FeatureMeshSetOperations.cpp index 40ebc203db..7ba08f5c84 100644 --- a/src/Mod/Mesh/App/FeatureMeshSetOperations.cpp +++ b/src/Mod/Mesh/App/FeatureMeshSetOperations.cpp @@ -44,57 +44,70 @@ SetOperations::SetOperations() short SetOperations::mustExecute() const { if (Source1.getValue() && Source2.getValue()) { - if (Source1.isTouched()) + if (Source1.isTouched()) { return 1; - if (Source2.isTouched()) + } + if (Source2.isTouched()) { return 1; - if (OperationType.isTouched()) + } + if (OperationType.isTouched()) { return 1; + } } return 0; } -App::DocumentObjectExecReturn *SetOperations::execute() +App::DocumentObjectExecReturn* SetOperations::execute() { - Mesh::Feature *mesh1 = dynamic_cast(Source1.getValue()); - Mesh::Feature *mesh2 = dynamic_cast(Source2.getValue()); + Mesh::Feature* mesh1 = dynamic_cast(Source1.getValue()); + Mesh::Feature* mesh2 = dynamic_cast(Source2.getValue()); if (mesh1 && mesh2) { const MeshObject& meshKernel1 = mesh1->Mesh.getValue(); const MeshObject& meshKernel2 = mesh2->Mesh.getValue(); - std::unique_ptr pcKernel(new MeshObject()); // Result Meshkernel + std::unique_ptr pcKernel(new MeshObject()); // Result Meshkernel MeshCore::SetOperations::OperationType type; string ot(OperationType.getValue()); - if (ot == "union") + if (ot == "union") { type = MeshCore::SetOperations::Union; - else if (ot == "intersection") + } + else if (ot == "intersection") { type = MeshCore::SetOperations::Intersect; - else if (ot == "difference") + } + else if (ot == "difference") { type = MeshCore::SetOperations::Difference; - else if (ot == "inner") + } + else if (ot == "inner") { type = MeshCore::SetOperations::Inner; - else if (ot == "outer") + } + else if (ot == "outer") { type = MeshCore::SetOperations::Outer; - else + } + else { throw Base::ValueError("Operation type must either be 'union' or 'intersection'" " or 'difference' or 'inner' or 'outer'"); + } - MeshCore::SetOperations setOp(meshKernel1.getKernel(), meshKernel2.getKernel(), - pcKernel->getKernel(), type, 1.0e-5f); + MeshCore::SetOperations setOp(meshKernel1.getKernel(), + meshKernel2.getKernel(), + pcKernel->getKernel(), + type, + 1.0e-5f); setOp.Do(); Mesh.setValuePtr(pcKernel.release()); } else { // Error mesh property - if (!mesh1) + if (!mesh1) { throw Base::ValueError("First input mesh not set"); - if (!mesh2) + } + if (!mesh2) { throw Base::ValueError("Second input mesh not set"); + } } return App::DocumentObject::StdReturn; } - diff --git a/src/Mod/Mesh/App/FeatureMeshSetOperations.h b/src/Mod/Mesh/App/FeatureMeshSetOperations.h index bd6a9a1d40..f43fc45255 100644 --- a/src/Mod/Mesh/App/FeatureMeshSetOperations.h +++ b/src/Mod/Mesh/App/FeatureMeshSetOperations.h @@ -36,25 +36,25 @@ namespace Mesh * Operations so far: Intersections, Union, Difference * @author Berthold Grupp */ -class SetOperations : public Mesh::Feature +class SetOperations: public Mesh::Feature { PROPERTY_HEADER_WITH_OVERRIDE(Mesh::SetOperations); public: SetOperations(); - App::PropertyLink Source1; - App::PropertyLink Source2; + App::PropertyLink Source1; + App::PropertyLink Source2; App::PropertyString OperationType; /** @name methods override Feature */ //@{ /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; short mustExecute() const override; //@} }; -} +} // namespace Mesh -#endif // FEATURE_MESH_SEGMENT_H +#endif // FEATURE_MESH_SEGMENT_H diff --git a/src/Mod/Mesh/App/FeatureMeshSolid.cpp b/src/Mod/Mesh/App/FeatureMeshSolid.cpp index 03407d3905..3115cef31e 100644 --- a/src/Mod/Mesh/App/FeatureMeshSolid.cpp +++ b/src/Mod/Mesh/App/FeatureMeshSolid.cpp @@ -27,10 +27,11 @@ #include "FeatureMeshSolid.h" -namespace Mesh { - const App::PropertyIntegerConstraint::Constraints intSampling = {0, INT_MAX, 1}; - const App::PropertyLength::Constraints floatRange = {0.0, FLT_MAX, 1.0}; -} +namespace Mesh +{ +const App::PropertyIntegerConstraint::Constraints intSampling = {0, INT_MAX, 1}; +const App::PropertyLength::Constraints floatRange = {0.0, FLT_MAX, 1.0}; +} // namespace Mesh using namespace Mesh; using namespace MeshCore; @@ -47,14 +48,16 @@ Sphere::Sphere() short Sphere::mustExecute() const { - if (Radius.isTouched() || Sampling.isTouched()) + if (Radius.isTouched() || Sampling.isTouched()) { return 1; + } return Feature::mustExecute(); } -App::DocumentObjectExecReturn *Sphere::execute() +App::DocumentObjectExecReturn* Sphere::execute() { - std::unique_ptr mesh(MeshObject::createSphere((float)Radius.getValue(),Sampling.getValue())); + std::unique_ptr mesh( + MeshObject::createSphere((float)Radius.getValue(), Sampling.getValue())); if (mesh.get()) { mesh->setPlacement(this->Placement.getValue()); Mesh.setValue(mesh->getKernel()); @@ -65,7 +68,9 @@ App::DocumentObjectExecReturn *Sphere::execute() } } -void Sphere::handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property *prop) +void Sphere::handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) { if (prop == &Radius && strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { App::PropertyFloatConstraint r; @@ -83,9 +88,9 @@ PROPERTY_SOURCE(Mesh::Ellipsoid, Mesh::Feature) Ellipsoid::Ellipsoid() { - ADD_PROPERTY(Radius1 ,(2.0)); - ADD_PROPERTY(Radius2 ,(4.0)); - ADD_PROPERTY(Sampling ,(50)); + ADD_PROPERTY(Radius1, (2.0)); + ADD_PROPERTY(Radius2, (4.0)); + ADD_PROPERTY(Sampling, (50)); Radius1.setConstraints(&floatRange); Radius2.setConstraints(&floatRange); Sampling.setConstraints(&intSampling); @@ -93,16 +98,17 @@ Ellipsoid::Ellipsoid() short Ellipsoid::mustExecute() const { - if (Radius1.isTouched() || - Radius2.isTouched() || - Sampling.isTouched()) + if (Radius1.isTouched() || Radius2.isTouched() || Sampling.isTouched()) { return 1; + } return Feature::mustExecute(); } -App::DocumentObjectExecReturn *Ellipsoid::execute() +App::DocumentObjectExecReturn* Ellipsoid::execute() { - std::unique_ptr mesh(MeshObject::createEllipsoid((float)Radius1.getValue(),(float)Radius2.getValue(),Sampling.getValue())); + std::unique_ptr mesh(MeshObject::createEllipsoid((float)Radius1.getValue(), + (float)Radius2.getValue(), + Sampling.getValue())); if (mesh.get()) { mesh->setPlacement(this->Placement.getValue()); Mesh.setValue(mesh->getKernel()); @@ -113,10 +119,12 @@ App::DocumentObjectExecReturn *Ellipsoid::execute() } } -void Ellipsoid::handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property *prop) +void Ellipsoid::handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) { - if ((prop == &Radius1 || prop == &Radius2) && - strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { + if ((prop == &Radius1 || prop == &Radius2) + && strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { App::PropertyFloatConstraint r; r.Restore(reader); static_cast(prop)->setValue(r.getValue()); @@ -132,11 +140,11 @@ PROPERTY_SOURCE(Mesh::Cylinder, Mesh::Feature) Cylinder::Cylinder() { - ADD_PROPERTY(Radius ,(2.0)); - ADD_PROPERTY(Length ,(10.0)); - ADD_PROPERTY(EdgeLength,(1.0)); - ADD_PROPERTY(Closed ,(true)); - ADD_PROPERTY(Sampling ,(50)); + ADD_PROPERTY(Radius, (2.0)); + ADD_PROPERTY(Length, (10.0)); + ADD_PROPERTY(EdgeLength, (1.0)); + ADD_PROPERTY(Closed, (true)); + ADD_PROPERTY(Sampling, (50)); Radius.setConstraints(&floatRange); Length.setConstraints(&floatRange); EdgeLength.setConstraints(&floatRange); @@ -145,19 +153,20 @@ Cylinder::Cylinder() short Cylinder::mustExecute() const { - if (Radius.isTouched() || - Length.isTouched() || - EdgeLength.isTouched() || - Closed.isTouched() || - Sampling.isTouched()) + if (Radius.isTouched() || Length.isTouched() || EdgeLength.isTouched() || Closed.isTouched() + || Sampling.isTouched()) { return 1; + } return Feature::mustExecute(); } -App::DocumentObjectExecReturn *Cylinder::execute() +App::DocumentObjectExecReturn* Cylinder::execute() { - std::unique_ptr mesh(MeshObject::createCylinder((float)Radius.getValue(),(float)Length.getValue(), - Closed.getValue(),(float)EdgeLength.getValue(),Sampling.getValue())); + std::unique_ptr mesh(MeshObject::createCylinder((float)Radius.getValue(), + (float)Length.getValue(), + Closed.getValue(), + (float)EdgeLength.getValue(), + Sampling.getValue())); if (mesh.get()) { mesh->setPlacement(this->Placement.getValue()); Mesh.setValue(mesh->getKernel()); @@ -168,10 +177,12 @@ App::DocumentObjectExecReturn *Cylinder::execute() } } -void Cylinder::handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property *prop) +void Cylinder::handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) { - if ((prop == &Radius || prop == &Length || prop == &EdgeLength) && - strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { + if ((prop == &Radius || prop == &Length || prop == &EdgeLength) + && strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { App::PropertyFloatConstraint r; r.Restore(reader); static_cast(prop)->setValue(r.getValue()); @@ -187,12 +198,12 @@ PROPERTY_SOURCE(Mesh::Cone, Mesh::Feature) Cone::Cone() { - ADD_PROPERTY(Radius1 ,(2.0)); - ADD_PROPERTY(Radius2 ,(4.0)); - ADD_PROPERTY(Length ,(10.0)); - ADD_PROPERTY(EdgeLength,(1.0)); - ADD_PROPERTY(Closed ,(true)); - ADD_PROPERTY(Sampling ,(50)); + ADD_PROPERTY(Radius1, (2.0)); + ADD_PROPERTY(Radius2, (4.0)); + ADD_PROPERTY(Length, (10.0)); + ADD_PROPERTY(EdgeLength, (1.0)); + ADD_PROPERTY(Closed, (true)); + ADD_PROPERTY(Sampling, (50)); Radius1.setConstraints(&floatRange); Radius2.setConstraints(&floatRange); Length.setConstraints(&floatRange); @@ -202,20 +213,21 @@ Cone::Cone() short Cone::mustExecute() const { - if (Radius1.isTouched() || - Radius2.isTouched() || - Length.isTouched() || - EdgeLength.isTouched() || - Closed.isTouched() || - Sampling.isTouched()) + if (Radius1.isTouched() || Radius2.isTouched() || Length.isTouched() || EdgeLength.isTouched() + || Closed.isTouched() || Sampling.isTouched()) { return 1; + } return Feature::mustExecute(); } -App::DocumentObjectExecReturn *Cone::execute() +App::DocumentObjectExecReturn* Cone::execute() { - std::unique_ptr mesh(MeshObject::createCone((float)Radius1.getValue(),(float)Radius2.getValue(),(float)Length.getValue(), - Closed.getValue(),(float)EdgeLength.getValue(),Sampling.getValue())); + std::unique_ptr mesh(MeshObject::createCone((float)Radius1.getValue(), + (float)Radius2.getValue(), + (float)Length.getValue(), + Closed.getValue(), + (float)EdgeLength.getValue(), + Sampling.getValue())); if (mesh.get()) { mesh->setPlacement(this->Placement.getValue()); Mesh.setValue(mesh->getKernel()); @@ -226,10 +238,12 @@ App::DocumentObjectExecReturn *Cone::execute() } } -void Cone::handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property *prop) +void Cone::handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) { - if ((prop == &Radius1 || prop == &Radius2 || prop == &Length || prop == &EdgeLength) && - strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { + if ((prop == &Radius1 || prop == &Radius2 || prop == &Length || prop == &EdgeLength) + && strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { App::PropertyFloatConstraint r; r.Restore(reader); static_cast(prop)->setValue(r.getValue()); @@ -245,9 +259,9 @@ PROPERTY_SOURCE(Mesh::Torus, Mesh::Feature) Torus::Torus() { - ADD_PROPERTY(Radius1 ,(10.0)); - ADD_PROPERTY(Radius2 ,(2.0)); - ADD_PROPERTY(Sampling ,(50)); + ADD_PROPERTY(Radius1, (10.0)); + ADD_PROPERTY(Radius2, (2.0)); + ADD_PROPERTY(Sampling, (50)); Radius1.setConstraints(&floatRange); Radius2.setConstraints(&floatRange); Sampling.setConstraints(&intSampling); @@ -255,16 +269,17 @@ Torus::Torus() short Torus::mustExecute() const { - if (Radius1.isTouched() || - Radius2.isTouched() || - Sampling.isTouched()) + if (Radius1.isTouched() || Radius2.isTouched() || Sampling.isTouched()) { return 1; + } return Feature::mustExecute(); } -App::DocumentObjectExecReturn *Torus::execute() +App::DocumentObjectExecReturn* Torus::execute() { - std::unique_ptr mesh(MeshObject::createTorus((float)Radius1.getValue(),(float)Radius2.getValue(),Sampling.getValue())); + std::unique_ptr mesh(MeshObject::createTorus((float)Radius1.getValue(), + (float)Radius2.getValue(), + Sampling.getValue())); if (mesh.get()) { mesh->setPlacement(this->Placement.getValue()); Mesh.setValue(mesh->getKernel()); @@ -275,10 +290,12 @@ App::DocumentObjectExecReturn *Torus::execute() } } -void Torus::handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property *prop) +void Torus::handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) { - if ((prop == &Radius1 || prop == &Radius2) && - strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { + if ((prop == &Radius1 || prop == &Radius2) + && strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { App::PropertyFloatConstraint r; r.Restore(reader); static_cast(prop)->setValue(r.getValue()); @@ -294,9 +311,9 @@ PROPERTY_SOURCE(Mesh::Cube, Mesh::Feature) Cube::Cube() { - ADD_PROPERTY_TYPE(Length,(10.0f),"Cube",App::Prop_None,"The length of the cube"); - ADD_PROPERTY_TYPE(Width ,(10.0f),"Cube",App::Prop_None,"The width of the cube"); - ADD_PROPERTY_TYPE(Height,(10.0f),"Cube",App::Prop_None,"The height of the cube"); + ADD_PROPERTY_TYPE(Length, (10.0f), "Cube", App::Prop_None, "The length of the cube"); + ADD_PROPERTY_TYPE(Width, (10.0f), "Cube", App::Prop_None, "The width of the cube"); + ADD_PROPERTY_TYPE(Height, (10.0f), "Cube", App::Prop_None, "The height of the cube"); Length.setConstraints(&floatRange); Width.setConstraints(&floatRange); Height.setConstraints(&floatRange); @@ -304,16 +321,17 @@ Cube::Cube() short Cube::mustExecute() const { - if (Length.isTouched() || - Width.isTouched() || - Height.isTouched()) + if (Length.isTouched() || Width.isTouched() || Height.isTouched()) { return 1; + } return Feature::mustExecute(); } -App::DocumentObjectExecReturn *Cube::execute() +App::DocumentObjectExecReturn* Cube::execute() { - std::unique_ptr mesh(MeshObject::createCube((float)Length.getValue(),(float)Width.getValue(),(float)Height.getValue())); + std::unique_ptr mesh(MeshObject::createCube((float)Length.getValue(), + (float)Width.getValue(), + (float)Height.getValue())); if (mesh.get()) { mesh->setPlacement(this->Placement.getValue()); Mesh.setValue(mesh->getKernel()); @@ -324,10 +342,12 @@ App::DocumentObjectExecReturn *Cube::execute() } } -void Cube::handleChangedPropertyType(Base::XMLReader &reader, const char *TypeName, App::Property *prop) +void Cube::handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) { - if ((prop == &Length || prop == &Width || prop == &Height) && - strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { + if ((prop == &Length || prop == &Width || prop == &Height) + && strcmp(TypeName, "App::PropertyFloatConstraint") == 0) { App::PropertyFloatConstraint r; r.Restore(reader); static_cast(prop)->setValue(r.getValue()); diff --git a/src/Mod/Mesh/App/FeatureMeshSolid.h b/src/Mod/Mesh/App/FeatureMeshSolid.h index fd01af973c..f78ff18914 100644 --- a/src/Mod/Mesh/App/FeatureMeshSolid.h +++ b/src/Mod/Mesh/App/FeatureMeshSolid.h @@ -34,140 +34,152 @@ namespace Mesh /** * @author Werner Mayer */ -class Sphere : public Mesh::Feature +class Sphere: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Sphere); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Sphere); public: - Sphere(); + Sphere(); - App::PropertyLength Radius; - App::PropertyIntegerConstraint Sampling; + App::PropertyLength Radius; + App::PropertyIntegerConstraint Sampling; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) override; + //@} }; // ------------------------------------------------------------- -class Ellipsoid : public Mesh::Feature +class Ellipsoid: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Ellipsoid); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Ellipsoid); public: - Ellipsoid(); + Ellipsoid(); - App::PropertyLength Radius1; - App::PropertyLength Radius2; - App::PropertyIntegerConstraint Sampling; + App::PropertyLength Radius1; + App::PropertyLength Radius2; + App::PropertyIntegerConstraint Sampling; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) override; + //@} }; // ------------------------------------------------------------- -class Cylinder : public Mesh::Feature +class Cylinder: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Cylinder); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Cylinder); public: - Cylinder(); + Cylinder(); - App::PropertyLength Radius; - App::PropertyLength Length; - App::PropertyLength EdgeLength; - App::PropertyBool Closed; - App::PropertyIntegerConstraint Sampling; + App::PropertyLength Radius; + App::PropertyLength Length; + App::PropertyLength EdgeLength; + App::PropertyBool Closed; + App::PropertyIntegerConstraint Sampling; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) override; + //@} }; // ------------------------------------------------------------- -class Cone : public Mesh::Feature +class Cone: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Cone); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Cone); public: - Cone(); + Cone(); - App::PropertyLength Radius1; - App::PropertyLength Radius2; - App::PropertyLength Length; - App::PropertyLength EdgeLength; - App::PropertyBool Closed; - App::PropertyIntegerConstraint Sampling; + App::PropertyLength Radius1; + App::PropertyLength Radius2; + App::PropertyLength Length; + App::PropertyLength EdgeLength; + App::PropertyBool Closed; + App::PropertyIntegerConstraint Sampling; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) override; + //@} }; // ------------------------------------------------------------- -class Torus : public Mesh::Feature +class Torus: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Torus); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Torus); public: - Torus(); + Torus(); - App::PropertyLength Radius1; - App::PropertyLength Radius2; - App::PropertyIntegerConstraint Sampling; + App::PropertyLength Radius1; + App::PropertyLength Radius2; + App::PropertyIntegerConstraint Sampling; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) override; + //@} }; // ------------------------------------------------------------- -class Cube : public Mesh::Feature +class Cube: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Cube); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Cube); public: - Cube(); + Cube(); - App::PropertyLength Length; - App::PropertyLength Width; - App::PropertyLength Height; + App::PropertyLength Length; + App::PropertyLength Width; + App::PropertyLength Height; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - short mustExecute() const override; - void handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop) override; - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + short mustExecute() const override; + void handleChangedPropertyType(Base::XMLReader& reader, + const char* TypeName, + App::Property* prop) override; + //@} }; -} +} // namespace Mesh -#endif // FEATURE_MESH_SOLID_H +#endif // FEATURE_MESH_SOLID_H diff --git a/src/Mod/Mesh/App/FeatureMeshTransform.cpp b/src/Mod/Mesh/App/FeatureMeshTransform.cpp index 776c937ecc..e8c1f9574b 100644 --- a/src/Mod/Mesh/App/FeatureMeshTransform.cpp +++ b/src/Mod/Mesh/App/FeatureMeshTransform.cpp @@ -41,19 +41,18 @@ Transform::Transform() App::DocumentObjectExecReturn* Transform::execute() { -/* - Feature* pcFirst = dynamic_cast(Source.getValue()); - if (!pcFirst || pcFirst->isError()) - return new App::DocumentObjectExecReturn("Unknown Error"); + /* + Feature* pcFirst = dynamic_cast(Source.getValue()); + if (!pcFirst || pcFirst->isError()) + return new App::DocumentObjectExecReturn("Unknown Error"); - Matrix4D Matrix = Position.getValue(); + Matrix4D Matrix = Position.getValue(); - MeshCore::MeshKernel* pcKernel = - new MeshCore::MeshKernel(pcFirst->Mesh.getValue());// Result Meshkernel - pcKernel->Transform(Matrix); - Mesh.setValue(pcKernel); -*/ + MeshCore::MeshKernel* pcKernel = + new MeshCore::MeshKernel(pcFirst->Mesh.getValue());// Result Meshkernel + pcKernel->Transform(Matrix); + Mesh.setValue(pcKernel); + */ return App::DocumentObject::StdReturn; } - diff --git a/src/Mod/Mesh/App/FeatureMeshTransform.h b/src/Mod/Mesh/App/FeatureMeshTransform.h index 0690e37308..8684f2a5f6 100644 --- a/src/Mod/Mesh/App/FeatureMeshTransform.h +++ b/src/Mod/Mesh/App/FeatureMeshTransform.h @@ -36,28 +36,29 @@ namespace Mesh * into the FreeCAD workspace. * @author Werner Mayer */ -class Transform : public Mesh::Feature +class Transform: public Mesh::Feature { - PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Transform); + PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Transform); public: - Transform(); + Transform(); - App::PropertyLink Source; - App::PropertyMatrix Position; + App::PropertyLink Source; + App::PropertyMatrix Position; - /** @name methods override Feature */ - //@{ - /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; - /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { - return "MeshGui::ViewProviderMeshTransform"; - } - //@} + /** @name methods override Feature */ + //@{ + /// recalculate the Feature + App::DocumentObjectExecReturn* execute() override; + /// returns the type name of the ViewProvider + const char* getViewProviderName() const override + { + return "MeshGui::ViewProviderMeshTransform"; + } + //@} }; -} +} // namespace Mesh -#endif // FEATURE_MESH_TRANSFORM_H +#endif // FEATURE_MESH_TRANSFORM_H diff --git a/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp b/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp index 9a6e8492c5..4525a80c88 100644 --- a/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp +++ b/src/Mod/Mesh/App/FeatureMeshTransformDemolding.cpp @@ -38,14 +38,14 @@ TransformDemolding::TransformDemolding() ADD_PROPERTY(Axis, (0.0, 0.0, 1.0)); } -App::DocumentObjectExecReturn *TransformDemolding::execute() +App::DocumentObjectExecReturn* TransformDemolding::execute() { /* Feature *pcFirst = dynamic_cast(Source.getValue()); if (!pcFirst || pcFirst->isError()) return new App::DocumentObjectExecReturn("Unknown Error"); - MeshCore::MeshKernel* pcKernel = new MeshCore::MeshKernel(pcFirst->Mesh.getValue()); // Result Meshkernel - Base::Matrix4D trans(Base::Vector3f(0, 0, 0), Axis.getValue(), Rotation.getValue()); + MeshCore::MeshKernel* pcKernel = new MeshCore::MeshKernel(pcFirst->Mesh.getValue()); // Result + Meshkernel Base::Matrix4D trans(Base::Vector3f(0, 0, 0), Axis.getValue(), Rotation.getValue()); //Matrix4D trans; //trans.rotLine(Axis.getValue(), Rotation.getValue()); pcKernel->Transform(trans); @@ -53,4 +53,3 @@ App::DocumentObjectExecReturn *TransformDemolding::execute() */ return App::DocumentObject::StdReturn; } - diff --git a/src/Mod/Mesh/App/FeatureMeshTransformDemolding.h b/src/Mod/Mesh/App/FeatureMeshTransformDemolding.h index a9dccf5d72..2020a05f48 100644 --- a/src/Mod/Mesh/App/FeatureMeshTransformDemolding.h +++ b/src/Mod/Mesh/App/FeatureMeshTransformDemolding.h @@ -34,7 +34,7 @@ namespace Mesh /** * The TransformDemolding class. */ -class TransformDemolding : public Transform +class TransformDemolding: public Transform { PROPERTY_HEADER_WITH_OVERRIDE(Mesh::TransformDemolding); @@ -48,14 +48,15 @@ public: /** @name methods override Feature */ //@{ /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "MeshGui::ViewProviderMeshTransformDemolding"; } //@} }; -} +} // namespace Mesh -#endif // FEATURE_MESH_TRANSFORM_H +#endif // FEATURE_MESH_TRANSFORM_H diff --git a/src/Mod/Mesh/App/Importer.cpp b/src/Mod/Mesh/App/Importer.cpp index 5392bd71c8..097cca3d9c 100644 --- a/src/Mod/Mesh/App/Importer.cpp +++ b/src/Mod/Mesh/App/Importer.cpp @@ -32,9 +32,8 @@ using namespace Mesh; Importer::Importer(App::Document* doc) - : document(doc) -{ -} + : document(doc) +{} void Importer::load(const std::string& fileName) { @@ -47,14 +46,14 @@ void Importer::load(const std::string& fileName) if (segmct > 1) { createMeshFromSegments(file.fileNamePure(), mat, mesh); } - else if (mat.binding == MeshCore::MeshIO::PER_VERTEX && - mat.diffuseColor.size() == mesh.countPoints()) { + else if (mat.binding == MeshCore::MeshIO::PER_VERTEX + && mat.diffuseColor.size() == mesh.countPoints()) { Feature* feature = createMesh(file.fileNamePure(), mesh); addVertexColors(feature, mat.diffuseColor); feature->purgeTouched(); } - else if (mat.binding == MeshCore::MeshIO::PER_FACE && - mat.diffuseColor.size() == mesh.countFacets()) { + else if (mat.binding == MeshCore::MeshIO::PER_FACE + && mat.diffuseColor.size() == mesh.countFacets()) { Feature* feature = createMesh(file.fileNamePure(), mesh); addFaceColors(feature, mat.diffuseColor); feature->purgeTouched(); @@ -76,30 +75,35 @@ void Importer::addFaceColors(Feature* feature, const std::vector& co addColors(feature, "FaceColors", colors); } -void Importer::addColors(Feature* feature, const std::string& property, const std::vector& colors) +void Importer::addColors(Feature* feature, + const std::string& property, + const std::vector& colors) { - App::PropertyColorList* prop = static_cast - (feature->addDynamicProperty("App::PropertyColorList", property.c_str())); + App::PropertyColorList* prop = static_cast( + feature->addDynamicProperty("App::PropertyColorList", property.c_str())); if (prop) { prop->setValues(colors); } } -void Importer::createMeshFromSegments(const std::string& name, MeshCore::Material& mat, MeshObject& mesh) +void Importer::createMeshFromSegments(const std::string& name, + MeshCore::Material& mat, + MeshObject& mesh) { unsigned long segmct = mesh.countSegments(); - for (unsigned long i=0; i segm(mesh.meshFromSegment(group.getIndices())); Feature* feature = createMesh(groupName, *segm); // if colors are set per face - if (mat.binding == MeshCore::MeshIO::PER_FACE && - mat.diffuseColor.size() == mesh.countFacets()) { + if (mat.binding == MeshCore::MeshIO::PER_FACE + && mat.diffuseColor.size() == mesh.countFacets()) { std::vector diffuseColor; diffuseColor.reserve(group.getIndices().size()); @@ -115,8 +119,8 @@ void Importer::createMeshFromSegments(const std::string& name, MeshCore::Materia Feature* Importer::createMesh(const std::string& name, MeshObject& mesh) { - Mesh::Feature *pcFeature = static_cast - (document->addObject("Mesh::Feature", name.c_str())); + Mesh::Feature* pcFeature = + static_cast(document->addObject("Mesh::Feature", name.c_str())); pcFeature->Label.setValue(name); pcFeature->Mesh.swapMesh(mesh); return pcFeature; diff --git a/src/Mod/Mesh/App/Importer.h b/src/Mod/Mesh/App/Importer.h index 1f18f46bf8..1000b19538 100644 --- a/src/Mod/Mesh/App/Importer.h +++ b/src/Mod/Mesh/App/Importer.h @@ -26,12 +26,14 @@ #include #include -namespace App { +namespace App +{ class Document; class Color; -} +} // namespace App -namespace MeshCore { +namespace MeshCore +{ struct Material; } namespace Mesh @@ -56,6 +58,6 @@ private: App::Document* document; }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_IMPORTER_H +#endif // MESH_IMPORTER_H diff --git a/src/Mod/Mesh/App/Mesh.cpp b/src/Mod/Mesh/App/Mesh.cpp index ad39700a10..65e65dd4aa 100644 --- a/src/Mod/Mesh/App/Mesh.cpp +++ b/src/Mod/Mesh/App/Mesh.cpp @@ -22,8 +22,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -64,19 +64,21 @@ TYPESYSTEM_SOURCE(Mesh::MeshSegment, Data::Segment) MeshObject::MeshObject() = default; MeshObject::MeshObject(const MeshCore::MeshKernel& Kernel) - : _kernel(Kernel) + : _kernel(Kernel) { // copy the mesh structure } -MeshObject::MeshObject(const MeshCore::MeshKernel& Kernel, const Base::Matrix4D &Mtrx) - : _Mtrx(Mtrx),_kernel(Kernel) +MeshObject::MeshObject(const MeshCore::MeshKernel& Kernel, const Base::Matrix4D& Mtrx) + : _Mtrx(Mtrx) + , _kernel(Kernel) { // copy the mesh structure } MeshObject::MeshObject(const MeshObject& mesh) - : _Mtrx(mesh._Mtrx),_kernel(mesh._kernel) + : _Mtrx(mesh._Mtrx) + , _kernel(mesh._kernel) { // copy the mesh structure copySegments(mesh); @@ -96,10 +98,12 @@ std::vector MeshObject::getElementTypes() const unsigned long MeshObject::countSubElements(const char* Type) const { std::string element(Type); - if (element == "Mesh") + if (element == "Mesh") { return 1; - else if (element == "Segment") + } + else if (element == "Segment") { return countSegments(); + } return 0; } @@ -115,7 +119,9 @@ Data::Segment* MeshObject::getSubElement(const char* Type, unsigned long n) cons MeshSegment* segm = new MeshSegment(); segm->mesh = new MeshObject(*this); const Segment& faces = getSegment(n); - segm->segment = std::make_unique(static_cast(segm->mesh), faces.getIndices(), false); + segm->segment = std::make_unique(static_cast(segm->mesh), + faces.getIndices(), + false); return segm; } @@ -123,14 +129,15 @@ Data::Segment* MeshObject::getSubElement(const char* Type, unsigned long n) cons } void MeshObject::getFacesFromSubElement(const Data::Segment* element, - std::vector &points, - std::vector &/*pointNormals*/, - std::vector &faces) const + std::vector& points, + std::vector& /*pointNormals*/, + std::vector& faces) const { if (element && element->getTypeId() == MeshSegment::getClassTypeId()) { const MeshSegment* segm = static_cast(element); if (segm->segment) { - Base::Reference submesh(segm->mesh->meshFromSegment(segm->segment->getIndices())); + Base::Reference submesh( + segm->mesh->meshFromSegment(segm->segment->getIndices())); submesh->getFaces(points, faces, 0.0); } else { @@ -139,7 +146,7 @@ void MeshObject::getFacesFromSubElement(const Data::Segment* element, } } -void MeshObject::transformGeometry(const Base::Matrix4D &rclMat) +void MeshObject::transformGeometry(const Base::Matrix4D& rclMat) { MeshCore::MeshKernel kernel; swap(kernel); @@ -157,15 +164,16 @@ Base::Matrix4D MeshObject::getTransform() const return _Mtrx; } -Base::BoundBox3d MeshObject::getBoundBox()const +Base::BoundBox3d MeshObject::getBoundBox() const { _kernel.RecalcBoundBox(); Base::BoundBox3f Bnd = _kernel.GetBoundBox(); Base::BoundBox3d Bnd2; if (Bnd.IsValid()) { - for (int i =0 ;i<=7;i++) + for (int i = 0; i <= 7; i++) { Bnd2.Add(transformPointToOutside(Bnd.CalcPoint(Base::BoundBox3f::CORNER(i)))); + } } return Bnd2; @@ -199,7 +207,7 @@ void MeshObject::swapSegments(MeshObject& mesh) }); } -void MeshObject::operator = (const MeshObject& mesh) +void MeshObject::operator=(const MeshObject& mesh) { if (this != &mesh) { // copy the mesh structure @@ -227,7 +235,7 @@ void MeshObject::swap(MeshObject& mesh) { this->_kernel.Swap(mesh._kernel); swapSegments(mesh); - Base::Matrix4D tmp=this->_Mtrx; + Base::Matrix4D tmp = this->_Mtrx; this->_Mtrx = mesh._Mtrx; mesh._Mtrx = tmp; } @@ -258,12 +266,12 @@ unsigned long MeshObject::countFacets() const return _kernel.CountFacets(); } -unsigned long MeshObject::countEdges () const +unsigned long MeshObject::countEdges() const { return _kernel.CountEdges(); } -unsigned long MeshObject::countSegments () const +unsigned long MeshObject::countSegments() const { return this->_segments.size(); } @@ -298,9 +306,10 @@ MeshPoint MeshObject::getMeshPoint(PointIndex index) const return point; } -void MeshObject::getPoints(std::vector &Points, - std::vector &Normals, - double /*Accuracy*/, uint16_t /*flags*/) const +void MeshObject::getPoints(std::vector& Points, + std::vector& Normals, + double /*Accuracy*/, + uint16_t /*flags*/) const { Points = transformPointsToOutside(_kernel.GetPoints()); MeshCore::MeshRefNormalToPoints ptNormals(_kernel); @@ -313,19 +322,21 @@ Mesh::Facet MeshObject::getMeshFacet(FacetIndex index) const return face; } -void MeshObject::getFaces(std::vector &Points,std::vector &Topo, - double /*Accuracy*/, uint16_t /*flags*/) const +void MeshObject::getFaces(std::vector& Points, + std::vector& Topo, + double /*Accuracy*/, + uint16_t /*flags*/) const { unsigned long ctpoints = _kernel.CountPoints(); Points.reserve(ctpoints); - for (unsigned long i=0; i &Points,std::vector } } -unsigned int MeshObject::getMemSize () const +unsigned int MeshObject::getMemSize() const { return _kernel.GetMemSize(); } -void MeshObject::Save (Base::Writer &/*writer*/) const +void MeshObject::Save(Base::Writer& /*writer*/) const { // this is handled by the property class } -void MeshObject::SaveDocFile (Base::Writer &writer) const +void MeshObject::SaveDocFile(Base::Writer& writer) const { _kernel.Write(writer.Stream()); } -void MeshObject::Restore(Base::XMLReader &/*reader*/) +void MeshObject::Restore(Base::XMLReader& /*reader*/) { // this is handled by the property class } -void MeshObject::RestoreDocFile(Base::Reader &reader) +void MeshObject::RestoreDocFile(Base::Reader& reader) { load(reader); } -void MeshObject::save(const char* file, MeshCore::MeshIO::Format f, +void MeshObject::save(const char* file, + MeshCore::MeshIO::Format f, const MeshCore::Material* mat, const char* objectname) const { MeshCore::MeshOutput aWriter(this->_kernel, mat); - if (objectname) + if (objectname) { aWriter.SetObjectName(objectname); + } // go through the segment list and put them to the exporter when // the "save" flag is set std::vector groups; - for (const auto & segment : this->_segments) { + for (const auto& segment : this->_segments) { if (segment.isSaved()) { MeshCore::Group g; g.indices = segment.getIndices(); @@ -388,18 +401,20 @@ void MeshObject::save(const char* file, MeshCore::MeshIO::Format f, aWriter.SaveAny(file, f); } -void MeshObject::save(std::ostream& str, MeshCore::MeshIO::Format f, +void MeshObject::save(std::ostream& str, + MeshCore::MeshIO::Format f, const MeshCore::Material* mat, const char* objectname) const { MeshCore::MeshOutput aWriter(this->_kernel, mat); - if (objectname) + if (objectname) { aWriter.SetObjectName(objectname); + } // go through the segment list and put them to the exporter when // the "save" flag is set std::vector groups; - for (const auto & segment : this->_segments) { + for (const auto& segment : this->_segments) { if (segment.isSaved()) { MeshCore::Group g; g.indices = segment.getIndices(); @@ -417,8 +432,9 @@ bool MeshObject::load(const char* file, MeshCore::Material* mat) { MeshCore::MeshKernel kernel; MeshCore::MeshInput aReader(kernel, mat); - if (!aReader.LoadAny(file)) + if (!aReader.LoadAny(file)) { return false; + } swapKernel(kernel, aReader.GetGroupNames()); return true; @@ -428,15 +444,15 @@ bool MeshObject::load(std::istream& str, MeshCore::MeshIO::Format f, MeshCore::M { MeshCore::MeshKernel kernel; MeshCore::MeshInput aReader(kernel, mat); - if (!aReader.LoadFormat(str, f)) + if (!aReader.LoadFormat(str, f)) { return false; + } swapKernel(kernel, aReader.GetGroupNames()); return true; } -void MeshObject::swapKernel(MeshCore::MeshKernel& kernel, - const std::vector& g) +void MeshObject::swapKernel(MeshCore::MeshKernel& kernel, const std::vector& g) { _kernel.Swap(kernel); // Some file formats define several objects per file (e.g. OBJ). @@ -453,7 +469,7 @@ void MeshObject::swapKernel(MeshCore::MeshKernel& kernel, if (prop < it->_ulProp) { prop = it->_ulProp; if (!segment.empty()) { - this->_segments.emplace_back(this,segment,true); + this->_segments.emplace_back(this, segment, true); segment.clear(); } } @@ -463,7 +479,7 @@ void MeshObject::swapKernel(MeshCore::MeshKernel& kernel, // if the whole mesh is a single object then don't mark as segment if (!segment.empty() && (segment.size() < faces.size())) { - this->_segments.emplace_back(this,segment,true); + this->_segments.emplace_back(this, segment, true); } // apply the group names to the segments @@ -525,11 +541,11 @@ void MeshObject::writeInventor(std::ostream& str, float creaseangle) const Base::InventorBuilder builder(str); builder.beginSeparator(); - builder.addNode(Base::TransformItem{getTransform()}); - Base::ShapeHintsItem shapeHints{creaseangle}; + builder.addNode(Base::TransformItem {getTransform()}); + Base::ShapeHintsItem shapeHints {creaseangle}; builder.addNode(shapeHints); - builder.addNode(Base::Coordinate3Item{coords}); - builder.addNode(Base::IndexedFaceSetItem{indices}); + builder.addNode(Base::Coordinate3Item {coords}); + builder.addNode(Base::IndexedFaceSetItem {indices}); builder.endSeparator(); } @@ -543,20 +559,19 @@ void MeshObject::addFacets(const std::vector& facets) _kernel.AddFacets(facets); } -void MeshObject::addFacets(const std::vector &facets, - bool checkManifolds) +void MeshObject::addFacets(const std::vector& facets, bool checkManifolds) { _kernel.AddFacets(facets, checkManifolds); } -void MeshObject::addFacets(const std::vector &facets, +void MeshObject::addFacets(const std::vector& facets, const std::vector& points, bool checkManifolds) { _kernel.AddFacets(facets, points, checkManifolds); } -void MeshObject::addFacets(const std::vector &facets, +void MeshObject::addFacets(const std::vector& facets, const std::vector& points, bool checkManifolds) { @@ -572,8 +587,8 @@ void MeshObject::addFacets(const std::vector &facet std::vector point_v; point_v.reserve(points.size()); - for (const auto & point : points) { - Base::Vector3f p((float)point.x,(float)point.y,(float)point.z); + for (const auto& point : points) { + Base::Vector3f p((float)point.x, (float)point.y, (float)point.z); point_v.push_back(p); } @@ -585,7 +600,7 @@ void MeshObject::setFacets(const std::vector& facets) _kernel = facets; } -void MeshObject::setFacets(const std::vector &facets, +void MeshObject::setFacets(const std::vector& facets, const std::vector& points) { MeshCore::MeshFacetArray facet_v; @@ -600,8 +615,8 @@ void MeshObject::setFacets(const std::vector &facet MeshCore::MeshPointArray point_v; point_v.reserve(points.size()); - for (const auto & point : points) { - Base::Vector3f p((float)point.x,(float)point.y,(float)point.z); + for (const auto& point : points) { + Base::Vector3f p((float)point.x, (float)point.y, (float)point.z); point_v.push_back(p); } @@ -620,53 +635,59 @@ void MeshObject::addMesh(const MeshCore::MeshKernel& kernel) void MeshObject::deleteFacets(const std::vector& removeIndices) { - if (removeIndices.empty()) + if (removeIndices.empty()) { return; + } _kernel.DeleteFacets(removeIndices); deletedFacets(removeIndices); } void MeshObject::deletePoints(const std::vector& removeIndices) { - if (removeIndices.empty()) + if (removeIndices.empty()) { return; + } _kernel.DeletePoints(removeIndices); this->_segments.clear(); } void MeshObject::deletedFacets(const std::vector& remFacets) { - if (remFacets.empty()) - return; // nothing has changed - if (this->_segments.empty()) - return; // nothing to do + if (remFacets.empty()) { + return; // nothing has changed + } + if (this->_segments.empty()) { + return; // nothing to do + } // set an array with the original indices and mark the removed as MeshCore::FACET_INDEX_MAX - std::vector f_indices(_kernel.CountFacets()+remFacets.size()); + std::vector f_indices(_kernel.CountFacets() + remFacets.size()); for (FacetIndex remFacet : remFacets) { f_indices[remFacet] = MeshCore::FACET_INDEX_MAX; } FacetIndex index = 0; for (FacetIndex& it : f_indices) { - if (it == 0) + if (it == 0) { it = index++; + } } // the array serves now as LUT to set the new indices in the segments - for (auto & segment : this->_segments) { + for (auto& segment : this->_segments) { std::vector segm = segment._indices; - for (FacetIndex & jt : segm) { + for (FacetIndex& jt : segm) { jt = f_indices[jt]; } // remove the invalid indices std::sort(segm.begin(), segm.end()); - std::vector::iterator ft = std::find_if - (segm.begin(), segm.end(), [](FacetIndex v) { + std::vector::iterator ft = + std::find_if(segm.begin(), segm.end(), [](FacetIndex v) { return v == MeshCore::FACET_INDEX_MAX; }); - if (ft != segm.end()) + if (ft != segm.end()) { segm.erase(ft, segm.end()); + } segment._indices = segm; } } @@ -750,7 +771,9 @@ std::vector MeshObject::getPointsFromFacets(const std::vector(ray.first); Base::Vector3f dir = Base::toVector(ray.second); @@ -822,27 +845,27 @@ void MeshObject::updateMesh() const MeshCore::MeshAlgorithm alg(_kernel); alg.ResetFacetFlag(MeshCore::MeshFacet::SEGMENT); alg.ResetPointFlag(MeshCore::MeshPoint::SEGMENT); - for (const auto & segment : this->_segments) { - std::vector points; - points = _kernel.GetFacetPoints(segment.getIndices()); - alg.SetFacetsFlag(segment.getIndices(), MeshCore::MeshFacet::SEGMENT); - alg.SetPointsFlag(points, MeshCore::MeshPoint::SEGMENT); + for (const auto& segment : this->_segments) { + std::vector points; + points = _kernel.GetFacetPoints(segment.getIndices()); + alg.SetFacetsFlag(segment.getIndices(), MeshCore::MeshFacet::SEGMENT); + alg.SetPointsFlag(points, MeshCore::MeshPoint::SEGMENT); } } -std::vector > MeshObject::getComponents() const +std::vector> MeshObject::getComponents() const { - std::vector > segments; + std::vector> segments; MeshCore::MeshComponents comp(_kernel); - comp.SearchForComponents(MeshCore::MeshComponents::OverEdge,segments); + comp.SearchForComponents(MeshCore::MeshComponents::OverEdge, segments); return segments; } unsigned long MeshObject::countComponents() const { - std::vector > segments; + std::vector> segments; MeshCore::MeshComponents comp(_kernel); - comp.SearchForComponents(MeshCore::MeshComponents::OverEdge,segments); + comp.SearchForComponents(MeshCore::MeshComponents::OverEdge, segments); return segments.size(); } @@ -860,7 +883,7 @@ unsigned long MeshObject::getPointDegree(const std::vector& indices, const MeshCore::MeshFacetArray& faces = _kernel.GetFacets(); std::vector pointDeg(_kernel.CountPoints()); - for (const auto & face : faces) { + for (const auto& face : faces) { pointDeg[face._aulPoints[0]]++; pointDeg[face._aulPoints[1]]++; pointDeg[face._aulPoints[2]]++; @@ -881,10 +904,11 @@ unsigned long MeshObject::getPointDegree(const std::vector& indices, return countInvalids; } -void MeshObject::fillupHoles(unsigned long length, int level, +void MeshObject::fillupHoles(unsigned long length, + int level, MeshCore::AbstractPolygonTriangulator& cTria) { - std::list > aFailed; + std::list> aFailed; MeshCore::MeshTopoAlgorithm topalg(_kernel); topalg.FillupHoles(length, level, cTria, aFailed); } @@ -895,59 +919,69 @@ void MeshObject::offset(float fSize) unsigned int i = 0; // go through all the vertex normals - for (std::vector::iterator It= normals.begin();It != normals.end();++It,i++) + for (std::vector::iterator It = normals.begin(); It != normals.end(); + ++It, i++) { // and move each mesh point in the normal direction - _kernel.MovePoint(i,It->Normalize() * fSize); + _kernel.MovePoint(i, It->Normalize() * fSize); + } _kernel.RecalcBoundBox(); } void MeshObject::offsetSpecial2(float fSize) { Base::Builder3D builder; - std::vector PointNormals= _kernel.CalcVertexNormals(); + std::vector PointNormals = _kernel.CalcVertexNormals(); std::vector FaceNormals; std::set fliped; MeshCore::MeshFacetIterator it(_kernel); - for (it.Init(); it.More(); it.Next()) + for (it.Init(); it.More(); it.Next()) { FaceNormals.push_back(it->GetNormal().Normalize()); + } unsigned int i = 0; // go through all the vertex normals - for (std::vector::iterator It= PointNormals.begin();It != PointNormals.end();++It,i++) { - Base::Line3f line{_kernel.GetPoint(i), _kernel.GetPoint(i) + It->Normalize() * fSize}; + for (std::vector::iterator It = PointNormals.begin(); It != PointNormals.end(); + ++It, i++) { + Base::Line3f line {_kernel.GetPoint(i), _kernel.GetPoint(i) + It->Normalize() * fSize}; Base::DrawStyle drawStyle; - builder.addNode(Base::LineItem{line, drawStyle}); + builder.addNode(Base::LineItem {line, drawStyle}); // and move each mesh point in the normal direction - _kernel.MovePoint(i,It->Normalize() * fSize); + _kernel.MovePoint(i, It->Normalize() * fSize); } _kernel.RecalcBoundBox(); MeshCore::MeshTopoAlgorithm alg(_kernel); - for (int l= 0; l<1 ;l++) { - for ( it.Init(),i=0; it.More(); it.Next(),i++) { - if (it->IsFlag(MeshCore::MeshFacet::INVALID)) + for (int l = 0; l < 1; l++) { + for (it.Init(), i = 0; it.More(); it.Next(), i++) { + if (it->IsFlag(MeshCore::MeshFacet::INVALID)) { continue; + } // calculate the angle between them - float angle = acos((FaceNormals[i] * it->GetNormal()) / (it->GetNormal().Length() * FaceNormals[i].Length())); + float angle = acos((FaceNormals[i] * it->GetNormal()) + / (it->GetNormal().Length() * FaceNormals[i].Length())); if (angle > 1.6) { Base::DrawStyle drawStyle; drawStyle.pointSize = 4.0F; - Base::PointItem item{it->GetGravityPoint(), drawStyle, Base::ColorRGB{1.0F, 0.0F, 0.0F}}; + Base::PointItem item {it->GetGravityPoint(), + drawStyle, + Base::ColorRGB {1.0F, 0.0F, 0.0F}}; builder.addNode(item); fliped.insert(it.Position()); } } // if there are no flipped triangles -> stop - //int f =fliped.size(); - if (fliped.empty()) + // int f =fliped.size(); + if (fliped.empty()) { break; + } - for(FacetIndex It : fliped) + for (FacetIndex It : fliped) { alg.CollapseFacet(It); + } fliped.clear(); } @@ -955,7 +989,7 @@ void MeshObject::offsetSpecial2(float fSize) // search for intersected facets MeshCore::MeshEvalSelfIntersection eval(_kernel); - std::vector > faces; + std::vector> faces; eval.GetIntersections(faces); builder.saveToLog(); } @@ -966,15 +1000,16 @@ void MeshObject::offsetSpecial(float fSize, float zmax, float zmin) unsigned int i = 0; // go through all the vertex normals - for (std::vector::iterator It= normals.begin();It != normals.end();++It,i++) { + for (std::vector::iterator It = normals.begin(); It != normals.end(); + ++It, i++) { Base::Vector3f Pnt = _kernel.GetPoint(i); if (Pnt.z < zmax && Pnt.z > zmin) { Pnt.z = 0; - _kernel.MovePoint(i,Pnt.Normalize() * fSize); + _kernel.MovePoint(i, Pnt.Normalize() * fSize); } else { // and move each mesh point in the normal direction - _kernel.MovePoint(i,It->Normalize() * fSize); + _kernel.MovePoint(i, It->Normalize() * fSize); } } } @@ -1054,15 +1089,17 @@ std::vector MeshObject::getPointNormals() const return normals; } -void MeshObject::crossSections(const std::vector& planes, std::vector §ions, - float fMinEps, bool bConnectPolygons) const +void MeshObject::crossSections(const std::vector& planes, + std::vector& sections, + float fMinEps, + bool bConnectPolygons) const { MeshCore::MeshKernel kernel(this->_kernel); kernel.Transform(this->_Mtrx); MeshCore::MeshFacetGrid grid(kernel); MeshCore::MeshAlgorithm algo(kernel); - for (const auto & plane : planes) { + for (const auto& plane : planes) { MeshObject::TPolylines polylines; algo.CutWithPlane(plane.first, plane.second, grid, polylines, fMinEps, bConnectPolygons); sections.push_back(polylines); @@ -1070,7 +1107,8 @@ void MeshObject::crossSections(const std::vector& planes, st } void MeshObject::cut(const Base::Polygon2d& polygon2d, - const Base::ViewProjMethod& proj, MeshObject::CutType type) + const Base::ViewProjMethod& proj, + MeshObject::CutType type) { MeshCore::MeshKernel kernel(this->_kernel); kernel.Transform(getTransform()); @@ -1080,25 +1118,27 @@ void MeshObject::cut(const Base::Polygon2d& polygon2d, bool inner; switch (type) { - case INNER: - inner = true; - break; - case OUTER: - inner = false; - break; - default: - inner = true; - break; + case INNER: + inner = true; + break; + case OUTER: + inner = false; + break; + default: + inner = true; + break; } MeshCore::MeshFacetGrid meshGrid(kernel); meshAlg.CheckFacets(meshGrid, &proj, polygon2d, inner, check); - if (!check.empty()) + if (!check.empty()) { this->deleteFacets(check); + } } void MeshObject::trim(const Base::Polygon2d& polygon2d, - const Base::ViewProjMethod& proj, MeshObject::CutType type) + const Base::ViewProjMethod& proj, + MeshObject::CutType type) { MeshCore::MeshKernel kernel(this->_kernel); kernel.Transform(getTransform()); @@ -1108,26 +1148,28 @@ void MeshObject::trim(const Base::Polygon2d& polygon2d, std::vector triangle; switch (type) { - case INNER: - trim.SetInnerOrOuter(MeshCore::MeshTrimming::INNER); - break; - case OUTER: - trim.SetInnerOrOuter(MeshCore::MeshTrimming::OUTER); - break; + case INNER: + trim.SetInnerOrOuter(MeshCore::MeshTrimming::INNER); + break; + case OUTER: + trim.SetInnerOrOuter(MeshCore::MeshTrimming::OUTER); + break; } MeshCore::MeshFacetGrid meshGrid(kernel); trim.CheckFacets(meshGrid, check); trim.TrimFacets(check, triangle); - if (!check.empty()) + if (!check.empty()) { this->deleteFacets(check); + } // Re-add some triangles if (!triangle.empty()) { Base::Matrix4D mat(getTransform()); mat.inverse(); - for (auto& it : triangle) + for (auto& it : triangle) { it.Transform(mat); + } this->_kernel.AddFacets(triangle); } } @@ -1149,10 +1191,12 @@ void MeshObject::trimByPlane(const Base::Vector3f& base, const Base::Vector3f& n MeshCore::MeshFacetGrid meshGrid(this->_kernel); trim.CheckFacets(meshGrid, basePlane, normalPlane, trimFacets, removeFacets); trim.TrimFacets(trimFacets, basePlane, normalPlane, triangle); - if (!removeFacets.empty()) + if (!removeFacets.empty()) { this->deleteFacets(removeFacets); - if (!triangle.empty()) + } + if (!triangle.empty()) { this->_kernel.AddFacets(triangle); + } } MeshObject* MeshObject::unite(const MeshObject& mesh) const @@ -1162,8 +1206,11 @@ MeshObject* MeshObject::unite(const MeshObject& mesh) const kernel1.Transform(this->_Mtrx); MeshCore::MeshKernel kernel2(mesh._kernel); kernel2.Transform(mesh._Mtrx); - MeshCore::SetOperations setOp(kernel1, kernel2, result, - MeshCore::SetOperations::Union, Epsilon); + MeshCore::SetOperations setOp(kernel1, + kernel2, + result, + MeshCore::SetOperations::Union, + Epsilon); setOp.Do(); return new MeshObject(result); } @@ -1175,8 +1222,11 @@ MeshObject* MeshObject::intersect(const MeshObject& mesh) const kernel1.Transform(this->_Mtrx); MeshCore::MeshKernel kernel2(mesh._kernel); kernel2.Transform(mesh._Mtrx); - MeshCore::SetOperations setOp(kernel1, kernel2, result, - MeshCore::SetOperations::Intersect, Epsilon); + MeshCore::SetOperations setOp(kernel1, + kernel2, + result, + MeshCore::SetOperations::Intersect, + Epsilon); setOp.Do(); return new MeshObject(result); } @@ -1188,8 +1238,11 @@ MeshObject* MeshObject::subtract(const MeshObject& mesh) const kernel1.Transform(this->_Mtrx); MeshCore::MeshKernel kernel2(mesh._kernel); kernel2.Transform(mesh._Mtrx); - MeshCore::SetOperations setOp(kernel1, kernel2, result, - MeshCore::SetOperations::Difference, Epsilon); + MeshCore::SetOperations setOp(kernel1, + kernel2, + result, + MeshCore::SetOperations::Difference, + Epsilon); setOp.Do(); return new MeshObject(result); } @@ -1201,8 +1254,11 @@ MeshObject* MeshObject::inner(const MeshObject& mesh) const kernel1.Transform(this->_Mtrx); MeshCore::MeshKernel kernel2(mesh._kernel); kernel2.Transform(mesh._Mtrx); - MeshCore::SetOperations setOp(kernel1, kernel2, result, - MeshCore::SetOperations::Inner, Epsilon); + MeshCore::SetOperations setOp(kernel1, + kernel2, + result, + MeshCore::SetOperations::Inner, + Epsilon); setOp.Do(); return new MeshObject(result); } @@ -1214,20 +1270,23 @@ MeshObject* MeshObject::outer(const MeshObject& mesh) const kernel1.Transform(this->_Mtrx); MeshCore::MeshKernel kernel2(mesh._kernel); kernel2.Transform(mesh._Mtrx); - MeshCore::SetOperations setOp(kernel1, kernel2, result, - MeshCore::SetOperations::Outer, Epsilon); + MeshCore::SetOperations setOp(kernel1, + kernel2, + result, + MeshCore::SetOperations::Outer, + Epsilon); setOp.Do(); return new MeshObject(result); } -std::vector< std::vector > +std::vector> MeshObject::section(const MeshObject& mesh, bool connectLines, float fMinDist) const { MeshCore::MeshKernel kernel1(this->_kernel); kernel1.Transform(this->_Mtrx); MeshCore::MeshKernel kernel2(mesh._kernel); kernel2.Transform(mesh._Mtrx); - std::vector< std::vector > lines; + std::vector> lines; MeshCore::MeshIntersection sec(kernel1, kernel2, fMinDist); std::list tuple; @@ -1242,15 +1301,16 @@ MeshObject::section(const MeshObject& mesh, bool connectLines, float fMinDist) c } } else { - std::list< std::list > triple; + std::list> triple; sec.connectLines(false, tuple, triple); for (const auto& it : triple) { std::vector curve; curve.reserve(it.size()); - for (const auto& jt : it) + for (const auto& jt : it) { curve.push_back(jt.p); + } lines.push_back(curve); } } @@ -1265,10 +1325,11 @@ void MeshObject::refine() MeshCore::MeshTopoAlgorithm topalg(_kernel); // x < 30 deg => cos(x) > sqrt(3)/2 or x > 120 deg => cos(x) < -0.5 - for (unsigned long i=0; iIsDeformed(0.86f, -0.5f)) + if (!cF->IsDeformed(0.86f, -0.5f)) { topalg.InsertVertexAndSwapEdge(i, cF->GetGravityPoint(), 0.1f); + } } // clear the segments because we don't know how the new @@ -1281,8 +1342,9 @@ void MeshObject::removeNeedles(float length) unsigned long count = _kernel.CountFacets(); MeshCore::MeshRemoveNeedles eval(_kernel, length); eval.Fixup(); - if (_kernel.CountFacets() < count) + if (_kernel.CountFacets() < count) { this->_segments.clear(); + } } void MeshObject::validateCaps(float fMaxAngle, float fSplitFactor) @@ -1294,10 +1356,12 @@ void MeshObject::validateCaps(float fMaxAngle, float fSplitFactor) void MeshObject::optimizeTopology(float fMaxAngle) { MeshCore::MeshTopoAlgorithm topalg(_kernel); - if (fMaxAngle > 0.0f) + if (fMaxAngle > 0.0f) { topalg.OptimizeTopology(fMaxAngle); - else + } + else { topalg.OptimizeTopology(); + } // clear the segments because we don't know how the new // topology looks like @@ -1312,27 +1376,29 @@ void MeshObject::optimizeEdges() void MeshObject::splitEdges() { - std::vector > adjacentFacet; + std::vector> adjacentFacet; MeshCore::MeshAlgorithm alg(_kernel); alg.ResetFacetFlag(MeshCore::MeshFacet::VISIT); const MeshCore::MeshFacetArray& rFacets = _kernel.GetFacets(); - for (MeshCore::MeshFacetArray::_TConstIterator pF = rFacets.begin(); pF != rFacets.end(); ++pF) { - int id=2; + for (MeshCore::MeshFacetArray::_TConstIterator pF = rFacets.begin(); pF != rFacets.end(); + ++pF) { + int id = 2; if (pF->_aulNeighbours[id] != MeshCore::FACET_INDEX_MAX) { const MeshCore::MeshFacet& rFace = rFacets[pF->_aulNeighbours[id]]; - if (!pF->IsFlag(MeshCore::MeshFacet::VISIT) && !rFace.IsFlag(MeshCore::MeshFacet::VISIT)) { + if (!pF->IsFlag(MeshCore::MeshFacet::VISIT) + && !rFace.IsFlag(MeshCore::MeshFacet::VISIT)) { pF->SetFlag(MeshCore::MeshFacet::VISIT); rFace.SetFlag(MeshCore::MeshFacet::VISIT); - adjacentFacet.emplace_back(pF-rFacets.begin(), pF->_aulNeighbours[id]); + adjacentFacet.emplace_back(pF - rFacets.begin(), pF->_aulNeighbours[id]); } } } MeshCore::MeshFacetIterator cIter(_kernel); MeshCore::MeshTopoAlgorithm topalg(_kernel); - for (const auto & it : adjacentFacet) { + for (const auto& it : adjacentFacet) { cIter.Set(it.first); - Base::Vector3f mid = 0.5f*(cIter->_aclPoints[0]+cIter->_aclPoints[2]); + Base::Vector3f mid = 0.5f * (cIter->_aclPoints[0] + cIter->_aclPoints[2]); topalg.SplitEdge(it.first, it.second, mid); } @@ -1461,7 +1527,8 @@ MeshObject::TFacePairs MeshObject::getSelfIntersections() const return pairs; } -std::vector MeshObject::getSelfIntersections(const MeshObject::TFacePairs& facets) const +std::vector +MeshObject::getSelfIntersections(const MeshObject::TFacePairs& facets) const { MeshCore::MeshEvalSelfIntersection eval(getKernel()); using Section = std::pair; @@ -1472,16 +1539,19 @@ std::vector MeshObject::getSelfIntersections(const MeshObject::TFa lines.reserve(selfPoints.size()); Base::Matrix4D mat(getTransform()); - std::transform(selfPoints.begin(), selfPoints.end(), std::back_inserter(lines), [&mat](const Section& l){ - return Base::Line3d(mat * Base::convertTo(l.first), - mat * Base::convertTo(l.second)); - }); + std::transform(selfPoints.begin(), + selfPoints.end(), + std::back_inserter(lines), + [&mat](const Section& l) { + return Base::Line3d(mat * Base::convertTo(l.first), + mat * Base::convertTo(l.second)); + }); return lines; } void MeshObject::removeSelfIntersections() { - std::vector > selfIntersections; + std::vector> selfIntersections; MeshCore::MeshEvalSelfIntersection cMeshEval(_kernel); cMeshEval.GetIntersections(selfIntersections); @@ -1494,19 +1564,26 @@ void MeshObject::removeSelfIntersections() void MeshObject::removeSelfIntersections(const std::vector& indices) { // make sure that the number of indices is even and are in range - if (indices.size() % 2 != 0) + if (indices.size() % 2 != 0) { return; + } unsigned long cntfacets = _kernel.CountFacets(); - if (std::find_if(indices.begin(), indices.end(), [cntfacets](FacetIndex v) { - return v >= cntfacets; - }) < indices.end()) + if (std::find_if(indices.begin(), + indices.end(), + [cntfacets](FacetIndex v) { + return v >= cntfacets; + }) + < indices.end()) { return; - std::vector > selfIntersections; + } + std::vector> selfIntersections; std::vector::const_iterator it; - for (it = indices.begin(); it != indices.end(); ) { - FacetIndex id1 = *it; ++it; - FacetIndex id2 = *it; ++it; - selfIntersections.emplace_back(id1,id2); + for (it = indices.begin(); it != indices.end();) { + FacetIndex id1 = *it; + ++it; + FacetIndex id2 = *it; + ++it; + selfIntersections.emplace_back(id1, id2); } if (!selfIntersections.empty()) { @@ -1523,7 +1600,7 @@ void MeshObject::removeFoldsOnSurface() MeshCore::MeshEvalFoldOversOnSurface f_eval(_kernel); f_eval.Evaluate(); - std::vector inds = f_eval.GetIndices(); + std::vector inds = f_eval.GetIndices(); s_eval.Evaluate(); std::vector inds1 = s_eval.GetIndices(); @@ -1533,17 +1610,20 @@ void MeshObject::removeFoldsOnSurface() std::sort(inds.begin(), inds.end()); inds.erase(std::unique(inds.begin(), inds.end()), inds.end()); - if (!inds.empty()) + if (!inds.empty()) { deleteFacets(inds); + } // do this as additional check after removing folds on closed area - for (int i=0; i<5; i++) { + for (int i = 0; i < 5; i++) { MeshCore::MeshEvalFoldsOnBoundary b_eval(_kernel); - if (b_eval.Evaluate()) + if (b_eval.Evaluate()) { break; + } inds = b_eval.GetIndices(); - if (!inds.empty()) + if (!inds.empty()) { deleteFacets(inds); + } } } @@ -1584,8 +1664,9 @@ void MeshObject::mergeFacets() unsigned long count = _kernel.CountFacets(); MeshCore::MeshFixMergeFacets merge(_kernel); merge.Fixup(); - if (_kernel.CountFacets() < count) + if (_kernel.CountFacets() < count) { this->_segments.clear(); + } } void MeshObject::validateIndices() @@ -1615,8 +1696,9 @@ void MeshObject::validateIndices() fix.Fixup(); } - if (_kernel.CountFacets() < count) + if (_kernel.CountFacets() < count) { this->_segments.clear(); + } } bool MeshObject::hasInvalidNeighbourhood() const @@ -1649,10 +1731,12 @@ void MeshObject::validateDeformations(float fMaxAngle, float fEps) MeshCore::MeshFixDeformedFacets eval(_kernel, Base::toRadians(15.0f), Base::toRadians(150.0f), - fMaxAngle, fEps); + fMaxAngle, + fEps); eval.Fixup(); - if (_kernel.CountFacets() < count) + if (_kernel.CountFacets() < count) { this->_segments.clear(); + } } void MeshObject::validateDegenerations(float fEps) @@ -1660,8 +1744,9 @@ void MeshObject::validateDegenerations(float fEps) unsigned long count = _kernel.CountFacets(); MeshCore::MeshFixDegeneratedFacets eval(_kernel, fEps); eval.Fixup(); - if (_kernel.CountFacets() < count) + if (_kernel.CountFacets() < count) { this->_segments.clear(); + } } void MeshObject::removeDuplicatedPoints() @@ -1669,8 +1754,9 @@ void MeshObject::removeDuplicatedPoints() unsigned long count = _kernel.CountFacets(); MeshCore::MeshFixDuplicatePoints eval(_kernel); eval.Fixup(); - if (_kernel.CountFacets() < count) + if (_kernel.CountFacets() < count) { this->_segments.clear(); + } } void MeshObject::removeDuplicatedFacets() @@ -1678,8 +1764,9 @@ void MeshObject::removeDuplicatedFacets() unsigned long count = _kernel.CountFacets(); MeshCore::MeshFixDuplicateFacets eval(_kernel); eval.Fixup(); - if (_kernel.CountFacets() < count) + if (_kernel.CountFacets() < count) { this->_segments.clear(); + } } MeshObject* MeshObject::createMeshFromList(Py::List& list) @@ -1702,7 +1789,7 @@ MeshObject* MeshObject::createMeshFromList(Py::List& list) Base::EmptySequencer seq; std::unique_ptr mesh(new MeshObject); - //mesh->addFacets(facets); + // mesh->addFacets(facets); mesh->getKernel() = facets; return mesh.release(); } @@ -1712,9 +1799,10 @@ MeshObject* MeshObject::createSphere(float radius, int sampling) // load the 'BuildRegularGeoms' module Base::PyGILStateLocker lock; try { - Py::Module module(PyImport_ImportModule("BuildRegularGeoms"),true); - if (module.isNull()) + Py::Module module(PyImport_ImportModule("BuildRegularGeoms"), true); + if (module.isNull()) { return nullptr; + } Py::Dict dict = module.getDict(); Py::Callable call(dict.getItem("Sphere")); Py::Tuple args(2); @@ -1735,9 +1823,10 @@ MeshObject* MeshObject::createEllipsoid(float radius1, float radius2, int sampli // load the 'BuildRegularGeoms' module Base::PyGILStateLocker lock; try { - Py::Module module(PyImport_ImportModule("BuildRegularGeoms"),true); - if (module.isNull()) + Py::Module module(PyImport_ImportModule("BuildRegularGeoms"), true); + if (module.isNull()) { return nullptr; + } Py::Dict dict = module.getDict(); Py::Callable call(dict.getItem("Ellipsoid")); Py::Tuple args(3); @@ -1754,14 +1843,16 @@ MeshObject* MeshObject::createEllipsoid(float radius1, float radius2, int sampli return nullptr; } -MeshObject* MeshObject::createCylinder(float radius, float length, int closed, float edgelen, int sampling) +MeshObject* +MeshObject::createCylinder(float radius, float length, int closed, float edgelen, int sampling) { // load the 'BuildRegularGeoms' module Base::PyGILStateLocker lock; try { - Py::Module module(PyImport_ImportModule("BuildRegularGeoms"),true); - if (module.isNull()) + Py::Module module(PyImport_ImportModule("BuildRegularGeoms"), true); + if (module.isNull()) { return nullptr; + } Py::Dict dict = module.getDict(); Py::Callable call(dict.getItem("Cylinder")); Py::Tuple args(5); @@ -1780,14 +1871,20 @@ MeshObject* MeshObject::createCylinder(float radius, float length, int closed, f return nullptr; } -MeshObject* MeshObject::createCone(float radius1, float radius2, float len, int closed, float edgelen, int sampling) +MeshObject* MeshObject::createCone(float radius1, + float radius2, + float len, + int closed, + float edgelen, + int sampling) { // load the 'BuildRegularGeoms' module Base::PyGILStateLocker lock; try { - Py::Module module(PyImport_ImportModule("BuildRegularGeoms"),true); - if (module.isNull()) + Py::Module module(PyImport_ImportModule("BuildRegularGeoms"), true); + if (module.isNull()) { return nullptr; + } Py::Dict dict = module.getDict(); Py::Callable call(dict.getItem("Cone")); Py::Tuple args(6); @@ -1812,9 +1909,10 @@ MeshObject* MeshObject::createTorus(float radius1, float radius2, int sampling) // load the 'BuildRegularGeoms' module Base::PyGILStateLocker lock; try { - Py::Module module(PyImport_ImportModule("BuildRegularGeoms"),true); - if (module.isNull()) + Py::Module module(PyImport_ImportModule("BuildRegularGeoms"), true); + if (module.isNull()) { return nullptr; + } Py::Dict dict = module.getDict(); Py::Callable call(dict.getItem("Toroid")); Py::Tuple args(3); @@ -1836,9 +1934,10 @@ MeshObject* MeshObject::createCube(float length, float width, float height) // load the 'BuildRegularGeoms' module Base::PyGILStateLocker lock; try { - Py::Module module(PyImport_ImportModule("BuildRegularGeoms"),true); - if (module.isNull()) + Py::Module module(PyImport_ImportModule("BuildRegularGeoms"), true); + if (module.isNull()) { return nullptr; + } Py::Dict dict = module.getDict(); Py::Callable call(dict.getItem("Cube")); Py::Tuple args(3); @@ -1860,9 +1959,10 @@ MeshObject* MeshObject::createCube(float length, float width, float height, floa // load the 'BuildRegularGeoms' module Base::PyGILStateLocker lock; try { - Py::Module module(PyImport_ImportModule("BuildRegularGeoms"),true); - if (module.isNull()) + Py::Module module(PyImport_ImportModule("BuildRegularGeoms"), true); + if (module.isNull()) { return nullptr; + } Py::Dict dict = module.getDict(); Py::Callable call(dict.getItem("FineCube")); Py::Tuple args(4); @@ -1925,11 +2025,12 @@ void MeshObject::addSegment(const std::vector& inds) { unsigned long maxIndex = _kernel.CountFacets(); for (FacetIndex it : inds) { - if (it >= maxIndex) + if (it >= maxIndex) { throw Base::IndexError("Index out of range"); + } } - this->_segments.emplace_back(this,inds,true); + this->_segments.emplace_back(this, inds, true); } const Segment& MeshObject::getSegment(unsigned long index) const @@ -1959,29 +2060,40 @@ MeshObject* MeshObject::meshFromSegment(const std::vector& indices) } std::vector MeshObject::getSegmentsOfType(MeshObject::GeometryType type, - float dev, unsigned long minFacets) const + float dev, + unsigned long minFacets) const { std::vector segm; - if (this->_kernel.CountFacets() == 0) + if (this->_kernel.CountFacets() == 0) { return segm; + } MeshCore::MeshSegmentAlgorithm finder(this->_kernel); std::shared_ptr surf; switch (type) { - case PLANE: - surf.reset(new MeshCore::MeshDistanceGenericSurfaceFitSegment(new MeshCore::PlaneSurfaceFit, - this->_kernel, minFacets, dev)); - break; - case CYLINDER: - surf.reset(new MeshCore::MeshDistanceGenericSurfaceFitSegment(new MeshCore::CylinderSurfaceFit, - this->_kernel, minFacets, dev)); - break; - case SPHERE: - surf.reset(new MeshCore::MeshDistanceGenericSurfaceFitSegment(new MeshCore::SphereSurfaceFit, - this->_kernel, minFacets, dev)); - break; - default: - break; + case PLANE: + surf.reset( + new MeshCore::MeshDistanceGenericSurfaceFitSegment(new MeshCore::PlaneSurfaceFit, + this->_kernel, + minFacets, + dev)); + break; + case CYLINDER: + surf.reset( + new MeshCore::MeshDistanceGenericSurfaceFitSegment(new MeshCore::CylinderSurfaceFit, + this->_kernel, + minFacets, + dev)); + break; + case SPHERE: + surf.reset( + new MeshCore::MeshDistanceGenericSurfaceFitSegment(new MeshCore::SphereSurfaceFit, + this->_kernel, + minFacets, + dev)); + break; + default: + break; } if (surf.get()) { @@ -1990,7 +2102,7 @@ std::vector MeshObject::getSegmentsOfType(MeshObject::GeometryType type finder.FindSegments(surfaces); const std::vector& data = surf->GetSegments(); - for (const auto & it : data) { + for (const auto& it : data) { segm.emplace_back(this, it, false); } } @@ -2001,20 +2113,21 @@ std::vector MeshObject::getSegmentsOfType(MeshObject::GeometryType type // ---------------------------------------------------------------------------- MeshObject::const_point_iterator::const_point_iterator(const MeshObject* mesh, PointIndex index) - : _mesh(mesh), _p_it(mesh->getKernel()) + : _mesh(mesh) + , _p_it(mesh->getKernel()) { this->_p_it.Set(index); this->_p_it.Transform(_mesh->_Mtrx); this->_point.Mesh = _mesh; } -MeshObject::const_point_iterator::const_point_iterator -(const MeshObject::const_point_iterator& fi) = default; +MeshObject::const_point_iterator::const_point_iterator(const MeshObject::const_point_iterator& fi) = + default; MeshObject::const_point_iterator::~const_point_iterator() = default; -MeshObject::const_point_iterator& MeshObject::const_point_iterator::operator= -(const MeshObject::const_point_iterator& pi) = default; +MeshObject::const_point_iterator& +MeshObject::const_point_iterator::operator=(const MeshObject::const_point_iterator& pi) = default; void MeshObject::const_point_iterator::dereference() { @@ -2061,27 +2174,28 @@ MeshObject::const_point_iterator& MeshObject::const_point_iterator::operator--() // ---------------------------------------------------------------------------- MeshObject::const_facet_iterator::const_facet_iterator(const MeshObject* mesh, FacetIndex index) - : _mesh(mesh), _f_it(mesh->getKernel()) + : _mesh(mesh) + , _f_it(mesh->getKernel()) { this->_f_it.Set(index); this->_f_it.Transform(_mesh->_Mtrx); this->_facet.Mesh = _mesh; } -MeshObject::const_facet_iterator::const_facet_iterator -(const MeshObject::const_facet_iterator& fi) = default; +MeshObject::const_facet_iterator::const_facet_iterator(const MeshObject::const_facet_iterator& fi) = + default; MeshObject::const_facet_iterator::~const_facet_iterator() = default; -MeshObject::const_facet_iterator& MeshObject::const_facet_iterator::operator= -(const MeshObject::const_facet_iterator& fi) = default; +MeshObject::const_facet_iterator& +MeshObject::const_facet_iterator::operator=(const MeshObject::const_facet_iterator& fi) = default; void MeshObject::const_facet_iterator::dereference() { - this->_facet.MeshCore::MeshGeomFacet::operator = (*_f_it); + this->_facet.MeshCore::MeshGeomFacet::operator=(*_f_it); this->_facet.Index = _f_it.Position(); const MeshCore::MeshFacet& face = _f_it.GetReference(); - for (int i=0; i<3;i++) { + for (int i = 0; i < 3; i++) { this->_facet.PIndex[i] = face._aulPoints[i]; this->_facet.NIndex[i] = face._aulNeighbours[i]; } diff --git a/src/Mod/Mesh/App/Mesh.h b/src/Mod/Mesh/App/Mesh.h index ccbc5c5398..3e68073de8 100644 --- a/src/Mod/Mesh/App/Mesh.h +++ b/src/Mod/Mesh/App/Mesh.h @@ -44,16 +44,19 @@ #include "Segment.h" -namespace Py { +namespace Py +{ class List; } -namespace Base { - class Polygon2d; - class ViewProjMethod; -} +namespace Base +{ +class Polygon2d; +class ViewProjMethod; +} // namespace Base -namespace MeshCore { +namespace MeshCore +{ class AbstractPolygonTriangulator; } @@ -61,12 +64,13 @@ namespace Mesh { class MeshObject; -class MeshExport MeshSegment : public Data::Segment +class MeshExport MeshSegment: public Data::Segment { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - std::string getName() const override { + std::string getName() const override + { return "MeshSegment"; } @@ -80,30 +84,39 @@ public: * @note Each instance of MeshObject has its own instance of a MeshKernel so it's not possible * that several instances of MeshObject manage one instance of MeshKernel. */ -class MeshExport MeshObject : public Data::ComplexGeoData +class MeshExport MeshObject: public Data::ComplexGeoData { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - enum GeometryType {PLANE, CYLINDER, SPHERE}; - enum CutType {INNER, OUTER}; + enum GeometryType + { + PLANE, + CYLINDER, + SPHERE + }; + enum CutType + { + INNER, + OUTER + }; using TFacePair = std::pair; using TFacePairs = std::vector; // type def needed for cross-section - using TPlane = std::pair; + using TPlane = std::pair; using TPolylines = std::list>; using TRay = std::pair; using TFaceSection = std::pair; MeshObject(); explicit MeshObject(const MeshCore::MeshKernel& Kernel); - explicit MeshObject(const MeshCore::MeshKernel& Kernel, const Base::Matrix4D &Mtrx); + explicit MeshObject(const MeshCore::MeshKernel& Kernel, const Base::Matrix4D& Mtrx); MeshObject(const MeshObject&); ~MeshObject() override; - void operator = (const MeshObject&); + void operator=(const MeshObject&); /** @name Subelement management */ //@{ @@ -116,16 +129,15 @@ public: /// get the subelement by type and number Data::Segment* getSubElement(const char* Type, unsigned long) const override; /** Get faces from segment */ - void getFacesFromSubElement( - const Data::Segment*, - std::vector &Points, - std::vector &PointNormals, - std::vector &faces) const override; + void getFacesFromSubElement(const Data::Segment*, + std::vector& Points, + std::vector& PointNormals, + std::vector& faces) const override; //@} void setTransform(const Base::Matrix4D& rclTrf) override; Base::Matrix4D getTransform() const override; - void transformGeometry(const Base::Matrix4D &rclMat) override; + void transformGeometry(const Base::Matrix4D& rclMat) override; /** * Swaps the content of \a Kernel and the internal mesh kernel. @@ -139,7 +151,7 @@ public: std::string topologyInfo() const; unsigned long countPoints() const; unsigned long countFacets() const; - unsigned long countEdges () const; + unsigned long countEdges() const; unsigned long countSegments() const; bool isSolid() const; Base::Vector3d getPoint(PointIndex) const; @@ -148,11 +160,14 @@ public: double getSurface() const; double getVolume() const; /** Get points from object with given accuracy */ - void getPoints(std::vector &Points, - std::vector &Normals, - double Accuracy, uint16_t flags=0) const override; - void getFaces(std::vector &Points,std::vector &Topo, - double Accuracy, uint16_t flags=0) const override; + void getPoints(std::vector& Points, + std::vector& Normals, + double Accuracy, + uint16_t flags = 0) const override; + void getFaces(std::vector& Points, + std::vector& Topo, + double Accuracy, + uint16_t flags = 0) const override; std::vector getPointsFromFacets(const std::vector& facets) const; bool nearestFacetOnRay(const TRay& ray, double maxAngle, TFaceSection& output) const; std::vector foraminate(const TRay& ray, double maxAngle) const; @@ -160,9 +175,13 @@ public: void setKernel(const MeshCore::MeshKernel& m); MeshCore::MeshKernel& getKernel() - { return _kernel; } + { + return _kernel; + } const MeshCore::MeshKernel& getKernel() const - { return _kernel; } + { + return _kernel; + } Base::BoundBox3d getBoundBox() const override; bool getCenterOfGravity(Base::Vector3d& center) const override; @@ -170,39 +189,40 @@ public: /** @name I/O */ //@{ // Implemented from Persistence - unsigned int getMemSize () const override; - void Save (Base::Writer &writer) const override; - void SaveDocFile (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; - void RestoreDocFile(Base::Reader &reader) override; - void save(const char* file,MeshCore::MeshIO::Format f=MeshCore::MeshIO::Undefined, - const MeshCore::Material* mat = nullptr, - const char* objectname = nullptr) const; - void save(std::ostream&,MeshCore::MeshIO::Format f, - const MeshCore::Material* mat = nullptr, - const char* objectname = nullptr) const; + unsigned int getMemSize() const override; + void Save(Base::Writer& writer) const override; + void SaveDocFile(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; + void RestoreDocFile(Base::Reader& reader) override; + void save(const char* file, + MeshCore::MeshIO::Format f = MeshCore::MeshIO::Undefined, + const MeshCore::Material* mat = nullptr, + const char* objectname = nullptr) const; + void save(std::ostream&, + MeshCore::MeshIO::Format f, + const MeshCore::Material* mat = nullptr, + const char* objectname = nullptr) const; bool load(const char* file, MeshCore::Material* mat = nullptr); bool load(std::istream&, MeshCore::MeshIO::Format f, MeshCore::Material* mat = nullptr); // Save and load in internal format void save(std::ostream&) const; void load(std::istream&); - void writeInventor(std::ostream& str, float creaseangle=0.0f) const; + void writeInventor(std::ostream& str, float creaseangle = 0.0f) const; //@} /** @name Manipulation */ //@{ void addFacet(const MeshCore::MeshGeomFacet& facet); void addFacets(const std::vector& facets); - void addFacets(const std::vector &facets, - bool checkManifolds); - void addFacets(const std::vector &facets, + void addFacets(const std::vector& facets, bool checkManifolds); + void addFacets(const std::vector& facets, const std::vector& points, bool checkManifolds); - void addFacets(const std::vector &facets, + void addFacets(const std::vector& facets, const std::vector& points, bool checkManifolds); void setFacets(const std::vector& facets); - void setFacets(const std::vector &facets, + void setFacets(const std::vector& facets, const std::vector& points); /** * Combines two independent mesh objects. @@ -218,7 +238,7 @@ public: void addMesh(const MeshCore::MeshKernel&); void deleteFacets(const std::vector& removeIndices); void deletePoints(const std::vector& removeIndices); - std::vector > getComponents() const; + std::vector> getComponents() const; unsigned long countComponents() const; void removeComponents(unsigned long); /** @@ -228,7 +248,7 @@ public: * gives the number of points which will have a degree of zero. */ unsigned long getPointDegree(const std::vector& facets, - std::vector& point_degree) const; + std::vector& point_degree) const; void fillupHoles(unsigned long, int, MeshCore::AbstractPolygonTriangulator&); void offset(float fSize); void offsetSpecial2(float fSize); @@ -244,8 +264,10 @@ public: void decimate(int targetSize); Base::Vector3d getPointNormal(PointIndex) const; std::vector getPointNormals() const; - void crossSections(const std::vector&, std::vector §ions, - float fMinEps = 1.0e-2f, bool bConnectPolygons = false) const; + void crossSections(const std::vector&, + std::vector& sections, + float fMinEps = 1.0e-2f, + bool bConnectPolygons = false) const; void cut(const Base::Polygon2d& polygon, const Base::ViewProjMethod& proj, CutType); void trim(const Base::Polygon2d& polygon, const Base::ViewProjMethod& proj, CutType); void trimByPlane(const Base::Vector3f& base, const Base::Vector3f& normal); @@ -276,7 +298,8 @@ public: MeshObject* subtract(const MeshObject&) const; MeshObject* inner(const MeshObject&) const; MeshObject* outer(const MeshObject&) const; - std::vector< std::vector > section(const MeshObject&, bool connectLines, float fMinDist) const; + std::vector> + section(const MeshObject&, bool connectLines, float fMinDist) const; //@} /** @name Topological operations */ @@ -366,6 +389,7 @@ public: bool operator!=(const const_point_iterator& fi) const; const_point_iterator& operator++(); const_point_iterator& operator--(); + private: void dereference(); const MeshObject* _mesh; @@ -387,6 +411,7 @@ public: bool operator!=(const const_facet_iterator& fi) const; const_facet_iterator& operator++(); const_facet_iterator& operator--(); + private: void dereference(); const MeshObject* _mesh; @@ -397,20 +422,32 @@ public: /** @name Iterator */ //@{ const_point_iterator points_begin() const - { return {this, 0}; } + { + return {this, 0}; + } const_point_iterator points_end() const - { return {this, countPoints()}; } + { + return {this, countPoints()}; + } const_facet_iterator facets_begin() const - { return {this, 0}; } + { + return {this, 0}; + } const_facet_iterator facets_end() const - { return {this, countFacets()}; } + { + return {this, countFacets()}; + } using const_segment_iterator = std::vector::const_iterator; const_segment_iterator segments_begin() const - { return _segments.begin(); } + { + return _segments.begin(); + } const_segment_iterator segments_end() const - { return _segments.end(); } + { + return _segments.end(); + } //@} // friends @@ -431,7 +468,7 @@ private: static const float Epsilon; }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_MESH_H +#endif // MESH_MESH_H diff --git a/src/Mod/Mesh/App/MeshFeature.cpp b/src/Mod/Mesh/App/MeshFeature.cpp index c96a289ff8..e09b337304 100644 --- a/src/Mod/Mesh/App/MeshFeature.cpp +++ b/src/Mod/Mesh/App/MeshFeature.cpp @@ -39,20 +39,20 @@ PROPERTY_SOURCE(Mesh::Feature, App::GeoFeature) Feature::Feature() { - ADD_PROPERTY_TYPE(Mesh,(MeshObject()),0,App::Prop_Output,"The mesh kernel"); + ADD_PROPERTY_TYPE(Mesh, (MeshObject()), 0, App::Prop_Output, "The mesh kernel"); } -App::DocumentObjectExecReturn *Feature::execute() +App::DocumentObjectExecReturn* Feature::execute() { this->Mesh.touch(); return App::DocumentObject::StdReturn; } -PyObject *Feature::getPyObject() +PyObject* Feature::getPyObject() { - if(PythonObject.is(Py::_None())){ + if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new MeshFeaturePy(this),true); + PythonObject = Py::Object(new MeshFeaturePy(this), true); } return Py::new_reference_to(PythonObject); } @@ -68,8 +68,9 @@ void Feature::onChanged(const App::Property* prop) try { Base::Placement p; p.fromMatrix(this->Mesh.getTransform()); - if (p != this->Placement.getValue()) + if (p != this->Placement.getValue()) { this->Placement.setValue(p); + } } catch (const Base::ValueError&) { } @@ -86,27 +87,33 @@ void Feature::onChanged(const App::Property* prop) // --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Mesh::FeatureCustom, Mesh::Feature) /// @endcond // explicit template instantiation template class MeshExport FeatureCustomT; -} +} // namespace App // --------------------------------------------------------- -namespace App { +namespace App +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(Mesh::FeaturePython, Mesh::Feature) -template<> const char* Mesh::FeaturePython::getViewProviderName() const { +template<> +const char* Mesh::FeaturePython::getViewProviderName() const +{ return "MeshGui::ViewProviderPython"; } -template<> PyObject* Mesh::FeaturePython::getPyObject() { +template<> +PyObject* Mesh::FeaturePython::getPyObject() +{ if (PythonObject.is(Py::_None())) { // ref counter is set to 1 - PythonObject = Py::Object(new FeaturePythonPyT(this),true); + PythonObject = Py::Object(new FeaturePythonPyT(this), true); } return Py::new_reference_to(PythonObject); } @@ -114,5 +121,4 @@ template<> PyObject* Mesh::FeaturePython::getPyObject() { // explicit template instantiation template class MeshExport FeaturePythonT; -} - +} // namespace App diff --git a/src/Mod/Mesh/App/MeshFeature.h b/src/Mod/Mesh/App/MeshFeature.h index 6653454039..8017e4271d 100644 --- a/src/Mod/Mesh/App/MeshFeature.h +++ b/src/Mod/Mesh/App/MeshFeature.h @@ -23,9 +23,9 @@ #ifndef MESH_FEATURE_H #define MESH_FEATURE_H -#include // must be before FeatureCustom.h #include #include +#include // must be before FeatureCustom.h #include "Core/MeshKernel.h" @@ -33,13 +33,15 @@ #include "MeshProperties.h" -namespace Base{ - class XMLReader; - class Writer; -} +namespace Base +{ +class XMLReader; +class Writer; +} // namespace Base -namespace MeshCore { - class MeshKernel; +namespace MeshCore +{ +class MeshKernel; } namespace Mesh @@ -52,7 +54,7 @@ class MeshFeaturePy; * This class holds a MeshKernel object. * \author Werner Mayer */ -class MeshExport Feature : public App::GeoFeature +class MeshExport Feature: public App::GeoFeature { PROPERTY_HEADER_WITH_OVERRIDE(Mesh::Feature); @@ -69,15 +71,17 @@ public: /** @name methods override Feature */ //@{ /// recalculate the Feature - App::DocumentObjectExecReturn *execute() override; + App::DocumentObjectExecReturn* execute() override; void onChanged(const App::Property* prop) override; //@} /// returns the type name of the ViewProvider - const char* getViewProviderName() const override { + const char* getViewProviderName() const override + { return "MeshGui::ViewProviderMeshFaceSet"; } - const App::PropertyComplexGeoData* getPropertyOfGeometry() const override { + const App::PropertyComplexGeoData* getPropertyOfGeometry() const override + { return &Mesh; } @@ -88,8 +92,7 @@ public: using FeatureCustom = App::FeatureCustomT; using FeaturePython = App::FeaturePythonT; -} //namespace Mesh - +} // namespace Mesh #endif diff --git a/src/Mod/Mesh/App/MeshFeaturePyImp.cpp b/src/Mod/Mesh/App/MeshFeaturePyImp.cpp index ad5025113f..8f02291db2 100644 --- a/src/Mod/Mesh/App/MeshFeaturePyImp.cpp +++ b/src/Mod/Mesh/App/MeshFeaturePyImp.cpp @@ -24,9 +24,11 @@ #include "MeshFeature.h" // inclusion of the generated files (generated out of MeshFeaturePy.xml) +// clang-format off #include #include #include +// clang-format on using namespace Mesh; @@ -41,51 +43,58 @@ std::string MeshFeaturePy::representation() const return str.str(); } -PyObject* MeshFeaturePy::countPoints(PyObject * /*args*/) +PyObject* MeshFeaturePy::countPoints(PyObject* /*args*/) { - return Py_BuildValue("i",getFeaturePtr()->Mesh.getValue().countPoints()); + return Py_BuildValue("i", getFeaturePtr()->Mesh.getValue().countPoints()); } -PyObject* MeshFeaturePy::countFacets(PyObject * /*args*/) +PyObject* MeshFeaturePy::countFacets(PyObject* /*args*/) { - return Py_BuildValue("i",getFeaturePtr()->Mesh.getValue().countFacets()); + return Py_BuildValue("i", getFeaturePtr()->Mesh.getValue().countFacets()); } -PyObject* MeshFeaturePy::harmonizeNormals(PyObject *args) +PyObject* MeshFeaturePy::harmonizeNormals(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { - Mesh::MeshObject *mesh = getFeaturePtr()->Mesh.startEditing(); + PY_TRY + { + Mesh::MeshObject* mesh = getFeaturePtr()->Mesh.startEditing(); mesh->harmonizeNormals(); getFeaturePtr()->Mesh.finishEditing(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshFeaturePy::smooth(PyObject *args) +PyObject* MeshFeaturePy::smooth(PyObject* args) { - int iter=1; - float d_max=FLOAT_MAX; - if (!PyArg_ParseTuple(args, "|if", &iter,&d_max)) + int iter = 1; + float d_max = FLOAT_MAX; + if (!PyArg_ParseTuple(args, "|if", &iter, &d_max)) { return nullptr; + } - PY_TRY { + PY_TRY + { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); kernel->smooth(iter, d_max); obj->Mesh.finishEditing(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshFeaturePy::removeNonManifolds(PyObject *args) +PyObject* MeshFeaturePy::removeNonManifolds(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); kernel->removeNonManifolds(); @@ -93,10 +102,11 @@ PyObject* MeshFeaturePy::removeNonManifolds(PyObject *args) Py_Return; } -PyObject* MeshFeaturePy::removeNonManifoldPoints(PyObject *args) +PyObject* MeshFeaturePy::removeNonManifoldPoints(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); kernel->removeNonManifoldPoints(); @@ -104,71 +114,84 @@ PyObject* MeshFeaturePy::removeNonManifoldPoints(PyObject *args) Py_Return; } -PyObject* MeshFeaturePy::fixIndices(PyObject *args) +PyObject* MeshFeaturePy::fixIndices(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); kernel->validateIndices(); obj->Mesh.finishEditing(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshFeaturePy::fixDegenerations(PyObject *args) +PyObject* MeshFeaturePy::fixDegenerations(PyObject* args) { float fEpsilon = MeshCore::MeshDefinitions::_fMinPointDistanceP2; - if (!PyArg_ParseTuple(args, "|f", &fEpsilon)) + if (!PyArg_ParseTuple(args, "|f", &fEpsilon)) { return nullptr; + } - PY_TRY { + PY_TRY + { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); kernel->validateDegenerations(fEpsilon); obj->Mesh.finishEditing(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshFeaturePy::removeDuplicatedFacets(PyObject *args) +PyObject* MeshFeaturePy::removeDuplicatedFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); kernel->removeDuplicatedFacets(); obj->Mesh.finishEditing(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshFeaturePy::removeDuplicatedPoints(PyObject *args) +PyObject* MeshFeaturePy::removeDuplicatedPoints(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); kernel->removeDuplicatedPoints(); obj->Mesh.finishEditing(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshFeaturePy::fixSelfIntersections(PyObject *args) +PyObject* MeshFeaturePy::fixSelfIntersections(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); @@ -182,10 +205,11 @@ PyObject* MeshFeaturePy::fixSelfIntersections(PyObject *args) Py_Return; } -PyObject* MeshFeaturePy::removeFoldsOnSurface(PyObject *args) +PyObject* MeshFeaturePy::removeFoldsOnSurface(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); @@ -199,10 +223,11 @@ PyObject* MeshFeaturePy::removeFoldsOnSurface(PyObject *args) Py_Return; } -PyObject* MeshFeaturePy::removeInvalidPoints(PyObject *args) +PyObject* MeshFeaturePy::removeInvalidPoints(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { Mesh::Feature* obj = getFeaturePtr(); MeshObject* kernel = obj->Mesh.startEditing(); @@ -216,7 +241,7 @@ PyObject* MeshFeaturePy::removeInvalidPoints(PyObject *args) Py_Return; } -PyObject *MeshFeaturePy::getCustomAttributes(const char* /*attr*/) const +PyObject* MeshFeaturePy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Mesh/App/MeshPoint.h b/src/Mod/Mesh/App/MeshPoint.h index a2d2372ede..5580237004 100644 --- a/src/Mod/Mesh/App/MeshPoint.h +++ b/src/Mod/Mesh/App/MeshPoint.h @@ -28,7 +28,7 @@ #include #ifndef MESH_GLOBAL_H -# include +#include #endif using Base::Vector3d; @@ -43,22 +43,29 @@ class MeshObject; * convenient access to the Mesh data structure. This class should not be used for * programming algorithms in C++. Use Mesh Core classes instead! */ -class MeshExport MeshPoint : public Vector3d +class MeshExport MeshPoint: public Vector3d { public: /// simple constructor - explicit MeshPoint(const Vector3d& vec = Vector3d(), const MeshObject* obj = nullptr, unsigned int index = UINT_MAX) - :Vector3d(vec),Index(index),Mesh(obj) + explicit MeshPoint(const Vector3d& vec = Vector3d(), + const MeshObject* obj = nullptr, + unsigned int index = UINT_MAX) + : Vector3d(vec) + , Index(index) + , Mesh(obj) {} - bool isBound() const {return Index != UINT_MAX;} + bool isBound() const + { + return Index != UINT_MAX; + } unsigned int Index; Base::Reference Mesh; }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_MESHPOINT_H +#endif // MESH_MESHPOINT_H diff --git a/src/Mod/Mesh/App/MeshPointPyImp.cpp b/src/Mod/Mesh/App/MeshPointPyImp.cpp index 4c0d2d2b88..966483c7f3 100644 --- a/src/Mod/Mesh/App/MeshPointPyImp.cpp +++ b/src/Mod/Mesh/App/MeshPointPyImp.cpp @@ -22,15 +22,17 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include #include "Mesh.h" #include "MeshPoint.h" +// clang-format off #include "MeshPointPy.h" #include "MeshPointPy.cpp" +// clang-format on using namespace Mesh; @@ -45,7 +47,8 @@ std::string MeshPointPy::representation() const str << "MeshPoint ("; if (ptr->isBound()) { if (getMeshPointPtr()->Mesh->countPoints() <= getMeshPointPtr()->Index) { - str << vec.x << ", " << vec.y << ", " << vec.z << ", Idx=" << ptr->Index << " (Out of range)"; + str << vec.x << ", " << vec.y << ", " << vec.z << ", Idx=" << ptr->Index + << " (Out of range)"; } else { vec = getMeshPointPtr()->Mesh->getPoint(getMeshPointPtr()->Index); @@ -60,7 +63,7 @@ std::string MeshPointPy::representation() const return str.str(); } -PyObject *MeshPointPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* MeshPointPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of MeshPointPy and the Twin object return new MeshPointPy(new MeshPoint); @@ -69,18 +72,20 @@ PyObject *MeshPointPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // // constructor method int MeshPointPy::PyInit(PyObject* args, PyObject* /*kwds*/) { - double x=0.0,y=0.0,z=0.0; - if (!PyArg_ParseTuple(args, "|ddd", &x,&y,&z)) + double x = 0.0, y = 0.0, z = 0.0; + if (!PyArg_ParseTuple(args, "|ddd", &x, &y, &z)) { return -1; + } - getMeshPointPtr()->Set(x,y,z); + getMeshPointPtr()->Set(x, y, z); return 0; } -PyObject* MeshPointPy::unbound(PyObject *args) +PyObject* MeshPointPy::unbound(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getMeshPointPtr()->Index = UINT_MAX; getMeshPointPtr()->Mesh = nullptr; Py_Return; @@ -88,7 +93,7 @@ PyObject* MeshPointPy::unbound(PyObject *args) Py::Long MeshPointPy::getIndex() const { - return Py::Long((long) getMeshPointPtr()->Index); + return Py::Long((long)getMeshPointPtr()->Index); } Py::Boolean MeshPointPy::getBound() const @@ -98,15 +103,19 @@ Py::Boolean MeshPointPy::getBound() const Py::Object MeshPointPy::getNormal() const { - if (!getMeshPointPtr()->isBound()) - throw Py::RuntimeError("This object is not bound to a mesh, so no topological operation is possible!"); - if (getMeshPointPtr()->Mesh->countPoints() <= getMeshPointPtr()->Index) + if (!getMeshPointPtr()->isBound()) { + throw Py::RuntimeError( + "This object is not bound to a mesh, so no topological operation is possible!"); + } + if (getMeshPointPtr()->Mesh->countPoints() <= getMeshPointPtr()->Index) { throw Py::IndexError("Index out of range"); + } - Base::Vector3d* v = new Base::Vector3d(getMeshPointPtr()->Mesh->getPointNormal(getMeshPointPtr()->Index)); + Base::Vector3d* v = + new Base::Vector3d(getMeshPointPtr()->Mesh->getPointNormal(getMeshPointPtr()->Index)); Base::VectorPy* normal = new Base::VectorPy(v); normal->setConst(); - return Py::Object(normal,true); + return Py::Object(normal, true); } Py::Object MeshPointPy::getVector() const @@ -115,7 +124,7 @@ Py::Object MeshPointPy::getVector() const Base::VectorPy* vec = new Base::VectorPy(*ptr); vec->setConst(); - return Py::Object(vec,true); + return Py::Object(vec, true); } Py::Float MeshPointPy::getx() const @@ -124,8 +133,9 @@ Py::Float MeshPointPy::getx() const double x = ptr->x; if (getMeshPointPtr()->isBound()) { - if (getMeshPointPtr()->Mesh->countPoints() > getMeshPointPtr()->Index) + if (getMeshPointPtr()->Mesh->countPoints() > getMeshPointPtr()->Index) { x = getMeshPointPtr()->Mesh->getPoint(getMeshPointPtr()->Index).x; + } } return Py::Float(x); @@ -137,8 +147,9 @@ Py::Float MeshPointPy::gety() const double y = ptr->y; if (getMeshPointPtr()->isBound()) { - if (getMeshPointPtr()->Mesh->countPoints() > getMeshPointPtr()->Index) + if (getMeshPointPtr()->Mesh->countPoints() > getMeshPointPtr()->Index) { y = getMeshPointPtr()->Mesh->getPoint(getMeshPointPtr()->Index).y; + } } return Py::Float(y); @@ -150,14 +161,15 @@ Py::Float MeshPointPy::getz() const double z = ptr->z; if (getMeshPointPtr()->isBound()) { - if (getMeshPointPtr()->Mesh->countPoints() > getMeshPointPtr()->Index) + if (getMeshPointPtr()->Mesh->countPoints() > getMeshPointPtr()->Index) { z = getMeshPointPtr()->Mesh->getPoint(getMeshPointPtr()->Index).z; + } } return Py::Float(z); } -PyObject *MeshPointPy::getCustomAttributes(const char* /*attr*/) const +PyObject* MeshPointPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Mesh/App/MeshProperties.cpp b/src/Mod/Mesh/App/MeshProperties.cpp index c353ed558c..761827f579 100644 --- a/src/Mod/Mesh/App/MeshProperties.cpp +++ b/src/Mod/Mesh/App/MeshProperties.cpp @@ -30,20 +30,20 @@ #include #include "Core/Iterator.h" -#include "Core/MeshKernel.h" #include "Core/MeshIO.h" +#include "Core/MeshKernel.h" -#include "MeshProperties.h" #include "Mesh.h" +#include "MeshProperties.h" #include "MeshPy.h" using namespace Mesh; TYPESYSTEM_SOURCE(Mesh::PropertyNormalList, App::PropertyLists) -TYPESYSTEM_SOURCE(Mesh::PropertyCurvatureList , App::PropertyLists) -TYPESYSTEM_SOURCE(Mesh::PropertyMaterial , App::Property) -TYPESYSTEM_SOURCE(Mesh::PropertyMeshKernel , App::PropertyComplexGeoData) +TYPESYSTEM_SOURCE(Mesh::PropertyCurvatureList, App::PropertyLists) +TYPESYSTEM_SOURCE(Mesh::PropertyMaterial, App::Property) +TYPESYSTEM_SOURCE(Mesh::PropertyMeshKernel, App::PropertyComplexGeoData) PropertyNormalList::PropertyNormalList() = default; @@ -61,7 +61,7 @@ void PropertyNormalList::setValue(const Base::Vector3f& lValue) { aboutToSetValue(); _lValueList.resize(1); - _lValueList[0]=lValue; + _lValueList[0] = lValue; hasSetValue(); } @@ -69,7 +69,7 @@ void PropertyNormalList::setValue(float x, float y, float z) { aboutToSetValue(); _lValueList.resize(1); - _lValueList[0].Set(x,y,z); + _lValueList[0].Set(x, y, z); hasSetValue(); } @@ -80,40 +80,41 @@ void PropertyNormalList::setValues(const std::vector& values) hasSetValue(); } -PyObject *PropertyNormalList::getPyObject() +PyObject* PropertyNormalList::getPyObject() { PyObject* list = PyList_New(getSize()); - for (int i = 0;i values; values.resize(nSize); - for (Py_ssize_t i=0; i(val.getValue()); } setValues(values); } else if (PyObject_TypeCheck(value, &(Base::VectorPy::Type))) { - Base::VectorPy *pcObject = static_cast(value); + Base::VectorPy* pcObject = static_cast(value); Base::Vector3d* val = pcObject->getVectorPtr(); setValue(Base::convertTo(*val)); } else if (PyTuple_Check(value) && PyTuple_Size(value) == 3) { App::PropertyVector val; - val.setPyObject( value ); + val.setPyObject(value); setValue(Base::convertTo(val.getValue())); } else { @@ -123,25 +124,26 @@ void PropertyNormalList::setPyObject(PyObject *value) } } -void PropertyNormalList::Save (Base::Writer &writer) const +void PropertyNormalList::Save(Base::Writer& writer) const { if (!writer.isForceXML()) { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyNormalList::Restore(Base::XMLReader &reader) +void PropertyNormalList::Restore(Base::XMLReader& reader) { reader.readElement("VectorList"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } } -void PropertyNormalList::SaveDocFile (Base::Writer &writer) const +void PropertyNormalList::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); uint32_t uCt = (uint32_t)getSize(); @@ -151,38 +153,38 @@ void PropertyNormalList::SaveDocFile (Base::Writer &writer) const } } -void PropertyNormalList::RestoreDocFile(Base::Reader &reader) +void PropertyNormalList::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); - uint32_t uCt=0; + uint32_t uCt = 0; str >> uCt; std::vector values(uCt); - for (auto & it : values) { + for (auto& it : values) { str >> it.x >> it.y >> it.z; } setValues(values); } -App::Property *PropertyNormalList::Copy() const +App::Property* PropertyNormalList::Copy() const { - PropertyNormalList *p= new PropertyNormalList(); + PropertyNormalList* p = new PropertyNormalList(); p->_lValueList = _lValueList; return p; } -void PropertyNormalList::Paste(const App::Property &from) +void PropertyNormalList::Paste(const App::Property& from) { aboutToSetValue(); _lValueList = dynamic_cast(from)._lValueList; hasSetValue(); } -unsigned int PropertyNormalList::getMemSize () const +unsigned int PropertyNormalList::getMemSize() const { return static_cast(_lValueList.size() * sizeof(Base::Vector3f)); } -void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat) +void PropertyNormalList::transformGeometry(const Base::Matrix4D& mat) { // A normal vector is only a direction with unit length, so we only need to rotate it // (no translations or scaling) @@ -207,7 +209,7 @@ void PropertyNormalList::transformGeometry(const Base::Matrix4D &mat) aboutToSetValue(); // Rotate the normal vectors - for (int ii=0; ii& lValues) { aboutToSetValue(); - _lValueList=lValues; + _lValueList = lValues; hasSetValue(); } -std::vector PropertyCurvatureList::getCurvature( int mode ) const +std::vector PropertyCurvatureList::getCurvature(int mode) const { const std::vector& fCurvInfo = getValues(); std::vector fValues; @@ -241,47 +243,44 @@ std::vector PropertyCurvatureList::getCurvature( int mode ) const // Mean curvature if (mode == MeanCurvature) { - for (const auto & it : fCurvInfo) - { - fValues.push_back( 0.5f*(it.fMaxCurvature+it.fMinCurvature) ); + for (const auto& it : fCurvInfo) { + fValues.push_back(0.5f * (it.fMaxCurvature + it.fMinCurvature)); } } // Gaussian curvature else if (mode == GaussCurvature) { - for (const auto & it : fCurvInfo) - { - fValues.push_back( it.fMaxCurvature * it.fMinCurvature ); + for (const auto& it : fCurvInfo) { + fValues.push_back(it.fMaxCurvature * it.fMinCurvature); } } // Maximum curvature else if (mode == MaxCurvature) { - for (const auto & it : fCurvInfo) - { - fValues.push_back( it.fMaxCurvature ); + for (const auto& it : fCurvInfo) { + fValues.push_back(it.fMaxCurvature); } } // Minimum curvature else if (mode == MinCurvature) { - for (const auto & it : fCurvInfo) - { - fValues.push_back( it.fMinCurvature ); + for (const auto& it : fCurvInfo) { + fValues.push_back(it.fMinCurvature); } } // Absolute curvature else if (mode == AbsCurvature) { - for (const auto & it : fCurvInfo) - { - if ( fabs(it.fMaxCurvature) > fabs(it.fMinCurvature) ) - fValues.push_back( it.fMaxCurvature ); - else - fValues.push_back( it.fMinCurvature ); + for (const auto& it : fCurvInfo) { + if (fabs(it.fMaxCurvature) > fabs(it.fMinCurvature)) { + fValues.push_back(it.fMaxCurvature); + } + else { + fValues.push_back(it.fMinCurvature); + } } } return fValues; } -void PropertyCurvatureList::transformGeometry(const Base::Matrix4D &mat) +void PropertyCurvatureList::transformGeometry(const Base::Matrix4D& mat) { // The principal direction is only a vector with unit length, so we only need to rotate it // (no translations or scaling) @@ -306,8 +305,7 @@ void PropertyCurvatureList::transformGeometry(const Base::Matrix4D &mat) aboutToSetValue(); // Rotate the principal directions - for (int ii=0; ii" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyCurvatureList::Restore(Base::XMLReader &reader) +void PropertyCurvatureList::Restore(Base::XMLReader& reader) { reader.readElement("CurvatureList"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (!file.empty()) { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } } -void PropertyCurvatureList::SaveDocFile (Base::Writer &writer) const +void PropertyCurvatureList::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); uint32_t uCt = (uint32_t)getSize(); str << uCt; - for (const auto & it : _lValueList) { + for (const auto& it : _lValueList) { str << it.fMaxCurvature << it.fMinCurvature; str << it.cMaxCurvDir.x << it.cMaxCurvDir.y << it.cMaxCurvDir.z; str << it.cMinCurvDir.x << it.cMinCurvDir.y << it.cMinCurvDir.z; } } -void PropertyCurvatureList::RestoreDocFile(Base::Reader &reader) +void PropertyCurvatureList::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); - uint32_t uCt=0; + uint32_t uCt = 0; str >> uCt; std::vector values(uCt); - for (auto & it : values) { + for (auto& it : values) { str >> it.fMaxCurvature >> it.fMinCurvature; str >> it.cMaxCurvDir.x >> it.cMaxCurvDir.y >> it.cMaxCurvDir.z; str >> it.cMinCurvDir.x >> it.cMinCurvDir.y >> it.cMinCurvDir.z; @@ -366,7 +364,7 @@ void PropertyCurvatureList::RestoreDocFile(Base::Reader &reader) PyObject* PropertyCurvatureList::getPyObject() { Py::List list; - for (const auto & it : _lValueList) { + for (const auto& it : _lValueList) { Py::Tuple tuple(4); tuple.setItem(0, Py::Float(it.fMaxCurvature)); tuple.setItem(1, Py::Float(it.fMinCurvature)); @@ -391,14 +389,14 @@ void PropertyCurvatureList::setPyObject(PyObject* /*value*/) throw Base::AttributeError(std::string("This attribute is read-only")); } -App::Property *PropertyCurvatureList::Copy() const +App::Property* PropertyCurvatureList::Copy() const { - PropertyCurvatureList *p= new PropertyCurvatureList(); + PropertyCurvatureList* p = new PropertyCurvatureList(); p->_lValueList = _lValueList; return p; } -void PropertyCurvatureList::Paste(const App::Property &from) +void PropertyCurvatureList::Paste(const App::Property& from) { aboutToSetValue(); _lValueList = dynamic_cast(from)._lValueList; @@ -508,9 +506,7 @@ PyObject* PropertyMaterial::getPyObject() auto getColorList = [](const std::vector& color) { Py::List list; for (const auto& it : color) { - list.append(Py::TupleN(Py::Float(it.r), - Py::Float(it.g), - Py::Float(it.b))); + list.append(Py::TupleN(Py::Float(it.r), Py::Float(it.g), Py::Float(it.b))); } return list; }; @@ -593,8 +589,8 @@ void PropertyMaterial::setPyObject(PyObject* obj) void PropertyMaterial::Save(Base::Writer& writer) const { if (!writer.isForceXML()) { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } @@ -611,7 +607,7 @@ void PropertyMaterial::Restore(Base::XMLReader& reader) } } -void PropertyMaterial::SaveDocFile(Base::Writer &writer) const +void PropertyMaterial::SaveDocFile(Base::Writer& writer) const { Base::OutputStream str(writer.Stream()); auto saveColor = [&str](const std::vector& color) { @@ -641,7 +637,7 @@ void PropertyMaterial::SaveDocFile(Base::Writer &writer) const saveFloat(_material.transparency); } -void PropertyMaterial::RestoreDocFile(Base::Reader &reader) +void PropertyMaterial::RestoreDocFile(Base::Reader& reader) { Base::InputStream str(reader); auto restoreColor = [&str](std::vector& color) { @@ -649,7 +645,7 @@ void PropertyMaterial::RestoreDocFile(Base::Reader &reader) str >> count; color.resize(count); for (auto& it : color) { - uint32_t value; // must be 32 bit long + uint32_t value; // must be 32 bit long str >> value; it.setPackedValue(value); } @@ -689,7 +685,7 @@ const char* PropertyMaterial::getEditorName() const App::Property* PropertyMaterial::Copy() const { - PropertyMaterial *prop = new PropertyMaterial(); + PropertyMaterial* prop = new PropertyMaterial(); prop->_material = _material; return prop; } @@ -704,20 +700,19 @@ void PropertyMaterial::Paste(const Property& from) unsigned int PropertyMaterial::getMemSize() const { - auto size = (_material.ambientColor.size() + - _material.diffuseColor.size() + - _material.emissiveColor.size() + - _material.specularColor.size()) * sizeof(App::Color) + - (_material.shininess.size() + - _material.transparency.size()) * sizeof(float) + - _material.library.size() + sizeof(_material); + auto size = (_material.ambientColor.size() + _material.diffuseColor.size() + + _material.emissiveColor.size() + _material.specularColor.size()) + * sizeof(App::Color) + + (_material.shininess.size() + _material.transparency.size()) * sizeof(float) + + _material.library.size() + sizeof(_material); return static_cast(size); } bool PropertyMaterial::isSame(const App::Property& other) const { - if (&other == this) + if (&other == this) { return true; + } return getTypeId() == other.getTypeId() && getValue() == static_cast(&other)->getValue(); } @@ -725,7 +720,7 @@ bool PropertyMaterial::isSame(const App::Property& other) const // ---------------------------------------------------------------------------- PropertyMeshKernel::PropertyMeshKernel() - : _meshObject(new MeshObject()) + : _meshObject(new MeshObject()) { // Note: Normally this property is a member of a document object, i.e. the setValue() // method gets called in the constructor of a subclass of DocumentObject, e.g. Mesh::Feature. @@ -781,12 +776,12 @@ void PropertyMeshKernel::swapMesh(MeshCore::MeshKernel& mesh) hasSetValue(); } -const MeshObject& PropertyMeshKernel::getValue()const +const MeshObject& PropertyMeshKernel::getValue() const { return *_meshObject; } -const MeshObject* PropertyMeshKernel::getValuePtr()const +const MeshObject* PropertyMeshKernel::getValuePtr() const { return static_cast(_meshObject); } @@ -801,7 +796,7 @@ Base::BoundBox3d PropertyMeshKernel::getBoundingBox() const return _meshObject->getBoundBox(); } -unsigned int PropertyMeshKernel::getMemSize () const +unsigned int PropertyMeshKernel::getMemSize() const { unsigned int size = 0; size += _meshObject->getMemSize(); @@ -820,19 +815,21 @@ void PropertyMeshKernel::finishEditing() hasSetValue(); } -void PropertyMeshKernel::transformGeometry(const Base::Matrix4D &rclMat) +void PropertyMeshKernel::transformGeometry(const Base::Matrix4D& rclMat) { aboutToSetValue(); _meshObject->transformGeometry(rclMat); hasSetValue(); } -void PropertyMeshKernel::setPointIndices(const std::vector >& inds) +void PropertyMeshKernel::setPointIndices( + const std::vector>& inds) { aboutToSetValue(); MeshCore::MeshKernel& kernel = _meshObject->getKernel(); - for (const auto & it : inds) + for (const auto& it : inds) { kernel.SetPoint(it.first, it.second); + } hasSetValue(); } @@ -846,11 +843,13 @@ Base::Matrix4D PropertyMeshKernel::getTransform() const return _meshObject->getTransform(); } -PyObject *PropertyMeshKernel::getPyObject() +PyObject* PropertyMeshKernel::getPyObject() { if (!meshPyObject) { - meshPyObject = new MeshPy(&*_meshObject); // Lgtm[cpp/resource-not-released-in-destructor] ** Not destroyed in this class because it is reference-counted and destroyed elsewhere - meshPyObject->setConst(); // set immutable + meshPyObject = new MeshPy( + &*_meshObject); // Lgtm[cpp/resource-not-released-in-destructor] ** Not destroyed in + // this class because it is reference-counted and destroyed elsewhere + meshPyObject->setConst(); // set immutable meshPyObject->parentProperty = this; } @@ -858,7 +857,7 @@ PyObject *PropertyMeshKernel::getPyObject() return meshPyObject; } -void PropertyMeshKernel::setPyObject(PyObject *value) +void PropertyMeshKernel::setPyObject(PyObject* value) { if (PyObject_TypeCheck(value, &(MeshPy::Type))) { MeshPy* mesh = static_cast(value); @@ -881,7 +880,7 @@ void PropertyMeshKernel::setPyObject(PyObject *value) } } -void PropertyMeshKernel::Save (Base::Writer &writer) const +void PropertyMeshKernel::Save(Base::Writer& writer) const { if (writer.isForceXML()) { writer.Stream() << writer.ind() << "" << std::endl; @@ -889,15 +888,15 @@ void PropertyMeshKernel::Save (Base::Writer &writer) const saver.SaveXML(writer); } else { - writer.Stream() << writer.ind() << "" << std::endl; + writer.Stream() << writer.ind() << "" << std::endl; } } -void PropertyMeshKernel::Restore(Base::XMLReader &reader) +void PropertyMeshKernel::Restore(Base::XMLReader& reader) { reader.readElement("Mesh"); - std::string file (reader.getAttribute("file") ); + std::string file(reader.getAttribute("file")); if (file.empty()) { // read XML @@ -916,31 +915,31 @@ void PropertyMeshKernel::Restore(Base::XMLReader &reader) } else { // initiate a file read - reader.addFile(file.c_str(),this); + reader.addFile(file.c_str(), this); } } -void PropertyMeshKernel::SaveDocFile (Base::Writer &writer) const +void PropertyMeshKernel::SaveDocFile(Base::Writer& writer) const { _meshObject->save(writer.Stream()); } -void PropertyMeshKernel::RestoreDocFile(Base::Reader &reader) +void PropertyMeshKernel::RestoreDocFile(Base::Reader& reader) { aboutToSetValue(); _meshObject->load(reader); hasSetValue(); } -App::Property *PropertyMeshKernel::Copy() const +App::Property* PropertyMeshKernel::Copy() const { // Note: Copy the content, do NOT reference the same mesh object - PropertyMeshKernel *prop = new PropertyMeshKernel(); + PropertyMeshKernel* prop = new PropertyMeshKernel(); *(prop->_meshObject) = *(this->_meshObject); return prop; } -void PropertyMeshKernel::Paste(const App::Property &from) +void PropertyMeshKernel::Paste(const App::Property& from) { // Note: Copy the content, do NOT reference the same mesh object aboutToSetValue(); diff --git a/src/Mod/Mesh/App/MeshProperties.h b/src/Mod/Mesh/App/MeshProperties.h index 47c14c185a..123312e8e7 100644 --- a/src/Mod/Mesh/App/MeshProperties.h +++ b/src/Mod/Mesh/App/MeshProperties.h @@ -60,35 +60,38 @@ public: void setValue(const Base::Vector3f&); void setValue(float x, float y, float z); - const Base::Vector3f& operator[] (const int idx) const { + const Base::Vector3f& operator[](const int idx) const + { return _lValueList[idx]; } - void set1Value (const int idx, const Base::Vector3f& value) { + void set1Value(const int idx, const Base::Vector3f& value) + { _lValueList[idx] = value; } - void setValues (const std::vector& values); + void setValues(const std::vector& values); - const std::vector &getValues() const { + const std::vector& getValues() const + { return _lValueList; } - PyObject *getPyObject() override; - void setPyObject(PyObject *) override; + PyObject* getPyObject() override; + void setPyObject(PyObject*) override; - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; - App::Property *Copy() const override; - void Paste(const App::Property &from) override; + App::Property* Copy() const override; + void Paste(const App::Property& from) override; - unsigned int getMemSize () const override; + unsigned int getMemSize() const override; - void transformGeometry(const Base::Matrix4D &rclMat); + void transformGeometry(const Base::Matrix4D& rclMat); private: std::vector _lValueList; @@ -109,51 +112,64 @@ class MeshExport PropertyCurvatureList: public App::PropertyLists TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - enum { - MeanCurvature = 0, /**< Mean curvature */ - GaussCurvature = 1, /**< Gaussian curvature */ - MaxCurvature = 2, /**< Maximum curvature */ - MinCurvature = 3, /**< Minimum curvature */ - AbsCurvature = 4 /**< Absolute curvature */ + enum + { + MeanCurvature = 0, /**< Mean curvature */ + GaussCurvature = 1, /**< Gaussian curvature */ + MaxCurvature = 2, /**< Maximum curvature */ + MinCurvature = 3, /**< Minimum curvature */ + AbsCurvature = 4 /**< Absolute curvature */ }; public: PropertyCurvatureList(); - void setSize(int newSize) override{_lValueList.resize(newSize);} - int getSize() const override {return _lValueList.size();} - std::vector getCurvature( int tMode) const; + void setSize(int newSize) override + { + _lValueList.resize(newSize); + } + int getSize() const override + { + return _lValueList.size(); + } + std::vector getCurvature(int tMode) const; void setValue(const CurvatureInfo&); void setValues(const std::vector&); /// index operator - const CurvatureInfo& operator[] (const int idx) const { + const CurvatureInfo& operator[](const int idx) const + { return _lValueList[idx]; } - void set1Value (const int idx, const CurvatureInfo& value) { + void set1Value(const int idx, const CurvatureInfo& value) + { _lValueList[idx] = value; } - const std::vector &getValues() const { + const std::vector& getValues() const + { return _lValueList; } - void transformGeometry(const Base::Matrix4D &rclMat); + void transformGeometry(const Base::Matrix4D& rclMat); - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; /** @name Python interface */ //@{ PyObject* getPyObject() override; - void setPyObject(PyObject *value) override; + void setPyObject(PyObject* value) override; //@} - App::Property *Copy() const override; - void Paste(const App::Property &from) override; + App::Property* Copy() const override; + void Paste(const App::Property& from) override; - unsigned int getMemSize () const override{return _lValueList.size() * sizeof(CurvatureInfo);} + unsigned int getMemSize() const override + { + return _lValueList.size() * sizeof(CurvatureInfo); + } private: std::vector _lValueList; @@ -161,7 +177,7 @@ private: /** Mesh material properties */ -class MeshExport PropertyMaterial : public App::Property +class MeshExport PropertyMaterial: public App::Property { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -170,7 +186,7 @@ public: /** Sets the property */ - void setValue(const MeshCore::Material &mat); + void setValue(const MeshCore::Material& mat); void setAmbientColor(const std::vector& col); void setDiffuseColor(const std::vector& col); void setSpecularColor(const std::vector& col); @@ -191,7 +207,7 @@ public: PyObject* getPyObject() override; void setPyObject(PyObject*) override; - void Save (Base::Writer& writer) const override; + void Save(Base::Writer& writer) const override; void Restore(Base::XMLReader& reader) override; void SaveDocFile(Base::Writer& writer) const override; @@ -212,7 +228,7 @@ private: /** The mesh kernel property class. * @author Werner Mayer */ -class MeshExport PropertyMeshKernel : public App::PropertyComplexGeoData +class MeshExport PropertyMeshKernel: public App::PropertyComplexGeoData { TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -242,9 +258,9 @@ public: /** Returns a the attached mesh object by reference. It cannot be modified * from outside. */ - const MeshObject &getValue() const; - const MeshObject *getValuePtr() const; - unsigned int getMemSize () const override; + const MeshObject& getValue() const; + const MeshObject* getValuePtr() const; + unsigned int getMemSize() const override; //@} /** @name Getting basic geometric entities */ @@ -259,8 +275,8 @@ public: MeshObject* startEditing(); void finishEditing(); /// Transform the real mesh data - void transformGeometry(const Base::Matrix4D &rclMat) override; - void setPointIndices( const std::vector >& ); + void transformGeometry(const Base::Matrix4D& rclMat) override; + void setPointIndices(const std::vector>&); void setTransform(const Base::Matrix4D& rclTrf) override; Base::Matrix4D getTransform() const override; //@} @@ -277,30 +293,31 @@ public: * wrapper for the mesh object or simply a list of triangles, i.e. a list * of lists of three floats. */ - void setPyObject(PyObject *value) override; + void setPyObject(PyObject* value) override; //@} - const char* getEditorName() const override { + const char* getEditorName() const override + { return "MeshGui::PropertyMeshKernelItem"; } /** @name Save/restore */ //@{ - void Save (Base::Writer &writer) const override; - void Restore(Base::XMLReader &reader) override; + void Save(Base::Writer& writer) const override; + void Restore(Base::XMLReader& reader) override; - void SaveDocFile (Base::Writer &writer) const override; - void RestoreDocFile(Base::Reader &reader) override; + void SaveDocFile(Base::Writer& writer) const override; + void RestoreDocFile(Base::Reader& reader) override; - App::Property *Copy() const override; - void Paste(const App::Property &from) override; + App::Property* Copy() const override; + void Paste(const App::Property& from) override; //@} private: Base::Reference _meshObject; - MeshPy* meshPyObject{nullptr}; + MeshPy* meshPyObject {nullptr}; }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_MESHPROPERTIES_H +#endif // MESH_MESHPROPERTIES_H diff --git a/src/Mod/Mesh/App/MeshPyImp.cpp b/src/Mod/Mesh/App/MeshPyImp.cpp index aefab5aba5..7fb3bfdae0 100644 --- a/src/Mod/Mesh/App/MeshPyImp.cpp +++ b/src/Mod/Mesh/App/MeshPyImp.cpp @@ -37,69 +37,87 @@ #include "Core/Smoothing.h" #include "Core/Triangulation.h" +// clang-format off #include "Mesh.h" #include "MeshPy.h" #include "MeshPointPy.h" #include "FacetPy.h" #include "MeshPy.cpp" #include "MeshProperties.h" +// clang-format on using namespace Mesh; -struct MeshPropertyLock { - explicit MeshPropertyLock(PropertyMeshKernel* p) : prop(p) - { if (prop) prop->startEditing(); } +struct MeshPropertyLock +{ + explicit MeshPropertyLock(PropertyMeshKernel* p) + : prop(p) + { + if (prop) { + prop->startEditing(); + } + } ~MeshPropertyLock() - { if (prop) prop->finishEditing(); } + { + if (prop) { + prop->finishEditing(); + } + } + private: PropertyMeshKernel* prop; }; int MeshPy::PyInit(PyObject* args, PyObject*) { - PyObject *pcObj=nullptr; - if (!PyArg_ParseTuple(args, "|O", &pcObj)) + PyObject* pcObj = nullptr; + if (!PyArg_ParseTuple(args, "|O", &pcObj)) { return -1; + } try { this->parentProperty = nullptr; // if no mesh is given - if (!pcObj) + if (!pcObj) { return 0; + } if (PyObject_TypeCheck(pcObj, &(MeshPy::Type))) { - getMeshObjectPtr()->operator = (*static_cast(pcObj)->getMeshObjectPtr()); + getMeshObjectPtr()->operator=(*static_cast(pcObj)->getMeshObjectPtr()); } else if (PyList_Check(pcObj)) { PyObject* ret = addFacets(args); bool ok = (ret != nullptr); Py_XDECREF(ret); - if (!ok) + if (!ok) { return -1; + } } else if (PyTuple_Check(pcObj)) { PyObject* ret = addFacets(args); bool ok = (ret != nullptr); Py_XDECREF(ret); - if (!ok) + if (!ok) { return -1; + } } else if (PyUnicode_Check(pcObj)) { getMeshObjectPtr()->load(PyUnicode_AsUTF8(pcObj)); } else { - PyErr_Format(PyExc_TypeError, "Cannot create a mesh out of a '%s'", - pcObj->ob_type->tp_name); + PyErr_Format(PyExc_TypeError, + "Cannot create a mesh out of a '%s'", + pcObj->ob_type->tp_name); return -1; } } - catch (const Base::Exception &e) { + catch (const Base::Exception& e) { e.setPyException(); return -1; } - catch (const std::exception &e) { - PyErr_SetString(Base::PyExc_FC_GeneralError,e.what()); + catch (const std::exception& e) { + PyErr_SetString(Base::PyExc_FC_GeneralError, e.what()); return -1; } catch (const Py::Exception&) { @@ -115,24 +133,25 @@ std::string MeshPy::representation() const return getMeshObjectPtr()->representation(); } -PyObject *MeshPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper +PyObject* MeshPy::PyMake(struct _typeobject*, PyObject*, PyObject*) // Python wrapper { // create a new instance of MeshPy and the Twin object return new MeshPy(new MeshObject); } -PyObject* MeshPy::copy(PyObject *args) +PyObject* MeshPy::copy(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } return new MeshPy(new MeshObject(*getMeshObjectPtr())); } -PyObject* MeshPy::read(PyObject *args, PyObject *kwds) +PyObject* MeshPy::read(PyObject* args, PyObject* kwds) { char* Name; - static const std::array keywords_path {"Filename",nullptr}; + static const std::array keywords_path {"Filename", nullptr}; if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "et", keywords_path, "utf-8", &Name)) { getMeshObjectPtr()->load(Name); PyMem_Free(Name); @@ -143,28 +162,28 @@ PyObject* MeshPy::read(PyObject *args, PyObject *kwds) MeshCore::MeshIO::Format format = MeshCore::MeshIO::Undefined; std::map ext; - ext["BMS" ] = MeshCore::MeshIO::BMS; - ext["STL" ] = MeshCore::MeshIO::BSTL; - ext["AST" ] = MeshCore::MeshIO::ASTL; - ext["OBJ" ] = MeshCore::MeshIO::OBJ; - ext["SMF" ] = MeshCore::MeshIO::SMF; - ext["OFF" ] = MeshCore::MeshIO::OFF; - ext["IV" ] = MeshCore::MeshIO::IV; - ext["X3D" ] = MeshCore::MeshIO::X3D; + ext["BMS"] = MeshCore::MeshIO::BMS; + ext["STL"] = MeshCore::MeshIO::BSTL; + ext["AST"] = MeshCore::MeshIO::ASTL; + ext["OBJ"] = MeshCore::MeshIO::OBJ; + ext["SMF"] = MeshCore::MeshIO::SMF; + ext["OFF"] = MeshCore::MeshIO::OFF; + ext["IV"] = MeshCore::MeshIO::IV; + ext["X3D"] = MeshCore::MeshIO::X3D; ext["X3DZ"] = MeshCore::MeshIO::X3DZ; ext["VRML"] = MeshCore::MeshIO::VRML; - ext["WRL" ] = MeshCore::MeshIO::VRML; - ext["WRZ" ] = MeshCore::MeshIO::WRZ; - ext["NAS" ] = MeshCore::MeshIO::NAS; - ext["BDF" ] = MeshCore::MeshIO::NAS; - ext["PLY" ] = MeshCore::MeshIO::PLY; + ext["WRL"] = MeshCore::MeshIO::VRML; + ext["WRZ"] = MeshCore::MeshIO::WRZ; + ext["NAS"] = MeshCore::MeshIO::NAS; + ext["BDF"] = MeshCore::MeshIO::NAS; + ext["PLY"] = MeshCore::MeshIO::PLY; ext["APLY"] = MeshCore::MeshIO::APLY; - ext["PY" ] = MeshCore::MeshIO::PY; + ext["PY"] = MeshCore::MeshIO::PY; PyObject* input; char* Ext; - static const std::array keywords_stream {"Stream", "Format", nullptr}; - if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "Os",keywords_stream, &input, &Ext)) { + static const std::array keywords_stream {"Stream", "Format", nullptr}; + if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "Os", keywords_stream, &input, &Ext)) { std::string fmt(Ext); boost::to_upper(fmt); if (ext.find(fmt) != ext.end()) { @@ -184,41 +203,52 @@ PyObject* MeshPy::read(PyObject *args, PyObject *kwds) return nullptr; } -PyObject* MeshPy::write(PyObject *args, PyObject *kwds) +PyObject* MeshPy::write(PyObject* args, PyObject* kwds) { char* Name; - char* Ext=nullptr; - char* ObjName=nullptr; - PyObject* List=nullptr; + char* Ext = nullptr; + char* ObjName = nullptr; + PyObject* List = nullptr; MeshCore::MeshIO::Format format = MeshCore::MeshIO::Undefined; std::map ext; - ext["BMS" ] = MeshCore::MeshIO::BMS; - ext["STL" ] = MeshCore::MeshIO::BSTL; - ext["AST" ] = MeshCore::MeshIO::ASTL; - ext["OBJ" ] = MeshCore::MeshIO::OBJ; - ext["SMF" ] = MeshCore::MeshIO::SMF; - ext["OFF" ] = MeshCore::MeshIO::OFF; - ext["IDTF" ] = MeshCore::MeshIO::IDTF; - ext["MGL" ] = MeshCore::MeshIO::MGL; - ext["IV" ] = MeshCore::MeshIO::IV; - ext["X3D" ] = MeshCore::MeshIO::X3D; - ext["X3DZ" ] = MeshCore::MeshIO::X3DZ; + ext["BMS"] = MeshCore::MeshIO::BMS; + ext["STL"] = MeshCore::MeshIO::BSTL; + ext["AST"] = MeshCore::MeshIO::ASTL; + ext["OBJ"] = MeshCore::MeshIO::OBJ; + ext["SMF"] = MeshCore::MeshIO::SMF; + ext["OFF"] = MeshCore::MeshIO::OFF; + ext["IDTF"] = MeshCore::MeshIO::IDTF; + ext["MGL"] = MeshCore::MeshIO::MGL; + ext["IV"] = MeshCore::MeshIO::IV; + ext["X3D"] = MeshCore::MeshIO::X3D; + ext["X3DZ"] = MeshCore::MeshIO::X3DZ; ext["X3DOM"] = MeshCore::MeshIO::X3DOM; - ext["VRML" ] = MeshCore::MeshIO::VRML; - ext["WRL" ] = MeshCore::MeshIO::VRML; - ext["WRZ" ] = MeshCore::MeshIO::WRZ; - ext["NAS" ] = MeshCore::MeshIO::NAS; - ext["BDF" ] = MeshCore::MeshIO::NAS; - ext["PLY" ] = MeshCore::MeshIO::PLY; - ext["APLY" ] = MeshCore::MeshIO::APLY; - ext["PY" ] = MeshCore::MeshIO::PY; - ext["ASY" ] = MeshCore::MeshIO::ASY; - ext["3MF" ] = MeshCore::MeshIO::ThreeMF; + ext["VRML"] = MeshCore::MeshIO::VRML; + ext["WRL"] = MeshCore::MeshIO::VRML; + ext["WRZ"] = MeshCore::MeshIO::WRZ; + ext["NAS"] = MeshCore::MeshIO::NAS; + ext["BDF"] = MeshCore::MeshIO::NAS; + ext["PLY"] = MeshCore::MeshIO::PLY; + ext["APLY"] = MeshCore::MeshIO::APLY; + ext["PY"] = MeshCore::MeshIO::PY; + ext["ASY"] = MeshCore::MeshIO::ASY; + ext["3MF"] = MeshCore::MeshIO::ThreeMF; - static const std::array keywords_path {"Filename","Format","Name","Material",nullptr}; - if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "et|ssO", keywords_path, "utf-8", - &Name, &Ext, &ObjName, &List)) { + static const std::array keywords_path {"Filename", + "Format", + "Name", + "Material", + nullptr}; + if (Base::Wrapped_ParseTupleAndKeywords(args, + kwds, + "et|ssO", + keywords_path, + "utf-8", + &Name, + &Ext, + &ObjName, + &List)) { if (Ext) { std::string fmt(Ext); boost::to_upper(fmt); @@ -235,15 +265,18 @@ PyObject* MeshPy::write(PyObject *args, PyObject *kwds) float r = (float)Py::Float(t.getItem(0)); float g = (float)Py::Float(t.getItem(1)); float b = (float)Py::Float(t.getItem(2)); - mat.diffuseColor.emplace_back(r,g,b); + mat.diffuseColor.emplace_back(r, g, b); } - if (mat.diffuseColor.size() == getMeshObjectPtr()->countPoints()) + if (mat.diffuseColor.size() == getMeshObjectPtr()->countPoints()) { mat.binding = MeshCore::MeshIO::PER_VERTEX; - else if (mat.diffuseColor.size() == getMeshObjectPtr()->countFacets()) + } + else if (mat.diffuseColor.size() == getMeshObjectPtr()->countFacets()) { mat.binding = MeshCore::MeshIO::PER_FACE; - else + } + else { mat.binding = MeshCore::MeshIO::OVERALL; + } getMeshObjectPtr()->save(Name, format, &mat, ObjName); } else { @@ -256,10 +289,20 @@ PyObject* MeshPy::write(PyObject *args, PyObject *kwds) PyErr_Clear(); - static const std::array keywords_stream {"Stream", "Format", "Name", "Material", nullptr}; + static const std::array keywords_stream {"Stream", + "Format", + "Name", + "Material", + nullptr}; PyObject* input; - if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "Os|sO", keywords_stream, - &input, &Ext, &ObjName, &List)) { + if (Base::Wrapped_ParseTupleAndKeywords(args, + kwds, + "Os|sO", + keywords_stream, + &input, + &Ext, + &ObjName, + &List)) { std::string fmt(Ext); boost::to_upper(fmt); if (ext.find(fmt) != ext.end()) { @@ -275,15 +318,18 @@ PyObject* MeshPy::write(PyObject *args, PyObject *kwds) float r = (float)Py::Float(t.getItem(0)); float g = (float)Py::Float(t.getItem(1)); float b = (float)Py::Float(t.getItem(2)); - mat->diffuseColor.emplace_back(r,g,b); + mat->diffuseColor.emplace_back(r, g, b); } - if (mat->diffuseColor.size() == getMeshObjectPtr()->countPoints()) + if (mat->diffuseColor.size() == getMeshObjectPtr()->countPoints()) { mat->binding = MeshCore::MeshIO::PER_VERTEX; - else if (mat->diffuseColor.size() == getMeshObjectPtr()->countFacets()) + } + else if (mat->diffuseColor.size() == getMeshObjectPtr()->countFacets()) { mat->binding = MeshCore::MeshIO::PER_FACE; - else + } + else { mat->binding = MeshCore::MeshIO::OVERALL; + } } // write mesh @@ -299,11 +345,12 @@ PyObject* MeshPy::write(PyObject *args, PyObject *kwds) return nullptr; } -PyObject* MeshPy::writeInventor(PyObject *args) +PyObject* MeshPy::writeInventor(PyObject* args) { - float creaseangle=0.0f; - if (!PyArg_ParseTuple(args, "|f",&creaseangle)) + float creaseangle = 0.0f; + if (!PyArg_ParseTuple(args, "|f", &creaseangle)) { return nullptr; + } std::stringstream result; MeshObject* mesh = getMeshObjectPtr(); @@ -311,39 +358,46 @@ PyObject* MeshPy::writeInventor(PyObject *args) return Py::new_reference_to(Py::String(result.str())); } -PyObject* MeshPy::offset(PyObject *args) +PyObject* MeshPy::offset(PyObject* args) { float Float; - if (!PyArg_ParseTuple(args, "f",&Float)) + if (!PyArg_ParseTuple(args, "f", &Float)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->offsetSpecial2(Float); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::offsetSpecial(PyObject *args) +PyObject* MeshPy::offsetSpecial(PyObject* args) { - float Float,zmin,zmax; - if (!PyArg_ParseTuple(args, "fff",&Float,&zmin,&zmax)) + float Float, zmin, zmax; + if (!PyArg_ParseTuple(args, "fff", &Float, &zmin, &zmax)) { return nullptr; + } - PY_TRY { - getMeshObjectPtr()->offsetSpecial(Float,zmax,zmin); - } PY_CATCH; + PY_TRY + { + getMeshObjectPtr()->offsetSpecial(Float, zmax, zmin); + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::crossSections(PyObject *args) +PyObject* MeshPy::crossSections(PyObject* args) { - PyObject *obj; - PyObject *poly=Py_False; + PyObject* obj; + PyObject* poly = Py_False; float min_eps = 1.0e-2f; - if (!PyArg_ParseTuple(args, "O|fO!", &obj, &min_eps, &PyBool_Type, &poly)) + if (!PyArg_ParseTuple(args, "O|fO!", &obj, &min_eps, &PyBool_Type, &poly)) { return nullptr; + } Py::Sequence list(obj); Py::Type vType(Base::getTypeAsObject(&Base::VectorPy::Type)); @@ -357,8 +411,8 @@ PyObject* MeshPy::crossSections(PyObject *args) MeshObject::TPlane plane; Base::Vector3d b = static_cast(p1.ptr())->value(); Base::Vector3d n = static_cast(p2.ptr())->value(); - plane.first.Set((float)b.x,(float)b.y,(float)b.z); - plane.second.Set((float)n.x,(float)n.y,(float)n.z); + plane.first.Set((float)b.x, (float)b.y, (float)b.z); + plane.second.Set((float)n.x, (float)n.y, (float)n.z); csPlanes.push_back(plane); } else if (p1.isTuple() && p2.isTuple()) { @@ -372,8 +426,8 @@ PyObject* MeshPy::crossSections(PyObject *args) float nz = (float)Py::Float(n.getItem(2)); MeshObject::TPlane plane; - plane.first .Set(bx,by,bz); - plane.second.Set(nx,ny,nz); + plane.first.Set(bx, by, bz); + plane.second.Set(nx, ny, nz); csPlanes.push_back(plane); } } @@ -383,9 +437,9 @@ PyObject* MeshPy::crossSections(PyObject *args) // convert to Python objects Py::List crossSections; - for (const auto & it : sections) { + for (const auto& it : sections) { Py::List section; - for (const auto & jt : it) { + for (const auto& jt : it) { Py::List polyline; for (auto kt : jt) { polyline.append(Py::asObject(new Base::VectorPy(kt))); @@ -398,106 +452,134 @@ PyObject* MeshPy::crossSections(PyObject *args) return Py::new_reference_to(crossSections); } -PyObject* MeshPy::unite(PyObject *args) +PyObject* MeshPy::unite(PyObject* args) { - MeshPy *pcObject; - PyObject *pcObj; - if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) + MeshPy* pcObject; + PyObject* pcObj; + if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) { return nullptr; + } pcObject = static_cast(pcObj); - PY_TRY { + PY_TRY + { MeshObject* mesh = getMeshObjectPtr()->unite(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::intersect(PyObject *args) +PyObject* MeshPy::intersect(PyObject* args) { - MeshPy *pcObject; - PyObject *pcObj; - if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) + MeshPy* pcObject; + PyObject* pcObj; + if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) { return nullptr; + } pcObject = static_cast(pcObj); - PY_TRY { + PY_TRY + { MeshObject* mesh = getMeshObjectPtr()->intersect(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::difference(PyObject *args) +PyObject* MeshPy::difference(PyObject* args) { - MeshPy *pcObject; - PyObject *pcObj; - if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) + MeshPy* pcObject; + PyObject* pcObj; + if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) { return nullptr; + } pcObject = static_cast(pcObj); - PY_TRY { + PY_TRY + { MeshObject* mesh = getMeshObjectPtr()->subtract(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::inner(PyObject *args) +PyObject* MeshPy::inner(PyObject* args) { - MeshPy *pcObject; - PyObject *pcObj; - if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) + MeshPy* pcObject; + PyObject* pcObj; + if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) { return nullptr; + } pcObject = static_cast(pcObj); - PY_TRY { + PY_TRY + { MeshObject* mesh = getMeshObjectPtr()->inner(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::outer(PyObject *args) +PyObject* MeshPy::outer(PyObject* args) { - MeshPy *pcObject; - PyObject *pcObj; - if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) + MeshPy* pcObject; + PyObject* pcObj; + if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &pcObj)) { return nullptr; + } pcObject = static_cast(pcObj); - PY_TRY { + PY_TRY + { MeshObject* mesh = getMeshObjectPtr()->outer(*pcObject->getMeshObjectPtr()); return new MeshPy(mesh); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::section(PyObject *args, PyObject *kwds) +PyObject* MeshPy::section(PyObject* args, PyObject* kwds) { - PyObject *pcObj; - PyObject *connectLines = Py_True; + PyObject* pcObj; + PyObject* connectLines = Py_True; float fMinDist = 0.0001f; - static const std::array keywords_section {"Mesh", "ConnectLines", "MinDist", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "O!|O!f",keywords_section, - &(MeshPy::Type), &pcObj, &PyBool_Type, &connectLines, &fMinDist)) { + static const std::array keywords_section {"Mesh", + "ConnectLines", + "MinDist", + nullptr}; + if (!Base::Wrapped_ParseTupleAndKeywords(args, + kwds, + "O!|O!f", + keywords_section, + &(MeshPy::Type), + &pcObj, + &PyBool_Type, + &connectLines, + &fMinDist)) { return nullptr; } MeshPy* pcObject = static_cast(pcObj); - std::vector< std::vector > curves = getMeshObjectPtr()->section(*pcObject->getMeshObjectPtr(), Base::asBoolean(connectLines), fMinDist); + std::vector> curves = + getMeshObjectPtr()->section(*pcObject->getMeshObjectPtr(), + Base::asBoolean(connectLines), + fMinDist); Py::List outer; for (const auto& it : curves) { Py::List inner; @@ -510,71 +592,83 @@ PyObject* MeshPy::section(PyObject *args, PyObject *kwds) return Py::new_reference_to(outer); } -PyObject* MeshPy::coarsen(PyObject *args) +PyObject* MeshPy::coarsen(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } PyErr_SetString(PyExc_NotImplementedError, "Not yet implemented"); return nullptr; } -PyObject* MeshPy::translate(PyObject *args) +PyObject* MeshPy::translate(PyObject* args) { - float x,y,z; - if (!PyArg_ParseTuple(args, "fff",&x,&y,&z)) + float x, y, z; + if (!PyArg_ParseTuple(args, "fff", &x, &y, &z)) { return nullptr; + } - PY_TRY { + PY_TRY + { Base::Matrix4D m; - m.move(x,y,z); + m.move(x, y, z); getMeshObjectPtr()->getKernel().Transform(m); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::rotate(PyObject *args) +PyObject* MeshPy::rotate(PyObject* args) { - double x,y,z; - if (!PyArg_ParseTuple(args, "ddd",&x,&y,&z)) + double x, y, z; + if (!PyArg_ParseTuple(args, "ddd", &x, &y, &z)) { return nullptr; + } - PY_TRY { + PY_TRY + { Base::Matrix4D m; m.rotX(x); m.rotY(y); m.rotZ(z); getMeshObjectPtr()->getKernel().Transform(m); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::transform(PyObject *args) +PyObject* MeshPy::transform(PyObject* args) { - PyObject *mat; - if (!PyArg_ParseTuple(args, "O!",&(Base::MatrixPy::Type), &mat)) + PyObject* mat; + if (!PyArg_ParseTuple(args, "O!", &(Base::MatrixPy::Type), &mat)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->getKernel().Transform(static_cast(mat)->value()); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::transformToEigen(PyObject *args) +PyObject* MeshPy::transformToEigen(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getMeshObjectPtr()->transformToEigenSystem(); Py_Return; } -PyObject* MeshPy::getEigenSystem(PyObject *args) +PyObject* MeshPy::getEigenSystem(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } Base::Vector3d vec; Base::Matrix4D mat = getMeshObjectPtr()->getEigenSystem(vec); Py::Tuple t(2); @@ -583,35 +677,40 @@ PyObject* MeshPy::getEigenSystem(PyObject *args) return Py::new_reference_to(t); } -PyObject* MeshPy::addFacet(PyObject *args) +PyObject* MeshPy::addFacet(PyObject* args) { - double x1,y1,z1,x2,y2,z2,x3,y3,z3; - if (PyArg_ParseTuple(args, "ddddddddd",&x1,&y1,&z1,&x2,&y2,&z2,&x3,&y3,&z3)) { - getMeshObjectPtr()->addFacet(MeshCore::MeshGeomFacet( - Base::Vector3f((float)x1,(float)y1,(float)z1), - Base::Vector3f((float)x2,(float)y2,(float)z2), - Base::Vector3f((float)x3,(float)y3,(float)z3))); + double x1, y1, z1, x2, y2, z2, x3, y3, z3; + if (PyArg_ParseTuple(args, "ddddddddd", &x1, &y1, &z1, &x2, &y2, &z2, &x3, &y3, &z3)) { + getMeshObjectPtr()->addFacet( + MeshCore::MeshGeomFacet(Base::Vector3f((float)x1, (float)y1, (float)z1), + Base::Vector3f((float)x2, (float)y2, (float)z2), + Base::Vector3f((float)x3, (float)y3, (float)z3))); Py_Return; } PyErr_Clear(); PyObject *v1, *v2, *v3; - if (PyArg_ParseTuple(args, "O!O!O!",&(Base::VectorPy::Type), &v1, - &(Base::VectorPy::Type), &v2, - &(Base::VectorPy::Type), &v3)) { - Base::Vector3d *p1 = static_cast(v1)->getVectorPtr(); - Base::Vector3d *p2 = static_cast(v2)->getVectorPtr(); - Base::Vector3d *p3 = static_cast(v3)->getVectorPtr(); - getMeshObjectPtr()->addFacet(MeshCore::MeshGeomFacet( - Base::Vector3f((float)p1->x,(float)p1->y,(float)p1->z), - Base::Vector3f((float)p2->x,(float)p2->y,(float)p2->z), - Base::Vector3f((float)p3->x,(float)p3->y,(float)p3->z))); + if (PyArg_ParseTuple(args, + "O!O!O!", + &(Base::VectorPy::Type), + &v1, + &(Base::VectorPy::Type), + &v2, + &(Base::VectorPy::Type), + &v3)) { + Base::Vector3d* p1 = static_cast(v1)->getVectorPtr(); + Base::Vector3d* p2 = static_cast(v2)->getVectorPtr(); + Base::Vector3d* p3 = static_cast(v3)->getVectorPtr(); + getMeshObjectPtr()->addFacet( + MeshCore::MeshGeomFacet(Base::Vector3f((float)p1->x, (float)p1->y, (float)p1->z), + Base::Vector3f((float)p2->x, (float)p2->y, (float)p2->z), + Base::Vector3f((float)p3->x, (float)p3->y, (float)p3->z))); Py_Return; } PyErr_Clear(); - PyObject *f; - if (PyArg_ParseTuple(args, "O!",&(Mesh::FacetPy::Type), &f)) { + PyObject* f; + if (PyArg_ParseTuple(args, "O!", &(Mesh::FacetPy::Type), &f)) { Mesh::FacetPy* face = static_cast(f); getMeshObjectPtr()->addFacet(*face->getFacetPtr()); Py_Return; @@ -621,9 +720,9 @@ PyObject* MeshPy::addFacet(PyObject *args) return nullptr; } -PyObject* MeshPy::addFacets(PyObject *args) +PyObject* MeshPy::addFacets(PyObject* args) { - PyObject *list; + PyObject* list; if (PyArg_ParseTuple(args, "O!", &PyList_Type, &list)) { Py::List list_f(list); Py::Type vVType(Base::getTypeAsObject(&Base::VectorPy::Type)); @@ -649,15 +748,15 @@ PyObject* MeshPy::addFacets(PyObject *args) } else if (seq[0].isSequence()) { // a sequence of sequence of flots - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { facet._aclPoints[i] = Base::getVectorFromTuple(seq[i].ptr()); } } else if (PyObject_TypeCheck(seq[0].ptr(), &(Base::VectorPy::Type))) { // a sequence of vectors - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { Base::Vector3d p = Py::Vector(seq[i]).toVector(); - facet._aclPoints[i].Set((float)p.x,(float)p.y,(float)p.z); + facet._aclPoints[i].Set((float)p.x, (float)p.y, (float)p.z); } } else { @@ -670,8 +769,8 @@ PyObject* MeshPy::addFacets(PyObject *args) } else { // 9 consecutive floats expected - int index=0; - for (auto & point : facet._aclPoints) { + int index = 0; + for (auto& point : facet._aclPoints) { point.x = (float)(double)Py::Float(seq[index++]); point.y = (float)(double)Py::Float(seq[index++]); point.z = (float)(double)Py::Float(seq[index++]); @@ -679,7 +778,7 @@ PyObject* MeshPy::addFacets(PyObject *args) facet.CalcNormal(); facets.push_back(facet); } - } // sequence + } // sequence } getMeshObjectPtr()->addFacets(facets); @@ -687,7 +786,7 @@ PyObject* MeshPy::addFacets(PyObject *args) } PyErr_Clear(); - PyObject *check = Py_True; + PyObject* check = Py_True; if (PyArg_ParseTuple(args, "O!|O!", &PyTuple_Type, &list, &PyBool_Type, &check)) { Py::Tuple tuple(list); Py::List list_v(tuple.getItem(0)); @@ -696,7 +795,7 @@ PyObject* MeshPy::addFacets(PyObject *args) for (Py::List::iterator it = list_v.begin(); it != list_v.end(); ++it) { if ((*it).isType(vType)) { Base::Vector3d v = static_cast((*it).ptr())->value(); - vertices.emplace_back((float)v.x,(float)v.y,(float)v.z); + vertices.emplace_back((float)v.x, (float)v.y, (float)v.z); } } @@ -716,17 +815,19 @@ PyObject* MeshPy::addFacets(PyObject *args) Py_Return; } - PyErr_SetString(PyExc_TypeError, "either expect\n" - "-- [Vector] (3 of them define a facet)\n" - "-- ([Vector],[(int,int,int)])"); + PyErr_SetString(PyExc_TypeError, + "either expect\n" + "-- [Vector] (3 of them define a facet)\n" + "-- ([Vector],[(int,int,int)])"); return nullptr; } -PyObject* MeshPy::removeFacets(PyObject *args) +PyObject* MeshPy::removeFacets(PyObject* args) { PyObject* list; - if (!PyArg_ParseTuple(args, "O", &list)) + if (!PyArg_ParseTuple(args, "O", &list)) { return nullptr; + } std::vector indices; Py::Sequence ary(list); @@ -739,10 +840,11 @@ PyObject* MeshPy::removeFacets(PyObject *args) Py_Return; } -PyObject* MeshPy::getInternalFacets(PyObject *args) +PyObject* MeshPy::getInternalFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); MeshCore::MeshEvalInternalFacets eval(kernel); @@ -750,7 +852,7 @@ PyObject* MeshPy::getInternalFacets(PyObject *args) const std::vector& indices = eval.GetIndices(); Py::List ary(indices.size()); - Py::List::size_type pos=0; + Py::List::size_type pos = 0; for (FacetIndex index : indices) { ary[pos++] = Py::Long(index); } @@ -758,92 +860,102 @@ PyObject* MeshPy::getInternalFacets(PyObject *args) return Py::new_reference_to(ary); } -PyObject* MeshPy::rebuildNeighbourHood(PyObject *args) +PyObject* MeshPy::rebuildNeighbourHood(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); kernel.RebuildNeighbours(); Py_Return; } -PyObject* MeshPy::addMesh(PyObject *args) +PyObject* MeshPy::addMesh(PyObject* args) { PyObject* mesh; - if (!PyArg_ParseTuple(args, "O!",&(MeshPy::Type), &mesh)) + if (!PyArg_ParseTuple(args, "O!", &(MeshPy::Type), &mesh)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->addMesh(*static_cast(mesh)->getMeshObjectPtr()); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::setPoint(PyObject *args) +PyObject* MeshPy::setPoint(PyObject* args) { unsigned long index; PyObject* pnt; - if (!PyArg_ParseTuple(args, "kO!",&index, &(Base::VectorPy::Type), &pnt)) + if (!PyArg_ParseTuple(args, "kO!", &index, &(Base::VectorPy::Type), &pnt)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->setPoint(index, static_cast(pnt)->value()); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::movePoint(PyObject *args) +PyObject* MeshPy::movePoint(PyObject* args) { unsigned long index; Base::Vector3d vec; do { - double x=0.0,y=0.0,z=0.0; - if (PyArg_ParseTuple(args, "kddd", &index,&x,&y,&z)) { - vec.Set(x,y,z); + double x = 0.0, y = 0.0, z = 0.0; + if (PyArg_ParseTuple(args, "kddd", &index, &x, &y, &z)) { + vec.Set(x, y, z); break; } - PyErr_Clear(); // set by PyArg_ParseTuple() - PyObject *object; - if (PyArg_ParseTuple(args,"kO!", &index, &(Base::VectorPy::Type), &object)) { + PyErr_Clear(); // set by PyArg_ParseTuple() + PyObject* object; + if (PyArg_ParseTuple(args, "kO!", &index, &(Base::VectorPy::Type), &object)) { vec = *(static_cast(object)->getVectorPtr()); break; } PyErr_SetString(PyExc_TypeError, "Tuple of three floats or Vector expected"); return nullptr; - } - while (false); + } while (false); getMeshObjectPtr()->movePoint(index, vec); Py_Return; } -PyObject* MeshPy::getPointNormals(PyObject *args) +PyObject* MeshPy::getPointNormals(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { std::vector normals = getMeshObjectPtr()->getPointNormals(); Py::Tuple ary(normals.size()); std::size_t numNormals = normals.size(); - for (std::size_t i=0; i segment; @@ -852,28 +964,31 @@ PyObject* MeshPy::addSegment(PyObject *args) for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) { Py::Long value(*it); Mesh::FacetIndex index = static_cast(value); - if (index < numFacets) + if (index < numFacets) { segment.push_back(index); + } } getMeshObjectPtr()->addSegment(segment); Py_Return; } -PyObject* MeshPy::countSegments(PyObject *args) +PyObject* MeshPy::countSegments(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } unsigned long count = getMeshObjectPtr()->countSegments(); - return Py_BuildValue("k",count); + return Py_BuildValue("k", count); } -PyObject* MeshPy::getSegment(PyObject *args) +PyObject* MeshPy::getSegment(PyObject* args) { unsigned long index; - if (!PyArg_ParseTuple(args, "k", &index)) + if (!PyArg_ParseTuple(args, "k", &index)) { return nullptr; + } unsigned long count = getMeshObjectPtr()->countSegments(); if (index >= count) { @@ -890,25 +1005,27 @@ PyObject* MeshPy::getSegment(PyObject *args) return Py::new_reference_to(ary); } -PyObject* MeshPy::getSeparateComponents(PyObject *args) +PyObject* MeshPy::getSeparateComponents(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } Py::List meshesList; - std::vector > segs; + std::vector> segs; segs = getMeshObjectPtr()->getComponents(); - for (const auto & it : segs) { + for (const auto& it : segs) { MeshObject* mesh = getMeshObjectPtr()->meshFromSegment(it); - meshesList.append(Py::Object(new MeshPy(mesh),true)); + meshesList.append(Py::Object(new MeshPy(mesh), true)); } return Py::new_reference_to(meshesList); } -PyObject* MeshPy::getFacetSelection(PyObject *args) +PyObject* MeshPy::getFacetSelection(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } Py::List ary; std::vector facets; @@ -920,10 +1037,11 @@ PyObject* MeshPy::getFacetSelection(PyObject *args) return Py::new_reference_to(ary); } -PyObject* MeshPy::getPointSelection(PyObject *args) +PyObject* MeshPy::getPointSelection(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } Py::List ary; std::vector points; @@ -935,11 +1053,12 @@ PyObject* MeshPy::getPointSelection(PyObject *args) return Py::new_reference_to(ary); } -PyObject* MeshPy::meshFromSegment(PyObject *args) +PyObject* MeshPy::meshFromSegment(PyObject* args) { PyObject* list; - if (!PyArg_ParseTuple(args, "O", &list)) + if (!PyArg_ParseTuple(args, "O", &list)) { return nullptr; + } std::vector segment; Py::Sequence ary(list); @@ -953,92 +1072,103 @@ PyObject* MeshPy::meshFromSegment(PyObject *args) return new MeshPy(mesh); } -PyObject* MeshPy::clear(PyObject *args) +PyObject* MeshPy::clear(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getMeshObjectPtr()->clear(); Py_Return; } -PyObject* MeshPy::isSolid(PyObject *args) +PyObject* MeshPy::isSolid(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->isSolid(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::hasNonManifolds(PyObject *args) +PyObject* MeshPy::hasNonManifolds(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasNonManifolds(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::hasInvalidNeighbourhood(PyObject *args) +PyObject* MeshPy::hasInvalidNeighbourhood(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasInvalidNeighbourhood(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::hasPointsOutOfRange(PyObject *args) +PyObject* MeshPy::hasPointsOutOfRange(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasPointsOutOfRange(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::hasFacetsOutOfRange(PyObject *args) +PyObject* MeshPy::hasFacetsOutOfRange(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasFacetsOutOfRange(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::hasCorruptedFacets(PyObject *args) +PyObject* MeshPy::hasCorruptedFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasFacetsOutOfRange(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::removeNonManifolds(PyObject *args) +PyObject* MeshPy::removeNonManifolds(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getMeshObjectPtr()->removeNonManifolds(); Py_Return; } -PyObject* MeshPy::removeNonManifoldPoints(PyObject *args) +PyObject* MeshPy::removeNonManifoldPoints(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } getMeshObjectPtr()->removeNonManifoldPoints(); Py_Return; } -PyObject* MeshPy::hasSelfIntersections(PyObject *args) +PyObject* MeshPy::hasSelfIntersections(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasSelfIntersections(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::getSelfIntersections(PyObject *args) +PyObject* MeshPy::getSelfIntersections(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - std::vector > selfIndices; + std::vector> selfIndices; std::vector selfLines; selfIndices = getMeshObjectPtr()->getSelfIntersections(); @@ -1046,7 +1176,7 @@ PyObject* MeshPy::getSelfIntersections(PyObject *args) Py::Tuple tuple(selfIndices.size()); if (selfIndices.size() == selfLines.size()) { - for (std::size_t i=0; iremoveSelfIntersections(); } @@ -1073,10 +1204,11 @@ PyObject* MeshPy::fixSelfIntersections(PyObject *args) Py_Return; } -PyObject* MeshPy::removeFoldsOnSurface(PyObject *args) +PyObject* MeshPy::removeFoldsOnSurface(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { getMeshObjectPtr()->removeFoldsOnSurface(); } @@ -1087,18 +1219,20 @@ PyObject* MeshPy::removeFoldsOnSurface(PyObject *args) Py_Return; } -PyObject* MeshPy::hasInvalidPoints(PyObject *args) +PyObject* MeshPy::hasInvalidPoints(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasInvalidPoints(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::removeInvalidPoints(PyObject *args) +PyObject* MeshPy::removeInvalidPoints(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } try { getMeshObjectPtr()->removeInvalidPoints(); } @@ -1109,19 +1243,25 @@ PyObject* MeshPy::removeInvalidPoints(PyObject *args) Py_Return; } -PyObject* MeshPy::hasPointsOnEdge(PyObject *args) +PyObject* MeshPy::hasPointsOnEdge(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->hasPointsOnEdge(); return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::removePointsOnEdge(PyObject *args, PyObject *kwds) +PyObject* MeshPy::removePointsOnEdge(PyObject* args, PyObject* kwds) { - PyObject *fillBoundary = Py_False; // NOLINT - static const std::array keywords {"FillBoundary", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "|O!", keywords, &PyBool_Type, &fillBoundary)) { + PyObject* fillBoundary = Py_False; // NOLINT + static const std::array keywords {"FillBoundary", nullptr}; + if (!Base::Wrapped_ParseTupleAndKeywords(args, + kwds, + "|O!", + keywords, + &PyBool_Type, + &fillBoundary)) { return nullptr; } try { @@ -1134,104 +1274,118 @@ PyObject* MeshPy::removePointsOnEdge(PyObject *args, PyObject *kwds) Py_Return; } -PyObject* MeshPy::flipNormals(PyObject *args) +PyObject* MeshPy::flipNormals(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->flipNormals(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::hasNonUniformOrientedFacets(PyObject *args) +PyObject* MeshPy::hasNonUniformOrientedFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } bool ok = getMeshObjectPtr()->countNonUniformOrientedFacets() > 0; return Py_BuildValue("O", (ok ? Py_True : Py_False)); } -PyObject* MeshPy::countNonUniformOrientedFacets(PyObject *args) +PyObject* MeshPy::countNonUniformOrientedFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } unsigned long count = getMeshObjectPtr()->countNonUniformOrientedFacets(); return Py_BuildValue("k", count); } -PyObject* MeshPy::getNonUniformOrientedFacets(PyObject *args) +PyObject* MeshPy::getNonUniformOrientedFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); MeshCore::MeshEvalOrientation cMeshEval(kernel); std::vector inds = cMeshEval.GetIndices(); Py::Tuple tuple(inds.size()); - for (std::size_t i=0; iparentProperty); getMeshObjectPtr()->harmonizeNormals(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::countComponents(PyObject *args) +PyObject* MeshPy::countComponents(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } unsigned long count = getMeshObjectPtr()->countComponents(); - return Py_BuildValue("k",count); + return Py_BuildValue("k", count); } -PyObject* MeshPy::removeComponents(PyObject *args) +PyObject* MeshPy::removeComponents(PyObject* args) { unsigned long count; - if (!PyArg_ParseTuple(args, "k", &count)) + if (!PyArg_ParseTuple(args, "k", &count)) { return nullptr; + } - PY_TRY { + PY_TRY + { if (count > 0) { getMeshObjectPtr()->removeComponents(count); } - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::fillupHoles(PyObject *args) +PyObject* MeshPy::fillupHoles(PyObject* args) { unsigned long len; int level = 0; float max_area = 0.0f; - if (!PyArg_ParseTuple(args, "k|if", &len,&level,&max_area)) + if (!PyArg_ParseTuple(args, "k|if", &len, &level, &max_area)) { return nullptr; + } try { std::unique_ptr tria; if (max_area > 0.0f) { - tria = std::unique_ptr - (new MeshCore::ConstraintDelaunayTriangulator(max_area)); + tria = std::unique_ptr( + new MeshCore::ConstraintDelaunayTriangulator(max_area)); } else { - tria = std::unique_ptr - (new MeshCore::FlatTriangulator()); + tria = std::unique_ptr( + new MeshCore::FlatTriangulator()); } MeshPropertyLock lock(this->parentProperty); @@ -1246,184 +1400,228 @@ PyObject* MeshPy::fillupHoles(PyObject *args) Py_Return; } -PyObject* MeshPy::fixIndices(PyObject *args) +PyObject* MeshPy::fixIndices(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->validateIndices(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::fixCaps(PyObject *args) +PyObject* MeshPy::fixCaps(PyObject* args) { float fMaxAngle = Base::toRadians(150.0f); float fSplitFactor = 0.25f; - if (!PyArg_ParseTuple(args, "|ff", &fMaxAngle, &fSplitFactor)) + if (!PyArg_ParseTuple(args, "|ff", &fMaxAngle, &fSplitFactor)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->validateCaps(fMaxAngle, fSplitFactor); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::fixDeformations(PyObject *args) +PyObject* MeshPy::fixDeformations(PyObject* args) { float fMaxAngle; float fEpsilon = MeshCore::MeshDefinitions::_fMinPointDistanceP2; - if (!PyArg_ParseTuple(args, "f|f", &fMaxAngle, &fEpsilon)) + if (!PyArg_ParseTuple(args, "f|f", &fMaxAngle, &fEpsilon)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->validateDeformations(fMaxAngle, fEpsilon); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::fixDegenerations(PyObject *args) +PyObject* MeshPy::fixDegenerations(PyObject* args) { float fEpsilon = MeshCore::MeshDefinitions::_fMinPointDistanceP2; - if (!PyArg_ParseTuple(args, "|f", &fEpsilon)) + if (!PyArg_ParseTuple(args, "|f", &fEpsilon)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->validateDegenerations(fEpsilon); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::removeDuplicatedPoints(PyObject *args) +PyObject* MeshPy::removeDuplicatedPoints(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->removeDuplicatedPoints(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::removeDuplicatedFacets(PyObject *args) +PyObject* MeshPy::removeDuplicatedFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->removeDuplicatedFacets(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::refine(PyObject *args) +PyObject* MeshPy::refine(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->refine(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::removeNeedles(PyObject *args) +PyObject* MeshPy::removeNeedles(PyObject* args) { float length; - if (!PyArg_ParseTuple(args, "f", &length)) + if (!PyArg_ParseTuple(args, "f", &length)) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->removeNeedles(length); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::removeFullBoundaryFacets(PyObject *args) +PyObject* MeshPy::removeFullBoundaryFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->removeFullBoundaryFacets(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::mergeFacets(PyObject *args) +PyObject* MeshPy::mergeFacets(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->mergeFacets(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::optimizeTopology(PyObject *args) +PyObject* MeshPy::optimizeTopology(PyObject* args) { - float fMaxAngle=-1.0f; - if (!PyArg_ParseTuple(args, "|f; specify the maximum allowed angle between the normals of two adjacent facets", &fMaxAngle)) + float fMaxAngle = -1.0f; + if (!PyArg_ParseTuple( + args, + "|f; specify the maximum allowed angle between the normals of two adjacent facets", + &fMaxAngle)) { return nullptr; + } - PY_TRY { + PY_TRY + { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->optimizeTopology(fMaxAngle); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::optimizeEdges(PyObject *args) +PyObject* MeshPy::optimizeEdges(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { MeshPropertyLock lock(this->parentProperty); getMeshObjectPtr()->optimizeEdges(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::splitEdges(PyObject *args) +PyObject* MeshPy::splitEdges(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } - PY_TRY { + PY_TRY + { getMeshObjectPtr()->splitEdges(); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::splitEdge(PyObject *args) +PyObject* MeshPy::splitEdge(PyObject* args) { unsigned long facet, neighbour; PyObject* vertex; - if (!PyArg_ParseTuple(args, "kkO!", &facet, &neighbour, &Base::VectorPy::Type, &vertex)) + if (!PyArg_ParseTuple(args, "kkO!", &facet, &neighbour, &Base::VectorPy::Type, &vertex)) { return nullptr; + } - Base::VectorPy *pcObject = static_cast(vertex); + Base::VectorPy* pcObject = static_cast(vertex); Base::Vector3d* val = pcObject->getVectorPtr(); - Base::Vector3f v((float)val->x,(float)val->y,(float)val->z); + Base::Vector3f v((float)val->x, (float)val->y, (float)val->z); const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); - PY_TRY { + PY_TRY + { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return nullptr; @@ -1434,56 +1632,67 @@ PyObject* MeshPy::splitEdge(PyObject *args) } const MeshCore::MeshFacet& rclF = kernel.GetFacets()[facet]; - if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour && - rclF._aulNeighbours[2] != neighbour) { + if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour + && rclF._aulNeighbours[2] != neighbour) { PyErr_SetString(PyExc_IndexError, "No adjacent facets"); return nullptr; } getMeshObjectPtr()->splitEdge(facet, neighbour, v); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::splitFacet(PyObject *args) +PyObject* MeshPy::splitFacet(PyObject* args) { unsigned long facet; PyObject* vertex1; PyObject* vertex2; - if (!PyArg_ParseTuple(args, "kO!O!", &facet, &Base::VectorPy::Type, &vertex1, - &Base::VectorPy::Type, &vertex2)) + if (!PyArg_ParseTuple(args, + "kO!O!", + &facet, + &Base::VectorPy::Type, + &vertex1, + &Base::VectorPy::Type, + &vertex2)) { return nullptr; + } - Base::VectorPy *pcObject = static_cast(vertex1); + Base::VectorPy* pcObject = static_cast(vertex1); Base::Vector3d* val = pcObject->getVectorPtr(); - Base::Vector3f v1((float)val->x,(float)val->y,(float)val->z); + Base::Vector3f v1((float)val->x, (float)val->y, (float)val->z); pcObject = static_cast(vertex2); val = pcObject->getVectorPtr(); - Base::Vector3f v2((float)val->x,(float)val->y,(float)val->z); + Base::Vector3f v2((float)val->x, (float)val->y, (float)val->z); const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); - PY_TRY { + PY_TRY + { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return nullptr; } getMeshObjectPtr()->splitFacet(facet, v1, v2); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::swapEdge(PyObject *args) +PyObject* MeshPy::swapEdge(PyObject* args) { unsigned long facet, neighbour; - if (!PyArg_ParseTuple(args, "kk", &facet, &neighbour)) + if (!PyArg_ParseTuple(args, "kk", &facet, &neighbour)) { return nullptr; + } const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); - PY_TRY { + PY_TRY + { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return nullptr; @@ -1494,26 +1703,29 @@ PyObject* MeshPy::swapEdge(PyObject *args) } const MeshCore::MeshFacet& rclF = kernel.GetFacets()[facet]; - if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour && - rclF._aulNeighbours[2] != neighbour) { + if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour + && rclF._aulNeighbours[2] != neighbour) { PyErr_SetString(PyExc_IndexError, "No adjacent facets"); return nullptr; } getMeshObjectPtr()->swapEdge(facet, neighbour); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::collapseEdge(PyObject *args) +PyObject* MeshPy::collapseEdge(PyObject* args) { unsigned long facet, neighbour; - if (!PyArg_ParseTuple(args, "kk", &facet, &neighbour)) + if (!PyArg_ParseTuple(args, "kk", &facet, &neighbour)) { return nullptr; + } const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); - PY_TRY { + PY_TRY + { if (facet >= kernel.CountFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return nullptr; @@ -1524,94 +1736,106 @@ PyObject* MeshPy::collapseEdge(PyObject *args) } const MeshCore::MeshFacet& rclF = kernel.GetFacets()[facet]; - if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour && - rclF._aulNeighbours[2] != neighbour) { + if (rclF._aulNeighbours[0] != neighbour && rclF._aulNeighbours[1] != neighbour + && rclF._aulNeighbours[2] != neighbour) { PyErr_SetString(PyExc_IndexError, "No adjacent facets"); return nullptr; } getMeshObjectPtr()->collapseEdge(facet, neighbour); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::collapseFacet(PyObject *args) +PyObject* MeshPy::collapseFacet(PyObject* args) { unsigned long facet; - if (!PyArg_ParseTuple(args, "k", &facet)) + if (!PyArg_ParseTuple(args, "k", &facet)) { return nullptr; + } - PY_TRY { + PY_TRY + { if (facet >= getMeshObjectPtr()->countFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return nullptr; } getMeshObjectPtr()->collapseFacet(facet); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::insertVertex(PyObject *args) +PyObject* MeshPy::insertVertex(PyObject* args) { unsigned long facet; PyObject* vertex; - if (!PyArg_ParseTuple(args, "kO!", &facet, &Base::VectorPy::Type, &vertex)) + if (!PyArg_ParseTuple(args, "kO!", &facet, &Base::VectorPy::Type, &vertex)) { return nullptr; + } - Base::VectorPy *pcObject = static_cast(vertex); + Base::VectorPy* pcObject = static_cast(vertex); Base::Vector3d* val = pcObject->getVectorPtr(); - Base::Vector3f v((float)val->x,(float)val->y,(float)val->z); + Base::Vector3f v((float)val->x, (float)val->y, (float)val->z); - PY_TRY { + PY_TRY + { if (facet >= getMeshObjectPtr()->countFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return nullptr; } getMeshObjectPtr()->insertVertex(facet, v); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::snapVertex(PyObject *args) +PyObject* MeshPy::snapVertex(PyObject* args) { unsigned long facet; PyObject* vertex; - if (!PyArg_ParseTuple(args, "kO!", &facet, &Base::VectorPy::Type, &vertex)) + if (!PyArg_ParseTuple(args, "kO!", &facet, &Base::VectorPy::Type, &vertex)) { return nullptr; + } - Base::VectorPy *pcObject = static_cast(vertex); + Base::VectorPy* pcObject = static_cast(vertex); Base::Vector3d* val = pcObject->getVectorPtr(); - Base::Vector3f v((float)val->x,(float)val->y,(float)val->z); + Base::Vector3f v((float)val->x, (float)val->y, (float)val->z); - PY_TRY { + PY_TRY + { if (facet >= getMeshObjectPtr()->countFacets()) { PyErr_SetString(PyExc_IndexError, "Facet index out of range"); return nullptr; } getMeshObjectPtr()->snapVertex(facet, v); - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::printInfo(PyObject *args) +PyObject* MeshPy::printInfo(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } return Py_BuildValue("s", getMeshObjectPtr()->topologyInfo().c_str()); } -PyObject* MeshPy::collapseFacets(PyObject *args) +PyObject* MeshPy::collapseFacets(PyObject* args) { - PyObject *pcObj=nullptr; - if (!PyArg_ParseTuple(args, "O", &pcObj)) + PyObject* pcObj = nullptr; + if (!PyArg_ParseTuple(args, "O", &pcObj)) { return nullptr; + } // if no mesh is given try { @@ -1632,20 +1856,20 @@ PyObject* MeshPy::collapseFacets(PyObject *args) Py_Return; } -PyObject* MeshPy::foraminate(PyObject *args) +PyObject* MeshPy::foraminate(PyObject* args) { PyObject* pnt_p; PyObject* dir_p; double maxAngle = MeshCore::Mathd::PI; - if (!PyArg_ParseTuple(args, "OO|d", &pnt_p, &dir_p, &maxAngle)) + if (!PyArg_ParseTuple(args, "OO|d", &pnt_p, &dir_p, &maxAngle)) { return nullptr; + } try { Py::Vector pnt_t(pnt_p, false); Py::Vector dir_t(dir_p, false); - MeshObject::TRay ray = std::make_pair(pnt_t.toVector(), - dir_t.toVector()); + MeshObject::TRay ray = std::make_pair(pnt_t.toVector(), dir_t.toVector()); auto output = getMeshObjectPtr()->foraminate(ray, maxAngle); Py::Dict dict; @@ -1664,12 +1888,13 @@ PyObject* MeshPy::foraminate(PyObject *args) } } -PyObject* MeshPy::cut(PyObject *args) +PyObject* MeshPy::cut(PyObject* args) { PyObject* poly; int mode; - if (!PyArg_ParseTuple(args, "Oi", &poly, &mode)) + if (!PyArg_ParseTuple(args, "Oi", &poly, &mode)) { return nullptr; + } Py::Sequence list(poly); std::vector polygon; @@ -1691,19 +1916,21 @@ PyObject* MeshPy::cut(PyObject *args) Base::ViewProjMatrix proj(mat); Base::Polygon2d polygon2d; - for (auto it : polygon) + for (auto it : polygon) { polygon2d.Add(Base::Vector2d(it.x, it.y)); + } getMeshObjectPtr()->cut(polygon2d, proj, MeshObject::CutType(mode)); Py_Return; } -PyObject* MeshPy::trim(PyObject *args) +PyObject* MeshPy::trim(PyObject* args) { PyObject* poly; int mode; - if (!PyArg_ParseTuple(args, "Oi", &poly, &mode)) + if (!PyArg_ParseTuple(args, "Oi", &poly, &mode)) { return nullptr; + } Py::Sequence list(poly); std::vector polygon; @@ -1725,19 +1952,25 @@ PyObject* MeshPy::trim(PyObject *args) Base::ViewOrthoProjMatrix proj(mat); Base::Polygon2d polygon2d; - for (auto it : polygon) + for (auto it : polygon) { polygon2d.Add(Base::Vector2d(it.x, it.y)); + } getMeshObjectPtr()->trim(polygon2d, proj, MeshObject::CutType(mode)); Py_Return; } -PyObject* MeshPy::trimByPlane(PyObject *args) +PyObject* MeshPy::trimByPlane(PyObject* args) { PyObject *base, *norm; - if (!PyArg_ParseTuple(args, "O!O!", &Base::VectorPy::Type, &base, - &Base::VectorPy::Type, &norm)) + if (!PyArg_ParseTuple(args, + "O!O!", + &Base::VectorPy::Type, + &base, + &Base::VectorPy::Type, + &norm)) { return nullptr; + } Base::Vector3d pnt = Py::Vector(base, false).toVector(); Base::Vector3d dir = Py::Vector(norm, false).toVector(); @@ -1748,36 +1981,48 @@ PyObject* MeshPy::trimByPlane(PyObject *args) Py_Return; } -PyObject* MeshPy::smooth(PyObject *args, PyObject *kwds) +PyObject* MeshPy::smooth(PyObject* args, PyObject* kwds) { char* method = "Laplace"; - int iter=1; + int iter = 1; double lambda = 0; double micro = 0; double maximum = 1000; int weight = 1; - static const std::array keywords_smooth{"Method", "Iteration", "Lambda", "Micro", "Maximum", - "Weight", nullptr}; - if (!Base::Wrapped_ParseTupleAndKeywords(args, kwds, "|sidddi",keywords_smooth, - &method, &iter, &lambda, µ, &maximum, &weight)) { + static const std::array + keywords_smooth {"Method", "Iteration", "Lambda", "Micro", "Maximum", "Weight", nullptr}; + if (!Base::Wrapped_ParseTupleAndKeywords(args, + kwds, + "|sidddi", + keywords_smooth, + &method, + &iter, + &lambda, + µ, + &maximum, + &weight)) { return nullptr; } - PY_TRY { + PY_TRY + { MeshPropertyLock lock(this->parentProperty); MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); if (strcmp(method, "Laplace") == 0) { MeshCore::LaplaceSmoothing smooth(kernel); - if (lambda > 0) + if (lambda > 0) { smooth.SetLambda(lambda); + } smooth.Smooth(iter); } else if (strcmp(method, "Taubin") == 0) { MeshCore::TaubinSmoothing smooth(kernel); - if (lambda > 0) + if (lambda > 0) { smooth.SetLambda(lambda); - if (micro > 0) + } + if (micro > 0) { smooth.SetMicro(micro); + } smooth.Smooth(iter); } else if (strcmp(method, "PlaneFit") == 0) { @@ -1793,18 +2038,21 @@ PyObject* MeshPy::smooth(PyObject *args, PyObject *kwds) else { throw Py::ValueError("No such smoothing algorithm"); } - } PY_CATCH; + } + PY_CATCH; Py_Return; } -PyObject* MeshPy::decimate(PyObject *args) +PyObject* MeshPy::decimate(PyObject* args) { float fTol, fRed; - if (PyArg_ParseTuple(args, "ff", &fTol,&fRed)) { - PY_TRY { + if (PyArg_ParseTuple(args, "ff", &fTol, &fRed)) { + PY_TRY + { getMeshObjectPtr()->decimate(fTol, fRed); - } PY_CATCH; + } + PY_CATCH; Py_Return; } @@ -1812,32 +2060,35 @@ PyObject* MeshPy::decimate(PyObject *args) PyErr_Clear(); int targetSize; if (PyArg_ParseTuple(args, "i", &targetSize)) { - PY_TRY { + PY_TRY + { getMeshObjectPtr()->decimate(targetSize); - } PY_CATCH; + } + PY_CATCH; Py_Return; } - PyErr_SetString(PyExc_ValueError, "decimate(tolerance=float, reduction=float) or decimate(targetSize=int)"); + PyErr_SetString(PyExc_ValueError, + "decimate(tolerance=float, reduction=float) or decimate(targetSize=int)"); return nullptr; } -PyObject* MeshPy::nearestFacetOnRay(PyObject *args) +PyObject* MeshPy::nearestFacetOnRay(PyObject* args) { PyObject* pnt_p; PyObject* dir_p; double maxAngle = MeshCore::Mathd::PI; - if (!PyArg_ParseTuple(args, "OO|d", &pnt_p, &dir_p, &maxAngle)) + if (!PyArg_ParseTuple(args, "OO|d", &pnt_p, &dir_p, &maxAngle)) { return nullptr; + } try { Py::Vector pnt_t(pnt_p, false); Py::Vector dir_t(dir_p, false); Py::Dict dict; - MeshObject::TRay ray = std::make_pair(pnt_t.toVector(), - dir_t.toVector()); + MeshObject::TRay ray = std::make_pair(pnt_t.toVector(), dir_t.toVector()); MeshObject::TFaceSection output; if (getMeshObjectPtr()->nearestFacetOnRay(ray, maxAngle, output)) { Py::Tuple tuple(3); @@ -1854,19 +2105,20 @@ PyObject* MeshPy::nearestFacetOnRay(PyObject *args) } } -PyObject* MeshPy::getPlanarSegments(PyObject *args) +PyObject* MeshPy::getPlanarSegments(PyObject* args) { float dev; - unsigned long minFacets=0; - if (!PyArg_ParseTuple(args, "f|k",&dev,&minFacets)) + unsigned long minFacets = 0; + if (!PyArg_ParseTuple(args, "f|k", &dev, &minFacets)) { return nullptr; + } Mesh::MeshObject* mesh = getMeshObjectPtr(); - std::vector segments = mesh->getSegmentsOfType - (Mesh::MeshObject::PLANE, dev, minFacets); + std::vector segments = + mesh->getSegmentsOfType(Mesh::MeshObject::PLANE, dev, minFacets); Py::List s; - for (const auto & segment : segments) { + for (const auto& segment : segments) { const std::vector& segm = segment.getIndices(); Py::List ary; for (FacetIndex jt : segm) { @@ -1878,13 +2130,14 @@ PyObject* MeshPy::getPlanarSegments(PyObject *args) return Py::new_reference_to(s); } -PyObject* MeshPy::getSegmentsOfType(PyObject *args) +PyObject* MeshPy::getSegmentsOfType(PyObject* args) { char* type; float dev; - unsigned long minFacets=0; - if (!PyArg_ParseTuple(args, "sf|k",&type,&dev,&minFacets)) + unsigned long minFacets = 0; + if (!PyArg_ParseTuple(args, "sf|k", &type, &dev, &minFacets)) { return nullptr; + } Mesh::MeshObject::GeometryType geoType; if (strcmp(type, "Plane") == 0) { @@ -1902,11 +2155,10 @@ PyObject* MeshPy::getSegmentsOfType(PyObject *args) } Mesh::MeshObject* mesh = getMeshObjectPtr(); - std::vector segments = mesh->getSegmentsOfType - (geoType, dev, minFacets); + std::vector segments = mesh->getSegmentsOfType(geoType, dev, minFacets); Py::List s; - for (const auto & segment : segments) { + for (const auto& segment : segments) { const std::vector& segm = segment.getIndices(); Py::List ary; for (FacetIndex jt : segm) { @@ -1918,11 +2170,12 @@ PyObject* MeshPy::getSegmentsOfType(PyObject *args) return Py::new_reference_to(s); } -PyObject* MeshPy::getSegmentsByCurvature(PyObject *args) +PyObject* MeshPy::getSegmentsByCurvature(PyObject* args) { PyObject* l; - if (!PyArg_ParseTuple(args, "O",&l)) + if (!PyArg_ParseTuple(args, "O", &l)) { return nullptr; + } const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); MeshCore::MeshSegmentAlgorithm finder(kernel); @@ -1938,15 +2191,21 @@ PyObject* MeshPy::getSegmentsByCurvature(PyObject *args) float tol1 = (float)Py::Float(t[2]); float tol2 = (float)Py::Float(t[3]); int num = (int)Py::Long(t[4]); - segm.emplace_back(std::make_shared(meshCurv.GetCurvature(), num, tol1, tol2, c1, c2)); + segm.emplace_back( + std::make_shared(meshCurv.GetCurvature(), + num, + tol1, + tol2, + c1, + c2)); } finder.FindSegments(segm); Py::List list; - for (const auto & segmIt : segm) { + for (const auto& segmIt : segm) { const std::vector& data = segmIt->GetSegments(); - for (const auto & it : data) { + for (const auto& it : data) { Py::List ary; for (FacetIndex jt : it) { ary.append(Py::Long(int(jt))); @@ -1960,8 +2219,9 @@ PyObject* MeshPy::getSegmentsByCurvature(PyObject *args) PyObject* MeshPy::getCurvaturePerVertex(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } const MeshCore::MeshKernel& kernel = getMeshObjectPtr()->getKernel(); MeshCore::MeshCurvature meshCurv(kernel); @@ -2014,7 +2274,7 @@ Py::Float MeshPy::getVolume() const return Py::Float(getMeshObjectPtr()->getVolume()); } -PyObject *MeshPy::getCustomAttributes(const char* /*attr*/) const +PyObject* MeshPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } @@ -2027,10 +2287,12 @@ int MeshPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/) Py::List MeshPy::getPoints() const { Py::List PointList; - unsigned int Index=0; + unsigned int Index = 0; MeshObject* mesh = getMeshObjectPtr(); - for (MeshObject::const_point_iterator it = mesh->points_begin(); it != mesh->points_end(); ++it) { - PointList.append(Py::Object(new MeshPointPy(new MeshPoint(*it,getMeshObjectPtr(),Index++)), true)); + for (MeshObject::const_point_iterator it = mesh->points_begin(); it != mesh->points_end(); + ++it) { + PointList.append( + Py::Object(new MeshPointPy(new MeshPoint(*it, getMeshObjectPtr(), Index++)), true)); } return PointList; } @@ -2039,7 +2301,8 @@ Py::List MeshPy::getFacets() const { Py::List FacetList; MeshObject* mesh = getMeshObjectPtr(); - for (MeshObject::const_facet_iterator it = mesh->facets_begin(); it != mesh->facets_end(); ++it) { + for (MeshObject::const_facet_iterator it = mesh->facets_begin(); it != mesh->facets_end(); + ++it) { FacetList.append(Py::Object(new FacetPy(new Facet(*it)), true)); } return FacetList; @@ -2052,19 +2315,18 @@ Py::Tuple MeshPy::getTopology() const getMeshObjectPtr()->getFaces(Points, Facets, 0.0); Py::Tuple tuple(2); Py::List vertex; - for (const auto & Point : Points) + for (const auto& Point : Points) { vertex.append(Py::asObject(new Base::VectorPy(Point))); + } tuple.setItem(0, vertex); Py::List facet; for (auto it : Facets) { Py::Tuple f(3); - f.setItem(0,Py::Long((int)it.I1)); - f.setItem(1,Py::Long((int)it.I2)); - f.setItem(2,Py::Long((int)it.I3)); + f.setItem(0, Py::Long((int)it.I1)); + f.setItem(1, Py::Long((int)it.I2)); + f.setItem(2, Py::Long((int)it.I3)); facet.append(f); } tuple.setItem(1, facet); return tuple; } - - diff --git a/src/Mod/Mesh/App/MeshTestsApp.py b/src/Mod/Mesh/App/MeshTestsApp.py index ba34ba2574..9fb0afe095 100644 --- a/src/Mod/Mesh/App/MeshTestsApp.py +++ b/src/Mod/Mesh/App/MeshTestsApp.py @@ -11,6 +11,7 @@ import FreeCAD, unittest, Mesh import MeshEnums from FreeCAD import Base import time, tempfile, math + # http://python-kurs.eu/threads.php try: import _thread as thread @@ -19,9 +20,9 @@ except Exception: from os.path import join -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- # define the functions to test the FreeCAD mesh module -#--------------------------------------------------------------------------- +# --------------------------------------------------------------------------- class MeshTopoTestCases(unittest.TestCase): @@ -30,13 +31,12 @@ class MeshTopoTestCases(unittest.TestCase): self.planarMesh = [] for x in range(3): for y in range(3): - self.planarMesh.append( [0.0 + x, 0.0 + y,0.0000] ) - self.planarMesh.append( [1.0 + x, 1.0 + y,0.0000] ) - self.planarMesh.append( [0.0 + x, 1.0 + y,0.0000] ) - self.planarMesh.append( [0.0 + x, 0.0 + y,0.0000] ) - self.planarMesh.append( [1.0 + x, 0.0 + y,0.0000] ) - self.planarMesh.append( [1.0 + x, 1.0 + y,0.0000] ) - + self.planarMesh.append([0.0 + x, 0.0 + y, 0.0000]) + self.planarMesh.append([1.0 + x, 1.0 + y, 0.0000]) + self.planarMesh.append([0.0 + x, 1.0 + y, 0.0000]) + self.planarMesh.append([0.0 + x, 0.0 + y, 0.0000]) + self.planarMesh.append([1.0 + x, 0.0 + y, 0.0000]) + self.planarMesh.append([1.0 + x, 1.0 + y, 0.0000]) def testCollapseFacetsSingle(self): for i in range(18): @@ -51,6 +51,7 @@ class MeshTopoTestCases(unittest.TestCase): planarMeshObject = Mesh.Mesh(self.planarMesh) planarMeshObject.collapseFacets(range(18)) + # fmt: off def testCorruptedFacet(self): v = FreeCAD.Vector mesh = Mesh.Mesh() @@ -89,6 +90,9 @@ class MeshTopoTestCases(unittest.TestCase): self.assertEqual(mesh.CountFacets, 5) +# fmt: on + + class MeshSplitTestCases(unittest.TestCase): def setUp(self): self.mesh = Mesh.createBox(1.0, 1.0, 1.0) @@ -194,25 +198,31 @@ class MeshSplitTestCases(unittest.TestCase): self.assertTrue(self.mesh.isSolid()) def testFindNearest(self): - self.assertEqual(len(self.mesh.nearestFacetOnRay((-2,2,-6),(0,0,1))), 0) - self.assertEqual(len(self.mesh.nearestFacetOnRay((0.5,0.5,0.5),(0,0,1))), 1) - self.assertEqual(len(self.mesh.nearestFacetOnRay((0.5,0.5,0.5),(0,0,1),-math.pi/2)), 0) - self.assertEqual(len(self.mesh.nearestFacetOnRay((0.2,0.1,0.2),(0,0, 1))), - len(self.mesh.nearestFacetOnRay((0.2,0.1,0.2),(0,0,-1)))) - self.assertEqual(len(self.mesh.nearestFacetOnRay((0.2,0.1,0.2),(0,0, 1), math.pi/2)), - len(self.mesh.nearestFacetOnRay((0.2,0.1,0.2),(0,0,-1), math.pi/2))) + self.assertEqual(len(self.mesh.nearestFacetOnRay((-2, 2, -6), (0, 0, 1))), 0) + self.assertEqual(len(self.mesh.nearestFacetOnRay((0.5, 0.5, 0.5), (0, 0, 1))), 1) + self.assertEqual( + len(self.mesh.nearestFacetOnRay((0.5, 0.5, 0.5), (0, 0, 1), -math.pi / 2)), 0 + ) + self.assertEqual( + len(self.mesh.nearestFacetOnRay((0.2, 0.1, 0.2), (0, 0, 1))), + len(self.mesh.nearestFacetOnRay((0.2, 0.1, 0.2), (0, 0, -1))), + ) + self.assertEqual( + len(self.mesh.nearestFacetOnRay((0.2, 0.1, 0.2), (0, 0, 1), math.pi / 2)), + len(self.mesh.nearestFacetOnRay((0.2, 0.1, 0.2), (0, 0, -1), math.pi / 2)), + ) # Apply placement to mesh - plm = Base.Placement(Base.Vector(1,2,3), Base.Rotation(1,1,1,1)) + plm = Base.Placement(Base.Vector(1, 2, 3), Base.Rotation(1, 1, 1, 1)) pnt = Base.Vector(0.5, 0.5, 0.5) vec = Base.Vector(0.0, 0.0, 1.0) self.mesh.Placement = plm - self.assertEqual(len(self.mesh.nearestFacetOnRay(pnt,vec)), 0) + self.assertEqual(len(self.mesh.nearestFacetOnRay(pnt, vec)), 0) # Apply the placement on the ray as well pnt = plm.multVec(pnt) vec = plm.Rotation.multVec(vec) - self.assertEqual(len(self.mesh.nearestFacetOnRay(pnt,vec)), 1) + self.assertEqual(len(self.mesh.nearestFacetOnRay(pnt, vec)), 1) def testForaminate(self): class FilterAngle: @@ -225,10 +235,17 @@ class MeshSplitTestCases(unittest.TestCase): angle = self.myMesh.Facets[item].Normal.getAngle(self.vec) return angle < self.limit - results = self.mesh.foraminate((0.0, 0.0, 0.0), (0,1,1)) - filtered_result = list(filter(FilterAngle(self.mesh, FreeCAD.Vector(0,1,1), math.pi/2).check_angle, results.keys())) + results = self.mesh.foraminate((0.0, 0.0, 0.0), (0, 1, 1)) + filtered_result = list( + filter( + FilterAngle(self.mesh, FreeCAD.Vector(0, 1, 1), math.pi / 2).check_angle, + results.keys(), + ) + ) - self.assertEqual(filtered_result, list(self.mesh.foraminate((0.0, 0.0, 0.0), (0,1,1), math.pi/2))) + self.assertEqual( + filtered_result, list(self.mesh.foraminate((0.0, 0.0, 0.0), (0, 1, 1), math.pi / 2)) + ) def testForaminatePlacement(self): pnt = Base.Vector(0.0, 0.0, 0.0) @@ -237,7 +254,7 @@ class MeshSplitTestCases(unittest.TestCase): self.assertEqual(len(results), 4) # Apply placement to mesh - plm = Base.Placement(Base.Vector(1,2,3), Base.Rotation(1,1,1,1)) + plm = Base.Placement(Base.Vector(1, 2, 3), Base.Rotation(1, 1, 1, 1)) self.mesh.Placement = plm self.assertEqual(len(self.mesh.foraminate(pnt, vec)), 0) @@ -248,47 +265,46 @@ class MeshSplitTestCases(unittest.TestCase): self.assertEqual(len(results2), 4) self.assertEqual(list(results), list(results2)) + class MeshGeoTestCases(unittest.TestCase): def setUp(self): # set up a planar face with 2 triangles self.planarMesh = [] - def testIntersection(self): - self.planarMesh.append( [0.9961,1.5413,4.3943] ) - self.planarMesh.append( [9.4796,10.024,-3.0937] ) - self.planarMesh.append( [1.4308,11.3841,2.6829] ) - self.planarMesh.append( [2.6493,2.2536,3.0679] ) - self.planarMesh.append( [13.1126,0.4857,-4.4417] ) - self.planarMesh.append( [10.2410,8.9040,-3.5002] ) + self.planarMesh.append([0.9961, 1.5413, 4.3943]) + self.planarMesh.append([9.4796, 10.024, -3.0937]) + self.planarMesh.append([1.4308, 11.3841, 2.6829]) + self.planarMesh.append([2.6493, 2.2536, 3.0679]) + self.planarMesh.append([13.1126, 0.4857, -4.4417]) + self.planarMesh.append([10.2410, 8.9040, -3.5002]) planarMeshObject = Mesh.Mesh(self.planarMesh) f1 = planarMeshObject.Facets[0] f2 = planarMeshObject.Facets[1] - res=f1.intersect(f2) + res = f1.intersect(f2) self.assertTrue(len(res) == 0) - def testIntersection2(self): - self.planarMesh.append( [-16.097176,-29.891157,15.987688] ) - self.planarMesh.append( [-16.176304,-29.859991,15.947966] ) - self.planarMesh.append( [-16.071451,-29.900553,15.912505] ) - self.planarMesh.append( [-16.092241,-29.893408,16.020439] ) - self.planarMesh.append( [-16.007210,-29.926180,15.967641] ) - self.planarMesh.append( [-16.064457,-29.904951,16.090832] ) + self.planarMesh.append([-16.097176, -29.891157, 15.987688]) + self.planarMesh.append([-16.176304, -29.859991, 15.947966]) + self.planarMesh.append([-16.071451, -29.900553, 15.912505]) + self.planarMesh.append([-16.092241, -29.893408, 16.020439]) + self.planarMesh.append([-16.007210, -29.926180, 15.967641]) + self.planarMesh.append([-16.064457, -29.904951, 16.090832]) planarMeshObject = Mesh.Mesh(self.planarMesh) f1 = planarMeshObject.Facets[0] f2 = planarMeshObject.Facets[1] # does definitely NOT intersect - res=f1.intersect(f2) + res = f1.intersect(f2) self.assertTrue(len(res) == 0) def testIntersectionOfTransformedMesh(self): - self.planarMesh.append( [0.0,10.0,10.0] ) - self.planarMesh.append( [10.0,0.0,10.0] ) - self.planarMesh.append( [10.0,10.0,10.0] ) - self.planarMesh.append( [6.0,8.0,10.0] ) - self.planarMesh.append( [16.0,8.0,10.0] ) - self.planarMesh.append( [6.0,18.0,10.0] ) + self.planarMesh.append([0.0, 10.0, 10.0]) + self.planarMesh.append([10.0, 0.0, 10.0]) + self.planarMesh.append([10.0, 10.0, 10.0]) + self.planarMesh.append([6.0, 8.0, 10.0]) + self.planarMesh.append([16.0, 8.0, 10.0]) + self.planarMesh.append([6.0, 18.0, 10.0]) planarMeshObject = Mesh.Mesh(self.planarMesh) mat = Base.Matrix() @@ -299,16 +315,16 @@ class MeshGeoTestCases(unittest.TestCase): f1 = planarMeshObject.Facets[0] f2 = planarMeshObject.Facets[1] - res=f1.intersect(f2) + res = f1.intersect(f2) self.assertEqual(len(res), 2) def testIntersectionOfParallelTriangles(self): - self.planarMesh.append( [0.0,10.0,10.0] ) - self.planarMesh.append( [10.0,0.0,10.0] ) - self.planarMesh.append( [10.0,10.0,10.0] ) - self.planarMesh.append( [6.0,8.0,10.1] ) - self.planarMesh.append( [16.0,8.0,10.1] ) - self.planarMesh.append( [6.0,18.0,10.1] ) + self.planarMesh.append([0.0, 10.0, 10.0]) + self.planarMesh.append([10.0, 0.0, 10.0]) + self.planarMesh.append([10.0, 10.0, 10.0]) + self.planarMesh.append([6.0, 8.0, 10.1]) + self.planarMesh.append([16.0, 8.0, 10.1]) + self.planarMesh.append([6.0, 18.0, 10.1]) planarMeshObject = Mesh.Mesh(self.planarMesh) mat = Base.Matrix() @@ -319,16 +335,16 @@ class MeshGeoTestCases(unittest.TestCase): f1 = planarMeshObject.Facets[0] f2 = planarMeshObject.Facets[1] - res=f1.intersect(f2) + res = f1.intersect(f2) self.assertTrue(len(res) == 0) def testIntersectionOnEdge(self): - self.planarMesh.append( [5.0, -1.9371663331985474, 0.49737977981567383] ) - self.planarMesh.append( [4.0, -1.9371663331985474, 0.49737977981567383] ) - self.planarMesh.append( [5.0, -1.9842294454574585, 0.25066646933555603] ) - self.planarMesh.append( [4.6488823890686035, -1.7827962636947632, 0.4577442705631256] ) - self.planarMesh.append( [4.524135112762451, -2.0620131492614746, 0.5294350385665894] ) - self.planarMesh.append( [4.6488823890686035, -1.8261089324951172, 0.23069120943546295] ) + self.planarMesh.append([5.0, -1.9371663331985474, 0.49737977981567383]) + self.planarMesh.append([4.0, -1.9371663331985474, 0.49737977981567383]) + self.planarMesh.append([5.0, -1.9842294454574585, 0.25066646933555603]) + self.planarMesh.append([4.6488823890686035, -1.7827962636947632, 0.4577442705631256]) + self.planarMesh.append([4.524135112762451, -2.0620131492614746, 0.5294350385665894]) + self.planarMesh.append([4.6488823890686035, -1.8261089324951172, 0.23069120943546295]) planarMeshObject = Mesh.Mesh(self.planarMesh) f1 = planarMeshObject.Facets[0] f2 = planarMeshObject.Facets[1] @@ -336,12 +352,12 @@ class MeshGeoTestCases(unittest.TestCase): self.assertEqual(len(res), 2) def testIntersectionCoplanar(self): - self.planarMesh.append( [0.,10.,10.] ) - self.planarMesh.append( [10.,0.,10.] ) - self.planarMesh.append( [10.,10.,10.] ) - self.planarMesh.append( [6.,8.,10.] ) - self.planarMesh.append( [16.,8.,10.] ) - self.planarMesh.append( [6.,18.,10.] ) + self.planarMesh.append([0.0, 10.0, 10.0]) + self.planarMesh.append([10.0, 0.0, 10.0]) + self.planarMesh.append([10.0, 10.0, 10.0]) + self.planarMesh.append([6.0, 8.0, 10.0]) + self.planarMesh.append([16.0, 8.0, 10.0]) + self.planarMesh.append([6.0, 18.0, 10.0]) planarMeshObject = Mesh.Mesh(self.planarMesh) f1 = planarMeshObject.Facets[0] f2 = planarMeshObject.Facets[1] @@ -349,12 +365,12 @@ class MeshGeoTestCases(unittest.TestCase): self.assertTrue(len(res) == 2) def testIntersectionOverlap(self): - self.planarMesh.append( [0.,0.,0.] ) - self.planarMesh.append( [5.,0.,0.] ) - self.planarMesh.append( [8.,5.,0.] ) - self.planarMesh.append( [4.,0.,0.] ) - self.planarMesh.append( [10.,0.,0.] ) - self.planarMesh.append( [9.,5.,0.] ) + self.planarMesh.append([0.0, 0.0, 0.0]) + self.planarMesh.append([5.0, 0.0, 0.0]) + self.planarMesh.append([8.0, 5.0, 0.0]) + self.planarMesh.append([4.0, 0.0, 0.0]) + self.planarMesh.append([10.0, 0.0, 0.0]) + self.planarMesh.append([9.0, 5.0, 0.0]) planarMeshObject = Mesh.Mesh(self.planarMesh) f1 = planarMeshObject.Facets[0] f2 = planarMeshObject.Facets[1] @@ -362,12 +378,12 @@ class MeshGeoTestCases(unittest.TestCase): self.assertTrue(len(res) == 2) def testIntersectionOfIntersectingEdges(self): - self.planarMesh.append( [0.,10.,10.] ) - self.planarMesh.append( [10.,0.,10.] ) - self.planarMesh.append( [10.,10.,10.] ) - self.planarMesh.append( [6.,8.,10.] ) - self.planarMesh.append( [16.,8.,10.] ) - self.planarMesh.append( [6.,18.,10.] ) + self.planarMesh.append([0.0, 10.0, 10.0]) + self.planarMesh.append([10.0, 0.0, 10.0]) + self.planarMesh.append([10.0, 10.0, 10.0]) + self.planarMesh.append([6.0, 8.0, 10.0]) + self.planarMesh.append([16.0, 8.0, 10.0]) + self.planarMesh.append([6.0, 18.0, 10.0]) planarMeshObject = Mesh.Mesh(self.planarMesh) edge1 = planarMeshObject.Facets[0].getEdge(2) @@ -379,12 +395,12 @@ class MeshGeoTestCases(unittest.TestCase): self.assertEqual(res[0][2], 10.0) def testIntersectionOfParallelEdges(self): - self.planarMesh.append( [0.,10.,10.] ) - self.planarMesh.append( [10.,0.,10.] ) - self.planarMesh.append( [10.,10.,10.] ) - self.planarMesh.append( [6.,8.,10.] ) - self.planarMesh.append( [16.,8.,10.] ) - self.planarMesh.append( [6.,18.,10.] ) + self.planarMesh.append([0.0, 10.0, 10.0]) + self.planarMesh.append([10.0, 0.0, 10.0]) + self.planarMesh.append([10.0, 10.0, 10.0]) + self.planarMesh.append([6.0, 8.0, 10.0]) + self.planarMesh.append([16.0, 8.0, 10.0]) + self.planarMesh.append([6.0, 18.0, 10.0]) planarMeshObject = Mesh.Mesh(self.planarMesh) edge1 = planarMeshObject.Facets[0].getEdge(2) @@ -393,12 +409,12 @@ class MeshGeoTestCases(unittest.TestCase): self.assertTrue(len(res) == 0) def testIntersectionOfCollinearEdges(self): - self.planarMesh.append( [0.,0.,0.] ) - self.planarMesh.append( [6.,0.,0.] ) - self.planarMesh.append( [3.,4.,0.] ) - self.planarMesh.append( [7.,0.,0.] ) - self.planarMesh.append( [13.,0.,0.] ) - self.planarMesh.append( [10.,4.,0.] ) + self.planarMesh.append([0.0, 0.0, 0.0]) + self.planarMesh.append([6.0, 0.0, 0.0]) + self.planarMesh.append([3.0, 4.0, 0.0]) + self.planarMesh.append([7.0, 0.0, 0.0]) + self.planarMesh.append([13.0, 0.0, 0.0]) + self.planarMesh.append([10.0, 4.0, 0.0]) planarMeshObject = Mesh.Mesh(self.planarMesh) edge1 = planarMeshObject.Facets[0].getEdge(0) @@ -407,12 +423,12 @@ class MeshGeoTestCases(unittest.TestCase): self.assertTrue(len(res) == 0) def testIntersectionOfWarpedEdges(self): - self.planarMesh.append( [0.,0.,0.] ) - self.planarMesh.append( [6.,0.,0.] ) - self.planarMesh.append( [3.,4.,0.] ) - self.planarMesh.append( [2.,2.,1.] ) - self.planarMesh.append( [8.,2.,1.] ) - self.planarMesh.append( [5.,6.,1.] ) + self.planarMesh.append([0.0, 0.0, 0.0]) + self.planarMesh.append([6.0, 0.0, 0.0]) + self.planarMesh.append([3.0, 4.0, 0.0]) + self.planarMesh.append([2.0, 2.0, 1.0]) + self.planarMesh.append([8.0, 2.0, 1.0]) + self.planarMesh.append([5.0, 6.0, 1.0]) planarMeshObject = Mesh.Mesh(self.planarMesh) edge1 = planarMeshObject.Facets[0].getEdge(1) @@ -473,84 +489,91 @@ class PivyTestCases(unittest.TestCase): def testRayPick(self): if not FreeCAD.GuiUp: return - self.planarMesh.append( [-16.097176,-29.891157,15.987688] ) - self.planarMesh.append( [-16.176304,-29.859991,15.947966] ) - self.planarMesh.append( [-16.071451,-29.900553,15.912505] ) - self.planarMesh.append( [-16.092241,-29.893408,16.020439] ) - self.planarMesh.append( [-16.007210,-29.926180,15.967641] ) - self.planarMesh.append( [-16.064457,-29.904951,16.090832] ) + self.planarMesh.append([-16.097176, -29.891157, 15.987688]) + self.planarMesh.append([-16.176304, -29.859991, 15.947966]) + self.planarMesh.append([-16.071451, -29.900553, 15.912505]) + self.planarMesh.append([-16.092241, -29.893408, 16.020439]) + self.planarMesh.append([-16.007210, -29.926180, 15.967641]) + self.planarMesh.append([-16.064457, -29.904951, 16.090832]) planarMeshObject = Mesh.Mesh(self.planarMesh) - from pivy import coin; import FreeCADGui + from pivy import coin + import FreeCADGui + Mesh.show(planarMeshObject) - view=FreeCADGui.ActiveDocument.ActiveView.getViewer() - rp=coin.SoRayPickAction(view.getSoRenderManager().getViewportRegion()) - rp.setRay(coin.SbVec3f(-16.05,16.0,16.0),coin.SbVec3f(0,-1,0)) + view = FreeCADGui.ActiveDocument.ActiveView.getViewer() + rp = coin.SoRayPickAction(view.getSoRenderManager().getViewportRegion()) + rp.setRay(coin.SbVec3f(-16.05, 16.0, 16.0), coin.SbVec3f(0, -1, 0)) rp.apply(view.getSoRenderManager().getSceneGraph()) - pp=rp.getPickedPoint() + pp = rp.getPickedPoint() self.assertTrue(pp is not None) - det=pp.getDetail() + det = pp.getDetail() self.assertTrue(det.getTypeId() == coin.SoFaceDetail.getClassTypeId()) - det=coin.cast(det, det.getTypeId().getName().getString()) + det = coin.cast(det, det.getTypeId().getName().getString()) self.assertTrue(det.getFaceIndex() == 1) def testPrimitiveCount(self): if not FreeCAD.GuiUp: return - self.planarMesh.append( [-16.097176,-29.891157,15.987688] ) - self.planarMesh.append( [-16.176304,-29.859991,15.947966] ) - self.planarMesh.append( [-16.071451,-29.900553,15.912505] ) - self.planarMesh.append( [-16.092241,-29.893408,16.020439] ) - self.planarMesh.append( [-16.007210,-29.926180,15.967641] ) - self.planarMesh.append( [-16.064457,-29.904951,16.090832] ) + self.planarMesh.append([-16.097176, -29.891157, 15.987688]) + self.planarMesh.append([-16.176304, -29.859991, 15.947966]) + self.planarMesh.append([-16.071451, -29.900553, 15.912505]) + self.planarMesh.append([-16.092241, -29.893408, 16.020439]) + self.planarMesh.append([-16.007210, -29.926180, 15.967641]) + self.planarMesh.append([-16.064457, -29.904951, 16.090832]) planarMeshObject = Mesh.Mesh(self.planarMesh) - from pivy import coin; import FreeCADGui + from pivy import coin + import FreeCADGui + Mesh.show(planarMeshObject) - view=FreeCADGui.ActiveDocument.ActiveView + view = FreeCADGui.ActiveDocument.ActiveView view.setAxisCross(False) - pc=coin.SoGetPrimitiveCountAction() + pc = coin.SoGetPrimitiveCountAction() pc.apply(view.getSceneGraph()) self.assertTrue(pc.getTriangleCount() == 2) - #self.assertTrue(pc.getPointCount() == 6) + # self.assertTrue(pc.getPointCount() == 6) def tearDown(self): - #closing doc + # closing doc FreeCAD.closeDocument("MeshTest") + # Threads -def loadFile(name): - #lock.acquire() - mesh=Mesh.Mesh() - #FreeCAD.Console.PrintMessage("Create mesh instance\n") - #lock.release() - mesh.read(name) - #FreeCAD.Console.PrintMessage("Mesh loaded successfully.\n") -def createMesh(r,s): - #FreeCAD.Console.PrintMessage("Create sphere (%s,%s)...\n"%(r,s)) - mesh=Mesh.createSphere(r,s) - #FreeCAD.Console.PrintMessage("... destroy sphere\n") +def loadFile(name): + # lock.acquire() + mesh = Mesh.Mesh() + # FreeCAD.Console.PrintMessage("Create mesh instance\n") + # lock.release() + mesh.read(name) + # FreeCAD.Console.PrintMessage("Mesh loaded successfully.\n") + + +def createMesh(r, s): + # FreeCAD.Console.PrintMessage("Create sphere (%s,%s)...\n"%(r,s)) + mesh = Mesh.createSphere(r, s) + # FreeCAD.Console.PrintMessage("... destroy sphere\n") + class LoadMeshInThreadsCases(unittest.TestCase): - def setUp(self): pass def testSphereMesh(self): - for i in range(6,8): - thread.start_new(createMesh,(10.0,(i+1)*20)) + for i in range(6, 8): + thread.start_new(createMesh, (10.0, (i + 1) * 20)) time.sleep(10) def testLoadMesh(self): - mesh=Mesh.createSphere(10.0,100) # a fine sphere - name=tempfile.gettempdir() + os.sep + "mesh.stl" + mesh = Mesh.createSphere(10.0, 100) # a fine sphere + name = tempfile.gettempdir() + os.sep + "mesh.stl" mesh.write(name) - #FreeCAD.Console.PrintMessage("Write mesh to %s\n"%(name)) - #lock=thread.allocate_lock() + # FreeCAD.Console.PrintMessage("Write mesh to %s\n"%(name)) + # lock=thread.allocate_lock() for i in range(2): - thread.start_new(loadFile,(name,)) + thread.start_new(loadFile, (name,)) time.sleep(1) def tearDown(self): @@ -563,54 +586,54 @@ class PolynomialFitCases(unittest.TestCase): def testFitGood(self): # symmetric - v=[] - v.append(FreeCAD.Vector(0,0,0.0)) - v.append(FreeCAD.Vector(1,0,0.5)) - v.append(FreeCAD.Vector(2,0,0.0)) - v.append(FreeCAD.Vector(0,1,0.5)) - v.append(FreeCAD.Vector(1,1,1.0)) - v.append(FreeCAD.Vector(2,1,0.5)) - v.append(FreeCAD.Vector(0,2,0.0)) - v.append(FreeCAD.Vector(1,2,0.5)) - v.append(FreeCAD.Vector(2,2,0.0)) + v = [] + v.append(FreeCAD.Vector(0, 0, 0.0)) + v.append(FreeCAD.Vector(1, 0, 0.5)) + v.append(FreeCAD.Vector(2, 0, 0.0)) + v.append(FreeCAD.Vector(0, 1, 0.5)) + v.append(FreeCAD.Vector(1, 1, 1.0)) + v.append(FreeCAD.Vector(2, 1, 0.5)) + v.append(FreeCAD.Vector(0, 2, 0.0)) + v.append(FreeCAD.Vector(1, 2, 0.5)) + v.append(FreeCAD.Vector(2, 2, 0.0)) d = Mesh.polynomialFit(v) c = d["Coefficients"] - #print ("Polynomial: f(x,y)=%f*x^2%+f*y^2%+f*x*y%+f*x%+f*y%+f" % (c[0],c[1],c[2],c[3],c[4],c[5])) + # print ("Polynomial: f(x,y)=%f*x^2%+f*y^2%+f*x*y%+f*x%+f*y%+f" % (c[0],c[1],c[2],c[3],c[4],c[5])) for i in d["Residuals"]: - self.assertTrue(math.fabs(i) < 0.0001, "Too high residual %f" % math.fabs(i)) + self.assertTrue(math.fabs(i) < 0.0001, "Too high residual %f" % math.fabs(i)) def testFitExact(self): # symmetric - v=[] - v.append(FreeCAD.Vector(0,0,0.0)) - v.append(FreeCAD.Vector(1,0,0.0)) - v.append(FreeCAD.Vector(2,0,0.0)) - v.append(FreeCAD.Vector(0,1,0.0)) - v.append(FreeCAD.Vector(1,1,1.0)) - v.append(FreeCAD.Vector(2,1,0.0)) + v = [] + v.append(FreeCAD.Vector(0, 0, 0.0)) + v.append(FreeCAD.Vector(1, 0, 0.0)) + v.append(FreeCAD.Vector(2, 0, 0.0)) + v.append(FreeCAD.Vector(0, 1, 0.0)) + v.append(FreeCAD.Vector(1, 1, 1.0)) + v.append(FreeCAD.Vector(2, 1, 0.0)) d = Mesh.polynomialFit(v) c = d["Coefficients"] - #print ("Polynomial: f(x,y)=%f*x^2%+f*y^2%+f*x*y%+f*x%+f*y%+f" % (c[0],c[1],c[2],c[3],c[4],c[5])) + # print ("Polynomial: f(x,y)=%f*x^2%+f*y^2%+f*x*y%+f*x%+f*y%+f" % (c[0],c[1],c[2],c[3],c[4],c[5])) for i in d["Residuals"]: - self.assertTrue(math.fabs(i) < 0.0001, "Too high residual %f" % math.fabs(i)) + self.assertTrue(math.fabs(i) < 0.0001, "Too high residual %f" % math.fabs(i)) def testFitBad(self): # symmetric - v=[] - v.append(FreeCAD.Vector(0,0,0.0)) - v.append(FreeCAD.Vector(1,0,0.0)) - v.append(FreeCAD.Vector(2,0,0.0)) - v.append(FreeCAD.Vector(0,1,0.0)) - v.append(FreeCAD.Vector(1,1,1.0)) - v.append(FreeCAD.Vector(2,1,0.0)) - v.append(FreeCAD.Vector(0,2,0.0)) - v.append(FreeCAD.Vector(1,2,0.0)) - v.append(FreeCAD.Vector(2,2,0.0)) + v = [] + v.append(FreeCAD.Vector(0, 0, 0.0)) + v.append(FreeCAD.Vector(1, 0, 0.0)) + v.append(FreeCAD.Vector(2, 0, 0.0)) + v.append(FreeCAD.Vector(0, 1, 0.0)) + v.append(FreeCAD.Vector(1, 1, 1.0)) + v.append(FreeCAD.Vector(2, 1, 0.0)) + v.append(FreeCAD.Vector(0, 2, 0.0)) + v.append(FreeCAD.Vector(1, 2, 0.0)) + v.append(FreeCAD.Vector(2, 2, 0.0)) d = Mesh.polynomialFit(v) c = d["Coefficients"] - #print ("Polynomial: f(x,y)=%f*x^2%+f*y^2%+f*x*y%+f*x%+f*y%+f" % (c[0],c[1],c[2],c[3],c[4],c[5])) + # print ("Polynomial: f(x,y)=%f*x^2%+f*y^2%+f*x*y%+f*x%+f*y%+f" % (c[0],c[1],c[2],c[3],c[4],c[5])) for i in d["Residuals"]: - self.assertFalse(math.fabs(i) < 0.0001, "Residual %f must be higher" % math.fabs(i)) + self.assertFalse(math.fabs(i) < 0.0001, "Residual %f must be higher" % math.fabs(i)) def tearDown(self): pass @@ -622,27 +645,28 @@ class NastranReader(unittest.TestCase): def testEightCharGRIDElement(self): m = Mesh.read(f"{self.test_dir}/NASTRAN_Test_GRID_CQUAD4.bdf") - self.assertEqual(m.CountPoints,10) - self.assertEqual(m.CountFacets,8) # Quads split into two triangles + self.assertEqual(m.CountPoints, 10) + self.assertEqual(m.CountFacets, 8) # Quads split into two triangles def testDelimitedGRIDElement(self): m = Mesh.read(f"{self.test_dir}/NASTRAN_Test_Delimited_GRID_CQUAD4.bdf") - self.assertEqual(m.CountPoints,10) - self.assertEqual(m.CountFacets,8) # Quads split into two triangles + self.assertEqual(m.CountPoints, 10) + self.assertEqual(m.CountFacets, 8) # Quads split into two triangles def testSixteenCharGRIDElement(self): m = Mesh.read(f"{self.test_dir}/NASTRAN_Test_GRIDSTAR_CQUAD4.bdf") - self.assertEqual(m.CountPoints,4) - self.assertEqual(m.CountFacets,2) # Quads split into two triangles + self.assertEqual(m.CountPoints, 4) + self.assertEqual(m.CountFacets, 2) # Quads split into two triangles def testCTRIA3Element(self): m = Mesh.read(f"{self.test_dir}/NASTRAN_Test_GRID_CTRIA3.bdf") - self.assertEqual(m.CountPoints,3) - self.assertEqual(m.CountFacets,1) + self.assertEqual(m.CountPoints, 3) + self.assertEqual(m.CountFacets, 1) def tearDown(self): pass + class MeshSubElement(unittest.TestCase): def setUp(self): self.mesh = Mesh.createBox(1.0, 1.0, 1.0) @@ -683,6 +707,7 @@ class MeshSubElement(unittest.TestCase): def tearDown(self): pass + class MeshProperty(unittest.TestCase): def setUp(self): self.doc = FreeCAD.newDocument("MeshTest") @@ -695,12 +720,12 @@ class MeshProperty(unittest.TestCase): mesh.Mesh = Mesh.createBox(1.0, 1.0, 1.0) len1 = int(mesh.Mesh.CountFacets / 2) len2 = int(mesh.Mesh.CountFacets - len1) - material = {"transparency" : [0.2] * len1 + [0.8] * len2} + material = {"transparency": [0.2] * len1 + [0.8] * len2} material["binding"] = MeshEnums.Binding.PER_FACE - material["ambientColor"] = [(1,0,0)] * (len1 + len2) - material["diffuseColor"] = [(0,1,0)] * (len1 + len2) - material["specularColor"] = [(0,0,1)] * (len1 + len2) - material["emissiveColor"] = [(1,1,1)] * (len1 + len2) + material["ambientColor"] = [(1, 0, 0)] * (len1 + len2) + material["diffuseColor"] = [(0, 1, 0)] * (len1 + len2) + material["specularColor"] = [(0, 0, 1)] * (len1 + len2) + material["emissiveColor"] = [(1, 1, 1)] * (len1 + len2) material["shininess"] = [0.3] * (len1 + len2) mesh.addProperty("Mesh::PropertyMaterial", "Material") @@ -722,4 +747,3 @@ class MeshProperty(unittest.TestCase): self.assertEqual(len(material2["emissiveColor"]), len1 + len2) self.assertEqual(len(material2["shininess"]), len1 + len2) self.assertEqual(len(material2["transparency"]), len1 + len2) - diff --git a/src/Mod/Mesh/App/MeshTexture.cpp b/src/Mod/Mesh/App/MeshTexture.cpp index f0cfd6c338..3e657388c9 100644 --- a/src/Mod/Mesh/App/MeshTexture.cpp +++ b/src/Mod/Mesh/App/MeshTexture.cpp @@ -27,49 +27,60 @@ using namespace Mesh; -MeshTexture::MeshTexture(const Mesh::MeshObject& mesh, const MeshCore::Material &material) - : materialRefMesh(material) +MeshTexture::MeshTexture(const Mesh::MeshObject& mesh, const MeshCore::Material& material) + : materialRefMesh(material) { countPointsRefMesh = mesh.countPoints(); unsigned long countFacets = mesh.countFacets(); - if (material.binding == MeshCore::MeshIO::PER_VERTEX && material.diffuseColor.size() == countPointsRefMesh) { + if (material.binding == MeshCore::MeshIO::PER_VERTEX + && material.diffuseColor.size() == countPointsRefMesh) { binding = MeshCore::MeshIO::PER_VERTEX; kdTree = std::make_unique(mesh.getKernel().GetPoints()); } - else if (material.binding == MeshCore::MeshIO::PER_FACE && material.diffuseColor.size() == countFacets) { + else if (material.binding == MeshCore::MeshIO::PER_FACE + && material.diffuseColor.size() == countFacets) { binding = MeshCore::MeshIO::PER_FACE; kdTree = std::make_unique(mesh.getKernel().GetPoints()); refPnt2Fac = std::make_unique(mesh.getKernel()); } } -void MeshTexture::apply(const Mesh::MeshObject& mesh, const App::Color& defaultColor, MeshCore::Material &material) +void MeshTexture::apply(const Mesh::MeshObject& mesh, + const App::Color& defaultColor, + MeshCore::Material& material) { apply(mesh, true, defaultColor, -1.0f, material); } -void MeshTexture::apply(const Mesh::MeshObject& mesh, const App::Color& defaultColor, float max_dist, MeshCore::Material &material) +void MeshTexture::apply(const Mesh::MeshObject& mesh, + const App::Color& defaultColor, + float max_dist, + MeshCore::Material& material) { apply(mesh, true, defaultColor, max_dist, material); } -void MeshTexture::apply(const Mesh::MeshObject& mesh, MeshCore::Material &material) +void MeshTexture::apply(const Mesh::MeshObject& mesh, MeshCore::Material& material) { App::Color defaultColor; apply(mesh, false, defaultColor, -1.0f, material); } -void MeshTexture::apply(const Mesh::MeshObject& mesh, float max_dist, MeshCore::Material &material) +void MeshTexture::apply(const Mesh::MeshObject& mesh, float max_dist, MeshCore::Material& material) { App::Color defaultColor; apply(mesh, false, defaultColor, max_dist, material); } -void MeshTexture::apply(const Mesh::MeshObject& mesh, bool addDefaultColor, const App::Color& defaultColor, - float max_dist, MeshCore::Material &material) +void MeshTexture::apply(const Mesh::MeshObject& mesh, + bool addDefaultColor, + const App::Color& defaultColor, + float max_dist, + MeshCore::Material& material) { - // copy the color values because the passed material could be the same instance as 'materialRefMesh' + // copy the color values because the passed material could be the same instance as + // 'materialRefMesh' std::vector textureColor = materialRefMesh.diffuseColor; material.diffuseColor.clear(); material.binding = MeshCore::MeshIO::OVERALL; @@ -82,7 +93,7 @@ void MeshTexture::apply(const Mesh::MeshObject& mesh, bool addDefaultColor, cons if (binding == MeshCore::MeshIO::PER_VERTEX) { diffuseColor.reserve(points.size()); - for (size_t index=0; index pointMap; pointMap.reserve(points.size()); - for (size_t index=0; index found = refPnt2Fac->GetIndices(index1, index2, index3); + if (index1 != MeshCore::POINT_INDEX_MAX && index2 != MeshCore::POINT_INDEX_MAX + && index3 != MeshCore::POINT_INDEX_MAX) { + std::vector found = + refPnt2Fac->GetIndices(index1, index2, index3); if (found.size() == 1) { diffuseColor.push_back(textureColor[found.front()]); } diff --git a/src/Mod/Mesh/App/MeshTexture.h b/src/Mod/Mesh/App/MeshTexture.h index 8b70efba38..bcc5dfc35b 100644 --- a/src/Mod/Mesh/App/MeshTexture.h +++ b/src/Mod/Mesh/App/MeshTexture.h @@ -46,35 +46,45 @@ public: /*! A mesh with material. The number of points or facets must match with the number of colors. */ - MeshTexture(const Mesh::MeshObject& mesh, const MeshCore::Material &material); + MeshTexture(const Mesh::MeshObject& mesh, const MeshCore::Material& material); /*! Find common points or facets of this to the original mesh. For points or facets that don't match \a defaultColor will be used instead, otherwise the color of the original material is used. */ - void apply(const Mesh::MeshObject& mesh, const App::Color& defaultColor, MeshCore::Material &material); + void apply(const Mesh::MeshObject& mesh, + const App::Color& defaultColor, + MeshCore::Material& material); /*! Find common points or facets of this to the original mesh. For points or facets that don't match \a defaultColor will be used instead, otherwise the color of the original material is used. */ - void apply(const Mesh::MeshObject& mesh, const App::Color& defaultColor, float max_dist, MeshCore::Material &material); + void apply(const Mesh::MeshObject& mesh, + const App::Color& defaultColor, + float max_dist, + MeshCore::Material& material); /*! - Find common points or facets of this to the original mesh and use the color of the original material. - If for a point of \a mesh no matching point of the original mesh can be found the texture mapping will - fail. + Find common points or facets of this to the original mesh and use the color of the original + material. If for a point of \a mesh no matching point of the original mesh can be found the + texture mapping will fail. */ - void apply(const Mesh::MeshObject& mesh, MeshCore::Material &material); + void apply(const Mesh::MeshObject& mesh, MeshCore::Material& material); /*! - Find common points or facets of this to the original mesh and use the color of the original material. - If for a point of \a mesh no matching point of the original mesh can be found the texture mapping will - fail. + Find common points or facets of this to the original mesh and use the color of the original + material. If for a point of \a mesh no matching point of the original mesh can be found the + texture mapping will fail. */ - void apply(const Mesh::MeshObject& mesh, float max_dist, MeshCore::Material &material); + void apply(const Mesh::MeshObject& mesh, float max_dist, MeshCore::Material& material); private: - void apply(const Mesh::MeshObject& mesh, bool addDefaultColor, const App::Color& defaultColor, float max_dist, MeshCore::Material &material); - PointIndex findIndex(const Base::Vector3f& p, float max_dist) const { + void apply(const Mesh::MeshObject& mesh, + bool addDefaultColor, + const App::Color& defaultColor, + float max_dist, + MeshCore::Material& material); + PointIndex findIndex(const Base::Vector3f& p, float max_dist) const + { if (max_dist < 0.0f) { return kdTree->FindExact(p); } @@ -86,13 +96,13 @@ private: } private: - const MeshCore::Material &materialRefMesh; + const MeshCore::Material& materialRefMesh; unsigned long countPointsRefMesh; std::unique_ptr kdTree; std::unique_ptr refPnt2Fac; MeshCore::MeshIO::Binding binding = MeshCore::MeshIO::OVERALL; }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_MESHTEXTURE_H +#endif // MESH_MESHTEXTURE_H diff --git a/src/Mod/Mesh/App/PreCompiled.cpp b/src/Mod/Mesh/App/PreCompiled.cpp index cd188de772..ccf2b83403 100644 --- a/src/Mod/Mesh/App/PreCompiled.cpp +++ b/src/Mod/Mesh/App/PreCompiled.cpp @@ -22,4 +22,3 @@ #include "PreCompiled.h" - diff --git a/src/Mod/Mesh/App/PreCompiled.h b/src/Mod/Mesh/App/PreCompiled.h index 9cce876f6d..b8f33e88c2 100644 --- a/src/Mod/Mesh/App/PreCompiled.h +++ b/src/Mod/Mesh/App/PreCompiled.h @@ -28,31 +28,31 @@ // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning( disable : 4251 ) -# pragma warning( disable : 4503 ) -# pragma warning( disable : 4275 ) -# pragma warning( disable : 4786 ) // specifier longer then 255 chars -# pragma warning( disable : 4661 ) // no suitable definition provided for explicit -#endif // template instantiation request +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4275) +#pragma warning(disable : 4786) // specifier longer then 255 chars +#pragma warning(disable : 4661) // no suitable definition provided for explicit +#endif // template instantiation request #ifdef _PreComp_ // standard -#include #include -#include #include +#include +#include #include #include #include #ifdef FC_USE_GTS -# include +#include #endif // STL #include -#include #include +#include #include #include #include @@ -66,26 +66,25 @@ #include #include #include -#include #include +#include // Xerces -#include -#include #include #include #include -#include #include #include +#include #include -#include -#include -#include #include #include +#include +#include +#include +#include +#include -#endif //_PreComp_ +#endif //_PreComp_ #endif - diff --git a/src/Mod/Mesh/App/Segment.cpp b/src/Mod/Mesh/App/Segment.cpp index 8c245fbe10..69b66112a4 100644 --- a/src/Mod/Mesh/App/Segment.cpp +++ b/src/Mod/Mesh/App/Segment.cpp @@ -22,32 +22,32 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif -#include "Segment.h" #include "Mesh.h" #include "MeshPy.h" +#include "Segment.h" using namespace Mesh; Segment::Segment(const MeshObject* mesh, bool mod) - : _mesh(mesh) - , _save(false) - , _modifykernel(mod) -{ -} + : _mesh(mesh) + , _save(false) + , _modifykernel(mod) +{} Segment::Segment(const MeshObject* mesh, const std::vector& inds, bool mod) - : _mesh(mesh) - , _indices(inds) - , _save(false) - , _modifykernel(mod) + : _mesh(mesh) + , _indices(inds) + , _save(false) + , _modifykernel(mod) { - if (_modifykernel) + if (_modifykernel) { _mesh->updateMesh(inds); + } } void Segment::addIndices(const std::vector& inds) @@ -55,8 +55,9 @@ void Segment::addIndices(const std::vector& inds) _indices.insert(_indices.end(), inds.begin(), inds.end()); std::sort(_indices.begin(), _indices.end()); _indices.erase(std::unique(_indices.begin(), _indices.end()), _indices.end()); - if (_modifykernel) + if (_modifykernel) { _mesh->updateMesh(inds); + } } void Segment::removeIndices(const std::vector& inds) @@ -65,12 +66,16 @@ void Segment::removeIndices(const std::vector& inds) std::vector result; std::set s1(_indices.begin(), _indices.end()); std::set s2(inds.begin(), inds.end()); - std::set_difference(s1.begin(), s1.end(), s2.begin(), s2.end(), - std::back_insert_iterator >(result)); + std::set_difference(s1.begin(), + s1.end(), + s2.begin(), + s2.end(), + std::back_insert_iterator>(result)); _indices = result; - if (_modifykernel) + if (_modifykernel) { _mesh->updateMesh(); + } } const std::vector& Segment::getIndices() const @@ -82,33 +87,38 @@ Segment::Segment(const Segment& s) = default; Segment::Segment(Segment&& s) = default; -Segment& Segment::operator = (const Segment& s) +Segment& Segment::operator=(const Segment& s) { // Do not copy the MeshObject pointer - if (this != &s) + if (this != &s) { this->_indices = s._indices; - if (_modifykernel) + } + if (_modifykernel) { _mesh->updateMesh(); + } return *this; } -Segment& Segment::operator = (Segment&& s) +Segment& Segment::operator=(Segment&& s) { // Do not copy the MeshObject pointer - if (this != &s) + if (this != &s) { this->_indices = s._indices; - if (_modifykernel) + } + if (_modifykernel) { _mesh->updateMesh(); + } return *this; } -bool Segment::operator == (const Segment& s) const +bool Segment::operator==(const Segment& s) const { return this->_indices == s._indices; } // ---------------------------------------------------------------------------- +// clang-format off Segment::const_facet_iterator::const_facet_iterator (const Segment* segm, std::vector::const_iterator it) : _segment(segm), _f_it(segm->_mesh->getKernel()), _it(it) @@ -177,3 +187,4 @@ Segment::const_facet_iterator& Segment::const_facet_iterator::operator--() --(this->_it); return *this; } +// clang-format on diff --git a/src/Mod/Mesh/App/Segment.h b/src/Mod/Mesh/App/Segment.h index 1d1b069482..a8193d9f30 100644 --- a/src/Mod/Mesh/App/Segment.h +++ b/src/Mod/Mesh/App/Segment.h @@ -46,22 +46,43 @@ public: void addIndices(const std::vector& inds); void removeIndices(const std::vector& inds); const std::vector& getIndices() const; - bool isEmpty() const { return _indices.empty(); } + bool isEmpty() const + { + return _indices.empty(); + } Segment(const Segment&); Segment(Segment&&); - Segment& operator = (const Segment&); - Segment& operator = (Segment&&); - bool operator == (const Segment&) const; + Segment& operator=(const Segment&); + Segment& operator=(Segment&&); + bool operator==(const Segment&) const; - void setName(const std::string& n) { _name = n; } - const std::string& getName() const { return _name; } + void setName(const std::string& n) + { + _name = n; + } + const std::string& getName() const + { + return _name; + } - void setColor(const std::string& c) { _color = c; } - const std::string& getColor() const { return _color; } + void setColor(const std::string& c) + { + _color = c; + } + const std::string& getColor() const + { + return _color; + } - void save(bool on) { _save = on; } - bool isSaved() const { return _save; } + void save(bool on) + { + _save = on; + } + bool isSaved() const + { + return _save; + } // friends friend class MeshObject; @@ -91,6 +112,7 @@ public: bool operator!=(const const_facet_iterator& fi) const; const_facet_iterator& operator++(); const_facet_iterator& operator--(); + private: void dereference() const; const Segment* _segment; @@ -100,12 +122,16 @@ public: }; const_facet_iterator facets_begin() const - { return {this, _indices.begin()}; } + { + return {this, _indices.begin()}; + } const_facet_iterator facets_end() const - { return {this, _indices.end()}; } + { + return {this, _indices.end()}; + } }; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_SEGMENT_H +#endif // MESH_SEGMENT_H diff --git a/src/Mod/Mesh/App/Types.h b/src/Mod/Mesh/App/Types.h index a7d3d2b1f9..89d7b8a272 100644 --- a/src/Mod/Mesh/App/Types.h +++ b/src/Mod/Mesh/App/Types.h @@ -33,6 +33,6 @@ using ElementIndex = MeshCore::ElementIndex; using FacetIndex = MeshCore::FacetIndex; using PointIndex = MeshCore::PointIndex; -} // namespace Mesh +} // namespace Mesh -#endif // MESH_TYPES_H +#endif // MESH_TYPES_H diff --git a/src/Mod/Mesh/BuildRegularGeoms.py b/src/Mod/Mesh/BuildRegularGeoms.py index 0d08a7117b..4be4b09cfe 100644 --- a/src/Mod/Mesh/BuildRegularGeoms.py +++ b/src/Mod/Mesh/BuildRegularGeoms.py @@ -15,7 +15,8 @@ Sample code for creating a mesh: import math -def Sphere (radius, count): + +def Sphere(radius, count): """Creates a sphere with a given radius. bla bla bla @@ -23,11 +24,12 @@ def Sphere (radius, count): """ return Ellipsoid(radius, radius, count) -def Ellipsoid (lenX, lenY, count): + +def Ellipsoid(lenX, lenY, count): polyline = [] step = math.pi / count i = 0.0 - while (i < math.pi + step / 10.0): + while i < math.pi + step / 10.0: x = math.cos(i) * lenX y = math.sin(i) * lenY polyline.append([x, y]) @@ -35,53 +37,56 @@ def Ellipsoid (lenX, lenY, count): return RotationBody(polyline, count) -def Cylinder (radius, len, closed, edgelen, count): + +def Cylinder(radius, len, closed, edgelen, count): return Cone(radius, radius, len, closed, edgelen, count) -def Cone (radius1, radius2, len, closed, edgelen, count): + +def Cone(radius1, radius2, len, closed, edgelen, count): polyline = [] - if (closed): + if closed: try: step = radius2 / math.ceil(radius2 / edgelen) except ZeroDivisionError: pass else: i = 0.0 - while (i < radius2 - step / 2.0): + while i < radius2 - step / 2.0: polyline.append([len, i]) i = i + step ct = math.ceil(len / edgelen) step = len / ct rstep = (radius1 - radius2) / ct - i = len; + i = len r = radius2 - while (i > 0.0 + step / 2.0): + while i > 0.0 + step / 2.0: polyline.append([i, r]) i = i - step r = r + rstep polyline.append([0.0, radius1]) - if (closed): + if closed: try: step = radius1 / math.ceil(radius1 / edgelen) except ZeroDivisionError: pass else: i = radius1 - step - while (i > 0.0 + step / 2.0): + while i > 0.0 + step / 2.0: polyline.append([0.0, i]) i = i - step polyline.append([0.0, 0.0]) return RotationBody(polyline, count) -def Toroid (radius1, radius2, count): + +def Toroid(radius1, radius2, count): polyline = [] step = math.pi * 2.0 / count i = -math.pi - while (i < math.pi + step / 10.0): + while i < math.pi + step / 10.0: x = radius1 + math.cos(i) * radius2 y = radius1 + math.sin(i) * radius2 polyline.append([x, y]) @@ -90,7 +95,7 @@ def Toroid (radius1, radius2, count): return RotationBody(polyline, count) -def RotationBody (polyline, count): +def RotationBody(polyline, count): """Build a rotation body from a given (closed) polyline, rotation axis is the X-Axis. Parameter: polyline: list of tuple of 2 floats (2d vector) @@ -99,12 +104,12 @@ def RotationBody (polyline, count): facets = [] step = math.pi * 2.0 / count - i = -math.pi; - while (i < math.pi - step / 10.0): + i = -math.pi + while i < math.pi - step / 10.0: li = i + step for j in range(0, len(polyline) - 1): v1 = polyline[j] - v2 = polyline[j+1] + v2 = polyline[j + 1] x1 = v1[0] y1 = v1[1] * math.cos(i) @@ -119,21 +124,22 @@ def RotationBody (polyline, count): y4 = v2[1] * math.cos(li) z4 = v2[1] * math.sin(li) - if (v1[1] != 0.0): + if v1[1] != 0.0: facets.append([x1, y1, z1]) facets.append([x2, y2, z2]) facets.append([x3, y3, z3]) - if (v2[1] != 0.0): + if v2[1] != 0.0: facets.append([x2, y2, z2]) facets.append([x4, y4, z4]) facets.append([x3, y3, z3]) i = i + step - return facets; + return facets -def Cube (lenX, lenY, lenZ): + +def Cube(lenX, lenY, lenZ): hx = lenX / 2.0 hy = lenY / 2.0 hz = lenZ / 2.0 @@ -190,80 +196,83 @@ def Cube (lenX, lenY, lenZ): return facets -def FineCube (lenX, lenY, lenZ, edgelen): + +def FineCube(lenX, lenY, lenZ, edgelen): hx = lenX / 2.0 hy = lenY / 2.0 hz = lenZ / 2.0 - cx = int(max(lenX / edgelen,1)) + cx = int(max(lenX / edgelen, 1)) dx = lenX / cx - cy = int(max(lenY / edgelen,1)) + cy = int(max(lenY / edgelen, 1)) dy = lenY / cy - cz = int(max(lenZ / edgelen,1)) + cz = int(max(lenZ / edgelen, 1)) dz = lenZ / cz facets = [] # z - for i in range(0,cx): - for j in range(0,cy): - facets.append([-hx+(i+0)*dx, -hy+(j+0)*dy, -hz]) - facets.append([-hx+(i+0)*dx, -hy+(j+1)*dy, -hz]) - facets.append([-hx+(i+1)*dx, -hy+(j+1)*dy, -hz]) + for i in range(0, cx): + for j in range(0, cy): + facets.append([-hx + (i + 0) * dx, -hy + (j + 0) * dy, -hz]) + facets.append([-hx + (i + 0) * dx, -hy + (j + 1) * dy, -hz]) + facets.append([-hx + (i + 1) * dx, -hy + (j + 1) * dy, -hz]) - facets.append([-hx+(i+0)*dx, -hy+(j+0)*dy, -hz]) - facets.append([-hx+(i+1)*dx, -hy+(j+1)*dy, -hz]) - facets.append([-hx+(i+1)*dx, -hy+(j+0)*dy, -hz]) + facets.append([-hx + (i + 0) * dx, -hy + (j + 0) * dy, -hz]) + facets.append([-hx + (i + 1) * dx, -hy + (j + 1) * dy, -hz]) + facets.append([-hx + (i + 1) * dx, -hy + (j + 0) * dy, -hz]) - facets.append([-hx+(i+0)*dx, -hy+(j+0)*dy, hz]) - facets.append([-hx+(i+1)*dx, -hy+(j+1)*dy, hz]) - facets.append([-hx+(i+0)*dx, -hy+(j+1)*dy, hz]) + facets.append([-hx + (i + 0) * dx, -hy + (j + 0) * dy, hz]) + facets.append([-hx + (i + 1) * dx, -hy + (j + 1) * dy, hz]) + facets.append([-hx + (i + 0) * dx, -hy + (j + 1) * dy, hz]) - facets.append([-hx+(i+0)*dx, -hy+(j+0)*dy, hz]) - facets.append([-hx+(i+1)*dx, -hy+(j+0)*dy, hz]) - facets.append([-hx+(i+1)*dx, -hy+(j+1)*dy, hz]) + facets.append([-hx + (i + 0) * dx, -hy + (j + 0) * dy, hz]) + facets.append([-hx + (i + 1) * dx, -hy + (j + 0) * dy, hz]) + facets.append([-hx + (i + 1) * dx, -hy + (j + 1) * dy, hz]) # y - for i in range(0,cx): - for j in range(0,cz): - facets.append([-hx+(i+0)*dx, -hy, -hz+(j+0)*dz]) - facets.append([-hx+(i+1)*dx, -hy, -hz+(j+1)*dz]) - facets.append([-hx+(i+0)*dx, -hy, -hz+(j+1)*dz]) + for i in range(0, cx): + for j in range(0, cz): + facets.append([-hx + (i + 0) * dx, -hy, -hz + (j + 0) * dz]) + facets.append([-hx + (i + 1) * dx, -hy, -hz + (j + 1) * dz]) + facets.append([-hx + (i + 0) * dx, -hy, -hz + (j + 1) * dz]) - facets.append([-hx+(i+0)*dx, -hy, -hz+(j+0)*dz]) - facets.append([-hx+(i+1)*dx, -hy, -hz+(j+0)*dz]) - facets.append([-hx+(i+1)*dx, -hy, -hz+(j+1)*dz]) + facets.append([-hx + (i + 0) * dx, -hy, -hz + (j + 0) * dz]) + facets.append([-hx + (i + 1) * dx, -hy, -hz + (j + 0) * dz]) + facets.append([-hx + (i + 1) * dx, -hy, -hz + (j + 1) * dz]) - facets.append([-hx+(i+0)*dx, hy, -hz+(j+0)*dz]) - facets.append([-hx+(i+0)*dx, hy, -hz+(j+1)*dz]) - facets.append([-hx+(i+1)*dx, hy, -hz+(j+1)*dz]) + facets.append([-hx + (i + 0) * dx, hy, -hz + (j + 0) * dz]) + facets.append([-hx + (i + 0) * dx, hy, -hz + (j + 1) * dz]) + facets.append([-hx + (i + 1) * dx, hy, -hz + (j + 1) * dz]) - facets.append([-hx+(i+0)*dx, hy, -hz+(j+0)*dz]) - facets.append([-hx+(i+1)*dx, hy, -hz+(j+1)*dz]) - facets.append([-hx+(i+1)*dx, hy, -hz+(j+0)*dz]) + facets.append([-hx + (i + 0) * dx, hy, -hz + (j + 0) * dz]) + facets.append([-hx + (i + 1) * dx, hy, -hz + (j + 1) * dz]) + facets.append([-hx + (i + 1) * dx, hy, -hz + (j + 0) * dz]) # x - for i in range(0,cy): - for j in range(0,cz): - facets.append([-hx, -hy+(i+0)*dy, -hz+(j+0)*dz]) - facets.append([-hx, -hy+(i+0)*dy, -hz+(j+1)*dz]) - facets.append([-hx, -hy+(i+1)*dy, -hz+(j+1)*dz]) + for i in range(0, cy): + for j in range(0, cz): + facets.append([-hx, -hy + (i + 0) * dy, -hz + (j + 0) * dz]) + facets.append([-hx, -hy + (i + 0) * dy, -hz + (j + 1) * dz]) + facets.append([-hx, -hy + (i + 1) * dy, -hz + (j + 1) * dz]) - facets.append([-hx, -hy+(i+0)*dy, -hz+(j+0)*dz]) - facets.append([-hx, -hy+(i+1)*dy, -hz+(j+1)*dz]) - facets.append([-hx, -hy+(i+1)*dy, -hz+(j+0)*dz]) + facets.append([-hx, -hy + (i + 0) * dy, -hz + (j + 0) * dz]) + facets.append([-hx, -hy + (i + 1) * dy, -hz + (j + 1) * dz]) + facets.append([-hx, -hy + (i + 1) * dy, -hz + (j + 0) * dz]) - facets.append([hx, -hy+(i+0)*dy, -hz+(j+0)*dz]) - facets.append([hx, -hy+(i+1)*dy, -hz+(j+1)*dz]) - facets.append([hx, -hy+(i+0)*dy, -hz+(j+1)*dz]) + facets.append([hx, -hy + (i + 0) * dy, -hz + (j + 0) * dz]) + facets.append([hx, -hy + (i + 1) * dy, -hz + (j + 1) * dz]) + facets.append([hx, -hy + (i + 0) * dy, -hz + (j + 1) * dz]) - facets.append([hx, -hy+(i+0)*dy, -hz+(j+0)*dz]) - facets.append([hx, -hy+(i+1)*dy, -hz+(j+0)*dz]) - facets.append([hx, -hy+(i+1)*dy, -hz+(j+1)*dz]) + facets.append([hx, -hy + (i + 0) * dy, -hz + (j + 0) * dz]) + facets.append([hx, -hy + (i + 1) * dy, -hz + (j + 0) * dz]) + facets.append([hx, -hy + (i + 1) * dy, -hz + (j + 1) * dz]) return facets -def main (): - Cylinder (10.0, 20.0, 1, 10, 10) + +def main(): + Cylinder(10.0, 20.0, 1, 10, 10) + if __name__ == "__main__": main() diff --git a/src/Mod/Mesh/CMakeLists.txt b/src/Mod/Mesh/CMakeLists.txt index 11664eff9f..5201728eb4 100644 --- a/src/Mod/Mesh/CMakeLists.txt +++ b/src/Mod/Mesh/CMakeLists.txt @@ -47,4 +47,3 @@ INSTALL( INSTALL(FILES ${MeshTestDataFiles} DESTINATION Mod/Mesh/App/TestData) - diff --git a/src/Mod/Mesh/Gui/AppMeshGui.cpp b/src/Mod/Mesh/Gui/AppMeshGui.cpp index 3386a50806..c871bde735 100644 --- a/src/Mod/Mesh/Gui/AppMeshGui.cpp +++ b/src/Mod/Mesh/Gui/AppMeshGui.cpp @@ -22,12 +22,12 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include -# include +#include #endif #include @@ -35,13 +35,12 @@ #include #include #include -#include #include +#include #include "DlgEvaluateMeshImp.h" #include "DlgSettingsImportExportImp.h" #include "DlgSettingsMeshView.h" -#include "images.h" #include "PropertyEditorMesh.h" #include "SoFCIndexedFaceSet.h" #include "SoFCMeshObject.h" @@ -55,6 +54,7 @@ #include "ViewProviderTransform.h" #include "ViewProviderTransformDemolding.h" #include "Workbench.h" +#include "images.h" // use a different name to CreateCommand() @@ -68,16 +68,16 @@ void loadMeshResource() Gui::Translator::instance()->refresh(); } -namespace MeshGui { -class Module : public Py::ExtensionModule +namespace MeshGui +{ +class Module: public Py::ExtensionModule { public: - Module() : Py::ExtensionModule("MeshGui") + Module() + : Py::ExtensionModule("MeshGui") { - add_varargs_method("convertToSTL",&Module::convertToSTL, - "Convert a scene into an STL." - ); - initialize("This module is the MeshGui module."); // register with Python + add_varargs_method("convertToSTL", &Module::convertToSTL, "Convert a scene into an STL."); + initialize("This module is the MeshGui module."); // register with Python } private: @@ -85,8 +85,9 @@ private: { char* inname; char* outname; - if (!PyArg_ParseTuple(args.ptr(), "etet","utf-8",&inname,"utf-8",&outname)) + if (!PyArg_ParseTuple(args.ptr(), "etet", "utf-8", &inname, "utf-8", &outname)) { throw Py::Exception(); + } std::string inputName = std::string(inname); PyMem_Free(inname); std::string outputName = std::string(outname); @@ -95,7 +96,7 @@ private: bool ok = false; SoInput in; if (in.openFile(inputName.c_str())) { - SoSeparator * node = SoDB::readAll(&in); + SoSeparator* node = SoDB::readAll(&in); if (node) { node->ref(); SoSTLFileKit* stlKit = new SoSTLFileKit(); @@ -116,7 +117,7 @@ PyObject* initModule() return Base::Interpreter().addModule(new Module); } -} // namespace MeshGui +} // namespace MeshGui /* Python entry */ PyMOD_INIT_FUNC(MeshGui) @@ -130,7 +131,7 @@ PyMOD_INIT_FUNC(MeshGui) try { Base::Interpreter().loadModule("Mesh"); } - catch(const Base::Exception& e) { + catch (const Base::Exception& e) { PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } @@ -147,18 +148,22 @@ PyMOD_INIT_FUNC(MeshGui) } // try to instantiate flat-mesh commands - try{ + try { Base::Interpreter().runString("import MeshFlatteningCommand"); - } catch (Base::PyException &err){ + } + catch (Base::PyException& err) { err.ReportException(); } // register preferences pages - (void)new Gui::PrefPageProducer (QT_TRANSLATE_NOOP("QObject", "Display")); - (void)new Gui::PrefPageProducer ( QT_TRANSLATE_NOOP("QObject", "Import-Export") ); + (void)new Gui::PrefPageProducer( + QT_TRANSLATE_NOOP("QObject", "Display")); + (void)new Gui::PrefPageProducer( + QT_TRANSLATE_NOOP("QObject", "Import-Export")); Mesh::Extension3MFFactory::addProducer(new MeshGui::ThumbnailExtensionProducer); + // clang-format off MeshGui::SoFCMeshObjectElement ::initClass(); MeshGui::SoSFMeshObject ::initClass(); MeshGui::SoFCMeshObjectNode ::initClass(); @@ -197,6 +202,7 @@ PyMOD_INIT_FUNC(MeshGui) // add resources and reloads the translators loadMeshResource(); + // clang-format on PyMOD_Return(mod); } diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index 2efee094db..0e28afe321 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -22,27 +22,27 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# ifdef FC_OS_WIN32 -# include -# endif -# include +#ifdef FC_OS_WIN32 +#include +#endif +#include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #ifndef __InventorAll__ -# include +#include #endif #include #include -#include #include +#include #include #include #include @@ -57,9 +57,9 @@ #include #include +#include #include #include -#include #include "DlgDecimating.h" #include "DlgEvaluateMeshImp.h" @@ -77,24 +77,24 @@ using namespace Mesh; - DEF_STD_CMD_A(CmdMeshUnion) CmdMeshUnion::CmdMeshUnion() - :Command("Mesh_Union") + : Command("Mesh_Union") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Union"); - sToolTipText = sMenuText; - sWhatsThis = "Mesh_Union"; - sStatusTip = sMenuText; - sPixmap = "Mesh_Union"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Union"); + sToolTipText = sMenuText; + sWhatsThis = "Mesh_Union"; + sStatusTip = sMenuText; + sPixmap = "Mesh_Union"; } void CmdMeshUnion::activated(int) { - std::vector obj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector obj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); std::string name1 = obj.front()->getNameInDocument(); std::string name2 = obj.back()->getNameInDocument(); std::string name3 = getUniqueObjectName("Union"); @@ -102,12 +102,16 @@ void CmdMeshUnion::activated(int) try { openCommand(QT_TRANSLATE_NOOP("Command", "Mesh union")); doCommand(Doc, - "import OpenSCADUtils\n" - "mesh = OpenSCADUtils.meshoptempfile('union',(App.ActiveDocument.%s.Mesh,App.ActiveDocument.%s.Mesh))\n" - "App.ActiveDocument.addObject(\"Mesh::Feature\",\"%s\")\n" - "App.ActiveDocument.%s.Mesh = mesh\n", - name1.c_str(), name2.c_str(), - name3.c_str(), name3.c_str()); + "import OpenSCADUtils\n" + "mesh = " + "OpenSCADUtils.meshoptempfile('union',(App.ActiveDocument.%s.Mesh,App." + "ActiveDocument.%s.Mesh))\n" + "App.ActiveDocument.addObject(\"Mesh::Feature\",\"%s\")\n" + "App.ActiveDocument.%s.Mesh = mesh\n", + name1.c_str(), + name2.c_str(), + name3.c_str(), + name3.c_str()); updateActive(); commitCommand(); @@ -129,15 +133,18 @@ void CmdMeshUnion::activated(int) } if (found) { - QMessageBox::critical(Gui::getMainWindow(), + QMessageBox::critical( + Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), qApp->translate("Mesh_Union", "Unknown error occurred while running OpenSCAD.")); } else { - QMessageBox::warning(Gui::getMainWindow(), + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), - qApp->translate("Mesh_Union", "OpenSCAD cannot be found on your system.\n" - "Please visit http://www.openscad.org/index.html to install it.")); + qApp->translate("Mesh_Union", + "OpenSCAD cannot be found on your system.\n" + "Please visit http://www.openscad.org/index.html to install it.")); } } } @@ -152,20 +159,21 @@ bool CmdMeshUnion::isActive() DEF_STD_CMD_A(CmdMeshDifference) CmdMeshDifference::CmdMeshDifference() - :Command("Mesh_Difference") + : Command("Mesh_Difference") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Difference"); - sToolTipText = sMenuText; - sWhatsThis = "Mesh_Difference"; - sStatusTip = sMenuText; - sPixmap = "Mesh_Difference"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Difference"); + sToolTipText = sMenuText; + sWhatsThis = "Mesh_Difference"; + sStatusTip = sMenuText; + sPixmap = "Mesh_Difference"; } void CmdMeshDifference::activated(int) { - std::vector obj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector obj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); std::string name1 = obj.front()->getNameInDocument(); std::string name2 = obj.back()->getNameInDocument(); std::string name3 = getUniqueObjectName("Difference"); @@ -173,12 +181,16 @@ void CmdMeshDifference::activated(int) try { doCommand(Doc, - "import OpenSCADUtils\n" - "mesh = OpenSCADUtils.meshoptempfile('difference',(App.ActiveDocument.%s.Mesh,App.ActiveDocument.%s.Mesh))\n" - "App.ActiveDocument.addObject(\"Mesh::Feature\",\"%s\")\n" - "App.ActiveDocument.%s.Mesh = mesh\n", - name1.c_str(), name2.c_str(), - name3.c_str(), name3.c_str()); + "import OpenSCADUtils\n" + "mesh = " + "OpenSCADUtils.meshoptempfile('difference',(App.ActiveDocument.%s.Mesh,App." + "ActiveDocument.%s.Mesh))\n" + "App.ActiveDocument.addObject(\"Mesh::Feature\",\"%s\")\n" + "App.ActiveDocument.%s.Mesh = mesh\n", + name1.c_str(), + name2.c_str(), + name3.c_str(), + name3.c_str()); updateActive(); commitCommand(); @@ -200,15 +212,18 @@ void CmdMeshDifference::activated(int) } if (found) { - QMessageBox::critical(Gui::getMainWindow(), + QMessageBox::critical( + Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), qApp->translate("Mesh_Union", "Unknown error occurred while running OpenSCAD.")); } else { - QMessageBox::warning(Gui::getMainWindow(), + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), - qApp->translate("Mesh_Union", "OpenSCAD cannot be found on your system.\n" - "Please visit http://www.openscad.org/index.html to install it.")); + qApp->translate("Mesh_Union", + "OpenSCAD cannot be found on your system.\n" + "Please visit http://www.openscad.org/index.html to install it.")); } } } @@ -223,20 +238,21 @@ bool CmdMeshDifference::isActive() DEF_STD_CMD_A(CmdMeshIntersection) CmdMeshIntersection::CmdMeshIntersection() - :Command("Mesh_Intersection") + : Command("Mesh_Intersection") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Intersection"); - sToolTipText = sMenuText; - sWhatsThis = "Mesh_Intersection"; - sStatusTip = sMenuText; - sPixmap = "Mesh_Intersection"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Intersection"); + sToolTipText = sMenuText; + sWhatsThis = "Mesh_Intersection"; + sStatusTip = sMenuText; + sPixmap = "Mesh_Intersection"; } void CmdMeshIntersection::activated(int) { - std::vector obj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector obj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); std::string name1 = obj.front()->getNameInDocument(); std::string name2 = obj.back()->getNameInDocument(); std::string name3 = getUniqueObjectName("Intersection"); @@ -244,12 +260,16 @@ void CmdMeshIntersection::activated(int) try { doCommand(Doc, - "import OpenSCADUtils\n" - "mesh = OpenSCADUtils.meshoptempfile('intersection',(App.ActiveDocument.%s.Mesh,App.ActiveDocument.%s.Mesh))\n" - "App.ActiveDocument.addObject(\"Mesh::Feature\",\"%s\")\n" - "App.ActiveDocument.%s.Mesh = mesh\n", - name1.c_str(), name2.c_str(), - name3.c_str(), name3.c_str()); + "import OpenSCADUtils\n" + "mesh = " + "OpenSCADUtils.meshoptempfile('intersection',(App.ActiveDocument.%s.Mesh,App." + "ActiveDocument.%s.Mesh))\n" + "App.ActiveDocument.addObject(\"Mesh::Feature\",\"%s\")\n" + "App.ActiveDocument.%s.Mesh = mesh\n", + name1.c_str(), + name2.c_str(), + name3.c_str(), + name3.c_str()); updateActive(); commitCommand(); @@ -271,15 +291,18 @@ void CmdMeshIntersection::activated(int) } if (found) { - QMessageBox::critical(Gui::getMainWindow(), + QMessageBox::critical( + Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), qApp->translate("Mesh_Union", "Unknown error occurred while running OpenSCAD.")); } else { - QMessageBox::warning(Gui::getMainWindow(), + QMessageBox::warning( + Gui::getMainWindow(), qApp->translate("Mesh_Union", "OpenSCAD"), - qApp->translate("Mesh_Union", "OpenSCAD cannot be found on your system.\n" - "Please visit http://www.openscad.org/index.html to install it.")); + qApp->translate("Mesh_Union", + "OpenSCAD cannot be found on your system.\n" + "Please visit http://www.openscad.org/index.html to install it.")); } } } @@ -294,22 +317,23 @@ bool CmdMeshIntersection::isActive() DEF_STD_CMD_A(CmdMeshImport) CmdMeshImport::CmdMeshImport() - :Command("Mesh_Import") + : Command("Mesh_Import") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Import mesh..."); - sToolTipText = QT_TR_NOOP("Imports a mesh from file"); - sWhatsThis = "Mesh_Import"; - sStatusTip = QT_TR_NOOP("Imports a mesh from file"); - sPixmap = "Mesh_Import"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Import mesh..."); + sToolTipText = QT_TR_NOOP("Imports a mesh from file"); + sWhatsThis = "Mesh_Import"; + sStatusTip = QT_TR_NOOP("Imports a mesh from file"); + sPixmap = "Mesh_Import"; } void CmdMeshImport::activated(int) { // use current path as default QStringList filter; - filter << QString::fromLatin1("%1 (*.stl *.ast *.bms *.obj *.off *.iv *.ply *.nas *.bdf)").arg(QObject::tr("All Mesh Files")); + filter << QString::fromLatin1("%1 (*.stl *.ast *.bms *.obj *.off *.iv *.ply *.nas *.bdf)") + .arg(QObject::tr("All Mesh Files")); filter << QString::fromLatin1("%1 (*.stl)").arg(QObject::tr("Binary STL")); filter << QString::fromLatin1("%1 (*.ast)").arg(QObject::tr("ASCII STL")); filter << QString::fromLatin1("%1 (*.bms)").arg(QObject::tr("Binary Mesh")); @@ -322,14 +346,15 @@ void CmdMeshImport::activated(int) // Allow multi selection QStringList fn = Gui::FileDialog::getOpenFileNames(Gui::getMainWindow(), - QObject::tr("Import mesh"), QString(), filter.join(QLatin1String(";;"))); + QObject::tr("Import mesh"), + QString(), + filter.join(QLatin1String(";;"))); for (const auto& it : fn) { std::string unicodepath = Base::Tools::escapedUnicodeFromUtf8(it.toUtf8().data()); unicodepath = Base::Tools::escapeEncodeFilename(unicodepath); openCommand(QT_TRANSLATE_NOOP("Command", "Import Mesh")); - doCommand(Doc,"import Mesh"); - doCommand(Doc,"Mesh.insert(u\"%s\")", - unicodepath.c_str()); + doCommand(Doc, "import Mesh"); + doCommand(Doc, "Mesh.insert(u\"%s\")", unicodepath.c_str()); commitCommand(); updateActive(); } @@ -345,26 +370,28 @@ bool CmdMeshImport::isActive() DEF_STD_CMD_A(CmdMeshExport) CmdMeshExport::CmdMeshExport() - :Command("Mesh_Export") + : Command("Mesh_Export") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Export mesh..."); - sToolTipText = QT_TR_NOOP("Exports a mesh to file"); - sWhatsThis = "Mesh_Export"; - sStatusTip = QT_TR_NOOP("Exports a mesh to file"); - sPixmap = "Mesh_Export"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Export mesh..."); + sToolTipText = QT_TR_NOOP("Exports a mesh to file"); + sWhatsThis = "Mesh_Export"; + sStatusTip = QT_TR_NOOP("Exports a mesh to file"); + sPixmap = "Mesh_Export"; } void CmdMeshExport::activated(int) { - std::vector docObjs = Gui::Selection().getObjectsOfType - (Mesh::Feature::getClassTypeId()); - if (docObjs.size() != 1) + std::vector docObjs = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + if (docObjs.size() != 1) { return; + } App::DocumentObject* docObj = docObjs.front(); + // clang-format off QString dir = QString::fromUtf8(docObj->Label.getValue()); QList > ext; ext << qMakePair(QString::fromLatin1("%1 (*.stl)").arg(QObject::tr("Binary STL")), "STL"); @@ -386,13 +413,18 @@ void CmdMeshExport::activated(int) ext << qMakePair(QString::fromLatin1("%1 (*.asy)").arg(QObject::tr("Asymptote Format")), "ASY"); ext << qMakePair(QString::fromLatin1("%1 (*.3mf)").arg(QObject::tr("3D Manufacturing Format")), "3MF"); ext << qMakePair(QString::fromLatin1("%1 (*.*)").arg(QObject::tr("All Files")), ""); // Undefined + // clang-format on QStringList filter; - for (const auto& it : ext) + for (const auto& it : ext) { filter << it.first; + } QString format; QString fn = Gui::FileDialog::getSaveFileName(Gui::getMainWindow(), - QObject::tr("Export mesh"), dir, filter.join(QLatin1String(";;")), &format); + QObject::tr("Export mesh"), + dir, + filter.join(QLatin1String(";;")), + &format); if (!fn.isEmpty()) { QFileInfo fi(fn); QByteArray extension = fi.suffix().toLatin1(); @@ -403,7 +435,8 @@ void CmdMeshExport::activated(int) } } - MeshGui::ViewProviderMesh* vp = dynamic_cast(Gui::Application::Instance->getViewProvider(docObj)); + MeshGui::ViewProviderMesh* vp = dynamic_cast( + Gui::Application::Instance->getViewProvider(docObj)); if (vp) { vp->exportMesh((const char*)fn.toUtf8(), (const char*)extension); } @@ -420,26 +453,35 @@ bool CmdMeshExport::isActive() DEF_STD_CMD_A(CmdMeshFromGeometry) CmdMeshFromGeometry::CmdMeshFromGeometry() - :Command("Mesh_FromGeometry") + : Command("Mesh_FromGeometry") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh from geometry..."); - sToolTipText = QT_TR_NOOP("Create mesh from the selected geometry"); - sWhatsThis = "Mesh_FromGeometry"; - sStatusTip = QT_TR_NOOP("Create mesh from the selected geometry"); + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Create mesh from geometry..."); + sToolTipText = QT_TR_NOOP("Create mesh from the selected geometry"); + sWhatsThis = "Mesh_FromGeometry"; + sStatusTip = QT_TR_NOOP("Create mesh from the selected geometry"); } void CmdMeshFromGeometry::activated(int) { bool ok; - double tol = QInputDialog::getDouble(Gui::getMainWindow(), QObject::tr("Meshing Tolerance"), - QObject::tr("Enter tolerance for meshing geometry:"), 0.1, 0.01, 10.0, 2, &ok, Qt::MSWindowsFixedSizeDialogHint); - if (!ok) + double tol = QInputDialog::getDouble(Gui::getMainWindow(), + QObject::tr("Meshing Tolerance"), + QObject::tr("Enter tolerance for meshing geometry:"), + 0.1, + 0.01, + 10.0, + 2, + &ok, + Qt::MSWindowsFixedSizeDialogHint); + if (!ok) { return; + } App::Document* doc = App::GetApplication().getActiveDocument(); - std::vector geo = Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId()); + std::vector geo = + Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId()); for (auto it : geo) { if (!it->getTypeId().isDerivedFrom(Mesh::Feature::getClassTypeId())) { // exclude meshes @@ -447,19 +489,23 @@ void CmdMeshFromGeometry::activated(int) it->getPropertyMap(Map); Mesh::MeshObject mesh; for (const auto& jt : Map) { - if (jt.first == "Shape" && jt.second->getTypeId().isDerivedFrom(App::PropertyComplexGeoData::getClassTypeId())) { + if (jt.first == "Shape" + && jt.second->getTypeId().isDerivedFrom( + App::PropertyComplexGeoData::getClassTypeId())) { std::vector aPoints; std::vector aTopo; - const Data::ComplexGeoData* data = static_cast(jt.second)->getComplexData(); + const Data::ComplexGeoData* data = + static_cast(jt.second)->getComplexData(); if (data) { - data->getFaces(aPoints, aTopo,(float)tol); + data->getFaces(aPoints, aTopo, (float)tol); mesh.setFacets(aTopo, aPoints); } } } // create a mesh feature and assign the mesh - Mesh::Feature* mf = static_cast(doc->addObject("Mesh::Feature","Mesh")); + Mesh::Feature* mf = + static_cast(doc->addObject("Mesh::Feature", "Mesh")); mf->Mesh.setValue(mesh.getKernel()); } } @@ -468,8 +514,9 @@ void CmdMeshFromGeometry::activated(int) bool CmdMeshFromGeometry::isActive() { App::Document* doc = App::GetApplication().getActiveDocument(); - if (!doc) + if (!doc) { return false; + } return getSelection().countObjectsOfType(App::GeoFeature::getClassTypeId()) >= 1; } @@ -479,20 +526,20 @@ bool CmdMeshFromGeometry::isActive() DEF_STD_CMD_A(CmdMeshFromPartShape) CmdMeshFromPartShape::CmdMeshFromPartShape() - : Command("Mesh_FromPartShape") + : Command("Mesh_FromPartShape") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh from shape..."); - sToolTipText = QT_TR_NOOP("Tessellate shape"); - sWhatsThis = "Mesh_FromPartShape"; - sStatusTip = sToolTipText; - sPixmap = "Mesh_FromPartShape.svg"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Create mesh from shape..."); + sToolTipText = QT_TR_NOOP("Tessellate shape"); + sWhatsThis = "Mesh_FromPartShape"; + sStatusTip = sToolTipText; + sPixmap = "Mesh_FromPartShape.svg"; } void CmdMeshFromPartShape::activated(int) { - doCommand(Doc,"import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_Mesher')\n"); + doCommand(Doc, "import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_Mesher')\n"); } bool CmdMeshFromPartShape::isActive() @@ -505,32 +552,43 @@ bool CmdMeshFromPartShape::isActive() DEF_STD_CMD_A(CmdMeshVertexCurvature) CmdMeshVertexCurvature::CmdMeshVertexCurvature() - : Command("Mesh_VertexCurvature") + : Command("Mesh_VertexCurvature") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Curvature plot"); - sToolTipText = QT_TR_NOOP("Calculates the curvature of the vertices of a mesh"); - sWhatsThis = "Mesh_VertexCurvature"; - sStatusTip = QT_TR_NOOP("Calculates the curvature of the vertices of a mesh"); - sPixmap = "Mesh_VertexCurvature"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Curvature plot"); + sToolTipText = QT_TR_NOOP("Calculates the curvature of the vertices of a mesh"); + sWhatsThis = "Mesh_VertexCurvature"; + sStatusTip = QT_TR_NOOP("Calculates the curvature of the vertices of a mesh"); + sPixmap = "Mesh_VertexCurvature"; } void CmdMeshVertexCurvature::activated(int) { - std::vector meshes = getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector meshes = + getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto it : meshes) { std::string fName = it->getNameInDocument(); fName += "_Curvature"; fName = getUniqueObjectName(fName.c_str()); openCommand(QT_TRANSLATE_NOOP("Command", "Mesh VertexCurvature")); - App::DocumentObject* grp = App::DocumentObjectGroup::getGroupOfObject( it ); - if (grp) - doCommand(Doc,"App.activeDocument().getObject(\"%s\").newObject(\"Mesh::Curvature\",\"%s\")",grp->getNameInDocument(), fName.c_str()); - else - doCommand(Doc,"App.activeDocument().addObject(\"Mesh::Curvature\",\"%s\")",fName.c_str()); - doCommand(Doc,"App.activeDocument().%s.Source = App.activeDocument().%s",fName.c_str(), + App::DocumentObject* grp = App::DocumentObjectGroup::getGroupOfObject(it); + if (grp) { + doCommand( + Doc, + "App.activeDocument().getObject(\"%s\").newObject(\"Mesh::Curvature\",\"%s\")", + grp->getNameInDocument(), + fName.c_str()); + } + else { + doCommand(Doc, + "App.activeDocument().addObject(\"Mesh::Curvature\",\"%s\")", + fName.c_str()); + } + doCommand(Doc, + "App.activeDocument().%s.Source = App.activeDocument().%s", + fName.c_str(), it->getNameInDocument()); } @@ -549,15 +607,15 @@ bool CmdMeshVertexCurvature::isActive() DEF_STD_CMD_A(CmdMeshVertexCurvatureInfo) CmdMeshVertexCurvatureInfo::CmdMeshVertexCurvatureInfo() - :Command("Mesh_CurvatureInfo") + : Command("Mesh_CurvatureInfo") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Curvature info"); - sToolTipText = QT_TR_NOOP("Information about curvature"); - sWhatsThis = "Mesh_CurvatureInfo"; - sStatusTip = QT_TR_NOOP("Information about curvature"); - sPixmap = "Mesh_CurvatureInfo"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Curvature info"); + sToolTipText = QT_TR_NOOP("Information about curvature"); + sWhatsThis = "Mesh_CurvatureInfo"; + sStatusTip = QT_TR_NOOP("Information about curvature"); + sPixmap = "Mesh_CurvatureInfo"; } void CmdMeshVertexCurvatureInfo::activated(int) @@ -569,17 +627,19 @@ void CmdMeshVertexCurvatureInfo::activated(int) viewer->setEditing(true); viewer->setRedirectToSceneGraph(true); viewer->setSelectionEnabled(false); - viewer->setEditingCursor(QCursor(Gui::BitmapFactory().pixmapFromSvg("Mesh_Pipette",QSize(32,32)),4,29)); + viewer->setEditingCursor( + QCursor(Gui::BitmapFactory().pixmapFromSvg("Mesh_Pipette", QSize(32, 32)), 4, 29)); viewer->addEventCallback(SoEvent::getClassTypeId(), - MeshGui::ViewProviderMeshCurvature::curvatureInfoCallback); - } + MeshGui::ViewProviderMeshCurvature::curvatureInfoCallback); + } } bool CmdMeshVertexCurvatureInfo::isActive() { App::Document* doc = App::GetApplication().getActiveDocument(); - if (!doc || doc->countObjectsOfType(Mesh::Curvature::getClassTypeId()) == 0) + if (!doc || doc->countObjectsOfType(Mesh::Curvature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -595,21 +655,23 @@ bool CmdMeshVertexCurvatureInfo::isActive() DEF_STD_CMD_A(CmdMeshPolySegm) CmdMeshPolySegm::CmdMeshPolySegm() - :Command("Mesh_PolySegm") + : Command("Mesh_PolySegm") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Make segment"); - sToolTipText = QT_TR_NOOP("Creates a mesh segment"); - sWhatsThis = "Mesh_PolySegm"; - sStatusTip = QT_TR_NOOP("Creates a mesh segment"); - sPixmap = "PolygonPick"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Make segment"); + sToolTipText = QT_TR_NOOP("Creates a mesh segment"); + sWhatsThis = "Mesh_PolySegm"; + sStatusTip = QT_TR_NOOP("Creates a mesh segment"); + sPixmap = "PolygonPick"; } void CmdMeshPolySegm::activated(int) { - std::vector docObj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); - for (std::vector::iterator it = docObj.begin(); it != docObj.end(); ++it) { + std::vector docObj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + for (std::vector::iterator it = docObj.begin(); it != docObj.end(); + ++it) { if (it == docObj.begin()) { Gui::Document* doc = getActiveGuiDocument(); Gui::MDIView* view = doc->getActiveView(); @@ -626,16 +688,18 @@ void CmdMeshPolySegm::activated(int) } Gui::ViewProvider* pVP = getActiveGuiDocument()->getViewProvider(*it); - if (pVP->isVisible()) + if (pVP->isVisible()) { pVP->startEditing(); + } } } bool CmdMeshPolySegm::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -650,28 +714,29 @@ bool CmdMeshPolySegm::isActive() DEF_STD_CMD_A(CmdMeshAddFacet) CmdMeshAddFacet::CmdMeshAddFacet() - : Command("Mesh_AddFacet") + : Command("Mesh_AddFacet") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Add triangle"); - sToolTipText = QT_TR_NOOP("Add triangle manually to a mesh"); - sWhatsThis = "Mesh_AddFacet"; - sStatusTip = QT_TR_NOOP("Add triangle manually to a mesh"); - sPixmap = "Mesh_AddFacet"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Add triangle"); + sToolTipText = QT_TR_NOOP("Add triangle manually to a mesh"); + sWhatsThis = "Mesh_AddFacet"; + sStatusTip = QT_TR_NOOP("Add triangle manually to a mesh"); + sPixmap = "Mesh_AddFacet"; } void CmdMeshAddFacet::activated(int) { - std::vector docObj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector docObj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto it : docObj) { Gui::Document* doc = Gui::Application::Instance->getDocument(it->getDocument()); Gui::MDIView* view = doc->getActiveView(); if (view->getTypeId().isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { - MeshGui::MeshFaceAddition* edit = new MeshGui::MeshFaceAddition - (static_cast(view)); - edit->startEditing(static_cast - (Gui::Application::Instance->getViewProvider(it))); + MeshGui::MeshFaceAddition* edit = + new MeshGui::MeshFaceAddition(static_cast(view)); + edit->startEditing(static_cast( + Gui::Application::Instance->getViewProvider(it))); break; } } @@ -680,8 +745,9 @@ void CmdMeshAddFacet::activated(int) bool CmdMeshAddFacet::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -697,21 +763,23 @@ bool CmdMeshAddFacet::isActive() DEF_STD_CMD_A(CmdMeshPolyCut) CmdMeshPolyCut::CmdMeshPolyCut() - : Command("Mesh_PolyCut") + : Command("Mesh_PolyCut") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Cut mesh"); - sToolTipText = QT_TR_NOOP("Cuts a mesh with a picked polygon"); - sWhatsThis = "Mesh_PolyCut"; - sStatusTip = QT_TR_NOOP("Cuts a mesh with a picked polygon"); - sPixmap = "Mesh_PolyCut"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Cut mesh"); + sToolTipText = QT_TR_NOOP("Cuts a mesh with a picked polygon"); + sWhatsThis = "Mesh_PolyCut"; + sStatusTip = QT_TR_NOOP("Cuts a mesh with a picked polygon"); + sPixmap = "Mesh_PolyCut"; } void CmdMeshPolyCut::activated(int) { - std::vector docObj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); - for (std::vector::iterator it = docObj.begin(); it != docObj.end(); ++it) { + std::vector docObj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + for (std::vector::iterator it = docObj.begin(); it != docObj.end(); + ++it) { if (it == docObj.begin()) { Gui::Document* doc = getActiveGuiDocument(); Gui::MDIView* view = doc->getActiveView(); @@ -721,7 +789,7 @@ void CmdMeshPolyCut::activated(int) Gui::PolyClipSelection* clip = new Gui::PolyClipSelection(); clip->setRole(Gui::SelectionRole::Split, true); - clip->setColor(0.0f,0.0f,1.0f); + clip->setColor(0.0f, 0.0f, 1.0f); clip->setLineWidth(1.0f); viewer->navigationStyle()->startSelection(clip); viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), @@ -733,16 +801,18 @@ void CmdMeshPolyCut::activated(int) } Gui::ViewProvider* pVP = getActiveGuiDocument()->getViewProvider(*it); - if (pVP->isVisible()) + if (pVP->isVisible()) { pVP->startEditing(); + } } } bool CmdMeshPolyCut::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -758,21 +828,23 @@ bool CmdMeshPolyCut::isActive() DEF_STD_CMD_A(CmdMeshPolyTrim) CmdMeshPolyTrim::CmdMeshPolyTrim() - : Command("Mesh_PolyTrim") + : Command("Mesh_PolyTrim") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Trim mesh"); - sToolTipText = QT_TR_NOOP("Trims a mesh with a picked polygon"); - sWhatsThis = "Mesh_PolyTrim"; - sStatusTip = QT_TR_NOOP("Trims a mesh with a picked polygon"); - sPixmap = "Mesh_PolyTrim"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Trim mesh"); + sToolTipText = QT_TR_NOOP("Trims a mesh with a picked polygon"); + sWhatsThis = "Mesh_PolyTrim"; + sStatusTip = QT_TR_NOOP("Trims a mesh with a picked polygon"); + sPixmap = "Mesh_PolyTrim"; } void CmdMeshPolyTrim::activated(int) { - std::vector docObj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); - for (std::vector::iterator it = docObj.begin(); it != docObj.end(); ++it) { + std::vector docObj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + for (std::vector::iterator it = docObj.begin(); it != docObj.end(); + ++it) { if (it == docObj.begin()) { Gui::Document* doc = getActiveGuiDocument(); Gui::MDIView* view = doc->getActiveView(); @@ -782,7 +854,7 @@ void CmdMeshPolyTrim::activated(int) Gui::PolyClipSelection* clip = new Gui::PolyClipSelection(); clip->setRole(Gui::SelectionRole::Split, true); - clip->setColor(0.0f,0.0f,1.0f); + clip->setColor(0.0f, 0.0f, 1.0f); clip->setLineWidth(1.0f); viewer->navigationStyle()->startSelection(clip); viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), @@ -794,16 +866,18 @@ void CmdMeshPolyTrim::activated(int) } Gui::ViewProvider* pVP = getActiveGuiDocument()->getViewProvider(*it); - if (pVP->isVisible()) + if (pVP->isVisible()) { pVP->startEditing(); + } } } bool CmdMeshPolyTrim::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -819,26 +893,28 @@ bool CmdMeshPolyTrim::isActive() DEF_STD_CMD_A(CmdMeshTrimByPlane) CmdMeshTrimByPlane::CmdMeshTrimByPlane() - : Command("Mesh_TrimByPlane") + : Command("Mesh_TrimByPlane") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Trim mesh with a plane"); - sToolTipText = QT_TR_NOOP("Trims a mesh with a plane"); - sStatusTip = QT_TR_NOOP("Trims a mesh with a plane"); - sPixmap = "Mesh_TrimByPlane"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Trim mesh with a plane"); + sToolTipText = QT_TR_NOOP("Trims a mesh with a plane"); + sStatusTip = QT_TR_NOOP("Trims a mesh with a plane"); + sPixmap = "Mesh_TrimByPlane"; } void CmdMeshTrimByPlane::activated(int) { - doCommand(Doc,"import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_TrimByPlane')\n"); + doCommand(Doc, + "import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_TrimByPlane')\n"); } bool CmdMeshTrimByPlane::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) { return false; + } return true; } @@ -848,26 +924,28 @@ bool CmdMeshTrimByPlane::isActive() DEF_STD_CMD_A(CmdMeshSectionByPlane) CmdMeshSectionByPlane::CmdMeshSectionByPlane() - : Command("Mesh_SectionByPlane") + : Command("Mesh_SectionByPlane") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create section from mesh and plane"); - sToolTipText = QT_TR_NOOP("Section from mesh and plane"); - sStatusTip = QT_TR_NOOP("Section from mesh and plane"); - sPixmap = "Mesh_SectionByPlane"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Create section from mesh and plane"); + sToolTipText = QT_TR_NOOP("Section from mesh and plane"); + sStatusTip = QT_TR_NOOP("Section from mesh and plane"); + sPixmap = "Mesh_SectionByPlane"; } void CmdMeshSectionByPlane::activated(int) { - doCommand(Doc,"import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_SectionByPlane')\n"); + doCommand(Doc, + "import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_SectionByPlane')\n"); } bool CmdMeshSectionByPlane::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) != 1) { return false; + } return true; } @@ -877,25 +955,26 @@ bool CmdMeshSectionByPlane::isActive() DEF_STD_CMD_A(CmdMeshCrossSections) CmdMeshCrossSections::CmdMeshCrossSections() - : Command("Mesh_CrossSections") + : Command("Mesh_CrossSections") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Cross-sections..."); - sToolTipText = QT_TR_NOOP("Cross-sections"); - sStatusTip = QT_TR_NOOP("Cross-sections"); - sPixmap = "Mesh_CrossSections"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Cross-sections..."); + sToolTipText = QT_TR_NOOP("Cross-sections"); + sStatusTip = QT_TR_NOOP("Cross-sections"); + sPixmap = "Mesh_CrossSections"; } void CmdMeshCrossSections::activated(int) { - doCommand(Doc,"import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_CrossSections')\n"); + doCommand(Doc, + "import MeshPartGui, FreeCADGui\nFreeCADGui.runCommand('MeshPart_CrossSections')\n"); } bool CmdMeshCrossSections::isActive() { - return (Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0 && - !Gui::Control().activeDialog()); + return (Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0 + && !Gui::Control().activeDialog()); } //-------------------------------------------------------------------------------------- @@ -903,20 +982,22 @@ bool CmdMeshCrossSections::isActive() DEF_STD_CMD_A(CmdMeshPolySplit) CmdMeshPolySplit::CmdMeshPolySplit() - : Command("Mesh_PolySplit") + : Command("Mesh_PolySplit") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Split mesh"); - sToolTipText = QT_TR_NOOP("Splits a mesh into two meshes"); - sWhatsThis = "Mesh_PolySplit"; - sStatusTip = QT_TR_NOOP("Splits a mesh into two meshes"); + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Split mesh"); + sToolTipText = QT_TR_NOOP("Splits a mesh into two meshes"); + sWhatsThis = "Mesh_PolySplit"; + sStatusTip = QT_TR_NOOP("Splits a mesh into two meshes"); } void CmdMeshPolySplit::activated(int) { - std::vector docObj = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); - for (std::vector::iterator it = docObj.begin(); it != docObj.end(); ++it) { + std::vector docObj = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + for (std::vector::iterator it = docObj.begin(); it != docObj.end(); + ++it) { if (it == docObj.begin()) { Gui::Document* doc = getActiveGuiDocument(); Gui::MDIView* view = doc->getActiveView(); @@ -940,8 +1021,9 @@ void CmdMeshPolySplit::activated(int) bool CmdMeshPolySplit::isActive() { // Check for the selected mesh feature (all Mesh types) - if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -957,16 +1039,16 @@ bool CmdMeshPolySplit::isActive() DEF_STD_CMD_A(CmdMeshEvaluation) CmdMeshEvaluation::CmdMeshEvaluation() - :Command("Mesh_Evaluation") + : Command("Mesh_Evaluation") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); // needs two ampersands to display one - sMenuText = QT_TR_NOOP("Evaluate and repair mesh..."); - sToolTipText = QT_TR_NOOP("Opens a dialog to analyze and repair a mesh"); - sWhatsThis = "Mesh_Evaluation"; - sStatusTip = QT_TR_NOOP("Opens a dialog to analyze and repair a mesh"); - sPixmap = "Mesh_Evaluation"; + sMenuText = QT_TR_NOOP("Evaluate and repair mesh..."); + sToolTipText = QT_TR_NOOP("Opens a dialog to analyze and repair a mesh"); + sWhatsThis = "Mesh_Evaluation"; + sStatusTip = QT_TR_NOOP("Opens a dialog to analyze and repair a mesh"); + sPixmap = "Mesh_Evaluation"; } void CmdMeshEvaluation::activated(int) @@ -978,7 +1060,8 @@ void CmdMeshEvaluation::activated(int) MeshGui::DlgEvaluateMeshImp* dlg = MeshGui::DockEvaluateMeshImp::instance(); dlg->setAttribute(Qt::WA_DeleteOnClose); - std::vector meshes = getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector meshes = + getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto it : meshes) { dlg->setMesh((Mesh::Feature*)(it)); break; @@ -990,8 +1073,9 @@ void CmdMeshEvaluation::activated(int) bool CmdMeshEvaluation::isActive() { App::Document* doc = App::GetApplication().getActiveDocument(); - if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } return true; } @@ -1000,15 +1084,15 @@ bool CmdMeshEvaluation::isActive() DEF_STD_CMD_A(CmdMeshEvaluateFacet) CmdMeshEvaluateFacet::CmdMeshEvaluateFacet() - :Command("Mesh_EvaluateFacet") + : Command("Mesh_EvaluateFacet") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Face info"); - sToolTipText = QT_TR_NOOP("Information about face"); - sWhatsThis = "Mesh_EvaluateFacet"; - sStatusTip = QT_TR_NOOP("Information about face"); - sPixmap = "Mesh_EvaluateFacet"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Face info"); + sToolTipText = QT_TR_NOOP("Information about face"); + sWhatsThis = "Mesh_EvaluateFacet"; + sStatusTip = QT_TR_NOOP("Information about face"); + sPixmap = "Mesh_EvaluateFacet"; } void CmdMeshEvaluateFacet::activated(int) @@ -1018,16 +1102,19 @@ void CmdMeshEvaluateFacet::activated(int) if (view) { Gui::View3DInventorViewer* viewer = view->getViewer(); viewer->setEditing(true); - viewer->setEditingCursor(QCursor(Gui::BitmapFactory().pixmapFromSvg("Mesh_Pipette",QSize(32,32)),4,29)); - viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), MeshGui::ViewProviderMeshFaceSet::faceInfoCallback); - } + viewer->setEditingCursor( + QCursor(Gui::BitmapFactory().pixmapFromSvg("Mesh_Pipette", QSize(32, 32)), 4, 29)); + viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), + MeshGui::ViewProviderMeshFaceSet::faceInfoCallback); + } } bool CmdMeshEvaluateFacet::isActive() { App::Document* doc = App::GetApplication().getActiveDocument(); - if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -1043,15 +1130,15 @@ bool CmdMeshEvaluateFacet::isActive() DEF_STD_CMD_A(CmdMeshRemoveComponents) CmdMeshRemoveComponents::CmdMeshRemoveComponents() - : Command("Mesh_RemoveComponents") + : Command("Mesh_RemoveComponents") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Remove components..."); - sToolTipText = QT_TR_NOOP("Remove topologic independent components from the mesh"); - sWhatsThis = "Mesh_RemoveComponents"; - sStatusTip = QT_TR_NOOP("Remove topologic independent components from the mesh"); - sPixmap = "Mesh_RemoveComponents"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Remove components..."); + sToolTipText = QT_TR_NOOP("Remove topologic independent components from the mesh"); + sWhatsThis = "Mesh_RemoveComponents"; + sStatusTip = QT_TR_NOOP("Remove topologic independent components from the mesh"); + sPixmap = "Mesh_RemoveComponents"; } void CmdMeshRemoveComponents::activated(int) @@ -1068,17 +1155,20 @@ bool CmdMeshRemoveComponents::isActive() { // Check for the selected mesh feature (all Mesh types) App::Document* doc = getDocument(); - if (!(doc && doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0)) + if (!(doc && doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0)) { return false; + } Gui::Document* viewDoc = Gui::Application::Instance->getDocument(doc); Gui::View3DInventor* view = dynamic_cast(viewDoc->getActiveView()); if (view) { Gui::View3DInventorViewer* viewer = view->getViewer(); - if (viewer->isEditing()) + if (viewer->isEditing()) { return false; + } } - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; + } return true; } @@ -1088,15 +1178,15 @@ bool CmdMeshRemoveComponents::isActive() DEF_STD_CMD_A(CmdMeshRemeshGmsh) CmdMeshRemeshGmsh::CmdMeshRemeshGmsh() - : Command("Mesh_RemeshGmsh") + : Command("Mesh_RemeshGmsh") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Refinement..."); - sToolTipText = QT_TR_NOOP("Refine existing mesh"); - sStatusTip = QT_TR_NOOP("Refine existing mesh"); - sWhatsThis = "Mesh_RemeshGmsh"; - sPixmap = "Mesh_RemeshGmsh"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Refinement..."); + sToolTipText = QT_TR_NOOP("Refine existing mesh"); + sStatusTip = QT_TR_NOOP("Refine existing mesh"); + sWhatsThis = "Mesh_RemeshGmsh"; + sPixmap = "Mesh_RemeshGmsh"; } void CmdMeshRemeshGmsh::activated(int) @@ -1104,8 +1194,9 @@ void CmdMeshRemeshGmsh::activated(int) Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (!dlg) { std::vector mesh = getSelection().getObjectsOfType(); - if (mesh.size() != 1) + if (mesh.size() != 1) { return; + } dlg = new MeshGui::TaskRemeshGmsh(mesh.front()); } Gui::Control().showDialog(dlg); @@ -1121,15 +1212,15 @@ bool CmdMeshRemeshGmsh::isActive() DEF_STD_CMD_A(CmdMeshRemoveCompByHand) CmdMeshRemoveCompByHand::CmdMeshRemoveCompByHand() - :Command("Mesh_RemoveCompByHand") + : Command("Mesh_RemoveCompByHand") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Remove components by hand..."); - sToolTipText = QT_TR_NOOP("Mark a component to remove it from the mesh"); - sWhatsThis = "Mesh_RemoveCompByHand"; - sStatusTip = QT_TR_NOOP("Mark a component to remove it from the mesh"); - sPixmap = "Mesh_RemoveCompByHand"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Remove components by hand..."); + sToolTipText = QT_TR_NOOP("Mark a component to remove it from the mesh"); + sWhatsThis = "Mesh_RemoveCompByHand"; + sStatusTip = QT_TR_NOOP("Mark a component to remove it from the mesh"); + sPixmap = "Mesh_RemoveCompByHand"; } void CmdMeshRemoveCompByHand::activated(int) @@ -1140,7 +1231,8 @@ void CmdMeshRemoveCompByHand::activated(int) Gui::View3DInventorViewer* viewer = view->getViewer(); viewer->setEditing(true); viewer->setEditingCursor(QCursor(Qt::OpenHandCursor)); - viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), MeshGui::ViewProviderMeshFaceSet::markPartCallback); + viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), + MeshGui::ViewProviderMeshFaceSet::markPartCallback); viewer->setSelectionEnabled(false); } } @@ -1148,10 +1240,12 @@ void CmdMeshRemoveCompByHand::activated(int) bool CmdMeshRemoveCompByHand::isActive() { App::Document* doc = App::GetApplication().getActiveDocument(); - if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } - Gui::View3DInventor* view = dynamic_cast(Gui::getMainWindow()->activeWindow()); + Gui::View3DInventor* view = + dynamic_cast(Gui::getMainWindow()->activeWindow()); if (view) { Gui::View3DInventorViewer* viewer = view->getViewer(); return !viewer->isEditing(); @@ -1165,29 +1259,32 @@ bool CmdMeshRemoveCompByHand::isActive() DEF_STD_CMD_A(CmdMeshEvaluateSolid) CmdMeshEvaluateSolid::CmdMeshEvaluateSolid() - :Command("Mesh_EvaluateSolid") + : Command("Mesh_EvaluateSolid") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Check solid mesh"); - sToolTipText = QT_TR_NOOP("Checks whether the mesh is a solid"); - sWhatsThis = "Mesh_EvaluateSolid"; - sStatusTip = QT_TR_NOOP("Checks whether the mesh is a solid"); - sPixmap = "Mesh_EvaluateSolid"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Check solid mesh"); + sToolTipText = QT_TR_NOOP("Checks whether the mesh is a solid"); + sWhatsThis = "Mesh_EvaluateSolid"; + sStatusTip = QT_TR_NOOP("Checks whether the mesh is a solid"); + sPixmap = "Mesh_EvaluateSolid"; } void CmdMeshEvaluateSolid::activated(int) { - std::vector meshes = getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector meshes = + getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto it : meshes) { Mesh::Feature* mesh = (Mesh::Feature*)(it); QString msg; - if (mesh->Mesh.getValue().getKernel().HasOpenEdges()) + if (mesh->Mesh.getValue().getKernel().HasOpenEdges()) { msg = QObject::tr("The mesh '%1' is not a solid.") - .arg(QString::fromLatin1(mesh->Label.getValue())); - else + .arg(QString::fromLatin1(mesh->Label.getValue())); + } + else { msg = QObject::tr("The mesh '%1' is a solid.") - .arg(QString::fromLatin1(mesh->Label.getValue())); + .arg(QString::fromLatin1(mesh->Label.getValue())); + } QMessageBox::information(Gui::getMainWindow(), QObject::tr("Solid Mesh"), msg); } } @@ -1203,15 +1300,15 @@ bool CmdMeshEvaluateSolid::isActive() DEF_STD_CMD_A(CmdMeshSmoothing) CmdMeshSmoothing::CmdMeshSmoothing() - :Command("Mesh_Smoothing") + : Command("Mesh_Smoothing") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Smooth..."); - sToolTipText = QT_TR_NOOP("Smooth the selected meshes"); - sWhatsThis = "Mesh_Smoothing"; - sStatusTip = QT_TR_NOOP("Smooth the selected meshes"); - sPixmap = "Mesh_Smoothing"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Smooth..."); + sToolTipText = QT_TR_NOOP("Smooth the selected meshes"); + sWhatsThis = "Mesh_Smoothing"; + sStatusTip = QT_TR_NOOP("Smooth the selected meshes"); + sPixmap = "Mesh_Smoothing"; } void CmdMeshSmoothing::activated(int) @@ -1221,8 +1318,9 @@ void CmdMeshSmoothing::activated(int) bool CmdMeshSmoothing::isActive() { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; + } return getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0; } @@ -1231,15 +1329,15 @@ bool CmdMeshSmoothing::isActive() DEF_STD_CMD_A(CmdMeshDecimating) CmdMeshDecimating::CmdMeshDecimating() - :Command("Mesh_Decimating") + : Command("Mesh_Decimating") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Decimation..."); - sToolTipText = QT_TR_NOOP("Decimates a mesh"); - sWhatsThis = QT_TR_NOOP("Decimates a mesh"); - sStatusTip = QT_TR_NOOP("Decimates a mesh"); - sPixmap = "Mesh_Decimating"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Decimation..."); + sToolTipText = QT_TR_NOOP("Decimates a mesh"); + sWhatsThis = QT_TR_NOOP("Decimates a mesh"); + sStatusTip = QT_TR_NOOP("Decimates a mesh"); + sPixmap = "Mesh_Decimating"; } void CmdMeshDecimating::activated(int) @@ -1250,8 +1348,9 @@ void CmdMeshDecimating::activated(int) bool CmdMeshDecimating::isActive() { #if 1 - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; + } #endif // Check for the selected mesh feature (all Mesh types) return getSelection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0; @@ -1262,24 +1361,26 @@ bool CmdMeshDecimating::isActive() DEF_STD_CMD_A(CmdMeshHarmonizeNormals) CmdMeshHarmonizeNormals::CmdMeshHarmonizeNormals() - :Command("Mesh_HarmonizeNormals") + : Command("Mesh_HarmonizeNormals") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Harmonize normals"); - sToolTipText = QT_TR_NOOP("Harmonizes the normals of the mesh"); - sWhatsThis = "Mesh_HarmonizeNormals"; - sStatusTip = QT_TR_NOOP("Harmonizes the normals of the mesh"); - sPixmap = "Mesh_HarmonizeNormals"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Harmonize normals"); + sToolTipText = QT_TR_NOOP("Harmonizes the normals of the mesh"); + sWhatsThis = "Mesh_HarmonizeNormals"; + sStatusTip = QT_TR_NOOP("Harmonizes the normals of the mesh"); + sPixmap = "Mesh_HarmonizeNormals"; } void CmdMeshHarmonizeNormals::activated(int) { - std::vector meshes = getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector meshes = + getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); openCommand(QT_TRANSLATE_NOOP("Command", "Harmonize mesh normals")); for (auto it : meshes) { - doCommand(Doc,"App.activeDocument().getObject(\"%s\").Mesh.harmonizeNormals()" - ,it->getNameInDocument()); + doCommand(Doc, + "App.activeDocument().getObject(\"%s\").Mesh.harmonizeNormals()", + it->getNameInDocument()); } commitCommand(); updateActive(); @@ -1296,24 +1397,26 @@ bool CmdMeshHarmonizeNormals::isActive() DEF_STD_CMD_A(CmdMeshFlipNormals) CmdMeshFlipNormals::CmdMeshFlipNormals() - :Command("Mesh_FlipNormals") + : Command("Mesh_FlipNormals") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Flip normals"); - sToolTipText = QT_TR_NOOP("Flips the normals of the mesh"); - sWhatsThis = "Mesh_FlipNormals"; - sStatusTip = QT_TR_NOOP("Flips the normals of the mesh"); - sPixmap = "Mesh_FlipNormals"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Flip normals"); + sToolTipText = QT_TR_NOOP("Flips the normals of the mesh"); + sWhatsThis = "Mesh_FlipNormals"; + sStatusTip = QT_TR_NOOP("Flips the normals of the mesh"); + sPixmap = "Mesh_FlipNormals"; } void CmdMeshFlipNormals::activated(int) { - std::vector meshes = getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector meshes = + getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); openCommand(QT_TRANSLATE_NOOP("Command", "Flip mesh normals")); for (auto it : meshes) { - doCommand(Doc,"App.activeDocument().getObject(\"%s\").Mesh.flipNormals()" - ,it->getNameInDocument()); + doCommand(Doc, + "App.activeDocument().getObject(\"%s\").Mesh.flipNormals()", + it->getNameInDocument()); } commitCommand(); updateActive(); @@ -1330,32 +1433,42 @@ bool CmdMeshFlipNormals::isActive() DEF_STD_CMD_A(CmdMeshBoundingBox) CmdMeshBoundingBox::CmdMeshBoundingBox() - :Command("Mesh_BoundingBox") + : Command("Mesh_BoundingBox") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Boundings info..."); - sToolTipText = QT_TR_NOOP("Shows the boundings of the selected mesh"); - sWhatsThis = "Mesh_BoundingBox"; - sStatusTip = QT_TR_NOOP("Shows the boundings of the selected mesh"); - sPixmap = "Mesh_BoundingBox"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Boundings info..."); + sToolTipText = QT_TR_NOOP("Shows the boundings of the selected mesh"); + sWhatsThis = "Mesh_BoundingBox"; + sStatusTip = QT_TR_NOOP("Shows the boundings of the selected mesh"); + sPixmap = "Mesh_BoundingBox"; } void CmdMeshBoundingBox::activated(int) { - std::vector meshes = getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector meshes = + getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto it : meshes) { const MeshCore::MeshKernel& rMesh = ((Mesh::Feature*)it)->Mesh.getValue().getKernel(); const Base::BoundBox3f& box = rMesh.GetBoundBox(); Base::Console().Message("Boundings: Min=<%f,%f,%f>, Max=<%f,%f,%f>\n", - box.MinX,box.MinY,box.MinZ,box.MaxX,box.MaxY,box.MaxZ); + box.MinX, + box.MinY, + box.MinZ, + box.MaxX, + box.MaxY, + box.MaxZ); QString bound = qApp->translate("Mesh_BoundingBox", "Boundings of %1:") - .arg(QString::fromUtf8(it->Label.getValue())); + .arg(QString::fromUtf8(it->Label.getValue())); bound += QString::fromLatin1("\n\nMin=<%1,%2,%3>\n\nMax=<%4,%5,%6>") - .arg(box.MinX).arg(box.MinY).arg(box.MinZ) - .arg(box.MaxX).arg(box.MaxY).arg(box.MaxZ); + .arg(box.MinX) + .arg(box.MinY) + .arg(box.MinZ) + .arg(box.MaxX) + .arg(box.MaxY) + .arg(box.MaxZ); QMessageBox::information(Gui::getMainWindow(), QObject::tr("Boundings"), bound); break; } @@ -1372,22 +1485,23 @@ bool CmdMeshBoundingBox::isActive() DEF_STD_CMD_A(CmdMeshBuildRegularSolid) CmdMeshBuildRegularSolid::CmdMeshBuildRegularSolid() - :Command("Mesh_BuildRegularSolid") + : Command("Mesh_BuildRegularSolid") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Regular solid..."); - sToolTipText = QT_TR_NOOP("Builds a regular solid"); - sWhatsThis = "Mesh_BuildRegularSolid"; - sStatusTip = QT_TR_NOOP("Builds a regular solid"); - sPixmap = "Mesh_BuildRegularSolid"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Regular solid..."); + sToolTipText = QT_TR_NOOP("Builds a regular solid"); + sWhatsThis = "Mesh_BuildRegularSolid"; + sStatusTip = QT_TR_NOOP("Builds a regular solid"); + sPixmap = "Mesh_BuildRegularSolid"; } void CmdMeshBuildRegularSolid::activated(int) { static QPointer dlg = nullptr; - if (!dlg) + if (!dlg) { dlg = new MeshGui::DlgRegularSolidImp(Gui::getMainWindow()); + } dlg->setAttribute(Qt::WA_DeleteOnClose); dlg->show(); } @@ -1403,29 +1517,41 @@ bool CmdMeshBuildRegularSolid::isActive() DEF_STD_CMD_A(CmdMeshFillupHoles) CmdMeshFillupHoles::CmdMeshFillupHoles() - :Command("Mesh_FillupHoles") + : Command("Mesh_FillupHoles") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Fill holes..."); - sToolTipText = QT_TR_NOOP("Fill holes of the mesh"); - sWhatsThis = "Mesh_FillupHoles"; - sStatusTip = QT_TR_NOOP("Fill holes of the mesh"); - sPixmap = "Mesh_FillupHoles"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Fill holes..."); + sToolTipText = QT_TR_NOOP("Fill holes of the mesh"); + sWhatsThis = "Mesh_FillupHoles"; + sStatusTip = QT_TR_NOOP("Fill holes of the mesh"); + sPixmap = "Mesh_FillupHoles"; } void CmdMeshFillupHoles::activated(int) { - std::vector meshes = getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector meshes = + getSelection().getObjectsOfType(Mesh::Feature::getClassTypeId()); bool ok; - int FillupHolesOfLength = QInputDialog::getInt(Gui::getMainWindow(), QObject::tr("Fill holes"), - QObject::tr("Fill holes with maximum number of edges:"), 3, 3, 10000, 1, &ok, Qt::MSWindowsFixedSizeDialogHint); - if (!ok) + int FillupHolesOfLength = + QInputDialog::getInt(Gui::getMainWindow(), + QObject::tr("Fill holes"), + QObject::tr("Fill holes with maximum number of edges:"), + 3, + 3, + 10000, + 1, + &ok, + Qt::MSWindowsFixedSizeDialogHint); + if (!ok) { return; + } openCommand(QT_TRANSLATE_NOOP("Command", "Fill up holes")); for (auto mesh : meshes) { - doCommand(Doc,"App.activeDocument().getObject(\"%s\").Mesh.fillupHoles(%d)" - ,mesh->getNameInDocument(), FillupHolesOfLength); + doCommand(Doc, + "App.activeDocument().getObject(\"%s\").Mesh.fillupHoles(%d)", + mesh->getNameInDocument(), + FillupHolesOfLength); } commitCommand(); updateActive(); @@ -1442,15 +1568,15 @@ bool CmdMeshFillupHoles::isActive() DEF_STD_CMD_A(CmdMeshFillInteractiveHole) CmdMeshFillInteractiveHole::CmdMeshFillInteractiveHole() - :Command("Mesh_FillInteractiveHole") + : Command("Mesh_FillInteractiveHole") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Close hole"); - sToolTipText = QT_TR_NOOP("Close holes interactively"); - sWhatsThis = "Mesh_FillInteractiveHole"; - sStatusTip = QT_TR_NOOP("Close holes interactively"); - sPixmap = "Mesh_FillInteractiveHole"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Close hole"); + sToolTipText = QT_TR_NOOP("Close holes interactively"); + sWhatsThis = "Mesh_FillInteractiveHole"; + sStatusTip = QT_TR_NOOP("Close holes interactively"); + sPixmap = "Mesh_FillInteractiveHole"; } void CmdMeshFillInteractiveHole::activated(int) @@ -1460,17 +1586,19 @@ void CmdMeshFillInteractiveHole::activated(int) if (view) { Gui::View3DInventorViewer* viewer = view->getViewer(); viewer->setEditing(true); - viewer->setEditingCursor(QCursor(Gui::BitmapFactory().pixmap("mesh_fillhole"),5,5)); - viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), MeshGui::ViewProviderMeshFaceSet::fillHoleCallback); + viewer->setEditingCursor(QCursor(Gui::BitmapFactory().pixmap("mesh_fillhole"), 5, 5)); + viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), + MeshGui::ViewProviderMeshFaceSet::fillHoleCallback); viewer->setSelectionEnabled(false); - } + } } bool CmdMeshFillInteractiveHole::isActive() { App::Document* doc = App::GetApplication().getActiveDocument(); - if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) + if (!doc || doc->countObjectsOfType(Mesh::Feature::getClassTypeId()) == 0) { return false; + } Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { @@ -1484,21 +1612,21 @@ bool CmdMeshFillInteractiveHole::isActive() DEF_STD_CMD_A(CmdMeshSegmentation) CmdMeshSegmentation::CmdMeshSegmentation() - : Command("Mesh_Segmentation") + : Command("Mesh_Segmentation") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh segments..."); - sToolTipText = QT_TR_NOOP("Create mesh segments"); - sWhatsThis = "Mesh_Segmentation"; - sStatusTip = QT_TR_NOOP("Create mesh segments"); - sPixmap = "Mesh_Segmentation"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Create mesh segments..."); + sToolTipText = QT_TR_NOOP("Create mesh segments"); + sWhatsThis = "Mesh_Segmentation"; + sStatusTip = QT_TR_NOOP("Create mesh segments"); + sPixmap = "Mesh_Segmentation"; } void CmdMeshSegmentation::activated(int) { - std::vector objs = Gui::Selection().getObjectsOfType - (Mesh::Feature::getClassTypeId()); + std::vector objs = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); Mesh::Feature* mesh = static_cast(objs.front()); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (!dlg) { @@ -1509,10 +1637,10 @@ void CmdMeshSegmentation::activated(int) bool CmdMeshSegmentation::isActive() { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; - return Gui::Selection().countObjectsOfType - (Mesh::Feature::getClassTypeId()) == 1; + } + return Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 1; } //-------------------------------------------------------------------------------------- @@ -1520,21 +1648,21 @@ bool CmdMeshSegmentation::isActive() DEF_STD_CMD_A(CmdMeshSegmentationBestFit) CmdMeshSegmentationBestFit::CmdMeshSegmentationBestFit() - : Command("Mesh_SegmentationBestFit") + : Command("Mesh_SegmentationBestFit") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Create mesh segments from best-fit surfaces..."); - sToolTipText = QT_TR_NOOP("Create mesh segments from best-fit surfaces"); - sWhatsThis = "Mesh_SegmentationBestFit"; - sStatusTip = QT_TR_NOOP("Create mesh segments from best-fit surfaces"); - sPixmap = "Mesh_SegmentationBestFit"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Create mesh segments from best-fit surfaces..."); + sToolTipText = QT_TR_NOOP("Create mesh segments from best-fit surfaces"); + sWhatsThis = "Mesh_SegmentationBestFit"; + sStatusTip = QT_TR_NOOP("Create mesh segments from best-fit surfaces"); + sPixmap = "Mesh_SegmentationBestFit"; } void CmdMeshSegmentationBestFit::activated(int) { - std::vector objs = Gui::Selection().getObjectsOfType - (Mesh::Feature::getClassTypeId()); + std::vector objs = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); Mesh::Feature* mesh = static_cast(objs.front()); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (!dlg) { @@ -1545,10 +1673,10 @@ void CmdMeshSegmentationBestFit::activated(int) bool CmdMeshSegmentationBestFit::isActive() { - if (Gui::Control().activeDialog()) + if (Gui::Control().activeDialog()) { return false; - return Gui::Selection().countObjectsOfType - (Mesh::Feature::getClassTypeId()) == 1; + } + return Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) == 1; } //-------------------------------------------------------------------------------------- @@ -1556,27 +1684,30 @@ bool CmdMeshSegmentationBestFit::isActive() DEF_STD_CMD_A(CmdMeshMerge) CmdMeshMerge::CmdMeshMerge() - :Command("Mesh_Merge") + : Command("Mesh_Merge") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Merge"); - sToolTipText = QT_TR_NOOP("Merges selected meshes into one"); - sWhatsThis = "Mesh_Merge"; - sStatusTip = sToolTipText; - sPixmap = "Mesh_Merge"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Merge"); + sToolTipText = QT_TR_NOOP("Merges selected meshes into one"); + sWhatsThis = "Mesh_Merge"; + sStatusTip = sToolTipText; + sPixmap = "Mesh_Merge"; } void CmdMeshMerge::activated(int) { - App::Document *pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + App::Document* pcDoc = App::GetApplication().getActiveDocument(); + if (!pcDoc) { return; + } openCommand(QT_TRANSLATE_NOOP("Command", "Mesh merge")); - Mesh::Feature *pcFeature = static_cast(pcDoc->addObject("Mesh::Feature", "Mesh")); + Mesh::Feature* pcFeature = + static_cast(pcDoc->addObject("Mesh::Feature", "Mesh")); Mesh::MeshObject* newMesh = pcFeature->Mesh.startEditing(); - std::vector objs = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector objs = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto obj : objs) { const MeshObject& mesh = static_cast(obj)->Mesh.getValue(); MeshCore::MeshKernel kernel = mesh.getKernel(); @@ -1599,34 +1730,37 @@ bool CmdMeshMerge::isActive() DEF_STD_CMD_A(CmdMeshSplitComponents) CmdMeshSplitComponents::CmdMeshSplitComponents() - : Command("Mesh_SplitComponents") + : Command("Mesh_SplitComponents") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Split by components"); - sToolTipText = QT_TR_NOOP("Split selected mesh into its components"); - sWhatsThis = "Mesh_SplitComponents"; - sStatusTip = sToolTipText; - sPixmap = "Mesh_SplitComponents"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Split by components"); + sToolTipText = QT_TR_NOOP("Split selected mesh into its components"); + sWhatsThis = "Mesh_SplitComponents"; + sStatusTip = sToolTipText; + sPixmap = "Mesh_SplitComponents"; } void CmdMeshSplitComponents::activated(int) { - App::Document *pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + App::Document* pcDoc = App::GetApplication().getActiveDocument(); + if (!pcDoc) { return; + } openCommand(QT_TRANSLATE_NOOP("Command", "Mesh split")); - std::vector objs = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector objs = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto obj : objs) { const MeshObject& mesh = static_cast(obj)->Mesh.getValue(); - std::vector > comps = mesh.getComponents(); + std::vector> comps = mesh.getComponents(); for (const auto& comp : comps) { std::unique_ptr kernel(mesh.meshFromSegment(comp)); kernel->setTransform(mesh.getTransform()); - Mesh::Feature* feature = static_cast(pcDoc->addObject("Mesh::Feature", "Component")); + Mesh::Feature* feature = + static_cast(pcDoc->addObject("Mesh::Feature", "Component")); feature->Mesh.setValuePtr(kernel.release()); } } @@ -1645,33 +1779,43 @@ bool CmdMeshSplitComponents::isActive() DEF_STD_CMD_A(CmdMeshScale) CmdMeshScale::CmdMeshScale() - : Command("Mesh_Scale") + : Command("Mesh_Scale") { - sAppModule = "Mesh"; - sGroup = QT_TR_NOOP("Mesh"); - sMenuText = QT_TR_NOOP("Scale..."); - sToolTipText = QT_TR_NOOP("Scale selected meshes"); - sWhatsThis = "Mesh_Scale"; - sStatusTip = sToolTipText; - sPixmap = "Mesh_Scale"; + sAppModule = "Mesh"; + sGroup = QT_TR_NOOP("Mesh"); + sMenuText = QT_TR_NOOP("Scale..."); + sToolTipText = QT_TR_NOOP("Scale selected meshes"); + sWhatsThis = "Mesh_Scale"; + sStatusTip = sToolTipText; + sPixmap = "Mesh_Scale"; } void CmdMeshScale::activated(int) { - App::Document *pcDoc = App::GetApplication().getActiveDocument(); - if (!pcDoc) + App::Document* pcDoc = App::GetApplication().getActiveDocument(); + if (!pcDoc) { return; + } bool ok; - double factor = QInputDialog::getDouble(Gui::getMainWindow(), QObject::tr("Scaling"), - QObject::tr("Enter scaling factor:"), 1, 0, DBL_MAX, 5, &ok, Qt::MSWindowsFixedSizeDialogHint); - if (!ok || factor == 0) + double factor = QInputDialog::getDouble(Gui::getMainWindow(), + QObject::tr("Scaling"), + QObject::tr("Enter scaling factor:"), + 1, + 0, + DBL_MAX, + 5, + &ok, + Qt::MSWindowsFixedSizeDialogHint); + if (!ok || factor == 0) { return; + } openCommand(QT_TRANSLATE_NOOP("Command", "Mesh scale")); - std::vector objs = Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector objs = + Gui::Selection().getObjectsOfType(Mesh::Feature::getClassTypeId()); Base::Matrix4D mat; - mat.scale(factor,factor,factor); + mat.scale(factor, factor, factor); for (auto obj : objs) { MeshObject* mesh = static_cast(obj)->Mesh.startEditing(); MeshCore::MeshKernel& kernel = mesh->getKernel(); @@ -1691,7 +1835,7 @@ bool CmdMeshScale::isActive() void CreateMeshCommands() { - Gui::CommandManager &rcCmdMgr = Gui::Application::Instance->commandManager(); + Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager(); rcCmdMgr.addCommand(new CmdMeshImport()); rcCmdMgr.addCommand(new CmdMeshExport()); rcCmdMgr.addCommand(new CmdMeshVertexCurvature()); diff --git a/src/Mod/Mesh/Gui/DlgDecimating.cpp b/src/Mod/Mesh/Gui/DlgDecimating.cpp index 647c71ab94..f5a5020df7 100644 --- a/src/Mod/Mesh/Gui/DlgDecimating.cpp +++ b/src/Mod/Mesh/Gui/DlgDecimating.cpp @@ -41,8 +41,10 @@ DlgDecimating::DlgDecimating(QWidget* parent, Qt::WindowFlags fl) , ui(new Ui_DlgDecimating) { ui->setupUi(this); - connect(ui->checkAbsoluteNumber, &QCheckBox::toggled, - this, &DlgDecimating::onCheckAbsoluteNumberToggled); + connect(ui->checkAbsoluteNumber, + &QCheckBox::toggled, + this, + &DlgDecimating::onCheckAbsoluteNumberToggled); ui->spinBoxReduction->setMinimumWidth(60); ui->checkAbsoluteNumber->setEnabled(false); onCheckAbsoluteNumberToggled(false); @@ -80,20 +82,33 @@ void DlgDecimating::onCheckAbsoluteNumberToggled(bool on) ui->groupBoxTolerance->setDisabled(on); if (on) { - disconnect(ui->sliderReduction, qOverload(&QSlider::valueChanged), ui->spinBoxReduction, &QSpinBox::setValue); - disconnect(ui->spinBoxReduction, qOverload(&QSpinBox::valueChanged), ui->sliderReduction, &QSlider::setValue); + disconnect(ui->sliderReduction, + qOverload(&QSlider::valueChanged), + ui->spinBoxReduction, + &QSpinBox::setValue); + disconnect(ui->spinBoxReduction, + qOverload(&QSpinBox::valueChanged), + ui->sliderReduction, + &QSlider::setValue); ui->spinBoxReduction->setRange(1, numberOfTriangles); ui->spinBoxReduction->setValue(numberOfTriangles * (1.0 - reduction())); ui->spinBoxReduction->setSuffix(QString()); - ui->checkAbsoluteNumber->setText(tr("Absolute number (Maximum: %1)").arg(numberOfTriangles)); + ui->checkAbsoluteNumber->setText( + tr("Absolute number (Maximum: %1)").arg(numberOfTriangles)); } else { ui->spinBoxReduction->setRange(0, 100); ui->spinBoxReduction->setValue(ui->sliderReduction->value()); ui->spinBoxReduction->setSuffix(QString::fromLatin1("%")); ui->checkAbsoluteNumber->setText(tr("Absolute number")); - connect(ui->sliderReduction, qOverload(&QSlider::valueChanged), ui->spinBoxReduction, &QSpinBox::setValue); - connect(ui->spinBoxReduction, qOverload(&QSpinBox::valueChanged), ui->sliderReduction, &QSlider::setValue); + connect(ui->sliderReduction, + qOverload(&QSlider::valueChanged), + ui->spinBoxReduction, + &QSpinBox::setValue); + connect(ui->spinBoxReduction, + qOverload(&QSpinBox::valueChanged), + ui->sliderReduction, + &QSlider::setValue); } } @@ -111,7 +126,7 @@ double DlgDecimating::reduction() const double max = static_cast(ui->sliderReduction->maximum()); double min = static_cast(ui->sliderReduction->minimum()); double val = static_cast(ui->sliderReduction->value()); - return (val - min)/(max - min); + return (val - min) / (max - min); } // --------------------------------------- @@ -121,8 +136,8 @@ double DlgDecimating::reduction() const TaskDecimating::TaskDecimating() { widget = new DlgDecimating(); - Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + Gui::TaskView::TaskBox* taskbox = + new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); diff --git a/src/Mod/Mesh/Gui/DlgDecimating.h b/src/Mod/Mesh/Gui/DlgDecimating.h index 59890b0ac2..94616ae5e6 100644 --- a/src/Mod/Mesh/Gui/DlgDecimating.h +++ b/src/Mod/Mesh/Gui/DlgDecimating.h @@ -24,14 +24,15 @@ #ifndef MESHGUI_DLGDECIMATING_H #define MESHGUI_DLGDECIMATING_H -#include #include #include +#include #include -namespace MeshGui { +namespace MeshGui +{ class Ui_DlgDecimating; -class DlgDecimating : public QWidget +class DlgDecimating: public QWidget { Q_OBJECT @@ -55,7 +56,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskDecimating : public Gui::TaskView::TaskDialog +class TaskDecimating: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -66,14 +67,18 @@ public: bool accept() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } bool isAllowedAlterDocument() const override - { return true; } + { + return true; + } private: DlgDecimating* widget; }; -} +} // namespace MeshGui -#endif // MESHGUI_DLGDECIMATING_H +#endif // MESHGUI_DLGDECIMATING_H diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp index a99c344605..5439943b03 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp +++ b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp @@ -22,28 +22,28 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include #include -#include #include +#include #include -#include #include #include -#include -#include +#include #include +#include +#include #include "DlgEvaluateMeshImp.h" -#include "ui_DlgEvaluateMesh.h" #include "DlgEvaluateSettings.h" #include "ViewProviderDefects.h" +#include "ui_DlgEvaluateMesh.h" using namespace MeshCore; @@ -51,7 +51,7 @@ using namespace Mesh; using namespace MeshGui; CleanupHandler::CleanupHandler() - : QObject(qApp) + : QObject(qApp) { // connect to lstWindowClosed signal connect(qApp, &QApplication::lastWindowClosed, this, &CleanupHandler::cleanup); @@ -69,9 +69,9 @@ void CleanupHandler::cleanup() class DlgEvaluateMeshImp::Private { public: - Private() : view(nullptr) - { - } + Private() + : view(nullptr) + {} void showFoldsFunction(bool on) { @@ -82,15 +82,15 @@ public: ui.repairFoldsButton->setVisible(on); } - Ui_DlgEvaluateMesh ui{}; + Ui_DlgEvaluateMesh ui {}; std::map vp; - Mesh::Feature* meshFeature{nullptr}; + Mesh::Feature* meshFeature {nullptr}; QPointer view; std::vector self_intersections; - bool enableFoldsCheck{false}; - bool checkNonManfoldPoints{false}; - bool strictlyDegenerated{true}; - float epsilonDegenerated{0.0f}; + bool enableFoldsCheck {false}; + bool checkNonManfoldPoints {false}; + bool strictlyDegenerated {true}; + float epsilonDegenerated {0.0f}; }; /* TRANSLATOR MeshGui::DlgEvaluateMeshImp */ @@ -100,7 +100,8 @@ public: * widget flags set to 'f'. */ DlgEvaluateMeshImp::DlgEvaluateMeshImp(QWidget* parent, Qt::WindowFlags fl) - : QDialog(parent, fl), d(new Private()) + : QDialog(parent, fl) + , d(new Private()) { d->ui.setupUi(this); setupConnections(); @@ -122,15 +123,17 @@ DlgEvaluateMeshImp::DlgEvaluateMeshImp(QWidget* parent, Qt::WindowFlags fl) d->ui.line_8->setFrameShape(QFrame::HLine); d->ui.line_8->setFrameShadow(QFrame::Sunken); - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Mesh/Evaluation"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Mesh/Evaluation"); d->checkNonManfoldPoints = hGrp->GetBool("CheckNonManifoldPoints", false); d->enableFoldsCheck = hGrp->GetBool("EnableFoldsCheck", false); d->strictlyDegenerated = hGrp->GetBool("StrictlyDegenerated", true); - if (d->strictlyDegenerated) + if (d->strictlyDegenerated) { d->epsilonDegenerated = 0.0f; - else + } + else { d->epsilonDegenerated = MeshCore::MeshDefinitions::_fMinPointDistanceP2; + } d->showFoldsFunction(d->enableFoldsCheck); @@ -148,14 +151,15 @@ DlgEvaluateMeshImp::~DlgEvaluateMeshImp() { // no need to delete child widgets, Qt does it all for us for (const auto& it : d->vp) { - if (d->view) + if (d->view) { d->view->getViewer()->removeViewProvider(it.second); + } delete it.second; } try { - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Mesh/Evaluation"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Mesh/Evaluation"); hGrp->SetBool("CheckNonManifoldPoints", d->checkNonManfoldPoints); hGrp->SetBool("EnableFoldsCheck", d->enableFoldsCheck); hGrp->SetBool("StrictlyDegenerated", d->strictlyDegenerated); @@ -169,6 +173,7 @@ DlgEvaluateMeshImp::~DlgEvaluateMeshImp() void DlgEvaluateMeshImp::setupConnections() { + // clang-format off connect(d->ui.checkOrientationButton, &QCheckBox::clicked, this, &DlgEvaluateMeshImp::onCheckOrientationButtonClicked); connect(d->ui.analyzeOrientationButton, &QPushButton::clicked, @@ -238,9 +243,10 @@ void DlgEvaluateMeshImp::setupConnections() this, &DlgEvaluateMeshImp::onButtonBoxClicked); connect(d->ui.buttonBox, &QDialogButtonBox::helpRequested, Gui::getMainWindow(), &Gui::MainWindow::whatsThis); + // clang-format on } -void DlgEvaluateMeshImp::changeEvent(QEvent *e) +void DlgEvaluateMeshImp::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { d->ui.retranslateUi(this); @@ -280,7 +286,8 @@ void DlgEvaluateMeshImp::slotDeletedObject(const App::DocumentObject& Obj) } } -void DlgEvaluateMeshImp::slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop) +void DlgEvaluateMeshImp::slotChangedObject(const App::DocumentObject& Obj, + const App::Property& Prop) { // if the current mesh object was modified update everything if (&Obj == d->meshFeature && Prop.getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { @@ -291,12 +298,12 @@ void DlgEvaluateMeshImp::slotChangedObject(const App::DocumentObject& Obj, const } else if (Obj.getTypeId().isDerivedFrom(Mesh::Feature::getClassTypeId())) { // if the label has changed update the entry in the list - if (Prop.getTypeId() == App::PropertyString::getClassTypeId() && - strcmp(Prop.getName(), "Label") == 0) { - QString label = QString::fromUtf8(Obj.Label.getValue()); - QString name = QString::fromLatin1(Obj.getNameInDocument()); - int index = d->ui.meshNameButton->findData(name); - d->ui.meshNameButton->setItemText(index, label); + if (Prop.getTypeId() == App::PropertyString::getClassTypeId() + && strcmp(Prop.getName(), "Label") == 0) { + QString label = QString::fromUtf8(Obj.Label.getValue()); + QString name = QString::fromLatin1(Obj.getNameInDocument()); + int index = d->ui.meshNameButton->findData(name); + d->ui.meshNameButton->setItemText(index, label); } } } @@ -321,14 +328,15 @@ void DlgEvaluateMeshImp::slotDeletedDocument(const App::Document& Doc) void DlgEvaluateMeshImp::setMesh(Mesh::Feature* m) { App::Document* doc = m->getDocument(); - if (doc != getDocument()) + if (doc != getDocument()) { attachDocument(doc); + } refreshList(); int ct = d->ui.meshNameButton->count(); QString objName = QString::fromLatin1(m->getNameInDocument()); - for (int i=1; iui.meshNameButton->itemData(i).toString() == objName) { d->ui.meshNameButton->setCurrentIndex(i); onMeshNameButtonActivated(i); @@ -337,15 +345,17 @@ void DlgEvaluateMeshImp::setMesh(Mesh::Feature* m) } } -void DlgEvaluateMeshImp::addViewProvider(const char* name, const std::vector& indices) +void DlgEvaluateMeshImp::addViewProvider(const char* name, + const std::vector& indices) { removeViewProvider(name); if (d->view) { - ViewProviderMeshDefects* vp = static_cast(Base::Type::createInstanceByName(name)); + ViewProviderMeshDefects* vp = + static_cast(Base::Type::createInstanceByName(name)); assert(vp->getTypeId().isDerivedFrom(Gui::ViewProvider::getClassTypeId())); vp->attach(d->meshFeature); - d->view->getViewer()->addViewProvider( vp ); + d->view->getViewer()->addViewProvider(vp); vp->showDefects(indices); d->vp[name] = vp; } @@ -355,8 +365,9 @@ void DlgEvaluateMeshImp::removeViewProvider(const char* name) { std::map::iterator it = d->vp.find(name); if (it != d->vp.end()) { - if (d->view) + if (d->view) { d->view->getViewer()->removeViewProvider(it->second); + } delete it->second; d->vp.erase(it); } @@ -365,8 +376,9 @@ void DlgEvaluateMeshImp::removeViewProvider(const char* name) void DlgEvaluateMeshImp::removeViewProviders() { for (const auto& it : d->vp) { - if (d->view) + if (d->view) { d->view->getViewer()->removeViewProvider(it.second); + } delete it.second; } d->vp.clear(); @@ -377,7 +389,8 @@ void DlgEvaluateMeshImp::onMeshNameButtonActivated(int i) QString item = d->ui.meshNameButton->itemData(i).toString(); d->meshFeature = nullptr; - std::vector objs = getDocument()->getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector objs = + getDocument()->getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto obj : objs) { if (item == QLatin1String(obj->getNameInDocument())) { d->meshFeature = static_cast(obj); @@ -385,7 +398,7 @@ void DlgEvaluateMeshImp::onMeshNameButtonActivated(int i) } } - if (i== 0) { + if (i == 0) { cleanInformation(); } else { @@ -395,9 +408,10 @@ void DlgEvaluateMeshImp::onMeshNameButtonActivated(int i) void DlgEvaluateMeshImp::refreshList() { - QVector > items; + QVector> items; if (this->getDocument()) { - std::vector objs = this->getDocument()->getObjectsOfType(Mesh::Feature::getClassTypeId()); + std::vector objs = + this->getDocument()->getObjectsOfType(Mesh::Feature::getClassTypeId()); for (auto obj : objs) { items.push_back(qMakePair(QString::fromUtf8(obj->Label.getValue()), QString::fromLatin1(obj->getNameInDocument()))); @@ -406,8 +420,9 @@ void DlgEvaluateMeshImp::refreshList() d->ui.meshNameButton->clear(); d->ui.meshNameButton->addItem(tr("No selection")); - for (const auto & item : items) + for (const auto& item : items) { d->ui.meshNameButton->addItem(item.first, item.second); + } d->ui.meshNameButton->setDisabled(items.empty()); cleanInformation(); } @@ -434,17 +449,17 @@ void DlgEvaluateMeshImp::showInformation() void DlgEvaluateMeshImp::cleanInformation() { - d->ui.textLabel4->setText( tr("No information") ); - d->ui.textLabel5->setText( tr("No information") ); - d->ui.textLabel6->setText( tr("No information") ); - d->ui.checkOrientationButton->setText( tr("No information") ); - d->ui.checkDuplicatedFacesButton->setText( tr("No information") ); - d->ui.checkDuplicatedPointsButton->setText( tr("No information") ); - d->ui.checkNonmanifoldsButton->setText( tr("No information") ); - d->ui.checkDegenerationButton->setText( tr("No information") ); - d->ui.checkIndicesButton->setText( tr("No information") ); - d->ui.checkSelfIntersectionButton->setText( tr("No information") ); - d->ui.checkFoldsButton->setText( tr("No information") ); + d->ui.textLabel4->setText(tr("No information")); + d->ui.textLabel5->setText(tr("No information")); + d->ui.textLabel6->setText(tr("No information")); + d->ui.checkOrientationButton->setText(tr("No information")); + d->ui.checkDuplicatedFacesButton->setText(tr("No information")); + d->ui.checkDuplicatedPointsButton->setText(tr("No information")); + d->ui.checkNonmanifoldsButton->setText(tr("No information")); + d->ui.checkDegenerationButton->setText(tr("No information")); + d->ui.checkIndicesButton->setText(tr("No information")); + d->ui.checkSelfIntersectionButton->setText(tr("No information")); + d->ui.checkFoldsButton->setText(tr("No information")); d->ui.analyzeOrientationButton->setDisabled(true); d->ui.repairOrientationButton->setDisabled(true); d->ui.analyzeDuplicatedFacesButton->setDisabled(true); @@ -485,12 +500,15 @@ void DlgEvaluateMeshImp::onRefreshButtonClicked() void DlgEvaluateMeshImp::onCheckOrientationButtonClicked() { - std::map::iterator it = d->vp.find("MeshGui::ViewProviderMeshOrientation"); + std::map::iterator it = + d->vp.find("MeshGui::ViewProviderMeshOrientation"); if (it != d->vp.end()) { - if (d->ui.checkOrientationButton->isChecked()) + if (d->ui.checkOrientationButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -506,17 +524,17 @@ void DlgEvaluateMeshImp::onAnalyzeOrientationButtonClicked() std::vector inds = eval.GetIndices(); if (inds.empty()) { - d->ui.checkOrientationButton->setText( tr("No flipped normals") ); + d->ui.checkOrientationButton->setText(tr("No flipped normals")); d->ui.checkOrientationButton->setChecked(false); d->ui.repairOrientationButton->setEnabled(false); - removeViewProvider( "MeshGui::ViewProviderMeshOrientation" ); + removeViewProvider("MeshGui::ViewProviderMeshOrientation"); } else { - d->ui.checkOrientationButton->setText( tr("%1 flipped normals").arg(inds.size()) ); + d->ui.checkOrientationButton->setText(tr("%1 flipped normals").arg(inds.size())); d->ui.checkOrientationButton->setChecked(true); d->ui.repairOrientationButton->setEnabled(true); d->ui.repairAllTogether->setEnabled(true); - addViewProvider( "MeshGui::ViewProviderMeshOrientation", eval.GetIndices()); + addViewProvider("MeshGui::ViewProviderMeshOrientation", eval.GetIndices()); } qApp->restoreOverrideCursor(); @@ -532,9 +550,10 @@ void DlgEvaluateMeshImp::onRepairOrientationButtonClicked() Gui::Document* doc = Gui::Application::Instance->getDocument(docName); doc->openCommand(QT_TRANSLATE_NOOP("Command", "Harmonize normals")); try { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").harmonizeNormals()" - , docName, objName); + Gui::Command::doCommand(Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").harmonizeNormals()", + docName, + objName); } catch (const Base::Exception& e) { QMessageBox::warning(this, tr("Orientation"), QString::fromLatin1(e.what())); @@ -545,7 +564,7 @@ void DlgEvaluateMeshImp::onRepairOrientationButtonClicked() d->ui.repairOrientationButton->setEnabled(false); d->ui.checkOrientationButton->setChecked(false); - removeViewProvider( "MeshGui::ViewProviderMeshOrientation" ); + removeViewProvider("MeshGui::ViewProviderMeshOrientation"); } } @@ -555,19 +574,23 @@ void DlgEvaluateMeshImp::onCheckNonmanifoldsButtonClicked() std::map::iterator it; it = d->vp.find("MeshGui::ViewProviderMeshNonManifolds"); if (it != d->vp.end()) { - if (d->ui.checkNonmanifoldsButton->isChecked()) + if (d->ui.checkNonmanifoldsButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } // non-manifold points it = d->vp.find("MeshGui::ViewProviderMeshNonManifoldPoints"); if (it != d->vp.end()) { - if (d->ui.checkNonmanifoldsButton->isChecked()) + if (d->ui.checkNonmanifoldsButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -587,8 +610,9 @@ void DlgEvaluateMeshImp::onAnalyzeNonmanifoldsButtonClicked() if (d->checkNonManfoldPoints) { MeshEvalPointManifolds p_eval(rMesh); ok2 = p_eval.Evaluate(); - if (!ok2) + if (!ok2) { point_indices = p_eval.GetIndices(); + } } if (ok1 && ok2) { @@ -599,16 +623,18 @@ void DlgEvaluateMeshImp::onAnalyzeNonmanifoldsButtonClicked() removeViewProvider("MeshGui::ViewProviderMeshNonManifoldPoints"); } else { - d->ui.checkNonmanifoldsButton->setText(tr("%1 non-manifolds").arg(f_eval.CountManifolds()+point_indices.size())); + d->ui.checkNonmanifoldsButton->setText( + tr("%1 non-manifolds").arg(f_eval.CountManifolds() + point_indices.size())); d->ui.checkNonmanifoldsButton->setChecked(true); d->ui.repairNonmanifoldsButton->setEnabled(true); d->ui.repairAllTogether->setEnabled(true); if (!ok1) { - const std::vector >& inds = f_eval.GetIndices(); + const std::vector>& inds = + f_eval.GetIndices(); std::vector indices; - indices.reserve(2*inds.size()); - std::vector >::const_iterator it; + indices.reserve(2 * inds.size()); + std::vector>::const_iterator it; for (it = inds.begin(); it != inds.end(); ++it) { indices.push_back(it->first); indices.push_back(it->second); @@ -635,14 +661,18 @@ void DlgEvaluateMeshImp::onRepairNonmanifoldsButtonClicked() Gui::Document* doc = Gui::Application::Instance->getDocument(docName); doc->openCommand(QT_TRANSLATE_NOOP("Command", "Remove non-manifolds")); try { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").removeNonManifolds()" - , docName, objName); + Gui::Command::doCommand( + Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").removeNonManifolds()", + docName, + objName); if (d->checkNonManfoldPoints) { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").removeNonManifoldPoints()" - , docName, objName); + Gui::Command::doCommand( + Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").removeNonManifoldPoints()", + docName, + objName); } } catch (const Base::Exception& e) { @@ -664,12 +694,15 @@ void DlgEvaluateMeshImp::onRepairNonmanifoldsButtonClicked() void DlgEvaluateMeshImp::onCheckIndicesButtonClicked() { - std::map::iterator it = d->vp.find("MeshGui::ViewProviderMeshIndices"); + std::map::iterator it = + d->vp.find("MeshGui::ViewProviderMeshIndices"); if (it != d->vp.end()) { - if (d->ui.checkIndicesButton->isChecked()) + if (d->ui.checkIndicesButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -698,7 +731,7 @@ void DlgEvaluateMeshImp::onAnalyzeIndicesButtonClicked() d->ui.checkIndicesButton->setChecked(true); d->ui.repairIndicesButton->setEnabled(true); d->ui.repairAllTogether->setEnabled(true); - //addViewProvider("MeshGui::ViewProviderMeshIndices", rp.GetIndices()); + // addViewProvider("MeshGui::ViewProviderMeshIndices", rp.GetIndices()); } else if (!cf.Evaluate()) { d->ui.checkIndicesButton->setText(tr("Multiple point indices")); @@ -734,9 +767,10 @@ void DlgEvaluateMeshImp::onRepairIndicesButtonClicked() Gui::Document* doc = Gui::Application::Instance->getDocument(docName); doc->openCommand(QT_TRANSLATE_NOOP("Command", "Fix indices")); try { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").fixIndices()" - , docName, objName); + Gui::Command::doCommand(Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").fixIndices()", + docName, + objName); } catch (const Base::Exception& e) { QMessageBox::warning(this, tr("Indices"), QString::fromLatin1(e.what())); @@ -753,12 +787,15 @@ void DlgEvaluateMeshImp::onRepairIndicesButtonClicked() void DlgEvaluateMeshImp::onCheckDegenerationButtonClicked() { - std::map::iterator it = d->vp.find("MeshGui::ViewProviderMeshDegenerations"); + std::map::iterator it = + d->vp.find("MeshGui::ViewProviderMeshDegenerations"); if (it != d->vp.end()) { - if (d->ui.checkDegenerationButton->isChecked()) + if (d->ui.checkDegenerationButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -800,9 +837,12 @@ void DlgEvaluateMeshImp::onRepairDegeneratedButtonClicked() Gui::Document* doc = Gui::Application::Instance->getDocument(docName); doc->openCommand(QT_TRANSLATE_NOOP("Command", "Remove degenerated faces")); try { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").fixDegenerations(%f)" - , docName, objName, d->epsilonDegenerated); + Gui::Command::doCommand( + Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").fixDegenerations(%f)", + docName, + objName, + d->epsilonDegenerated); } catch (const Base::Exception& e) { QMessageBox::warning(this, tr("Degenerations"), QString::fromLatin1(e.what())); @@ -819,12 +859,15 @@ void DlgEvaluateMeshImp::onRepairDegeneratedButtonClicked() void DlgEvaluateMeshImp::onCheckDuplicatedFacesButtonClicked() { - std::map::iterator it = d->vp.find("MeshGui::ViewProviderMeshDuplicatedFaces"); + std::map::iterator it = + d->vp.find("MeshGui::ViewProviderMeshDuplicatedFaces"); if (it != d->vp.end()) { - if (d->ui.checkDuplicatedFacesButton->isChecked()) + if (d->ui.checkDuplicatedFacesButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -867,9 +910,11 @@ void DlgEvaluateMeshImp::onRepairDuplicatedFacesButtonClicked() Gui::Document* doc = Gui::Application::Instance->getDocument(docName); doc->openCommand(QT_TRANSLATE_NOOP("Command", "Remove duplicated faces")); try { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").removeDuplicatedFacets()" - , docName, objName); + Gui::Command::doCommand( + Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").removeDuplicatedFacets()", + docName, + objName); } catch (const Base::Exception& e) { QMessageBox::warning(this, tr("Duplicated faces"), QString::fromLatin1(e.what())); @@ -886,12 +931,15 @@ void DlgEvaluateMeshImp::onRepairDuplicatedFacesButtonClicked() void DlgEvaluateMeshImp::onCheckDuplicatedPointsButtonClicked() { - std::map::iterator it = d->vp.find("MeshGui::ViewProviderMeshDuplicatedPoints"); + std::map::iterator it = + d->vp.find("MeshGui::ViewProviderMeshDuplicatedPoints"); if (it != d->vp.end()) { - if (d->ui.checkDuplicatedPointsButton->isChecked()) + if (d->ui.checkDuplicatedPointsButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -932,9 +980,11 @@ void DlgEvaluateMeshImp::onRepairDuplicatedPointsButtonClicked() Gui::Document* doc = Gui::Application::Instance->getDocument(docName); doc->openCommand(QT_TRANSLATE_NOOP("Command", "Remove duplicated points")); try { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").removeDuplicatedPoints()" - , docName, objName); + Gui::Command::doCommand( + Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").removeDuplicatedPoints()", + docName, + objName); } catch (const Base::Exception& e) { QMessageBox::warning(this, tr("Duplicated points"), QString::fromLatin1(e.what())); @@ -951,12 +1001,15 @@ void DlgEvaluateMeshImp::onRepairDuplicatedPointsButtonClicked() void DlgEvaluateMeshImp::onCheckSelfIntersectionButtonClicked() { - std::map::iterator it = d->vp.find("MeshGui::ViewProviderMeshSelfIntersections"); + std::map::iterator it = + d->vp.find("MeshGui::ViewProviderMeshSelfIntersections"); if (it != d->vp.end()) { - if (d->ui.checkSelfIntersectionButton->isChecked()) + if (d->ui.checkSelfIntersectionButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -969,7 +1022,7 @@ void DlgEvaluateMeshImp::onAnalyzeSelfIntersectionButtonClicked() const MeshKernel& rMesh = d->meshFeature->Mesh.getValue().getKernel(); MeshEvalSelfIntersection eval(rMesh); - std::vector > intersection; + std::vector> intersection; try { eval.GetIntersections(intersection); } @@ -990,8 +1043,8 @@ void DlgEvaluateMeshImp::onAnalyzeSelfIntersectionButtonClicked() d->ui.repairAllTogether->setEnabled(true); std::vector indices; - indices.reserve(2*intersection.size()); - std::vector >::iterator it; + indices.reserve(2 * intersection.size()); + std::vector>::iterator it; for (it = intersection.begin(); it != intersection.end(); ++it) { indices.push_back(it->first); indices.push_back(it->second); @@ -1027,12 +1080,15 @@ void DlgEvaluateMeshImp::onRepairSelfIntersectionButtonClicked() void DlgEvaluateMeshImp::onCheckFoldsButtonClicked() { - std::map::iterator it = d->vp.find("MeshGui::ViewProviderMeshFolds"); + std::map::iterator it = + d->vp.find("MeshGui::ViewProviderMeshFolds"); if (it != d->vp.end()) { - if (d->ui.checkFoldsButton->isChecked()) + if (d->ui.checkFoldsButton->isChecked()) { it->second->show(); - else + } + else { it->second->hide(); + } } } @@ -1058,7 +1114,7 @@ void DlgEvaluateMeshImp::onAnalyzeFoldsButtonClicked() removeViewProvider("MeshGui::ViewProviderMeshFolds"); } else { - std::vector inds = f_eval.GetIndices(); + std::vector inds = f_eval.GetIndices(); std::vector inds1 = s_eval.GetIndices(); std::vector inds2 = b_eval.GetIndices(); inds.insert(inds.end(), inds1.begin(), inds1.end()); @@ -1089,9 +1145,11 @@ void DlgEvaluateMeshImp::onRepairFoldsButtonClicked() qApp->setOverrideCursor(Qt::WaitCursor); doc->openCommand(QT_TRANSLATE_NOOP("Command", "Remove folds")); try { - Gui::Command::doCommand(Gui::Command::App - , "App.getDocument(\"%s\").getObject(\"%s\").removeFoldsOnSurface()" - , docName, objName); + Gui::Command::doCommand( + Gui::Command::App, + "App.getDocument(\"%s\").getObject(\"%s\").removeFoldsOnSurface()", + docName, + objName); } catch (const Base::Exception& e) { QMessageBox::warning(this, tr("Folds"), QString::fromLatin1(e.what())); @@ -1123,6 +1181,7 @@ void DlgEvaluateMeshImp::onAnalyzeAllTogetherClicked() void DlgEvaluateMeshImp::onRepairAllTogetherClicked() { + // clang-format off if (d->meshFeature) { Gui::WaitCursor wc; const char* docName = App::GetApplication().getDocumentName(d->meshFeature->getDocument()); @@ -1236,6 +1295,7 @@ void DlgEvaluateMeshImp::onRepairAllTogetherClicked() doc->commitCommand(); doc->getDocument()->recompute(); } + // clang-format on } void DlgEvaluateMeshImp::onButtonBoxClicked(QAbstractButton* button) @@ -1251,10 +1311,12 @@ void DlgEvaluateMeshImp::onButtonBoxClicked(QAbstractButton* button) d->enableFoldsCheck = dlg.isFoldsChecked(); d->showFoldsFunction(d->enableFoldsCheck); d->strictlyDegenerated = dlg.isDegeneratedFacetsChecked(); - if (d->strictlyDegenerated) + if (d->strictlyDegenerated) { d->epsilonDegenerated = 0.0f; - else + } + else { d->epsilonDegenerated = MeshCore::MeshDefinitions::_fMinPointDistanceP2; + } } } else if (type == QDialogButtonBox::Reset) { @@ -1263,8 +1325,9 @@ void DlgEvaluateMeshImp::onButtonBoxClicked(QAbstractButton* button) showInformation(); d->self_intersections.clear(); QList cbs = this->findChildren(); - Q_FOREACH (QCheckBox *cb, cbs) + Q_FOREACH (QCheckBox* cb, cbs) { cb->setChecked(false); + } } } @@ -1272,16 +1335,16 @@ void DlgEvaluateMeshImp::onButtonBoxClicked(QAbstractButton* button) /* TRANSLATOR MeshGui::DockEvaluateMeshImp */ -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("QDockWidget", "Evaluate & Repair Mesh"); #endif -DockEvaluateMeshImp* DockEvaluateMeshImp::_instance=nullptr; +DockEvaluateMeshImp* DockEvaluateMeshImp::_instance = nullptr; DockEvaluateMeshImp* DockEvaluateMeshImp::instance() { // not initialized? - if(!_instance) { + if (!_instance) { _instance = new DockEvaluateMeshImp(Gui::getMainWindow()); _instance->setSizeGripEnabled(false); } @@ -1289,10 +1352,10 @@ DockEvaluateMeshImp* DockEvaluateMeshImp::instance() return _instance; } -void DockEvaluateMeshImp::destruct () +void DockEvaluateMeshImp::destruct() { if (_instance) { - DockEvaluateMeshImp *pTmp = _instance; + DockEvaluateMeshImp* pTmp = _instance; _instance = nullptr; delete pTmp; } @@ -1307,8 +1370,8 @@ bool DockEvaluateMeshImp::hasInstance() * Constructs a DockEvaluateMeshImp which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -DockEvaluateMeshImp::DockEvaluateMeshImp( QWidget* parent, Qt::WindowFlags fl ) - : DlgEvaluateMeshImp( parent, fl ) +DockEvaluateMeshImp::DockEvaluateMeshImp(QWidget* parent, Qt::WindowFlags fl) + : DlgEvaluateMeshImp(parent, fl) { scrollArea = new QScrollArea(); scrollArea->setObjectName(QLatin1String("scrollArea")); @@ -1320,9 +1383,9 @@ DockEvaluateMeshImp::DockEvaluateMeshImp( QWidget* parent, Qt::WindowFlags fl ) // embed this dialog into a dockable widget container Gui::DockWindowManager* pDockMgr = Gui::DockWindowManager::instance(); // use Qt macro for preparing for translation stuff (but not translating yet) - QDockWidget* dw = pDockMgr->addDockWindow("Evaluate & Repair Mesh", - scrollArea, Qt::RightDockWidgetArea); - dw->setFeatures(QDockWidget::DockWidgetMovable|QDockWidget::DockWidgetFloatable); + QDockWidget* dw = + pDockMgr->addDockWindow("Evaluate & Repair Mesh", scrollArea, Qt::RightDockWidgetArea); + dw->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); dw->show(); } @@ -1351,10 +1414,9 @@ void DockEvaluateMeshImp::closeEvent(QCloseEvent*) /** * Returns an appropriate size hint for the dock window. */ -QSize DockEvaluateMeshImp::sizeHint () const +QSize DockEvaluateMeshImp::sizeHint() const { return {371, 579}; } #include "moc_DlgEvaluateMeshImp.cpp" - diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.h b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.h index 39e1900da4..02b99d07fc 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.h +++ b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.h @@ -36,14 +36,17 @@ class QAbstractButton; class QScrollArea; -namespace Gui { +namespace Gui +{ class View3DInventor; } -namespace Mesh { - class Feature; +namespace Mesh +{ +class Feature; } -namespace MeshGui { +namespace MeshGui +{ class ViewProviderMeshDefects; /** @@ -51,7 +54,7 @@ class ViewProviderMeshDefects; * module when the application is about to be closed. * @author Werner Mayer */ -class CleanupHandler : public QObject +class CleanupHandler: public QObject { Q_OBJECT @@ -65,7 +68,7 @@ private: /** * \author Werner Mayer */ -class DlgEvaluateMeshImp : public QDialog, public App::DocumentObserver +class DlgEvaluateMeshImp: public QDialog, public App::DocumentObserver { Q_OBJECT @@ -123,7 +126,7 @@ private: void onRefreshButtonClicked(); void onMeshNameButtonActivated(int); - void onButtonBoxClicked(QAbstractButton *); + void onButtonBoxClicked(QAbstractButton*); protected: void refreshList(); @@ -132,7 +135,7 @@ protected: void addViewProvider(const char* vp, const std::vector& indices); void removeViewProvider(const char* vp); void removeViewProviders(); - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: class Private; @@ -143,12 +146,12 @@ private: * The DockEvaluateMeshImp class creates a single instance and embeds it into a dock window. * \author Werner Mayer */ -class DockEvaluateMeshImp : public DlgEvaluateMeshImp +class DockEvaluateMeshImp: public DlgEvaluateMeshImp { Q_OBJECT protected: - explicit DockEvaluateMeshImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); + explicit DockEvaluateMeshImp(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); ~DockEvaluateMeshImp() override; void closeEvent(QCloseEvent* e) override; @@ -157,13 +160,13 @@ public: static void destruct(); static bool hasInstance(); - QSize sizeHint () const override; + QSize sizeHint() const override; private: QScrollArea* scrollArea; static DockEvaluateMeshImp* _instance; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_DLG_EVALUATE_MESH_IMP_H +#endif // MESHGUI_DLG_EVALUATE_MESH_IMP_H diff --git a/src/Mod/Mesh/Gui/DlgEvaluateSettings.cpp b/src/Mod/Mesh/Gui/DlgEvaluateSettings.cpp index 48a1a81594..42ff26ecdb 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateSettings.cpp +++ b/src/Mod/Mesh/Gui/DlgEvaluateSettings.cpp @@ -31,7 +31,8 @@ using namespace MeshGui; /* TRANSLATOR MeshGui::DlgEvaluateSettings */ DlgEvaluateSettings::DlgEvaluateSettings(QWidget* parent, Qt::WindowFlags fl) - : QDialog(parent, fl), ui(new Ui_DlgEvaluateSettings) + : QDialog(parent, fl) + , ui(new Ui_DlgEvaluateSettings) { ui->setupUi(this); } @@ -72,4 +73,3 @@ bool DlgEvaluateSettings::isDegeneratedFacetsChecked() const } #include "moc_DlgEvaluateSettings.cpp" - diff --git a/src/Mod/Mesh/Gui/DlgEvaluateSettings.h b/src/Mod/Mesh/Gui/DlgEvaluateSettings.h index 18685c4a54..305d93d1b2 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateSettings.h +++ b/src/Mod/Mesh/Gui/DlgEvaluateSettings.h @@ -26,14 +26,15 @@ #include -namespace MeshGui { +namespace MeshGui +{ class Ui_DlgEvaluateSettings; /** * \author Werner Mayer */ -class DlgEvaluateSettings : public QDialog +class DlgEvaluateSettings: public QDialog { Q_OBJECT @@ -54,6 +55,6 @@ private: Ui_DlgEvaluateSettings* ui; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_DLG_EVALUATE_SETTINGS_H +#endif // MESHGUI_DLG_EVALUATE_SETTINGS_H diff --git a/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp b/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp index a1db0c6860..3ffcabc003 100644 --- a/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp +++ b/src/Mod/Mesh/Gui/DlgRegularSolidImp.cpp @@ -23,8 +23,8 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include @@ -44,6 +44,7 @@ using namespace MeshGui; /* TRANSLATOR MeshGui::DlgRegularSolidImp */ +// clang-format off DlgRegularSolidImp::DlgRegularSolidImp(QWidget* parent, Qt::WindowFlags fl) : QDialog( parent, fl ) , ui(new Ui_DlgRegularSolid) @@ -217,5 +218,6 @@ void DlgRegularSolidImp::onCreateSolidButtonClicked() QString::fromLatin1(e.what())); } } +// clang-format on #include "moc_DlgRegularSolidImp.cpp" diff --git a/src/Mod/Mesh/Gui/DlgRegularSolidImp.h b/src/Mod/Mesh/Gui/DlgRegularSolidImp.h index 2f6900e201..4473febef7 100644 --- a/src/Mod/Mesh/Gui/DlgRegularSolidImp.h +++ b/src/Mod/Mesh/Gui/DlgRegularSolidImp.h @@ -27,9 +27,10 @@ #include #include -namespace MeshGui { +namespace MeshGui +{ class Ui_DlgRegularSolid; -class DlgRegularSolidImp : public QDialog +class DlgRegularSolidImp: public QDialog { Q_OBJECT @@ -41,12 +42,12 @@ private: void onCreateSolidButtonClicked(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} +} // namespace MeshGui -#endif // MESHGUI_DLGREGULARSOLID_IMP_H +#endif // MESHGUI_DLGREGULARSOLID_IMP_H diff --git a/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp b/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp index 76e3825f60..cdda5fe0e4 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp +++ b/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.cpp @@ -32,7 +32,8 @@ using namespace MeshGui; DlgSettingsImportExport::DlgSettingsImportExport(QWidget* parent) - : PreferencePage(parent), ui(new Ui_DlgSettingsImportExport) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsImportExport) { ui->setupUi(this); ui->exportAmfCompressed->setToolTip(tr("This parameter indicates whether ZIP compression\n" @@ -47,8 +48,8 @@ DlgSettingsImportExport::~DlgSettingsImportExport() void DlgSettingsImportExport::saveSettings() { - ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Mesh"); + ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Mesh"); double value = ui->maxDeviationExport->value().getValue(); handle->SetFloat("MaxDeviationExport", value); @@ -65,8 +66,8 @@ void DlgSettingsImportExport::saveSettings() void DlgSettingsImportExport::loadSettings() { - ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath - ("User parameter:BaseApp/Preferences/Mod/Mesh"); + ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/Mod/Mesh"); double value = ui->maxDeviationExport->value().getValue(); value = handle->GetFloat("MaxDeviationExport", value); ui->maxDeviationExport->setValue(value); @@ -82,7 +83,7 @@ void DlgSettingsImportExport::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsImportExport::changeEvent(QEvent *e) +void DlgSettingsImportExport::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -93,4 +94,3 @@ void DlgSettingsImportExport::changeEvent(QEvent *e) } #include "moc_DlgSettingsImportExportImp.cpp" - diff --git a/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.h b/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.h index 76d174d883..6851b65cbe 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.h +++ b/src/Mod/Mesh/Gui/DlgSettingsImportExportImp.h @@ -24,19 +24,20 @@ #define MESHGUI_DLGSETTINGSIMPORTEXPORTIMP_H #ifndef MESH_GLOBAL_H -# include +#include #endif #include -namespace MeshGui { +namespace MeshGui +{ class Ui_DlgSettingsImportExport; /** * The DlgSettingsImportExportImp class implements a preference page to change settings * for Importing and Exporting mesh objects. */ -class DlgSettingsImportExport : public Gui::Dialog::PreferencePage +class DlgSettingsImportExport: public Gui::Dialog::PreferencePage { Q_OBJECT @@ -47,13 +48,12 @@ public: protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: Ui_DlgSettingsImportExport* ui; }; // end class DlgSettingsImportExport -} // namespace MeshGui - -#endif // MESHGUI_DLGSETTINGSIMPORTEXPORTIMP_H +} // namespace MeshGui +#endif // MESHGUI_DLGSETTINGSIMPORTEXPORTIMP_H diff --git a/src/Mod/Mesh/Gui/DlgSettingsMeshView.cpp b/src/Mod/Mesh/Gui/DlgSettingsMeshView.cpp index 51ef06c614..ce3b670594 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsMeshView.cpp +++ b/src/Mod/Mesh/Gui/DlgSettingsMeshView.cpp @@ -34,8 +34,8 @@ using namespace MeshGui; * Constructs a DlgSettingsMeshView which is a child of 'parent'. */ DlgSettingsMeshView::DlgSettingsMeshView(QWidget* parent) - : PreferencePage(parent) - , ui(new Ui_DlgSettingsMeshView) + : PreferencePage(parent) + , ui(new Ui_DlgSettingsMeshView) { ui->setupUi(this); ui->labelBackfaceColor->hide(); @@ -64,9 +64,9 @@ void DlgSettingsMeshView::loadSettings() { Base::Reference hGrp = Gui::WindowParameter::getDefaultParameter(); hGrp = hGrp->GetGroup("View"); - if (!hGrp->GetBool("EnablePreselection",true) && - !hGrp->GetBool("EnableSelection",true)) + if (!hGrp->GetBool("EnablePreselection", true) && !hGrp->GetBool("EnableSelection", true)) { ui->checkboxBoundbox->setDisabled(true); + } ui->checkboxRendering->onRestore(); ui->checkboxBoundbox->onRestore(); ui->buttonMeshColor->onRestore(); @@ -81,7 +81,7 @@ void DlgSettingsMeshView::loadSettings() /** * Sets the strings of the subwidgets using the current language. */ -void DlgSettingsMeshView::changeEvent(QEvent *e) +void DlgSettingsMeshView::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); diff --git a/src/Mod/Mesh/Gui/DlgSettingsMeshView.h b/src/Mod/Mesh/Gui/DlgSettingsMeshView.h index 9abb757b5a..c0b5a4c56d 100644 --- a/src/Mod/Mesh/Gui/DlgSettingsMeshView.h +++ b/src/Mod/Mesh/Gui/DlgSettingsMeshView.h @@ -24,21 +24,22 @@ #define MESHGUI_DLGSETTINGSMESHVIEW_H #ifndef MESH_GLOBAL_H -# include +#include #endif #include #include -namespace MeshGui { +namespace MeshGui +{ class Ui_DlgSettingsMeshView; /** * The DlgSettingsMeshView class implements a preference page to change settings * for display of meshes. * @author Werner Mayer */ -class DlgSettingsMeshView : public Gui::Dialog::PreferencePage +class DlgSettingsMeshView: public Gui::Dialog::PreferencePage { Q_OBJECT @@ -49,12 +50,12 @@ public: protected: void saveSettings() override; void loadSettings() override; - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: std::unique_ptr ui; }; -} // namespace Gui +} // namespace MeshGui -#endif // MESHGUI_DLGSETTINGSMESHVIEW_H +#endif // MESHGUI_DLGSETTINGSMESHVIEW_H diff --git a/src/Mod/Mesh/Gui/DlgSmoothing.cpp b/src/Mod/Mesh/Gui/DlgSmoothing.cpp index 914f2a8c29..ae3f4f8252 100644 --- a/src/Mod/Mesh/Gui/DlgSmoothing.cpp +++ b/src/Mod/Mesh/Gui/DlgSmoothing.cpp @@ -22,19 +22,19 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include #include #include -#include #include +#include #include "DlgSmoothing.h" -#include "ui_DlgSmoothing.h" #include "Selection.h" +#include "ui_DlgSmoothing.h" using namespace MeshGui; @@ -42,8 +42,10 @@ using namespace MeshGui; /* TRANSLATOR MeshGui::DlgSmoothing */ DlgSmoothing::DlgSmoothing(QWidget* parent) - : QWidget(parent), ui(new Ui_DlgSmoothing()) + : QWidget(parent) + , ui(new Ui_DlgSmoothing()) { + // clang-format off ui->setupUi(this); bg = new QButtonGroup(this); bg->addButton(ui->radioButtonTaubin, 0); @@ -62,6 +64,7 @@ DlgSmoothing::DlgSmoothing(QWidget* parent) ui->labelLambda->setText(QString::fromUtf8("\xce\xbb")); ui->labelMu->setText(QString::fromUtf8("\xce\xbc")); this->resize(this->sizeHint()); + // clang-format on } /* @@ -102,10 +105,12 @@ double DlgSmoothing::microStep() const DlgSmoothing::Smooth DlgSmoothing::method() const { - if (ui->radioButtonTaubin->isChecked()) + if (ui->radioButtonTaubin->isChecked()) { return DlgSmoothing::Taubin; - else if (ui->radioButtonLaplace->isChecked()) + } + else if (ui->radioButtonLaplace->isChecked()) { return DlgSmoothing::Laplace; + } return DlgSmoothing::None; } @@ -122,19 +127,17 @@ void DlgSmoothing::onCheckBoxSelectionToggled(bool on) // ------------------------------------------------ SmoothingDialog::SmoothingDialog(QWidget* parent, Qt::WindowFlags fl) - : QDialog(parent, fl) + : QDialog(parent, fl) { widget = new DlgSmoothing(this); this->setWindowTitle(widget->windowTitle()); QVBoxLayout* hboxLayout = new QVBoxLayout(this); QDialogButtonBox* buttonBox = new QDialogButtonBox(this); - buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); - connect(buttonBox, &QDialogButtonBox::accepted, - this, &QDialog::accept); - connect(buttonBox, &QDialogButtonBox::rejected, - this, &QDialog::reject); + connect(buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); hboxLayout->addWidget(widget); hboxLayout->addWidget(buttonBox); @@ -149,28 +152,29 @@ SmoothingDialog::~SmoothingDialog() = default; TaskSmoothing::TaskSmoothing() { widget = new DlgSmoothing(); - Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + Gui::TaskView::TaskBox* taskbox = + new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); selection = new Selection(); - selection->setObjects(Gui::Selection().getSelectionEx(nullptr, Mesh::Feature::getClassTypeId())); + selection->setObjects( + Gui::Selection().getSelectionEx(nullptr, Mesh::Feature::getClassTypeId())); Gui::Selection().clearSelection(); Gui::TaskView::TaskBox* tasksel = new Gui::TaskView::TaskBox(); tasksel->groupLayout()->addWidget(selection); tasksel->hide(); Content.push_back(tasksel); - connect(widget, &DlgSmoothing::toggledSelection, - tasksel, &QWidget::setVisible); + connect(widget, &DlgSmoothing::toggledSelection, tasksel, &QWidget::setVisible); } bool TaskSmoothing::accept() { std::vector meshes = selection->getObjects(); - if (meshes.empty()) + if (meshes.empty()) { return true; + } Gui::WaitCursor wc; Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Mesh Smoothing")); @@ -186,44 +190,42 @@ bool TaskSmoothing::accept() mm->getFacetsFromSelection(selection); selection = mm->getPointsFromFacets(selection); mm->clearFacetSelection(); - if (!selection.empty()) + if (!selection.empty()) { hasSelection = true; + } } Mesh::MeshObject* mm = mesh->Mesh.startEditing(); switch (widget->method()) { - case MeshGui::DlgSmoothing::Taubin: - { - MeshCore::TaubinSmoothing s(mm->getKernel()); - s.SetLambda(widget->lambdaStep()); - s.SetMicro(widget->microStep()); - if (widget->smoothSelection()) { - s.SmoothPoints(widget->iterations(), selection); - } - else { - s.Smooth(widget->iterations()); - } - } break; - case MeshGui::DlgSmoothing::Laplace: - { - MeshCore::LaplaceSmoothing s(mm->getKernel()); - s.SetLambda(widget->lambdaStep()); - if (widget->smoothSelection()) { - s.SmoothPoints(widget->iterations(), selection); - } - else { - s.Smooth(widget->iterations()); - } - } break; - case MeshGui::DlgSmoothing::MedianFilter: - { - MeshCore::MedianFilterSmoothing s(mm->getKernel()); - if (widget->smoothSelection()) { - s.SmoothPoints(widget->iterations(), selection); - } - else { - s.Smooth(widget->iterations()); - } - } break; + case MeshGui::DlgSmoothing::Taubin: { + MeshCore::TaubinSmoothing s(mm->getKernel()); + s.SetLambda(widget->lambdaStep()); + s.SetMicro(widget->microStep()); + if (widget->smoothSelection()) { + s.SmoothPoints(widget->iterations(), selection); + } + else { + s.Smooth(widget->iterations()); + } + } break; + case MeshGui::DlgSmoothing::Laplace: { + MeshCore::LaplaceSmoothing s(mm->getKernel()); + s.SetLambda(widget->lambdaStep()); + if (widget->smoothSelection()) { + s.SmoothPoints(widget->iterations(), selection); + } + else { + s.Smooth(widget->iterations()); + } + } break; + case MeshGui::DlgSmoothing::MedianFilter: { + MeshCore::MedianFilterSmoothing s(mm->getKernel()); + if (widget->smoothSelection()) { + s.SmoothPoints(widget->iterations(), selection); + } + else { + s.Smooth(widget->iterations()); + } + } break; default: break; } diff --git a/src/Mod/Mesh/Gui/DlgSmoothing.h b/src/Mod/Mesh/Gui/DlgSmoothing.h index 816d88c828..a1051e997f 100644 --- a/src/Mod/Mesh/Gui/DlgSmoothing.h +++ b/src/Mod/Mesh/Gui/DlgSmoothing.h @@ -24,25 +24,27 @@ #ifndef MESHGUI_DLGSMOOTHING_H #define MESHGUI_DLGSMOOTHING_H -#include #include #include +#include #ifndef MESH_GLOBAL_H #include #endif class QButtonGroup; -namespace MeshGui { +namespace MeshGui +{ class Selection; class Ui_DlgSmoothing; -class DlgSmoothing : public QWidget +class DlgSmoothing: public QWidget { Q_OBJECT public: - enum Smooth { + enum Smooth + { None, Taubin, Laplace, @@ -72,7 +74,7 @@ private: /** * Embed the panel into a dialog. */ -class MeshGuiExport SmoothingDialog : public QDialog +class MeshGuiExport SmoothingDialog: public QDialog { Q_OBJECT @@ -81,15 +83,25 @@ public: ~SmoothingDialog() override; int iterations() const - { return widget->iterations(); } + { + return widget->iterations(); + } double lambdaStep() const - { return widget->lambdaStep(); } + { + return widget->lambdaStep(); + } double microStep() const - { return widget->microStep(); } + { + return widget->microStep(); + } DlgSmoothing::Smooth method() const - { return widget->method(); } + { + return widget->method(); + } bool smoothSelection() const - { return widget->smoothSelection(); } + { + return widget->smoothSelection(); + } private: DlgSmoothing* widget; @@ -98,7 +110,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskSmoothing : public Gui::TaskView::TaskDialog +class TaskSmoothing: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -109,15 +121,19 @@ public: bool accept() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } bool isAllowedAlterDocument() const override - { return true; } + { + return true; + } private: DlgSmoothing* widget; Selection* selection; }; -} +} // namespace MeshGui -#endif // MESHGUI_DLGSMOOTHING_H +#endif // MESHGUI_DLGSMOOTHING_H diff --git a/src/Mod/Mesh/Gui/Doxygen.cpp b/src/Mod/Mesh/Gui/Doxygen.cpp index 7b5bb388ef..d8e722346a 100644 --- a/src/Mod/Mesh/Gui/Doxygen.cpp +++ b/src/Mod/Mesh/Gui/Doxygen.cpp @@ -26,9 +26,9 @@ \brief The namespace of the Mesh Graphical interface layer library This namespace includes the graphical interface of FreeCAD such as: - - The main window - - 3D View - - Tree + - The main window + - 3D View + - Tree and so on...... */ diff --git a/src/Mod/Mesh/Gui/MeshEditor.cpp b/src/Mod/Mesh/Gui/MeshEditor.cpp index 0d87575b21..678af06186 100644 --- a/src/Mod/Mesh/Gui/MeshEditor.cpp +++ b/src/Mod/Mesh/Gui/MeshEditor.cpp @@ -23,27 +23,27 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include @@ -52,8 +52,8 @@ #include #include -#include #include +#include #include "MeshEditor.h" #include "SoFCMeshObject.h" @@ -65,7 +65,9 @@ namespace sp = std::placeholders; PROPERTY_SOURCE(MeshGui::ViewProviderFace, Gui::ViewProviderDocumentObject) -ViewProviderFace::ViewProviderFace() : mesh(nullptr), current_index(-1) +ViewProviderFace::ViewProviderFace() + : mesh(nullptr) + , current_index(-1) { pcCoords = new SoCoordinate3(); pcCoords->ref(); @@ -96,7 +98,7 @@ void ViewProviderFace::attach(App::DocumentObject* obj) pointStyle->pointSize = 8.0f; markers->addChild(pointStyle); - SoBaseColor * markcol = new SoBaseColor; + SoBaseColor* markcol = new SoBaseColor; markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoPointSet* marker = new SoPointSet(); markers->addChild(markcol); @@ -109,9 +111,9 @@ void ViewProviderFace::attach(App::DocumentObject* obj) faceStyle->style = SoDrawStyle::FILLED; faces->addChild(faceStyle); - SoShapeHints * flathints = new SoShapeHints; - //flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; - //flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; + SoShapeHints* flathints = new SoShapeHints; + // flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; + // flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; faces->addChild(flathints); SoBaseColor* basecol = new SoBaseColor; @@ -138,10 +140,12 @@ void ViewProviderFace::attach(App::DocumentObject* obj) void ViewProviderFace::setDisplayMode(const char* ModeName) { - if (strcmp(ModeName, "Face") == 0) + if (strcmp(ModeName, "Face") == 0) { setDisplayMaskMode("Face"); - else if (strcmp(ModeName, "Marker") == 0) + } + else if (strcmp(ModeName, "Marker") == 0) { setDisplayMaskMode("Marker"); + } ViewProviderDocumentObject::setDisplayMode(ModeName); } @@ -158,7 +162,8 @@ std::vector ViewProviderFace::getDisplayModes() const return modes; } -SoPickedPoint* ViewProviderFace::getPickedPoint(const SbVec2s& pos, const Gui::View3DInventorViewer* viewer) const +SoPickedPoint* ViewProviderFace::getPickedPoint(const SbVec2s& pos, + const Gui::View3DInventorViewer* viewer) const { SoSeparator* root = new SoSeparator; root->ref(); @@ -173,7 +178,7 @@ SoPickedPoint* ViewProviderFace::getPickedPoint(const SbVec2s& pos, const Gui::V // returns a copy of the point SoPickedPoint* pick = rp.getPickedPoint(); - //return (pick ? pick->copy() : 0); // needs the same instance of CRT under MS Windows + // return (pick ? pick->copy() : 0); // needs the same instance of CRT under MS Windows return (pick ? new SoPickedPoint(*pick) : nullptr); } @@ -182,9 +187,9 @@ SoPickedPoint* ViewProviderFace::getPickedPoint(const SbVec2s& pos, const Gui::V /* TRANSLATOR MeshGui::MeshFaceAddition */ MeshFaceAddition::MeshFaceAddition(Gui::View3DInventor* parent) - : QObject(parent), faceView(new MeshGui::ViewProviderFace()) -{ -} + : QObject(parent) + , faceView(new MeshGui::ViewProviderFace()) +{} MeshFaceAddition::~MeshFaceAddition() { @@ -203,9 +208,8 @@ void MeshFaceAddition::startEditing(MeshGui::ViewProviderMesh* vp) faceView->mesh = vp; faceView->attach(vp->getObject()); viewer->addViewProvider(faceView); - //faceView->mesh->startEditing(); - viewer->addEventCallback(SoEvent::getClassTypeId(), - MeshFaceAddition::addFacetCallback, this); + // faceView->mesh->startEditing(); + viewer->addEventCallback(SoEvent::getClassTypeId(), MeshFaceAddition::addFacetCallback, this); } void MeshFaceAddition::finishEditing() @@ -218,9 +222,10 @@ void MeshFaceAddition::finishEditing() viewer->setRedirectToSceneGraphEnabled(false); viewer->removeViewProvider(faceView); - //faceView->mesh->finishEditing(); + // faceView->mesh->finishEditing(); viewer->removeEventCallback(SoEvent::getClassTypeId(), - MeshFaceAddition::addFacetCallback, this); + MeshFaceAddition::addFacetCallback, + this); this->deleteLater(); } @@ -253,8 +258,9 @@ void MeshFaceAddition::clearPoints() void MeshFaceAddition::flipNormal() { - if (faceView->index.size() < 3) + if (faceView->index.size() < 3) { return; + } std::swap(faceView->index[0], faceView->index[1]); SbVec3f v1 = faceView->pcCoords->point[0]; SbVec3f v2 = faceView->pcCoords->point[1]; @@ -264,14 +270,17 @@ void MeshFaceAddition::flipNormal() bool MeshFaceAddition::addMarkerPoint() { - if (faceView->current_index < 0) + if (faceView->current_index < 0) { return false; - if (faceView->index.size() >= 3) + } + if (faceView->index.size() >= 3) { return false; + } faceView->index.push_back(faceView->current_index); faceView->current_index = -1; - if (faceView->index.size() == 3) + if (faceView->index.size() == 3) { faceView->setDisplayMode("Face"); + } return true; } @@ -283,17 +292,20 @@ void MeshFaceAddition::showMarker(SoPickedPoint* pp) if (detail->isOfType(SoFaceDetail::getClassTypeId())) { const SoFaceDetail* fd = static_cast(detail); Mesh::Feature* mf = static_cast(faceView->mesh->getObject()); - const MeshCore::MeshFacetArray& facets = mf->Mesh.getValuePtr()->getKernel().GetFacets(); - const MeshCore::MeshPointArray& points = mf->Mesh.getValuePtr()->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& facets = + mf->Mesh.getValuePtr()->getKernel().GetFacets(); + const MeshCore::MeshPointArray& points = + mf->Mesh.getValuePtr()->getKernel().GetPoints(); // is the face index valid? int face_index = fd->getFaceIndex(); - if (face_index >= (int)facets.size()) + if (face_index >= (int)facets.size()) { return; + } // is a border facet picked? MeshCore::MeshFacet f = facets[face_index]; if (!f.HasOpenEdge()) { // check if a neighbour facet is at the border - bool ok=false; + bool ok = false; for (Mesh::FacetIndex nbIndex : f._aulNeighbours) { if (facets[nbIndex].HasOpenEdge()) { f = facets[nbIndex]; @@ -301,8 +313,9 @@ void MeshFaceAddition::showMarker(SoPickedPoint* pp) break; } } - if (!ok) + if (!ok) { return; + } } int point_index = -1; @@ -310,28 +323,31 @@ void MeshFaceAddition::showMarker(SoPickedPoint* pp) Base::Vector3f pnt; SbVec3f face_pnt; - for (int i=0; i<3; i++) { + for (int i = 0; i < 3; i++) { int index = (int)f._aulPoints[i]; - if (std::find(faceView->index.begin(), faceView->index.end(), index) != faceView->index.end()) - continue; // already inside - if (f._aulNeighbours[i] == MeshCore::FACET_INDEX_MAX || - f._aulNeighbours[(i+2)%3] == MeshCore::FACET_INDEX_MAX) { + if (std::find(faceView->index.begin(), faceView->index.end(), index) + != faceView->index.end()) { + continue; // already inside + } + if (f._aulNeighbours[i] == MeshCore::FACET_INDEX_MAX + || f._aulNeighbours[(i + 2) % 3] == MeshCore::FACET_INDEX_MAX) { pnt = points[index]; - float len = Base::DistanceP2(pnt, Base::Vector3f(vec[0],vec[1],vec[2])); + float len = Base::DistanceP2(pnt, Base::Vector3f(vec[0], vec[1], vec[2])); if (len < distance) { distance = len; point_index = index; - face_pnt.setValue(pnt.x,pnt.y,pnt.z); + face_pnt.setValue(pnt.x, pnt.y, pnt.z); } } } - if (point_index < 0) - return; // picked point is rejected + if (point_index < 0) { + return; // picked point is rejected + } int num = faceView->pcCoords->point.getNum(); if (faceView->current_index >= 0) { - num = std::max(num-1, 0); + num = std::max(num - 1, 0); } faceView->current_index = point_index; faceView->pcCoords->point.set1Value(num, face_pnt); @@ -340,11 +356,11 @@ void MeshFaceAddition::showMarker(SoPickedPoint* pp) } } -void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n) +void MeshFaceAddition::addFacetCallback(void* ud, SoEventCallback* n) { MeshFaceAddition* that = static_cast(ud); - ViewProviderFace* face = that->faceView; - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + ViewProviderFace* face = that->faceView; + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); const SoEvent* ev = n->getEvent(); // If we are in navigation mode then ignore all but key events @@ -356,7 +372,7 @@ void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n) if (ev->getTypeId() == SoLocation2Event::getClassTypeId()) { n->setHandled(); if (face->index.size() < 3) { - SoPickedPoint * point = face->getPickedPoint(ev->getPosition(), view); + SoPickedPoint* point = face->getPickedPoint(ev->getPosition(), view); if (point) { that->showMarker(point); delete point; @@ -364,16 +380,18 @@ void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n) } } else if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) { - const SoMouseButtonEvent * mbe = static_cast(ev); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 || - mbe->getButton() == SoMouseButtonEvent::BUTTON2 || - mbe->getButton() == SoMouseButtonEvent::BUTTON3) { + const SoMouseButtonEvent* mbe = static_cast(ev); + if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + || mbe->getButton() == SoMouseButtonEvent::BUTTON2 + || mbe->getButton() == SoMouseButtonEvent::BUTTON3) { n->setHandled(); } - if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { + if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::DOWN) { that->addMarkerPoint(); } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::UP) { + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::UP) { if (face->index.size() == 3) { QMenu menu; QAction* add = menu.addAction(MeshFaceAddition::tr("Add triangle")); @@ -391,7 +409,8 @@ void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n) } } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 + && mbe->getState() == SoButtonEvent::UP) { QMenu menu; QAction* fin = menu.addAction(MeshFaceAddition::tr("Finish")); QAction* act = menu.exec(QCursor::pos()); @@ -402,9 +421,8 @@ void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n) } // toggle between edit and navigation mode else if (ev->getTypeId().isDerivedFrom(SoKeyboardEvent::getClassTypeId())) { - const SoKeyboardEvent * const ke = static_cast(ev); - if (ke->getState() == SoButtonEvent::DOWN && - ke->getKey() == SoKeyboardEvent::ESCAPE) { + const SoKeyboardEvent* const ke = static_cast(ev); + if (ke->getState() == SoButtonEvent::DOWN && ke->getKey() == SoKeyboardEvent::ESCAPE) { SbBool toggle = view->isRedirectedToSceneGraph(); view->setRedirectToSceneGraph(!toggle); n->setHandled(); @@ -414,27 +432,28 @@ void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n) // ---------------------------------------------------------------------- -namespace MeshGui { - // for sorting of elements - struct NofFacetsCompare +namespace MeshGui +{ +// for sorting of elements +struct NofFacetsCompare +{ + bool operator()(const std::vector& rclC1, + const std::vector& rclC2) { - bool operator () (const std::vector &rclC1, - const std::vector &rclC2) - { - return rclC1.size() < rclC2.size(); - } - }; -} + return rclC1.size() < rclC2.size(); + } +}; +} // namespace MeshGui /* TRANSLATOR MeshGui::MeshFillHole */ MeshFillHole::MeshFillHole(MeshHoleFiller& hf, Gui::View3DInventor* parent) - : QObject(parent) - , myMesh(nullptr) - , myNumPoints(0) - , myVertex1(0) - , myVertex2(0) - , myHoleFiller(hf) + : QObject(parent) + , myMesh(nullptr) + , myNumPoints(0) + , myVertex1(0) + , myVertex2(0) + , myHoleFiller(hf) { myBoundariesRoot = new SoSeparator; myBoundariesRoot->ref(); @@ -450,7 +469,7 @@ MeshFillHole::MeshFillHole(MeshHoleFiller& hf, Gui::View3DInventor* parent) pointStyle->pointSize = 8.0f; myBridgeRoot->addChild(pointStyle); - SoBaseColor * markcol = new SoBaseColor; + SoBaseColor* markcol = new SoBaseColor; markcol->rgb.setValue(1.0f, 1.0f, 0.0f); myBridgeRoot->addChild(markcol); @@ -474,13 +493,12 @@ void MeshFillHole::startEditing(MeshGui::ViewProviderMesh* vp) Gui::View3DInventor* view = static_cast(parent()); Gui::View3DInventorViewer* viewer = view->getViewer(); viewer->setEditing(true); - //viewer->setRedirectToSceneGraph(true); - viewer->addEventCallback(SoEvent::getClassTypeId(), - MeshFillHole::fileHoleCallback, this); - //NOLINTBEGIN + // viewer->setRedirectToSceneGraph(true); + viewer->addEventCallback(SoEvent::getClassTypeId(), MeshFillHole::fileHoleCallback, this); + // NOLINTBEGIN myConnection = App::GetApplication().signalChangedObject.connect( std::bind(&MeshFillHole::slotChangedObject, this, sp::_1, sp::_2)); - //NOLINTEND + // NOLINTEND Gui::coinRemoveAllChildren(myBoundariesRoot); myBoundariesRoot->addChild(viewer->getHeadlight()); @@ -498,9 +516,8 @@ void MeshFillHole::finishEditing() Gui::View3DInventor* view = static_cast(parent()); Gui::View3DInventorViewer* viewer = view->getViewer(); viewer->setEditing(false); - //viewer->setRedirectToSceneGraph(false); - viewer->removeEventCallback(SoEvent::getClassTypeId(), - MeshFillHole::fileHoleCallback, this); + // viewer->setRedirectToSceneGraph(false); + viewer->removeEventCallback(SoEvent::getClassTypeId(), MeshFillHole::fileHoleCallback, this); myConnection.disconnect(); this->deleteLater(); static_cast(viewer->getSceneGraph())->removeChild(myBridgeRoot); @@ -514,8 +531,9 @@ void MeshFillHole::closeBridge() TBoundary::iterator jt = std::find(myPolygon.begin(), myPolygon.end(), myVertex2); if (it != myPolygon.end() && jt != myPolygon.end()) { // which iterator comes first - if (jt < it) + if (jt < it) { std::swap(it, jt); + } // split the boundary into two loops and take the shorter one std::list bounds; TBoundary loop1, loop2; @@ -523,28 +541,33 @@ void MeshFillHole::closeBridge() loop1.insert(loop1.end(), jt, myPolygon.end()); loop2.insert(loop2.end(), it, jt); // this happens when myVertex1 == myVertex2 - if (loop2.empty()) + if (loop2.empty()) { bounds.push_back(loop1); - else if (loop1.size() < loop2.size()) + } + else if (loop1.size() < loop2.size()) { bounds.push_back(loop1); - else + } + else { bounds.push_back(loop2); + } App::Document* doc = myMesh->getDocument(); doc->openTransaction("Bridge && Fill hole"); Mesh::MeshObject* pMesh = myMesh->Mesh.startEditing(); bool ok = myHoleFiller.fillHoles(*pMesh, bounds, myVertex1, myVertex2); myMesh->Mesh.finishEditing(); - if (ok) + if (ok) { doc->commitTransaction(); - else + } + else { doc->abortTransaction(); + } } } void MeshFillHole::slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop) { - if (&Obj == myMesh && strcmp(Prop.getName(),"Mesh") == 0) { + if (&Obj == myMesh && strcmp(Prop.getName(), "Mesh") == 0) { Gui::coinRemoveAllChildren(myBoundariesGroup); myVertex->point.setNum(0); myNumPoints = 0; @@ -565,10 +588,10 @@ void MeshFillHole::createPolygons() myBoundaryRoot->addChild(pickStyle); // get mesh kernel - const MeshCore::MeshKernel & rMesh = this->myMesh->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = this->myMesh->Mesh.getValue().getKernel(); // get the mesh boundaries as an array of point indices - std::list > borders; + std::list> borders; MeshCore::MeshAlgorithm cAlgo(rMesh); MeshCore::MeshPointIterator p_iter(rMesh); cAlgo.GetMeshBorders(borders); @@ -577,10 +600,11 @@ void MeshFillHole::createPolygons() // sort the borders in ascending order of the number of edges borders.sort(NofFacetsCompare()); - int32_t count=0; - for (auto & border : borders) { - if (border.front() == border.back()) + int32_t count = 0; + for (auto& border : borders) { + if (border.front() == border.back()) { border.pop_back(); + } count += border.size(); } @@ -590,7 +614,7 @@ void MeshFillHole::createPolygons() coords->point.setNum(count); int32_t index = 0; - for (const auto & border : borders) { + for (const auto& border : borders) { SoPolygon* polygon = new SoPolygon(); polygon->startIndex = index; polygon->numVertices = border.size(); @@ -598,18 +622,20 @@ void MeshFillHole::createPolygons() myPolygons[polygon] = border; for (Mesh::PointIndex jt : border) { p_iter.Set(jt); - coords->point.set1Value(index++,p_iter->x,p_iter->y,p_iter->z); + coords->point.set1Value(index++, p_iter->x, p_iter->y, p_iter->z); } } } -SoNode* MeshFillHole::getPickedPolygon(const SoRayPickAction& action/*SoNode* root, const SbVec2s& pos*/) const +SoNode* MeshFillHole::getPickedPolygon( + const SoRayPickAction& action /*SoNode* root, const SbVec2s& pos*/) const { SoPolygon* poly = nullptr; - const SoPickedPointList & points = action.getPickedPointList(); - for (int i=0; i < points.getLength(); i++) { - const SoPickedPoint * point = points[i]; - if (point && point->getPath()->getTail()->getTypeId() == MeshGui::SoPolygon::getClassTypeId()) { + const SoPickedPointList& points = action.getPickedPointList(); + for (int i = 0; i < points.getLength(); i++) { + const SoPickedPoint* point = points[i]; + if (point + && point->getPath()->getTail()->getTypeId() == MeshGui::SoPolygon::getClassTypeId()) { // we have something picked, now check if it was an SoPolygon node SoPolygon* node = static_cast(point->getPath()->getTail()); if (!poly) { @@ -625,21 +651,23 @@ SoNode* MeshFillHole::getPickedPolygon(const SoRayPickAction& action/*SoNode* ro return poly; } -float MeshFillHole::findClosestPoint(const SbLine& ray, const TBoundary& polygon, - Mesh::PointIndex& vertex_index, SbVec3f& closestPoint) const +float MeshFillHole::findClosestPoint(const SbLine& ray, + const TBoundary& polygon, + Mesh::PointIndex& vertex_index, + SbVec3f& closestPoint) const { // now check which vertex of the polygon is closest to the ray float minDist = FLT_MAX; vertex_index = MeshCore::POINT_INDEX_MAX; - const MeshCore::MeshKernel & rMesh = myMesh->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = myMesh->Mesh.getValue().getKernel(); const MeshCore::MeshPointArray& pts = rMesh.GetPoints(); for (Mesh::PointIndex it : polygon) { SbVec3f vertex; const Base::Vector3f& v = pts[it]; - vertex.setValue(v.x,v.y,v.z); + vertex.setValue(v.x, v.y, v.z); SbVec3f point = ray.getClosestPoint(vertex); - float distance = (vertex-point).sqrLength(); + float distance = (vertex - point).sqrLength(); if (distance < minDist) { minDist = distance; vertex_index = it; @@ -650,10 +678,10 @@ float MeshFillHole::findClosestPoint(const SbLine& ray, const TBoundary& polygon return minDist; } -void MeshFillHole::fileHoleCallback(void * ud, SoEventCallback * n) +void MeshFillHole::fileHoleCallback(void* ud, SoEventCallback* n) { MeshFillHole* self = static_cast(ud); - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); const SoEvent* ev = n->getEvent(); if (ev->getTypeId() == SoLocation2Event::getClassTypeId()) { @@ -661,10 +689,12 @@ void MeshFillHole::fileHoleCallback(void * ud, SoEventCallback * n) SoRayPickAction rp(view->getSoRenderManager()->getViewportRegion()); rp.setPoint(ev->getPosition()); rp.setPickAll(true); - if (self->myNumPoints == 0) + if (self->myNumPoints == 0) { rp.apply(self->myBoundariesRoot); - else + } + else { rp.apply(self->myBoundaryRoot); + } SoNode* node = self->getPickedPolygon(rp); if (node) { std::map::iterator it = self->myPolygons.find(node); @@ -672,29 +702,36 @@ void MeshFillHole::fileHoleCallback(void * ud, SoEventCallback * n) // now check which vertex of the polygon is closest to the ray Mesh::PointIndex vertex_index; SbVec3f closestPoint; - float minDist = self->findClosestPoint(rp.getLine(), it->second, vertex_index, closestPoint); + float minDist = + self->findClosestPoint(rp.getLine(), it->second, vertex_index, closestPoint); if (minDist < 1.0f) { - if (self->myNumPoints == 0) + if (self->myNumPoints == 0) { self->myVertex->point.set1Value(0, closestPoint); - else + } + else { self->myVertex->point.set1Value(1, closestPoint); + } } } } } else if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) { n->setHandled(); - const SoMouseButtonEvent * mbe = static_cast(ev); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::UP) { - if (self->myNumPoints > 1) + const SoMouseButtonEvent* mbe = static_cast(ev); + if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::UP) { + if (self->myNumPoints > 1) { return; + } SoRayPickAction rp(view->getSoRenderManager()->getViewportRegion()); rp.setPoint(ev->getPosition()); rp.setPickAll(true); - if (self->myNumPoints == 0) + if (self->myNumPoints == 0) { rp.apply(self->myBoundariesRoot); - else + } + else { rp.apply(self->myBoundaryRoot); + } SoNode* node = self->getPickedPolygon(rp); if (node) { std::map::iterator it = self->myPolygons.find(node); @@ -702,7 +739,10 @@ void MeshFillHole::fileHoleCallback(void * ud, SoEventCallback * n) // now check which vertex of the polygon is closest to the ray Mesh::PointIndex vertex_index; SbVec3f closestPoint; - float minDist = self->findClosestPoint(rp.getLine(), it->second, vertex_index, closestPoint); + float minDist = self->findClosestPoint(rp.getLine(), + it->second, + vertex_index, + closestPoint); if (minDist < 1.0f) { if (self->myNumPoints == 0) { self->myBoundaryRoot->addChild(node); @@ -723,7 +763,8 @@ void MeshFillHole::fileHoleCallback(void * ud, SoEventCallback * n) } } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 + && mbe->getState() == SoButtonEvent::UP) { QMenu menu; QAction* fin = menu.addAction(MeshFillHole::tr("Finish")); QAction* act = menu.exec(QCursor::pos()); diff --git a/src/Mod/Mesh/Gui/MeshEditor.h b/src/Mod/Mesh/Gui/MeshEditor.h index 01e6c56bc0..a7a6ee4c62 100644 --- a/src/Mod/Mesh/Gui/MeshEditor.h +++ b/src/Mod/Mesh/Gui/MeshEditor.h @@ -38,16 +38,27 @@ class SoRayPickAction; class SbLine; class SbVec3f; -namespace Gui { class View3DInventor; class View3DInventorViewer;} -namespace Mesh { class MeshObject; } -namespace Mesh { class Feature; } -namespace MeshGui { +namespace Gui +{ +class View3DInventor; +class View3DInventorViewer; +} // namespace Gui +namespace Mesh +{ +class MeshObject; +} +namespace Mesh +{ +class Feature; +} +namespace MeshGui +{ class SoFCMeshPickNode; /** The ViewProviderFace class is used to display a single face. * @author Werner Mayer */ -class MeshGuiExport ViewProviderFace : public Gui::ViewProviderDocumentObject +class MeshGuiExport ViewProviderFace: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderFace); @@ -60,14 +71,15 @@ public: void setDisplayMode(const char* ModeName) override; const char* getDefaultDisplayMode() const override; std::vector getDisplayModes() const override; - SoPickedPoint* getPickedPoint(const SbVec2s& pos, const Gui::View3DInventorViewer* viewer) const; + SoPickedPoint* getPickedPoint(const SbVec2s& pos, + const Gui::View3DInventorViewer* viewer) const; ViewProviderMesh* mesh; std::vector index; int current_index; - SoCoordinate3 * pcCoords; - SoFaceSet * pcFaces; + SoCoordinate3* pcCoords; + SoFaceSet* pcFaces; SoFCMeshPickNode* pcMeshPick; }; @@ -75,7 +87,7 @@ public: * Display data of a mesh kernel. * \author Werner Mayer */ -class MeshGuiExport MeshFaceAddition : public QObject +class MeshGuiExport MeshFaceAddition: public QObject { Q_OBJECT @@ -96,7 +108,7 @@ private Q_SLOTS: private: bool addMarkerPoint(); void showMarker(SoPickedPoint*); - static void addFacetCallback(void * ud, SoEventCallback * n); + static void addFacetCallback(void* ud, SoEventCallback* n); private: ViewProviderFace* faceView; @@ -109,10 +121,12 @@ public: virtual ~MeshHoleFiller() = default; MeshHoleFiller(const MeshHoleFiller&) = delete; MeshHoleFiller(MeshHoleFiller&&) = delete; - MeshHoleFiller& operator = (const MeshHoleFiller&) = delete; - MeshHoleFiller& operator = (MeshHoleFiller&&) = delete; - virtual bool fillHoles(Mesh::MeshObject&, const std::list >&, - Mesh::PointIndex, Mesh::PointIndex) + MeshHoleFiller& operator=(const MeshHoleFiller&) = delete; + MeshHoleFiller& operator=(MeshHoleFiller&&) = delete; + virtual bool fillHoles(Mesh::MeshObject&, + const std::list>&, + Mesh::PointIndex, + Mesh::PointIndex) { return false; } @@ -122,7 +136,7 @@ public: * Display data of a mesh kernel. * \author Werner Mayer */ -class MeshGuiExport MeshFillHole : public QObject +class MeshGuiExport MeshFillHole: public QObject { Q_OBJECT @@ -142,11 +156,13 @@ private: using TBoundary = std::vector; using Connection = boost::signals2::connection; - static void fileHoleCallback(void * ud, SoEventCallback * n); + static void fileHoleCallback(void* ud, SoEventCallback* n); void createPolygons(); SoNode* getPickedPolygon(const SoRayPickAction& action) const; - float findClosestPoint(const SbLine& ray, const TBoundary& polygon, - Mesh::PointIndex&, SbVec3f&) const; + float findClosestPoint(const SbLine& ray, + const TBoundary& polygon, + Mesh::PointIndex&, + SbVec3f&) const; void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop); private: @@ -165,8 +181,7 @@ private: Connection myConnection; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_MESHEDITOR_H - +#endif // MESHGUI_MESHEDITOR_H diff --git a/src/Mod/Mesh/Gui/MeshSelection.cpp b/src/Mod/Mesh/Gui/MeshSelection.cpp index 18be15611c..9776805e9b 100644 --- a/src/Mod/Mesh/Gui/MeshSelection.cpp +++ b/src/Mod/Mesh/Gui/MeshSelection.cpp @@ -22,18 +22,20 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif +// clang-format off #include #include +// clang-format on #include #include #include @@ -43,10 +45,11 @@ #include #include #include -#include -#include + #include +#include #include +#include #include "MeshSelection.h" #include "ViewProvider.h" @@ -59,19 +62,19 @@ using namespace MeshGui; #define CROSS_HOT_X 7 #define CROSS_HOT_Y 7 +// clang-format off unsigned char MeshSelection::cross_bitmap[] = { - 0xc0, 0x03, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, - 0x40, 0x02, 0x40, 0x02, 0x7f, 0xfe, 0x01, 0x80, - 0x01, 0x80, 0x7f, 0xfe, 0x40, 0x02, 0x40, 0x02, - 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0xc0, 0x03 -}; + 0xc0, 0x03, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, + 0x40, 0x02, 0x40, 0x02, 0x7f, 0xfe, 0x01, 0x80, + 0x01, 0x80, 0x7f, 0xfe, 0x40, 0x02, 0x40, 0x02, + 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0xc0, 0x03}; unsigned char MeshSelection::cross_mask_bitmap[] = { - 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, - 0xc0, 0x03, 0xc0, 0x03, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xc0, 0x03, - 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03 -}; + 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, + 0xc0, 0x03, 0xc0, 0x03, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xc0, 0x03, + 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03}; +// clang-format on MeshSelection::MeshSelection() { @@ -82,8 +85,9 @@ MeshSelection::~MeshSelection() { if (this->activeCB) { Gui::View3DInventorViewer* viewer = this->getViewer(); - if (viewer) + if (viewer) { stopInteractiveCallback(viewer); + } } } @@ -95,7 +99,7 @@ void MeshSelection::setEnabledViewerSelection(bool on) } } -void MeshSelection::setCallback(SoEventCallbackCB *cb) +void MeshSelection::setCallback(SoEventCallbackCB* cb) { selectionCB = cb; } @@ -119,8 +123,9 @@ std::vector MeshSelection::getObjects() const // get all objects of the active document else { App::Document* doc = App::GetApplication().getActiveDocument(); - if (doc) + if (doc) { objs = doc->getObjectsOfType(Mesh::Feature::getClassTypeId()); + } } return objs; @@ -133,8 +138,9 @@ std::list MeshSelection::getViewProviders() const for (auto obj : objs) { if (obj->isDerivedFrom(Mesh::Feature::getClassTypeId())) { Gui::ViewProvider* vp = Gui::Application::Instance->getViewProvider(obj); - if (vp->isVisible()) + if (vp->isVisible()) { vps.push_back(static_cast(vp)); + } } } @@ -149,12 +155,14 @@ void MeshSelection::setViewer(Gui::View3DInventorViewer* v) Gui::View3DInventorViewer* MeshSelection::getViewer() const { // if a special viewer was set from outside then use this - if (ivViewer) + if (ivViewer) { return ivViewer; + } Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if (!doc) + if (!doc) { return nullptr; + } Gui::MDIView* view = doc->getActiveView(); if (view && view->getTypeId().isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { Gui::View3DInventorViewer* viewer = static_cast(view)->getViewer(); @@ -164,10 +172,12 @@ Gui::View3DInventorViewer* MeshSelection::getViewer() const return nullptr; } -void MeshSelection::startInteractiveCallback(Gui::View3DInventorViewer* viewer,SoEventCallbackCB *cb) +void MeshSelection::startInteractiveCallback(Gui::View3DInventorViewer* viewer, + SoEventCallbackCB* cb) { - if (this->activeCB) + if (this->activeCB) { return; + } viewer->setEditing(true); viewer->addEventCallback(SoMouseButtonEvent::getClassTypeId(), cb, this); this->activeCB = cb; @@ -175,14 +185,15 @@ void MeshSelection::startInteractiveCallback(Gui::View3DInventorViewer* viewer,S void MeshSelection::stopInteractiveCallback(Gui::View3DInventorViewer* viewer) { - if (!this->activeCB) + if (!this->activeCB) { return; + } viewer->setEditing(false); viewer->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), this->activeCB, this); this->activeCB = nullptr; } -void MeshSelection::prepareFreehandSelection(bool add,SoEventCallbackCB *cb) +void MeshSelection::prepareFreehandSelection(bool add, SoEventCallbackCB* cb) { // a rubberband to select a rectangle area of the meshes Gui::View3DInventorViewer* viewer = this->getViewer(); @@ -212,7 +223,9 @@ void MeshSelection::prepareFreehandSelection(bool add,SoEventCallbackCB *cb) viewer->setComponentCursor(custom); }; - QObject::connect(viewer, &Gui::View3DInventorViewer::devicePixelRatioChanged, setComponentCursor); + QObject::connect(viewer, + &Gui::View3DInventorViewer::devicePixelRatioChanged, + setComponentCursor); setComponentCursor(); this->addToSelection = add; } @@ -265,15 +278,16 @@ bool MeshSelection::deleteSelection() std::list views = getViewProviders(); for (auto view : views) { Mesh::Feature* mf = static_cast(view->getObject()); - unsigned long ct = MeshCore::MeshAlgorithm(mf->Mesh.getValue().getKernel()). - CountFacetFlag(MeshCore::MeshFacet::SELECTED); + unsigned long ct = MeshCore::MeshAlgorithm(mf->Mesh.getValue().getKernel()) + .CountFacetFlag(MeshCore::MeshFacet::SELECTED); if (ct > 0) { selected = true; break; } } - if (!selected) - return false; // nothing todo + if (!selected) { + return false; // nothing todo + } for (auto view : views) { view->deleteSelection(); @@ -349,14 +363,15 @@ void MeshSelection::selectComponent(int size) Mesh::Feature* mf = static_cast(view->getObject()); const Mesh::MeshObject* mo = mf->Mesh.getValuePtr(); - std::vector > segm; + std::vector> segm; MeshCore::MeshComponents comp(mo->getKernel()); - comp.SearchForComponents(MeshCore::MeshComponents::OverEdge,segm); + comp.SearchForComponents(MeshCore::MeshComponents::OverEdge, segm); std::vector faces; - for (const auto & jt : segm) { - if (jt.size() < (Mesh::FacetIndex)size) + for (const auto& jt : segm) { + if (jt.size() < (Mesh::FacetIndex)size) { faces.insert(faces.end(), jt.begin(), jt.end()); + } } view->addSelection(faces); @@ -370,14 +385,15 @@ void MeshSelection::deselectComponent(int size) Mesh::Feature* mf = static_cast(view->getObject()); const Mesh::MeshObject* mo = mf->Mesh.getValuePtr(); - std::vector > segm; + std::vector> segm; MeshCore::MeshComponents comp(mo->getKernel()); - comp.SearchForComponents(MeshCore::MeshComponents::OverEdge,segm); + comp.SearchForComponents(MeshCore::MeshComponents::OverEdge, segm); std::vector faces; - for (const auto & jt : segm) { - if (jt.size() > (Mesh::FacetIndex)size) + for (const auto& jt : segm) { + if (jt.size() > (Mesh::FacetIndex)size) { faces.insert(faces.end(), jt.begin(), jt.end()); + } } view->removeSelection(faces); @@ -440,27 +456,30 @@ void MeshSelection::setRemoveComponentOnClick(bool on) removeComponent = on; } -void MeshSelection::selectGLCallback(void * ud, SoEventCallback * n) +void MeshSelection::selectGLCallback(void* ud, SoEventCallback* n) { // When this callback function is invoked we must leave the edit mode - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); MeshSelection* self = static_cast(ud); self->stopInteractiveCallback(view); n->setHandled(); std::vector polygon = view->getGLPolygon(); - if (polygon.size() < 3) + if (polygon.size() < 3) { return; - if (polygon.front() != polygon.back()) + } + if (polygon.front() != polygon.back()) { polygon.push_back(polygon.front()); + } SbVec3f pnt, dir; view->getNearPlane(pnt, dir); - Base::Vector3f normal(dir[0],dir[1],dir[2]); + Base::Vector3f normal(dir[0], dir[1], dir[2]); std::list views = self->getViewProviders(); for (auto vp : views) { std::vector faces; - const Mesh::MeshObject& mesh = static_cast(vp->getObject())->Mesh.getValue(); + const Mesh::MeshObject& mesh = + static_cast(vp->getObject())->Mesh.getValue(); const MeshCore::MeshKernel& kernel = mesh.getKernel(); // simply get all triangles under the polygon @@ -474,20 +493,24 @@ void MeshSelection::selectGLCallback(void * ud, SoEventCallback * n) if (self->onlyVisibleTriangles) { const SbVec2s& sz = view->getSoRenderManager()->getViewportRegion().getWindowSize(); - short width,height; sz.getValue(width,height); + short width, height; + sz.getValue(width, height); std::vector pixelPoly = view->getPolygon(); SbBox2s rect; - for (const auto & p : pixelPoly) { - rect.extendBy(SbVec2s(p[0],height-p[1])); + for (const auto& p : pixelPoly) { + rect.extendBy(SbVec2s(p[0], height - p[1])); } - std::vector rf; rf.swap(faces); - std::vector vf = vp->getVisibleFacetsAfterZoom - (rect, view->getSoRenderManager()->getViewportRegion(), view->getSoRenderManager()->getCamera()); + std::vector rf; + rf.swap(faces); + std::vector vf = + vp->getVisibleFacetsAfterZoom(rect, + view->getSoRenderManager()->getViewportRegion(), + view->getSoRenderManager()->getCamera()); // get common facets of the viewport and the visible one std::sort(vf.begin(), vf.end()); std::sort(rf.begin(), rf.end()); - std::back_insert_iterator > biit(faces); + std::back_insert_iterator> biit(faces); std::set_intersection(vf.begin(), vf.end(), rf.begin(), rf.end(), biit); } @@ -506,26 +529,30 @@ void MeshSelection::selectGLCallback(void * ud, SoEventCallback * n) faces.swap(screen); } - if (self->addToSelection) + if (self->addToSelection) { vp->addSelection(faces); - else + } + else { vp->removeSelection(faces); + } } view->redraw(); } -void MeshSelection::pickFaceCallback(void * ud, SoEventCallback * n) +void MeshSelection::pickFaceCallback(void* ud, SoEventCallback* n) { // handle only mouse button events if (n->getEvent()->isOfType(SoMouseButtonEvent::getClassTypeId())) { - const SoMouseButtonEvent * mbe = static_cast(n->getEvent()); - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + const SoMouseButtonEvent* mbe = static_cast(n->getEvent()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); - // Mark all incoming mouse button events as handled, especially, to deactivate the selection node + // Mark all incoming mouse button events as handled, especially, to deactivate the selection + // node n->getAction()->setHandled(); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { - const SoPickedPoint * point = n->getPickedPoint(); + if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::DOWN) { + const SoPickedPoint* point = n->getPickedPoint(); if (!point) { Base::Console().Message("No facet picked.\n"); return; @@ -536,28 +563,34 @@ void MeshSelection::pickFaceCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) + if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) { return; + } ViewProviderMesh* mesh = static_cast(vp); MeshSelection* self = static_cast(ud); std::list views = self->getViewProviders(); - if (std::find(views.begin(), views.end(), mesh) == views.end()) + if (std::find(views.begin(), views.end(), mesh) == views.end()) { return; + } const SoDetail* detail = point->getDetail(/*mesh->getShapeNode()*/); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { // get the boundary to the picked facet Mesh::FacetIndex uFacet = static_cast(detail)->getFaceIndex(); if (self->addToSelection) { - if (self->addComponent) + if (self->addComponent) { mesh->selectComponent(uFacet); - else + } + else { mesh->selectFacet(uFacet); + } } else { - if (self->removeComponent) + if (self->removeComponent) { mesh->deselectComponent(uFacet); - else + } + else { mesh->deselectFacet(uFacet); + } } } } diff --git a/src/Mod/Mesh/Gui/MeshSelection.h b/src/Mod/Mesh/Gui/MeshSelection.h index f4323fa4a9..a8703a4406 100644 --- a/src/Mod/Mesh/Gui/MeshSelection.h +++ b/src/Mod/Mesh/Gui/MeshSelection.h @@ -23,21 +23,23 @@ #ifndef MESHGUI_MESHSELECTION_H #define MESHGUI_MESHSELECTION_H -#include #include +#include #include #include #ifndef MESH_GLOBAL_H -# include +#include #endif -namespace Gui { - class View3DInventorViewer; +namespace Gui +{ +class View3DInventorViewer; } -namespace MeshGui { +namespace MeshGui +{ class ViewProviderMesh; @@ -74,32 +76,32 @@ public: void setViewer(Gui::View3DInventorViewer* v); protected: - void setCallback(SoEventCallbackCB *cb); + void setCallback(SoEventCallbackCB* cb); std::list getViewProviders() const; Gui::View3DInventorViewer* getViewer() const; - void prepareFreehandSelection(bool,SoEventCallbackCB *cb); - void startInteractiveCallback(Gui::View3DInventorViewer* viewer,SoEventCallbackCB *cb); + void prepareFreehandSelection(bool, SoEventCallbackCB* cb); + void startInteractiveCallback(Gui::View3DInventorViewer* viewer, SoEventCallbackCB* cb); void stopInteractiveCallback(Gui::View3DInventorViewer* viewer); private: - static void selectGLCallback(void * ud, SoEventCallback * n); - static void pickFaceCallback(void * ud, SoEventCallback * n); + static void selectGLCallback(void* ud, SoEventCallback* n); + static void pickFaceCallback(void* ud, SoEventCallback* n); private: - bool onlyPointToUserTriangles{false}; - bool onlyVisibleTriangles{false}; - bool addToSelection{false}; - bool addComponent{false}; - bool removeComponent{false}; - SoEventCallbackCB *activeCB{nullptr}; - SoEventCallbackCB *selectionCB{nullptr}; - Gui::View3DInventorViewer* ivViewer{nullptr}; + bool onlyPointToUserTriangles {false}; + bool onlyVisibleTriangles {false}; + bool addToSelection {false}; + bool addComponent {false}; + bool removeComponent {false}; + SoEventCallbackCB* activeCB {nullptr}; + SoEventCallbackCB* selectionCB {nullptr}; + Gui::View3DInventorViewer* ivViewer {nullptr}; mutable std::vector meshObjects; static unsigned char cross_bitmap[]; static unsigned char cross_mask_bitmap[]; }; -} +} // namespace MeshGui -#endif // MESHGUI_MESHSELECTION_H +#endif // MESHGUI_MESHSELECTION_H diff --git a/src/Mod/Mesh/Gui/PreCompiled.h b/src/Mod/Mesh/Gui/PreCompiled.h index fafdf068b9..e492cbd9aa 100644 --- a/src/Mod/Mesh/Gui/PreCompiled.h +++ b/src/Mod/Mesh/Gui/PreCompiled.h @@ -27,19 +27,19 @@ // point at which warnings of overly long specifiers disabled (needed for VC6) #ifdef _MSC_VER -# pragma warning( disable : 4005 ) -# pragma warning( disable : 4251 ) -# pragma warning( disable : 4503 ) -# pragma warning( disable : 4275 ) -# pragma warning( disable : 4273 ) -# pragma warning( disable : 4786 ) // specifier longer then 255 chars +#pragma warning(disable : 4005) +#pragma warning(disable : 4251) +#pragma warning(disable : 4503) +#pragma warning(disable : 4275) +#pragma warning(disable : 4273) +#pragma warning(disable : 4786) // specifier longer then 255 chars #endif #ifdef _PreComp_ // Gts #ifdef FC_USE_GTS -# include +#include #endif // standard @@ -56,19 +56,19 @@ // Qt Toolkit #ifndef __QtAll__ -# include +#include #endif // Inventor #ifndef __InventorAll__ -# include +#include #endif #elif defined(FC_OS_WIN32) #ifndef NOMINMAX -# define NOMINMAX +#define NOMINMAX #endif #include #endif //_PreComp_ -#endif // MESHGUI_PRECOMPILED_H +#endif // MESHGUI_PRECOMPILED_H diff --git a/src/Mod/Mesh/Gui/PropertyEditorMesh.cpp b/src/Mod/Mesh/Gui/PropertyEditorMesh.cpp index 2e54997a6f..11dffcf3f1 100644 --- a/src/Mod/Mesh/Gui/PropertyEditorMesh.cpp +++ b/src/Mod/Mesh/Gui/PropertyEditorMesh.cpp @@ -35,18 +35,18 @@ PROPERTYITEM_SOURCE(MeshGui::PropertyMeshKernelItem) PropertyMeshKernelItem::PropertyMeshKernelItem() { - m_p = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_p = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_p->setParent(this); m_p->setPropertyName(QLatin1String("Points")); this->appendChild(m_p); - m_e = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_e = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_e->setParent(this); m_e->setPropertyName(QLatin1String("Edges")); this->appendChild(m_e); - m_f = static_cast - (Gui::PropertyEditor::PropertyIntegerItem::create()); + m_f = static_cast( + Gui::PropertyEditor::PropertyIntegerItem::create()); m_f->setParent(this); m_f->setPropertyName(QLatin1String("Faces")); this->appendChild(m_f); @@ -72,7 +72,7 @@ QVariant PropertyMeshKernelItem::value(const App::Property*) const ctF += (int)rMesh.CountFacets(); } - QString str = QObject::tr("[Points: %1, Edges: %2, Faces: %3]").arg(ctP).arg(ctE).arg(ctF); + QString str = QObject::tr("[Points: %1, Edges: %2, Faces: %3]").arg(ctP).arg(ctE).arg(ctF); return {str}; } @@ -86,7 +86,9 @@ void PropertyMeshKernelItem::setValue(const QVariant& value) Q_UNUSED(value); } -QWidget* PropertyMeshKernelItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const +QWidget* PropertyMeshKernelItem::createEditor(QWidget* parent, + const QObject* receiver, + const char* method) const { Q_UNUSED(parent); Q_UNUSED(receiver); @@ -94,13 +96,13 @@ QWidget* PropertyMeshKernelItem::createEditor(QWidget* parent, const QObject* re return nullptr; } -void PropertyMeshKernelItem::setEditorData(QWidget *editor, const QVariant& data) const +void PropertyMeshKernelItem::setEditorData(QWidget* editor, const QVariant& data) const { Q_UNUSED(editor); Q_UNUSED(data); } -QVariant PropertyMeshKernelItem::editorData(QWidget *editor) const +QVariant PropertyMeshKernelItem::editorData(QWidget* editor) const { Q_UNUSED(editor); return {}; diff --git a/src/Mod/Mesh/Gui/PropertyEditorMesh.h b/src/Mod/Mesh/Gui/PropertyEditorMesh.h index 694b42e19f..670272a3c8 100644 --- a/src/Mod/Mesh/Gui/PropertyEditorMesh.h +++ b/src/Mod/Mesh/Gui/PropertyEditorMesh.h @@ -25,17 +25,18 @@ #include #ifndef MESH_GLOBAL_H -# include +#include #endif -namespace MeshGui { +namespace MeshGui +{ /** * Display data of a mesh kernel. * \author Werner Mayer */ -class MeshGuiExport PropertyMeshKernelItem : public Gui::PropertyEditor::PropertyItem +class MeshGuiExport PropertyMeshKernelItem: public Gui::PropertyEditor::PropertyItem { Q_OBJECT Q_PROPERTY(int Points READ countPoints CONSTANT) @@ -43,9 +44,13 @@ class MeshGuiExport PropertyMeshKernelItem : public Gui::PropertyEditor::Propert Q_PROPERTY(int Faces READ countFaces CONSTANT) PROPERTYITEM_HEADER - QWidget* createEditor(QWidget* parent, const QObject* receiver, const char* method) const override; - void setEditorData(QWidget *editor, const QVariant& data) const override; - QVariant editorData(QWidget *editor) const override; + // clang-format off + QWidget* createEditor(QWidget* parent, + const QObject* receiver, + const char* method) const override; + // clang-format on + void setEditorData(QWidget* editor, const QVariant& data) const override; + QVariant editorData(QWidget* editor) const override; int countPoints() const; int countEdges() const; @@ -66,8 +71,7 @@ private: Gui::PropertyEditor::PropertyIntegerItem* m_f; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_PROPERTYEDITOR_MESH_H - +#endif // MESHGUI_PROPERTYEDITOR_MESH_H diff --git a/src/Mod/Mesh/Gui/RemeshGmsh.cpp b/src/Mod/Mesh/Gui/RemeshGmsh.cpp index f6b80871d6..7632035553 100644 --- a/src/Mod/Mesh/Gui/RemeshGmsh.cpp +++ b/src/Mod/Mesh/Gui/RemeshGmsh.cpp @@ -22,10 +22,10 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include +#include +#include +#include +#include #endif #include @@ -43,15 +43,17 @@ using namespace MeshGui; -class GmshWidget::Private { +class GmshWidget::Private +{ public: explicit Private(QWidget* parent) - : gmsh(parent) + : gmsh(parent) { /* coverity[uninit_ctor] Members of ui are set in setupUI() */ } - void appendText(const QString& text, bool error) { + void appendText(const QString& text, bool error) + { syntax->setParagraphType(error ? Gui::DockWnd::ReportHighlighter::Error : Gui::DockWnd::ReportHighlighter::Message); QTextCursor cursor(ui.outputWindow->document()); @@ -71,8 +73,8 @@ public: }; GmshWidget::GmshWidget(QWidget* parent, Qt::WindowFlags fl) - : QWidget(parent, fl) - , d(new Private(parent)) + : QWidget(parent, fl) + , d(new Private(parent)) { d->ui.setupUi(this); setupConnections(); @@ -82,7 +84,8 @@ GmshWidget::GmshWidget(QWidget* parent, Qt::WindowFlags fl) // 2D Meshing algorithms // https://gmsh.info/doc/texinfo/gmsh.html#index-Mesh_002eAlgorithm - enum { + enum + { MeshAdapt = 1, Automatic = 2, Delaunay = 5, @@ -108,6 +111,7 @@ GmshWidget::~GmshWidget() void GmshWidget::setupConnections() { + // clang-format off connect(&d->gmsh, &QProcess::started, this, &GmshWidget::started); connect(&d->gmsh, qOverload(&QProcess::finished), this, &GmshWidget::finished); @@ -121,9 +125,10 @@ void GmshWidget::setupConnections() this, &GmshWidget::onKillButtonClicked); connect(d->ui.clearButton, &QPushButton::clicked, this, &GmshWidget::onClearButtonClicked); + // clang-format on } -void GmshWidget::changeEvent(QEvent *e) +void GmshWidget::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { d->ui.retranslateUi(this); @@ -177,12 +182,8 @@ void GmshWidget::accept() // ./gmsh - -bin -2 /tmp/mesh.geo -o /tmp/best.stl QString proc = d->ui.fileChooser->fileName(); QStringList args; - args << QLatin1String("-") - << QLatin1String("-bin") - << QLatin1String("-2") - << inpFile - << QLatin1String("-o") - << outFile; + args << QLatin1String("-") << QLatin1String("-bin") << QLatin1String("-2") << inpFile + << QLatin1String("-o") << outFile; d->gmsh.start(proc, args); d->time.start(); @@ -239,10 +240,12 @@ void GmshWidget::started() void GmshWidget::finished(int /*exitCode*/, QProcess::ExitStatus exitStatus) { d->ui.killButton->setDisabled(true); - if (d->label) + if (d->label) { d->label->close(); + } - d->ui.labelTime->setText(QString::fromLatin1("%1 %2 ms").arg(tr("Time:")).arg(d->time.elapsed())); + d->ui.labelTime->setText( + QString::fromLatin1("%1 %2 ms").arg(tr("Time:")).arg(d->time.elapsed())); if (exitStatus == QProcess::NormalExit) { loadOutput(); } @@ -252,11 +255,11 @@ void GmshWidget::errorOccurred(QProcess::ProcessError error) { QString msg; switch (error) { - case QProcess::FailedToStart: - msg = tr("Failed to start"); - break; - default: - break; + case QProcess::FailedToStart: + msg = tr("Failed to start"); + break; + default: + break; } if (!msg.isEmpty()) { @@ -271,12 +274,12 @@ void GmshWidget::reject() // ------------------------------------------------- -class RemeshGmsh::Private { +class RemeshGmsh::Private +{ public: explicit Private(Mesh::Feature* mesh) - : mesh(mesh) - { - } + : mesh(mesh) + {} public: App::DocumentObjectWeakPtrT mesh; @@ -286,8 +289,8 @@ public: }; RemeshGmsh::RemeshGmsh(Mesh::Feature* mesh, QWidget* parent, Qt::WindowFlags fl) - : GmshWidget(parent, fl) - , d(new Private(mesh)) + : GmshWidget(parent, fl) + , d(new Private(mesh)) { // Copy mesh that is used each time when applying Gmsh's remeshing function d->copy = mesh->Mesh.getValue().getKernel(); @@ -299,6 +302,7 @@ RemeshGmsh::~RemeshGmsh() = default; bool RemeshGmsh::writeProject(QString& inpFile, QString& outFile) { + // clang-format off if (!d->mesh.expired()) { Base::FileInfo stl(d->stlFile); MeshCore::MeshOutput output(d->copy); @@ -358,12 +362,14 @@ bool RemeshGmsh::writeProject(QString& inpFile, QString& outFile) } return false; + // clang-format on } bool RemeshGmsh::loadOutput() { - if (d->mesh.expired()) + if (d->mesh.expired()) { return false; + } // Now read-in modified mesh Base::FileInfo stl(d->stlFile); @@ -394,8 +400,7 @@ bool RemeshGmsh::loadOutput() TaskRemeshGmsh::TaskRemeshGmsh(Mesh::Feature* mesh) { widget = new RemeshGmsh(mesh); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/Mesh/Gui/RemeshGmsh.h b/src/Mod/Mesh/Gui/RemeshGmsh.h index 6a7f6f725b..c00c7fc833 100644 --- a/src/Mod/Mesh/Gui/RemeshGmsh.h +++ b/src/Mod/Mesh/Gui/RemeshGmsh.h @@ -23,30 +23,33 @@ #ifndef MESHGUI_REMESHGMSH_H #define MESHGUI_REMESHGMSH_H -#include #include #include +#include #include #include #include -namespace Mesh { +namespace Mesh +{ class Feature; } -namespace Gui { +namespace Gui +{ class StatusWidget; } -namespace MeshGui { +namespace MeshGui +{ /** * Non-modal dialog to remesh an existing mesh. * @author Werner Mayer */ -class MeshGuiExport GmshWidget : public QWidget +class MeshGuiExport GmshWidget: public QWidget { Q_OBJECT @@ -57,7 +60,7 @@ public: void reject(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; int meshingAlgorithm() const; double getAngle() const; double getMaxSize() const; @@ -85,12 +88,14 @@ private: * Non-modal dialog to remesh an existing mesh. * @author Werner Mayer */ -class MeshGuiExport RemeshGmsh : public GmshWidget +class MeshGuiExport RemeshGmsh: public GmshWidget { Q_OBJECT public: - explicit RemeshGmsh(Mesh::Feature* mesh, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); + explicit RemeshGmsh(Mesh::Feature* mesh, + QWidget* parent = nullptr, + Qt::WindowFlags fl = Qt::WindowFlags()); ~RemeshGmsh() override; protected: @@ -105,7 +110,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskRemeshGmsh : public Gui::TaskView::TaskDialog +class TaskRemeshGmsh: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -116,15 +121,19 @@ public: void clicked(int) override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Apply | QDialogButtonBox::Close; } + { + return QDialogButtonBox::Apply | QDialogButtonBox::Close; + } bool isAllowedAlterDocument() const override - { return true; } + { + return true; + } private: RemeshGmsh* widget; Gui::TaskView::TaskBox* taskbox; }; -} +} // namespace MeshGui -#endif // MESHGUI_REMESHGMSH_H +#endif // MESHGUI_REMESHGMSH_H diff --git a/src/Mod/Mesh/Gui/RemoveComponents.cpp b/src/Mod/Mesh/Gui/RemoveComponents.cpp index e39ab61cac..3857897640 100644 --- a/src/Mod/Mesh/Gui/RemoveComponents.cpp +++ b/src/Mod/Mesh/Gui/RemoveComponents.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -36,7 +36,7 @@ using namespace MeshGui; RemoveComponents::RemoveComponents(QWidget* parent, Qt::WindowFlags fl) - : QWidget(parent, fl) + : QWidget(parent, fl) { ui = new Ui_RemoveComponents; ui->setupUi(this); @@ -60,6 +60,7 @@ RemoveComponents::~RemoveComponents() void RemoveComponents::setupConnections() { + // clang-format off connect(ui->selectRegion, &QPushButton::clicked, this, &RemoveComponents::onSelectRegionClicked); connect(ui->selectAll, &QPushButton::clicked, @@ -84,9 +85,10 @@ void RemoveComponents::setupConnections() this, &RemoveComponents::onSelectCompToggled); connect(ui->cbDeselectComp, &QCheckBox::toggled, this, &RemoveComponents::onDeselectCompToggled); + // clang-format on } -void RemoveComponents::changeEvent(QEvent *e) +void RemoveComponents::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -153,15 +155,18 @@ void RemoveComponents::onDeselectCompToggled(bool on) void RemoveComponents::deleteSelection() { Gui::Document* doc = Gui::Application::Instance->activeDocument(); - if (!doc) + if (!doc) { return; + } // delete all selected faces doc->openCommand(QT_TRANSLATE_NOOP("Command", "Delete selection")); bool ok = meshSel.deleteSelection(); - if (!ok) + if (!ok) { doc->abortCommand(); - else + } + else { doc->commitCommand(); + } } void RemoveComponents::invertSelection() @@ -191,21 +196,19 @@ void RemoveComponents::reject() // ------------------------------------------------- RemoveComponentsDialog::RemoveComponentsDialog(QWidget* parent, Qt::WindowFlags fl) - : QDialog(parent, fl) + : QDialog(parent, fl) { widget = new RemoveComponents(this); this->setWindowTitle(widget->windowTitle()); QVBoxLayout* hboxLayout = new QVBoxLayout(this); QDialogButtonBox* buttonBox = new QDialogButtonBox(this); - buttonBox->setStandardButtons(QDialogButtonBox::Close|QDialogButtonBox::Ok); + buttonBox->setStandardButtons(QDialogButtonBox::Close | QDialogButtonBox::Ok); QPushButton* okButton = buttonBox->button(QDialogButtonBox::Ok); okButton->setText(MeshGui::TaskRemoveComponents::tr("Delete")); - buttonBox->addButton(MeshGui::TaskRemoveComponents::tr("Invert"), - QDialogButtonBox::ActionRole); + buttonBox->addButton(MeshGui::TaskRemoveComponents::tr("Invert"), QDialogButtonBox::ActionRole); - connect(buttonBox, &QDialogButtonBox::clicked, - this, &RemoveComponentsDialog::clicked); + connect(buttonBox, &QDialogButtonBox::clicked, this, &RemoveComponentsDialog::clicked); hboxLayout->addWidget(widget); hboxLayout->addWidget(buttonBox); @@ -241,8 +244,7 @@ void RemoveComponentsDialog::clicked(QAbstractButton* btn) TaskRemoveComponents::TaskRemoveComponents() { widget = new RemoveComponents(); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/Mesh/Gui/RemoveComponents.h b/src/Mod/Mesh/Gui/RemoveComponents.h index 8647c85cc9..f71c52ef31 100644 --- a/src/Mod/Mesh/Gui/RemoveComponents.h +++ b/src/Mod/Mesh/Gui/RemoveComponents.h @@ -24,13 +24,14 @@ #ifndef MESHGUI_REMOVECOMPONENTS_H #define MESHGUI_REMOVECOMPONENTS_H -#include +#include "MeshSelection.h" #include #include #include -#include "MeshSelection.h" +#include -namespace MeshGui { +namespace MeshGui +{ class Ui_RemoveComponents; /** @@ -38,7 +39,7 @@ class Ui_RemoveComponents; * of a mesh and delete them. * @author Werner Mayer */ -class MeshGuiExport RemoveComponents : public QWidget +class MeshGuiExport RemoveComponents: public QWidget { Q_OBJECT @@ -64,7 +65,7 @@ public: void onDeselectCompToggled(bool); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: void setupConnections(); @@ -77,12 +78,13 @@ private: /** * Embed the panel into a dialog. */ -class MeshGuiExport RemoveComponentsDialog : public QDialog +class MeshGuiExport RemoveComponentsDialog: public QDialog { Q_OBJECT public: - explicit RemoveComponentsDialog(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); + explicit RemoveComponentsDialog(QWidget* parent = nullptr, + Qt::WindowFlags fl = Qt::WindowFlags()); ~RemoveComponentsDialog() override; void reject() override; @@ -96,7 +98,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskRemoveComponents : public Gui::TaskView::TaskDialog +class TaskRemoveComponents: public Gui::TaskView::TaskDialog { Q_OBJECT @@ -108,9 +110,13 @@ public: void clicked(int) override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Close; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Close; + } bool isAllowedAlterDocument() const override - { return true; } + { + return true; + } void modifyStandardButtons(QDialogButtonBox*) override; private: @@ -118,6 +124,6 @@ private: Gui::TaskView::TaskBox* taskbox; }; -} +} // namespace MeshGui -#endif // MESHGUI_REMOVECOMPONENTS_H +#endif // MESHGUI_REMOVECOMPONENTS_H diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_af.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_af.ts index f3c19db6bb..8527b40f36 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_af.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_af.ts @@ -1102,7 +1102,7 @@ Check failed due to folds on the surface. Please run the command to repair folds first - Kontrole het misluk weens voue op die oppervlak. + Kontrole het misluk weens voue op die oppervlak. Gee eers die opdrag om die voue te herstel diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts index ad76a0fbb3..4d47e5f009 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_be.ts @@ -1348,12 +1348,12 @@ Always export mesh as model type in 3MF format even if not a solid - Always export mesh as model type in 3MF format even if not a solid + Заўсёды экспартаваць паліганальную сетку як тып мадэлі ў фармаце 3MF, нават калі яна не суцэльная Export 3MF files as model type - Export 3MF files as model type + Экспартаваць файлы 3mf як тып мадэлі diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts index 90e4d174b9..bf510bab2e 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ca.ts @@ -1489,7 +1489,7 @@ Amb un ombrejat pla, les normals de la superfície no es defineixen per vèrtex If face angle < crease angle, smooth shading is used L’angle de plec és un angle llindar entre dues cares. -Si l'angle de la cara ≥ l'angle de plec, s'utilitza l'ombrejat de facetes +Si l'angle de la cara ≥ l'angle de plec, s'utilitza l'ombrejat de facetes Si angle de la cara < l'angle de plec, s'utilitza un ombrejat suau diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts index 6745b44bcd..3100d092e9 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_cs.ts @@ -2333,7 +2333,7 @@ Prosím navštivte http://www.openscad.org/index.html a nainstalujte ho. Annotation - Vysvětlivka + Poznámka diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts index 4f13b9c8e2..87416bb52b 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_de.ts @@ -1838,7 +1838,7 @@ Flächenwinkel < SickenWinkel, wird glattes Schattieren angewendet Minimum number of faces - Minimale Anzahl von Dreiecken + Mindestanzahl von Dreiecken @@ -1913,7 +1913,7 @@ Flächenwinkel < SickenWinkel, wird glattes Schattieren angewendet Minimum number of faces - Minimale Anzahl von Dreiecken + Mindestanzahl von Dreiecken diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts index bca1b3c3e9..35fc996a4a 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-AR.ts @@ -1353,7 +1353,7 @@ Export 3MF files as model type - Export 3MF files as model type + Exportar archivos 3MF como tipo de modelo diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts index 7d7a18c5e7..a33bb0a8be 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_es-ES.ts @@ -1353,7 +1353,7 @@ Export 3MF files as model type - Export 3MF files as model type + Exportar archivos 3MF como tipo de modelo diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts index 3919c4511e..2e6e60e82f 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_eu.ts @@ -1348,12 +1348,12 @@ Always export mesh as model type in 3MF format even if not a solid - Always export mesh as model type in 3MF format even if not a solid + Beti esportatu amarauna eredu mota gisa 3MF formatuan, baita solidoa ez bada ere Export 3MF files as model type - Export 3MF files as model type + Esportatu 3MF fitxategiak eredu mota gisa diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts index 65dd87c838..d207914dec 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fi.ts @@ -1369,7 +1369,7 @@ This parameter indicates whether ZIP compression is used when writing a file in AMF format - Tämä parametri ilmaisee, on ZIP pakkaaminen + Tämä parametri ilmaisee, on ZIP pakkaaminen käytössä kirjoitettaessa tiedostoa AMF muodossa @@ -1428,7 +1428,7 @@ If not checked, it depends on the option "Enable backlight color" will be used or black. Pinnan alareuna on renderöity samalla tavalla kuin yläpuolella. Jos ei ole valittuna, se riippuu vaihtoehdosta "Ota taustavalo väri käyttöön" -(asetruksien osiossa Näyttö -> 3D Näkymä). Joko taustavalon väriä +(asetruksien osiossa Näyttö -> 3D Näkymä). Joko taustavalon väriä käytetään tai se on musta. @@ -2083,7 +2083,7 @@ sileämpään ulkonäköön. OpenSCAD cannot be found on your system. Please visit http://www.openscad.org/index.html to install it. - OpenSCAD:ia ei löydy järjestelmästäsi. Käy + OpenSCAD:ia ei löydy järjestelmästäsi. Käy http://www.openscad.org/index.html asentaaksesi sen. diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts index 90610dd612..82a81ab74c 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_fr.ts @@ -1348,12 +1348,12 @@ Always export mesh as model type in 3MF format even if not a solid - Always export mesh as model type in 3MF format even if not a solid + Toujours exporter le maillage comme type de modèle au format 3MF même si ce n'est pas un solide Export 3MF files as model type - Export 3MF files as model type + Exporter les fichiers 3MF comme type de modèle diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts index 4aeebcb54b..59f71d5591 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_hr.ts @@ -1427,7 +1427,7 @@ If not checked, it depends on the option "Enable backlight color" will be used or black. Donja strana površine bit će prikazana na isti način kao gornja strana. Ako nije potvrđeno, ovisi o opciji "Omogući boju pozadinskog osvjetljenja" -(odjeljak postavki prikaza -> 3D prikaz). Koristit će se boja pozadinskog +(odjeljak postavki prikaza -> 3D prikaz). Koristit će se boja pozadinskog osvjetljenja ili crno. @@ -2084,7 +2084,7 @@ vodi do uglađenijeg izgleda. OpenSCAD cannot be found on your system. Please visit http://www.openscad.org/index.html to install it. - OpenSCAD nije moguće pronaći na vašem sustavu. + OpenSCAD nije moguće pronaći na vašem sustavu. Posjetite http://www.openscad.org/index.html da biste ga instalirali. diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts index 71b6ac6a13..51ab40647e 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ka.ts @@ -1348,12 +1348,12 @@ Always export mesh as model type in 3MF format even if not a solid - Always export mesh as model type in 3MF format even if not a solid + 3MF ფორმატში ბადის მოდელის ტიპად გატანა მაშინაც კი, როცა ის მყარი სხეული არაა Export 3MF files as model type - Export 3MF files as model type + 3MF ფაილების გატანა მოდელის ტიპად @@ -1369,7 +1369,7 @@ This parameter indicates whether ZIP compression is used when writing a file in AMF format - ეს პარამეტრი განსაზღვრავს ჩართულია თუ არა + ეს პარამეტრი განსაზღვრავს ჩართულია თუ არა ZIP კომპრესია AMF ფაილის ფორმატის ჩაწერის დროს diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts index fb087110de..a3096f30eb 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_nl.ts @@ -1464,7 +1464,7 @@ to a smoother appearance. Als deze optie is ingesteld, wordt de Phong-beschaduwing gebruikt, anders vlakke schaduwen. De beschaduwing bepaalt het uiterlijk van de oppervlakken. -Bij vlakke beschaduwingen worden de oppervlaktenormen niet per eindpunt gedefinieerd, wat leidt +Bij vlakke beschaduwingen worden de oppervlaktenormen niet per eindpunt gedefinieerd, wat leidt tot een onrealistisch uiterlijk voor gebogen oppervlakken, terwijl het gebruik van Phong-beschaduwing tot een gladder uiterlijk leidt. diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts index 600dfe871f..69ce210e9b 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_pl.ts @@ -1348,12 +1348,12 @@ Always export mesh as model type in 3MF format even if not a solid - Always export mesh as model type in 3MF format even if not a solid + Zawsze eksportuj siatkę jako model w formacie 3MF, nawet jeśli nie jest bryłą Export 3MF files as model type - Export 3MF files as model type + Eksportuj pliki 3MF jako typ modelu @@ -2083,7 +2083,7 @@ do gładszego wyglądu. OpenSCAD cannot be found on your system. Please visit http://www.openscad.org/index.html to install it. - OpenSCAD nie został odnaleziony w Twoim systemie. + OpenSCAD nie został odnaleziony w Twoim systemie. Odwiedź http://www.openscad.org/index.html żeby go zainstalować. diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts index ee0eb06797..628065406a 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_ru.ts @@ -1348,12 +1348,12 @@ Always export mesh as model type in 3MF format even if not a solid - Always export mesh as model type in 3MF format even if not a solid + Всегда экспортируйте сетку как тип модели в формате 3MF, даже если она не является твердой Export 3MF files as model type - Export 3MF files as model type + Экспортировать 3MF файлы как тип модели diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts index a777ea268b..f0536595f9 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr-CS.ts @@ -1428,7 +1428,7 @@ If not checked, it depends on the option "Enable backlight color" will be used or black. Donja strana površine će biti prikazana na isti način kao gornja strana. Ako nije čekirano, zavisi od opcije „Omogući boju pozadinskog osvetljenja“ -(Podešavanja -> Prikaz -> 3D prikaz). Ili će se koristiti boja pozadinskog +(Podešavanja -> Prikaz -> 3D prikaz). Ili će se koristiti boja pozadinskog osvetljenja ili crna boja. diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts index 158505669f..dc612350a1 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_sr.ts @@ -1428,7 +1428,7 @@ If not checked, it depends on the option "Enable backlight color" will be used or black. Доња страна површине ће бити приказана на исти начин као горња страна. Ако није чекирано, зависи од опције „Омогући боју позадинског осветљења“ -(Подешавања -> Приказ -> 3Д приказ). Или ће се користити боја позадинског +(Подешавања -> Приказ -> 3Д приказ). Или ће се користити боја позадинског осветљења или црна боја. diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts index 0a32be1c8e..b42347e297 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_uk.ts @@ -1464,7 +1464,7 @@ to a smoother appearance. Затінення визначає зовнішній вигляд поверхонь. При плоскому затіненні поверхневих стандартів не визначаються для кожної вершини, що веде -до уявного вигляду для криволінійних поверхонь під час використання відтінків Phong +до уявного вигляду для криволінійних поверхонь під час використання відтінків Phong до більш гладкого вигляду. diff --git a/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts b/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts index b161f63872..cb9256b114 100644 --- a/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts +++ b/src/Mod/Mesh/Gui/Resources/translations/Mesh_val-ES.ts @@ -1489,7 +1489,7 @@ Amb un ombrejat pla, les normals de la superfície no es defineixen per vèrtex If face angle < crease angle, smooth shading is used L’angle de plec és un angle llindar entre dues cares. -Si l'angle de la cara ≥ l'angle de plec, s'utilitza l'ombrejat de facetes +Si l'angle de la cara ≥ l'angle de plec, s'utilitza l'ombrejat de facetes Si angle de la cara < l'angle de plec, s'utilitza un ombrejat suau diff --git a/src/Mod/Mesh/Gui/Segmentation.cpp b/src/Mod/Mesh/Gui/Segmentation.cpp index 1e2bc7edcf..434a294f53 100644 --- a/src/Mod/Mesh/Gui/Segmentation.cpp +++ b/src/Mod/Mesh/Gui/Segmentation.cpp @@ -22,7 +22,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif #include @@ -40,7 +40,8 @@ using namespace MeshGui; Segmentation::Segmentation(Mesh::Feature* mesh, QWidget* parent, Qt::WindowFlags fl) - : QWidget(parent, fl), myMesh(mesh) + : QWidget(parent, fl) + , myMesh(mesh) { ui = new Ui_Segmentation; ui->setupUi(this); @@ -83,22 +84,34 @@ void Segmentation::accept() std::vector segm; if (ui->groupBoxFree->isChecked()) { - segm.emplace_back(std::make_shared - (meshCurv.GetCurvature(), ui->numFree->value(), - ui->tol1Free->value(), ui->tol2Free->value(), - ui->crv1Free->value(), ui->crv2Free->value())); + segm.emplace_back( + std::make_shared(meshCurv.GetCurvature(), + ui->numFree->value(), + ui->tol1Free->value(), + ui->tol2Free->value(), + ui->crv1Free->value(), + ui->crv2Free->value())); } if (ui->groupBoxCyl->isChecked()) { - segm.emplace_back(std::make_shared - (meshCurv.GetCurvature(), ui->numCyl->value(), ui->tol1Cyl->value(), ui->tol2Cyl->value(), ui->crvCyl->value())); + segm.emplace_back( + std::make_shared(meshCurv.GetCurvature(), + ui->numCyl->value(), + ui->tol1Cyl->value(), + ui->tol2Cyl->value(), + ui->crvCyl->value())); } if (ui->groupBoxSph->isChecked()) { - segm.emplace_back(std::make_shared - (meshCurv.GetCurvature(), ui->numSph->value(), ui->tolSph->value(), ui->crvSph->value())); + segm.emplace_back( + std::make_shared(meshCurv.GetCurvature(), + ui->numSph->value(), + ui->tolSph->value(), + ui->crvSph->value())); } if (ui->groupBoxPln->isChecked()) { - segm.emplace_back(std::make_shared - (meshCurv.GetCurvature(), ui->numPln->value(), ui->tolPln->value())); + segm.emplace_back( + std::make_shared(meshCurv.GetCurvature(), + ui->numPln->value(), + ui->tolPln->value())); } finder.FindSegments(segm); @@ -107,16 +120,17 @@ void Segmentation::accept() std::string internalname = "Segments_"; internalname += myMesh->getNameInDocument(); - App::DocumentObjectGroup* group = static_cast(document->addObject - ("App::DocumentObjectGroup", internalname.c_str())); + App::DocumentObjectGroup* group = static_cast( + document->addObject("App::DocumentObjectGroup", internalname.c_str())); std::string labelname = "Segments "; labelname += myMesh->Label.getValue(); group->Label.setValue(labelname); - for (const auto & it : segm) { + for (const auto& it : segm) { const std::vector& data = it->GetSegments(); - for (const auto & jt : data) { + for (const auto& jt : data) { Mesh::MeshObject* segment = mesh->meshFromSegment(jt); - Mesh::Feature* feaSegm = static_cast(group->addObject("Mesh::Feature", "Segment")); + Mesh::Feature* feaSegm = + static_cast(group->addObject("Mesh::Feature", "Segment")); Mesh::MeshObject* feaMesh = feaSegm->Mesh.startEditing(); feaMesh->swap(*segment); feaSegm->Mesh.finishEditing(); @@ -130,7 +144,7 @@ void Segmentation::accept() document->commitTransaction(); } -void Segmentation::changeEvent(QEvent *e) +void Segmentation::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -145,8 +159,7 @@ void Segmentation::changeEvent(QEvent *e) TaskSegmentation::TaskSegmentation(Mesh::Feature* mesh) { widget = new Segmentation(mesh); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/Mesh/Gui/Segmentation.h b/src/Mod/Mesh/Gui/Segmentation.h index 4ea53397b7..17c3c5235d 100644 --- a/src/Mod/Mesh/Gui/Segmentation.h +++ b/src/Mod/Mesh/Gui/Segmentation.h @@ -28,25 +28,31 @@ #include #include #ifndef MESH_GLOBAL_H -# include +#include #endif // forward declarations -namespace Mesh { class Feature; } +namespace Mesh +{ +class Feature; +} -namespace MeshGui { +namespace MeshGui +{ class Ui_Segmentation; -class MeshGuiExport Segmentation : public QWidget +class MeshGuiExport Segmentation: public QWidget { public: - explicit Segmentation(Mesh::Feature* mesh, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); + explicit Segmentation(Mesh::Feature* mesh, + QWidget* parent = nullptr, + Qt::WindowFlags fl = Qt::WindowFlags()); ~Segmentation() override; void accept(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: Ui_Segmentation* ui; @@ -56,7 +62,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskSegmentation : public Gui::TaskView::TaskDialog +class TaskSegmentation: public Gui::TaskView::TaskDialog { public: explicit TaskSegmentation(Mesh::Feature* mesh); @@ -65,13 +71,15 @@ public: bool accept() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: Segmentation* widget; Gui::TaskView::TaskBox* taskbox; }; -} +} // namespace MeshGui -#endif // MESHGUI_SEGMENTATION_H +#endif // MESHGUI_SEGMENTATION_H diff --git a/src/Mod/Mesh/Gui/SegmentationBestFit.cpp b/src/Mod/Mesh/Gui/SegmentationBestFit.cpp index a1a3efe8d3..c7c8acc9a1 100644 --- a/src/Mod/Mesh/Gui/SegmentationBestFit.cpp +++ b/src/Mod/Mesh/Gui/SegmentationBestFit.cpp @@ -22,13 +22,13 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -46,13 +46,15 @@ using namespace MeshGui; -namespace MeshGui { -class PlaneFitParameter : public FitParameter +namespace MeshGui +{ +class PlaneFitParameter: public FitParameter { public: PlaneFitParameter() = default; ~PlaneFitParameter() override = default; - std::vector getParameter(FitParameter::Points pts) const override { + std::vector getParameter(FitParameter::Points pts) const override + { std::vector values; MeshCore::PlaneFit fit; fit.AddPoints(pts.points); @@ -70,12 +72,13 @@ public: } }; -class CylinderFitParameter : public FitParameter +class CylinderFitParameter: public FitParameter { public: CylinderFitParameter() = default; ~CylinderFitParameter() override = default; - std::vector getParameter(FitParameter::Points pts) const override { + std::vector getParameter(FitParameter::Points pts) const override + { std::vector values; MeshCore::CylinderFit fit; fit.AddPoints(pts.points); @@ -106,16 +109,26 @@ public: // Only for testing purposes try { float height = Base::Distance(base, top); - Gui::Command::doCommand(Gui::Command::App, - "cyl = App.ActiveDocument.addObject('Part::Cylinder', 'Cylinder')\n" - "cyl.Radius = %f\n" - "cyl.Height = %f\n" - "cyl.Placement = App.Placement(App.Vector(%f,%f,%f), App.Rotation(App.Vector(0,0,1), App.Vector(%f,%f,%f)))\n", - radius, height, base.x, base.y, base.z, axis.x, axis.y, axis.z); + Gui::Command::doCommand( + Gui::Command::App, + "cyl = App.ActiveDocument.addObject('Part::Cylinder', 'Cylinder')\n" + "cyl.Radius = %f\n" + "cyl.Height = %f\n" + "cyl.Placement = App.Placement(App.Vector(%f,%f,%f), " + "App.Rotation(App.Vector(0,0,1), App.Vector(%f,%f,%f)))\n", + radius, + height, + base.x, + base.y, + base.z, + axis.x, + axis.y, + axis.z); - Gui::Command::doCommand(Gui::Command::App, - "axis = cyl.Placement.Rotation.multVec(App.Vector(0,0,1))\n" - "print('Final axis: ({}, {}, {})'.format(axis.x, axis.y, axis.z))\n"); + Gui::Command::doCommand( + Gui::Command::App, + "axis = cyl.Placement.Rotation.multVec(App.Vector(0,0,1))\n" + "print('Final axis: ({}, {}, {})'.format(axis.x, axis.y, axis.z))\n"); } catch (...) { } @@ -125,12 +138,13 @@ public: } }; -class SphereFitParameter : public FitParameter +class SphereFitParameter: public FitParameter { public: SphereFitParameter() = default; ~SphereFitParameter() override = default; - std::vector getParameter(FitParameter::Points pts) const override { + std::vector getParameter(FitParameter::Points pts) const override + { std::vector values; MeshCore::SphereFit fit; fit.AddPoints(pts.points); @@ -145,10 +159,12 @@ public: return values; } }; -} +} // namespace MeshGui -ParametersDialog::ParametersDialog(std::vector& val, FitParameter* fitPar, - ParameterList par, Mesh::Feature* mesh, +ParametersDialog::ParametersDialog(std::vector& val, + FitParameter* fitPar, + ParameterList par, + Mesh::Feature* mesh, QWidget* parent) : QDialog(parent) , values(val) @@ -158,54 +174,54 @@ ParametersDialog::ParametersDialog(std::vector& val, FitParameter* fitPar { this->setWindowTitle(tr("Surface fit")); - QGridLayout *gridLayout; + QGridLayout* gridLayout; gridLayout = new QGridLayout(this); - QGroupBox *groupBox; + QGroupBox* groupBox; groupBox = new QGroupBox(this); groupBox->setTitle(tr("Parameters")); gridLayout->addWidget(groupBox, 0, 0, 1, 1); - QGroupBox *selectBox; + QGroupBox* selectBox; selectBox = new QGroupBox(this); selectBox->setTitle(tr("Selection")); gridLayout->addWidget(selectBox, 1, 0, 1, 1); - QVBoxLayout *selectLayout; + QVBoxLayout* selectLayout; selectLayout = new QVBoxLayout(selectBox); - QPushButton *regionButton; + QPushButton* regionButton; regionButton = new QPushButton(this); regionButton->setText(tr("Region")); regionButton->setObjectName(QString::fromLatin1("region")); selectLayout->addWidget(regionButton); - QPushButton *singleButton; + QPushButton* singleButton; singleButton = new QPushButton(this); singleButton->setText(tr("Triangle")); singleButton->setObjectName(QString::fromLatin1("single")); selectLayout->addWidget(singleButton); - QPushButton *clearButton; + QPushButton* clearButton; clearButton = new QPushButton(this); clearButton->setText(tr("Clear")); clearButton->setObjectName(QString::fromLatin1("clear")); selectLayout->addWidget(clearButton); - QPushButton *computeButton; + QPushButton* computeButton; computeButton = new QPushButton(this); computeButton->setText(tr("Compute")); computeButton->setObjectName(QString::fromLatin1("compute")); gridLayout->addWidget(computeButton, 2, 0, 1, 1); - QDialogButtonBox *buttonBox; + QDialogButtonBox* buttonBox; buttonBox = new QDialogButtonBox(this); buttonBox->setOrientation(Qt::Horizontal); - buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); gridLayout->addWidget(buttonBox, 3, 0, 1, 1); int index = 0; - QGridLayout *layout; + QGridLayout* layout; layout = new QGridLayout(groupBox); for (const auto& it : parameter) { QLabel* label = new QLabel(groupBox); @@ -221,12 +237,14 @@ ParametersDialog::ParametersDialog(std::vector& val, FitParameter* fitPar ++index; } + // clang-format off connect(buttonBox, &QDialogButtonBox::accepted, this, &ParametersDialog::accept); connect(buttonBox, &QDialogButtonBox::rejected, this, &ParametersDialog::reject); connect(regionButton, &QPushButton::clicked, this, &ParametersDialog::onRegionClicked); connect(singleButton, &QPushButton::clicked, this, &ParametersDialog::onSingleClicked); connect(clearButton, &QPushButton::clicked, this, &ParametersDialog::onClearClicked); connect(computeButton, &QPushButton::clicked, this, &ParametersDialog::onComputeClicked); + // clang-format on Gui::SelectionObject obj(mesh); std::vector sel; @@ -277,7 +295,7 @@ void ParametersDialog::onComputeClicked() values = fitParameter->getParameter(fitpts); if (values.size() == spinBoxes.size()) { - for (std::size_t i=0; isetValue(values[i]); } } @@ -285,15 +303,18 @@ void ParametersDialog::onComputeClicked() meshSel.clearSelection(); } else { - QMessageBox::warning(this, tr("No selection"), tr("Before fitting the surface select an area.")); + QMessageBox::warning(this, + tr("No selection"), + tr("Before fitting the surface select an area.")); } } void ParametersDialog::accept() { std::vector v; - for (auto it : spinBoxes) + for (auto it : spinBoxes) { v.push_back(it->value()); + } values = v; QDialog::accept(); } @@ -309,7 +330,8 @@ void ParametersDialog::reject() /* TRANSLATOR MeshGui::SegmentationBestFit */ SegmentationBestFit::SegmentationBestFit(Mesh::Feature* mesh, QWidget* parent, Qt::WindowFlags fl) - : QWidget(parent, fl), myMesh(mesh) + : QWidget(parent, fl) + , myMesh(mesh) { ui = new Ui_SegmentationBestFit; ui->setupUi(this); @@ -336,12 +358,14 @@ SegmentationBestFit::~SegmentationBestFit() void SegmentationBestFit::setupConnections() { + // clang-format off connect(ui->planeParameters, &QPushButton::clicked, this, &SegmentationBestFit::onPlaneParametersClicked); connect(ui->cylinderParameters, &QPushButton::clicked, this, &SegmentationBestFit::onCylinderParametersClicked); connect(ui->sphereParameters, &QPushButton::clicked, this, &SegmentationBestFit::onSphereParametersClicked); + // clang-format on } void SegmentationBestFit::onPlaneParametersClicked() @@ -362,10 +386,9 @@ void SegmentationBestFit::onPlaneParametersClicked() list.push_back(std::make_pair(axis + z, p[5])); static QPointer dialog = nullptr; - if (!dialog) - dialog = new ParametersDialog(planeParameter, - new PlaneFitParameter, - list, myMesh, this); + if (!dialog) { + dialog = new ParametersDialog(planeParameter, new PlaneFitParameter, list, myMesh, this); + } dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show(); } @@ -387,13 +410,13 @@ void SegmentationBestFit::onCylinderParametersClicked() list.push_back(std::make_pair(axis + x, p[3])); list.push_back(std::make_pair(axis + y, p[4])); list.push_back(std::make_pair(axis + z, p[5])); - list.push_back(std::make_pair(radius, p[6])); + list.push_back(std::make_pair(radius, p[6])); static QPointer dialog = nullptr; - if (!dialog) - dialog = new ParametersDialog(cylinderParameter, - new CylinderFitParameter, - list, myMesh, this); + if (!dialog) { + dialog = + new ParametersDialog(cylinderParameter, new CylinderFitParameter, list, myMesh, this); + } dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show(); } @@ -411,13 +434,12 @@ void SegmentationBestFit::onSphereParametersClicked() list.push_back(std::make_pair(base + x, p[0])); list.push_back(std::make_pair(base + y, p[1])); list.push_back(std::make_pair(base + z, p[2])); - list.push_back(std::make_pair(radius, p[3])); + list.push_back(std::make_pair(radius, p[3])); static QPointer dialog = nullptr; - if (!dialog) - dialog = new ParametersDialog(sphereParameter, - new SphereFitParameter, - list, myMesh, this); + if (!dialog) { + dialog = new ParametersDialog(sphereParameter, new SphereFitParameter, list, myMesh, this); + } dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show(); } @@ -434,44 +456,49 @@ void SegmentationBestFit::accept() MeshCore::AbstractSurfaceFit* fitter; if (cylinderParameter.size() == 7) { std::vector& p = cylinderParameter; - fitter = new MeshCore::CylinderSurfaceFit( - Base::Vector3f(p[0],p[1],p[2]), - Base::Vector3f(p[3],p[4],p[5]), - p[6]); + fitter = new MeshCore::CylinderSurfaceFit(Base::Vector3f(p[0], p[1], p[2]), + Base::Vector3f(p[3], p[4], p[5]), + p[6]); } else { fitter = new MeshCore::CylinderSurfaceFit; } - segm.emplace_back(std::make_shared - (fitter, kernel, ui->numCyl->value(), ui->tolCyl->value())); + segm.emplace_back( + std::make_shared(fitter, + kernel, + ui->numCyl->value(), + ui->tolCyl->value())); } if (ui->groupBoxSph->isChecked()) { MeshCore::AbstractSurfaceFit* fitter; if (sphereParameter.size() == 4) { std::vector& p = sphereParameter; - fitter = new MeshCore::SphereSurfaceFit( - Base::Vector3f(p[0],p[1],p[2]), - p[3]); + fitter = new MeshCore::SphereSurfaceFit(Base::Vector3f(p[0], p[1], p[2]), p[3]); } else { fitter = new MeshCore::SphereSurfaceFit; } - segm.emplace_back(std::make_shared - (fitter, kernel, ui->numSph->value(), ui->tolSph->value())); + segm.emplace_back( + std::make_shared(fitter, + kernel, + ui->numSph->value(), + ui->tolSph->value())); } if (ui->groupBoxPln->isChecked()) { MeshCore::AbstractSurfaceFit* fitter; if (planeParameter.size() == 6) { std::vector& p = planeParameter; - fitter = new MeshCore::PlaneSurfaceFit( - Base::Vector3f(p[0],p[1],p[2]), - Base::Vector3f(p[3],p[4],p[5])); + fitter = new MeshCore::PlaneSurfaceFit(Base::Vector3f(p[0], p[1], p[2]), + Base::Vector3f(p[3], p[4], p[5])); } else { fitter = new MeshCore::PlaneSurfaceFit; } - segm.emplace_back(std::make_shared - (fitter, kernel, ui->numPln->value(), ui->tolPln->value())); + segm.emplace_back( + std::make_shared(fitter, + kernel, + ui->numPln->value(), + ui->tolPln->value())); } finder.FindSegments(segm); @@ -480,16 +507,17 @@ void SegmentationBestFit::accept() std::string internalname = "Segments_"; internalname += myMesh->getNameInDocument(); - App::DocumentObjectGroup* group = static_cast(document->addObject - ("App::DocumentObjectGroup", internalname.c_str())); + App::DocumentObjectGroup* group = static_cast( + document->addObject("App::DocumentObjectGroup", internalname.c_str())); std::string labelname = "Segments "; labelname += myMesh->Label.getValue(); group->Label.setValue(labelname); - for (const auto & it : segm) { + for (const auto& it : segm) { const std::vector& data = it->GetSegments(); - for (const auto & jt : data) { + for (const auto& jt : data) { Mesh::MeshObject* segment = mesh->meshFromSegment(jt); - Mesh::Feature* feaSegm = static_cast(group->addObject("Mesh::Feature", "Segment")); + Mesh::Feature* feaSegm = + static_cast(group->addObject("Mesh::Feature", "Segment")); Mesh::MeshObject* feaMesh = feaSegm->Mesh.startEditing(); feaMesh->swap(*segment); feaSegm->Mesh.finishEditing(); @@ -503,7 +531,7 @@ void SegmentationBestFit::accept() document->commitTransaction(); } -void SegmentationBestFit::changeEvent(QEvent *e) +void SegmentationBestFit::changeEvent(QEvent* e) { if (e->type() == QEvent::LanguageChange) { ui->retranslateUi(this); @@ -518,8 +546,7 @@ void SegmentationBestFit::changeEvent(QEvent *e) TaskSegmentationBestFit::TaskSegmentationBestFit(Mesh::Feature* mesh) { widget = new SegmentationBestFit(mesh); - taskbox = new Gui::TaskView::TaskBox( - QPixmap(), widget->windowTitle(), false, nullptr); + taskbox = new Gui::TaskView::TaskBox(QPixmap(), widget->windowTitle(), false, nullptr); taskbox->groupLayout()->addWidget(widget); Content.push_back(taskbox); } diff --git a/src/Mod/Mesh/Gui/SegmentationBestFit.h b/src/Mod/Mesh/Gui/SegmentationBestFit.h index 54a95401f1..3339129725 100644 --- a/src/Mod/Mesh/Gui/SegmentationBestFit.h +++ b/src/Mod/Mesh/Gui/SegmentationBestFit.h @@ -23,28 +23,33 @@ #ifndef MESHGUI_SEGMENTATIONBESTFIT_H #define MESHGUI_SEGMENTATIONBESTFIT_H -#include #include +#include #include #include -#include #include "MeshSelection.h" +#include class QDoubleSpinBox; // forward declarations -namespace Mesh { class Feature; } +namespace Mesh +{ +class Feature; +} -namespace MeshGui { +namespace MeshGui +{ class Ui_SegmentationBestFit; class FitParameter { public: - struct Points { + struct Points + { std::vector points; std::vector normals; }; @@ -52,15 +57,17 @@ public: virtual std::vector getParameter(Points) const = 0; }; -using ParameterList = std::list >; -class ParametersDialog : public QDialog +using ParameterList = std::list>; +class ParametersDialog: public QDialog { Q_OBJECT public: - ParametersDialog(std::vector&, FitParameter*, - ParameterList, Mesh::Feature* mesh, - QWidget* parent=nullptr); + ParametersDialog(std::vector&, + FitParameter*, + ParameterList, + Mesh::Feature* mesh, + QWidget* parent = nullptr); ~ParametersDialog() override; void accept() override; void reject() override; @@ -80,17 +87,19 @@ private: std::vector spinBoxes; }; -class MeshGuiExport SegmentationBestFit : public QWidget +class MeshGuiExport SegmentationBestFit: public QWidget { Q_OBJECT public: - explicit SegmentationBestFit(Mesh::Feature* mesh, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); + explicit SegmentationBestFit(Mesh::Feature* mesh, + QWidget* parent = nullptr, + Qt::WindowFlags fl = Qt::WindowFlags()); ~SegmentationBestFit() override; void accept(); protected: - void changeEvent(QEvent *e) override; + void changeEvent(QEvent* e) override; private: void setupConnections(); @@ -110,7 +119,7 @@ private: /** * Embed the panel into a task dialog. */ -class TaskSegmentationBestFit : public Gui::TaskView::TaskDialog +class TaskSegmentationBestFit: public Gui::TaskView::TaskDialog { public: explicit TaskSegmentationBestFit(Mesh::Feature* mesh); @@ -119,13 +128,15 @@ public: bool accept() override; QDialogButtonBox::StandardButtons getStandardButtons() const override - { return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; } + { + return QDialogButtonBox::Ok | QDialogButtonBox::Cancel; + } private: SegmentationBestFit* widget; Gui::TaskView::TaskBox* taskbox; }; -} +} // namespace MeshGui -#endif // MESHGUI_SEGMENTATIONBESTFIT_H +#endif // MESHGUI_SEGMENTATIONBESTFIT_H diff --git a/src/Mod/Mesh/Gui/Selection.cpp b/src/Mod/Mesh/Gui/Selection.cpp index 45ae22f7e5..b78934e8f1 100644 --- a/src/Mod/Mesh/Gui/Selection.cpp +++ b/src/Mod/Mesh/Gui/Selection.cpp @@ -31,7 +31,8 @@ using namespace MeshGui; /* TRANSLATOR MeshGui::Selection */ Selection::Selection(QWidget* parent) - : QWidget(parent), ui(new Ui_Selection()) + : QWidget(parent) + , ui(new Ui_Selection()) { ui->setupUi(this); setupConnections(); @@ -56,6 +57,7 @@ Selection::~Selection() void Selection::setupConnections() { + // clang-format off connect(ui->addSelection, &QPushButton::clicked, this, &Selection::onAddSelectionClicked); connect(ui->clearSelection, &QPushButton::clicked, @@ -64,6 +66,7 @@ void Selection::setupConnections() this, &Selection::onVisibleTrianglesToggled); connect(ui->screenTriangles, &QPushButton::clicked, this, &Selection::onScreenTrianglesToggled); + // clang-format on } void Selection::setObjects(const std::vector& o) diff --git a/src/Mod/Mesh/Gui/Selection.h b/src/Mod/Mesh/Gui/Selection.h index 8c31f494a4..9df6f396a5 100644 --- a/src/Mod/Mesh/Gui/Selection.h +++ b/src/Mod/Mesh/Gui/Selection.h @@ -23,18 +23,19 @@ #ifndef MESHGUI_SELECTION_H #define MESHGUI_SELECTION_H -#include #include +#include #include #include "MeshSelection.h" -namespace MeshGui { +namespace MeshGui +{ class Ui_Selection; -class Selection : public QWidget +class Selection: public QWidget { Q_OBJECT @@ -57,6 +58,6 @@ private: Ui_Selection* ui; }; -} +} // namespace MeshGui -#endif // MESHGUI_SELECTION_H +#endif // MESHGUI_SELECTION_H diff --git a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp index 9667e1e6c4..f29e59f20f 100644 --- a/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp +++ b/src/Mod/Mesh/Gui/SoFCIndexedFaceSet.cpp @@ -23,37 +23,37 @@ #include "PreCompiled.h" #ifndef FC_OS_WIN32 -# ifndef GL_GLEXT_PROTOTYPES -# define GL_GLEXT_PROTOTYPES 1 -# endif +#ifndef GL_GLEXT_PROTOTYPES +#define GL_GLEXT_PROTOTYPES 1 +#endif #endif #ifndef _PreComp_ -# include -# include -# ifdef FC_OS_MACOSX -# include -# include -# include -# else -# include -# include -# include -# endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#ifdef FC_OS_MACOSX +#include +#include +#include +#else +#include +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -70,35 +70,36 @@ using namespace MeshGui; #if defined RENDER_GL_VAO -class MeshRenderer::Private { +class MeshRenderer::Private +{ public: Gui::OpenGLMultiBuffer vertices; Gui::OpenGLMultiBuffer indices; - const SbColor * pcolors{nullptr}; - SoMaterialBindingElement::Binding matbinding{SoMaterialBindingElement::OVERALL}; - bool initialized{false}; + const SbColor* pcolors {nullptr}; + SoMaterialBindingElement::Binding matbinding {SoMaterialBindingElement::OVERALL}; + bool initialized {false}; Private(); - bool canRenderGLArray(SoGLRenderAction *) const; + bool canRenderGLArray(SoGLRenderAction*) const; void generateGLArrays(SoGLRenderAction* action, - SoMaterialBindingElement::Binding matbind, - std::vector& vertex, std::vector& index); + SoMaterialBindingElement::Binding matbind, + std::vector& vertex, + std::vector& index); void renderFacesGLArray(SoGLRenderAction*); - void renderCoordsGLArray(SoGLRenderAction *); + void renderCoordsGLArray(SoGLRenderAction*); void update(); - bool needUpdate(SoGLRenderAction *); + bool needUpdate(SoGLRenderAction*); private: - void renderGLArray(SoGLRenderAction *, GLenum); + void renderGLArray(SoGLRenderAction*, GLenum); }; MeshRenderer::Private::Private() - : vertices(GL_ARRAY_BUFFER) - , indices(GL_ELEMENT_ARRAY_BUFFER) -{ -} + : vertices(GL_ARRAY_BUFFER) + , indices(GL_ELEMENT_ARRAY_BUFFER) +{} -bool MeshRenderer::Private::canRenderGLArray(SoGLRenderAction *action) const +bool MeshRenderer::Private::canRenderGLArray(SoGLRenderAction* action) const { static bool init = false; static bool vboAvailable = false; @@ -116,10 +117,12 @@ bool MeshRenderer::Private::canRenderGLArray(SoGLRenderAction *action) const void MeshRenderer::Private::generateGLArrays(SoGLRenderAction* action, SoMaterialBindingElement::Binding matbind, - std::vector& vertex, std::vector& index) + std::vector& vertex, + std::vector& index) { - if (vertex.empty() || index.empty()) + if (vertex.empty() || index.empty()) { return; + } // lazy initialization vertices.setCurrentContext(action->getCacheContext()); @@ -130,22 +133,19 @@ void MeshRenderer::Private::generateGLArrays(SoGLRenderAction* action, indices.create(); vertices.bind(); - vertices.allocate(&(vertex[0]), - vertex.size() * sizeof(float)); + vertices.allocate(&(vertex[0]), vertex.size() * sizeof(float)); vertices.release(); indices.bind(); - indices.allocate(&(index[0]), - index.size() * sizeof(int32_t)); + indices.allocate(&(index[0]), index.size() * sizeof(int32_t)); indices.release(); this->matbinding = matbind; } -void MeshRenderer::Private::renderGLArray(SoGLRenderAction *action, GLenum mode) +void MeshRenderer::Private::renderGLArray(SoGLRenderAction* action, GLenum mode) { if (!initialized) { - SoDebugError::postWarning("MeshRenderer", - "not initialized"); + SoDebugError::postWarning("MeshRenderer", "not initialized"); return; } @@ -159,13 +159,14 @@ void MeshRenderer::Private::renderGLArray(SoGLRenderAction *action, GLenum mode) vertices.bind(); indices.bind(); - if (matbinding != SoMaterialBindingElement::OVERALL) + if (matbinding != SoMaterialBindingElement::OVERALL) { glInterleavedArrays(GL_C4F_N3F_V3F, 0, nullptr); - else + } + else { glInterleavedArrays(GL_N3F_V3F, 0, nullptr); + } - glDrawElements(mode, indices.size() / sizeof(uint32_t), - GL_UNSIGNED_INT, nullptr); + glDrawElements(mode, indices.size() / sizeof(uint32_t), GL_UNSIGNED_INT, nullptr); vertices.release(); indices.release(); @@ -175,12 +176,12 @@ void MeshRenderer::Private::renderGLArray(SoGLRenderAction *action, GLenum mode) glDisableClientState(GL_VERTEX_ARRAY); } -void MeshRenderer::Private::renderFacesGLArray(SoGLRenderAction *action) +void MeshRenderer::Private::renderFacesGLArray(SoGLRenderAction* action) { renderGLArray(action, GL_TRIANGLES); } -void MeshRenderer::Private::renderCoordsGLArray(SoGLRenderAction *action) +void MeshRenderer::Private::renderCoordsGLArray(SoGLRenderAction* action) { renderGLArray(action, GL_POINTS); } @@ -191,51 +192,53 @@ void MeshRenderer::Private::update() indices.destroy(); } -bool MeshRenderer::Private::needUpdate(SoGLRenderAction *action) +bool MeshRenderer::Private::needUpdate(SoGLRenderAction* action) { - return !vertices.isCreated(action->getCacheContext()) || - !indices.isCreated(action->getCacheContext()); + return !vertices.isCreated(action->getCacheContext()) + || !indices.isCreated(action->getCacheContext()); } #elif defined RENDER_GLARRAYS -class MeshRenderer::Private { +class MeshRenderer::Private +{ public: std::vector index_array; std::vector vertex_array; - const SbColor * pcolors; + const SbColor* pcolors; SoMaterialBindingElement::Binding matbinding; Private() - : pcolors(0) - , matbinding(SoMaterialBindingElement::OVERALL) - { - } + : pcolors(0) + , matbinding(SoMaterialBindingElement::OVERALL) + {} - bool canRenderGLArray(SoGLRenderAction *) const; + bool canRenderGLArray(SoGLRenderAction*) const; void generateGLArrays(SoGLRenderAction* action, - SoMaterialBindingElement::Binding matbind, - std::vector& vertex, std::vector& index); - void renderFacesGLArray(SoGLRenderAction *action); - void renderCoordsGLArray(SoGLRenderAction *action); + SoMaterialBindingElement::Binding matbind, + std::vector& vertex, + std::vector& index); + void renderFacesGLArray(SoGLRenderAction* action); + void renderCoordsGLArray(SoGLRenderAction* action); void update() - { - } - bool needUpdate(SoGLRenderAction *) + {} + bool needUpdate(SoGLRenderAction*) { return false; } }; -bool MeshRenderer::Private::canRenderGLArray(SoGLRenderAction *) const +bool MeshRenderer::Private::canRenderGLArray(SoGLRenderAction*) const { return true; } void MeshRenderer::Private::generateGLArrays(SoGLRenderAction*, SoMaterialBindingElement::Binding matbind, - std::vector& vertex, std::vector& index) + std::vector& vertex, + std::vector& index) { - if (vertex.empty() || index.empty()) + if (vertex.empty() || index.empty()) { return; + } this->index_array.resize(0); this->vertex_array.resize(0); @@ -245,7 +248,7 @@ void MeshRenderer::Private::generateGLArrays(SoGLRenderAction*, this->matbinding = matbind; } -void MeshRenderer::Private::renderFacesGLArray(SoGLRenderAction *action) +void MeshRenderer::Private::renderFacesGLArray(SoGLRenderAction* action) { (void)action; int cnt = index_array.size(); @@ -253,63 +256,64 @@ void MeshRenderer::Private::renderFacesGLArray(SoGLRenderAction *action) glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_VERTEX_ARRAY); - if (matbinding != SoMaterialBindingElement::OVERALL) + if (matbinding != SoMaterialBindingElement::OVERALL) { glInterleavedArrays(GL_C4F_N3F_V3F, 0, &(vertex_array[0])); - else + } + else { glInterleavedArrays(GL_N3F_V3F, 0, &(vertex_array[0])); + } glDrawElements(GL_TRIANGLES, cnt, GL_UNSIGNED_INT, &(index_array[0])); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); - } -void MeshRenderer::Private::renderCoordsGLArray(SoGLRenderAction *) +void MeshRenderer::Private::renderCoordsGLArray(SoGLRenderAction*) { int cnt = index_array.size(); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_VERTEX_ARRAY); - if (matbinding != SoMaterialBindingElement::OVERALL) + if (matbinding != SoMaterialBindingElement::OVERALL) { glInterleavedArrays(GL_C4F_N3F_V3F, 0, &(vertex_array[0])); - else + } + else { glInterleavedArrays(GL_N3F_V3F, 0, &(vertex_array[0])); + } glDrawElements(GL_POINTS, cnt, GL_UNSIGNED_INT, &(index_array[0])); glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); } #else -class MeshRenderer::Private { +class MeshRenderer::Private +{ public: - const SbColor * pcolors; + const SbColor* pcolors; SoMaterialBindingElement::Binding matbinding; Private() - : pcolors(0) - , matbinding(SoMaterialBindingElement::OVERALL) - { - } + : pcolors(0) + , matbinding(SoMaterialBindingElement::OVERALL) + {} - bool canRenderGLArray(SoGLRenderAction *) const { + bool canRenderGLArray(SoGLRenderAction*) const + { return false; } void generateGLArrays(SoGLRenderAction*, - SoMaterialBindingElement::Binding, - std::vector&, std::vector&) - { - } - void renderFacesGLArray(SoGLRenderAction *) - { - } - void renderCoordsGLArray(SoGLRenderAction *) - { - } + SoMaterialBindingElement::Binding, + std::vector&, + std::vector&) + {} + void renderFacesGLArray(SoGLRenderAction*) + {} + void renderCoordsGLArray(SoGLRenderAction*) + {} void update() - { - } - bool needUpdate(SoGLRenderAction *) + {} + bool needUpdate(SoGLRenderAction*) { return false; } @@ -317,9 +321,8 @@ public: #endif MeshRenderer::MeshRenderer() - : p(new Private) -{ -} + : p(new Private) +{} MeshRenderer::~MeshRenderer() { @@ -331,13 +334,15 @@ void MeshRenderer::update() p->update(); } -bool MeshRenderer::needUpdate(SoGLRenderAction *action) +bool MeshRenderer::needUpdate(SoGLRenderAction* action) { return p->needUpdate(action); } -void MeshRenderer::generateGLArrays(SoGLRenderAction* action, SoMaterialBindingElement::Binding matbind, - std::vector& vertex, std::vector& index) +void MeshRenderer::generateGLArrays(SoGLRenderAction* action, + SoMaterialBindingElement::Binding matbind, + std::vector& vertex, + std::vector& index) { SoGLLazyElement* gl = SoGLLazyElement::getInstance(action->getState()); if (gl) { @@ -351,7 +356,7 @@ void MeshRenderer::generateGLArrays(SoGLRenderAction* action, SoMaterialBindingE // drawCoords (every 4th vertex) | 20.0 // renderCoordsGLArray (all vertexes) | 20.0 // -void MeshRenderer::renderCoordsGLArray(SoGLRenderAction *action) +void MeshRenderer::renderCoordsGLArray(SoGLRenderAction* action) { p->renderCoordsGLArray(action); } @@ -371,12 +376,12 @@ void MeshRenderer::renderCoordsGLArray(SoGLRenderAction *action) // With GL_PRIMITIVE_RESTART_FIXED_INDEX | 0.9 // Without GL_PRIMITIVE_RESTART | 8.5 // Vertex-Array-Object (RENDER_GL_VAO) | 60.0 -void MeshRenderer::renderFacesGLArray(SoGLRenderAction *action) +void MeshRenderer::renderFacesGLArray(SoGLRenderAction* action) { p->renderFacesGLArray(action); } -bool MeshRenderer::canRenderGLArray(SoGLRenderAction *action) const +bool MeshRenderer::canRenderGLArray(SoGLRenderAction* action) const { return p->canRenderGLArray(action); } @@ -390,14 +395,15 @@ bool MeshRenderer::matchMaterial(SoState* state) const // * set to wireframe mode // => the material of the shaded mode instead of that of the // wireframe mode - SoMaterialBindingElement::Binding matbind = - SoMaterialBindingElement::get(state); - if (p->matbinding != matbind) + SoMaterialBindingElement::Binding matbind = SoMaterialBindingElement::get(state); + if (p->matbinding != matbind) { return false; + } // the buffer doesn't contain color information - if (matbind == SoMaterialBindingElement::OVERALL) + if (matbind == SoMaterialBindingElement::OVERALL) { return true; - const SbColor * pcolors = nullptr; + } + const SbColor* pcolors = nullptr; SoGLLazyElement* gl = SoGLLazyElement::getInstance(state); if (gl) { pcolors = gl->getDiffusePointer(); @@ -434,7 +440,7 @@ void SoFCMaterialEngine::initClass() SO_ENGINE_INIT_CLASS(SoFCMaterialEngine, SoEngine, "Engine"); } -void SoFCMaterialEngine::inputChanged(SoField *) +void SoFCMaterialEngine::inputChanged(SoField*) { SO_ENGINE_OUTPUT(trigger, SoSFBool, setValue(true)); } @@ -454,7 +460,7 @@ void SoFCIndexedFaceSet::initClass() } SoFCIndexedFaceSet::SoFCIndexedFaceSet() - : renderTriangleLimit(UINT_MAX) + : renderTriangleLimit(UINT_MAX) { SO_NODE_CONSTRUCTOR(SoFCIndexedFaceSet); SO_NODE_ADD_FIELD(updateGLArray, (false)); @@ -465,10 +471,11 @@ SoFCIndexedFaceSet::SoFCIndexedFaceSet() /** * Either renders the complete mesh or only a subset of the points. */ -void SoFCIndexedFaceSet::GLRender(SoGLRenderAction *action) +void SoFCIndexedFaceSet::GLRender(SoGLRenderAction* action) { - if (this->coordIndex.getNum() < 3) + if (this->coordIndex.getNum() < 3) { return; + } if (!this->shouldGLRender(action)) { // Transparency is handled inside 'shouldGLRender' but the base class @@ -482,15 +489,16 @@ void SoFCIndexedFaceSet::GLRender(SoGLRenderAction *action) } #if defined(RENDER_GL_VAO) - SoState * state = action->getState(); + SoState* state = action->getState(); // get the VBO status of the viewer SbBool useVBO = true; Gui::SoGLVBOActivatedElement::get(state, useVBO); // Check for a matching OpenGL context - if (!render.canRenderGLArray(action)) + if (!render.canRenderGLArray(action)) { useVBO = false; + } // use VBO for fast rendering if possible if (useVBO) { @@ -520,16 +528,15 @@ void SoFCIndexedFaceSet::GLRender(SoGLRenderAction *action) #endif } -void SoFCIndexedFaceSet::drawFaces(SoGLRenderAction *action) +void SoFCIndexedFaceSet::drawFaces(SoGLRenderAction* action) { - SoState * state = action->getState(); + SoState* state = action->getState(); SbBool mode = Gui::SoFCInteractiveElement::get(state); - unsigned int num = this->coordIndex.getNum()/4; + unsigned int num = this->coordIndex.getNum() / 4; if (!mode || num <= this->renderTriangleLimit) { #ifdef RENDER_GLARRAYS - SoMaterialBindingElement::Binding matbind = - SoMaterialBindingElement::get(state); + SoMaterialBindingElement::Binding matbind = SoMaterialBindingElement::get(state); SbBool matchCtx = render.canRenderGLArray(action); if (matbind == SoMaterialBindingElement::OVERALL && matchCtx) { @@ -549,22 +556,21 @@ void SoFCIndexedFaceSet::drawFaces(SoGLRenderAction *action) #endif } else { -#if 0 && defined (RENDER_GLARRAYS) +#if 0 && defined(RENDER_GLARRAYS) SoMaterialBundle mb(action); mb.sendFirst(); render.renderCoordsGLArray(action); #else - SoMaterialBindingElement::Binding matbind = - SoMaterialBindingElement::get(state); + SoMaterialBindingElement::Binding matbind = SoMaterialBindingElement::get(state); int32_t binding = (int32_t)(matbind); - const SoCoordinateElement * coords; - const SbVec3f * normals; - const int32_t * cindices; + const SoCoordinateElement* coords; + const SbVec3f* normals; + const int32_t* cindices; int numindices; - const int32_t * nindices; - const int32_t * tindices; - const int32_t * mindices; + const int32_t* nindices; + const int32_t* tindices; + const int32_t* mindices; SbBool normalCacheUsed; SoMaterialBundle mb(action); @@ -572,20 +578,36 @@ void SoFCIndexedFaceSet::drawFaces(SoGLRenderAction *action) SoTextureCoordinateBundle tb(action, true, false); SbBool sendNormals = !mb.isColorOnly() || tb.isFunction(); - this->getVertexData(state, coords, normals, cindices, - nindices, tindices, mindices, numindices, - sendNormals, normalCacheUsed); + this->getVertexData(state, + coords, + normals, + cindices, + nindices, + tindices, + mindices, + numindices, + sendNormals, + normalCacheUsed); - mb.sendFirst(); // make sure we have the correct material + mb.sendFirst(); // make sure we have the correct material - drawCoords(static_cast(coords), cindices, numindices, - normals, nindices, &mb, mindices, binding, &tb, tindices); + drawCoords(static_cast(coords), + cindices, + numindices, + normals, + nindices, + &mb, + mindices, + binding, + &tb, + tindices); // getVertexData() internally calls readLockNormalCache() that read locks // the normal cache. When the cache is not needed any more we must call // readUnlockNormalCache() - if (normalCacheUsed) + if (normalCacheUsed) { this->readUnlockNormalCache(); + } // Disable caching for this node SoGLCacheContextElement::shouldAutoCache(state, SoGLCacheContextElement::DONT_AUTO_CACHE); @@ -593,22 +615,22 @@ void SoFCIndexedFaceSet::drawFaces(SoGLRenderAction *action) } } -void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexlist, - const int32_t *vertexindices, +void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement* const vertexlist, + const int32_t* vertexindices, int numindices, - const SbVec3f *normals, - const int32_t *normalindices, - SoMaterialBundle *materials, - const int32_t * /*matindices*/, + const SbVec3f* normals, + const int32_t* normalindices, + SoMaterialBundle* materials, + const int32_t* /*matindices*/, const int32_t binding, - const SoTextureCoordinateBundle * const /*texcoords*/, - const int32_t * /*texindices*/) + const SoTextureCoordinateBundle* const /*texcoords*/, + const int32_t* /*texindices*/) { - const SbVec3f * coords3d = nullptr; + const SbVec3f* coords3d = nullptr; coords3d = vertexlist->getArrayPtr3(); - int mod = numindices/(4*this->renderTriangleLimit)+1; - float size = std::min((float)mod,3.0f); + int mod = numindices / (4 * this->renderTriangleLimit) + 1; + float size = std::min((float)mod, 3.0f); glPointSize(size); SbBool per_face = false; @@ -624,49 +646,69 @@ void SoFCIndexedFaceSet::drawCoords(const SoGLCoordinateElement * const vertexli break; } - int ct=0; - const int32_t *viptr = vertexindices; + int ct = 0; + const int32_t* viptr = vertexindices; int32_t v1, v2, v3; - SbVec3f dummynormal(0,0,1); - const SbVec3f *currnormal = &dummynormal; - if (normals) currnormal = normals; + SbVec3f dummynormal(0, 0, 1); + const SbVec3f* currnormal = &dummynormal; + if (normals) { + currnormal = normals; + } glBegin(GL_POINTS); - for (int index=0; indexsend(ct, true); - v1 = *viptr++; index++; - if (per_vert) + } + v1 = *viptr++; + index++; + if (per_vert) { materials->send(v1, true); - if (normals) + } + if (normals) { currnormal = &normals[*normalindices++]; + } glNormal3fv((const GLfloat*)currnormal); glVertex3fv((const GLfloat*)(coords3d + v1)); - v2 = *viptr++; index++; - if (per_vert) + v2 = *viptr++; + index++; + if (per_vert) { materials->send(v2, true); - if (normals) + } + if (normals) { currnormal = &normals[*normalindices++]; + } glNormal3fv((const GLfloat*)currnormal); glVertex3fv((const GLfloat*)(coords3d + v2)); - v3 = *viptr++; index++; - if (per_vert) + v3 = *viptr++; + index++; + if (per_vert) { materials->send(v3, true); - if (normals) + } + if (normals) { currnormal = &normals[*normalindices++]; + } glNormal3fv((const GLfloat*)currnormal); glVertex3fv((const GLfloat*)(coords3d + v3)); } else { - viptr++; index++; normalindices++; - viptr++; index++; normalindices++; - viptr++; index++; normalindices++; + viptr++; + index++; + normalindices++; + viptr++; + index++; + normalindices++; + viptr++; + index++; + normalindices++; } - viptr++; index++; normalindices++; + viptr++; + index++; + normalindices++; } glEnd(); } @@ -676,30 +718,36 @@ void SoFCIndexedFaceSet::invalidate() updateGLArray.setValue(true); } -void SoFCIndexedFaceSet::generateGLArrays(SoGLRenderAction * action) +void SoFCIndexedFaceSet::generateGLArrays(SoGLRenderAction* action) { - const SoCoordinateElement * coords; - const SbVec3f * normals; - const int32_t * cindices; - const SbColor * pcolors = nullptr; - const float * transp = nullptr; + const SoCoordinateElement* coords; + const SbVec3f* normals; + const int32_t* cindices; + const SbColor* pcolors = nullptr; + const float* transp = nullptr; int numindices, numcolors = 0, numtransp = 0; - const int32_t * nindices; - const int32_t * tindices; - const int32_t * mindices; + const int32_t* nindices; + const int32_t* tindices; + const int32_t* mindices; SbBool normalCacheUsed; SbBool sendNormals = true; SoState* state = action->getState(); - this->getVertexData(state, coords, normals, cindices, - nindices, tindices, mindices, numindices, - sendNormals, normalCacheUsed); + this->getVertexData(state, + coords, + normals, + cindices, + nindices, + tindices, + mindices, + numindices, + sendNormals, + normalCacheUsed); - const SbVec3f * points = coords->getArrayPtr3(); + const SbVec3f* points = coords->getArrayPtr3(); - SoMaterialBindingElement::Binding matbind = - SoMaterialBindingElement::get(state); + SoMaterialBindingElement::Binding matbind = SoMaterialBindingElement::get(state); SoGLLazyElement* gl = SoGLLazyElement::getInstance(state); if (gl) { pcolors = gl->getDiffusePointer(); @@ -721,21 +769,25 @@ void SoFCIndexedFaceSet::generateGLArrays(SoGLRenderAction * action) SoNormalBindingElement::Binding normbind = SoNormalBindingElement::get(state); if (normbind == SoNormalBindingElement::PER_VERTEX_INDEXED) { if (matbind == SoMaterialBindingElement::PER_FACE) { - face_vertices.reserve(3 * numTria * 10); // duplicate each vertex (rgba, normal, vertex) + face_vertices.reserve(3 * numTria + * 10); // duplicate each vertex (rgba, normal, vertex) face_indices.resize(3 * numTria); if (numcolors != static_cast(numTria)) { - SoDebugError::postWarning("SoFCIndexedFaceSet::generateGLArrays", - "The number of faces (%d) doesn't match with the number of colors (%d).", numTria, numcolors); + SoDebugError::postWarning( + "SoFCIndexedFaceSet::generateGLArrays", + "The number of faces (%d) doesn't match with the number of colors (%d).", + numTria, + numcolors); } // the nindices must have the length of numindices int32_t vertex = 0; int index = 0; float t = transp ? transp[0] : 0; - for (std::size_t i=0; igetNum()) { - SoDebugError::postWarning("SoFCIndexedFaceSet::generateGLArrays", - "The number of points (%d) doesn't match with the number of colors (%d).", coords->getNum(), numcolors); + SoDebugError::postWarning( + "SoFCIndexedFaceSet::generateGLArrays", + "The number of points (%d) doesn't match with the number of colors (%d).", + coords->getNum(), + numcolors); } // the nindices must have the length of numindices int32_t vertex = 0; int index = 0; float t = transp ? transp[0] : 0; - for (std::size_t i=0; igetNum(); face_vertices.reserve(6 * numPts); - for (std::size_t i=0; ireadUnlockNormalCache(); + } } -void SoFCIndexedFaceSet::doAction(SoAction * action) +void SoFCIndexedFaceSet::doAction(SoAction* action) { if (action->getTypeId() == Gui::SoGLSelectAction::getClassTypeId()) { SoNode* node = action->getNodeAppliedTo(); - if (!node) // on no node applied + if (!node) { // on no node applied return; + } // The node we have is the parent of this node and the coordinate node // thus we search there for it. @@ -880,22 +937,25 @@ void SoFCIndexedFaceSet::doAction(SoAction * action) sa.setSearchingAll(false); sa.setType(SoCoordinate3::getClassTypeId(), 1); sa.apply(node); - SoPath * path = sa.getPath(); - if (!path) + SoPath* path = sa.getPath(); + if (!path) { return; + } // make sure we got the node we wanted SoNode* coords = path->getNodeFromTail(0); - if (!(coords && coords->getTypeId().isDerivedFrom(SoCoordinate3::getClassTypeId()))) + if (!(coords && coords->getTypeId().isDerivedFrom(SoCoordinate3::getClassTypeId()))) { return; + } startSelection(action); renderSelectionGeometry(static_cast(coords)->point.getValues(0)); stopSelection(action); } else if (action->getTypeId() == Gui::SoVisibleFaceAction::getClassTypeId()) { SoNode* node = action->getNodeAppliedTo(); - if (!node) // on no node applied + if (!node) { // on no node applied return; + } // The node we have is the parent of this node and the coordinate node // thus we search there for it. @@ -904,14 +964,16 @@ void SoFCIndexedFaceSet::doAction(SoAction * action) sa.setSearchingAll(false); sa.setType(SoCoordinate3::getClassTypeId(), 1); sa.apply(node); - SoPath * path = sa.getPath(); - if (!path) + SoPath* path = sa.getPath(); + if (!path) { return; + } // make sure we got the node we wanted SoNode* coords = path->getNodeFromTail(0); - if (!(coords && coords->getTypeId().isDerivedFrom(SoCoordinate3::getClassTypeId()))) + if (!(coords && coords->getTypeId().isDerivedFrom(SoCoordinate3::getClassTypeId()))) { return; + } startVisibility(action); renderVisibleFaces(static_cast(coords)->point.getValues(0)); stopVisibility(action); @@ -920,20 +982,22 @@ void SoFCIndexedFaceSet::doAction(SoAction * action) inherited::doAction(action); } -void SoFCIndexedFaceSet::startSelection(SoAction * action) +void SoFCIndexedFaceSet::startSelection(SoAction* action) { - Gui::SoGLSelectAction *doaction = static_cast(action); + Gui::SoGLSelectAction* doaction = static_cast(action); const SbViewportRegion& vp = doaction->getViewportRegion(); int x = vp.getViewportOriginPixels()[0]; int y = vp.getViewportOriginPixels()[1]; int w = vp.getViewportSizePixels()[0]; int h = vp.getViewportSizePixels()[1]; - int bufSize = 5*(this->coordIndex.getNum()/4); // make the buffer big enough + int bufSize = 5 * (this->coordIndex.getNum() / 4); // make the buffer big enough this->selectBuf = new GLuint[bufSize]; - SbMatrix view = SoViewingMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft - SbMatrix proj = SoProjectionMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft + SbMatrix view = + SoViewingMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft + SbMatrix proj = + SoProjectionMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft glSelectBuffer(bufSize, selectBuf); glRenderMode(GL_SELECT); @@ -942,23 +1006,25 @@ void SoFCIndexedFaceSet::startSelection(SoAction * action) glPushName(-1); GLint viewport[4]; - glGetIntegerv(GL_VIEWPORT,viewport); + glGetIntegerv(GL_VIEWPORT, viewport); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); if (w > 0 && h > 0) { - glTranslatef((viewport[2] - 2 * (x - viewport[0])) / w, (viewport[3] - 2 * (y - viewport[1])) / h, 0); + glTranslatef((viewport[2] - 2 * (x - viewport[0])) / w, + (viewport[3] - 2 * (y - viewport[1])) / h, + 0); glScalef(viewport[2] / w, viewport[3] / h, 1.0); } - glMultMatrixf(/*mp*/(float*)proj); + glMultMatrixf(/*mp*/ (float*)proj); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadMatrixf((float*)view); } -void SoFCIndexedFaceSet::stopSelection(SoAction * action) +void SoFCIndexedFaceSet::stopSelection(SoAction* action) { // restoring the original projection matrix glPopMatrix(); @@ -970,51 +1036,53 @@ void SoFCIndexedFaceSet::stopSelection(SoAction * action) // returning to normal rendering mode GLint hits = glRenderMode(GL_RENDER); - int bufSize = 5*(this->coordIndex.getNum()/4); - std::vector< std::pair > hit; - GLint index=0; - for (GLint ii=0;iicoordIndex.getNum() / 4); + std::vector> hit; + GLint index = 0; + for (GLint ii = 0; ii < hits && index < bufSize; ii++) { GLint ct = (GLint)selectBuf[index]; - hit.emplace_back(selectBuf[index+1]/4294967295.0,selectBuf[index+3]); - index = index+ct+3; + hit.emplace_back(selectBuf[index + 1] / 4294967295.0, selectBuf[index + 3]); + index = index + ct + 3; } - delete [] selectBuf; + delete[] selectBuf; selectBuf = nullptr; - std::sort(hit.begin(),hit.end()); + std::sort(hit.begin(), hit.end()); - Gui::SoGLSelectAction *doaction = static_cast(action); + Gui::SoGLSelectAction* doaction = static_cast(action); doaction->indices.reserve(hit.size()); - for (GLint ii=0;iiindices.push_back(hit[ii].second); } } -void SoFCIndexedFaceSet::renderSelectionGeometry(const SbVec3f * coords3d) +void SoFCIndexedFaceSet::renderSelectionGeometry(const SbVec3f* coords3d) { - int numfaces = this->coordIndex.getNum()/4; - const int32_t * cindices = this->coordIndex.getValues(0); + int numfaces = this->coordIndex.getNum() / 4; + const int32_t* cindices = this->coordIndex.getValues(0); - int fcnt=0; + int fcnt = 0; int32_t v1, v2, v3; - for (int index=0; indexgetState()); // clazy:exclude=rule-of-two-soft - SbMatrix proj = SoProjectionMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft + SbMatrix view = + SoViewingMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft + SbMatrix proj = + SoProjectionMatrixElement::get(action->getState()); // clazy:exclude=rule-of-two-soft glMatrixMode(GL_PROJECTION); glPushMatrix(); @@ -1025,7 +1093,7 @@ void SoFCIndexedFaceSet::startVisibility(SoAction * action) glLoadMatrixf((float*)view); } -void SoFCIndexedFaceSet::stopVisibility(SoAction * /*action*/) +void SoFCIndexedFaceSet::stopVisibility(SoAction* /*action*/) { // restoring the original projection matrix glPopMatrix(); @@ -1035,32 +1103,32 @@ void SoFCIndexedFaceSet::stopVisibility(SoAction * /*action*/) glFlush(); } -void SoFCIndexedFaceSet::renderVisibleFaces(const SbVec3f * coords3d) +void SoFCIndexedFaceSet::renderVisibleFaces(const SbVec3f* coords3d) { - glDisable (GL_BLEND); - glDisable (GL_DITHER); - glDisable (GL_FOG); - glDisable (GL_LIGHTING); - glDisable (GL_TEXTURE_1D); - glDisable (GL_TEXTURE_2D); - glShadeModel (GL_FLAT); + glDisable(GL_BLEND); + glDisable(GL_DITHER); + glDisable(GL_FOG); + glDisable(GL_LIGHTING); + glDisable(GL_TEXTURE_1D); + glDisable(GL_TEXTURE_2D); + glShadeModel(GL_FLAT); - uint32_t numfaces = this->coordIndex.getNum()/4; - const int32_t * cindices = this->coordIndex.getValues(0); + uint32_t numfaces = this->coordIndex.getNum() / 4; + const int32_t* cindices = this->coordIndex.getValues(0); int32_t v1, v2, v3; - for (uint32_t index=0; index& vertex, std::vector& index); - void renderFacesGLArray(SoGLRenderAction *action); - void renderCoordsGLArray(SoGLRenderAction *action); - bool canRenderGLArray(SoGLRenderAction *action) const; + void generateGLArrays(SoGLRenderAction*, + SoMaterialBindingElement::Binding binding, + std::vector& vertex, + std::vector& index); + void renderFacesGLArray(SoGLRenderAction* action); + void renderCoordsGLArray(SoGLRenderAction* action); + bool canRenderGLArray(SoGLRenderAction* action) const; bool matchMaterial(SoState*) const; void update(); - bool needUpdate(SoGLRenderAction *action); + bool needUpdate(SoGLRenderAction* action); static bool shouldRenderDirectly(bool); private: @@ -68,7 +71,7 @@ private: * * @author Werner Mayer */ -class MeshGuiExport SoFCMaterialEngine : public SoEngine +class MeshGuiExport SoFCMaterialEngine: public SoEngine { SO_ENGINE_HEADER(SoFCMaterialEngine); @@ -82,7 +85,7 @@ public: private: ~SoFCMaterialEngine() override; void evaluate() override; - void inputChanged(SoField *) override; + void inputChanged(SoField*) override; }; /** @@ -92,7 +95,8 @@ private: * * @author Werner Mayer */ -class MeshGuiExport SoFCIndexedFaceSet : public SoIndexedFaceSet { +class MeshGuiExport SoFCIndexedFaceSet: public SoIndexedFaceSet +{ using inherited = SoIndexedFaceSet; SO_NODE_HEADER(SoFCIndexedFaceSet); @@ -109,38 +113,37 @@ public: protected: // Force using the reference count mechanism. ~SoFCIndexedFaceSet() override = default; - void GLRender(SoGLRenderAction *action) override; - void drawFaces(SoGLRenderAction *action); - void drawCoords(const SoGLCoordinateElement * const vertexlist, - const int32_t *vertexindices, + void GLRender(SoGLRenderAction* action) override; + void drawFaces(SoGLRenderAction* action); + void drawCoords(const SoGLCoordinateElement* const vertexlist, + const int32_t* vertexindices, int numindices, - const SbVec3f *normals, - const int32_t *normalindices, - SoMaterialBundle *materials, - const int32_t *matindices, + const SbVec3f* normals, + const int32_t* normalindices, + SoMaterialBundle* materials, + const int32_t* matindices, const int32_t binding, - const SoTextureCoordinateBundle * const texcoords, - const int32_t *texindices); + const SoTextureCoordinateBundle* const texcoords, + const int32_t* texindices); - void doAction(SoAction * action) override; + void doAction(SoAction* action) override; private: - void startSelection(SoAction * action); - void stopSelection(SoAction * action); - void renderSelectionGeometry(const SbVec3f *); - void startVisibility(SoAction * action); - void stopVisibility(SoAction * action); - void renderVisibleFaces(const SbVec3f *); + void startSelection(SoAction* action); + void stopSelection(SoAction* action); + void renderSelectionGeometry(const SbVec3f*); + void startVisibility(SoAction* action); + void stopVisibility(SoAction* action); + void renderVisibleFaces(const SbVec3f*); - void generateGLArrays(SoGLRenderAction * action); + void generateGLArrays(SoGLRenderAction* action); private: MeshRenderer render; - GLuint *selectBuf{nullptr}; + GLuint* selectBuf {nullptr}; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_SOFCINDEXEDFACESET_H - +#endif // MESHGUI_SOFCINDEXEDFACESET_H diff --git a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp index 8cbdc0205e..f56cf1dd1e 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp @@ -22,32 +22,32 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# ifdef FC_OS_WIN32 -# include -# endif -# ifdef FC_OS_MACOSX -# include -# include -# else -# include -# include -# endif -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#ifdef FC_OS_WIN32 +#include +#endif +#ifdef FC_OS_MACOSX +#include +#include +#else +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -64,12 +64,13 @@ using namespace MeshGui; -class SoOutputStreambuf : public std::streambuf +class SoOutputStreambuf: public std::streambuf { public: - explicit SoOutputStreambuf(SoOutput* o) : out(o) - { - } + explicit SoOutputStreambuf(SoOutput* o) + : out(o) + {} + protected: int overflow(int c = EOF) override { @@ -79,7 +80,7 @@ protected: } return c; } - std::streamsize xsputn (const char* s, std::streamsize num) override + std::streamsize xsputn(const char* s, std::streamsize num) override { out->write(s); return num; @@ -89,26 +90,29 @@ private: SoOutput* out; }; -class SoOutputStream : public std::ostream +class SoOutputStream: public std::ostream { public: - explicit SoOutputStream(SoOutput* o) : std::ostream(nullptr), buf(o) + explicit SoOutputStream(SoOutput* o) + : std::ostream(nullptr) + , buf(o) { this->rdbuf(&buf); } + private: SoOutputStreambuf buf; }; -class SoInputStreambuf : public std::streambuf +class SoInputStreambuf: public std::streambuf { public: - explicit SoInputStreambuf(SoInput* o) : inp(o) + explicit SoInputStreambuf(SoInput* o) + : inp(o) { - setg (buffer+pbSize, - buffer+pbSize, - buffer+pbSize); + setg(buffer + pbSize, buffer + pbSize, buffer + pbSize); } + protected: int underflow() override { @@ -122,26 +126,25 @@ protected: numPutback = pbSize; } - memcpy (buffer+(pbSize-numPutback), gptr()-numPutback, numPutback); + memcpy(buffer + (pbSize - numPutback), gptr() - numPutback, numPutback); - int num=0; - for (int i=0; iget(c); if (ok) { num++; - buffer[pbSize+i] = c; - if (c == '\n') + buffer[pbSize + i] = c; + if (c == '\n') { break; + } } - else if (num==0) { + else if (num == 0) { return EOF; } } - setg (buffer+(pbSize-numPutback), - buffer+pbSize, - buffer+pbSize+num); + setg(buffer + (pbSize - numPutback), buffer + pbSize, buffer + pbSize + num); return *gptr(); } @@ -149,14 +152,16 @@ protected: private: static const int pbSize = 4; static const int bufSize = 1024; - char buffer[bufSize+pbSize]; + char buffer[bufSize + pbSize]; SoInput* inp; }; -class SoInputStream : public std::istream +class SoInputStream: public std::istream { public: - explicit SoInputStream(SoInput* o) : std::istream(nullptr), buf(o) + explicit SoInputStream(SoInput* o) + : std::istream(nullptr) + , buf(o) { this->rdbuf(&buf); } @@ -168,7 +173,9 @@ private: // Defines all required member variables and functions for a // single-value field -SO_SFIELD_SOURCE(SoSFMeshObject, Base::Reference, Base::Reference) +SO_SFIELD_SOURCE(SoSFMeshObject, + Base::Reference, + Base::Reference) void SoSFMeshObject::initClass() @@ -180,7 +187,7 @@ void SoSFMeshObject::initClass() // This reads the value of a field from a file. It returns false if the value could not be read // successfully. -SbBool SoSFMeshObject::readValue(SoInput *in) +SbBool SoSFMeshObject::readValue(SoInput* in) { if (!in->isBinary()) { SoInputStream str(in); @@ -199,33 +206,37 @@ SbBool SoSFMeshObject::readValue(SoInput *in) int32_t countPt; in->read(countPt); std::vector verts(countPt); - in->readBinaryArray(&(verts[0]),countPt); + in->readBinaryArray(&(verts[0]), countPt); MeshCore::MeshPointArray rPoints; - rPoints.reserve(countPt/3); - for (std::vector::iterator it = verts.begin(); - it != verts.end();) { - Base::Vector3f p; - p.x = *it; ++it; - p.y = *it; ++it; - p.z = *it; ++it; - rPoints.push_back(p); + rPoints.reserve(countPt / 3); + for (std::vector::iterator it = verts.begin(); it != verts.end();) { + Base::Vector3f p; + p.x = *it; + ++it; + p.y = *it; + ++it; + p.z = *it; + ++it; + rPoints.push_back(p); } int32_t countFt; in->read(countFt); std::vector faces(countFt); - in->readBinaryArray(&(faces[0]),countFt); + in->readBinaryArray(&(faces[0]), countFt); MeshCore::MeshFacetArray rFacets; - rFacets.reserve(countFt/3); - for (std::vector::iterator it = faces.begin(); - it != faces.end();) { - MeshCore::MeshFacet f; - f._aulPoints[0] = *it; ++it; - f._aulPoints[1] = *it; ++it; - f._aulPoints[2] = *it; ++it; - rFacets.push_back(f); + rFacets.reserve(countFt / 3); + for (std::vector::iterator it = faces.begin(); it != faces.end();) { + MeshCore::MeshFacet f; + f._aulPoints[0] = *it; + ++it; + f._aulPoints[1] = *it; + ++it; + f._aulPoints[2] = *it; + ++it; + rFacets.push_back(f); } MeshCore::MeshKernel kernel; @@ -241,7 +252,7 @@ SbBool SoSFMeshObject::readValue(SoInput *in) } // This writes the value of a field to a file. -void SoSFMeshObject::writeValue(SoOutput *out) const +void SoSFMeshObject::writeValue(SoOutput* out) const { if (!value) { int32_t count = 0; @@ -258,8 +269,8 @@ void SoSFMeshObject::writeValue(SoOutput *out) const const MeshCore::MeshPointArray& rPoints = value->getKernel().GetPoints(); std::vector verts; - verts.reserve(3*rPoints.size()); - for (const auto & rPoint : rPoints) { + verts.reserve(3 * rPoints.size()); + for (const auto& rPoint : rPoints) { verts.push_back(rPoint.x); verts.push_back(rPoint.y); verts.push_back(rPoint.z); @@ -267,12 +278,12 @@ void SoSFMeshObject::writeValue(SoOutput *out) const int32_t countPt = (int32_t)verts.size(); out->write(countPt); - out->writeBinaryArray(&(verts[0]),countPt); + out->writeBinaryArray(&(verts[0]), countPt); const MeshCore::MeshFacetArray& rFacets = value->getKernel().GetFacets(); std::vector faces; - faces.reserve(3*rFacets.size()); - for (const auto & rFacet : rFacets) { + faces.reserve(3 * rFacets.size()); + for (const auto& rFacet : rFacets) { faces.push_back((int32_t)rFacet._aulPoints[0]); faces.push_back((int32_t)rFacet._aulPoints[1]); faces.push_back((int32_t)rFacet._aulPoints[2]); @@ -280,7 +291,7 @@ void SoSFMeshObject::writeValue(SoOutput *out) const int32_t countFt = (int32_t)faces.size(); out->write(countFt); - out->writeBinaryArray((const int32_t*)&(faces[0]),countFt); + out->writeBinaryArray((const int32_t*)&(faces[0]), countFt); } // ------------------------------------------------------- @@ -292,7 +303,7 @@ void SoFCMeshObjectElement::initClass() SO_ELEMENT_INIT_CLASS(SoFCMeshObjectElement, inherited); } -void SoFCMeshObjectElement::init(SoState * state) +void SoFCMeshObjectElement::init(SoState* state) { inherited::init(state); this->mesh = nullptr; @@ -300,29 +311,30 @@ void SoFCMeshObjectElement::init(SoState * state) SoFCMeshObjectElement::~SoFCMeshObjectElement() = default; -void SoFCMeshObjectElement::set(SoState * const state, SoNode * const node, const Mesh::MeshObject * const mesh) +void SoFCMeshObjectElement::set(SoState* const state, + SoNode* const node, + const Mesh::MeshObject* const mesh) { - SoFCMeshObjectElement * elem = (SoFCMeshObjectElement *) - SoReplacedElement::getElement(state, classStackIndex, node); + SoFCMeshObjectElement* elem = + (SoFCMeshObjectElement*)SoReplacedElement::getElement(state, classStackIndex, node); if (elem) { elem->mesh = mesh; elem->nodeId = node->getNodeId(); } } -const Mesh::MeshObject * SoFCMeshObjectElement::get(SoState * const state) +const Mesh::MeshObject* SoFCMeshObjectElement::get(SoState* const state) { return SoFCMeshObjectElement::getInstance(state)->mesh; } -const SoFCMeshObjectElement * SoFCMeshObjectElement::getInstance(SoState * state) +const SoFCMeshObjectElement* SoFCMeshObjectElement::getInstance(SoState* state) { - return (const SoFCMeshObjectElement *) SoElement::getConstElement(state, classStackIndex); + return (const SoFCMeshObjectElement*)SoElement::getConstElement(state, classStackIndex); } -void SoFCMeshObjectElement::print(FILE * /* file */) const -{ -} +void SoFCMeshObjectElement::print(FILE* /* file */) const +{} // ------------------------------------------------------- @@ -352,9 +364,9 @@ void SoFCMeshPickNode::initClass() SO_NODE_INIT_CLASS(SoFCMeshPickNode, SoNode, "Node"); } -void SoFCMeshPickNode::notify(SoNotList *list) +void SoFCMeshPickNode::notify(SoNotList* list) { - SoField *f = list->getLastField(); + SoField* f = list->getLastField(); if (f == &mesh) { const Mesh::MeshObject* meshObject = mesh.getValue(); if (meshObject) { @@ -367,12 +379,11 @@ void SoFCMeshPickNode::notify(SoNotList *list) } // Doc from superclass. -void SoFCMeshPickNode::rayPick(SoRayPickAction * /*action*/) -{ -} +void SoFCMeshPickNode::rayPick(SoRayPickAction* /*action*/) +{} // Doc from superclass. -void SoFCMeshPickNode::pick(SoPickAction * action) +void SoFCMeshPickNode::pick(SoPickAction* action) { SoRayPickAction* raypick = static_cast(action); raypick->setObjectSpace(); @@ -383,11 +394,11 @@ void SoFCMeshPickNode::pick(SoPickAction * action) const SbLine& line = raypick->getLine(); const SbVec3f& pos = line.getPosition(); const SbVec3f& dir = line.getDirection(); - Base::Vector3f pt(pos[0],pos[1],pos[2]); - Base::Vector3f dr(dir[0],dir[1],dir[2]); + Base::Vector3f pt(pos[0], pos[1], pos[2]); + Base::Vector3f dr(dir[0], dir[1], dir[2]); Mesh::FacetIndex index; if (alg.NearestFacetOnRay(pt, dr, *meshGrid, pt, index)) { - SoPickedPoint* pp = raypick->addIntersection(SbVec3f(pt.x,pt.y,pt.z)); + SoPickedPoint* pp = raypick->addIntersection(SbVec3f(pt.x, pt.y, pt.z)); if (pp) { SoFaceDetail* det = new SoFaceDetail(); det->setFaceIndex(index); @@ -407,9 +418,9 @@ SoFCMeshGridNode::SoFCMeshGridNode() { SO_NODE_CONSTRUCTOR(SoFCMeshGridNode); - SO_NODE_ADD_FIELD(minGrid, (SbVec3f(0,0,0))); - SO_NODE_ADD_FIELD(maxGrid, (SbVec3f(0,0,0))); - SO_NODE_ADD_FIELD(lenGrid, (SbVec3s(0,0,0))); + SO_NODE_ADD_FIELD(minGrid, (SbVec3f(0, 0, 0))); + SO_NODE_ADD_FIELD(maxGrid, (SbVec3f(0, 0, 0))); + SO_NODE_ADD_FIELD(lenGrid, (SbVec3s(0, 0, 0))); } /*! @@ -423,21 +434,24 @@ void SoFCMeshGridNode::initClass() SO_NODE_INIT_CLASS(SoFCMeshGridNode, SoNode, "Node"); } -void SoFCMeshGridNode::GLRender(SoGLRenderAction * /*action*/) +void SoFCMeshGridNode::GLRender(SoGLRenderAction* /*action*/) { const SbVec3f& min = minGrid.getValue(); const SbVec3f& max = maxGrid.getValue(); const SbVec3s& len = lenGrid.getValue(); - short u,v,w; len.getValue(u,v,w); - float minX, minY, minZ; min.getValue(minX, minY, minZ); - float maxX, maxY, maxZ; max.getValue(maxX, maxY, maxZ); - float dx = (maxX-minX)/(float)u; - float dy = (maxY-minY)/(float)v; - float dz = (maxZ-minZ)/(float)w; - glColor3f(0.0f,1.0f,0.0); + short u, v, w; + len.getValue(u, v, w); + float minX, minY, minZ; + min.getValue(minX, minY, minZ); + float maxX, maxY, maxZ; + max.getValue(maxX, maxY, maxZ); + float dx = (maxX - minX) / (float)u; + float dy = (maxY - minY) / (float)v; + float dz = (maxZ - minZ) / (float)w; + glColor3f(0.0f, 1.0f, 0.0); glBegin(GL_LINES); - for (short i=0; igetState(), this, mesh.getValue()); } // Doc from superclass. -void SoFCMeshObjectNode::GLRender(SoGLRenderAction * action) +void SoFCMeshObjectNode::GLRender(SoGLRenderAction* action) { SoFCMeshObjectNode::doAction(action); } // Doc from superclass. -void SoFCMeshObjectNode::callback(SoCallbackAction * action) +void SoFCMeshObjectNode::callback(SoCallbackAction* action) { SoFCMeshObjectNode::doAction(action); } // Doc from superclass. -void SoFCMeshObjectNode::pick(SoPickAction * action) +void SoFCMeshObjectNode::pick(SoPickAction* action) { SoFCMeshObjectNode::doAction(action); } // Doc from superclass. -void SoFCMeshObjectNode::getBoundingBox(SoGetBoundingBoxAction * action) +void SoFCMeshObjectNode::getBoundingBox(SoGetBoundingBoxAction* action) { SoFCMeshObjectNode::doAction(action); } // Doc from superclass. -void SoFCMeshObjectNode::getPrimitiveCount(SoGetPrimitiveCountAction * action) +void SoFCMeshObjectNode::getPrimitiveCount(SoGetPrimitiveCountAction* action) { SoFCMeshObjectNode::doAction(action); } @@ -552,7 +566,9 @@ void SoFCMeshObjectNode::getPrimitiveCount(SoGetPrimitiveCountAction * action) inline void glVertex(const MeshCore::MeshPoint& _v) { float v[3]; - v[0]=_v.x; v[1]=_v.y;v[2]=_v.z; + v[0] = _v.x; + v[1] = _v.y; + v[2] = _v.z; glVertex3fv(v); } @@ -560,7 +576,9 @@ inline void glVertex(const MeshCore::MeshPoint& _v) inline void glNormal(const Base::Vector3f& _n) { float n[3]; - n[0]=_n.x; n[1]=_n.y;n[2]=_n.z; + n[0] = _n.x; + n[1] = _n.y; + n[2] = _n.z; glNormal3fv(n); } @@ -592,7 +610,7 @@ SoFCMeshObjectShape::SoFCMeshObjectShape() SoFCMeshObjectShape::~SoFCMeshObjectShape() = default; -void SoFCMeshObjectShape::notify(SoNotList * node) +void SoFCMeshObjectShape::notify(SoNotList* node) { inherited::notify(node); updateGLArray = true; @@ -603,11 +621,10 @@ void SoFCMeshObjectShape::notify(SoNotList * node) /** * Either renders the complete mesh or only a subset of the points. */ -void SoFCMeshObjectShape::GLRender(SoGLRenderAction *action) +void SoFCMeshObjectShape::GLRender(SoGLRenderAction* action) { - if (shouldGLRender(action)) - { - SoState* state = action->getState(); + if (shouldGLRender(action)) { + SoState* state = action->getState(); // Here we must save the model and projection matrices because // we need them later for picking @@ -615,21 +632,23 @@ void SoFCMeshObjectShape::GLRender(SoGLRenderAction *action) glGetFloatv(GL_PROJECTION_MATRIX, this->projection); SbBool mode = Gui::SoFCInteractiveElement::get(state); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); - if (!mesh || mesh->countPoints() == 0) + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); + if (!mesh || mesh->countPoints() == 0) { return; + } Binding mbind = this->findMaterialBinding(state); SoMaterialBundle mb(action); - //SoTextureCoordinateBundle tb(action, true, false); + // SoTextureCoordinateBundle tb(action, true, false); - SbBool needNormals = !mb.isColorOnly()/* || tb.isFunction()*/; + SbBool needNormals = !mb.isColorOnly() /* || tb.isFunction()*/; mb.sendFirst(); // make sure we have the correct material SbBool ccw = true; - if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) + if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) { ccw = false; + } if (!mode || mesh->countFacets() <= this->renderTriangleLimit) { if (mbind != OVERALL) { @@ -648,7 +667,7 @@ void SoFCMeshObjectShape::GLRender(SoGLRenderAction *action) } } else { -#if 0 && defined (RENDER_GLARRAYS) +#if 0 && defined(RENDER_GLARRAYS) renderCoordsGLArray(action); #else drawPoints(mesh, needNormals, ccw); @@ -660,92 +679,99 @@ void SoFCMeshObjectShape::GLRender(SoGLRenderAction *action) /** * Translates current material binding into the internal Binding enum. */ -SoFCMeshObjectShape::Binding SoFCMeshObjectShape::findMaterialBinding(SoState * const state) const +SoFCMeshObjectShape::Binding SoFCMeshObjectShape::findMaterialBinding(SoState* const state) const { Binding binding = OVERALL; SoMaterialBindingElement::Binding matbind = SoMaterialBindingElement::get(state); switch (matbind) { - case SoMaterialBindingElement::OVERALL: - binding = OVERALL; - break; - case SoMaterialBindingElement::PER_VERTEX: - binding = PER_VERTEX_INDEXED; - break; - case SoMaterialBindingElement::PER_VERTEX_INDEXED: - binding = PER_VERTEX_INDEXED; - break; - case SoMaterialBindingElement::PER_PART: - case SoMaterialBindingElement::PER_FACE: - binding = PER_FACE_INDEXED; - break; - case SoMaterialBindingElement::PER_PART_INDEXED: - case SoMaterialBindingElement::PER_FACE_INDEXED: - binding = PER_FACE_INDEXED; - break; - default: - break; + case SoMaterialBindingElement::OVERALL: + binding = OVERALL; + break; + case SoMaterialBindingElement::PER_VERTEX: + binding = PER_VERTEX_INDEXED; + break; + case SoMaterialBindingElement::PER_VERTEX_INDEXED: + binding = PER_VERTEX_INDEXED; + break; + case SoMaterialBindingElement::PER_PART: + case SoMaterialBindingElement::PER_FACE: + binding = PER_FACE_INDEXED; + break; + case SoMaterialBindingElement::PER_PART_INDEXED: + case SoMaterialBindingElement::PER_FACE_INDEXED: + binding = PER_FACE_INDEXED; + break; + default: + break; } return binding; } /** * Renders the triangles of the complete mesh. - * FIXME: Do it the same way as Coin did to have only one implementation which is controlled by defines + * FIXME: Do it the same way as Coin did to have only one implementation which is controlled by + * defines * FIXME: Implement using different values of transparency for each vertex or face */ -void SoFCMeshObjectShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBundle* mb, - Binding bind, SbBool needNormals, SbBool ccw) const +void SoFCMeshObjectShape::drawFaces(const Mesh::MeshObject* mesh, + SoMaterialBundle* mb, + Binding bind, + SbBool needNormals, + SbBool ccw) const { - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); bool perVertex = (mb && bind == PER_VERTEX_INDEXED); bool perFace = (mb && bind == PER_FACE_INDEXED); - if (needNormals) - { + if (needNormals) { glBegin(GL_TRIANGLES); if (ccw) { // counterclockwise ordering - for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); ++it) - { + for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); + it != rFacets.end(); + ++it) { const MeshCore::MeshPoint& v0 = rPoints[it->_aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[it->_aulPoints[1]]; const MeshCore::MeshPoint& v2 = rPoints[it->_aulPoints[2]]; // Calculate the normal n = (v1-v0)x(v2-v0) float n[3]; - n[0] = (v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y); - n[1] = (v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z); - n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); + n[0] = (v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y); + n[1] = (v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z); + n[2] = (v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x); - if(perFace) - mb->send(it-rFacets.begin(), true); + if (perFace) { + mb->send(it - rFacets.begin(), true); + } glNormal(n); - if(perVertex) - mb->send(it->_aulPoints[0], true); + if (perVertex) { + mb->send(it->_aulPoints[0], true); + } glVertex(v0); - if(perVertex) - mb->send(it->_aulPoints[1], true); + if (perVertex) { + mb->send(it->_aulPoints[1], true); + } glVertex(v1); - if(perVertex) - mb->send(it->_aulPoints[2], true); + if (perVertex) { + mb->send(it->_aulPoints[2], true); + } glVertex(v2); } } else { // clockwise ordering - for (const auto & rFacet : rFacets) - { + for (const auto& rFacet : rFacets) { const MeshCore::MeshPoint& v0 = rPoints[rFacet._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[rFacet._aulPoints[1]]; const MeshCore::MeshPoint& v2 = rPoints[rFacet._aulPoints[2]]; // Calculate the normal n = -(v1-v0)x(v2-v0) float n[3]; - n[0] = -((v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y)); - n[1] = -((v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z)); - n[2] = -((v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x)); + n[0] = -((v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y)); + n[1] = -((v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z)); + n[2] = -((v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x)); glNormal(n); glVertex(v0); @@ -757,8 +783,7 @@ void SoFCMeshObjectShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBun } else { glBegin(GL_TRIANGLES); - for (const auto & rFacet : rFacets) - { + for (const auto& rFacet : rFacets) { glVertex(rPoints[rFacet._aulPoints[0]]); glVertex(rPoints[rFacet._aulPoints[1]]); glVertex(rPoints[rFacet._aulPoints[2]]); @@ -770,62 +795,65 @@ void SoFCMeshObjectShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBun /** * Renders the gravity points of a subset of triangles. */ -void SoFCMeshObjectShape::drawPoints(const Mesh::MeshObject * mesh, SbBool needNormals, SbBool ccw) const +void SoFCMeshObjectShape::drawPoints(const Mesh::MeshObject* mesh, + SbBool needNormals, + SbBool ccw) const { - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); - int mod = rFacets.size()/renderTriangleLimit+1; + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); + int mod = rFacets.size() / renderTriangleLimit + 1; - float size = std::min((float)mod,3.0f); + float size = std::min((float)mod, 3.0f); glPointSize(size); - if (needNormals) - { + if (needNormals) { glBegin(GL_POINTS); - int ct=0; + int ct = 0; if (ccw) { - for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); ++it, ct++) - { - if (ct%mod==0) { + for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); + it != rFacets.end(); + ++it, ct++) { + if (ct % mod == 0) { const MeshCore::MeshPoint& v0 = rPoints[it->_aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[it->_aulPoints[1]]; const MeshCore::MeshPoint& v2 = rPoints[it->_aulPoints[2]]; // Calculate the normal n = (v1-v0)x(v2-v0) float n[3]; - n[0] = (v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y); - n[1] = (v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z); - n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); + n[0] = (v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y); + n[1] = (v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z); + n[2] = (v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x); // Calculate the center point p=(v0+v1+v2)/3 float p[3]; - p[0] = (v0.x+v1.x+v2.x)/3.0f; - p[1] = (v0.y+v1.y+v2.y)/3.0f; - p[2] = (v0.z+v1.z+v2.z)/3.0f; + p[0] = (v0.x + v1.x + v2.x) / 3.0f; + p[1] = (v0.y + v1.y + v2.y) / 3.0f; + p[2] = (v0.z + v1.z + v2.z) / 3.0f; glNormal3fv(n); glVertex3fv(p); } } } else { - for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); ++it, ct++) - { - if (ct%mod==0) { + for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); + it != rFacets.end(); + ++it, ct++) { + if (ct % mod == 0) { const MeshCore::MeshPoint& v0 = rPoints[it->_aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[it->_aulPoints[1]]; const MeshCore::MeshPoint& v2 = rPoints[it->_aulPoints[2]]; // Calculate the normal n = -(v1-v0)x(v2-v0) float n[3]; - n[0] = -((v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y)); - n[1] = -((v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z)); - n[2] = -((v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x)); + n[0] = -((v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y)); + n[1] = -((v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z)); + n[2] = -((v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x)); // Calculate the center point p=(v0+v1+v2)/3 float p[3]; - p[0] = (v0.x+v1.x+v2.x)/3.0f; - p[1] = (v0.y+v1.y+v2.y)/3.0f; - p[2] = (v0.z+v1.z+v2.z)/3.0f; + p[0] = (v0.x + v1.x + v2.x) / 3.0f; + p[1] = (v0.y + v1.y + v2.y) / 3.0f; + p[2] = (v0.z + v1.z + v2.z) / 3.0f; glNormal3fv(n); glVertex3fv(p); } @@ -835,18 +863,18 @@ void SoFCMeshObjectShape::drawPoints(const Mesh::MeshObject * mesh, SbBool needN } else { glBegin(GL_POINTS); - int ct=0; - for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); ++it, ct++) - { - if (ct%mod==0) { + int ct = 0; + for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); it != rFacets.end(); + ++it, ct++) { + if (ct % mod == 0) { const MeshCore::MeshPoint& v0 = rPoints[it->_aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[it->_aulPoints[1]]; const MeshCore::MeshPoint& v2 = rPoints[it->_aulPoints[2]]; // Calculate the center point p=(v0+v1+v2)/3 float p[3]; - p[0] = (v0.x+v1.x+v2.x)/3.0f; - p[1] = (v0.y+v1.y+v2.y)/3.0f; - p[2] = (v0.z+v1.z+v2.z)/3.0f; + p[0] = (v0.x + v1.x + v2.x) / 3.0f; + p[1] = (v0.y + v1.y + v2.y) / 3.0f; + p[2] = (v0.z + v1.z + v2.z) / 3.0f; glVertex3fv(p); } } @@ -854,9 +882,9 @@ void SoFCMeshObjectShape::drawPoints(const Mesh::MeshObject * mesh, SbBool needN } } -void SoFCMeshObjectShape::generateGLArrays(SoState * state) +void SoFCMeshObjectShape::generateGLArrays(SoState* state) { - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); this->index_array.resize(0); this->vertex_array.resize(0); @@ -869,11 +897,11 @@ void SoFCMeshObjectShape::generateGLArrays(SoState * state) const MeshCore::MeshFacetArray& cF = kernel.GetFacets(); // Flat shading - face_vertices.reserve(3 * cF.size() * 6); // duplicate each vertex + face_vertices.reserve(3 * cF.size() * 6); // duplicate each vertex face_indices.resize(3 * cF.size()); int indexed = 0; - for (const auto & it : cF) { + for (const auto& it : cF) { Base::Vector3f n = kernel.GetFacet(it).GetNormal(); for (Mesh::PointIndex ptIndex : it._aulPoints) { face_vertices.push_back(n.x); @@ -892,7 +920,7 @@ void SoFCMeshObjectShape::generateGLArrays(SoState * state) this->vertex_array.swap(face_vertices); } -void SoFCMeshObjectShape::renderFacesGLArray(SoGLRenderAction *action) +void SoFCMeshObjectShape::renderFacesGLArray(SoGLRenderAction* action) { (void)action; GLsizei cnt = static_cast(index_array.size()); @@ -907,7 +935,7 @@ void SoFCMeshObjectShape::renderFacesGLArray(SoGLRenderAction *action) glDisableClientState(GL_NORMAL_ARRAY); } -void SoFCMeshObjectShape::renderCoordsGLArray(SoGLRenderAction *action) +void SoFCMeshObjectShape::renderCoordsGLArray(SoGLRenderAction* action) { (void)action; int cnt = index_array.size(); @@ -922,12 +950,13 @@ void SoFCMeshObjectShape::renderCoordsGLArray(SoGLRenderAction *action) glDisableClientState(GL_NORMAL_ARRAY); } -void SoFCMeshObjectShape::doAction(SoAction * action) +void SoFCMeshObjectShape::doAction(SoAction* action) { if (action->getTypeId() == Gui::SoGLSelectAction::getClassTypeId()) { SoNode* node = action->getNodeAppliedTo(); - if (!node) // on no node applied + if (!node) { // on no node applied return; + } // The node we have is the parent of this node and the coordinate node // thus we search there for it. @@ -936,14 +965,16 @@ void SoFCMeshObjectShape::doAction(SoAction * action) sa.setSearchingAll(false); sa.setType(SoFCMeshObjectNode::getClassTypeId(), 1); sa.apply(node); - SoPath * path = sa.getPath(); - if (!path) + SoPath* path = sa.getPath(); + if (!path) { return; + } // make sure we got the node we wanted SoNode* coords = path->getNodeFromTail(0); - if (!(coords && coords->getTypeId().isDerivedFrom(SoFCMeshObjectNode::getClassTypeId()))) + if (!(coords && coords->getTypeId().isDerivedFrom(SoFCMeshObjectNode::getClassTypeId()))) { return; + } const Mesh::MeshObject* mesh = static_cast(coords)->mesh.getValue(); startSelection(action, mesh); renderSelectionGeometry(mesh); @@ -953,16 +984,16 @@ void SoFCMeshObjectShape::doAction(SoAction * action) inherited::doAction(action); } -void SoFCMeshObjectShape::startSelection(SoAction * action, const Mesh::MeshObject* mesh) +void SoFCMeshObjectShape::startSelection(SoAction* action, const Mesh::MeshObject* mesh) { - Gui::SoGLSelectAction *doaction = static_cast(action); + Gui::SoGLSelectAction* doaction = static_cast(action); const SbViewportRegion& vp = doaction->getViewportRegion(); int x = vp.getViewportOriginPixels()[0]; int y = vp.getViewportOriginPixels()[1]; int w = vp.getViewportSizePixels()[0]; int h = vp.getViewportSizePixels()[1]; - unsigned int bufSize = 5*mesh->countFacets(); // make the buffer big enough + unsigned int bufSize = 5 * mesh->countFacets(); // make the buffer big enough this->selectBuf = new GLuint[bufSize]; glSelectBuffer(bufSize, selectBuf); @@ -972,21 +1003,23 @@ void SoFCMeshObjectShape::startSelection(SoAction * action, const Mesh::MeshObje glPushName(-1); GLint viewport[4]; - glGetIntegerv(GL_VIEWPORT,viewport); + glGetIntegerv(GL_VIEWPORT, viewport); glMatrixMode(GL_PROJECTION); glPushMatrix(); glLoadIdentity(); if (w > 0 && h > 0) { - glTranslatef((viewport[2] - 2 * (x - viewport[0])) / w, (viewport[3] - 2 * (y - viewport[1])) / h, 0); + glTranslatef((viewport[2] - 2 * (x - viewport[0])) / w, + (viewport[3] - 2 * (y - viewport[1])) / h, + 0); glScalef(viewport[2] / w, viewport[3] / h, 1.0); } - glMultMatrixf(/*mp*/this->projection); + glMultMatrixf(/*mp*/ this->projection); glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadMatrixf(this->modelview); } -void SoFCMeshObjectShape::stopSelection(SoAction * action, const Mesh::MeshObject* mesh) +void SoFCMeshObjectShape::stopSelection(SoAction* action, const Mesh::MeshObject* mesh) { // restoring the original projection matrix glPopMatrix(); @@ -998,31 +1031,31 @@ void SoFCMeshObjectShape::stopSelection(SoAction * action, const Mesh::MeshObjec // returning to normal rendering mode GLint hits = glRenderMode(GL_RENDER); - unsigned int bufSize = 5*mesh->countFacets(); - std::vector< std::pair > hit; - GLuint index=0; - for (GLint ii=0;iicountFacets(); + std::vector> hit; + GLuint index = 0; + for (GLint ii = 0; ii < hits && index < bufSize; ii++) { GLint ct = (GLint)selectBuf[index]; - hit.emplace_back(selectBuf[index+1]/4294967295.0,selectBuf[index+3]); - index = index+ct+3; + hit.emplace_back(selectBuf[index + 1] / 4294967295.0, selectBuf[index + 3]); + index = index + ct + 3; } - delete [] selectBuf; + delete[] selectBuf; selectBuf = nullptr; - std::sort(hit.begin(),hit.end()); + std::sort(hit.begin(), hit.end()); - Gui::SoGLSelectAction *doaction = static_cast(action); + Gui::SoGLSelectAction* doaction = static_cast(action); doaction->indices.reserve(hit.size()); - for (GLint ii=0;iiindices.push_back(hit[ii].second); } } void SoFCMeshObjectShape::renderSelectionGeometry(const Mesh::MeshObject* mesh) { - int fcnt=0; - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); + int fcnt = 0; + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); MeshCore::MeshFacetArray::_TConstIterator it_end = rFacets.end(); for (MeshCore::MeshFacetArray::_TConstIterator it = rFacets.begin(); it != it_end; ++it) { const MeshCore::MeshPoint& v0 = rPoints[it->_aulPoints[0]]; @@ -1042,8 +1075,7 @@ void SoFCMeshObjectShape::renderSelectionGeometry(const Mesh::MeshObject* mesh) /** * Calculates picked point based on primitives generated by subclasses. */ -void -SoFCMeshObjectShape::rayPick(SoRayPickAction * action) +void SoFCMeshObjectShape::rayPick(SoRayPickAction* action) { inherited::rayPick(action); } @@ -1055,16 +1087,19 @@ SoFCMeshObjectShape::rayPick(SoRayPickAction * action) */ void SoFCMeshObjectShape::generatePrimitives(SoAction* action) { - SoState* state = action->getState(); + SoState* state = action->getState(); const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); - if (!mesh) + if (!mesh) { return; - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); - if (rPoints.size() < 3) + } + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); + if (rPoints.size() < 3) { return; - if (rFacets.empty()) + } + if (rFacets.empty()) { return; + } // get material binding Binding mbind = this->findMaterialBinding(state); @@ -1077,19 +1112,17 @@ void SoFCMeshObjectShape::generatePrimitives(SoAction* action) vertex.setDetail(&pointDetail); beginShape(action, TRIANGLES, &faceDetail); - try - { - for (const auto & rFacet : rFacets) - { + try { + for (const auto& rFacet : rFacets) { const MeshCore::MeshPoint& v0 = rPoints[rFacet._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[rFacet._aulPoints[1]]; const MeshCore::MeshPoint& v2 = rPoints[rFacet._aulPoints[2]]; // Calculate the normal n = (v1-v0)x(v2-v0) SbVec3f n; - n[0] = (v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y); - n[1] = (v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z); - n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); + n[0] = (v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y); + n[1] = (v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z); + n[2] = (v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x); // Set the normal vertex.setNormal(n); @@ -1140,11 +1173,11 @@ void SoFCMeshObjectShape::generatePrimitives(SoAction* action) * Against the default OpenInventor implementation which returns 0 as well * Coin3d fills in the point and face indices. */ -SoDetail * SoFCMeshObjectShape::createTriangleDetail(SoRayPickAction * action, - const SoPrimitiveVertex * v1, - const SoPrimitiveVertex * v2, - const SoPrimitiveVertex * v3, - SoPickedPoint * pp) +SoDetail* SoFCMeshObjectShape::createTriangleDetail(SoRayPickAction* action, + const SoPrimitiveVertex* v1, + const SoPrimitiveVertex* v2, + const SoPrimitiveVertex* v3, + SoPickedPoint* pp) { SoDetail* detail = inherited::createTriangleDetail(action, v1, v2, v3, pp); return detail; @@ -1153,32 +1186,33 @@ SoDetail * SoFCMeshObjectShape::createTriangleDetail(SoRayPickAction * action, /** * Sets the bounding box of the mesh to \a box and its center to \a center. */ -void SoFCMeshObjectShape::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) +void SoFCMeshObjectShape::computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) { - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); if (mesh && mesh->countPoints() > 0) { Base::BoundBox3f cBox = mesh->getKernel().GetBoundBox(); - box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), - SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ)); + box.setBounds(SbVec3f(cBox.MinX, cBox.MinY, cBox.MinZ), + SbVec3f(cBox.MaxX, cBox.MaxY, cBox.MaxZ)); Base::Vector3f mid = cBox.GetCenter(); - center.setValue(mid.x,mid.y,mid.z); + center.setValue(mid.x, mid.y, mid.z); } else { - box.setBounds(SbVec3f(0,0,0), SbVec3f(0,0,0)); - center.setValue(0.0f,0.0f,0.0f); + box.setBounds(SbVec3f(0, 0, 0), SbVec3f(0, 0, 0)); + center.setValue(0.0f, 0.0f, 0.0f); } } /** * Adds the number of the triangles to the \a SoGetPrimitiveCountAction. */ -void SoFCMeshObjectShape::getPrimitiveCount(SoGetPrimitiveCountAction * action) +void SoFCMeshObjectShape::getPrimitiveCount(SoGetPrimitiveCountAction* action) { - if (!this->shouldPrimitiveCount(action)) + if (!this->shouldPrimitiveCount(action)) { return; - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); + } + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); action->addNumTriangles(mesh->countFacets()); action->addNumPoints(mesh->countPoints()); } @@ -1186,10 +1220,10 @@ void SoFCMeshObjectShape::getPrimitiveCount(SoGetPrimitiveCountAction * action) /** * Counts the number of triangles. If a mesh is not set yet it returns 0. */ -unsigned int SoFCMeshObjectShape::countTriangles(SoAction * action) const +unsigned int SoFCMeshObjectShape::countTriangles(SoAction* action) const { - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); return (unsigned int)mesh->countFacets(); } @@ -1202,7 +1236,8 @@ void SoFCMeshSegmentShape::initClass() SO_NODE_INIT_CLASS(SoFCMeshSegmentShape, SoShape, "Shape"); } -SoFCMeshSegmentShape::SoFCMeshSegmentShape() : renderTriangleLimit(UINT_MAX) +SoFCMeshSegmentShape::SoFCMeshSegmentShape() + : renderTriangleLimit(UINT_MAX) { SO_NODE_CONSTRUCTOR(SoFCMeshSegmentShape); SO_NODE_ADD_FIELD(index, (0)); @@ -1211,34 +1246,37 @@ SoFCMeshSegmentShape::SoFCMeshSegmentShape() : renderTriangleLimit(UINT_MAX) /** * Either renders the complete mesh or only a subset of the points. */ -void SoFCMeshSegmentShape::GLRender(SoGLRenderAction *action) +void SoFCMeshSegmentShape::GLRender(SoGLRenderAction* action) { - if (shouldGLRender(action)) - { - SoState* state = action->getState(); + if (shouldGLRender(action)) { + SoState* state = action->getState(); SbBool mode = Gui::SoFCInteractiveElement::get(state); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); - if (!mesh) + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); + if (!mesh) { return; + } Binding mbind = this->findMaterialBinding(state); SoMaterialBundle mb(action); - //SoTextureCoordinateBundle tb(action, true, false); + // SoTextureCoordinateBundle tb(action, true, false); - SbBool needNormals = !mb.isColorOnly()/* || tb.isFunction()*/; + SbBool needNormals = !mb.isColorOnly() /* || tb.isFunction()*/; mb.sendFirst(); // make sure we have the correct material SbBool ccw = true; - if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) + if (SoShapeHintsElement::getVertexOrdering(state) == SoShapeHintsElement::CLOCKWISE) { ccw = false; + } if (!mode || mesh->countFacets() <= this->renderTriangleLimit) { - if (mbind != OVERALL) + if (mbind != OVERALL) { drawFaces(mesh, &mb, mbind, needNormals, ccw); - else + } + else { drawFaces(mesh, nullptr, mbind, needNormals, ccw); + } } else { drawPoints(mesh, needNormals, ccw); @@ -1249,59 +1287,62 @@ void SoFCMeshSegmentShape::GLRender(SoGLRenderAction *action) /** * Translates current material binding into the internal Binding enum. */ -SoFCMeshSegmentShape::Binding SoFCMeshSegmentShape::findMaterialBinding(SoState * const state) const +SoFCMeshSegmentShape::Binding SoFCMeshSegmentShape::findMaterialBinding(SoState* const state) const { Binding binding = OVERALL; SoMaterialBindingElement::Binding matbind = SoMaterialBindingElement::get(state); switch (matbind) { - case SoMaterialBindingElement::OVERALL: - binding = OVERALL; - break; - case SoMaterialBindingElement::PER_VERTEX: - binding = PER_VERTEX_INDEXED; - break; - case SoMaterialBindingElement::PER_VERTEX_INDEXED: - binding = PER_VERTEX_INDEXED; - break; - case SoMaterialBindingElement::PER_PART: - case SoMaterialBindingElement::PER_FACE: - binding = PER_FACE_INDEXED; - break; - case SoMaterialBindingElement::PER_PART_INDEXED: - case SoMaterialBindingElement::PER_FACE_INDEXED: - binding = PER_FACE_INDEXED; - break; - default: - break; + case SoMaterialBindingElement::OVERALL: + binding = OVERALL; + break; + case SoMaterialBindingElement::PER_VERTEX: + binding = PER_VERTEX_INDEXED; + break; + case SoMaterialBindingElement::PER_VERTEX_INDEXED: + binding = PER_VERTEX_INDEXED; + break; + case SoMaterialBindingElement::PER_PART: + case SoMaterialBindingElement::PER_FACE: + binding = PER_FACE_INDEXED; + break; + case SoMaterialBindingElement::PER_PART_INDEXED: + case SoMaterialBindingElement::PER_FACE_INDEXED: + binding = PER_FACE_INDEXED; + break; + default: + break; } return binding; } /** * Renders the triangles of the complete mesh. - * FIXME: Do it the same way as Coin did to have only one implementation which is controlled by defines + * FIXME: Do it the same way as Coin did to have only one implementation which is controlled by + * defines * FIXME: Implement using different values of transparency for each vertex or face */ -void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBundle* mb, - Binding bind, SbBool needNormals, SbBool ccw) const +void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject* mesh, + SoMaterialBundle* mb, + Binding bind, + SbBool needNormals, + SbBool ccw) const { - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); - if (mesh->countSegments() <= this->index.getValue()) + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); + if (mesh->countSegments() <= this->index.getValue()) { return; - const std::vector rSegm = mesh->getSegment - (this->index.getValue()).getIndices(); + } + const std::vector rSegm = + mesh->getSegment(this->index.getValue()).getIndices(); bool perVertex = (mb && bind == PER_VERTEX_INDEXED); bool perFace = (mb && bind == PER_FACE_INDEXED); - if (needNormals) - { + if (needNormals) { glBegin(GL_TRIANGLES); if (ccw) { // counterclockwise ordering - for (Mesh::FacetIndex it : rSegm) - { + for (Mesh::FacetIndex it : rSegm) { const MeshCore::MeshFacet& f = rFacets[it]; const MeshCore::MeshPoint& v0 = rPoints[f._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[f._aulPoints[1]]; @@ -1309,28 +1350,31 @@ void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBu // Calculate the normal n = (v1-v0)x(v2-v0) float n[3]; - n[0] = (v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y); - n[1] = (v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z); - n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); + n[0] = (v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y); + n[1] = (v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z); + n[2] = (v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x); - if(perFace) - mb->send(it, true); + if (perFace) { + mb->send(it, true); + } glNormal(n); - if(perVertex) - mb->send(f._aulPoints[0], true); + if (perVertex) { + mb->send(f._aulPoints[0], true); + } glVertex(v0); - if(perVertex) - mb->send(f._aulPoints[1], true); + if (perVertex) { + mb->send(f._aulPoints[1], true); + } glVertex(v1); - if(perVertex) - mb->send(f._aulPoints[2], true); + if (perVertex) { + mb->send(f._aulPoints[2], true); + } glVertex(v2); } } else { // clockwise ordering - for (Mesh::FacetIndex it : rSegm) - { + for (Mesh::FacetIndex it : rSegm) { const MeshCore::MeshFacet& f = rFacets[it]; const MeshCore::MeshPoint& v0 = rPoints[f._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[f._aulPoints[1]]; @@ -1338,9 +1382,9 @@ void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBu // Calculate the normal n = -(v1-v0)x(v2-v0) float n[3]; - n[0] = -((v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y)); - n[1] = -((v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z)); - n[2] = -((v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x)); + n[0] = -((v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y)); + n[1] = -((v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z)); + n[2] = -((v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x)); glNormal(n); glVertex(v0); @@ -1352,8 +1396,7 @@ void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBu } else { glBegin(GL_TRIANGLES); - for (Mesh::FacetIndex it : rSegm) - { + for (Mesh::FacetIndex it : rSegm) { const MeshCore::MeshFacet& f = rFacets[it]; glVertex(rPoints[f._aulPoints[0]]); glVertex(rPoints[f._aulPoints[1]]); @@ -1366,27 +1409,30 @@ void SoFCMeshSegmentShape::drawFaces(const Mesh::MeshObject * mesh, SoMaterialBu /** * Renders the gravity points of a subset of triangles. */ -void SoFCMeshSegmentShape::drawPoints(const Mesh::MeshObject * mesh, SbBool needNormals, SbBool ccw) const +void SoFCMeshSegmentShape::drawPoints(const Mesh::MeshObject* mesh, + SbBool needNormals, + SbBool ccw) const { - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); - if (mesh->countSegments() <= this->index.getValue()) + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); + if (mesh->countSegments() <= this->index.getValue()) { return; - const std::vector rSegm = mesh->getSegment - (this->index.getValue()).getIndices(); - int mod = rSegm.size()/renderTriangleLimit+1; + } + const std::vector rSegm = + mesh->getSegment(this->index.getValue()).getIndices(); + int mod = rSegm.size() / renderTriangleLimit + 1; - float size = std::min((float)mod,3.0f); + float size = std::min((float)mod, 3.0f); glPointSize(size); - if (needNormals) - { + if (needNormals) { glBegin(GL_POINTS); - int ct=0; + int ct = 0; if (ccw) { - for (std::vector::const_iterator it = rSegm.begin(); it != rSegm.end(); ++it, ct++) - { - if (ct%mod==0) { + for (std::vector::const_iterator it = rSegm.begin(); + it != rSegm.end(); + ++it, ct++) { + if (ct % mod == 0) { const MeshCore::MeshFacet& f = rFacets[*it]; const MeshCore::MeshPoint& v0 = rPoints[f._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[f._aulPoints[1]]; @@ -1394,24 +1440,25 @@ void SoFCMeshSegmentShape::drawPoints(const Mesh::MeshObject * mesh, SbBool need // Calculate the normal n = (v1-v0)x(v2-v0) float n[3]; - n[0] = (v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y); - n[1] = (v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z); - n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); + n[0] = (v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y); + n[1] = (v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z); + n[2] = (v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x); // Calculate the center point p=(v0+v1+v2)/3 float p[3]; - p[0] = (v0.x+v1.x+v2.x)/3.0f; - p[1] = (v0.y+v1.y+v2.y)/3.0f; - p[2] = (v0.z+v1.z+v2.z)/3.0f; + p[0] = (v0.x + v1.x + v2.x) / 3.0f; + p[1] = (v0.y + v1.y + v2.y) / 3.0f; + p[2] = (v0.z + v1.z + v2.z) / 3.0f; glNormal3fv(n); glVertex3fv(p); } } } else { - for (std::vector::const_iterator it = rSegm.begin(); it != rSegm.end(); ++it, ct++) - { - if (ct%mod==0) { + for (std::vector::const_iterator it = rSegm.begin(); + it != rSegm.end(); + ++it, ct++) { + if (ct % mod == 0) { const MeshCore::MeshFacet& f = rFacets[*it]; const MeshCore::MeshPoint& v0 = rPoints[f._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[f._aulPoints[1]]; @@ -1419,15 +1466,15 @@ void SoFCMeshSegmentShape::drawPoints(const Mesh::MeshObject * mesh, SbBool need // Calculate the normal n = -(v1-v0)x(v2-v0) float n[3]; - n[0] = -((v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y)); - n[1] = -((v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z)); - n[2] = -((v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x)); + n[0] = -((v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y)); + n[1] = -((v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z)); + n[2] = -((v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x)); // Calculate the center point p=(v0+v1+v2)/3 float p[3]; - p[0] = (v0.x+v1.x+v2.x)/3.0f; - p[1] = (v0.y+v1.y+v2.y)/3.0f; - p[2] = (v0.z+v1.z+v2.z)/3.0f; + p[0] = (v0.x + v1.x + v2.x) / 3.0f; + p[1] = (v0.y + v1.y + v2.y) / 3.0f; + p[2] = (v0.z + v1.z + v2.z) / 3.0f; glNormal3fv(n); glVertex3fv(p); } @@ -1437,19 +1484,19 @@ void SoFCMeshSegmentShape::drawPoints(const Mesh::MeshObject * mesh, SbBool need } else { glBegin(GL_POINTS); - int ct=0; - for (std::vector::const_iterator it = rSegm.begin(); it != rSegm.end(); ++it, ct++) - { - if (ct%mod==0) { + int ct = 0; + for (std::vector::const_iterator it = rSegm.begin(); it != rSegm.end(); + ++it, ct++) { + if (ct % mod == 0) { const MeshCore::MeshFacet& f = rFacets[*it]; const MeshCore::MeshPoint& v0 = rPoints[f._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[f._aulPoints[1]]; const MeshCore::MeshPoint& v2 = rPoints[f._aulPoints[2]]; // Calculate the center point p=(v0+v1+v2)/3 float p[3]; - p[0] = (v0.x+v1.x+v2.x)/3.0f; - p[1] = (v0.y+v1.y+v2.y)/3.0f; - p[2] = (v0.z+v1.z+v2.z)/3.0f; + p[0] = (v0.x + v1.x + v2.x) / 3.0f; + p[1] = (v0.y + v1.y + v2.y) / 3.0f; + p[2] = (v0.z + v1.z + v2.z) / 3.0f; glVertex3fv(p); } } @@ -1464,20 +1511,24 @@ void SoFCMeshSegmentShape::drawPoints(const Mesh::MeshObject * mesh, SbBool need */ void SoFCMeshSegmentShape::generatePrimitives(SoAction* action) { - SoState* state = action->getState(); + SoState* state = action->getState(); const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); - if (!mesh) + if (!mesh) { return; - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); - if (rPoints.size() < 3) + } + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); + if (rPoints.size() < 3) { return; - if (rFacets.empty()) + } + if (rFacets.empty()) { return; - if (mesh->countSegments() <= this->index.getValue()) + } + if (mesh->countSegments() <= this->index.getValue()) { return; - const std::vector rSegm = mesh->getSegment - (this->index.getValue()).getIndices(); + } + const std::vector rSegm = + mesh->getSegment(this->index.getValue()).getIndices(); // get material binding Binding mbind = this->findMaterialBinding(state); @@ -1490,10 +1541,8 @@ void SoFCMeshSegmentShape::generatePrimitives(SoAction* action) vertex.setDetail(&pointDetail); beginShape(action, TRIANGLES, &faceDetail); - try - { - for (Mesh::FacetIndex it : rSegm) - { + try { + for (Mesh::FacetIndex it : rSegm) { const MeshCore::MeshFacet& f = rFacets[it]; const MeshCore::MeshPoint& v0 = rPoints[f._aulPoints[0]]; const MeshCore::MeshPoint& v1 = rPoints[f._aulPoints[1]]; @@ -1501,9 +1550,9 @@ void SoFCMeshSegmentShape::generatePrimitives(SoAction* action) // Calculate the normal n = (v1-v0)x(v2-v0) SbVec3f n; - n[0] = (v1.y-v0.y)*(v2.z-v0.z)-(v1.z-v0.z)*(v2.y-v0.y); - n[1] = (v1.z-v0.z)*(v2.x-v0.x)-(v1.x-v0.x)*(v2.z-v0.z); - n[2] = (v1.x-v0.x)*(v2.y-v0.y)-(v1.y-v0.y)*(v2.x-v0.x); + n[0] = (v1.y - v0.y) * (v2.z - v0.z) - (v1.z - v0.z) * (v2.y - v0.y); + n[1] = (v1.z - v0.z) * (v2.x - v0.x) - (v1.x - v0.x) * (v2.z - v0.z); + n[2] = (v1.x - v0.x) * (v2.y - v0.y) - (v1.y - v0.y) * (v2.x - v0.x); // Set the normal vertex.setNormal(n); @@ -1549,13 +1598,13 @@ void SoFCMeshSegmentShape::generatePrimitives(SoAction* action) /** * Sets the bounding box of the mesh to \a box and its center to \a center. */ -void SoFCMeshSegmentShape::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) +void SoFCMeshSegmentShape::computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) { - box.setBounds(SbVec3f(0,0,0), SbVec3f(0,0,0)); - center.setValue(0.0f,0.0f,0.0f); + box.setBounds(SbVec3f(0, 0, 0), SbVec3f(0, 0, 0)); + center.setValue(0.0f, 0.0f, 0.0f); - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); if (mesh && mesh->countSegments() > this->index.getValue()) { const Mesh::Segment& segm = mesh->getSegment(this->index.getValue()); const std::vector& indices = segm.getIndices(); @@ -1571,10 +1620,10 @@ void SoFCMeshSegmentShape::computeBBox(SoAction *action, SbBox3f &box, SbVec3f & cBox.Add(rPoint[face._aulPoints[2]]); } - box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), - SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ)); + box.setBounds(SbVec3f(cBox.MinX, cBox.MinY, cBox.MinZ), + SbVec3f(cBox.MaxX, cBox.MaxY, cBox.MaxZ)); Base::Vector3f mid = cBox.GetCenter(); - center.setValue(mid.x,mid.y,mid.z); + center.setValue(mid.x, mid.y, mid.z); } } } @@ -1582,12 +1631,13 @@ void SoFCMeshSegmentShape::computeBBox(SoAction *action, SbBox3f &box, SbVec3f & /** * Adds the number of the triangles to the \a SoGetPrimitiveCountAction. */ -void SoFCMeshSegmentShape::getPrimitiveCount(SoGetPrimitiveCountAction * action) +void SoFCMeshSegmentShape::getPrimitiveCount(SoGetPrimitiveCountAction* action) { - if (!this->shouldPrimitiveCount(action)) + if (!this->shouldPrimitiveCount(action)) { return; - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); + } + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); if (mesh && mesh->countSegments() > this->index.getValue()) { const Mesh::Segment& segm = mesh->getSegment(this->index.getValue()); action->addNumTriangles(segm.getIndices().size()); @@ -1611,14 +1661,14 @@ SoFCMeshObjectBoundary::SoFCMeshObjectBoundary() /** * Renders the open edges only. */ -void SoFCMeshObjectBoundary::GLRender(SoGLRenderAction *action) +void SoFCMeshObjectBoundary::GLRender(SoGLRenderAction* action) { - if (shouldGLRender(action)) - { - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); - if (!mesh) + if (shouldGLRender(action)) { + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); + if (!mesh) { return; + } SoMaterialBundle mb(action); SoTextureCoordinateBundle tb(action, true, false); @@ -1632,24 +1682,24 @@ void SoFCMeshObjectBoundary::GLRender(SoGLRenderAction *action) /** * Renders the triangles of the complete mesh. */ -void SoFCMeshObjectBoundary::drawLines(const Mesh::MeshObject * mesh) const +void SoFCMeshObjectBoundary::drawLines(const Mesh::MeshObject* mesh) const { - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); // When rendering open edges use the given line width * 3 GLfloat lineWidth; glGetFloatv(GL_LINE_WIDTH, &lineWidth); - glLineWidth(3.0f*lineWidth); + glLineWidth(3.0f * lineWidth); // Use the data structure directly and not through MeshFacetIterator as this // class is quite slowly (at least for rendering) glBegin(GL_LINES); - for (const auto & rFacet : rFacets) { - for (int i=0; i<3; i++) { + for (const auto& rFacet : rFacets) { + for (int i = 0; i < 3; i++) { if (rFacet._aulNeighbours[i] == MeshCore::FACET_INDEX_MAX) { glVertex(rPoints[rFacet._aulPoints[i]]); - glVertex(rPoints[rFacet._aulPoints[(i+1)%3]]); + glVertex(rPoints[rFacet._aulPoints[(i + 1) % 3]]); } } } @@ -1661,12 +1711,13 @@ void SoFCMeshObjectBoundary::generatePrimitives(SoAction* action) { // do not create primitive information as an SoFCMeshObjectShape // should already be used that delivers the information - SoState* state = action->getState(); + SoState* state = action->getState(); const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); - if (!mesh) + if (!mesh) { return; - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); - const MeshCore::MeshFacetArray & rFacets = mesh->getKernel().GetFacets(); + } + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); + const MeshCore::MeshFacetArray& rFacets = mesh->getKernel().GetFacets(); // Create the information when moving over or picking into the scene SoPrimitiveVertex vertex; @@ -1676,12 +1727,11 @@ void SoFCMeshObjectBoundary::generatePrimitives(SoAction* action) vertex.setDetail(&pointDetail); beginShape(action, LINES, &lineDetail); - for (const auto & rFacet : rFacets) - { - for (int i=0; i<3; i++) { + for (const auto& rFacet : rFacets) { + for (int i = 0; i < 3; i++) { if (rFacet._aulNeighbours[i] == MeshCore::FACET_INDEX_MAX) { const MeshCore::MeshPoint& v0 = rPoints[rFacet._aulPoints[i]]; - const MeshCore::MeshPoint& v1 = rPoints[rFacet._aulPoints[(i+1)%3]]; + const MeshCore::MeshPoint& v1 = rPoints[rFacet._aulPoints[(i + 1) % 3]]; // Vertex 0 pointDetail.setCoordinateIndex(rFacet._aulPoints[i]); @@ -1689,7 +1739,7 @@ void SoFCMeshObjectBoundary::generatePrimitives(SoAction* action) shapeVertex(&vertex); // Vertex 1 - pointDetail.setCoordinateIndex(rFacet._aulPoints[(i+1)%3]); + pointDetail.setCoordinateIndex(rFacet._aulPoints[(i + 1) % 3]); vertex.setPoint(sbvec3f(v1)); shapeVertex(&vertex); @@ -1705,44 +1755,48 @@ void SoFCMeshObjectBoundary::generatePrimitives(SoAction* action) /** * Sets the bounding box of the mesh to \a box and its center to \a center. */ -void SoFCMeshObjectBoundary::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) +void SoFCMeshObjectBoundary::computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) { - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); - if (!mesh) + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); + if (!mesh) { return; - const MeshCore::MeshPointArray & rPoints = mesh->getKernel().GetPoints(); + } + const MeshCore::MeshPointArray& rPoints = mesh->getKernel().GetPoints(); if (!rPoints.empty()) { Base::BoundBox3f cBox; - for (const auto & rPoint : rPoints) + for (const auto& rPoint : rPoints) { cBox.Add(rPoint); - box.setBounds(SbVec3f(cBox.MinX,cBox.MinY,cBox.MinZ), - SbVec3f(cBox.MaxX,cBox.MaxY,cBox.MaxZ)); + } + box.setBounds(SbVec3f(cBox.MinX, cBox.MinY, cBox.MinZ), + SbVec3f(cBox.MaxX, cBox.MaxY, cBox.MaxZ)); Base::Vector3f mid = cBox.GetCenter(); - center.setValue(mid.x,mid.y,mid.z); + center.setValue(mid.x, mid.y, mid.z); } else { - box.setBounds(SbVec3f(0,0,0), SbVec3f(0,0,0)); - center.setValue(0.0f,0.0f,0.0f); + box.setBounds(SbVec3f(0, 0, 0), SbVec3f(0, 0, 0)); + center.setValue(0.0f, 0.0f, 0.0f); } } /** * Adds the number of the triangles to the \a SoGetPrimitiveCountAction. */ -void SoFCMeshObjectBoundary::getPrimitiveCount(SoGetPrimitiveCountAction * action) +void SoFCMeshObjectBoundary::getPrimitiveCount(SoGetPrimitiveCountAction* action) { - if (!this->shouldPrimitiveCount(action)) + if (!this->shouldPrimitiveCount(action)) { return; - SoState* state = action->getState(); - const Mesh::MeshObject * mesh = SoFCMeshObjectElement::get(state); - if (!mesh) + } + SoState* state = action->getState(); + const Mesh::MeshObject* mesh = SoFCMeshObjectElement::get(state); + if (!mesh) { return; - const MeshCore::MeshFacetArray & rFaces = mesh->getKernel().GetFacets(); + } + const MeshCore::MeshFacetArray& rFaces = mesh->getKernel().GetFacets(); // Count number of open edges first - int ctEdges=0; - for (const auto & rFace : rFaces) { + int ctEdges = 0; + for (const auto& rFace : rFaces) { for (Mesh::FacetIndex nbIndex : rFace._aulNeighbours) { if (nbIndex == MeshCore::FACET_INDEX_MAX) { ctEdges++; diff --git a/src/Mod/Mesh/Gui/SoFCMeshObject.h b/src/Mod/Mesh/Gui/SoFCMeshObject.h index ac0adf5199..8dd008c233 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshObject.h +++ b/src/Mod/Mesh/Gui/SoFCMeshObject.h @@ -23,12 +23,12 @@ #ifndef MESHGUI_SOFCMESHOBJECT_H #define MESHGUI_SOFCMESHOBJECT_H -#include +#include #include #include #include +#include #include -#include #include @@ -36,14 +36,21 @@ using GLuint = unsigned int; using GLint = int; using GLfloat = float; -namespace MeshCore { class MeshFacetGrid; } +namespace MeshCore +{ +class MeshFacetGrid; +} -namespace MeshGui { +namespace MeshGui +{ -class MeshGuiExport SoSFMeshObject : public SoSField { +class MeshGuiExport SoSFMeshObject: public SoSField +{ using inherited = SoSField; - SO_SFIELD_HEADER(SoSFMeshObject, Base::Reference, Base::Reference) + SO_SFIELD_HEADER(SoSFMeshObject, + Base::Reference, + Base::Reference) public: static void initClass(); @@ -53,7 +60,8 @@ public: // ------------------------------------------------------- -class MeshGuiExport SoFCMeshObjectElement : public SoReplacedElement { +class MeshGuiExport SoFCMeshObjectElement: public SoReplacedElement +{ using inherited = SoReplacedElement; SO_ELEMENT_HEADER(SoFCMeshObjectElement); @@ -61,20 +69,21 @@ class MeshGuiExport SoFCMeshObjectElement : public SoReplacedElement { public: static void initClass(); - void init(SoState * state) override; - static void set(SoState * const state, SoNode * const node, const Mesh::MeshObject * const mesh); - static const Mesh::MeshObject * get(SoState * const state); - static const SoFCMeshObjectElement * getInstance(SoState * state); - void print(FILE * file) const override; + void init(SoState* state) override; + static void set(SoState* const state, SoNode* const node, const Mesh::MeshObject* const mesh); + static const Mesh::MeshObject* get(SoState* const state); + static const SoFCMeshObjectElement* getInstance(SoState* state); + void print(FILE* file) const override; protected: ~SoFCMeshObjectElement() override; - const Mesh::MeshObject *mesh; + const Mesh::MeshObject* mesh; }; // ------------------------------------------------------- -class MeshGuiExport SoFCMeshPickNode : public SoNode { +class MeshGuiExport SoFCMeshPickNode: public SoNode +{ using inherited = SoNode; SO_NODE_HEADER(SoFCMeshPickNode); @@ -82,23 +91,24 @@ class MeshGuiExport SoFCMeshPickNode : public SoNode { public: static void initClass(); SoFCMeshPickNode(); - void notify(SoNotList *) override; + void notify(SoNotList*) override; SoSFMeshObject mesh; - void rayPick(SoRayPickAction * action) override; - void pick(SoPickAction * action) override; + void rayPick(SoRayPickAction* action) override; + void pick(SoPickAction* action) override; protected: ~SoFCMeshPickNode() override; private: - MeshCore::MeshFacetGrid* meshGrid{nullptr}; + MeshCore::MeshFacetGrid* meshGrid {nullptr}; }; // ------------------------------------------------------- -class MeshGuiExport SoFCMeshGridNode : public SoNode { +class MeshGuiExport SoFCMeshGridNode: public SoNode +{ using inherited = SoNode; SO_NODE_HEADER(SoFCMeshGridNode); @@ -106,7 +116,7 @@ class MeshGuiExport SoFCMeshGridNode : public SoNode { public: static void initClass(); SoFCMeshGridNode(); - void GLRender(SoGLRenderAction * action) override; + void GLRender(SoGLRenderAction* action) override; SoSFVec3f minGrid; SoSFVec3f maxGrid; @@ -118,7 +128,8 @@ protected: // ------------------------------------------------------- -class MeshGuiExport SoFCMeshObjectNode : public SoNode { +class MeshGuiExport SoFCMeshObjectNode: public SoNode +{ using inherited = SoNode; SO_NODE_HEADER(SoFCMeshObjectNode); @@ -129,12 +140,12 @@ public: SoSFMeshObject mesh; - void doAction(SoAction * action) override; - void GLRender(SoGLRenderAction * action) override; - void callback(SoCallbackAction * action) override; - void getBoundingBox(SoGetBoundingBoxAction * action) override; - void pick(SoPickAction * action) override; - void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; + void doAction(SoAction* action) override; + void GLRender(SoGLRenderAction* action) override; + void callback(SoCallbackAction* action) override; + void getBoundingBox(SoGetBoundingBoxAction* action) override; + void pick(SoPickAction* action) override; + void getPrimitiveCount(SoGetPrimitiveCountAction* action) override; protected: ~SoFCMeshObjectNode() override; @@ -160,7 +171,8 @@ protected: * * @author Werner Mayer */ -class MeshGuiExport SoFCMeshObjectShape : public SoShape { +class MeshGuiExport SoFCMeshObjectShape: public SoShape +{ using inherited = SoShape; SO_NODE_HEADER(SoFCMeshObjectShape); @@ -172,22 +184,23 @@ public: unsigned int renderTriangleLimit; protected: - void doAction(SoAction * action) override; - void GLRender(SoGLRenderAction *action) override; - void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) override; - void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; - void rayPick (SoRayPickAction *action) override; - void generatePrimitives(SoAction *action) override; - SoDetail * createTriangleDetail(SoRayPickAction * action, - const SoPrimitiveVertex * v1, - const SoPrimitiveVertex * v2, - const SoPrimitiveVertex * v3, - SoPickedPoint * pp) override; + void doAction(SoAction* action) override; + void GLRender(SoGLRenderAction* action) override; + void computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) override; + void getPrimitiveCount(SoGetPrimitiveCountAction* action) override; + void rayPick(SoRayPickAction* action) override; + void generatePrimitives(SoAction* action) override; + SoDetail* createTriangleDetail(SoRayPickAction* action, + const SoPrimitiveVertex* v1, + const SoPrimitiveVertex* v2, + const SoPrimitiveVertex* v3, + SoPickedPoint* pp) override; // Force using the reference count mechanism. ~SoFCMeshObjectShape() override; private: - enum Binding { + enum Binding + { OVERALL = 0, PER_FACE_INDEXED, PER_VERTEX_INDEXED, @@ -195,33 +208,37 @@ private: }; private: - void notify(SoNotList * list) override; - Binding findMaterialBinding(SoState * const state) const; + void notify(SoNotList* list) override; + Binding findMaterialBinding(SoState* const state) const; // Draw faces - void drawFaces(const Mesh::MeshObject *, SoMaterialBundle* mb, Binding bind, - SbBool needNormals, SbBool ccw) const; - void drawPoints(const Mesh::MeshObject *, SbBool needNormals, SbBool ccw) const; - unsigned int countTriangles(SoAction * action) const; + void drawFaces(const Mesh::MeshObject*, + SoMaterialBundle* mb, + Binding bind, + SbBool needNormals, + SbBool ccw) const; + void drawPoints(const Mesh::MeshObject*, SbBool needNormals, SbBool ccw) const; + unsigned int countTriangles(SoAction* action) const; - void startSelection(SoAction * action, const Mesh::MeshObject*); - void stopSelection(SoAction * action, const Mesh::MeshObject*); + void startSelection(SoAction* action, const Mesh::MeshObject*); + void stopSelection(SoAction* action, const Mesh::MeshObject*); void renderSelectionGeometry(const Mesh::MeshObject*); - void generateGLArrays(SoState * state); - void renderFacesGLArray(SoGLRenderAction *action); - void renderCoordsGLArray(SoGLRenderAction *action); + void generateGLArrays(SoState* state); + void renderFacesGLArray(SoGLRenderAction* action); + void renderCoordsGLArray(SoGLRenderAction* action); private: - GLuint *selectBuf{nullptr}; - GLfloat modelview[16]{}; - GLfloat projection[16]{}; + GLuint* selectBuf {nullptr}; + GLfloat modelview[16] {}; + GLfloat projection[16] {}; // Vertex array handling std::vector index_array; std::vector vertex_array; - SbBool updateGLArray{false}; + SbBool updateGLArray {false}; }; -class MeshGuiExport SoFCMeshSegmentShape : public SoShape { +class MeshGuiExport SoFCMeshSegmentShape: public SoShape +{ using inherited = SoShape; SO_NODE_HEADER(SoFCMeshSegmentShape); @@ -234,15 +251,16 @@ public: unsigned int renderTriangleLimit; protected: - void GLRender(SoGLRenderAction *action) override; - void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) override; - void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; - void generatePrimitives(SoAction *action) override; + void GLRender(SoGLRenderAction* action) override; + void computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) override; + void getPrimitiveCount(SoGetPrimitiveCountAction* action) override; + void generatePrimitives(SoAction* action) override; // Force using the reference count mechanism. ~SoFCMeshSegmentShape() override = default; private: - enum Binding { + enum Binding + { OVERALL = 0, PER_FACE_INDEXED, PER_VERTEX_INDEXED, @@ -250,14 +268,18 @@ private: }; private: - Binding findMaterialBinding(SoState * const state) const; + Binding findMaterialBinding(SoState* const state) const; // Draw faces - void drawFaces(const Mesh::MeshObject *, SoMaterialBundle* mb, Binding bind, - SbBool needNormals, SbBool ccw) const; - void drawPoints(const Mesh::MeshObject *, SbBool needNormals, SbBool ccw) const; + void drawFaces(const Mesh::MeshObject*, + SoMaterialBundle* mb, + Binding bind, + SbBool needNormals, + SbBool ccw) const; + void drawPoints(const Mesh::MeshObject*, SbBool needNormals, SbBool ccw) const; }; -class MeshGuiExport SoFCMeshObjectBoundary : public SoShape { +class MeshGuiExport SoFCMeshObjectBoundary: public SoShape +{ using inherited = SoShape; SO_NODE_HEADER(SoFCMeshObjectBoundary); @@ -267,19 +289,18 @@ public: SoFCMeshObjectBoundary(); protected: - void GLRender(SoGLRenderAction *action) override; - void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) override; - void getPrimitiveCount(SoGetPrimitiveCountAction * action) override; - void generatePrimitives(SoAction *action) override; + void GLRender(SoGLRenderAction* action) override; + void computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) override; + void getPrimitiveCount(SoGetPrimitiveCountAction* action) override; + void generatePrimitives(SoAction* action) override; // Force using the reference count mechanism. ~SoFCMeshObjectBoundary() override = default; private: - void drawLines(const Mesh::MeshObject *) const ; + void drawLines(const Mesh::MeshObject*) const; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_SOFCMESHOBJECT_H - +#endif // MESHGUI_SOFCMESHOBJECT_H diff --git a/src/Mod/Mesh/Gui/SoPolygon.cpp b/src/Mod/Mesh/Gui/SoPolygon.cpp index a25c8695a1..572bd2a086 100644 --- a/src/Mod/Mesh/Gui/SoPolygon.cpp +++ b/src/Mod/Mesh/Gui/SoPolygon.cpp @@ -22,23 +22,23 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# ifdef FC_OS_WIN32 -# include -# endif -# ifdef FC_OS_MACOSX -# include -# else -# include -# endif -# include -# include +#ifdef FC_OS_WIN32 +#include +#endif +#ifdef FC_OS_MACOSX +#include +#else +#include +#endif +#include +#include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #include "SoPolygon.h" @@ -66,17 +66,18 @@ SoPolygon::SoPolygon() /** * Renders the polygon. */ -void SoPolygon::GLRender(SoGLRenderAction *action) +void SoPolygon::GLRender(SoGLRenderAction* action) { - if (shouldGLRender(action) && render.getValue()) - { - SoState* state = action->getState(); - const SoCoordinateElement * coords = SoCoordinateElement::getInstance(state); - if (!coords) + if (shouldGLRender(action) && render.getValue()) { + SoState* state = action->getState(); + const SoCoordinateElement* coords = SoCoordinateElement::getInstance(state); + if (!coords) { return; - const SbVec3f * points = coords->getArrayPtr3(); - if (!points) + } + const SbVec3f* points = coords->getArrayPtr3(); + if (!points) { return; + } SoMaterialBundle mb(action); SoTextureCoordinateBundle tb(action, true, false); @@ -91,18 +92,19 @@ void SoPolygon::GLRender(SoGLRenderAction *action) /** * Renders the polygon. */ -void SoPolygon::drawPolygon(const SbVec3f * points,int32_t len) const +void SoPolygon::drawPolygon(const SbVec3f* points, int32_t len) const { glLineWidth(3.0f); int32_t beg = startIndex.getValue(); int32_t cnt = numVertices.getValue(); int32_t end = beg + cnt; - if (end > len) - return; // wrong setup, too few points + if (end > len) { + return; // wrong setup, too few points + } // draw control mesh glBegin(GL_LINES); for (int32_t i = beg; i < end; ++i) { - int32_t j = (i-beg+1) % cnt + beg; + int32_t j = (i - beg + 1) % cnt + beg; glVertex3fv(points[i].getValue()); glVertex3fv(points[j].getValue()); } @@ -112,11 +114,10 @@ void SoPolygon::drawPolygon(const SbVec3f * points,int32_t len) const /** * Calculates picked point based on primitives generated by subclasses. */ -void -SoPolygon::rayPick(SoRayPickAction * action) +void SoPolygon::rayPick(SoRayPickAction* action) { - //if (this->shouldRayPick(action)) { - // this->computeObjectSpaceRay(action); + // if (this->shouldRayPick(action)) { + // this->computeObjectSpaceRay(action); // const SoBoundingBoxCache* bboxcache = getBoundingBoxCache(); // if (!bboxcache || !bboxcache->isValid(action->getState()) || @@ -128,43 +129,43 @@ SoPolygon::rayPick(SoRayPickAction * action) } void SoPolygon::generatePrimitives(SoAction* /*action*/) -{ -} +{} /** * Sets the bounding box of the mesh to \a box and its center to \a center. */ -void SoPolygon::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) +void SoPolygon::computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) { - SoState* state = action->getState(); - const SoCoordinateElement * coords = SoCoordinateElement::getInstance(state); - if (!coords) + SoState* state = action->getState(); + const SoCoordinateElement* coords = SoCoordinateElement::getInstance(state); + if (!coords) { return; - const SbVec3f * points = coords->getArrayPtr3(); - if (!points) + } + const SbVec3f* points = coords->getArrayPtr3(); + if (!points) { return; - float maxX=-FLT_MAX, minX=FLT_MAX, - maxY=-FLT_MAX, minY=FLT_MAX, - maxZ=-FLT_MAX, minZ=FLT_MAX; + } + float maxX = -FLT_MAX, minX = FLT_MAX, maxY = -FLT_MAX, minY = FLT_MAX, maxZ = -FLT_MAX, + minZ = FLT_MAX; int32_t len = coords->getNum(); int32_t beg = startIndex.getValue(); int32_t cnt = numVertices.getValue(); int32_t end = beg + cnt; if (end <= len) { - for (int32_t i=beg; i(maxX,points[i][0]); - minX = std::min(minX,points[i][0]); - maxY = std::max(maxY,points[i][1]); - minY = std::min(minY,points[i][1]); - maxZ = std::max(maxZ,points[i][2]); - minZ = std::min(minZ,points[i][2]); + for (int32_t i = beg; i < end; i++) { + maxX = std::max(maxX, points[i][0]); + minX = std::min(minX, points[i][0]); + maxY = std::max(maxY, points[i][1]); + minY = std::min(minY, points[i][1]); + maxZ = std::max(maxZ, points[i][2]); + minZ = std::min(minZ, points[i][2]); } - box.setBounds(minX,minY,minZ,maxX,maxY,maxZ); - center.setValue(0.5f*(minX+maxX),0.5f*(minY+maxY),0.5f*(minZ+maxZ)); + box.setBounds(minX, minY, minZ, maxX, maxY, maxZ); + center.setValue(0.5f * (minX + maxX), 0.5f * (minY + maxY), 0.5f * (minZ + maxZ)); } else { - box.setBounds(SbVec3f(0,0,0), SbVec3f(0,0,0)); - center.setValue(0.0f,0.0f,0.0f); + box.setBounds(SbVec3f(0, 0, 0), SbVec3f(0, 0, 0)); + center.setValue(0.0f, 0.0f, 0.0f); } } diff --git a/src/Mod/Mesh/Gui/SoPolygon.h b/src/Mod/Mesh/Gui/SoPolygon.h index afa4d1df0a..0801d99ae2 100644 --- a/src/Mod/Mesh/Gui/SoPolygon.h +++ b/src/Mod/Mesh/Gui/SoPolygon.h @@ -28,13 +28,15 @@ #include #include #ifndef MESH_GLOBAL_H -# include +#include #endif -namespace MeshGui { +namespace MeshGui +{ -class MeshGuiExport SoPolygon : public SoShape { +class MeshGuiExport SoPolygon: public SoShape +{ using inherited = SoShape; SO_NODE_HEADER(SoPolygon); @@ -45,22 +47,21 @@ public: SoSFInt32 startIndex; SoSFInt32 numVertices; - SoSFBool highlight; - SoSFBool render; + SoSFBool highlight; + SoSFBool render; protected: ~SoPolygon() override = default; - void GLRender(SoGLRenderAction *action) override; - void computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) override; - void rayPick (SoRayPickAction *action) override; - void generatePrimitives(SoAction *action) override; + void GLRender(SoGLRenderAction* action) override; + void computeBBox(SoAction* action, SbBox3f& box, SbVec3f& center) override; + void rayPick(SoRayPickAction* action) override; + void generatePrimitives(SoAction* action) override; private: - void drawPolygon(const SbVec3f *,int32_t) const; + void drawPolygon(const SbVec3f*, int32_t) const; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_SOPOLYGON_H - +#endif // MESHGUI_SOPOLYGON_H diff --git a/src/Mod/Mesh/Gui/ThumbnailExtension.cpp b/src/Mod/Mesh/Gui/ThumbnailExtension.cpp index 0a15266feb..6a678216d6 100644 --- a/src/Mod/Mesh/Gui/ThumbnailExtension.cpp +++ b/src/Mod/Mesh/Gui/ThumbnailExtension.cpp @@ -22,16 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include #endif #include @@ -42,7 +42,7 @@ using namespace MeshGui; -Mesh::Extension3MF::Resource ThumbnailExtension3MF::addMesh(const Mesh::MeshObject &mesh) +Mesh::Extension3MF::Resource ThumbnailExtension3MF::addMesh(const Mesh::MeshObject& mesh) { SoCoordinate3* coord = new SoCoordinate3(); SoIndexedFaceSet* faces = new SoIndexedFaceSet(); @@ -78,7 +78,8 @@ Mesh::Extension3MF::Resource ThumbnailExtension3MF::addMesh(const Mesh::MeshObje Mesh::Extension3MF::Resource res; res.extension = "png"; res.contentType = "image/png"; - res.relationshipType = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail"; + res.relationshipType = + "http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail"; res.fileContent = std::string(data.data(), data.size()); setContentName(res); diff --git a/src/Mod/Mesh/Gui/ThumbnailExtension.h b/src/Mod/Mesh/Gui/ThumbnailExtension.h index e773e40b86..4b80c074a4 100644 --- a/src/Mod/Mesh/Gui/ThumbnailExtension.h +++ b/src/Mod/Mesh/Gui/ThumbnailExtension.h @@ -23,14 +23,16 @@ #ifndef MESHGUI_THUMBNAIL_EXTENSION_H #define MESHGUI_THUMBNAIL_EXTENSION_H -#include #include +#include -namespace MeshGui { +namespace MeshGui +{ -class ThumbnailExtension3MF : public Mesh::Extension3MF { +class ThumbnailExtension3MF: public Mesh::Extension3MF +{ public: - Mesh::Extension3MF::Resource addMesh(const Mesh::MeshObject & mesh) override; + Mesh::Extension3MF::Resource addMesh(const Mesh::MeshObject& mesh) override; private: void setContentName(Mesh::Extension3MF::Resource&); @@ -39,15 +41,18 @@ private: int index = 0; }; -class ThumbnailExtensionProducer : public Mesh::Extension3MFProducer { +class ThumbnailExtensionProducer: public Mesh::Extension3MFProducer +{ public: - Mesh::AbstractFormatExtensionPtr create() const override { + Mesh::AbstractFormatExtensionPtr create() const override + { return std::make_shared(); } - void initialize() override {} + void initialize() override + {} }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_THUMBNAIL_EXTENSION_H +#endif // MESHGUI_THUMBNAIL_EXTENSION_H diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index d16a0e468e..a2dbc6c431 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -22,37 +22,37 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif -#include #include #include +#include #include #include @@ -68,15 +68,14 @@ #include #include #include +#include #include #include #include -#include #include +#include #include #include -#include -#include #include #include #include @@ -84,28 +83,30 @@ #include #include #include +#include #include #include -#include "ViewProvider.h" #include "SoFCIndexedFaceSet.h" #include "SoFCMeshObject.h" +#include "ViewProvider.h" using namespace MeshGui; namespace sp = std::placeholders; using Mesh::Feature; -using MeshCore::MeshKernel; -using MeshCore::MeshPointIterator; +using MeshCore::MeshFacet; using MeshCore::MeshFacetIterator; using MeshCore::MeshGeomFacet; -using MeshCore::MeshFacet; +using MeshCore::MeshKernel; +using MeshCore::MeshPointIterator; -void ViewProviderMeshBuilder::buildNodes(const App::Property* prop, std::vector& nodes) const +void ViewProviderMeshBuilder::buildNodes(const App::Property* prop, + std::vector& nodes) const { - SoCoordinate3 *pcPointsCoord=nullptr; - SoIndexedFaceSet *pcFaces=nullptr; + SoCoordinate3* pcPointsCoord = nullptr; + SoIndexedFaceSet* pcFaces = nullptr; if (nodes.empty()) { pcPointsCoord = new SoCoordinate3(); @@ -114,46 +115,53 @@ void ViewProviderMeshBuilder::buildNodes(const App::Property* prop, std::vector< nodes.push_back(pcFaces); } else if (nodes.size() == 2) { - if (nodes[0]->getTypeId() == SoCoordinate3::getClassTypeId()) + if (nodes[0]->getTypeId() == SoCoordinate3::getClassTypeId()) { pcPointsCoord = static_cast(nodes[0]); - if (nodes[1]->getTypeId() == SoIndexedFaceSet::getClassTypeId()) + } + if (nodes[1]->getTypeId() == SoIndexedFaceSet::getClassTypeId()) { pcFaces = static_cast(nodes[1]); + } } - if (pcPointsCoord && pcFaces) + if (pcPointsCoord && pcFaces) { createMesh(prop, pcPointsCoord, pcFaces); + } } -void ViewProviderMeshBuilder::createMesh(const App::Property* prop, SoCoordinate3* coords, SoIndexedFaceSet* faces) const +void ViewProviderMeshBuilder::createMesh(const App::Property* prop, + SoCoordinate3* coords, + SoIndexedFaceSet* faces) const { const Mesh::PropertyMeshKernel* mesh = static_cast(prop); const MeshCore::MeshKernel& rcMesh = mesh->getValue().getKernel(); createMesh(rcMesh, coords, faces); } -void ViewProviderMeshBuilder::createMesh(const MeshCore::MeshKernel& kernel, SoCoordinate3* coords, SoIndexedFaceSet* faces) const +void ViewProviderMeshBuilder::createMesh(const MeshCore::MeshKernel& kernel, + SoCoordinate3* coords, + SoIndexedFaceSet* faces) const { // set the point coordinates const MeshCore::MeshPointArray& cP = kernel.GetPoints(); coords->point.setNum(kernel.CountPoints()); SbVec3f* verts = coords->point.startEditing(); - int i=0; + int i = 0; for (MeshCore::MeshPointArray::_TConstIterator it = cP.begin(); it != cP.end(); ++it, i++) { verts[i].setValue(it->x, it->y, it->z); } coords->point.finishEditing(); // set the face indices - int j=0; + int j = 0; const MeshCore::MeshFacetArray& cF = kernel.GetFacets(); - faces->coordIndex.setNum(4*kernel.CountFacets()); + faces->coordIndex.setNum(4 * kernel.CountFacets()); int32_t* indices = faces->coordIndex.startEditing(); for (MeshCore::MeshFacetArray::_TConstIterator it = cF.begin(); it != cF.end(); ++it, j++) { - for (int i=0; i<3; i++) { - indices[4*j+i] = it->_aulPoints[i]; + for (int i = 0; i < 3; i++) { + indices[4 * j + i] = it->_aulPoints[i]; } - indices[4*j+3] = SO_END_FACE_INDEX; + indices[4 * j + 3] = SO_END_FACE_INDEX; } faces->coordIndex.finishEditing(); } @@ -178,6 +186,7 @@ const char* ViewProviderExport::getDefaultDisplayMode() const QIcon ViewProviderExport::getIcon() const { + // clang-format off const char * Mesh_Feature_xpm[] = { "22 22 6 1", ". c None", @@ -210,6 +219,7 @@ QIcon ViewProviderExport::getIcon() const "......................"}; QPixmap px(Mesh_Feature_xpm); return px; + // clang-format on } // ------------------------------------------------------ @@ -217,33 +227,39 @@ QIcon ViewProviderExport::getIcon() const App::PropertyFloatConstraint::Constraints ViewProviderMesh::floatRange = {1.0f, 64.0f, 1.0f}; App::PropertyFloatConstraint::Constraints ViewProviderMesh::angleRange = {0.0f, 180.0f, 1.0f}; App::PropertyIntegerConstraint::Constraints ViewProviderMesh::intPercent = {0, 100, 5}; -const char* ViewProviderMesh::LightingEnums[]= {"One side", "Two side", nullptr}; +const char* ViewProviderMesh::LightingEnums[] = {"One side", "Two side", nullptr}; PROPERTY_SOURCE(MeshGui::ViewProviderMesh, Gui::ViewProviderGeometryObject) -ViewProviderMesh::ViewProviderMesh() : highlightMode{HighlighMode::None} +ViewProviderMesh::ViewProviderMesh() + : highlightMode {HighlighMode::None} { - static const char *osgroup = "Object Style"; + static const char* osgroup = "Object Style"; - ADD_PROPERTY_TYPE(LineTransparency,(0), osgroup, App::Prop_None, "Set line transparency."); + ADD_PROPERTY_TYPE(LineTransparency, (0), osgroup, App::Prop_None, "Set line transparency."); LineTransparency.setConstraints(&intPercent); - ADD_PROPERTY_TYPE(LineWidth,(1.0f), osgroup, App::Prop_None, "Set line width."); + ADD_PROPERTY_TYPE(LineWidth, (1.0f), osgroup, App::Prop_None, "Set line width."); LineWidth.setConstraints(&floatRange); - ADD_PROPERTY_TYPE(PointSize,(2.0f), osgroup, App::Prop_None, "Set point size."); + ADD_PROPERTY_TYPE(PointSize, (2.0f), osgroup, App::Prop_None, "Set point size."); PointSize.setConstraints(&floatRange); - ADD_PROPERTY_TYPE(CreaseAngle,(0.0f), osgroup, App::Prop_None, "Set crease angle."); + ADD_PROPERTY_TYPE(CreaseAngle, (0.0f), osgroup, App::Prop_None, "Set crease angle."); CreaseAngle.setConstraints(&angleRange); - ADD_PROPERTY_TYPE(OpenEdges,(false), osgroup, App::Prop_None, "Set open edges."); - ADD_PROPERTY_TYPE(Coloring,(false), osgroup, App::Prop_None, "Set coloring."); - ADD_PROPERTY_TYPE(Lighting,(1), osgroup, App::Prop_None, "Set if the illumination comes from two sides\n or one side in the 3D view."); + ADD_PROPERTY_TYPE(OpenEdges, (false), osgroup, App::Prop_None, "Set open edges."); + ADD_PROPERTY_TYPE(Coloring, (false), osgroup, App::Prop_None, "Set coloring."); + ADD_PROPERTY_TYPE(Lighting, + (1), + osgroup, + App::Prop_None, + "Set if the illumination comes from two sides\n or one side in the 3D view."); Lighting.setEnums(LightingEnums); - ADD_PROPERTY_TYPE(LineColor,(0,0,0), osgroup, App::Prop_None, "Set line color."); + ADD_PROPERTY_TYPE(LineColor, (0, 0, 0), osgroup, App::Prop_None, "Set line color."); // Create the selection node pcHighlight = Gui::ViewProviderBuilder::createSelection(); pcHighlight->ref(); - if (pcHighlight->selectionMode.getValue() == Gui::SoFCSelection::SEL_OFF) + if (pcHighlight->selectionMode.getValue() == Gui::SoFCSelection::SEL_OFF) { Selectable.setValue(false); + } pcShapeGroup = new SoGroup(); pcShapeGroup->ref(); @@ -276,7 +292,8 @@ ViewProviderMesh::ViewProviderMesh() : highlightMode{HighlighMode::None} LineColor.touch(); // read the correct shape color from the preferences - Base::Reference hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); + Base::Reference hGrp = + Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); // Mesh color App::Color color = ShapeColor.getValue(); @@ -299,8 +316,12 @@ ViewProviderMesh::ViewProviderMesh() : highlightMode{HighlighMode::None} LineTransparency.setValue(hGrp->GetInt("LineTransparency", 0)); bool twoside = hGrp->GetBool("TwoSideRendering", false); - if (twoside) Lighting.setValue(1); - else Lighting.setValue((long)0); + if (twoside) { + Lighting.setValue(1); + } + else { + Lighting.setValue((long)0); + } bool normal_per_vertex = hGrp->GetBool("VertexPerNormals", false); if (normal_per_vertex) { @@ -334,7 +355,7 @@ void ViewProviderMesh::onChanged(const App::Property* prop) pcMatBinding->value = SoMaterialBinding::OVERALL; } if (prop == &LineTransparency) { - float trans = LineTransparency.getValue()/100.0f; + float trans = LineTransparency.getValue() / 100.0f; pLineColor->transparency = trans; } else if (prop == &LineWidth) { @@ -359,14 +380,14 @@ void ViewProviderMesh::onChanged(const App::Property* prop) } else if (prop == &LineColor) { const App::Color& c = LineColor.getValue(); - pLineColor->diffuseColor.setValue(c.r,c.g,c.b); + pLineColor->diffuseColor.setValue(c.r, c.g, c.b); } else if (prop == &Coloring) { tryColorPerVertexOrFace(Coloring.getValue()); } else if (prop == &SelectionStyle) { - pcHighlight->style = SelectionStyle.getValue() ? Gui::SoFCSelection::BOX - : Gui::SoFCSelection::EMISSIVE; + pcHighlight->style = + SelectionStyle.getValue() ? Gui::SoFCSelection::BOX : Gui::SoFCSelection::EMISSIVE; } else { // Set the inverse color for open edges @@ -383,9 +404,12 @@ void ViewProviderMesh::onChanged(const App::Property* prop) void ViewProviderMesh::setOpenEdgeColorFrom(const App::Color& c) { - float r=1.0f-c.r; r = r < 0.5f ? 0.0f : 1.0f; - float g=1.0f-c.g; g = g < 0.5f ? 0.0f : 1.0f; - float b=1.0f-c.b; b = b < 0.5f ? 0.0f : 1.0f; + float r = 1.0f - c.r; + r = r < 0.5f ? 0.0f : 1.0f; + float g = 1.0f - c.g; + g = g < 0.5f ? 0.0f : 1.0f; + float b = 1.0f - c.b; + b = b < 0.5f ? 0.0f : 1.0f; pOpenColor->rgb.setValue(r, g, b); } @@ -403,7 +427,7 @@ SoNode* ViewProviderMesh::getCoordNode() const * Extracts the mesh data from the feature \a pcFeature and creates * an Inventor node \a SoNode with these data. */ -void ViewProviderMesh::attach(App::DocumentObject *pcFeat) +void ViewProviderMesh::attach(App::DocumentObject* pcFeat) { ViewProviderGeometryObject::attach(pcFeat); @@ -441,7 +465,7 @@ void ViewProviderMesh::attach(App::DocumentObject *pcFeat) pcWireRoot->addChild(pcLineStyle); pcWireRoot->addChild(pcLightModel); SoMaterialBinding* binding = new SoMaterialBinding; - binding->value = SoMaterialBinding::OVERALL; // doesn't set several colors + binding->value = SoMaterialBinding::OVERALL; // doesn't set several colors pcWireRoot->addChild(binding); pcWireRoot->addChild(pLineColor); pcWireRoot->addChild(pcHighlight); @@ -497,9 +521,9 @@ QIcon ViewProviderMesh::getIcon() const App::PropertyColorList* ViewProviderMesh::getColorProperty() const { if (pcObject) { - std::map Map; + std::map Map; pcObject->getPropertyMap(Map); - for (const auto & it : Map) { + for (const auto& it : Map) { Base::Type type = it.second->getTypeId(); if (type == App::PropertyColorList::getClassTypeId()) { App::PropertyColorList* colors = static_cast(it.second); @@ -507,7 +531,7 @@ App::PropertyColorList* ViewProviderMesh::getColorProperty() const } } } - return nullptr; // no such property found + return nullptr; // no such property found } void ViewProviderMesh::tryColorPerVertexOrFace(bool on) @@ -572,8 +596,8 @@ void ViewProviderMesh::tryColorPerVertexOrFace(bool on) else { pcMatBinding->value = SoMaterialBinding::OVERALL; const App::Color& c = ShapeColor.getValue(); - pcShapeMaterial->diffuseColor.setValue(c.r,c.g,c.b); - pcShapeMaterial->transparency.setValue(Transparency.getValue()/100.0f); + pcShapeMaterial->diffuseColor.setValue(c.r, c.g, c.b); + pcShapeMaterial->transparency.setValue(Transparency.getValue() / 100.0f); } } @@ -594,7 +618,7 @@ void ViewProviderMesh::setColorField(const std::vector& val, SoMFCol field.setNum(val.size()); SbColor* col = field.startEditing(); - std::size_t i=0; + std::size_t i = 0; for (auto it : val) { col[i++].setValue(it.r, it.g, it.b); } @@ -625,9 +649,9 @@ void ViewProviderMesh::setEmissiveColor(const std::vector& val) Mesh::PropertyMaterial* ViewProviderMesh::getMaterialProperty() const { if (pcObject) { - std::map Map; + std::map Map; pcObject->getPropertyMap(Map); - for (const auto & it : Map) { + for (const auto& it : Map) { Base::Type type = it.second->getTypeId(); if (type == Mesh::PropertyMaterial::getClassTypeId()) { Mesh::PropertyMaterial* material = static_cast(it.second); @@ -636,21 +660,21 @@ Mesh::PropertyMaterial* ViewProviderMesh::getMaterialProperty() const } } - return nullptr; // no such property found + return nullptr; // no such property found } void ViewProviderMesh::setDisplayMode(const char* ModeName) { - if (strcmp("Shaded",ModeName)==0) { + if (strcmp("Shaded", ModeName) == 0) { setDisplayMaskMode("Shaded"); } - else if (strcmp("Points",ModeName)==0) { + else if (strcmp("Points", ModeName) == 0) { setDisplayMaskMode("Point"); } - else if (strcmp("Flat Lines",ModeName)==0) { + else if (strcmp("Flat Lines", ModeName) == 0) { setDisplayMaskMode("Flat Lines"); } - else if (strcmp("Wireframe",ModeName)==0) { + else if (strcmp("Wireframe", ModeName) == 0) { setDisplayMaskMode("Wireframe"); } @@ -670,7 +694,9 @@ std::vector ViewProviderMesh::getDisplayModes() const return StrList; } -bool ViewProviderMesh::exportToVrml(const char* filename, const MeshCore::Material& mat, bool binary) const +bool ViewProviderMesh::exportToVrml(const char* filename, + const MeshCore::Material& mat, + bool binary) const { SoCoordinate3* coords = new SoCoordinate3(); SoIndexedFaceSet* faces = new SoIndexedFaceSet(); @@ -683,15 +709,16 @@ bool ViewProviderMesh::exportToVrml(const char* filename, const MeshCore::Materi if (static_cast(mat.diffuseColor.size()) == coords->point.getNum()) { binding->value = SoMaterialBinding::PER_VERTEX_INDEXED; } - else if (static_cast(mat.diffuseColor.size()) == faces->coordIndex.getNum()/4) { + else if (static_cast(mat.diffuseColor.size()) == faces->coordIndex.getNum() / 4) { binding->value = SoMaterialBinding::PER_FACE_INDEXED; } if (mat.diffuseColor.size() > 1) { material->diffuseColor.setNum(mat.diffuseColor.size()); SbColor* colors = material->diffuseColor.startEditing(); - for (unsigned int i=0; idiffuseColor.finishEditing(); } @@ -706,10 +733,10 @@ bool ViewProviderMesh::exportToVrml(const char* filename, const MeshCore::Materi group->ref(); tovrml2.apply(group); group->unref(); - SoVRMLGroup *vrmlRoot = tovrml2.getVRML2SceneGraph(); + SoVRMLGroup* vrmlRoot = tovrml2.getVRML2SceneGraph(); vrmlRoot->ref(); std::string buffer = Gui::SoFCDB::writeNodesToString(vrmlRoot); - vrmlRoot->unref(); // release the memory as soon as possible + vrmlRoot->unref(); // release the memory as soon as possible Base::FileInfo fi(filename); if (binary) { @@ -746,19 +773,22 @@ void ViewProviderMesh::exportMesh(const char* filename, const char* fmt) const int numColors = pcShapeMaterial->diffuseColor.getNum(); const SbColor* colors = pcShapeMaterial->diffuseColor.getValues(0); mat.diffuseColor.reserve(numColors); - for (int i=0; i(getObject())->Mesh.getValue(); mesh.setPlacement(static_cast(getObject())->globalPlacement()); - if (mat.diffuseColor.size() == mesh.countPoints()) + if (mat.diffuseColor.size() == mesh.countPoints()) { mat.binding = MeshCore::MeshIO::PER_VERTEX; - else if (mat.diffuseColor.size() == mesh.countFacets()) + } + else if (mat.diffuseColor.size() == mesh.countFacets()) { mat.binding = MeshCore::MeshIO::PER_FACE; - else + } + else { mat.binding = MeshCore::MeshIO::OVERALL; + } mesh.save(filename, format, &mat, getObject()->Label.getValue()); } @@ -771,17 +801,17 @@ void ViewProviderMesh::setupContextMenu(QMenu* menu, QObject* receiver, const ch Gui::ActionFunction* func = new Gui::ActionFunction(menu); QAction* act = menu->addAction(QObject::tr("Display components")); act->setCheckable(true); - act->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && - highlightMode == HighlighMode::Component); - func->toggle(act, [this](bool on){ + act->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE + && highlightMode == HighlighMode::Component); + func->toggle(act, [this](bool on) { this->setHighlightedComponents(on); }); QAction* seg = menu->addAction(QObject::tr("Display segments")); seg->setCheckable(true); - seg->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE && - highlightMode == HighlighMode::Segment); - func->toggle(seg, [this](bool on){ + seg->setChecked(pcMatBinding->value.getValue() == SoMaterialBinding::PER_FACE + && highlightMode == HighlighMode::Segment); + func->toggle(seg, [this](bool on) { this->setHighlightedSegments(on); }); @@ -789,30 +819,36 @@ void ViewProviderMesh::setupContextMenu(QMenu* menu, QObject* receiver, const ch col->setVisible(canHighlightColors()); col->setCheckable(true); col->setChecked(highlightMode == HighlighMode::Color); - func->toggle(col, [this](bool on){ + func->toggle(col, [this](bool on) { this->setHighlightedColors(on); }); } bool ViewProviderMesh::setEdit(int ModNum) { - if (ModNum == ViewProvider::Transform) + if (ModNum == ViewProvider::Transform) { return ViewProviderGeometryObject::setEdit(ModNum); - else if (ModNum == ViewProvider::Color) + } + else if (ModNum == ViewProvider::Color) { highlightComponents(); + } return true; } void ViewProviderMesh::unsetEdit(int ModNum) { - if (ModNum == ViewProvider::Transform) + if (ModNum == ViewProvider::Transform) { ViewProviderGeometryObject::unsetEdit(ModNum); - else if (ModNum == ViewProvider::Color) + } + else if (ModNum == ViewProvider::Color) { unhighlightSelection(); + } } -bool ViewProviderMesh::createToolMesh(const std::vector& rclPoly, const SbViewVolume& vol, - const Base::Vector3f& rcNormal, std::vector& aFaces) +bool ViewProviderMesh::createToolMesh(const std::vector& rclPoly, + const SbViewVolume& vol, + const Base::Vector3f& rcNormal, + std::vector& aFaces) { float fX, fY, fZ; SbVec3f pt1, pt2, pt3, pt4; @@ -822,10 +858,12 @@ bool ViewProviderMesh::createToolMesh(const std::vector& rclPoly, const for (std::vector::const_iterator it = rclPoly.begin(); it != rclPoly.end(); ++it) { // the following element std::vector::const_iterator nt = it + 1; - if (nt == rclPoly.end()) + if (nt == rclPoly.end()) { nt = rclPoly.begin(); - else if (*it == *nt) - continue; // two adjacent vertices are equal + } + else if (*it == *nt) { + continue; // two adjacent vertices are equal + } vol.projectPointToLine(*it, pt1, pt2); vol.projectPointToLine(*nt, pt3, pt4); @@ -837,8 +875,9 @@ bool ViewProviderMesh::createToolMesh(const std::vector& rclPoly, const face._aclPoints[1].Set(fX, fY, fZ); pt3.getValue(fX, fY, fZ); face._aclPoints[2].Set(fX, fY, fZ); - if (face.Area() > 0) + if (face.Area() > 0) { aFaces.push_back(face); + } // 2nd facet pt1.getValue(fX, fY, fZ); @@ -847,17 +886,18 @@ bool ViewProviderMesh::createToolMesh(const std::vector& rclPoly, const face._aclPoints[1].Set(fX, fY, fZ); pt4.getValue(fX, fY, fZ); face._aclPoints[2].Set(fX, fY, fZ); - if (face.Area() > 0) + if (face.Area() > 0) { aFaces.push_back(face); + } - if (it+1 < rclPoly.end()) { + if (it + 1 < rclPoly.end()) { pt1.getValue(fX, fY, fZ); - top.emplace_back(fX, fY, fZ ); + top.emplace_back(fX, fY, fZ); pt2.getValue(fX, fY, fZ); - bottom.emplace_back(fX, fY, fZ ); + bottom.emplace_back(fX, fY, fZ); // polygon we need to triangulate (in x,y-plane) it->getValue(fX, fY); - polygon.emplace_back(fX, fY, 0.0f ); + polygon.emplace_back(fX, fY, 0.0f); } } @@ -868,7 +908,7 @@ bool ViewProviderMesh::createToolMesh(const std::vector& rclPoly, const bool ok = cTria.TriangulatePolygon(); std::vector faces = cTria.GetFacets(); - for (const auto & face : faces) { + for (const auto& face : faces) { MeshGeomFacet topFacet; topFacet._aclPoints[0] = top[face._aulPoints[0]]; topFacet._aclPoints[1] = top[face._aulPoints[1]]; @@ -898,8 +938,10 @@ void ViewProviderMesh::showOpenEdges(bool show) (void)show; } -namespace MeshGui { -class MeshSplit { +namespace MeshGui +{ +class MeshSplit +{ public: MeshSplit(ViewProviderMesh* mesh, const std::vector& poly, @@ -907,10 +949,9 @@ public: : mesh(mesh) , poly(poly) , proj(proj) + {} + void cutMesh() { - - } - void cutMesh() { Gui::Document* gui = mesh->getDocument(); gui->openCommand(QT_TRANSLATE_NOOP("Command", "Cut")); ViewProviderMesh* copy = makeCopy(); @@ -919,7 +960,8 @@ public: gui->commitCommand(); delete this; } - void trimMesh() { + void trimMesh() + { Gui::Document* gui = mesh->getDocument(); gui->openCommand(QT_TRANSLATE_NOOP("Command", "Trim")); ViewProviderMesh* copy = makeCopy(); @@ -928,7 +970,8 @@ public: gui->commitCommand(); delete this; } - ViewProviderMesh* makeCopy() const { + ViewProviderMesh* makeCopy() const + { Gui::Document* gui = mesh->getDocument(); App::Document* doc = gui->getDocument(); @@ -945,29 +988,33 @@ private: std::vector poly; Gui::ViewVolumeProjection proj; }; -} +} // namespace MeshGui -void ViewProviderMesh::clipMeshCallback(void * ud, SoEventCallback * n) +void ViewProviderMesh::clipMeshCallback(void* ud, SoEventCallback* n) { // show the wait cursor because this could take quite some time Gui::WaitCursor wc; // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); view->setEditing(false); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), clipMeshCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), clipMeshCallback, ud); n->setHandled(); Gui::SelectionRole role; std::vector clPoly = view->getGLPolygon(&role); - if (clPoly.size() < 3) + if (clPoly.size() < 3) { return; - if (clPoly.front() != clPoly.back()) + } + if (clPoly.front() != clPoly.back()) { clPoly.push_back(clPoly.front()); + } - std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); + std::vector views = + view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); if (!views.empty()) { - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Cut")); + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Cut")); bool commitCommand = false; for (auto it : views) { ViewProviderMesh* self = static_cast(it); @@ -976,8 +1023,9 @@ void ViewProviderMesh::clipMeshCallback(void * ud, SoEventCallback * n) SoCamera* cam = view->getSoRenderManager()->getCamera(); SbViewVolume vv = cam->getViewVolume(); Gui::ViewVolumeProjection proj(vv); - proj.setTransform(static_cast(self->getObject())-> - Placement.getValue().toMatrix()); + proj.setTransform(static_cast(self->getObject()) + ->Placement.getValue() + .toMatrix()); if (role == Gui::SelectionRole::Inner) { self->cutMesh(clPoly, proj, true); commitCommand = true; @@ -993,7 +1041,7 @@ void ViewProviderMesh::clipMeshCallback(void * ud, SoEventCallback * n) Gui::TimerFunction* func = new Gui::TimerFunction(); func->setAutoDelete(true); MeshSplit* split = new MeshSplit(self, clPoly, proj); - func->setFunction([split](){ + func->setFunction([split]() { split->cutMesh(); }); func->singleShot(0); @@ -1001,36 +1049,42 @@ void ViewProviderMesh::clipMeshCallback(void * ud, SoEventCallback * n) } } - if (commitCommand) + if (commitCommand) { Gui::Application::Instance->activeDocument()->commitCommand(); - else + } + else { Gui::Application::Instance->activeDocument()->abortCommand(); + } view->redraw(); } } -void ViewProviderMesh::trimMeshCallback(void * ud, SoEventCallback * n) +void ViewProviderMesh::trimMeshCallback(void* ud, SoEventCallback* n) { // show the wait cursor because this could take quite some time Gui::WaitCursor wc; // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); view->setEditing(false); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), trimMeshCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), trimMeshCallback, ud); n->setHandled(); Gui::SelectionRole role; std::vector clPoly = view->getGLPolygon(&role); - if (clPoly.size() < 3) + if (clPoly.size() < 3) { return; - if (clPoly.front() != clPoly.back()) + } + if (clPoly.front() != clPoly.back()) { clPoly.push_back(clPoly.front()); + } - std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); + std::vector views = + view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); if (!views.empty()) { - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Trim")); + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Trim")); bool commitCommand = false; for (auto it : views) { ViewProviderMesh* self = static_cast(it); @@ -1039,8 +1093,9 @@ void ViewProviderMesh::trimMeshCallback(void * ud, SoEventCallback * n) SoCamera* cam = view->getSoRenderManager()->getCamera(); SbViewVolume vv = cam->getViewVolume(); Gui::ViewVolumeProjection proj(vv); - proj.setTransform(static_cast(self->getObject())-> - Placement.getValue().toMatrix()); + proj.setTransform(static_cast(self->getObject()) + ->Placement.getValue() + .toMatrix()); if (role == Gui::SelectionRole::Inner) { self->trimMesh(clPoly, proj, true); commitCommand = true; @@ -1056,7 +1111,7 @@ void ViewProviderMesh::trimMeshCallback(void * ud, SoEventCallback * n) Gui::TimerFunction* func = new Gui::TimerFunction(); func->setAutoDelete(true); MeshSplit* split = new MeshSplit(self, clPoly, proj); - func->setFunction([split](){ + func->setFunction([split]() { split->trimMesh(); }); func->singleShot(0); @@ -1064,44 +1119,50 @@ void ViewProviderMesh::trimMeshCallback(void * ud, SoEventCallback * n) } } - if (commitCommand) + if (commitCommand) { Gui::Application::Instance->activeDocument()->commitCommand(); - else + } + else { Gui::Application::Instance->activeDocument()->abortCommand(); + } view->redraw(); } } -void ViewProviderMesh::partMeshCallback(void * ud, SoEventCallback * cb) +void ViewProviderMesh::partMeshCallback(void* ud, SoEventCallback* cb) { // show the wait cursor because this could take quite some time Gui::WaitCursor wc; // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = static_cast(cb->getUserData()); + Gui::View3DInventorViewer* view = static_cast(cb->getUserData()); view->setEditing(false); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), partMeshCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), partMeshCallback, ud); cb->setHandled(); Gui::SelectionRole role; std::vector clPoly = view->getGLPolygon(&role); - if (clPoly.size() < 3) + if (clPoly.size() < 3) { return; - if (clPoly.front() != clPoly.back()) + } + if (clPoly.front() != clPoly.back()) { clPoly.push_back(clPoly.front()); + } // get the normal of the front clipping plane - SbVec3f b,n; + SbVec3f b, n; view->getNearPlane(b, n); - Base::Vector3f cNormal(n[0],n[1],n[2]); + Base::Vector3f cNormal(n[0], n[1], n[2]); SoCamera* pCam = view->getSoRenderManager()->getCamera(); - SbViewVolume vol = pCam->getViewVolume(); + SbViewVolume vol = pCam->getViewVolume(); // create a tool shape from these points std::vector aFaces; - if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) - Base::Console().Message("The picked polygon seems to have self-overlappings. This could lead to strange results."); + if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) { + Base::Console().Message("The picked polygon seems to have self-overlappings. This could " + "lead to strange results."); + } MeshCore::MeshKernel toolMesh; bool locked = Base::Sequencer().setLocked(true); @@ -1109,26 +1170,31 @@ void ViewProviderMesh::partMeshCallback(void * ud, SoEventCallback * cb) Base::Sequencer().setLocked(locked); // Open a transaction object for the undo/redo stuff - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Split")); + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Split")); try { - std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); + std::vector views = + view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); for (auto view : views) { ViewProviderMesh* that = static_cast(view); if (that->getEditingMode() > -1) { that->finishEditing(); - Base::Placement plm = static_cast(that->getObject())->Placement.getValue(); + Base::Placement plm = + static_cast(that->getObject())->Placement.getValue(); plm.invert(); MeshCore::MeshKernel copyToolMesh(toolMesh); copyToolMesh.Transform(plm.toMatrix()); - if (role == Gui::SelectionRole::Inner) + if (role == Gui::SelectionRole::Inner) { that->splitMesh(copyToolMesh, cNormal, true); - else + } + else { that->splitMesh(copyToolMesh, cNormal, false); + } } } } - catch(...) { + catch (...) { // Don't rethrow any exception } @@ -1137,35 +1203,39 @@ void ViewProviderMesh::partMeshCallback(void * ud, SoEventCallback * cb) view->redraw(); } -void ViewProviderMesh::segmMeshCallback(void * ud, SoEventCallback * cb) +void ViewProviderMesh::segmMeshCallback(void* ud, SoEventCallback* cb) { // show the wait cursor because this could take quite some time Gui::WaitCursor wc; // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = static_cast(cb->getUserData()); + Gui::View3DInventorViewer* view = static_cast(cb->getUserData()); view->setEditing(false); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), segmMeshCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), segmMeshCallback, ud); cb->setHandled(); Gui::SelectionRole role; std::vector clPoly = view->getGLPolygon(&role); - if (clPoly.size() < 3) + if (clPoly.size() < 3) { return; - if (clPoly.front() != clPoly.back()) + } + if (clPoly.front() != clPoly.back()) { clPoly.push_back(clPoly.front()); + } // get the normal of the front clipping plane - SbVec3f b,n; + SbVec3f b, n; view->getNearPlane(b, n); - Base::Vector3f cNormal(n[0],n[1],n[2]); + Base::Vector3f cNormal(n[0], n[1], n[2]); SoCamera* pCam = view->getSoRenderManager()->getCamera(); - SbViewVolume vol = pCam->getViewVolume(); + SbViewVolume vol = pCam->getViewVolume(); // create a tool shape from these points std::vector aFaces; - if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) - Base::Console().Message("The picked polygon seems to have self-overlappings. This could lead to strange results."); + if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) { + Base::Console().Message("The picked polygon seems to have self-overlappings. This could " + "lead to strange results."); + } MeshCore::MeshKernel toolMesh; bool locked = Base::Sequencer().setLocked(true); @@ -1173,26 +1243,31 @@ void ViewProviderMesh::segmMeshCallback(void * ud, SoEventCallback * cb) Base::Sequencer().setLocked(locked); // Open a transaction object for the undo/redo stuff - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Segment")); + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Segment")); try { - std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); + std::vector views = + view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); for (auto view : views) { ViewProviderMesh* that = static_cast(view); if (that->getEditingMode() > -1) { that->finishEditing(); - Base::Placement plm = static_cast(that->getObject())->Placement.getValue(); + Base::Placement plm = + static_cast(that->getObject())->Placement.getValue(); plm.invert(); MeshCore::MeshKernel copyToolMesh(toolMesh); copyToolMesh.Transform(plm.toMatrix()); - if (role == Gui::SelectionRole::Inner) + if (role == Gui::SelectionRole::Inner) { that->segmentMesh(copyToolMesh, cNormal, true); - else + } + else { that->segmentMesh(copyToolMesh, cNormal, false); + } } } } - catch(...) { + catch (...) { // Don't rethrow any exception } @@ -1201,30 +1276,32 @@ void ViewProviderMesh::segmMeshCallback(void * ud, SoEventCallback * cb) view->redraw(); } -void ViewProviderMesh::selectGLCallback(void * ud, SoEventCallback * n) +void ViewProviderMesh::selectGLCallback(void* ud, SoEventCallback* n) { // When this callback function is invoked we must in either case leave the edit mode - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); view->setEditing(false); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), selectGLCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), selectGLCallback, ud); n->setHandled(); std::vector clPoly = view->getGLPolygon(); - if (clPoly.size() != 2) + if (clPoly.size() != 2) { return; + } const SoEvent* ev = n->getEvent(); SbVec2f pos = clPoly[0]; - float pX,pY; pos.getValue(pX,pY); + float pX, pY; + pos.getValue(pX, pY); const SbVec2s& sz = view->getSoRenderManager()->getViewportRegion().getViewportSizePixels(); float fRatio = view->getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); if (fRatio > 1.0f) { pX = (pX - 0.5f) / fRatio + 0.5f; - pos.setValue(pX,pY); + pos.setValue(pX, pY); } else if (fRatio < 1.0f) { pY = (pY - 0.5f) * fRatio + 0.5f; - pos.setValue(pX,pY); + pos.setValue(pX, pY); } short x1 = (short)(pX * sz[0] + 0.5f); @@ -1233,12 +1310,16 @@ void ViewProviderMesh::selectGLCallback(void * ud, SoEventCallback * n) short x2 = loc[0]; short y2 = loc[1]; - short x = (x1+x2)/2; - short y = (y1+y2)/2; - short w = (x2-x1); - short h = (y2-y1); - if (w<0) w = -w; - if (h<0) h = -h; + short x = (x1 + x2) / 2; + short y = (y1 + y2) / 2; + short w = (x2 - x1); + short h = (y2 - y1); + if (w < 0) { + w = -w; + } + if (h < 0) { + h = -h; + } std::vector views; views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); @@ -1246,7 +1327,12 @@ void ViewProviderMesh::selectGLCallback(void * ud, SoEventCallback * n) ViewProviderMesh* that = static_cast(it); if (that->getEditingMode() > -1) { that->finishEditing(); - that->selectArea(x, y, w, h, view->getSoRenderManager()->getViewportRegion(), view->getSoRenderManager()->getCamera()); + that->selectArea(x, + y, + w, + h, + view->getSoRenderManager()->getViewportRegion(), + view->getSoRenderManager()->getCamera()); } } @@ -1260,8 +1346,9 @@ void ViewProviderMesh::getFacetsFromPolygon(const std::vector& picked, { const bool ok = true; Base::Polygon2d polygon; - for (auto it : picked) - polygon.Add(Base::Vector2d(it[0],it[1])); + for (auto it : picked) { + polygon.Add(Base::Vector2d(it[0], it[1])); + } // Get the attached mesh property Mesh::PropertyMeshKernel& meshProp = static_cast(pcObject)->Mesh; @@ -1274,18 +1361,20 @@ void ViewProviderMesh::getFacetsFromPolygon(const std::vector& picked, std::generate(complete.begin(), complete.end(), Base::iotaGen(0)); std::sort(indices.begin(), indices.end()); std::vector complementary; - std::back_insert_iterator > biit(complementary); + std::back_insert_iterator> biit(complementary); std::set_difference(complete.begin(), complete.end(), indices.begin(), indices.end(), biit); indices = complementary; } - if (!ok) // note: the mouse grabbing needs to be released - Base::Console().Message("The picked polygon seems to have self-overlappings. This could lead to strange results."); + if (!ok) { // note: the mouse grabbing needs to be released + Base::Console().Message("The picked polygon seems to have self-overlappings. This could " + "lead to strange results."); + } } std::vector ViewProviderMesh::getFacetsOfRegion(const SbViewportRegion& select, - const SbViewportRegion& region, - SoCamera* camera) const + const SbViewportRegion& region, + SoCamera* camera) const { SoSeparator* root = new SoSeparator(); root->ref(); @@ -1301,13 +1390,18 @@ std::vector ViewProviderMesh::getFacetsOfRegion(const SbViewpo return faces; } -void ViewProviderMesh::panCamera(SoCamera * cam, float aspectratio, const SbPlane & panplane, - const SbVec2f & currpos, const SbVec2f & prevpos) +void ViewProviderMesh::panCamera(SoCamera* cam, + float aspectratio, + const SbPlane& panplane, + const SbVec2f& currpos, + const SbVec2f& prevpos) { - if (!cam) // can happen for empty scenegraph + if (!cam) { // can happen for empty scenegraph return; - if (currpos == prevpos) // useless invocation + } + if (currpos == prevpos) { // useless invocation return; + } // Find projection points for the last and current mouse coordinates. @@ -1325,31 +1419,33 @@ void ViewProviderMesh::panCamera(SoCamera * cam, float aspectratio, const SbPlan cam->position = cam->position.getValue() - (current_planept - old_planept); } -void ViewProviderMesh::boxZoom(const SbBox2s& box, const SbViewportRegion & vp, SoCamera* cam) +void ViewProviderMesh::boxZoom(const SbBox2s& box, const SbViewportRegion& vp, SoCamera* cam) { SbViewVolume vv = cam->getViewVolume(vp.getViewportAspectRatio()); - short sizeX,sizeY; + short sizeX, sizeY; box.getSize(sizeX, sizeY); SbVec2s size = vp.getViewportSizePixels(); // The bbox must not be empty i.e. width and length is zero, but it is possible that // either width or length is zero - if (sizeX == 0 && sizeY == 0) + if (sizeX == 0 && sizeY == 0) { return; + } // Get the new center in normalized pixel coordinates - short xmin,xmax,ymin,ymax; - box.getBounds(xmin,ymin,xmax,ymax); - const SbVec2f center((float) ((xmin+xmax)/2) / (float) std::max((int)(size[0] - 1), 1), - (float) (size[1]-(ymin+ymax)/2) / (float) std::max((int)(size[1] - 1), 1)); + short xmin, xmax, ymin, ymax; + box.getBounds(xmin, ymin, xmax, ymax); + const SbVec2f center((float)((xmin + xmax) / 2) / (float)std::max((int)(size[0] - 1), 1), + (float)(size[1] - (ymin + ymax) / 2) + / (float)std::max((int)(size[1] - 1), 1)); SbPlane plane = vv.getPlane(cam->focalDistance.getValue()); - panCamera(cam,vp.getViewportAspectRatio(),plane, SbVec2f(0.5,0.5), center); + panCamera(cam, vp.getViewportAspectRatio(), plane, SbVec2f(0.5, 0.5), center); // Set height or height angle of the camera - float scaleX = (float)sizeX/(float)size[0]; - float scaleY = (float)sizeY/(float)size[1]; + float scaleX = (float)sizeX / (float)size[0]; + float scaleY = (float)sizeY / (float)size[1]; float scale = std::max(scaleX, scaleY); if (cam->getTypeId() == SoOrthographicCamera::getClassTypeId()) { float height = static_cast(cam)->height.getValue() * scale; @@ -1362,18 +1458,19 @@ void ViewProviderMesh::boxZoom(const SbBox2s& box, const SbViewportRegion & vp, } } -std::vector ViewProviderMesh::getVisibleFacetsAfterZoom(const SbBox2s& rect, - const SbViewportRegion& vp, - SoCamera* camera) const +std::vector +ViewProviderMesh::getVisibleFacetsAfterZoom(const SbBox2s& rect, + const SbViewportRegion& vp, + SoCamera* camera) const { // camera copy will be deleted inside getVisibleFacets() // because the ref counter reaches 0 camera = static_cast(camera->copy()); - boxZoom(rect,vp,camera); + boxZoom(rect, vp, camera); return getVisibleFacets(vp, camera); } -void ViewProviderMesh::renderGLCallback(void * ud, SoAction * action) +void ViewProviderMesh::renderGLCallback(void* ud, SoAction* action) { if (action->isOfType(SoGLRenderAction::getClassTypeId())) { ViewProviderMesh* mesh = static_cast(ud); @@ -1382,7 +1479,8 @@ void ViewProviderMesh::renderGLCallback(void * ud, SoAction * action) } } -namespace MeshGui { +namespace MeshGui +{ class Vertex { @@ -1390,11 +1488,10 @@ public: Vertex(const MeshCore::MeshKernel& kernel, const MeshCore::MeshFacetGrid& grid, const Base::Vector3f& pos) - : kernel(kernel) - , grid(grid) - , pos(pos) - { - } + : kernel(kernel) + , grid(grid) + , pos(pos) + {} bool visible(const Base::Vector3f& base) const { MeshCore::MeshAlgorithm meshAlg(kernel); @@ -1408,10 +1505,10 @@ private: Base::Vector3f pos; }; -} +} // namespace MeshGui std::vector ViewProviderMesh::getVisibleFacets(const SbViewportRegion& vp, - SoCamera* camera) const + SoCamera* camera) const { const Mesh::PropertyMeshKernel& meshProp = static_cast(pcObject)->Mesh; const Mesh::MeshObject& mesh = meshProp.getValue(); @@ -1427,9 +1524,9 @@ std::vector ViewProviderMesh::getVisibleFacets(const SbViewpor SoMaterial* mat = new SoMaterial(); mat->diffuseColor.setNum(count); SbColor* diffcol = mat->diffuseColor.startEditing(); - for (uint32_t i=0; idiffuseColor.finishEditing(); @@ -1442,8 +1539,8 @@ std::vector ViewProviderMesh::getVisibleFacets(const SbViewpor root->addChild(this->getCoordNode()); root->addChild(this->getShapeNode()); - // Coin3d's off-screen renderer doesn't work out-of-the-box any more on most recent Linux systems. - // So, use FreeCAD's offscreen renderer now. + // Coin3d's off-screen renderer doesn't work out-of-the-box any more on most recent Linux + // systems. So, use FreeCAD's offscreen renderer now. Gui::SoQtOffscreenRenderer renderer(vp); renderer.setBackgroundColor(SbColor4f(0.0f, 0.0f, 0.0f)); @@ -1454,12 +1551,12 @@ std::vector ViewProviderMesh::getVisibleFacets(const SbViewpor int width = img.width(); int height = img.height(); - QRgb color=0; + QRgb color = 0; std::vector faces; for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++) { - QRgb rgb = img.pixel(x,y); - rgb = rgb-(0xff << 24); + QRgb rgb = img.pixel(x, y); + rgb = rgb - (0xff << 24); if (rgb != 0 && rgb != color) { color = rgb; faces.push_back((Mesh::FacetIndex)rgb); @@ -1474,7 +1571,8 @@ std::vector ViewProviderMesh::getVisibleFacets(const SbViewpor } void ViewProviderMesh::cutMesh(const std::vector& picked, - const Base::ViewProjMethod& proj, SbBool inner) + const Base::ViewProjMethod& proj, + SbBool inner) { // Get the facet indices inside the tool mesh std::vector indices; @@ -1483,23 +1581,25 @@ void ViewProviderMesh::cutMesh(const std::vector& picked, } void ViewProviderMesh::trimMesh(const std::vector& polygon, - const Base::ViewProjMethod& proj, SbBool inner) + const Base::ViewProjMethod& proj, + SbBool inner) { Mesh::MeshObject* mesh = static_cast(pcObject)->Mesh.startEditing(); Base::Polygon2d polygon2d; - for (auto it : polygon) - polygon2d.Add(Base::Vector2d(it[0],it[1])); + for (auto it : polygon) { + polygon2d.Add(Base::Vector2d(it[0], it[1])); + } - Mesh::MeshObject::CutType type = inner ? - Mesh::MeshObject::INNER : - Mesh::MeshObject::OUTER; + Mesh::MeshObject::CutType type = inner ? Mesh::MeshObject::INNER : Mesh::MeshObject::OUTER; mesh->trim(polygon2d, proj, type); static_cast(pcObject)->Mesh.finishEditing(); pcObject->purgeTouched(); } -void ViewProviderMesh::splitMesh(const MeshCore::MeshKernel& toolMesh, const Base::Vector3f& normal, SbBool clip_inner) +void ViewProviderMesh::splitMesh(const MeshCore::MeshKernel& toolMesh, + const Base::Vector3f& normal, + SbBool clip_inner) { // Get the attached mesh property Mesh::PropertyMeshKernel& meshProp = static_cast(pcObject)->Mesh; @@ -1516,7 +1616,7 @@ void ViewProviderMesh::splitMesh(const MeshCore::MeshKernel& toolMesh, const Bas std::generate(complete.begin(), complete.end(), Base::iotaGen(0)); std::sort(indices.begin(), indices.end()); std::vector complementary; - std::back_insert_iterator > biit(complementary); + std::back_insert_iterator> biit(complementary); std::set_difference(complete.begin(), complete.end(), indices.begin(), indices.end(), biit); indices = complementary; } @@ -1524,14 +1624,17 @@ void ViewProviderMesh::splitMesh(const MeshCore::MeshKernel& toolMesh, const Bas // Remove the facets from the mesh and create a new one Mesh::MeshObject* kernel = meshProp.getValue().meshFromSegment(indices); removeFacets(indices); - Mesh::Feature* splitMesh = static_cast(App::GetApplication().getActiveDocument() - ->addObject("Mesh::Feature",pcObject->getNameInDocument())); + Mesh::Feature* splitMesh = static_cast( + App::GetApplication().getActiveDocument()->addObject("Mesh::Feature", + pcObject->getNameInDocument())); // Note: deletes also kernel splitMesh->Mesh.setValuePtr(kernel); static_cast(pcObject)->purgeTouched(); } -void ViewProviderMesh::segmentMesh(const MeshCore::MeshKernel& toolMesh, const Base::Vector3f& normal, SbBool clip_inner) +void ViewProviderMesh::segmentMesh(const MeshCore::MeshKernel& toolMesh, + const Base::Vector3f& normal, + SbBool clip_inner) { // Get the attached mesh property Mesh::PropertyMeshKernel& meshProp = static_cast(pcObject)->Mesh; @@ -1548,7 +1651,7 @@ void ViewProviderMesh::segmentMesh(const MeshCore::MeshKernel& toolMesh, const B std::generate(complete.begin(), complete.end(), Base::iotaGen(0)); std::sort(indices.begin(), indices.end()); std::vector complementary; - std::back_insert_iterator > biit(complementary); + std::back_insert_iterator> biit(complementary); std::set_difference(complete.begin(), complete.end(), indices.begin(), indices.end(), biit); indices = complementary; } @@ -1559,12 +1662,13 @@ void ViewProviderMesh::segmentMesh(const MeshCore::MeshKernel& toolMesh, const B static_cast(pcObject)->purgeTouched(); } -void ViewProviderMesh::faceInfoCallback(void * ud, SoEventCallback * n) +void ViewProviderMesh::faceInfoCallback(void* ud, SoEventCallback* n) { - const SoMouseButtonEvent * mbe = static_cast(n->getEvent()); - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + const SoMouseButtonEvent* mbe = static_cast(n->getEvent()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); - // Mark all incoming mouse button events as handled, especially, to deactivate the selection node + // Mark all incoming mouse button events as handled, especially, to deactivate the selection + // node n->getAction()->setHandled(); if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { n->setHandled(); @@ -1575,20 +1679,23 @@ void ViewProviderMesh::faceInfoCallback(void * ud, SoEventCallback * n) if (cl == id) { view->setEditing(false); view->getWidget()->setCursor(QCursor(Qt::ArrowCursor)); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), faceInfoCallback,ud); - std::list glItems = view->getGraphicsItemsOfType(Gui::GLFlagWindow::getClassTypeId()); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), faceInfoCallback, ud); + std::list glItems = + view->getGraphicsItemsOfType(Gui::GLFlagWindow::getClassTypeId()); for (auto glItem : glItems) { view->removeGraphicsItem(glItem); delete glItem; } // See comment below - ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View"); + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/View"); hGrp->SetBool("ShowNaviCube", hGrp->GetBool("ShowNaviCube", true)); } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { - const SoPickedPoint * point = n->getPickedPoint(); + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::DOWN) { + const SoPickedPoint* point = n->getPickedPoint(); if (!point) { Base::Console().Message("No facet picked.\n"); return; @@ -1599,8 +1706,9 @@ void ViewProviderMesh::faceInfoCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) + if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) { return; + } // FIXME: The Flag class doesn't work well (flickering) when the NaviCube is enabled. // To avoid this the NaviCube is disabled for the time the flags are shown. @@ -1616,7 +1724,8 @@ void ViewProviderMesh::faceInfoCallback(void * ud, SoEventCallback * n) Mesh::FacetIndex uFacet = faceDetail->getFaceIndex(); that->faceInfo(uFacet); Gui::GLFlagWindow* flags = nullptr; - std::list glItems = view->getGraphicsItemsOfType(Gui::GLFlagWindow::getClassTypeId()); + std::list glItems = + view->getGraphicsItemsOfType(Gui::GLFlagWindow::getClassTypeId()); if (glItems.empty()) { flags = new Gui::GLFlagWindow(view); view->addGraphicsItem(flags); @@ -1625,15 +1734,20 @@ void ViewProviderMesh::faceInfoCallback(void * ud, SoEventCallback * n) flags = static_cast(glItems.front()); } - int point1 = static_cast(faceDetail->getPoint(0))->getCoordinateIndex(); - int point2 = static_cast(faceDetail->getPoint(1))->getCoordinateIndex(); - int point3 = static_cast(faceDetail->getPoint(2))->getCoordinateIndex(); + int point1 = + static_cast(faceDetail->getPoint(0))->getCoordinateIndex(); + int point2 = + static_cast(faceDetail->getPoint(1))->getCoordinateIndex(); + int point3 = + static_cast(faceDetail->getPoint(2))->getCoordinateIndex(); Gui::Flag* flag = new Gui::Flag; flag->setText(QObject::tr("Index: %1").arg(uFacet)); QString toolTip = QString::fromLatin1("Facet index: %1\n" "Points: <%2, %3, %4>") - .arg(uFacet) - .arg(point1).arg(point2).arg(point3); + .arg(uFacet) + .arg(point1) + .arg(point2) + .arg(point3); flag->setToolTip(toolTip); flag->setOrigin(point->getPoint()); flags->addFlag(flag, Gui::FlagLayout::TopRight); @@ -1641,12 +1755,13 @@ void ViewProviderMesh::faceInfoCallback(void * ud, SoEventCallback * n) } } -void ViewProviderMesh::fillHoleCallback(void * ud, SoEventCallback * n) +void ViewProviderMesh::fillHoleCallback(void* ud, SoEventCallback* n) { - const SoMouseButtonEvent * mbe = static_cast(n->getEvent()); - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + const SoMouseButtonEvent* mbe = static_cast(n->getEvent()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); - // Mark all incoming mouse button events as handled, especially, to deactivate the selection node + // Mark all incoming mouse button events as handled, especially, to deactivate the selection + // node n->getAction()->setHandled(); if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { n->setHandled(); @@ -1658,11 +1773,12 @@ void ViewProviderMesh::fillHoleCallback(void * ud, SoEventCallback * n) view->setEditing(false); view->setSelectionEnabled(true); view->getWidget()->setCursor(QCursor(Qt::ArrowCursor)); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), fillHoleCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), fillHoleCallback, ud); } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { - const SoPickedPoint * point = n->getPickedPoint(); + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::DOWN) { + const SoPickedPoint* point = n->getPickedPoint(); if (!point) { Base::Console().Message("No facet picked.\n"); return; @@ -1673,11 +1789,12 @@ void ViewProviderMesh::fillHoleCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) + if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) { return; + } ViewProviderMesh* that = static_cast(vp); const SoDetail* detail = point->getDetail(that->getShapeNode()); - if ( detail && detail->getTypeId() == SoFaceDetail::getClassTypeId() ) { + if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { // get the boundary to the picked facet Mesh::FacetIndex uFacet = ((SoFaceDetail*)detail)->getFaceIndex(); that->fillHole(uFacet); @@ -1685,16 +1802,18 @@ void ViewProviderMesh::fillHoleCallback(void * ud, SoEventCallback * n) } } -void ViewProviderMesh::markPartCallback(void * ud, SoEventCallback * n) +void ViewProviderMesh::markPartCallback(void* ud, SoEventCallback* n) { // handle only mouse button events if (n->getEvent()->isOfType(SoMouseButtonEvent::getClassTypeId())) { - const SoMouseButtonEvent * mbe = static_cast(n->getEvent()); - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + const SoMouseButtonEvent* mbe = static_cast(n->getEvent()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); - // Mark all incoming mouse button events as handled, especially, to deactivate the selection node + // Mark all incoming mouse button events as handled, especially, to deactivate the selection + // node n->getAction()->setHandled(); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { + if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 + && mbe->getState() == SoButtonEvent::UP) { n->setHandled(); // context-menu QMenu menu; @@ -1705,22 +1824,28 @@ void ViewProviderMesh::markPartCallback(void * ud, SoEventCallback * n) if (cl == id) { view->setEditing(false); view->setSelectionEnabled(true); - view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), markPartCallback,ud); + view->removeEventCallback(SoMouseButtonEvent::getClassTypeId(), + markPartCallback, + ud); - std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); + std::vector views = + view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); for (auto view : views) { static_cast(view)->clearSelection(); } } else if (cf == id) { - std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); + std::vector views = + view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); for (auto view : views) { static_cast(view)->clearSelection(); } } else if (rm == id) { - Gui::Application::Instance->activeDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Delete")); - std::vector views = view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Delete")); + std::vector views = + view->getViewProvidersOfType(ViewProviderMesh::getClassTypeId()); for (auto view : views) { static_cast(view)->deleteSelection(); } @@ -1728,8 +1853,9 @@ void ViewProviderMesh::markPartCallback(void * ud, SoEventCallback * n) Gui::Application::Instance->activeDocument()->commitCommand(); } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { - const SoPickedPoint * point = n->getPickedPoint(); + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::DOWN) { + const SoPickedPoint* point = n->getPickedPoint(); if (!point) { Base::Console().Message("No facet picked.\n"); return; @@ -1740,11 +1866,12 @@ void ViewProviderMesh::markPartCallback(void * ud, SoEventCallback * n) // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) + if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMesh::getClassTypeId())) { return; + } ViewProviderMesh* that = static_cast(vp); const SoDetail* detail = point->getDetail(that->getShapeNode()); - if ( detail && detail->getTypeId() == SoFaceDetail::getClassTypeId() ) { + if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { // get the boundary to the picked facet Mesh::FacetIndex uFacet = static_cast(detail)->getFaceIndex(); that->selectComponent(uFacet); @@ -1761,20 +1888,34 @@ void ViewProviderMesh::faceInfo(Mesh::FacetIndex uFacet) if (uFacet < facets.size()) { MeshCore::MeshFacet face = facets[uFacet]; MeshCore::MeshGeomFacet tria = rKernel.GetFacet(face); - Base::Console().Message("Mesh: %s Facet %lu: Points: <%lu, %lu, %lu>, Neighbours: <%lu, %lu, %lu>\n" - "Triangle: <[%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f]>\n", fea->getNameInDocument(), uFacet, - face._aulPoints[0], face._aulPoints[1], face._aulPoints[2], - face._aulNeighbours[0], face._aulNeighbours[1], face._aulNeighbours[2], - tria._aclPoints[0].x, tria._aclPoints[0].y, tria._aclPoints[0].z, - tria._aclPoints[1].x, tria._aclPoints[1].y, tria._aclPoints[1].z, - tria._aclPoints[2].x, tria._aclPoints[2].y, tria._aclPoints[2].z); + Base::Console().Message( + "Mesh: %s Facet %lu: Points: <%lu, %lu, %lu>, Neighbours: <%lu, %lu, %lu>\n" + "Triangle: <[%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f]>\n", + fea->getNameInDocument(), + uFacet, + face._aulPoints[0], + face._aulPoints[1], + face._aulPoints[2], + face._aulNeighbours[0], + face._aulNeighbours[1], + face._aulNeighbours[2], + tria._aclPoints[0].x, + tria._aclPoints[0].y, + tria._aclPoints[0].z, + tria._aclPoints[1].x, + tria._aclPoints[1].y, + tria._aclPoints[1].z, + tria._aclPoints[2].x, + tria._aclPoints[2].y, + tria._aclPoints[2].z); } } void ViewProviderMesh::fillHole(Mesh::FacetIndex uFacet) { // get parameter from user settings - Base::Reference hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); + Base::Reference hGrp = + Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); int level = (int)hGrp->GetInt("FillHoleLevel", 2); // get the boundary to the picked facet @@ -1785,35 +1926,38 @@ void ViewProviderMesh::fillHole(Mesh::FacetIndex uFacet) MeshCore::MeshAlgorithm meshAlg(rKernel); meshAlg.GetFacetBorder(uFacet, aBorder); std::vector boundary(aBorder.begin(), aBorder.end()); - std::list > boundaries; + std::list> boundaries; boundaries.push_back(boundary); meshAlg.SplitBoundaryLoops(boundaries); std::vector newFacets; std::vector newPoints; unsigned long numberOfOldPoints = rKernel.CountPoints(); - for (const auto & it : boundaries) { - if (it.size() < 3/* || it->size() > 200*/) + for (const auto& it : boundaries) { + if (it.size() < 3 /* || it->size() > 200*/) { continue; + } boundary = it; MeshCore::MeshFacetArray faces; MeshCore::MeshPointArray points; - MeshCore::QuasiDelaunayTriangulator cTria/*(0.05f)*/; + MeshCore::QuasiDelaunayTriangulator cTria /*(0.05f)*/; cTria.SetVerifier(new MeshCore::TriangulationVerifierV2); if (meshAlg.FillupHole(boundary, cTria, faces, points, level, &cPt2Fac)) { - if (boundary.front() == boundary.back()) + if (boundary.front() == boundary.back()) { boundary.pop_back(); - // the triangulation may produce additional points which we must take into account when appending to the mesh + } + // the triangulation may produce additional points which we must take into account when + // appending to the mesh unsigned long countBoundaryPoints = boundary.size(); unsigned long countDifference = points.size() - countBoundaryPoints; if (countDifference > 0) { MeshCore::MeshPointArray::_TIterator pt = points.begin() + countBoundaryPoints; - for (unsigned long i=0; iactiveDocument()->openCommand(QT_TRANSLATE_NOOP("Command", "Fill hole")); + // add the facets to the mesh and open a transaction object for the undo/redo stuff + Gui::Application::Instance->activeDocument()->openCommand( + QT_TRANSLATE_NOOP("Command", "Fill hole")); Mesh::MeshObject* kernel = fea->Mesh.startEditing(); kernel->addFacets(newFacets, newPoints, true); fea->Mesh.finishEditing(); @@ -1839,15 +1985,17 @@ void ViewProviderMesh::setFacetTransparency(const std::vector& facetTrans App::Color c = ShapeColor.getValue(); pcShapeMaterial->diffuseColor.setNum(facetTransparency.size()); SbColor* cols = pcShapeMaterial->diffuseColor.startEditing(); - for (std::size_t index = 0; index < facetTransparency.size(); ++index) + for (std::size_t index = 0; index < facetTransparency.size(); ++index) { cols[index].setValue(c.r, c.g, c.b); + } pcShapeMaterial->diffuseColor.finishEditing(); } pcShapeMaterial->transparency.setNum(facetTransparency.size()); float* tran = pcShapeMaterial->transparency.startEditing(); - for (std::size_t index = 0; index < facetTransparency.size(); ++index) + for (std::size_t index = 0; index < facetTransparency.size(); ++index) { tran[index] = facetTransparency[index]; + } pcShapeMaterial->transparency.finishEditing(); pcMatBinding->value = SoMaterialBinding::PER_FACE; @@ -1863,8 +2011,7 @@ void ViewProviderMesh::resetFacetTransparency() /*! The triangles with the passed indices are already added to the mesh. */ void ViewProviderMesh::appendFacets(const std::vector&) -{ -} +{} void ViewProviderMesh::removeFacets(const std::vector& facets) { @@ -1901,22 +2048,24 @@ void ViewProviderMesh::removeFacets(const std::vector& facets) Coloring.setValue(false); std::vector validFacets(kernel->countFacets(), true); - for (auto it : facets) + for (auto it : facets) { validFacets[it] = false; + } const std::vector& colors = prop->getValues(); std::vector valid_colors; valid_colors.reserve(colors.size()); std::size_t numColors = colors.size(); for (std::size_t index = 0; index < numColors; index++) { - if (validFacets[index]) + if (validFacets[index]) { valid_colors.push_back(colors[index]); + } } prop->setValues(valid_colors); } - //Remove the facets from the mesh and open a transaction object for the undo/redo stuff + // Remove the facets from the mesh and open a transaction object for the undo/redo stuff kernel->deleteFacets(facets); meshProp.finishEditing(); pcObject->purgeTouched(); @@ -1940,7 +2089,7 @@ void ViewProviderMesh::selectFacet(Mesh::FacetIndex facet) highlightSelection(); } else { - pcShapeMaterial->diffuseColor.set1Value(facet,1.0f,0.0f,0.0f); + pcShapeMaterial->diffuseColor.set1Value(facet, 1.0f, 0.0f, 0.0f); } } @@ -1962,7 +2111,7 @@ void ViewProviderMesh::deselectFacet(Mesh::FacetIndex facet) } else { App::Color c = ShapeColor.getValue(); - pcShapeMaterial->diffuseColor.set1Value(facet,c.r,c.g,c.b); + pcShapeMaterial->diffuseColor.set1Value(facet, c.r, c.g, c.b); } } else { @@ -2006,10 +2155,12 @@ void ViewProviderMesh::deselectComponent(Mesh::FacetIndex uFacet) rMesh.removeFacetsFromSelection(selection); // Colorize the selection - if (rMesh.hasSelectedFacets()) + if (rMesh.hasSelectedFacets()) { highlightSelection(); - else + } + else { unhighlightSelection(); + } } void ViewProviderMesh::setSelection(const std::vector& indices) @@ -2019,10 +2170,12 @@ void ViewProviderMesh::setSelection(const std::vector& indices rMesh.addFacetsToSelection(indices); // Colorize the selection - if (indices.empty()) + if (indices.empty()) { unhighlightSelection(); - else + } + else { highlightSelection(); + } } void ViewProviderMesh::addSelection(const std::vector& indices) @@ -2040,10 +2193,12 @@ void ViewProviderMesh::removeSelection(const std::vector& indi rMesh.removeFacetsFromSelection(indices); // Colorize the selection - if (rMesh.hasSelectedFacets()) + if (rMesh.hasSelectedFacets()) { highlightSelection(); - else + } + else { unhighlightSelection(); + } } void ViewProviderMesh::invertSelection() @@ -2051,7 +2206,8 @@ void ViewProviderMesh::invertSelection() const Mesh::MeshObject& rMesh = static_cast(pcObject)->Mesh.getValue(); const MeshCore::MeshFacetArray& faces = rMesh.getKernel().GetFacets(); MeshCore::MeshIsNotFlag flag; - unsigned long num_notsel = std::count_if(faces.begin(), faces.end(), [flag](const MeshCore::MeshFacet& f) { + unsigned long num_notsel = + std::count_if(faces.begin(), faces.end(), [flag](const MeshCore::MeshFacet& f) { return flag(f, MeshCore::MeshFacet::SELECTED); }); std::vector notselect; @@ -2059,8 +2215,9 @@ void ViewProviderMesh::invertSelection() MeshCore::MeshFacetArray::_TConstIterator beg = faces.begin(); MeshCore::MeshFacetArray::_TConstIterator end = faces.end(); for (MeshCore::MeshFacetArray::_TConstIterator jt = beg; jt != end; ++jt) { - if (!jt->IsFlag(MeshCore::MeshFacet::SELECTED)) - notselect.push_back(jt-beg); + if (!jt->IsFlag(MeshCore::MeshFacet::SELECTED)) { + notselect.push_back(jt - beg); + } } setSelection(notselect); } @@ -2092,12 +2249,15 @@ bool ViewProviderMesh::hasSelection() const return rMesh.hasSelectedFacets(); } -void ViewProviderMesh::selectArea(short x, short y, short w, short h, +void ViewProviderMesh::selectArea(short x, + short y, + short w, + short h, const SbViewportRegion& region, SoCamera* camera) { SbViewportRegion vp; - vp.setViewportPixels (x, y, w, h); + vp.setViewportPixels(x, y, w, h); std::vector faces = getFacetsOfRegion(vp, region, camera); const Mesh::MeshObject& rMesh = static_cast(pcObject)->Mesh.getValue(); @@ -2125,10 +2285,12 @@ void ViewProviderMesh::highlightSelection() pcShapeMaterial->diffuseColor.setNum(uCtFacets); SbColor* cols = pcShapeMaterial->diffuseColor.startEditing(); - for (int i=0; idiffuseColor.finishEditing(); } @@ -2137,7 +2299,7 @@ void ViewProviderMesh::unhighlightSelection() App::Color c = ShapeColor.getValue(); pcMatBinding->value = SoMaterialBinding::OVERALL; pcShapeMaterial->diffuseColor.setNum(1); - pcShapeMaterial->diffuseColor.setValue(c.r,c.g,c.b); + pcShapeMaterial->diffuseColor.setValue(c.r, c.g, c.b); } void ViewProviderMesh::setHighlightedComponents(bool on) @@ -2155,7 +2317,7 @@ void ViewProviderMesh::setHighlightedComponents(bool on) void ViewProviderMesh::highlightComponents() { const Mesh::MeshObject& rMesh = static_cast(pcObject)->Mesh.getValue(); - std::vector > comps = rMesh.getComponents(); + std::vector> comps = rMesh.getComponents(); // Colorize the components pcMatBinding->value = SoMaterialBinding::PER_FACE; @@ -2163,13 +2325,13 @@ void ViewProviderMesh::highlightComponents() pcShapeMaterial->diffuseColor.setNum(uCtFacets); SbColor* cols = pcShapeMaterial->diffuseColor.startEditing(); - for (const auto & comp : comps) { + for (const auto& comp : comps) { float fMax = (float)RAND_MAX; - float fRed = (float)rand()/fMax; - float fGrn = (float)rand()/fMax; - float fBlu = (float)rand()/fMax; + float fRed = (float)rand() / fMax; + float fGrn = (float)rand() / fMax; + float fBlu = (float)rand() / fMax; for (Mesh::FacetIndex jt : comp) { - cols[jt].setValue(fRed,fGrn,fBlu); + cols[jt].setValue(fRed, fGrn, fBlu); } } pcShapeMaterial->diffuseColor.finishEditing(); @@ -2194,10 +2356,11 @@ void ViewProviderMesh::highlightSegments() unsigned long numSegm = rMesh.countSegments(); colors.resize(numSegm, this->ShapeColor.getValue()); - for (unsigned long i=0; i& colors) pcShapeMaterial->diffuseColor.setNum(uCtFacets); SbColor* cols = pcShapeMaterial->diffuseColor.startEditing(); - for (unsigned long i=0; i segm = rMesh.getSegment(i).getIndices(); float fRed = colors[i].r; float fGrn = colors[i].g; float fBlu = colors[i].b; for (Mesh::FacetIndex it : segm) { - cols[it].setValue(fRed,fGrn,fBlu); + cols[it].setValue(fRed, fGrn, fBlu); } } pcShapeMaterial->diffuseColor.finishEditing(); @@ -2230,7 +2393,7 @@ void ViewProviderMesh::highlightSegments(const std::vector& colors) float fRed = colors[0].r; float fGrn = colors[0].g; float fBlu = colors[0].b; - pcShapeMaterial->diffuseColor.setValue(fRed,fGrn,fBlu); + pcShapeMaterial->diffuseColor.setValue(fRed, fGrn, fBlu); } } @@ -2250,13 +2413,15 @@ void ViewProviderMesh::highlightColors() { const Mesh::MeshObject& rMesh = static_cast(pcObject)->Mesh.getValue(); { - App::PropertyColorList* prop = Base::freecad_dynamic_cast(pcObject->getPropertyByName("FaceColors")); + App::PropertyColorList* prop = Base::freecad_dynamic_cast( + pcObject->getPropertyByName("FaceColors")); if (prop && prop->getSize() == int(rMesh.countFacets())) { setColorPerFace(prop); } } { - App::PropertyColorList* prop = Base::freecad_dynamic_cast(pcObject->getPropertyByName("VertexColors")); + App::PropertyColorList* prop = Base::freecad_dynamic_cast( + pcObject->getPropertyByName("VertexColors")); if (prop && prop->getSize() == int(rMesh.countPoints())) { setColorPerVertex(prop); } @@ -2267,14 +2432,18 @@ bool ViewProviderMesh::canHighlightColors() const { const Mesh::MeshObject& rMesh = static_cast(pcObject)->Mesh.getValue(); { - App::PropertyColorList* prop = Base::freecad_dynamic_cast(pcObject->getPropertyByName("FaceColors")); - if (prop && prop->getSize() == int(rMesh.countFacets())) + App::PropertyColorList* prop = Base::freecad_dynamic_cast( + pcObject->getPropertyByName("FaceColors")); + if (prop && prop->getSize() == int(rMesh.countFacets())) { return true; + } } { - App::PropertyColorList* prop = Base::freecad_dynamic_cast(pcObject->getPropertyByName("VertexColors")); - if (prop && prop->getSize() == int(rMesh.countPoints())) + App::PropertyColorList* prop = Base::freecad_dynamic_cast( + pcObject->getPropertyByName("VertexColors")); + if (prop && prop->getSize() == int(rMesh.countPoints())) { return true; + } } return false; @@ -2282,8 +2451,9 @@ bool ViewProviderMesh::canHighlightColors() const PyObject* ViewProviderMesh::getPyObject() { - if (!pyViewObject) + if (!pyViewObject) { pyViewObject = new ViewProviderMeshPy(this); + } pyViewObject->IncRef(); return pyViewObject; } @@ -2304,7 +2474,7 @@ ViewProviderIndexedFaceSet::~ViewProviderIndexedFaceSet() = default; * Extracts the mesh data from the feature \a pcFeature and creates * an Inventor node \a SoNode with these data. */ -void ViewProviderIndexedFaceSet::attach(App::DocumentObject *pcFeat) +void ViewProviderIndexedFaceSet::attach(App::DocumentObject* pcFeat) { ViewProviderMesh::attach(pcFeat); @@ -2315,9 +2485,13 @@ void ViewProviderIndexedFaceSet::attach(App::DocumentObject *pcFeat) pcHighlight->addChild(pcMeshFaces); // read the threshold from the preferences - Base::Reference hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); + Base::Reference hGrp = + Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); int size = hGrp->GetInt("RenderTriangleLimit", -1); - if (size > 0) static_cast(pcMeshFaces)->renderTriangleLimit = (unsigned int)(pow(10.0f,size)); + if (size > 0) { + static_cast(pcMeshFaces)->renderTriangleLimit = + (unsigned int)(pow(10.0f, size)); + } } void ViewProviderIndexedFaceSet::updateData(const App::Property* prop) @@ -2352,15 +2526,16 @@ void ViewProviderIndexedFaceSet::showOpenEdges(bool show) pcRoot->addChild(pcOpenEdge); // Build up the lines with indices to the list of vertices 'pcMeshCoord' - int index=0; - const MeshCore::MeshKernel& rMesh = static_cast(pcObject)->Mesh.getValue().getKernel(); + int index = 0; + const MeshCore::MeshKernel& rMesh = + static_cast(pcObject)->Mesh.getValue().getKernel(); const MeshCore::MeshFacetArray& rFaces = rMesh.GetFacets(); - for (const auto & rFace : rFaces) { - for (int i=0; i<3; i++) { + for (const auto& rFace : rFaces) { + for (int i = 0; i < 3; i++) { if (rFace._aulNeighbours[i] == MeshCore::FACET_INDEX_MAX) { - lines->coordIndex.set1Value(index++,rFace._aulPoints[i]); - lines->coordIndex.set1Value(index++,rFace._aulPoints[(i+1)%3]); - lines->coordIndex.set1Value(index++,SO_END_LINE_INDEX); + lines->coordIndex.set1Value(index++, rFace._aulPoints[i]); + lines->coordIndex.set1Value(index++, rFace._aulPoints[(i + 1) % 3]); + lines->coordIndex.set1Value(index++, SO_END_LINE_INDEX); } } } @@ -2389,7 +2564,7 @@ ViewProviderMeshObject::ViewProviderMeshObject() ViewProviderMeshObject::~ViewProviderMeshObject() = default; -void ViewProviderMeshObject::attach(App::DocumentObject *pcFeat) +void ViewProviderMeshObject::attach(App::DocumentObject* pcFeat) { ViewProviderMesh::attach(pcFeat); @@ -2400,9 +2575,12 @@ void ViewProviderMeshObject::attach(App::DocumentObject *pcFeat) pcHighlight->addChild(pcMeshShape); // read the threshold from the preferences - Base::Reference hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); + Base::Reference hGrp = + Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); int size = hGrp->GetInt("RenderTriangleLimit", -1); - if (size > 0) pcMeshShape->renderTriangleLimit = (unsigned int)(pow(10.0f,size)); + if (size > 0) { + pcMeshShape->renderTriangleLimit = (unsigned int)(pow(10.0f, size)); + } } void ViewProviderMeshObject::updateData(const App::Property* prop) @@ -2410,7 +2588,8 @@ void ViewProviderMeshObject::updateData(const App::Property* prop) ViewProviderMesh::updateData(prop); if (prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { const Mesh::PropertyMeshKernel* mesh = static_cast(prop); - this->pcMeshNode->mesh.setValue(Base::Reference(mesh->getValuePtr())); + this->pcMeshNode->mesh.setValue( + Base::Reference(mesh->getValuePtr())); // Needs to update internal bounding box caches this->pcMeshShape->touch(); } diff --git a/src/Mod/Mesh/Gui/ViewProvider.h b/src/Mod/Mesh/Gui/ViewProvider.h index ad03b2ce66..1da1023638 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.h +++ b/src/Mod/Mesh/Gui/ViewProvider.h @@ -27,8 +27,8 @@ #include #include -#include #include +#include class SoGroup; @@ -49,35 +49,41 @@ class SbVec2f; class SbBox2s; class SbPlane; -namespace App { - class Color; - class PropertyColorList; +namespace App +{ +class Color; +class PropertyColorList; +} // namespace App + +namespace Base +{ +class ViewProjMethod; } -namespace Base { - class ViewProjMethod; -} - -namespace Gui { - class View3DInventorViewer; - class SoFCSelection; -} +namespace Gui +{ +class View3DInventorViewer; +class SoFCSelection; +} // namespace Gui -namespace MeshCore { - class MeshKernel; - struct Material; -} +namespace MeshCore +{ +class MeshKernel; +struct Material; +} // namespace MeshCore -namespace Mesh { +namespace Mesh +{ class PropertyMaterial; } -namespace MeshGui { +namespace MeshGui +{ class SoFCMeshObjectNode; class SoFCMeshObjectShape; -class MeshGuiExport ViewProviderMeshBuilder : public Gui::ViewProviderBuilder +class MeshGuiExport ViewProviderMeshBuilder: public Gui::ViewProviderBuilder { public: ViewProviderMeshBuilder() = default; @@ -90,7 +96,7 @@ public: * The ViewProviderExport class creates an empty node. * @author Werner Mayer */ -class MeshGuiExport ViewProviderExport : public Gui::ViewProviderDocumentObject +class MeshGuiExport ViewProviderExport: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderExport); @@ -99,7 +105,10 @@ public: ~ViewProviderExport() override; QIcon getIcon() const override; - SoSeparator* getRoot() const override {return nullptr;} + SoSeparator* getRoot() const override + { + return nullptr; + } std::vector getDisplayModes() const override; const char* getDefaultDisplayMode() const override; }; @@ -109,7 +118,7 @@ public: * and many algorithms to work on or edit the mesh. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMesh : public Gui::ViewProviderGeometryObject +class MeshGuiExport ViewProviderMesh: public Gui::ViewProviderGeometryObject { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMesh); @@ -127,24 +136,33 @@ public: App::PropertyEnumeration Lighting; App::PropertyColor LineColor; - void attach(App::DocumentObject *) override; + void attach(App::DocumentObject*) override; void updateData(const App::Property*) override; - bool useNewSelectionModel() const override {return false;} - Gui::SoFCSelection* getHighlightNode() const { return pcHighlight; } + bool useNewSelectionModel() const override + { + return false; + } + Gui::SoFCSelection* getHighlightNode() const + { + return pcHighlight; + } QIcon getIcon() const override; /// Sets the correct display mode void setDisplayMode(const char* ModeName) override; /// returns a list of all possible modes std::vector getDisplayModes() const override; - bool exportToVrml(const char* filename, const MeshCore::Material&, bool binary=false) const; - void exportMesh(const char* filename, const char* fmt=nullptr) const; + bool exportToVrml(const char* filename, const MeshCore::Material&, bool binary = false) const; + void exportMesh(const char* filename, const char* fmt = nullptr) const; void setupContextMenu(QMenu*, QObject*, const char*) override; /// Get the python wrapper for that ViewProvider PyObject* getPyObject() override; /** @name Editing */ //@{ - bool doubleClicked() override{ return false; } + bool doubleClicked() override + { + return false; + } bool isFacetSelected(Mesh::FacetIndex facet); void selectComponent(Mesh::FacetIndex facet); void deselectComponent(Mesh::FacetIndex facet); @@ -158,13 +176,18 @@ public: void deleteSelection(); bool hasSelection() const; void getFacetsFromPolygon(const std::vector& picked, - const Base::ViewProjMethod& proj, SbBool inner, + const Base::ViewProjMethod& proj, + SbBool inner, std::vector& indices) const; - std::vector getFacetsOfRegion(const SbViewportRegion&, const SbViewportRegion&, SoCamera*) const; - std::vector getVisibleFacetsAfterZoom(const SbBox2s&, const SbViewportRegion&, SoCamera*) const; + std::vector + getFacetsOfRegion(const SbViewportRegion&, const SbViewportRegion&, SoCamera*) const; + std::vector + getVisibleFacetsAfterZoom(const SbBox2s&, const SbViewportRegion&, SoCamera*) const; std::vector getVisibleFacets(const SbViewportRegion&, SoCamera*) const; - virtual void cutMesh(const std::vector& picked, const Base::ViewProjMethod& proj, SbBool inner); - virtual void trimMesh(const std::vector& picked, const Base::ViewProjMethod& proj, SbBool inner); + virtual void + cutMesh(const std::vector& picked, const Base::ViewProjMethod& proj, SbBool inner); + virtual void + trimMesh(const std::vector& picked, const Base::ViewProjMethod& proj, SbBool inner); virtual void appendFacets(const std::vector&); virtual void removeFacets(const std::vector&); /*! The size of the array must be equal to the number of facets. */ @@ -182,8 +205,10 @@ protected: void onChanged(const App::Property* prop) override; virtual void showOpenEdges(bool); void setOpenEdgeColorFrom(const App::Color& col); - virtual void splitMesh(const MeshCore::MeshKernel& toolMesh, const Base::Vector3f& normal, SbBool inner); - virtual void segmentMesh(const MeshCore::MeshKernel& toolMesh, const Base::Vector3f& normal, SbBool inner); + virtual void + splitMesh(const MeshCore::MeshKernel& toolMesh, const Base::Vector3f& normal, SbBool inner); + virtual void + segmentMesh(const MeshCore::MeshKernel& toolMesh, const Base::Vector3f& normal, SbBool inner); virtual void faceInfo(Mesh::FacetIndex facet); virtual void fillHole(Mesh::FacetIndex facet); virtual void selectArea(short, short, short, short, const SbViewportRegion&, SoCamera*); @@ -212,42 +237,45 @@ protected: virtual SoNode* getCoordNode() const; public: - static void faceInfoCallback(void * ud, SoEventCallback * n); - static void fillHoleCallback(void * ud, SoEventCallback * n); - static void markPartCallback(void * ud, SoEventCallback * n); - static void clipMeshCallback(void * ud, SoEventCallback * n); - static void trimMeshCallback(void * ud, SoEventCallback * n); - static void partMeshCallback(void * ud, SoEventCallback * n); - static void segmMeshCallback(void * ud, SoEventCallback * n); - static void selectGLCallback(void * ud, SoEventCallback * n); + static void faceInfoCallback(void* ud, SoEventCallback* n); + static void fillHoleCallback(void* ud, SoEventCallback* n); + static void markPartCallback(void* ud, SoEventCallback* n); + static void clipMeshCallback(void* ud, SoEventCallback* n); + static void trimMeshCallback(void* ud, SoEventCallback* n); + static void partMeshCallback(void* ud, SoEventCallback* n); + static void segmMeshCallback(void* ud, SoEventCallback* n); + static void selectGLCallback(void* ud, SoEventCallback* n); /// Creates a tool mesh from the previous picked polygon on the viewer - static bool createToolMesh(const std::vector& rclPoly, const SbViewVolume& vol, - const Base::Vector3f& rcNormal, std::vector&); + static bool createToolMesh(const std::vector& rclPoly, + const SbViewVolume& vol, + const Base::Vector3f& rcNormal, + std::vector&); private: - static void renderGLCallback(void * ud, SoAction * a); - static void boxZoom(const SbBox2s& box, const SbViewportRegion & vp, SoCamera* cam); + static void renderGLCallback(void* ud, SoAction* a); + static void boxZoom(const SbBox2s& box, const SbViewportRegion& vp, SoCamera* cam); static void panCamera(SoCamera*, float, const SbPlane&, const SbVec2f&, const SbVec2f&); protected: - enum class HighlighMode { + enum class HighlighMode + { None, Component, Segment, Color }; - //NOLINTBEGIN + // NOLINTBEGIN HighlighMode highlightMode; - Gui::SoFCSelection * pcHighlight{nullptr}; - SoGroup * pcShapeGroup{nullptr}; - SoDrawStyle * pcLineStyle{nullptr}; - SoDrawStyle * pcPointStyle{nullptr}; - SoSeparator * pcOpenEdge{nullptr}; - SoBaseColor * pOpenColor{nullptr}; - SoMaterial * pLineColor{nullptr}; - SoShapeHints * pShapeHints{nullptr}; - SoMaterialBinding * pcMatBinding{nullptr}; - //NOLINTEND + Gui::SoFCSelection* pcHighlight {nullptr}; + SoGroup* pcShapeGroup {nullptr}; + SoDrawStyle* pcLineStyle {nullptr}; + SoDrawStyle* pcPointStyle {nullptr}; + SoSeparator* pcOpenEdge {nullptr}; + SoBaseColor* pOpenColor {nullptr}; + SoMaterial* pLineColor {nullptr}; + SoShapeHints* pShapeHints {nullptr}; + SoMaterialBinding* pcMatBinding {nullptr}; + // NOLINTEND private: static App::PropertyFloatConstraint::Constraints floatRange; @@ -261,7 +289,7 @@ private: * to render the mesh data structure. * @author Werner Mayer */ -class MeshGuiExport ViewProviderIndexedFaceSet : public ViewProviderMesh +class MeshGuiExport ViewProviderIndexedFaceSet: public ViewProviderMesh { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderIndexedFaceSet); @@ -269,7 +297,7 @@ public: ViewProviderIndexedFaceSet(); ~ViewProviderIndexedFaceSet() override; - void attach(App::DocumentObject *) override; + void attach(App::DocumentObject*) override; /// Update the Mesh representation void updateData(const App::Property*) override; @@ -279,8 +307,8 @@ protected: SoNode* getCoordNode() const override; private: - SoCoordinate3 * pcMeshCoord; - SoIndexedFaceSet * pcMeshFaces; + SoCoordinate3* pcMeshCoord; + SoIndexedFaceSet* pcMeshFaces; }; /** @@ -288,7 +316,7 @@ private: * to directly render the mesh data structure. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshObject : public ViewProviderMesh +class MeshGuiExport ViewProviderMeshObject: public ViewProviderMesh { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshObject); @@ -296,7 +324,7 @@ public: ViewProviderMeshObject(); ~ViewProviderMeshObject() override; - void attach(App::DocumentObject *pcFeat) override; + void attach(App::DocumentObject* pcFeat) override; void updateData(const App::Property*) override; protected: @@ -305,12 +333,11 @@ protected: void showOpenEdges(bool) override; private: - SoFCMeshObjectNode * pcMeshNode; - SoFCMeshObjectShape * pcMeshShape; + SoFCMeshObjectNode* pcMeshNode; + SoFCMeshObjectShape* pcMeshShape; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_VIEWPROVIDERMESH_H - +#endif // MESHGUI_VIEWPROVIDERMESH_H diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp index 22fffd7638..985cd7ae87 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp @@ -22,26 +22,26 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif -# include +#include #include #include @@ -114,8 +114,8 @@ ViewProviderMeshCurvature::ViewProviderMeshCurvature() mat.transparency = trans[0]; } - ADD_PROPERTY(TextureMaterial,(mat)); - SelectionStyle.setValue(1); // BBOX + ADD_PROPERTY(TextureMaterial, (mat)); + SelectionStyle.setValue(1); // BBOX } ViewProviderMeshCurvature::~ViewProviderMeshCurvature() @@ -131,9 +131,15 @@ void ViewProviderMeshCurvature::onChanged(const App::Property* prop) { if (prop == &TextureMaterial) { const App::Material& Mat = TextureMaterial.getValue(); - pcColorMat->ambientColor.setValue(Mat.ambientColor.r,Mat.ambientColor.g,Mat.ambientColor.b); - pcColorMat->specularColor.setValue(Mat.specularColor.r,Mat.specularColor.g,Mat.specularColor.b); - pcColorMat->emissiveColor.setValue(Mat.emissiveColor.r,Mat.emissiveColor.g,Mat.emissiveColor.b); + pcColorMat->ambientColor.setValue(Mat.ambientColor.r, + Mat.ambientColor.g, + Mat.ambientColor.b); + pcColorMat->specularColor.setValue(Mat.specularColor.r, + Mat.specularColor.g, + Mat.specularColor.b); + pcColorMat->emissiveColor.setValue(Mat.emissiveColor.r, + Mat.emissiveColor.g, + Mat.emissiveColor.b); pcColorMat->shininess.setValue(Mat.shininess); pcColorMat->transparency.setValue(Mat.transparency); } @@ -160,58 +166,62 @@ void ViewProviderMeshCurvature::init(const Mesh::PropertyCurvatureList* pCurvInf aMinValues.reserve(fCurvInfo.size()); aMaxValues.reserve(fCurvInfo.size()); - for (const auto & jt : fCurvInfo) { - aMinValues.push_back( jt.fMinCurvature ); - aMaxValues.push_back( jt.fMaxCurvature ); + for (const auto& jt : fCurvInfo) { + aMinValues.push_back(jt.fMinCurvature); + aMaxValues.push_back(jt.fMaxCurvature); } - if ( aMinValues.empty() || aMaxValues.empty() ) - return; // no values inside + if (aMinValues.empty() || aMaxValues.empty()) { + return; // no values inside + } - float fMin = *std::min_element( aMinValues.begin(), aMinValues.end() ); - float fMax = *std::max_element( aMinValues.begin(), aMinValues.end() ); + float fMin = *std::min_element(aMinValues.begin(), aMinValues.end()); + float fMax = *std::max_element(aMinValues.begin(), aMinValues.end()); // histogram over all values std::map aHistogram; for (float aMinValue : aMinValues) { - int grp = (int)(10.0f*( aMinValue - fMin )/( fMax - fMin )); + int grp = (int)(10.0f * (aMinValue - fMin) / (fMax - fMin)); aHistogram[grp]++; } - float fRMin=-1.0f; - for (const auto & mIt : aHistogram) { - if ( (float)mIt.second / (float)aMinValues.size() > 0.15f ) { - fRMin = mIt.first * ( fMax - fMin )/10.0f + fMin; + float fRMin = -1.0f; + for (const auto& mIt : aHistogram) { + if ((float)mIt.second / (float)aMinValues.size() > 0.15f) { + fRMin = mIt.first * (fMax - fMin) / 10.0f + fMin; break; } } - fMin = *std::min_element( aMaxValues.begin(), aMaxValues.end() ); - fMax = *std::max_element( aMaxValues.begin(), aMaxValues.end() ); + fMin = *std::min_element(aMaxValues.begin(), aMaxValues.end()); + fMax = *std::max_element(aMaxValues.begin(), aMaxValues.end()); // histogram over all values aHistogram.clear(); for (float aMaxValue : aMaxValues) { - int grp = (int)(10.0f*( aMaxValue - fMin )/( fMax - fMin )); + int grp = (int)(10.0f * (aMaxValue - fMin) / (fMax - fMin)); aHistogram[grp]++; } - float fRMax=1.0f; - for ( std::map::reverse_iterator rIt2 = aHistogram.rbegin(); rIt2 != aHistogram.rend(); ++rIt2 ) { - if ( (float)rIt2->second / (float)aMaxValues.size() > 0.15f ) { - fRMax = rIt2->first * ( fMax - fMin )/10.0f + fMin; + float fRMax = 1.0f; + for (std::map::reverse_iterator rIt2 = aHistogram.rbegin(); rIt2 != aHistogram.rend(); + ++rIt2) { + if ((float)rIt2->second / (float)aMaxValues.size() > 0.15f) { + fRMax = rIt2->first * (fMax - fMin) / 10.0f + fMin; break; } } float fAbs = std::max(fabs(fRMin), fabs(fRMax)); fRMin = -fAbs; - fRMax = fAbs; - fMin = fRMin; fMax = fRMax; - pcColorBar->setRange( fMin, fMax, 3 ); + fRMax = fAbs; + fMin = fRMin; + fMax = fRMax; + pcColorBar->setRange(fMin, fMax, 3); } -void ViewProviderMeshCurvature::slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop) +void ViewProviderMeshCurvature::slotChangedObject(const App::DocumentObject& Obj, + const App::Property& Prop) { // we get this for any object for that a property has changed. Thus, we must regard that object // which is linked by our link property @@ -222,26 +232,27 @@ void ViewProviderMeshCurvature::slotChangedObject(const App::DocumentObject& Obj const Mesh::MeshObject& kernel = mesh.getValue(); pcColorMat->diffuseColor.setNum((int)kernel.countPoints()); pcColorMat->transparency.setNum((int)kernel.countPoints()); - static_cast(pcObject)->Source.touch(); // make sure to recompute the feature + static_cast(pcObject) + ->Source.touch(); // make sure to recompute the feature } } } -void ViewProviderMeshCurvature::attach(App::DocumentObject *pcFeat) +void ViewProviderMeshCurvature::attach(App::DocumentObject* pcFeat) { // creates the standard viewing modes inherited::attach(pcFeat); attachDocument(pcFeat->getDocument()); - SoShapeHints * flathints = new SoShapeHints; - flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; + SoShapeHints* flathints = new SoShapeHints; + flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE; flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; SoGroup* pcColorShadedRoot = new SoGroup(); pcColorShadedRoot->addChild(flathints); // color shaded - SoDrawStyle *pcFlatStyle = new SoDrawStyle(); + SoDrawStyle* pcFlatStyle = new SoDrawStyle(); pcFlatStyle->style = SoDrawStyle::FILLED; pcColorShadedRoot->addChild(pcFlatStyle); @@ -254,8 +265,9 @@ void ViewProviderMeshCurvature::attach(App::DocumentObject *pcFeat) addDisplayMaskMode(pcColorShadedRoot, "ColorShaded"); // Check for an already existing color bar - Gui::SoFCColorBar* pcBar = ((Gui::SoFCColorBar*)findFrontRootOfType( Gui::SoFCColorBar::getClassTypeId() )); - if ( pcBar ) { + Gui::SoFCColorBar* pcBar = + ((Gui::SoFCColorBar*)findFrontRootOfType(Gui::SoFCColorBar::getClassTypeId())); + if (pcBar) { float fMin = pcColorBar->getMinValue(); float fMax = pcColorBar->getMaxValue(); @@ -276,7 +288,8 @@ void ViewProviderMeshCurvature::updateData(const App::Property* prop) { // set to the expected size if (prop->getTypeId().isDerivedFrom(App::PropertyLink::getClassTypeId())) { - Mesh::Feature* object = static_cast(prop)->getValue(); + Mesh::Feature* object = + static_cast(prop)->getValue(); Gui::coinRemoveAllChildren(this->pcLinkRoot); if (object) { const Mesh::MeshObject& kernel = object->Mesh.getValue(); @@ -289,15 +302,18 @@ void ViewProviderMeshCurvature::updateData(const App::Property* prop) ViewProviderMesh* view = static_cast(pDoc->getViewProvider(object)); this->pcLinkRoot->addChild(view->getHighlightNode()); - Base::Placement p = static_cast(view->getObject())->Placement.getValue(); + Base::Placement p = + static_cast(view->getObject())->Placement.getValue(); ViewProviderMesh::updateTransform(p, pcTransform); } } else if (prop->getTypeId() == Mesh::PropertyCurvatureList::getClassTypeId()) { - const Mesh::PropertyCurvatureList* curv = static_cast(prop); - if (curv->getSize() < 3) // invalid array + const Mesh::PropertyCurvatureList* curv = + static_cast(prop); + if (curv->getSize() < 3) { // invalid array return; -#if 0 // FIXME: Do not always change the range + } +#if 0 // FIXME: Do not always change the range init(curv); // init color bar #endif setActiveMode(); @@ -311,7 +327,7 @@ SoSeparator* ViewProviderMeshCurvature::getFrontRoot() const void ViewProviderMeshCurvature::setVertexCurvatureMode(int mode) { - using PropertyMap = std::map; + using PropertyMap = std::map; Mesh::PropertyCurvatureList* pCurvInfo = nullptr; PropertyMap Map; pcObject->getPropertyMap(Map); @@ -321,8 +337,9 @@ void ViewProviderMeshCurvature::setVertexCurvatureMode(int mode) return (type == Mesh::PropertyCurvatureList::getClassTypeId()); }); - if (it == Map.end()) - return; // cannot display this feature type due to missing curvature property + if (it == Map.end()) { + return; // cannot display this feature type due to missing curvature property + } pCurvInfo = static_cast(it->second); @@ -367,23 +384,23 @@ QIcon ViewProviderMeshCurvature::getIcon() const void ViewProviderMeshCurvature::setDisplayMode(const char* ModeName) { - if ( strcmp("Mean curvature",ModeName)==0 ) { + if (strcmp("Mean curvature", ModeName) == 0) { setVertexCurvatureMode(Mesh::PropertyCurvatureList::MeanCurvature); setDisplayMaskMode("ColorShaded"); } - else if ( strcmp("Gaussian curvature",ModeName)==0 ) { + else if (strcmp("Gaussian curvature", ModeName) == 0) { setVertexCurvatureMode(Mesh::PropertyCurvatureList::GaussCurvature); setDisplayMaskMode("ColorShaded"); } - else if ( strcmp("Maximum curvature",ModeName)==0 ) { + else if (strcmp("Maximum curvature", ModeName) == 0) { setVertexCurvatureMode(Mesh::PropertyCurvatureList::MaxCurvature); setDisplayMaskMode("ColorShaded"); } - else if ( strcmp("Minimum curvature",ModeName)==0 ) { + else if (strcmp("Minimum curvature", ModeName) == 0) { setVertexCurvatureMode(Mesh::PropertyCurvatureList::MinCurvature); setDisplayMaskMode("ColorShaded"); } - else if ( strcmp("Absolute curvature",ModeName)==0 ) { + else if (strcmp("Absolute curvature", ModeName) == 0) { setVertexCurvatureMode(Mesh::PropertyCurvatureList::AbsCurvature); setDisplayMaskMode("ColorShaded"); } @@ -410,23 +427,28 @@ std::vector ViewProviderMeshCurvature::getDisplayModes() const return StrList; } -void ViewProviderMeshCurvature::OnChange(Base::Subject &/*rCaller*/,int /*rcReason*/) +void ViewProviderMeshCurvature::OnChange(Base::Subject& /*rCaller*/, int /*rcReason*/) { setActiveMode(); } -namespace MeshGui { +namespace MeshGui +{ class Annotation { public: Annotation(Gui::ViewProviderDocumentObject* vp, - const QString& s,const SbVec3f& p, const SbVec3f& n) - : vp(vp), s(s), p(p), n(n) - { - } + const QString& s, + const SbVec3f& p, + const SbVec3f& n) + : vp(vp) + , s(s) + , p(p) + , n(n) + {} - static void run(void * data, SoSensor * sensor) + static void run(void* data, SoSensor* sensor) { Annotation* self = static_cast(data); self->show(); @@ -438,33 +460,34 @@ public: { App::Document* doc = vp->getObject()->getDocument(); - std::vector groups = doc->getObjectsOfType - (App::DocumentObjectGroup::getClassTypeId()); + std::vector groups = + doc->getObjectsOfType(App::DocumentObjectGroup::getClassTypeId()); App::DocumentObjectGroup* group = nullptr; std::string internalname = "CurvatureGroup"; - for (const auto & it : groups) { + for (const auto& it : groups) { if (internalname == it->getNameInDocument()) { group = static_cast(it); break; } } if (!group) { - group = static_cast(doc->addObject - ("App::DocumentObjectGroup",internalname.c_str())); + group = static_cast( + doc->addObject("App::DocumentObjectGroup", internalname.c_str())); } - App::AnnotationLabel* anno = static_cast - (group->addObject("App::AnnotationLabel", internalname.c_str())); + App::AnnotationLabel* anno = static_cast( + group->addObject("App::AnnotationLabel", internalname.c_str())); QStringList lines = s.split(QLatin1String("\n")); std::vector text; - for (const auto & line : lines) + for (const auto& line : lines) { text.emplace_back((const char*)line.toLatin1()); + } anno->LabelText.setValues(text); std::stringstream str; str << "Curvature info (" << group->Group.getSize() << ")"; anno->Label.setValue(str.str()); - anno->BasePosition.setValue(p[0],p[1],p[2]); - anno->TextPosition.setValue(n[0],n[1],n[2]); + anno->BasePosition.setValue(p[0], p[1], p[2]); + anno->TextPosition.setValue(n[0], n[1], n[2]); } private: @@ -474,18 +497,20 @@ private: SbVec3f n; }; -} +} // namespace MeshGui -void ViewProviderMeshCurvature::curvatureInfoCallback(void * ud, SoEventCallback * n) +void ViewProviderMeshCurvature::curvatureInfoCallback(void* ud, SoEventCallback* n) { - Gui::View3DInventorViewer* view = static_cast(n->getUserData()); + Gui::View3DInventorViewer* view = static_cast(n->getUserData()); const SoEvent* ev = n->getEvent(); if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) { - const SoMouseButtonEvent * mbe = static_cast(ev); + const SoMouseButtonEvent* mbe = static_cast(ev); - // Mark all incoming mouse button events as handled, especially, to deactivate the selection node + // Mark all incoming mouse button events as handled, especially, to deactivate the selection + // node n->getAction()->setHandled(); - if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 && mbe->getState() == SoButtonEvent::UP) { + if (mbe->getButton() == SoMouseButtonEvent::BUTTON2 + && mbe->getState() == SoButtonEvent::UP) { n->setHandled(); // context-menu QMenu menu; @@ -505,8 +530,9 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void * ud, SoEventCallback view->removeEventCallback(SoEvent::getClassTypeId(), curvatureInfoCallback, ud); } } - else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::UP) { - const SoPickedPoint * point = n->getPickedPoint(); + else if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 + && mbe->getState() == SoButtonEvent::UP) { + const SoPickedPoint* point = n->getPickedPoint(); if (!point) { Base::Console().Message("No facet picked.\n"); return; @@ -517,12 +543,14 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void * ud, SoEventCallback // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId())) + if (!vp + || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId())) { return; + } ViewProviderMeshCurvature* self = static_cast(vp); const SoDetail* detail = point->getDetail(point->getPath()->getTail()); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { - const SoFaceDetail * facedetail = static_cast(detail); + const SoFaceDetail* facedetail = static_cast(detail); // get the curvature info of the three points of the picked facet int index1 = facedetail->getPoint(0)->getCoordinateIndex(); int index2 = facedetail->getPoint(1)->getCoordinateIndex(); @@ -543,31 +571,34 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void * ud, SoEventCallback } } else if (ev->getTypeId().isDerivedFrom(SoLocation2Event::getClassTypeId())) { - const SoPickedPoint * point = n->getPickedPoint(); - if (!point) + const SoPickedPoint* point = n->getPickedPoint(); + if (!point) { return; + } n->setHandled(); // By specifying the indexed mesh node 'pcFaceSet' we make sure that the picked point is // really from the mesh we render and not from any other geometry Gui::ViewProvider* vp = view->getViewProviderByPathFromTail(point->getPath()); - if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId())) + if (!vp || !vp->getTypeId().isDerivedFrom(ViewProviderMeshCurvature::getClassTypeId())) { return; + } ViewProviderMeshCurvature* that = static_cast(vp); const SoDetail* detail = point->getDetail(point->getPath()->getTail()); if (detail && detail->getTypeId() == SoFaceDetail::getClassTypeId()) { - const SoFaceDetail * facedetail = static_cast(detail); + const SoFaceDetail* facedetail = static_cast(detail); // get the curvature info of the three points of the picked facet int index1 = facedetail->getPoint(0)->getCoordinateIndex(); int index2 = facedetail->getPoint(1)->getCoordinateIndex(); int index3 = facedetail->getPoint(2)->getCoordinateIndex(); std::string info = that->curvatureInfo(false, index1, index2, index3); - Gui::getMainWindow()->setPaneText(1,QString::fromLatin1(info.c_str())); + Gui::getMainWindow()->setPaneText(1, QString::fromLatin1(info.c_str())); } } } -std::string ViewProviderMeshCurvature::curvatureInfo(bool detail, int index1, int index2, int index3) const +std::string +ViewProviderMeshCurvature::curvatureInfo(bool detail, int index1, int index2, int index3) const { // get the curvature info of the three points of the picked facet App::Property* prop = pcObject->getPropertyByName("CurvInfo"); @@ -577,9 +608,11 @@ std::string ViewProviderMeshCurvature::curvatureInfo(bool detail, int index1, in const Mesh::CurvatureInfo& cVal1 = (*curv)[index1]; const Mesh::CurvatureInfo& cVal2 = (*curv)[index2]; const Mesh::CurvatureInfo& cVal3 = (*curv)[index3]; - float fVal1 = 0.0f; float fVal2 = 0.0f; float fVal3 = 0.0f; + float fVal1 = 0.0f; + float fVal2 = 0.0f; + float fVal3 = 0.0f; - bool print=true; + bool print = true; std::string mode = getActiveDisplayMode(); if (mode == "Minimum curvature") { fVal1 = cVal1.fMinCurvature; @@ -592,19 +625,22 @@ std::string ViewProviderMeshCurvature::curvatureInfo(bool detail, int index1, in fVal3 = cVal3.fMaxCurvature; } else if (mode == "Gaussian curvature") { - fVal1 = cVal1.fMaxCurvature*cVal1.fMinCurvature; - fVal2 = cVal2.fMaxCurvature*cVal2.fMinCurvature; - fVal3 = cVal3.fMaxCurvature*cVal3.fMinCurvature; + fVal1 = cVal1.fMaxCurvature * cVal1.fMinCurvature; + fVal2 = cVal2.fMaxCurvature * cVal2.fMinCurvature; + fVal3 = cVal3.fMaxCurvature * cVal3.fMinCurvature; } else if (mode == "Mean curvature") { - fVal1 = 0.5f*(cVal1.fMaxCurvature+cVal1.fMinCurvature); - fVal2 = 0.5f*(cVal2.fMaxCurvature+cVal2.fMinCurvature); - fVal3 = 0.5f*(cVal3.fMaxCurvature+cVal3.fMinCurvature); + fVal1 = 0.5f * (cVal1.fMaxCurvature + cVal1.fMinCurvature); + fVal2 = 0.5f * (cVal2.fMaxCurvature + cVal2.fMinCurvature); + fVal3 = 0.5f * (cVal3.fMaxCurvature + cVal3.fMinCurvature); } else if (mode == "Absolute curvature") { - fVal1 = fabs(cVal1.fMaxCurvature) > fabs(cVal1.fMinCurvature) ? cVal1.fMaxCurvature : cVal1.fMinCurvature; - fVal2 = fabs(cVal2.fMaxCurvature) > fabs(cVal2.fMinCurvature) ? cVal2.fMaxCurvature : cVal2.fMinCurvature; - fVal3 = fabs(cVal3.fMaxCurvature) > fabs(cVal3.fMinCurvature) ? cVal3.fMaxCurvature : cVal3.fMinCurvature; + fVal1 = fabs(cVal1.fMaxCurvature) > fabs(cVal1.fMinCurvature) ? cVal1.fMaxCurvature + : cVal1.fMinCurvature; + fVal2 = fabs(cVal2.fMaxCurvature) > fabs(cVal2.fMinCurvature) ? cVal2.fMaxCurvature + : cVal2.fMinCurvature; + fVal3 = fabs(cVal3.fMaxCurvature) > fabs(cVal3.fMinCurvature) ? cVal3.fMaxCurvature + : cVal3.fMinCurvature; } else { print = false; diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.h b/src/Mod/Mesh/Gui/ViewProviderCurvature.h index 66576c7338..b1199d8949 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.h +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.h @@ -40,26 +40,30 @@ class SoPath; class SoLocateHighlight; class SoTransformerManip; -namespace Gui { - class SoFCColorBar; - class View3DInventorViewer; +namespace Gui +{ +class SoFCColorBar; +class View3DInventorViewer; +} // namespace Gui + +namespace Mesh +{ +class PropertyCurvatureList; } -namespace Mesh { - class PropertyCurvatureList; -} +namespace MeshGui +{ -namespace MeshGui { - -/** The ViewProviderMeshCurvature class is associated to the mesh curvature feature. It allows to display the most known types of - * curvatures, such as Gaussian curvature, mean curvature, minimum and maximum curvature. - * Moreover a color bar is also added to the scene. +/** The ViewProviderMeshCurvature class is associated to the mesh curvature feature. It allows to + * display the most known types of curvatures, such as Gaussian curvature, mean curvature, minimum + * and maximum curvature. Moreover a color bar is also added to the scene. * * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshCurvature : public Gui::ViewProviderDocumentObject, - public App::DocumentObserver, - public Base::Observer { +class MeshGuiExport ViewProviderMeshCurvature: public Gui::ViewProviderDocumentObject, + public App::DocumentObserver, + public Base::Observer +{ using inherited = Gui::ViewProviderDocumentObject; PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshCurvature); @@ -70,9 +74,13 @@ public: App::PropertyMaterial TextureMaterial; - /// Extracts the mesh data from the feature \a pcFeature and creates an Inventor node \a SoNode with these data. + /// Extracts the mesh data from the feature \a pcFeature and creates an Inventor node \a SoNode + /// with these data. void attach(App::DocumentObject* pcFeature) override; - bool useNewSelectionModel() const override {return false;} + bool useNewSelectionModel() const override + { + return false; + } /// Sets the viewing mode void setDisplayMode(const char* ModeName) override; /// get the default display mode @@ -83,8 +91,9 @@ public: void updateData(const App::Property*) override; /// Returns a pixmap for the associated feature type QIcon getIcon() const override; - /// Once the color bar settinhs has been changed this method gets called to update the feature's representation - void OnChange(Base::Subject &rCaller,int rcReason) override; + /// Once the color bar settinhs has been changed this method gets called to update the feature's + /// representation + void OnChange(Base::Subject& rCaller, int rcReason) override; /// Returns a color bar SoSeparator* getFrontRoot() const override; /// Hide the object in the view @@ -93,7 +102,7 @@ public: void show() override; public: - static void curvatureInfoCallback(void * ud, SoEventCallback * n); + static void curvatureInfoCallback(void* ud, SoEventCallback* n); protected: void onChanged(const App::Property* prop) override; @@ -102,23 +111,22 @@ protected: void touchShapeNode(); private: - void init(const Mesh::PropertyCurvatureList *prop); + void init(const Mesh::PropertyCurvatureList* prop); void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop) override; protected: - SoMaterial * pcColorMat; - SoGroup * pcLinkRoot; + SoMaterial* pcColorMat; + SoGroup* pcLinkRoot; Gui::SoFCColorBar* pcColorBar; - SoDrawStyle * pcColorStyle; - SoSeparator * pcColorRoot; + SoDrawStyle* pcColorStyle; + SoSeparator* pcColorRoot; private: static bool addflag; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_VIEWPROVIDER_MESH_CURVATURE_H - +#endif // MESHGUI_VIEWPROVIDER_MESH_CURVATURE_H diff --git a/src/Mod/Mesh/Gui/ViewProviderDefects.cpp b/src/Mod/Mesh/Gui/ViewProviderDefects.cpp index d76bcf337b..992ce876bd 100644 --- a/src/Mod/Mesh/Gui/ViewProviderDefects.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderDefects.cpp @@ -22,22 +22,22 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include #include -#include #include #include +#include #include "ViewProviderDefects.h" @@ -59,7 +59,7 @@ PROPERTY_SOURCE(MeshGui::ViewProviderMeshFolds, MeshGui::ViewProviderMeshDefects ViewProviderMeshDefects::ViewProviderMeshDefects() { - ADD_PROPERTY(LineWidth,(2.0f)); + ADD_PROPERTY(LineWidth, (2.0f)); pcCoords = new SoCoordinate3(); pcCoords->ref(); @@ -80,8 +80,9 @@ void ViewProviderMeshDefects::onChanged(const App::Property* prop) if (prop == &LineWidth) { pcDrawStyle->lineWidth = LineWidth.getValue(); } - // Visibility changes must be handled here because in the base class it changes the attribute of the feature - // and thus affects the visibility of the mesh view provider which is undesired behaviour + // Visibility changes must be handled here because in the base class it changes the attribute of + // the feature and thus affects the visibility of the mesh view provider which is undesired + // behaviour else if (prop == &Visibility) { Visibility.getValue() ? show() : hide(); } @@ -105,7 +106,7 @@ ViewProviderMeshOrientation::~ViewProviderMeshOrientation() void ViewProviderMeshOrientation::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcFaceRoot = new SoGroup(); @@ -113,24 +114,28 @@ void ViewProviderMeshOrientation::attach(App::DocumentObject* pcFeat) pcFlatStyle->style = SoDrawStyle::FILLED; pcFaceRoot->addChild(pcFlatStyle); - SoShapeHints * flathints = new SoShapeHints; - flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; + SoShapeHints* flathints = new SoShapeHints; + flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE; flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; pcFaceRoot->addChild(flathints); // Draw faces SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.5f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.5f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcFaces); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); linesep->addChild(markcol); linesep->addChild(marker); @@ -142,19 +147,19 @@ void ViewProviderMeshOrientation::attach(App::DocumentObject* pcFeat) void ViewProviderMeshOrientation::showDefects(const std::vector& inds) { Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); pcCoords->point.deleteValues(0); - pcCoords->point.setNum(3*inds.size()); + pcCoords->point.setNum(3 * inds.size()); MeshCore::MeshFacetIterator cF(rMesh); - int i=0; - int j=0; + int i = 0; + int j = 0; for (Mesh::ElementIndex ind : inds) { cF.Set(ind); for (auto cP : cF->_aclPoints) { // move a bit in opposite normal direction to overlay the original faces cP -= 0.001f * cF->GetNormal(); - pcCoords->point.set1Value(i++,cP.x,cP.y,cP.z); + pcCoords->point.set1Value(i++, cP.x, cP.y, cP.z); } pcFaces->numVertices.set1Value(j++, 3); } @@ -177,7 +182,7 @@ ViewProviderMeshNonManifolds::~ViewProviderMeshNonManifolds() void ViewProviderMeshNonManifolds::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcLineRoot = new SoGroup(); pcDrawStyle->lineWidth = 3; @@ -185,18 +190,22 @@ void ViewProviderMeshNonManifolds::attach(App::DocumentObject* pcFeat) // Draw lines SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.0f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.0f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcLines); pcLineRoot->addChild(linesep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); linesep->addChild(markcol); linesep->addChild(marker); @@ -205,22 +214,24 @@ void ViewProviderMeshNonManifolds::attach(App::DocumentObject* pcFeat) void ViewProviderMeshNonManifolds::showDefects(const std::vector& inds) { - if ((inds.size() % 2) != 0) + if ((inds.size() % 2) != 0) { return; + } Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); pcCoords->point.deleteValues(0); pcCoords->point.setNum(inds.size()); MeshCore::MeshPointIterator cP(rMesh); - int i=0; - int j=0; - for (std::vector::const_iterator it = inds.begin(); it != inds.end(); ++it) { + int i = 0; + int j = 0; + for (std::vector::const_iterator it = inds.begin(); it != inds.end(); + ++it) { cP.Set(*it); - pcCoords->point.set1Value(i++,cP->x,cP->y,cP->z); - ++it; // go to end point + pcCoords->point.set1Value(i++, cP->x, cP->y, cP->z); + ++it; // go to end point cP.Set(*it); - pcCoords->point.set1Value(i++,cP->x,cP->y,cP->z); + pcCoords->point.set1Value(i++, cP->x, cP->y, cP->z); pcLines->numVertices.set1Value(j++, 2); } @@ -242,7 +253,7 @@ ViewProviderMeshNonManifoldPoints::~ViewProviderMeshNonManifoldPoints() void ViewProviderMeshNonManifoldPoints::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcPointRoot = new SoGroup(); pcDrawStyle->pointSize = 3; @@ -250,18 +261,22 @@ void ViewProviderMeshNonManifoldPoints::attach(App::DocumentObject* pcFeat) // Draw points SoSeparator* pointsep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.5f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.5f, 0.0f); pointsep->addChild(basecol); pointsep->addChild(pcCoords); pointsep->addChild(pcPoints); pcPointRoot->addChild(pointsep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); pointsep->addChild(markcol); pointsep->addChild(marker); @@ -271,14 +286,14 @@ void ViewProviderMeshNonManifoldPoints::attach(App::DocumentObject* pcFeat) void ViewProviderMeshNonManifoldPoints::showDefects(const std::vector& inds) { Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); pcCoords->point.deleteValues(0); pcCoords->point.setNum(inds.size()); MeshCore::MeshPointIterator cP(rMesh); int i = 0; for (Mesh::ElementIndex ind : inds) { cP.Set(ind); - pcCoords->point.set1Value(i++,cP->x,cP->y,cP->z); + pcCoords->point.set1Value(i++, cP->x, cP->y, cP->z); } setDisplayMaskMode("Point"); @@ -299,7 +314,7 @@ ViewProviderMeshDuplicatedFaces::~ViewProviderMeshDuplicatedFaces() void ViewProviderMeshDuplicatedFaces::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcFaceRoot = new SoGroup(); @@ -307,25 +322,29 @@ void ViewProviderMeshDuplicatedFaces::attach(App::DocumentObject* pcFeat) pcFlatStyle->style = SoDrawStyle::FILLED; pcFaceRoot->addChild(pcFlatStyle); - SoShapeHints * flathints = new SoShapeHints; - flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; + SoShapeHints* flathints = new SoShapeHints; + flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE; flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; pcFaceRoot->addChild(flathints); // Draw lines SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.0f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.0f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcFaces); pcFaceRoot->addChild(linesep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); linesep->addChild(markcol); linesep->addChild(marker); @@ -335,19 +354,19 @@ void ViewProviderMeshDuplicatedFaces::attach(App::DocumentObject* pcFeat) void ViewProviderMeshDuplicatedFaces::showDefects(const std::vector& inds) { Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); pcCoords->point.deleteValues(0); - pcCoords->point.setNum(3*inds.size()); + pcCoords->point.setNum(3 * inds.size()); MeshCore::MeshFacetIterator cF(rMesh); - int i=0; - int j=0; + int i = 0; + int j = 0; for (Mesh::ElementIndex ind : inds) { cF.Set(ind); for (auto cP : cF->_aclPoints) { // move a bit in normal direction to overlay the original faces cP += 0.001f * cF->GetNormal(); - pcCoords->point.set1Value(i++,cP.x,cP.y,cP.z); + pcCoords->point.set1Value(i++, cP.x, cP.y, cP.z); } pcFaces->numVertices.set1Value(j++, 3); } @@ -370,7 +389,7 @@ ViewProviderMeshDuplicatedPoints::~ViewProviderMeshDuplicatedPoints() void ViewProviderMeshDuplicatedPoints::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcPointRoot = new SoGroup(); pcDrawStyle->pointSize = 3; @@ -378,18 +397,22 @@ void ViewProviderMeshDuplicatedPoints::attach(App::DocumentObject* pcFeat) // Draw points SoSeparator* pointsep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.5f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.5f, 0.0f); pointsep->addChild(basecol); pointsep->addChild(pcCoords); pointsep->addChild(pcPoints); pcPointRoot->addChild(pointsep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); pointsep->addChild(markcol); pointsep->addChild(marker); @@ -399,14 +422,14 @@ void ViewProviderMeshDuplicatedPoints::attach(App::DocumentObject* pcFeat) void ViewProviderMeshDuplicatedPoints::showDefects(const std::vector& inds) { Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); pcCoords->point.deleteValues(0); pcCoords->point.setNum(inds.size()); MeshCore::MeshPointIterator cP(rMesh); int i = 0; for (Mesh::ElementIndex ind : inds) { cP.Set(ind); - pcCoords->point.set1Value(i++,cP->x,cP->y,cP->z); + pcCoords->point.set1Value(i++, cP->x, cP->y, cP->z); } setDisplayMaskMode("Point"); @@ -427,7 +450,7 @@ ViewProviderMeshDegenerations::~ViewProviderMeshDegenerations() void ViewProviderMeshDegenerations::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcLineRoot = new SoGroup(); pcDrawStyle->lineWidth = 3; @@ -435,18 +458,22 @@ void ViewProviderMeshDegenerations::attach(App::DocumentObject* pcFeat) // Draw lines SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.5f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.5f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcLines); pcLineRoot->addChild(linesep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); linesep->addChild(markcol); linesep->addChild(marker); @@ -456,13 +483,13 @@ void ViewProviderMeshDegenerations::attach(App::DocumentObject* pcFeat) void ViewProviderMeshDegenerations::showDefects(const std::vector& inds) { Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); pcCoords->point.deleteValues(0); - pcCoords->point.setNum(2*inds.size()); + pcCoords->point.setNum(2 * inds.size()); MeshCore::MeshFacetIterator cF(rMesh); - int i=0; - int j=0; + int i = 0; + int j = 0; for (Mesh::ElementIndex ind : inds) { cF.Set(ind); const MeshCore::MeshPoint& rE0 = cF->_aclPoints[0]; @@ -474,32 +501,38 @@ void ViewProviderMeshDegenerations::showDefects(const std::vectorpoint.set1Value(i++,cP1.x,cP1.y,cP1.z); - pcCoords->point.set1Value(i++,cP2.x,cP2.y,cP2.z); + cP1.Set(rE1.x + eps, rE1.y + eps, rE1.z + eps); + cP2.Set(rE2.x - eps, rE2.y - eps, rE2.z - eps); + pcCoords->point.set1Value(i++, cP1.x, cP1.y, cP1.z); + pcCoords->point.set1Value(i++, cP2.x, cP2.y, cP2.z); } else if (rE0 == rE1) { - pcCoords->point.set1Value(i++,rE1.x,rE1.y,rE1.z); - pcCoords->point.set1Value(i++,rE2.x,rE2.y,rE2.z); + pcCoords->point.set1Value(i++, rE1.x, rE1.y, rE1.z); + pcCoords->point.set1Value(i++, rE2.x, rE2.y, rE2.z); } else if (rE1 == rE2) { - pcCoords->point.set1Value(i++,rE2.x,rE2.y,rE2.z); - pcCoords->point.set1Value(i++,rE0.x,rE0.y,rE0.z); + pcCoords->point.set1Value(i++, rE2.x, rE2.y, rE2.z); + pcCoords->point.set1Value(i++, rE0.x, rE0.y, rE0.z); } else if (rE2 == rE0) { - pcCoords->point.set1Value(i++,rE0.x,rE0.y,rE0.z); - pcCoords->point.set1Value(i++,rE1.x,rE1.y,rE1.z); + pcCoords->point.set1Value(i++, rE0.x, rE0.y, rE0.z); + pcCoords->point.set1Value(i++, rE1.x, rE1.y, rE1.z); } else { - for (int j=0; j<3; j++) { - Base::Vector3f cVec1 = cF->_aclPoints[(j+1)%3] - cF->_aclPoints[j]; - Base::Vector3f cVec2 = cF->_aclPoints[(j+2)%3] - cF->_aclPoints[j]; + for (int j = 0; j < 3; j++) { + Base::Vector3f cVec1 = cF->_aclPoints[(j + 1) % 3] - cF->_aclPoints[j]; + Base::Vector3f cVec2 = cF->_aclPoints[(j + 2) % 3] - cF->_aclPoints[j]; // adjust the neighbourhoods and point indices if (cVec1 * cVec2 < 0.0f) { - pcCoords->point.set1Value(i++,cF->_aclPoints[(j+1)%3].x,cF->_aclPoints[(j+1)%3].y,cF->_aclPoints[(j+1)%3].z); - pcCoords->point.set1Value(i++,cF->_aclPoints[(j+2)%3].x,cF->_aclPoints[(j+2)%3].y,cF->_aclPoints[(j+2)%3].z); + pcCoords->point.set1Value(i++, + cF->_aclPoints[(j + 1) % 3].x, + cF->_aclPoints[(j + 1) % 3].y, + cF->_aclPoints[(j + 1) % 3].z); + pcCoords->point.set1Value(i++, + cF->_aclPoints[(j + 2) % 3].x, + cF->_aclPoints[(j + 2) % 3].y, + cF->_aclPoints[(j + 2) % 3].z); break; } } @@ -526,7 +559,7 @@ ViewProviderMeshIndices::~ViewProviderMeshIndices() void ViewProviderMeshIndices::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcFaceRoot = new SoGroup(); @@ -534,25 +567,29 @@ void ViewProviderMeshIndices::attach(App::DocumentObject* pcFeat) pcFlatStyle->style = SoDrawStyle::FILLED; pcFaceRoot->addChild(pcFlatStyle); - SoShapeHints * flathints = new SoShapeHints; - flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; + SoShapeHints* flathints = new SoShapeHints; + flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE; flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; pcFaceRoot->addChild(flathints); // Draw lines SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.5f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.5f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcFaces); pcFaceRoot->addChild(linesep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); linesep->addChild(markcol); linesep->addChild(marker); @@ -562,20 +599,20 @@ void ViewProviderMeshIndices::attach(App::DocumentObject* pcFeat) void ViewProviderMeshIndices::showDefects(const std::vector& inds) { Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); if (!inds.empty()) { pcCoords->point.deleteValues(0); - pcCoords->point.setNum(3*inds.size()); + pcCoords->point.setNum(3 * inds.size()); MeshCore::MeshFacetIterator cF(rMesh); - int i=0; - int j=0; + int i = 0; + int j = 0; for (Mesh::ElementIndex ind : inds) { cF.Set(ind); for (auto cP : cF->_aclPoints) { // move a bit in opposite normal direction to overlay the original faces cP -= 0.001f * cF->GetNormal(); - pcCoords->point.set1Value(i++,cP.x,cP.y,cP.z); + pcCoords->point.set1Value(i++, cP.x, cP.y, cP.z); } pcFaces->numVertices.set1Value(j++, 3); } @@ -599,7 +636,7 @@ ViewProviderMeshSelfIntersections::~ViewProviderMeshSelfIntersections() void ViewProviderMeshSelfIntersections::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcLineRoot = new SoGroup(); pcDrawStyle->lineWidth = 3; @@ -607,18 +644,22 @@ void ViewProviderMeshSelfIntersections::attach(App::DocumentObject* pcFeat) // Draw lines SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.5f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.5f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcLines); pcLineRoot->addChild(linesep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); linesep->addChild(markcol); linesep->addChild(marker); @@ -627,30 +668,33 @@ void ViewProviderMeshSelfIntersections::attach(App::DocumentObject* pcFeat) void ViewProviderMeshSelfIntersections::showDefects(const std::vector& indices) { - if (indices.size() % 2 != 0) + if (indices.size() % 2 != 0) { return; + } Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); MeshCore::MeshEvalSelfIntersection eval(rMesh); - std::vector > intersection; + std::vector> intersection; std::vector::const_iterator it; - for (it = indices.begin(); it != indices.end(); ) { - Mesh::ElementIndex id1 = *it; ++it; - Mesh::ElementIndex id2 = *it; ++it; - intersection.emplace_back(id1,id2); + for (it = indices.begin(); it != indices.end();) { + Mesh::ElementIndex id1 = *it; + ++it; + Mesh::ElementIndex id2 = *it; + ++it; + intersection.emplace_back(id1, id2); } - std::vector > lines; + std::vector> lines; eval.GetIntersections(intersection, lines); pcCoords->point.deleteValues(0); - pcCoords->point.setNum(2*lines.size()); - int i=0; - int j=0; - for (const auto & line : lines) { - pcCoords->point.set1Value(i++,line.first.x,line.first.y,line.first.z); - pcCoords->point.set1Value(i++,line.second.x,line.second.y,line.second.z); + pcCoords->point.setNum(2 * lines.size()); + int i = 0; + int j = 0; + for (const auto& line : lines) { + pcCoords->point.set1Value(i++, line.first.x, line.first.y, line.first.z); + pcCoords->point.set1Value(i++, line.second.x, line.second.y, line.second.z); pcLines->numVertices.set1Value(j++, 2); } @@ -672,7 +716,7 @@ ViewProviderMeshFolds::~ViewProviderMeshFolds() void ViewProviderMeshFolds::attach(App::DocumentObject* pcFeat) { - ViewProviderDocumentObject::attach( pcFeat ); + ViewProviderDocumentObject::attach(pcFeat); SoGroup* pcFaceRoot = new SoGroup(); @@ -680,25 +724,29 @@ void ViewProviderMeshFolds::attach(App::DocumentObject* pcFeat) pcFlatStyle->style = SoDrawStyle::FILLED; pcFaceRoot->addChild(pcFlatStyle); - SoShapeHints * flathints = new SoShapeHints; - flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE ; + SoShapeHints* flathints = new SoShapeHints; + flathints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE; flathints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE; pcFaceRoot->addChild(flathints); // Draw lines SoSeparator* linesep = new SoSeparator; - SoBaseColor * basecol = new SoBaseColor; - basecol->rgb.setValue( 1.0f, 0.0f, 0.0f ); + SoBaseColor* basecol = new SoBaseColor; + basecol->rgb.setValue(1.0f, 0.0f, 0.0f); linesep->addChild(basecol); linesep->addChild(pcCoords); linesep->addChild(pcFaces); pcFaceRoot->addChild(linesep); // Draw markers - SoBaseColor * markcol = new SoBaseColor; - markcol->rgb.setValue( 1.0f, 1.0f, 0.0f ); + SoBaseColor* markcol = new SoBaseColor; + markcol->rgb.setValue(1.0f, 1.0f, 0.0f); SoMarkerSet* marker = new SoMarkerSet; - marker->markerIndex=Gui::Inventor::MarkerBitmaps::getMarkerIndex("PLUS", App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/View")->GetInt("MarkerSize", 7)); + marker->markerIndex = Gui::Inventor::MarkerBitmaps::getMarkerIndex( + "PLUS", + App::GetApplication() + .GetParameterGroupByPath("User parameter:BaseApp/Preferences/View") + ->GetInt("MarkerSize", 7)); linesep->addChild(markcol); linesep->addChild(marker); @@ -708,19 +756,19 @@ void ViewProviderMeshFolds::attach(App::DocumentObject* pcFeat) void ViewProviderMeshFolds::showDefects(const std::vector& inds) { Mesh::Feature* f = static_cast(pcObject); - const MeshCore::MeshKernel & rMesh = f->Mesh.getValue().getKernel(); + const MeshCore::MeshKernel& rMesh = f->Mesh.getValue().getKernel(); pcCoords->point.deleteValues(0); - pcCoords->point.setNum(3*inds.size()); + pcCoords->point.setNum(3 * inds.size()); MeshCore::MeshFacetIterator cF(rMesh); - int i=0; - int j=0; + int i = 0; + int j = 0; for (Mesh::ElementIndex ind : inds) { cF.Set(ind); for (auto cP : cF->_aclPoints) { // move a bit in normal direction to overlay the original faces cP += 0.001f * cF->GetNormal(); - pcCoords->point.set1Value(i++,cP.x,cP.y,cP.z); + pcCoords->point.set1Value(i++, cP.x, cP.y, cP.z); } pcFaces->numVertices.set1Value(j++, 3); } diff --git a/src/Mod/Mesh/Gui/ViewProviderDefects.h b/src/Mod/Mesh/Gui/ViewProviderDefects.h index 776c93d9d4..c94daf67f5 100644 --- a/src/Mod/Mesh/Gui/ViewProviderDefects.h +++ b/src/Mod/Mesh/Gui/ViewProviderDefects.h @@ -30,13 +30,15 @@ class SoPointSet; class SoLineSet; class SoFaceSet; -namespace MeshGui { +namespace MeshGui +{ -/** The ViewProviderMeshDefects class is used to display the most known types of defects of a polymesh. - * In subclasses defects like non-manifolds, wrong oriented facets, degenerated facets, duplicates, .... are displayed. +/** The ViewProviderMeshDefects class is used to display the most known types of defects of a + * polymesh. In subclasses defects like non-manifolds, wrong oriented facets, degenerated facets, + * duplicates, .... are displayed. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshDefects : public Gui::ViewProviderDocumentObject +class MeshGuiExport ViewProviderMeshDefects: public Gui::ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshDefects); @@ -56,14 +58,15 @@ protected: /// get called by the container whenever a property has been changed void onChanged(const App::Property* prop) override; - SoCoordinate3 * pcCoords; - SoDrawStyle * pcDrawStyle; + SoCoordinate3* pcCoords; + SoDrawStyle* pcDrawStyle; }; -/** The ViewProviderMeshOrientation class displays wrong oriented facets (i.e. flipped normals) in orange. +/** The ViewProviderMeshOrientation class displays wrong oriented facets (i.e. flipped normals) in + * orange. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshOrientation : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshOrientation: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshOrientation); @@ -81,7 +84,7 @@ protected: /** The ViewProviderMeshNonManifolds class displays edges with more than two faces attached in red. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshNonManifolds : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshNonManifolds: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshNonManifolds); @@ -99,7 +102,7 @@ protected: /** The ViewProviderMeshNonManifoldPoints class displays non-manifold vertexes in red. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshNonManifoldPoints : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshNonManifoldPoints: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshNonManifoldPoints); @@ -117,7 +120,7 @@ protected: /** The ViewProviderMeshDuplicatedFaces class displays duplicated faces in red. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshDuplicatedFaces : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshDuplicatedFaces: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshDuplicatedFaces); @@ -132,10 +135,11 @@ protected: SoFaceSet* pcFaces; }; -/** The ViewProviderMeshDegenerations class displays degenerated faces to a line or even a point in orange. +/** The ViewProviderMeshDegenerations class displays degenerated faces to a line or even a point in + * orange. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshDegenerations : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshDegenerations: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshDegenerations); @@ -150,7 +154,7 @@ protected: SoLineSet* pcLines; }; -class MeshGuiExport ViewProviderMeshDuplicatedPoints : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshDuplicatedPoints: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshDuplicatedPoints); @@ -165,7 +169,7 @@ protected: SoPointSet* pcPoints; }; -class MeshGuiExport ViewProviderMeshIndices : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshIndices: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshIndices); @@ -183,7 +187,7 @@ protected: /** The ViewProviderMeshSelfIntersections class displays lines of self-intersections. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshSelfIntersections : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshSelfIntersections: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshSelfIntersections); @@ -198,7 +202,7 @@ protected: SoLineSet* pcLines; }; -class MeshGuiExport ViewProviderMeshFolds : public ViewProviderMeshDefects +class MeshGuiExport ViewProviderMeshFolds: public ViewProviderMeshDefects { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshFolds); @@ -213,8 +217,7 @@ protected: SoFaceSet* pcFaces; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_VIEWPROVIDER_MESH_DEFECTS_H - +#endif // MESHGUI_VIEWPROVIDER_MESH_DEFECTS_H diff --git a/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.cpp b/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.cpp index 6d7febbbf0..53e62186e5 100644 --- a/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.cpp @@ -22,26 +22,26 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include #endif #include #include #include -#include #include #include +#include -#include "ViewProviderMeshFaceSet.h" #include "SoFCIndexedFaceSet.h" #include "SoFCMeshObject.h" +#include "ViewProviderMeshFaceSet.h" using namespace MeshGui; @@ -77,7 +77,7 @@ ViewProviderMeshFaceSet::~ViewProviderMeshFaceSet() pcMeshFaces->unref(); } -void ViewProviderMeshFaceSet::attach(App::DocumentObject *pcFeat) +void ViewProviderMeshFaceSet::attach(App::DocumentObject* pcFeat) { ViewProviderMesh::attach(pcFeat); @@ -85,11 +85,13 @@ void ViewProviderMeshFaceSet::attach(App::DocumentObject *pcFeat) pcShapeGroup->addChild(pcMeshFaces); // read the threshold from the preferences - Base::Reference hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); + Base::Reference hGrp = + Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh"); int size = hGrp->GetInt("RenderTriangleLimit", -1); if (size > 0) { - pcMeshShape->renderTriangleLimit = (unsigned int)(pow(10.0f,size)); - static_cast(pcMeshFaces)->renderTriangleLimit = (unsigned int)(pow(10.0f,size)); + pcMeshShape->renderTriangleLimit = (unsigned int)(pow(10.0f, size)); + static_cast(pcMeshFaces)->renderTriangleLimit = + (unsigned int)(pow(10.0f, size)); } } @@ -97,7 +99,8 @@ void ViewProviderMeshFaceSet::updateData(const App::Property* prop) { ViewProviderMesh::updateData(prop); if (prop->getTypeId() == Mesh::PropertyMeshKernel::getClassTypeId()) { - const Mesh::MeshObject* mesh = static_cast(prop)->getValuePtr(); + const Mesh::MeshObject* mesh = + static_cast(prop)->getValuePtr(); bool direct = MeshRenderer::shouldRenderDirectly(mesh->countFacets() > this->triangleCount); if (direct) { @@ -130,10 +133,12 @@ void ViewProviderMeshFaceSet::updateData(const App::Property* prop) showOpenEdges(OpenEdges.getValue()); std::vector selection; mesh->getFacetsFromSelection(selection); - if (selection.empty()) + if (selection.empty()) { unhighlightSelection(); - else + } + else { highlightSelection(); + } } } @@ -160,15 +165,16 @@ void ViewProviderMeshFaceSet::showOpenEdges(bool show) pcOpenEdge->addChild(lines); // Build up the lines with indices to the list of vertices 'pcMeshCoord' - int index=0; - const MeshCore::MeshKernel& rMesh = static_cast(pcObject)->Mesh.getValue().getKernel(); + int index = 0; + const MeshCore::MeshKernel& rMesh = + static_cast(pcObject)->Mesh.getValue().getKernel(); const MeshCore::MeshFacetArray& rFaces = rMesh.GetFacets(); - for (const auto & rFace : rFaces) { - for (int i=0; i<3; i++) { + for (const auto& rFace : rFaces) { + for (int i = 0; i < 3; i++) { if (rFace._aulNeighbours[i] == MeshCore::FACET_INDEX_MAX) { - lines->coordIndex.set1Value(index++,rFace._aulPoints[i]); - lines->coordIndex.set1Value(index++,rFace._aulPoints[(i+1)%3]); - lines->coordIndex.set1Value(index++,SO_END_LINE_INDEX); + lines->coordIndex.set1Value(index++, rFace._aulPoints[i]); + lines->coordIndex.set1Value(index++, rFace._aulPoints[(i + 1) % 3]); + lines->coordIndex.set1Value(index++, SO_END_LINE_INDEX); } } } @@ -181,14 +187,16 @@ void ViewProviderMeshFaceSet::showOpenEdges(bool show) SoShape* ViewProviderMeshFaceSet::getShapeNode() const { - if (directRendering) + if (directRendering) { return this->pcMeshShape; + } return this->pcMeshFaces; } SoNode* ViewProviderMeshFaceSet::getCoordNode() const { - if (directRendering) + if (directRendering) { return this->pcMeshNode; + } return this->pcMeshCoord; } diff --git a/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.h b/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.h index 9bc233f949..dd6413cfb6 100644 --- a/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.h +++ b/src/Mod/Mesh/Gui/ViewProviderMeshFaceSet.h @@ -25,7 +25,8 @@ #include -namespace MeshGui { +namespace MeshGui +{ class SoFCIndexedFaceSet; /** @@ -46,7 +47,7 @@ class SoFCIndexedFaceSet; * For more details @see SoFCMeshNode and SoFCMeshFaceSet. * @author Werner Mayer */ -class MeshGuiExport ViewProviderMeshFaceSet : public ViewProviderMesh +class MeshGuiExport ViewProviderMeshFaceSet: public ViewProviderMesh { PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshFaceSet); @@ -54,7 +55,7 @@ public: ViewProviderMeshFaceSet(); ~ViewProviderMeshFaceSet() override; - void attach(App::DocumentObject *pcFeat) override; + void attach(App::DocumentObject* pcFeat) override; void updateData(const App::Property*) override; protected: @@ -65,14 +66,13 @@ protected: private: bool directRendering; unsigned long triangleCount; - SoCoordinate3 * pcMeshCoord; - SoFCIndexedFaceSet * pcMeshFaces; - SoFCMeshObjectNode * pcMeshNode; - SoFCMeshObjectShape * pcMeshShape; + SoCoordinate3* pcMeshCoord; + SoFCIndexedFaceSet* pcMeshFaces; + SoFCMeshObjectNode* pcMeshNode; + SoFCMeshObjectShape* pcMeshShape; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_VIEWPROVIDERMESHFACESET_H - +#endif // MESHGUI_VIEWPROVIDERMESHFACESET_H diff --git a/src/Mod/Mesh/Gui/ViewProviderMeshPyImp.cpp b/src/Mod/Mesh/Gui/ViewProviderMeshPyImp.cpp index afd209c706..3e5d4c9344 100644 --- a/src/Mod/Mesh/Gui/ViewProviderMeshPyImp.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderMeshPyImp.cpp @@ -22,13 +22,15 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include +#include #endif +// clang-format off #include "ViewProvider.h" // inclusion of the generated files (generated out of ViewProviderMeshPy.xml) #include "ViewProviderMeshPy.h" #include "ViewProviderMeshPy.cpp" +// clang-format on using namespace MeshGui; @@ -42,11 +44,12 @@ std::string ViewProviderMeshPy::representation() const return str.str(); } -PyObject* ViewProviderMeshPy::setSelection(PyObject *args) +PyObject* ViewProviderMeshPy::setSelection(PyObject* args) { PyObject* obj; - if (!PyArg_ParseTuple(args, "O", &obj)) + if (!PyArg_ParseTuple(args, "O", &obj)) { return nullptr; + } Py::Sequence list(obj); std::vector selection; @@ -62,11 +65,12 @@ PyObject* ViewProviderMeshPy::setSelection(PyObject *args) Py_Return; } -PyObject* ViewProviderMeshPy::addSelection(PyObject *args) +PyObject* ViewProviderMeshPy::addSelection(PyObject* args) { PyObject* obj; - if (!PyArg_ParseTuple(args, "O", &obj)) + if (!PyArg_ParseTuple(args, "O", &obj)) { return nullptr; + } Py::Sequence list(obj); std::vector selection; @@ -82,11 +86,12 @@ PyObject* ViewProviderMeshPy::addSelection(PyObject *args) Py_Return; } -PyObject* ViewProviderMeshPy::removeSelection(PyObject *args) +PyObject* ViewProviderMeshPy::removeSelection(PyObject* args) { PyObject* obj; - if (!PyArg_ParseTuple(args, "O", &obj)) + if (!PyArg_ParseTuple(args, "O", &obj)) { return nullptr; + } Py::Sequence list(obj); std::vector selection; @@ -102,31 +107,34 @@ PyObject* ViewProviderMeshPy::removeSelection(PyObject *args) Py_Return; } -PyObject* ViewProviderMeshPy::invertSelection(PyObject *args) +PyObject* ViewProviderMeshPy::invertSelection(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } ViewProviderMesh* vp = getViewProviderMeshPtr(); vp->invertSelection(); Py_Return; } -PyObject* ViewProviderMeshPy::clearSelection(PyObject *args) +PyObject* ViewProviderMeshPy::clearSelection(PyObject* args) { - if (!PyArg_ParseTuple(args, "")) + if (!PyArg_ParseTuple(args, "")) { return nullptr; + } ViewProviderMesh* vp = getViewProviderMeshPtr(); vp->clearSelection(); Py_Return; } -PyObject* ViewProviderMeshPy::highlightSegments(PyObject *args) +PyObject* ViewProviderMeshPy::highlightSegments(PyObject* args) { PyObject* list; - if (!PyArg_ParseTuple(args, "O", &list)) + if (!PyArg_ParseTuple(args, "O", &list)) { return nullptr; + } App::PropertyColorList colors; colors.setPyObject(list); @@ -136,7 +144,7 @@ PyObject* ViewProviderMeshPy::highlightSegments(PyObject *args) Py_Return; } -PyObject *ViewProviderMeshPy::getCustomAttributes(const char* /*attr*/) const +PyObject* ViewProviderMeshPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; } diff --git a/src/Mod/Mesh/Gui/ViewProviderPython.cpp b/src/Mod/Mesh/Gui/ViewProviderPython.cpp index c623cd90a9..23cdd0d758 100644 --- a/src/Mod/Mesh/Gui/ViewProviderPython.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderPython.cpp @@ -21,15 +21,17 @@ ***************************************************************************/ +// clang-format off #include "PreCompiled.h" #include "ViewProviderPython.h" +// clang-format on -namespace Gui { +namespace Gui +{ /// @cond DOXERR PROPERTY_SOURCE_TEMPLATE(MeshGui::ViewProviderPython, MeshGui::ViewProviderMeshFaceSet) /// @endcond // explicit template instantiation template class MeshGuiExport ViewProviderPythonFeatureT; -} - +} // namespace Gui diff --git a/src/Mod/Mesh/Gui/ViewProviderPython.h b/src/Mod/Mesh/Gui/ViewProviderPython.h index 663c0972bb..4117965dc5 100644 --- a/src/Mod/Mesh/Gui/ViewProviderPython.h +++ b/src/Mod/Mesh/Gui/ViewProviderPython.h @@ -27,12 +27,12 @@ #include #include -namespace MeshGui { +namespace MeshGui +{ using ViewProviderPython = Gui::ViewProviderPythonFeatureT; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_VIEWPROVIDERPYTHON_H - +#endif // MESHGUI_VIEWPROVIDERPYTHON_H diff --git a/src/Mod/Mesh/Gui/ViewProviderTransform.cpp b/src/Mod/Mesh/Gui/ViewProviderTransform.cpp index efa37db4f6..7c8e21b035 100644 --- a/src/Mod/Mesh/Gui/ViewProviderTransform.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderTransform.cpp @@ -22,11 +22,11 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include #endif #include @@ -42,60 +42,59 @@ PROPERTY_SOURCE(MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMesh) ViewProviderMeshTransform::ViewProviderMeshTransform() { - pcTransformerDragger = new SoTransformerManip(); - pcTransformerDragger->ref(); + pcTransformerDragger = new SoTransformerManip(); + pcTransformerDragger->ref(); } ViewProviderMeshTransform::~ViewProviderMeshTransform() { - pcTransformerDragger->unref(); + pcTransformerDragger->unref(); } -void ViewProviderMeshTransform::attach(App::DocumentObject *pcFeat) +void ViewProviderMeshTransform::attach(App::DocumentObject* pcFeat) { - // creates the standard viewing modes - ViewProviderMesh::attach(pcFeat); + // creates the standard viewing modes + ViewProviderMesh::attach(pcFeat); - SoSeparator* pcEditRoot = new SoSeparator(); + SoSeparator* pcEditRoot = new SoSeparator(); - // flat shaded (Normal) ------------------------------------------ - SoDrawStyle *pcFlatStyle = new SoDrawStyle(); - pcFlatStyle->style = SoDrawStyle::FILLED; - SoNormalBinding* pcBinding = new SoNormalBinding(); - pcBinding->value=SoNormalBinding::PER_FACE; + // flat shaded (Normal) ------------------------------------------ + SoDrawStyle* pcFlatStyle = new SoDrawStyle(); + pcFlatStyle->style = SoDrawStyle::FILLED; + SoNormalBinding* pcBinding = new SoNormalBinding(); + pcBinding->value = SoNormalBinding::PER_FACE; - pcEditRoot->addChild(pcTransformerDragger); - pcEditRoot->addChild(pcFlatStyle); - pcEditRoot->addChild(pcShapeMaterial); - pcEditRoot->addChild(pcBinding); - pcEditRoot->addChild(pcHighlight); + pcEditRoot->addChild(pcTransformerDragger); + pcEditRoot->addChild(pcFlatStyle); + pcEditRoot->addChild(pcShapeMaterial); + pcEditRoot->addChild(pcBinding); + pcEditRoot->addChild(pcHighlight); - // adding to the switch - addDisplayMaskMode(pcEditRoot, "Edit"); + // adding to the switch + addDisplayMaskMode(pcEditRoot, "Edit"); } void ViewProviderMeshTransform::updateData(const App::Property* prop) { - ViewProviderMesh::updateData(prop); + ViewProviderMesh::updateData(prop); } void ViewProviderMeshTransform::setDisplayMode(const char* ModeName) { - if ( strcmp("Transform",ModeName) == 0 ) - setDisplayMaskMode("Edit"); - ViewProviderMesh::setDisplayMode(ModeName); + if (strcmp("Transform", ModeName) == 0) { + setDisplayMaskMode("Edit"); + } + ViewProviderMesh::setDisplayMode(ModeName); } const char* ViewProviderMeshTransform::getDefaultDisplayMode() const { - return "Transform"; + return "Transform"; } std::vector ViewProviderMeshTransform::getDisplayModes() const { - std::vector StrList = ViewProviderMesh::getDisplayModes(); - StrList.emplace_back("Transform"); - return StrList; + std::vector StrList = ViewProviderMesh::getDisplayModes(); + StrList.emplace_back("Transform"); + return StrList; } - - diff --git a/src/Mod/Mesh/Gui/ViewProviderTransform.h b/src/Mod/Mesh/Gui/ViewProviderTransform.h index 476a63f268..29032671bc 100644 --- a/src/Mod/Mesh/Gui/ViewProviderTransform.h +++ b/src/Mod/Mesh/Gui/ViewProviderTransform.h @@ -36,45 +36,45 @@ class SoPath; class SoLocateHighlight; class SoTransformerManip; -namespace Gui { - class View3DInventorViewer; +namespace Gui +{ +class View3DInventorViewer; } -namespace MeshGui { +namespace MeshGui +{ /** Like Mesh viewprovider but with manipulator */ -class ViewProviderMeshTransform : public ViewProviderMesh +class ViewProviderMeshTransform: public ViewProviderMesh { - PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshTransform); + PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshTransform); public: - ViewProviderMeshTransform(); - ~ViewProviderMeshTransform() override; + ViewProviderMeshTransform(); + ~ViewProviderMeshTransform() override; - /** - * Extracts the mesh data from the feature \a pcFeature and creates - * an Inventor node \a SoNode with these data. - */ - void attach(App::DocumentObject *) override; + /** + * Extracts the mesh data from the feature \a pcFeature and creates + * an Inventor node \a SoNode with these data. + */ + void attach(App::DocumentObject*) override; - /// set the viewing mode - void setDisplayMode(const char* ModeName) override; - /// get the default display mode - const char* getDefaultDisplayMode() const override; - /// returns a list of all possible modes - std::vector getDisplayModes() const override; - /// Update the Mesh representation - void updateData(const App::Property*) override; + /// set the viewing mode + void setDisplayMode(const char* ModeName) override; + /// get the default display mode + const char* getDefaultDisplayMode() const override; + /// returns a list of all possible modes + std::vector getDisplayModes() const override; + /// Update the Mesh representation + void updateData(const App::Property*) override; protected: - - SoTransformerManip *pcTransformerDragger; + SoTransformerManip* pcTransformerDragger; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESHGUI_VIEWPROVIDERMESHTRANSFORM_H - +#endif // MESHGUI_VIEWPROVIDERMESHTRANSFORM_H diff --git a/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp b/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp index 9349efa341..dd37366bff 100644 --- a/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp @@ -22,30 +22,30 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif #include #include -#include #include +#include #include "ViewProviderTransformDemolding.h" using Mesh::Feature; -using MeshCore::MeshKernel; using MeshCore::MeshFacetIterator; using MeshCore::MeshGeomFacet; +using MeshCore::MeshKernel; using namespace MeshGui; @@ -54,95 +54,94 @@ PROPERTY_SOURCE(MeshGui::ViewProviderMeshTransformDemolding, MeshGui::ViewProvid ViewProviderMeshTransformDemolding::ViewProviderMeshTransformDemolding() { - pcTrackballDragger = new SoTrackballDragger; - pcTrackballDragger->ref(); - pcTransformDrag = nullptr; - pcColorMat = nullptr; + pcTrackballDragger = new SoTrackballDragger; + pcTrackballDragger->ref(); + pcTransformDrag = nullptr; + pcColorMat = nullptr; } ViewProviderMeshTransformDemolding::~ViewProviderMeshTransformDemolding() { - pcTrackballDragger->unref(); + pcTrackballDragger->unref(); } -void ViewProviderMeshTransformDemolding::attach(App::DocumentObject *pcFeat) +void ViewProviderMeshTransformDemolding::attach(App::DocumentObject* pcFeat) { - // creates the standard viewing modes - ViewProviderMesh::attach(pcFeat); + // creates the standard viewing modes + ViewProviderMesh::attach(pcFeat); - SoGroup* pcDemoldRoot = new SoGroup(); + SoGroup* pcDemoldRoot = new SoGroup(); - SoDrawStyle *pcFlatStyle = new SoDrawStyle(); - pcFlatStyle->style = SoDrawStyle::FILLED; - pcDemoldRoot->addChild(pcFlatStyle); + SoDrawStyle* pcFlatStyle = new SoDrawStyle(); + pcFlatStyle->style = SoDrawStyle::FILLED; + pcDemoldRoot->addChild(pcFlatStyle); - // dragger - SoSeparator * surroundsep = new SoSeparator; + // dragger + SoSeparator* surroundsep = new SoSeparator; - SoSurroundScale * ss = new SoSurroundScale; - ss->numNodesUpToReset = 1; - ss->numNodesUpToContainer = 2; - surroundsep->addChild(ss); + SoSurroundScale* ss = new SoSurroundScale; + ss->numNodesUpToReset = 1; + ss->numNodesUpToContainer = 2; + surroundsep->addChild(ss); - SoAntiSquish * antisquish = new SoAntiSquish; - antisquish->sizing = SoAntiSquish::AVERAGE_DIMENSION ; - surroundsep->addChild(antisquish); + SoAntiSquish* antisquish = new SoAntiSquish; + antisquish->sizing = SoAntiSquish::AVERAGE_DIMENSION; + surroundsep->addChild(antisquish); - pcTrackballDragger->addValueChangedCallback(sValueChangedCallback,this); - pcTrackballDragger->addFinishCallback (sDragEndCallback,this); - surroundsep->addChild(pcTrackballDragger); + pcTrackballDragger->addValueChangedCallback(sValueChangedCallback, this); + pcTrackballDragger->addFinishCallback(sDragEndCallback, this); + surroundsep->addChild(pcTrackballDragger); - pcTransformDrag = new SoTransform(); + pcTransformDrag = new SoTransform(); - SoMaterialBinding* pcMatBinding = new SoMaterialBinding; - //pcMatBinding->value = SoMaterialBinding::PER_VERTEX_INDEXED; - pcMatBinding->value = SoMaterialBinding::PER_FACE_INDEXED; - pcColorMat = new SoMaterial; - pcColorMat->diffuseColor.set1Value(0, 1,1,0); - pcColorMat->diffuseColor.set1Value(1, 1,0,0); - pcColorMat->diffuseColor.set1Value(2, 0,1,0); - - pcDemoldRoot->addChild(surroundsep); - pcDemoldRoot->addChild(pcTransformDrag); - pcDemoldRoot->addChild(pcColorMat); - pcDemoldRoot->addChild(pcMatBinding); - pcDemoldRoot->addChild(pcHighlight); + SoMaterialBinding* pcMatBinding = new SoMaterialBinding; + // pcMatBinding->value = SoMaterialBinding::PER_VERTEX_INDEXED; + pcMatBinding->value = SoMaterialBinding::PER_FACE_INDEXED; + pcColorMat = new SoMaterial; + pcColorMat->diffuseColor.set1Value(0, 1, 1, 0); + pcColorMat->diffuseColor.set1Value(1, 1, 0, 0); + pcColorMat->diffuseColor.set1Value(2, 0, 1, 0); - // adding to the switch - addDisplayMaskMode(pcDemoldRoot, "Demold"); + pcDemoldRoot->addChild(surroundsep); + pcDemoldRoot->addChild(pcTransformDrag); + pcDemoldRoot->addChild(pcColorMat); + pcDemoldRoot->addChild(pcMatBinding); + pcDemoldRoot->addChild(pcHighlight); - calcNormalVector(); - calcMaterialIndex(SbRotation()); - // getting center point - center = static_cast(pcObject)->Mesh.getValue().getKernel().GetBoundBox().GetCenter(); + // adding to the switch + addDisplayMaskMode(pcDemoldRoot, "Demold"); - //SoGetBoundingBoxAction boxAction; - //pcHighlight->getBoundingBox(&boxAction); - //SbVector3f Center = boxAction->getCenter(); + calcNormalVector(); + calcMaterialIndex(SbRotation()); + // getting center point + center = static_cast(pcObject)->Mesh.getValue().getKernel().GetBoundBox().GetCenter(); + + // SoGetBoundingBoxAction boxAction; + // pcHighlight->getBoundingBox(&boxAction); + // SbVector3f Center = boxAction->getCenter(); } void ViewProviderMeshTransformDemolding::calcNormalVector() { - const MeshKernel& cMesh = static_cast(pcObject)->Mesh.getValue().getKernel(); + const MeshKernel& cMesh = static_cast(pcObject)->Mesh.getValue().getKernel(); - MeshFacetIterator cFIt(cMesh); - for( cFIt.Init(); cFIt.More(); cFIt.Next()) - { - const MeshGeomFacet& rFace = *cFIt; + MeshFacetIterator cFIt(cMesh); + for (cFIt.Init(); cFIt.More(); cFIt.Next()) { + const MeshGeomFacet& rFace = *cFIt; - Base::Vector3f norm(rFace.GetNormal()); - normalVector.emplace_back(norm.x,norm.y,norm.z); - } + Base::Vector3f norm(rFace.GetNormal()); + normalVector.emplace_back(norm.x, norm.y, norm.z); + } } -void ViewProviderMeshTransformDemolding::calcMaterialIndex(const SbRotation &rot) +void ViewProviderMeshTransformDemolding::calcMaterialIndex(const SbRotation& rot) { SbVec3f Up(0, 0, 1), result; int i = 0; - for (std::vector::const_iterator it = normalVector.begin(); it != normalVector.end(); ++it, i++) - { + for (std::vector::const_iterator it = normalVector.begin(); it != normalVector.end(); + ++it, i++) { rot.multVec(*it, result); float Angle = acos((result.dot(Up)) / (result.length() * Up.length())) * (180 / M_PI); @@ -159,58 +158,58 @@ void ViewProviderMeshTransformDemolding::calcMaterialIndex(const SbRotation &rot } } -void ViewProviderMeshTransformDemolding::sValueChangedCallback(void *This, SoDragger *) +void ViewProviderMeshTransformDemolding::sValueChangedCallback(void* This, SoDragger*) { - static_cast(This)->valueChangedCallback(); + static_cast(This)->valueChangedCallback(); } -void ViewProviderMeshTransformDemolding::sDragEndCallback(void *This, SoDragger *) +void ViewProviderMeshTransformDemolding::sDragEndCallback(void* This, SoDragger*) { - static_cast(This)->DragEndCallback(); + static_cast(This)->DragEndCallback(); } void ViewProviderMeshTransformDemolding::DragEndCallback() { - SbRotation rot = pcTrackballDragger->rotation.getValue(); - calcMaterialIndex(rot); - - Base::Console().Log("View: Finish dragging\n"); + SbRotation rot = pcTrackballDragger->rotation.getValue(); + calcMaterialIndex(rot); + Base::Console().Log("View: Finish dragging\n"); } void ViewProviderMeshTransformDemolding::valueChangedCallback() { - //Base::Console().Log("Value change Callback\n"); - //setTransformation(pcTrackballDragger->getMotionMatrix()); - //pcTransform->rotation = pcTrackballDragger->rotation; - SbMatrix temp; - SbRotation rot = pcTrackballDragger->rotation.getValue(); + // Base::Console().Log("Value change Callback\n"); + // setTransformation(pcTrackballDragger->getMotionMatrix()); + // pcTransform->rotation = pcTrackballDragger->rotation; + SbMatrix temp; + SbRotation rot = pcTrackballDragger->rotation.getValue(); - //calcMaterialIndex(rot); + // calcMaterialIndex(rot); - temp.setTransform( SbVec3f(0,0,0), // no transformation - rot, // rotation from the dragger - SbVec3f(1,1,1), // no scaling - SbRotation() , // no scaling orientation - SbVec3f(center.x,center.y,center.z)); // center of rotation - pcTransformDrag->setMatrix( temp ); + temp.setTransform(SbVec3f(0, 0, 0), // no transformation + rot, // rotation from the dragger + SbVec3f(1, 1, 1), // no scaling + SbRotation(), // no scaling orientation + SbVec3f(center.x, center.y, center.z)); // center of rotation + pcTransformDrag->setMatrix(temp); } void ViewProviderMeshTransformDemolding::setDisplayMode(const char* ModeName) { - if ( strcmp("Demold",ModeName) == 0 ) - setDisplayMaskMode("Demold"); - ViewProviderMesh::setDisplayMode(ModeName); + if (strcmp("Demold", ModeName) == 0) { + setDisplayMaskMode("Demold"); + } + ViewProviderMesh::setDisplayMode(ModeName); } const char* ViewProviderMeshTransformDemolding::getDefaultDisplayMode() const { - return "Demold"; + return "Demold"; } std::vector ViewProviderMeshTransformDemolding::getDisplayModes() const { - std::vector StrList = ViewProviderMesh::getDisplayModes(); - StrList.emplace_back("Demold"); - return StrList; + std::vector StrList = ViewProviderMesh::getDisplayModes(); + StrList.emplace_back("Demold"); + return StrList; } diff --git a/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.h b/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.h index b45290d1b4..b2f47ee312 100644 --- a/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.h +++ b/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.h @@ -40,56 +40,56 @@ class SbRotation; class SoTrackballDragger; class SoTransformerManip; -namespace Gui { - class View3DInventorViewer; +namespace Gui +{ +class View3DInventorViewer; } -namespace MeshGui { +namespace MeshGui +{ /** Like Mesh viewprovider but with manipulator */ -class ViewProviderMeshTransformDemolding : public ViewProviderMesh +class ViewProviderMeshTransformDemolding: public ViewProviderMesh { - PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshTransformDemolding); + PROPERTY_HEADER_WITH_OVERRIDE(MeshGui::ViewProviderMeshTransformDemolding); public: - ViewProviderMeshTransformDemolding(); - ~ViewProviderMeshTransformDemolding() override; + ViewProviderMeshTransformDemolding(); + ~ViewProviderMeshTransformDemolding() override; - /** - * Extracts the mesh data from the feature \a pcFeature and creates - * an Inventor node \a SoNode with these data. - */ - void attach(App::DocumentObject *) override; + /** + * Extracts the mesh data from the feature \a pcFeature and creates + * an Inventor node \a SoNode with these data. + */ + void attach(App::DocumentObject*) override; - /// set the viewing mode - void setDisplayMode(const char* ModeName) override; - /// get the default display mode - const char* getDefaultDisplayMode() const override; - /// returns a list of all possible modes - std::vector getDisplayModes() const override; + /// set the viewing mode + void setDisplayMode(const char* ModeName) override; + /// get the default display mode + const char* getDefaultDisplayMode() const override; + /// returns a list of all possible modes + std::vector getDisplayModes() const override; protected: - void calcMaterialIndex(const SbRotation &rot); - void calcNormalVector(); + void calcMaterialIndex(const SbRotation& rot); + void calcNormalVector(); - static void sValueChangedCallback(void *, SoDragger *); - void valueChangedCallback(); + static void sValueChangedCallback(void*, SoDragger*); + void valueChangedCallback(); - static void sDragEndCallback(void *, SoDragger *); - void DragEndCallback(); - - SoTrackballDragger *pcTrackballDragger; - SoTransform *pcTransformDrag; - SoMaterial *pcColorMat; - std::vector normalVector; - Base::Vector3f center; + static void sDragEndCallback(void*, SoDragger*); + void DragEndCallback(); + SoTrackballDragger* pcTrackballDragger; + SoTransform* pcTransformDrag; + SoMaterial* pcColorMat; + std::vector normalVector; + Base::Vector3f center; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESGUI_VIEWPROVIDERMESHTRANSFORMDEMOLDING_H - +#endif // MESGUI_VIEWPROVIDERMESHTRANSFORMDEMOLDING_H diff --git a/src/Mod/Mesh/Gui/Workbench.cpp b/src/Mod/Mesh/Gui/Workbench.cpp index 2cdcf5860a..06fd6cf689 100644 --- a/src/Mod/Mesh/Gui/Workbench.cpp +++ b/src/Mod/Mesh/Gui/Workbench.cpp @@ -22,16 +22,16 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -# include +#include +#include #endif #include #include #include #include -#include #include +#include #include #include "Workbench.h" @@ -39,7 +39,7 @@ using namespace MeshGui; -#if 0 // needed for Qt's lupdate utility +#if 0 // needed for Qt's lupdate utility qApp->translate("Workbench", "Analyze"); qApp->translate("Workbench", "Boolean"); qApp->translate("Workbench", "&Meshes"); @@ -57,10 +57,11 @@ TYPESYSTEM_SOURCE(MeshGui::Workbench, Gui::StdWorkbench) Workbench::Workbench() = default; -class MeshInfoWatcher : public Gui::TaskView::TaskWatcher, public Gui::SelectionObserver +class MeshInfoWatcher: public Gui::TaskView::TaskWatcher, public Gui::SelectionObserver { public: - MeshInfoWatcher() : TaskWatcher(nullptr) + MeshInfoWatcher() + : TaskWatcher(nullptr) { labelPoints = new QLabel(); labelPoints->setText(tr("Number of points:")); @@ -82,7 +83,7 @@ public: QGroupBox* box = new QGroupBox(); box->setTitle(tr("Mesh info box")); - //box->setAutoFillBackground(true); + // box->setAutoFillBackground(true); QGridLayout* grid = new QGridLayout(box); grid->addWidget(labelPoints, 0, 0); grid->addWidget(numPoints, 0, 1); @@ -94,8 +95,8 @@ public: grid->addWidget(labelMax, 3, 0); grid->addWidget(numMax, 3, 1); - Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox( - QPixmap(), tr("Mesh info"), false, nullptr); + Gui::TaskView::TaskBox* taskbox = + new Gui::TaskView::TaskBox(QPixmap(), tr("Mesh info"), false, nullptr); taskbox->groupLayout()->addWidget(box); Content.push_back(taskbox); } @@ -106,7 +107,7 @@ public: void onSelectionChanged(const Gui::SelectionChanges&) override { Base::BoundBox3d bbox; - unsigned long countPoints=0, countFacets=0; + unsigned long countPoints = 0, countFacets = 0; std::vector mesh = Gui::Selection().getObjectsOfType(); for (auto it : mesh) { countPoints += it->Mesh.getValue().countPoints(); @@ -117,10 +118,8 @@ public: if (countPoints > 0) { numPoints->setText(QString::number(countPoints)); numFacets->setText(QString::number(countFacets)); - numMin->setText(tr("X: %1\tY: %2\tZ: %3") - .arg(bbox.MinX).arg(bbox.MinY).arg(bbox.MinZ)); - numMax->setText(tr("X: %1\tY: %2\tZ: %3") - .arg(bbox.MaxX).arg(bbox.MaxY).arg(bbox.MaxZ)); + numMin->setText(tr("X: %1\tY: %2\tZ: %3").arg(bbox.MinX).arg(bbox.MinY).arg(bbox.MinZ)); + numMax->setText(tr("X: %1\tY: %2\tZ: %3").arg(bbox.MaxX).arg(bbox.MaxY).arg(bbox.MaxZ)); } else { numPoints->setText(QString::fromLatin1("")); @@ -154,15 +153,16 @@ void Workbench::deactivated() { Gui::Workbench::deactivated(); removeTaskWatcher(); - } -void Workbench::setupContextMenu(const char* recipient,Gui::MenuItem* item) const +void Workbench::setupContextMenu(const char* recipient, Gui::MenuItem* item) const { - StdWorkbench::setupContextMenu( recipient, item ); - if (Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) - { - *item << "Separator" << "Mesh_Import" << "Mesh_Export" << "Mesh_VertexCurvature"; + StdWorkbench::setupContextMenu(recipient, item); + if (Gui::Selection().countObjectsOfType(Mesh::Feature::getClassTypeId()) > 0) { + *item << "Separator" + << "Mesh_Import" + << "Mesh_Export" + << "Mesh_VertexCurvature"; } } @@ -171,13 +171,17 @@ Gui::MenuItem* Workbench::setupMenuBar() const Gui::MenuItem* root = StdWorkbench::setupMenuBar(); Gui::MenuItem* item = root->findItem("&Windows"); Gui::MenuItem* mesh = new Gui::MenuItem; - root->insertItem( item, mesh ); + root->insertItem(item, mesh); // analyze Gui::MenuItem* analyze = new Gui::MenuItem; analyze->setCommand("Analyze"); - *analyze << "Mesh_Evaluation" << "Mesh_EvaluateFacet" << "Mesh_CurvatureInfo" << "Separator" - << "Mesh_EvaluateSolid" << "Mesh_BoundingBox"; + *analyze << "Mesh_Evaluation" + << "Mesh_EvaluateFacet" + << "Mesh_CurvatureInfo" + << "Separator" + << "Mesh_EvaluateSolid" + << "Mesh_BoundingBox"; // boolean Gui::MenuItem* boolean = new Gui::MenuItem; @@ -191,7 +195,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const cutting->setCommand("Cutting"); *cutting << "Mesh_PolyCut" << "Mesh_PolyTrim" - //<< "Mesh_PolySegm" + //<< "Mesh_PolySegm" << "Mesh_TrimByPlane" << "Mesh_SectionByPlane" << "Mesh_CrossSections"; @@ -201,9 +205,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Mesh_Export" << "Mesh_FromPartShape" << "Mesh_RemeshGmsh" - << "Separator" - << analyze - << "Mesh_VertexCurvature" + << "Separator" << analyze << "Mesh_VertexCurvature" << "Mesh_HarmonizeNormals" << "Mesh_FlipNormals" << "Separator" @@ -219,18 +221,17 @@ Gui::MenuItem* Workbench::setupMenuBar() const << "Mesh_Decimating" << "Mesh_Scale" << "Separator" - << "Mesh_BuildRegularSolid" - << boolean - << cutting - << "Separator" + << "Mesh_BuildRegularSolid" << boolean << cutting << "Separator" << "Mesh_Merge" << "Mesh_SplitComponents" << "Separator"; Gui::CommandManager& mgr = Gui::Application::Instance->commandManager(); - if (mgr.getCommandByName("MeshPart_CreateFlatMesh")) + if (mgr.getCommandByName("MeshPart_CreateFlatMesh")) { *mesh << "MeshPart_CreateFlatMesh"; - if (mgr.getCommandByName("MeshPart_CreateFlatFace")) + } + if (mgr.getCommandByName("MeshPart_CreateFlatFace")) { *mesh << "MeshPart_CreateFlatFace"; + } return root; } @@ -298,14 +299,17 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const Gui::ToolBarItem* root = new Gui::ToolBarItem; Gui::ToolBarItem* mesh; - mesh = new Gui::ToolBarItem( root ); + mesh = new Gui::ToolBarItem(root); mesh->setCommand("Mesh tools"); - *mesh << "Mesh_Import" << "Mesh_Export" << "Mesh_PolyCut"; + *mesh << "Mesh_Import" + << "Mesh_Export" + << "Mesh_PolyCut"; - mesh = new Gui::ToolBarItem( root ); + mesh = new Gui::ToolBarItem(root); mesh->setCommand("Mesh test suite"); - *mesh << "Mesh_Demolding" << "Mesh_Transform" << "Separator" ; + *mesh << "Mesh_Demolding" + << "Mesh_Transform" + << "Separator"; return root; } - diff --git a/src/Mod/Mesh/Gui/Workbench.h b/src/Mod/Mesh/Gui/Workbench.h index 737dd2db3f..f83e5f1490 100644 --- a/src/Mod/Mesh/Gui/Workbench.h +++ b/src/Mod/Mesh/Gui/Workbench.h @@ -25,33 +25,34 @@ #include #ifndef MESH_GLOBAL_H -# include +#include #endif -namespace MeshGui { +namespace MeshGui +{ /** * @author Werner Mayer */ -class MeshGuiExport Workbench : public Gui::StdWorkbench +class MeshGuiExport Workbench: public Gui::StdWorkbench { TYPESYSTEM_HEADER_WITH_OVERRIDE(); public: - Workbench(); + Workbench(); - void activated() override; - void deactivated() override; - void setupContextMenu(const char* recipient, Gui::MenuItem*) const override; + void activated() override; + void deactivated() override; + void setupContextMenu(const char* recipient, Gui::MenuItem*) const override; protected: - Gui::MenuItem* setupMenuBar() const override; - Gui::ToolBarItem* setupToolBars() const override; - Gui::ToolBarItem* setupCommandBars() const override; + Gui::MenuItem* setupMenuBar() const override; + Gui::ToolBarItem* setupToolBars() const override; + Gui::ToolBarItem* setupCommandBars() const override; }; -} // namespace MeshGui +} // namespace MeshGui -#endif // MESH_WORKBENCH_H +#endif // MESH_WORKBENCH_H diff --git a/src/Mod/Mesh/Gui/images.h b/src/Mod/Mesh/Gui/images.h index 3a6ddaad18..5ba0bd5c6b 100644 --- a/src/Mod/Mesh/Gui/images.h +++ b/src/Mod/Mesh/Gui/images.h @@ -1,3 +1,4 @@ +// clang-format off /* XPM */ static const char *mesh_fillhole[]={ "32 32 3 1", @@ -36,4 +37,4 @@ static const char *mesh_fillhole[]={ "................................", "................................", "................................"}; - +// clang-format on diff --git a/src/Mod/Mesh/Init.py b/src/Mod/Mesh/Init.py index c0cbf4c1b7..fd176afa20 100644 --- a/src/Mod/Mesh/Init.py +++ b/src/Mod/Mesh/Init.py @@ -21,4 +21,4 @@ FreeCAD.addExportType("Additive Manufacturing Format (*.amf)", "Mesh") FreeCAD.addExportType("Simple Model Format (*.smf)", "Mesh") FreeCAD.addExportType("3D Manufacturing Format (*.3mf)", "Mesh") -FreeCAD.__unit_test__ += [ "MeshTestsApp" ] +FreeCAD.__unit_test__ += ["MeshTestsApp"] diff --git a/src/Mod/Mesh/InitGui.py b/src/Mod/Mesh/InitGui.py index cd5273b683..25674fa251 100644 --- a/src/Mod/Mesh/InitGui.py +++ b/src/Mod/Mesh/InitGui.py @@ -5,46 +5,54 @@ # This is the second one of three init scripts, the third one # runs when the gui is up -#*************************************************************************** -#* Copyright (c) 2004 Werner Mayer * -#* * -#* This file is part of the FreeCAD CAx development system. * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU Lesser General Public License (LGPL) * -#* as published by the Free Software Foundation; either version 2 of * -#* the License, or (at your option) any later version. * -#* for detail see the LICENCE text file. * -#* * -#* FreeCAD is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU Lesser General Public License for more details. * -#* * -#* You should have received a copy of the GNU Library General Public * -#* License along with FreeCAD; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * -#* USA * -#* * -#***************************************************************************/ +# *************************************************************************** +# * Copyright (c) 2004 Werner Mayer * +# * * +# * This file is part of the FreeCAD CAx development system. * +# * * +# * This program is free software; you can redistribute it and/or modify * +# * it under the terms of the GNU Lesser General Public License (LGPL) * +# * as published by the Free Software Foundation; either version 2 of * +# * the License, or (at your option) any later version. * +# * for detail see the LICENCE text file. * +# * * +# * FreeCAD is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU Lesser General Public License for more details. * +# * * +# * You should have received a copy of the GNU Library General Public * +# * License along with FreeCAD; if not, write to the Free Software * +# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * +# * USA * +# * * +# ***************************************************************************/ -class MeshWorkbench (Workbench): + +class MeshWorkbench(Workbench): "Mesh workbench object" + def __init__(self): - self.__class__.Icon = FreeCAD.getResourceDir() + "Mod/Mesh/Resources/icons/MeshWorkbench.svg" + self.__class__.Icon = ( + FreeCAD.getResourceDir() + "Mod/Mesh/Resources/icons/MeshWorkbench.svg" + ) self.__class__.MenuText = "Mesh" self.__class__.ToolTip = "Mesh workbench" def Initialize(self): import Mesh import MeshGui + try: import flatmesh import MeshFlatteningCommand except ImportError as e: import FreeCAD + FreeCAD.Console.PrintLog((str(e))) + def GetClassName(self): return "MeshGui::Workbench" + Gui.addWorkbench(MeshWorkbench()) diff --git a/src/Mod/Mesh/MeshEnums.py b/src/Mod/Mesh/MeshEnums.py index 883500c646..e61b17a337 100644 --- a/src/Mod/Mesh/MeshEnums.py +++ b/src/Mod/Mesh/MeshEnums.py @@ -27,8 +27,8 @@ __doc__ = "Enum types" from enum import IntEnum + class Binding(IntEnum): OVERALL = 0 PER_VERTEX = 1 PER_FACE = 2 - diff --git a/src/Mod/Mesh/MeshGlobal.h b/src/Mod/Mesh/MeshGlobal.h index bf8d4d3589..2800bfe9b2 100644 --- a/src/Mod/Mesh/MeshGlobal.h +++ b/src/Mod/Mesh/MeshGlobal.h @@ -29,19 +29,19 @@ // Mesh #ifndef MeshExport #ifdef Mesh_EXPORTS -# define MeshExport FREECAD_DECL_EXPORT +#define MeshExport FREECAD_DECL_EXPORT #else -# define MeshExport FREECAD_DECL_IMPORT +#define MeshExport FREECAD_DECL_IMPORT #endif #endif // MeshGui #ifndef MeshGuiExport #ifdef MeshGui_EXPORTS -# define MeshGuiExport FREECAD_DECL_EXPORT +#define MeshGuiExport FREECAD_DECL_EXPORT #else -# define MeshGuiExport FREECAD_DECL_IMPORT +#define MeshGuiExport FREECAD_DECL_IMPORT #endif #endif -#endif //MESH_GLOBAL_H +#endif // MESH_GLOBAL_H diff --git a/src/Mod/Mesh/mesh.dox b/src/Mod/Mesh/mesh.dox index bee44c684e..0edd24a4bd 100644 --- a/src/Mod/Mesh/mesh.dox +++ b/src/Mod/Mesh/mesh.dox @@ -2,4 +2,3 @@ * \ingroup CWORKBENCHES * \brief Tools to work with polygon meshes */ - diff --git a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts index fdb7405e0c..38a2a32d9f 100644 --- a/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts +++ b/src/Mod/MeshPart/Gui/Resources/translations/MeshPart_cs.ts @@ -500,8 +500,8 @@ Hodnota v rozmezí 0.2-10. You have selected a body without tip. Either set the tip of the body or select a different shape, please. - Vybrali jste tělo bez špičky. -Buď nastavte špičku těla nebo vyberte jiný tvar, prosím. + Vybrali jste těleso bez špičky. +Buď nastavte špičku tělesa nebo vyberte jiný tvar, prosím. diff --git a/src/Mod/OpenSCAD/OpenSCADFeatures.py b/src/Mod/OpenSCAD/OpenSCADFeatures.py index 20806a4c5d..0ff3d11bf2 100644 --- a/src/Mod/OpenSCAD/OpenSCADFeatures.py +++ b/src/Mod/OpenSCAD/OpenSCADFeatures.py @@ -57,11 +57,11 @@ class ViewProviderTree: def onChanged(self, vp, prop): return - def __getstate__(self): + def dumps(self): # return {'ObjectName' : self.Object.Name} return None - def __setstate__(self,state): + def loads(self,state): if state is not None: import FreeCAD doc = FreeCAD.ActiveDocument #crap @@ -210,10 +210,10 @@ class Resize: mat.A33 = self.Vector[2] fp.Shape = self.Target.Shape.transformGeometry(mat) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui b/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui index 041252597c..96bd29a17f 100644 --- a/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui +++ b/src/Mod/OpenSCAD/Resources/ui/openscadprefs-base.ui @@ -236,6 +236,9 @@ 0 + + Gui::FileChooser::Directory + The path to the directory for transferring files to and from OpenSCAD diff --git a/src/Mod/Part/App/Geom2d/BezierCurve2dPy.xml b/src/Mod/Part/App/Geom2d/BezierCurve2dPy.xml index c0bd222a53..519153680c 100644 --- a/src/Mod/Part/App/Geom2d/BezierCurve2dPy.xml +++ b/src/Mod/Part/App/Geom2d/BezierCurve2dPy.xml @@ -141,6 +141,5 @@ ensures that: |t1-t0| < UTolerance =""==> |f(t1)-f(t0)| < Tolerance3D - --> diff --git a/src/Mod/Part/App/Geometry.cpp b/src/Mod/Part/App/Geometry.cpp index a461fe6eca..fa2ed4043e 100644 --- a/src/Mod/Part/App/Geometry.cpp +++ b/src/Mod/Part/App/Geometry.cpp @@ -2428,11 +2428,24 @@ void GeomArcOfCircle::setRadius(double Radius) } } +/*! + * \brief GeomArcOfCircle::getAngle + * \param emulateCCWXY: if true, the arc will pretend to be a CCW arc in XY plane. + * For this to work, the arc must lie in XY plane (i.e. Axis is either +Z or -Z). + */ +double GeomArcOfCircle::getAngle(bool emulateCCWXY) const +{ + double startangle, endangle; + getRange(startangle, endangle, emulateCCWXY); + double angle = endangle - startangle; + return angle; +} + /*! * \brief GeomArcOfCircle::getRange * \param u [out] start angle of the arc, in radians. * \param v [out] end angle of the arc, in radians. - * \param emulateCCWXY: if true, the arc will pretent to be a CCW arc in XY plane. + * \param emulateCCWXY: if true, the arc will pretend to be a CCW arc in XY plane. * For this to work, the arc must lie in XY plane (i.e. Axis is either +Z or -Z). * Additionally, arc's rotation as a whole will be included in the returned u,v * (ArcOfCircle specific). diff --git a/src/Mod/Part/App/Geometry.h b/src/Mod/Part/App/Geometry.h index 6ca3eb8e33..aa92f85c2e 100644 --- a/src/Mod/Part/App/Geometry.h +++ b/src/Mod/Part/App/Geometry.h @@ -502,6 +502,8 @@ public: double getRadius() const; void setRadius(double Radius); + double getAngle(bool emulateCCWXY) const; + void getRange(double& u, double& v, bool emulateCCWXY) const override; void setRange(double u, double v, bool emulateCCWXY) override; diff --git a/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp b/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp index b0cf0f2729..1638ae798f 100644 --- a/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp +++ b/src/Mod/Part/App/HLRBRep/HLRBRep_AlgoPyImp.cpp @@ -114,7 +114,7 @@ PyObject* HLRBRep_AlgoPy::setProjector(PyObject *args, PyObject *kwds) PyObject* xd = nullptr; double focus = std::numeric_limits::quiet_NaN(); - static const std::array kwlist {"Origin", "ZDir", "XDir", nullptr}; + static const std::array kwlist {"Origin", "ZDir", "XDir", "focus", nullptr}; if (Base::Wrapped_ParseTupleAndKeywords(args, kwds, "|O!O!O!d", kwlist, &Base::VectorPy::Type, &ps, &Base::VectorPy::Type, &zd, diff --git a/src/Mod/Part/App/TopoShapeCompoundPy.xml b/src/Mod/Part/App/TopoShapeCompoundPy.xml index 35c6dc8345..19b61cbcd8 100644 --- a/src/Mod/Part/App/TopoShapeCompoundPy.xml +++ b/src/Mod/Part/App/TopoShapeCompoundPy.xml @@ -30,5 +30,10 @@ If Shared is True connection is performed only when adjacent edges share the sa If Shared is False connection is performed only when ends of adjacent edges are at distance less than Tolerance. + + + A shape is created from points and triangles and set to this object + + diff --git a/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp b/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp index 37f9c170e8..267f7b50c8 100644 --- a/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp +++ b/src/Mod/Part/App/TopoShapeCompoundPyImp.cpp @@ -35,6 +35,7 @@ #endif #include "OCCError.h" +#include // inclusion of the generated files (generated out of TopoShapeCompoundPy.xml) #include "TopoShapeCompoundPy.h" @@ -156,6 +157,66 @@ PyObject* TopoShapeCompoundPy::connectEdgesToWires(PyObject *args) } } +PyObject* TopoShapeCompoundPy::setFaces(PyObject *args) +{ + using Facet = Data::ComplexGeoData::Facet; + using Point = Base::Vector3d; + + std::vector points; + std::vector facets; + + PyObject* data{}; + double accuracy = 1.0e-06; // NOLINT + if (!PyArg_ParseTuple(args, "O!|d", &PyTuple_Type, &data, &accuracy)) { + return nullptr; + } + + Py::Tuple tuple(data); + + Py::Sequence pts(tuple.getItem(0)); + points.reserve(pts.size()); + for (const auto& pt : pts) { + Py::Vector vec(pt); + points.push_back(vec.toVector()); + } + + std::size_t count = points.size(); + auto checkFace = [count](const Facet& face) { + if (face.I1 >= count) { + return false; + } + if (face.I2 >= count) { + return false; + } + if (face.I3 >= count) { + return false; + } + + return true; + }; + + Py::Sequence fts(tuple.getItem(1)); + facets.reserve(fts.size()); + Facet face; + for (const auto& ft : fts) { + Py::Tuple index(ft); + face.I1 = int32_t(static_cast(Py::Long(index.getItem(0)))); + face.I2 = int32_t(static_cast(Py::Long(index.getItem(1)))); + face.I3 = int32_t(static_cast(Py::Long(index.getItem(2)))); + + if (!checkFace(face)) { + PyErr_SetString(PyExc_ValueError, "Point index out of range"); + return nullptr; + } + + facets.push_back(face); + } + + getTopoShapePtr()->setFaces(points, facets, accuracy); + + Py_Return; +} + PyObject *TopoShapeCompoundPy::getCustomAttributes(const char* /*attr*/) const { return nullptr; diff --git a/src/Mod/Part/App/TopoShapePy.xml b/src/Mod/Part/App/TopoShapePy.xml index 8102ed8530..07d9b67d38 100644 --- a/src/Mod/Part/App/TopoShapePy.xml +++ b/src/Mod/Part/App/TopoShapePy.xml @@ -18,12 +18,12 @@ Sub-elements such as vertices, edges or faces are accessible as: * Edge#, where # is in range(1, number of edges) * Face#, where # is in range(1, number of faces) - + Serialize the content of this shape to a string in BREP format. - + Deserialize the content of this shape from a string in BREP format. diff --git a/src/Mod/Part/App/TopoShapePyImp.cpp b/src/Mod/Part/App/TopoShapePyImp.cpp index 8de24e3264..1be94ad5e2 100644 --- a/src/Mod/Part/App/TopoShapePyImp.cpp +++ b/src/Mod/Part/App/TopoShapePyImp.cpp @@ -559,12 +559,12 @@ PyObject* TopoShapePy::importBrepFromString(PyObject *args) Py_Return; } -PyObject* TopoShapePy::__getstate__(PyObject *args) { +PyObject* TopoShapePy::dumps(PyObject *args) { return exportBrepToString(args); } -PyObject* TopoShapePy::__setstate__(PyObject *args) { +PyObject* TopoShapePy::loads(PyObject *args) { if (! getTopoShapePtr()) { PyErr_SetString(Base::PyExc_FC_GeneralError,"no c++ object"); return nullptr; diff --git a/src/Mod/Part/BOPTools/JoinFeatures.py b/src/Mod/Part/BOPTools/JoinFeatures.py index 9867f2551f..3d27f129e6 100644 --- a/src/Mod/Part/BOPTools/JoinFeatures.py +++ b/src/Mod/Part/BOPTools/JoinFeatures.py @@ -145,10 +145,10 @@ class ViewProviderConnect: self.ViewObject = vobj self.Object = vobj.Object - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def claimChildren(self): @@ -256,10 +256,10 @@ class ViewProviderEmbed: self.ViewObject = vobj self.Object = vobj.Object - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def claimChildren(self): @@ -350,10 +350,10 @@ class ViewProviderCutout: self.ViewObject = vobj self.Object = vobj.Object - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def claimChildren(self): diff --git a/src/Mod/Part/BOPTools/ShapeMerge.py b/src/Mod/Part/BOPTools/ShapeMerge.py index f5bac45b6b..9bd24e6948 100644 --- a/src/Mod/Part/BOPTools/ShapeMerge.py +++ b/src/Mod/Part/BOPTools/ShapeMerge.py @@ -77,6 +77,7 @@ def splitIntoGroupsBySharing(list_of_shapes, element_extractor, split_connection shape_elements.difference_update(split_connections) #search if shape is connected to any groups connected_to = [] + not_in_connected_to = [] for iGroup in range(len(groups)): connected = False for element in shape_elements: @@ -84,6 +85,10 @@ def splitIntoGroupsBySharing(list_of_shapes, element_extractor, split_connection connected_to.append(iGroup) connected = True break + else: + # `break` not invoked, so `connected` is false + not_in_connected_to.append(iGroup) + # test if we need to join groups if len(connected_to)>1: #shape bridges a gap between some groups. Join them into one. @@ -96,9 +101,10 @@ def splitIntoGroupsBySharing(list_of_shapes, element_extractor, split_connection supergroup[1].update( groups[iGroup][1] )# merge lists of elements groups_new.append(supergroup) - for iGroup in range(len(groups)): - if not iGroup in connected_to: #fixme: inefficient! - groups_new.append(groups[iGroup]) + l_groups = len(groups) + groups_new.extend([groups[i_group] \ + for i_group in not_in_connected_to \ + if i_group < l_groups]) groups = groups_new connected_to = [0] diff --git a/src/Mod/Part/BOPTools/SplitFeatures.py b/src/Mod/Part/BOPTools/SplitFeatures.py index c1e80b352a..a8020ffd7f 100644 --- a/src/Mod/Part/BOPTools/SplitFeatures.py +++ b/src/Mod/Part/BOPTools/SplitFeatures.py @@ -100,10 +100,10 @@ class ViewProviderBooleanFragments: self.ViewObject = vobj self.Object = vobj.Object - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def claimChildren(self): @@ -258,10 +258,10 @@ class ViewProviderSlice: self.ViewObject = vobj self.Object = vobj.Object - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def claimChildren(self): @@ -438,10 +438,10 @@ class ViewProviderXOR: self.ViewObject = vobj self.Object = vobj.Object - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None def claimChildren(self): diff --git a/src/Mod/Part/BasicShapes/ViewProviderShapes.py b/src/Mod/Part/BasicShapes/ViewProviderShapes.py index c567eb0e35..196b1720bb 100644 --- a/src/Mod/Part/BasicShapes/ViewProviderShapes.py +++ b/src/Mod/Part/BasicShapes/ViewProviderShapes.py @@ -68,10 +68,10 @@ class ViewProviderTube: def getIcon(self): return ":/icons/parametric/Part_Tube_Parametric.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Part/CompoundTools/CompoundFilter.py b/src/Mod/Part/CompoundTools/CompoundFilter.py index 91be3728bd..272d689495 100644 --- a/src/Mod/Part/CompoundTools/CompoundFilter.py +++ b/src/Mod/Part/CompoundTools/CompoundFilter.py @@ -224,10 +224,10 @@ class _ViewProviderCompoundFilter: self.ViewObject = vobj self.Object = vobj.Object - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def claimChildren(self): diff --git a/src/Mod/Part/Gui/Resources/translations/Part.ts b/src/Mod/Part/Gui/Resources/translations/Part.ts index 7c5e37e36a..79d686c233 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part.ts @@ -6741,18 +6741,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. - + No scalable shapes selected - + The document '%1' doesn't exist. - - + + Creating Scale failed. %1 diff --git a/src/Mod/Part/Gui/Resources/translations/Part_be.ts b/src/Mod/Part/Gui/Resources/translations/Part_be.ts index b9943c8cf2..37a956fb89 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_be.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_be.ts @@ -226,7 +226,7 @@ Vertex AttachmentPoint mode caption - Vertex + Вяршыня @@ -3068,7 +3068,7 @@ If both lengths are zero, magnitude of direction is used. Length: - Length: + Даўжыня: @@ -3642,7 +3642,7 @@ during file reading (slower but higher details). Length: - Даўжыня: + Length: @@ -5641,7 +5641,7 @@ in the 3D view for the sweep path. Input error - Памылка ўводу + Input error @@ -5800,7 +5800,7 @@ Do you want to continue? Vertex - Вяршыня + Vertex @@ -6757,7 +6757,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. X Factor - X Factor + Каэфіцыент X @@ -6767,37 +6767,37 @@ A 'Compound Filter' can be used to extract the remaining pieces. Z Factor - Z Factor + Каэфіцыент Z Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Маштабаваць аб'ект адным каэфіцыентам па ўсіх напрамках. Uniform Scaling - Uniform Scaling + Раўнамернае маштабаванне Y Factor - Y Factor + Каэфіцыент Y Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Паказаць розны маштабны каэфіцыент для кожнага напрамку бакоў. Non-Uniform Scaling - Non-Uniform Scaling + Нераўнамернае маштабаванне Select shape(s) that should be scaled - Select shape(s) that should be scaled + Абраць фігуры, якія неабходна маштабаваць @@ -6805,21 +6805,21 @@ A 'Compound Filter' can be used to extract the remaining pieces. Фігура - + No scalable shapes selected - No scalable shapes selected + Не абраныя фігуры, якія могуць быць маштабаваныя - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 - Creating Scale failed. + Не атрымалася стварыць маштабаванне %1 @@ -6838,7 +6838,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. Scale a selected shape - Scale a selected shape + Маштабаванне абранай фігуры diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ca.ts b/src/Mod/Part/Gui/Resources/translations/Part_ca.ts index 8b2e75d29e..6d7c15e937 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ca.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ca.ts @@ -6796,18 +6796,18 @@ Es pot utilitzar un "Filtre compost" per extreure les peces restants.Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_cs.ts b/src/Mod/Part/Gui/Resources/translations/Part_cs.ts index 2d3df98bcd..2fefb60e90 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_cs.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_cs.ts @@ -1286,7 +1286,7 @@ jestli se měřené body posunuly. Toggle 3D - Přepnout 3D + Přepnout přímé @@ -1326,7 +1326,7 @@ přímé, ortogonální a úhlové. Toggle Delta - Přepnout rozdíl + Přepnout ortogonální @@ -1334,8 +1334,8 @@ přímé, ortogonální a úhlové. meaning that a direct dimension will be decomposed into its X, Y, and Z components. Zapnout a vypnout všechny ortogonální rozměry, -což znamená, že bude rozložena přímá dimenze -na jeho složky X, Y a Z. +což znamená, že přímý rozměr bude rozložen +na složky X, Y a Z. @@ -1476,12 +1476,12 @@ na jeho složky X, Y a Z. Compound tools - Compound tools + Nástroje skládání Compound tools: working with lists of shapes. - Nástroje složeniny: práce se seznamem tvarů. + Nástroje skládání: pracují se seznamem tvarů. @@ -1512,7 +1512,7 @@ na jeho složky X, Y a Z. Offset: - Offset: + Odsazení: @@ -1535,7 +1535,7 @@ na jeho složky X, Y a Z. Shape splitting and Compsolid creation tools. - Shape splitting and Compsolid creation tools. + Nástroje pro rozdělení tvarů a tvorbu kompaktních částí. @@ -1660,12 +1660,12 @@ na jeho složky X, Y a Z. Create shape element copy - Create shape element copy + Vytvořit kopii prvku tvaru Create a non-parametric copy of the selected shape element - Create a non-parametric copy of the selected shape element + Vytvoří neparametrickou kopii vybraného prvku tvaru @@ -1912,12 +1912,12 @@ na jeho složky X, Y a Z. Create points object from geometry - Create points object from geometry + Vytvořit objekt bodů z geometrie Create selectable points object from selected geometric object - Create selectable points object from selected geometric object + Vytvoří vybraný objekt bodů z vybraného geometrického objektu @@ -1948,7 +1948,7 @@ na jeho složky X, Y a Z. Create projection on surface... - Create projection on surface... + Vytvořit projekci na povrchu... @@ -1956,10 +1956,9 @@ na jeho složky X, Y a Z. onto a face of another object. The camera view determines the direction of projection. - Project edges, wires, or faces of one object -onto a face of another object. -The camera view determines the direction -of projection. + Promítne hrany, dráty nebo plochy jednoho +objektu na plochu jiného objektu. +Pohled kamery určuje směr projekce. @@ -2057,12 +2056,12 @@ of projection. Persistent section cut - Persistent section cut + Trvalý řez sekce Creates a persistent section cut of visible part objects - Creates a persistent section cut of visible part objects + Vytvoří trvalý řez sekce viditelných objektů dílu @@ -2215,12 +2214,12 @@ of projection. Create transformed copy - Create transformed copy + Vytvořit transformovanou kopii Create a non-parametric copy with transformed placement - Create a non-parametric copy with transformed placement + Vytvoří neparametrickou kopii s transformovaným umístěním @@ -2229,12 +2228,12 @@ of projection. Part Box Create - Part Box Create + Vytvořit díl kvádru Part Cut - Part Cut + Řez dílu @@ -2244,7 +2243,7 @@ of projection. Fusion - Fusion + Sjednocení @@ -2264,7 +2263,7 @@ of projection. Part Import Curve Net - Part Import Curve Net + Importovat díl sítě křivek @@ -2274,22 +2273,22 @@ of projection. Make face - Make face + Vytvořit plochu Make Offset - Make Offset + Vytvořit odsazení Make 2D Offset - Make 2D Offset + Vytvořit 2D odsazení Make Thickness - Make Thickness + Vytvořit tloušťku @@ -2299,12 +2298,12 @@ of projection. Create Part Cylinder - Create Part Cylinder + Vytvořit díl válce Points from geometry - Points from geometry + Body z geometrie @@ -2319,7 +2318,7 @@ of projection. Convert mesh - Convert mesh + Převést síť @@ -2329,7 +2328,7 @@ of projection. Change face colors - Change face colors + Změnit barvy plochy @@ -2370,7 +2369,7 @@ of projection. Edit Mirror - Edit Mirror + Upravit zrcadlení @@ -2403,7 +2402,7 @@ of projection. Attachment mode: - Mód připojení: + Režim připojení: @@ -2413,60 +2412,60 @@ of projection. In x-direction: - In x-direction: + Ve směru x: Note: The placement is expressed in local space of object being attached. - Note: The placement is expressed in local space of object being attached. + Poznámka: Umístění je určeno v lokálním prostoru připojeného objektu. In y-direction: - In y-direction: + Ve směru y: In z-direction: - In z-direction: + Ve směru z: Around x-axis: - Around x-axis: + Kolem osy x: Rotation around the x-axis Note: The placement is expressed in local space of object being attached. - Rotation around the x-axis -Note: The placement is expressed in local space of object being attached. + Otáčení kolem osy x +Poznámka: Umístění je určeno v lokálním prostoru připojeného objektu. Around y-axis: - Around y-axis: + Kolem osy y: Rotation around the y-axis Note: The placement is expressed in local space of object being attached. - Rotation around the y-axis -Note: The placement is expressed in local space of object being attached. + Otáčení kolem osy y +Poznámka: Umístění je určeno v lokálním prostoru připojeného objektu. Around z-axis: - Around z-axis: + Kolem osy z: Rotation around the z-axis Note: The placement is expressed in local space of object being attached. - Rotation around the z-axis -Note: The placement is expressed in local space of object being attached. + Otáčení kolem osy z +Poznámka: Umístění je určeno v lokálním prostoru připojeného objektu. @@ -2657,7 +2656,7 @@ Note: The placement is expressed in local space of object being attached. If not empty, field contents will be used in the STEP file header. - If not empty, field contents will be used in the STEP file header. + Pokud není prázdné, obsah pole bude použit v hlavičce souboru STEP. @@ -2720,12 +2719,12 @@ Note: The placement is expressed in local space of object being attached. Uncheck this to skip invisible object when exporting, which is useful for CADs that do not support invisibility STEP styling. - Uncheck this to skip invisible object when exporting, which is useful for CADs that do not support invisibility STEP styling. + Odškrtněte pro přeskočení neviditelných objektů při exportu, což je užitečné pro CAD, které nepodporují STEP styl neviditelnosti. Export invisible objects - Export invisible objects + Exportovat neviditelné objekty @@ -2733,20 +2732,20 @@ Note: The placement is expressed in local space of object being attached. - Check this option to keep the placement information when exporting -a single object. Please note that when import back the STEP file, the -placement will be encoded into the shape geometry, instead of keeping -it inside the Placement property. + Zaškrtněte tuto možnost, chcete-li zachovat informace o umístění +při exportu jediného objektu. Vezměte prosím na vědomí, že při +importu souboru STEP nazpět bude umístění zakódováno do +geometrie tvaru, místo aby zůstalo uvnitř vlastnosti umístění. Export single object placement - Export single object placement + Exportovat umístění jediného objektu Use legacy export function - Use legacy export function + Použít funkci starého exportu @@ -2758,9 +2757,9 @@ it inside the Placement property. This parameter indicates whether parametric curves (curves in parametric space of surface) should be written into the STEP file. This parameter can be set to off in order to minimize the size of the resulting STEP file. - This parameter indicates whether parametric curves (curves in parametric space of surface) -should be written into the STEP file. This parameter can be set to off in order to minimize -the size of the resulting STEP file. + Tento parametr udává, zda mají být parametrické křivky (křivky v parametrickém +prostoru povrchu) zapsány do souboru STEP. Tento parametr lze vypnout +za účelem minimalizace velikosti výsledného souboru STEP. @@ -2855,8 +2854,8 @@ the size of the resulting STEP file. Length to extrude along direction (can be negative). If both lengths are zero, magnitude of direction is used. - Length to extrude along direction (can be negative). -If both lengths are zero, magnitude of direction is used. + Délka vysunutí podél směru (může být negativní). +Jsou-li obě délky nula, pak je použita velikost směru. @@ -2866,7 +2865,7 @@ If both lengths are zero, magnitude of direction is used. Length to extrude against the direction (can be negative). - Length to extrude against the direction (can be negative). + Délka vysunutí proti směru (může být negativní). @@ -2881,22 +2880,22 @@ If both lengths are zero, magnitude of direction is used. Taper angle along - Taper angle along + Kuželový úhel podél Taper (draft) angle along extrusion direction - Taper (draft) angle along extrusion direction + Kuželový úhel (zkosení) podél směru vysunutí Taper angle against - Taper angle against + Kuželový úhel proti Taper (draft) angle against extrusion direction - Taper (draft) angle against extrusion direction + Kuželový úhel (zkosení) proti směru vysunutí @@ -2911,7 +2910,7 @@ If both lengths are zero, magnitude of direction is used. Select shape(s) that should be extruded - Select shape(s) that should be extruded + Vyberte tvar(y), který by měl být vysunut @@ -2933,7 +2932,7 @@ If both lengths are zero, magnitude of direction is used. Creating Extrusion failed. %1 - Creating Extrusion failed. + Vysunování selhalo. %1 @@ -2949,7 +2948,7 @@ If both lengths are zero, magnitude of direction is used. Unknown error - Unknown error + Neznámá chyba @@ -2977,7 +2976,7 @@ If both lengths are zero, magnitude of direction is used. Extrusion direction vector is zero-length. It must be non-zero. - Extrusion direction vector is zero-length. It must be non-zero. + Vektor směru vysunutí má nulovou délku. Musí být nenulový. @@ -3061,12 +3060,12 @@ If both lengths are zero, magnitude of direction is used. Chamfer Parameter - Chamfer Parameter + Parametry sražení Chamfer type - Chamfer type + Typ sražení @@ -3101,12 +3100,12 @@ If both lengths are zero, magnitude of direction is used. Size2 - Size2 + Velikost2 Fillet type - Fillet type + Typ zaoblení @@ -3203,7 +3202,7 @@ Please check one or more edge entities first. Solids and shells will be exported as trimmed surface - Solids and shells will be exported as trimmed surface + Tělesa a skořepiny budou exportovány jako ořezaný povrch @@ -3213,7 +3212,7 @@ Please check one or more edge entities first. Solids will be exported as manifold solid B-Rep object, shells as shell - Solids will be exported as manifold solid B-Rep object, shells as shell + Tělesa budou exportovány jako vícevrstvý pevný B-rep objekt, skořepiny jako skořepiny @@ -3228,7 +3227,7 @@ Please check one or more edge entities first. Blank entities will not be imported - Blank entities will not be imported + Prázdné entity nebudou importovány @@ -3238,7 +3237,7 @@ Please check one or more edge entities first. If not empty, field contents will be used in the IGES file header - If not empty, field contents will be used in the IGES file header + Pokud není prázdné, obsah pole bude použit v hlavičce souboru IGES @@ -3285,8 +3284,8 @@ Please check one or more edge entities first. If checked, no Compound merge will be done during file reading (slower but higher details). - If checked, no Compound merge will be done -during file reading (slower but higher details). + Je-li zaškrtnuto, při čtení souboru nebou vytvářeny +složeniny (pomalejší ale s podrobnějšími detaily). @@ -3296,58 +3295,58 @@ during file reading (slower but higher details). Select this to use App::LinkGroup as group container, or else use App::Part. - Select this to use App::LinkGroup as group container, or else use App::Part. + Vyberte pro použití skupiny odkazů jako skupinového kontejneru, jinak se použijí funkce dílu. Use LinkGroup - Use LinkGroup + Použít skupinu odkazů Select this to import invisible objects. - Select this to import invisible objects. + Vyberte pro import neviditelných objektů. Import invisible objects - Import invisible objects + Importovat neviditelné objekty Reduce number of objects using Link array - Reduce number of objects using Link array + Sníží počet objektů pomocí pole odkazu Reduce number of objects - Reduce number of objects + Snížit počet objektů Expand compound shape with multiple solids - Expand compound shape with multiple solids + Rozbalit složený tvar s více tělesy Expand compound shape - Expand compound shape + Rozbalit složený tvar Show progress bar when importing - Show progress bar when importing + Zobrazit ukazatel průběhu při importu Do not use instance name. Useful for some legacy STEP file with non-meaningful auto generated instance names. - Do not use instance name. Useful for some legacy STEP file with non-meaningful auto generated instance names. + Nepoužívat název instance. Užitečné pro nějaký starší soubor STEP s nesmysluplnými názvy automaticky generovaných instancí. Ignore instance names - Ignore instance names + Ignorovat názvy instance @@ -3362,22 +3361,22 @@ during file reading (slower but higher details). Assembly per document - Assembly per document + Sestava na dokument Assembly per document in sub-directory - Assembly per document in sub-directory + Sestava na dokument v podadresáři Object per document - Object per document + Objekt na dokument Object per document in sub-directory - Object per document in sub-directory + Objekt na dokument v podadresáři @@ -3638,7 +3637,7 @@ during file reading (slower but higher details). Parameter - Parametr + Parametry @@ -3897,12 +3896,12 @@ during file reading (slower but higher details). Projection on surface - Projection on surface + Projekce na povrchu Select projection surface - Select projection surface + Vybrat povrch projekce @@ -3912,7 +3911,7 @@ during file reading (slower but higher details). Add wire - Add wire + Přidat drát @@ -3942,7 +3941,7 @@ during file reading (slower but higher details). Solid depth - Solid depth + Hloubka tělesa @@ -3972,17 +3971,17 @@ during file reading (slower but higher details). Projection Object - Projection Object + Objekt projekce Have no active document!!! - Have no active document!!! + Nemá žádný aktivní dokument!!! Can not create a projection object!!! - Can not create a projection object!!! + Nelze vytvořit objekt projekce!!! @@ -4093,7 +4092,7 @@ during file reading (slower but higher details). Unknown error - Unknown error + Neznámá chyba @@ -4141,7 +4140,7 @@ during file reading (slower but higher details). <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Tessellation</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Defines the maximum deviation of the tessellated mesh to the surface. The smaller the value is the slower the render speed which results in increased detail/resolution.</span></p></body></html> - <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Tessellation</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Defines the maximum deviation of the tessellated mesh to the surface. The smaller the value is the slower the render speed which results in increased detail/resolution.</span></p></body></html> + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-size:7.8pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Teselace</span></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"><span style=" font-weight:400;">Definuje maximální odchylku teselované sítě od povrchu. Čím menší je hodnota, tím pomalejší je vykreslování, zároveň se zvětšuje detailnost/rozlišení.</span></p></body></html> @@ -4212,22 +4211,22 @@ during file reading (slower but higher details). Measurement settings - Measurement settings + Nastavení měření 3D color - 3D color + Barva přímá Delta color - Delta color + Barva ortogonální Angular color - Angular color + Barva úhlu @@ -4247,7 +4246,7 @@ during file reading (slower but higher details). defaultFont - defaultFont + Výchozí písmo @@ -4257,7 +4256,7 @@ during file reading (slower but higher details). Refresh existing measurements - Refresh existing measurements + Aktualizovat existující měření @@ -4270,7 +4269,7 @@ during file reading (slower but higher details). Default Shape view properties - Default Shape view properties + Výchozí vlastnosti vzhledu tvaru @@ -4280,27 +4279,27 @@ during file reading (slower but higher details). The default color for new shapes - Přednastavená barva pro nové tvary + Výchozí barva pro nové tvary Use random color instead - Use random color instead + Namísto toho použít náhodnou barvu Random - Random + Náhodně Shape transparency - Shape transparency + Průhlednost tvaru The default transparency for new shapes - The default transparency for new shapes + Výchozí průhlednost pro nové tvary @@ -4310,7 +4309,7 @@ during file reading (slower but higher details). The default line color for new shapes - Přednastavená barva čáry pro nové tvary + Výchozí barva čáry pro nové tvary @@ -4320,7 +4319,7 @@ during file reading (slower but higher details). The default line thickness for new shapes - Přednastavená tloušťka čáry pro nové tvary + Výchozí tloušťka čáry pro nové tvary @@ -4331,22 +4330,22 @@ during file reading (slower but higher details). Vertex color - Vertex color + Barva vrcholu The default color for new vertices - The default color for new vertices + Výchozí barva pro nové vrcholy Vertex size - Vertex size + Velikost vrcholu The default size for new vertices - The default size for new vertices + Výchozí velikost pro nové vrcholy @@ -4361,12 +4360,12 @@ during file reading (slower but higher details). Bounding box font size - Bounding box font size + Velikost písma ohraničujícího kvádru The font size of bounding boxes in the 3D view - The font size of bounding boxes in the 3D view + Velikost písma ohraničujících kvádrů ve 3D pohledu @@ -4374,10 +4373,10 @@ during file reading (slower but higher details). If not checked, it depends on the option "Backlight color" (preferences section Display -> 3D View); either the backlight color will be used or black. - Bottom side of surface will be rendered the same way than top. -If not checked, it depends on the option "Backlight color" -(preferences section Display -> 3D View); either the backlight color -will be used or black. + Spodní strana povrchu bude vykreslena stejným způsobem jako horní strana. +Pokud není zaškrtnuto, záleží na možnosti "Barva podsvícení" +(sekce nastavení Zobrazení -> 3D pohled). Buď bude použita barva podsvícení, +nebo černá. @@ -4387,7 +4386,7 @@ will be used or black. Default Annotation color - Default Annotation color + Výchozí barva poznámky @@ -4397,7 +4396,7 @@ will be used or black. Text color for document annotations - Text color for document annotations + Barva textu pro poznámky dokumentu @@ -4436,13 +4435,13 @@ will be used or black. Use custom vector for pad direction otherwise the sketch plane's normal vector will be used - Use custom vector for pad direction otherwise -the sketch plane's normal vector will be used + Použít vlastní vektor pro směr desky, jinak +bude použit normálový vektor roviny náčrtu Rotation axis - Rotation axis + Osa otáčení @@ -4538,17 +4537,17 @@ the sketch plane's normal vector will be used XY plane - rovina XY + Rovina XY XZ plane - rovina XZ + Rovina XZ YZ plane - rovina YZ + Rovina YZ @@ -4612,12 +4611,12 @@ the sketch plane's normal vector will be used Permanent Section Cutting - Permanent Section Cutting + Trvalé řezání sekcí Cutting X - Cutting X + Řez X @@ -4636,23 +4635,23 @@ the sketch plane's normal vector will be used Cutting Y - Cutting Y + Řez Y Cutting Z - Cutting Z + Řez Z Cut face - Cut face + Plocha řezu Color of cut face - Color of cut face + Barva plochy řezu @@ -4667,10 +4666,10 @@ the sketch plane's normal vector will be used will be taken from the cut objects. Works only properly if all objects have the same values. - If checked, the color and transparency -will be taken from the cut objects. -Works only properly if all objects -have the same values. + Je-li zaškrtnuto, barva a průhlednost +bude odebrána z řezaných objektů. +Funguje správně pouze tehdy, pokud +všechny objekty mají stejné hodnoty. @@ -4682,7 +4681,7 @@ have the same values. Transparency of cut face - Transparency of cut face + Průhlednost plochy řezu @@ -4695,46 +4694,46 @@ have the same values. Allows to cut objects intersecting each other for the price that all cut objects will get the same color - Allows to cut objects intersecting each other -for the price that all cut objects -will get the same color + Umožňuje řezat navzájem se protínající +objekty za cenu, že všechny řezané objekty +budou mít stejnou barvu Cut intersecting objects - Cut intersecting objects + Řezat protínající se objekty Color for all objects - Color for all objects + Barva pro všechny objekty Refreshes the list of visible objects - Refreshes the list of visible objects + Obnoví seznam viditelných objektů Refresh view - Refresh view + Obnovit pohled When the dialog is closed, only created cuts will be visible - When the dialog is closed, -only created cuts will be visible + Po zavření dialogového okna, +budou viditelné pouze vytvořené řezy Keep only cuts visible when closing - Keep only cuts visible when closing + Při zavření ponechat viditelné pouze řezy Sliders are disabled for assemblies - Sliders are disabled for assemblies + Posuvníky jsou vypnuty pro sestavy @@ -4742,12 +4741,12 @@ only created cuts will be visible Unsupported - Unsupported + Nepodporováno Box selection for shells is not supported - Box selection for shells is not supported + Okno výběru není podporováno pro skořepiny @@ -4823,12 +4822,12 @@ only created cuts will be visible Shape from mesh - Shape from mesh + Tvar ze sítě Sew shape - Sew shape + Sešít tvar @@ -4866,7 +4865,7 @@ only created cuts will be visible Select one or more edges from a single object. - Select one or more edges from a single object. + Vyberte jeden nebo více hran z jednoho objektu. @@ -4946,7 +4945,7 @@ only created cuts will be visible Attachment mode: - Mód připojení: + Režim připojení: @@ -4957,7 +4956,7 @@ only created cuts will be visible In x-direction: - In x-direction: + Ve směru x: @@ -4965,65 +4964,61 @@ only created cuts will be visible Note: The placement is expressed in local coordinate system of object being attached. - Note: The placement is expressed in local coordinate system -of object being attached. + Poznámka: Umístění je určeno v lokálním souřadnicovém systému připojeného objektu. In y-direction: - In y-direction: + Ve směru y: In z-direction: - In z-direction: + Ve směru z: Around x-axis: - Around x-axis: + Kolem osy x: Rotation around the x-axis Note: The placement is expressed in local coordinate system of object being attached. - Rotation around the x-axis -Note: The placement is expressed in local coordinate system -of object being attached. + Otáčení kolem osy x +Poznámka: Umístění je určeno v lokálním souřadnicovém systému připojeného objektu. Around y-axis: - Around y-axis: + Kolem osy y: Rotation around the y-axis Note: The placement is expressed in local coordinate system of object being attached. - Rotation around the y-axis -Note: The placement is expressed in local coordinate system -of object being attached. + Otáčení kolem osy y +Poznámka: Umístění je určeno v lokálním souřadnicovém systému připojeného objektu. Around z-axis: - Around z-axis: + Kolem osy z: Rotation around the z-axis Note: The placement is expressed in local coordinate system of object being attached. - Rotation around the z-axis -Note: The placement is expressed in local coordinate system -of object being attached. + Otáčení kolem osy z +Poznámka: Umístění je určeno v lokálním souřadnicovém systému připojeného objektu. Flip side of attachment and offset - Flip side of attachment and offset + Překlopí stranu přípojení a odsadí @@ -5043,7 +5038,7 @@ of object being attached. Attachment mode failed: %1 - Mód připojení selhal: %1 + Režim připojení selhal: %1 @@ -5088,7 +5083,7 @@ of object being attached. Not editable because rotation of AttachmentOffset is bound by expressions. - Not editable because rotation of AttachmentOffset is bound by expressions. + Není upravitelné, protože otočení odsazeného připojení je vázáno výrazy. @@ -5122,174 +5117,174 @@ of object being attached. Skip settings page - Skip settings page + Přeskočit stránku nastavení Skip this settings page and run the geometry check automatically. - Skip this settings page and run the geometry check automatically. + Přeskočit tuto stránku nastavení a provést kontrolu geometrie automaticky. Default: false - Default: false + Výchozí: vypnuto Run boolean operation check - Run boolean operation check + Spustit kontrolu booleovských operací Extra boolean operations check that can sometimes find errors that the standard BRep geometry check misses. These errors do not always mean the checked object is unusable. Default: false - Extra boolean operations check that can sometimes find errors that -the standard BRep geometry check misses. These errors do not always -mean the checked object is unusable. Default: false + Extra kontrola booleovských operací, která může někdy najít chyby, +které standardní kontrola geometrie BRep postrádá. Tyto chyby nemusí +vždy znamenat, že kontrolovaný objekt je nepoužitelný. Výchozí: vypnuto Single-threaded - Single-threaded + Jedním vláknem Run the geometry check in a single thread. This is slower, but more stable. Default: false - Run the geometry check in a single thread. This is slower, -but more stable. Default: false + Spustit kontrolu geometrie v jednom vlákně. Toto je pomalejší, +ale stabilnější. Výchozí: vypnuto Log errors - Log errors + Zaznamenat chyby Log errors to report view. Default: true - Log errors to report view. Default: true + Zaznamenávat chyby pro zobrazení hlášení. Výchozí: zapnuto Expand shape content - Expand shape content + Rozbalit obsah tvaru Expand shape content. Changes will take effect next time you use the check geometry tool. Default: false - Expand shape content. Changes will take effect next time you use -the check geometry tool. Default: false + Rozbalí obsah tvaru. Změny se projeví při příštím použití +nástroje pro kontrolu geometrie. Výchozí: vypnuto Advanced shape content - Advanced shape content + Rozšířený obsah tvaru Show advanced shape content. Changes will take effect next time you use the check geometry tool. Default: false - Show advanced shape content. Changes will take effect next time you use -the check geometry tool. Default: false + Zobrazit rozšířený obsah tvaru. Změny se projeví při příštím použití +nástroje pro kontrolu geometrie. Výchozí: vypnuto Individual boolean operation checks: - -Individual boolean operation checks: + +Jednotlivé kontroly booleovských operací: Bad type - Bad type + Chybný typ Self-intersect - Self-intersect + Sebe protínání Too small edge - Too small edge + Příliš malá hrana Nonrecoverable face - Nonrecoverable face + Neobnovitelná plocha Continuity - Pokračování + Kontinuita Incompatibility of face - Incompatibility of face + Nekompatibilita plochy Incompatibility of vertex - Incompatibility of vertex + Nekompatibilita vrcholu Incompatibility of edge - Incompatibility of edge + Nekompatibilita hrany Invalid curve on surface - Invalid curve on surface + Neplatná křivka na povrchu Check for bad argument types. Default: true - Check for bad argument types. Default: true + Zkontrolovat špatné typy argumentů. Výchozí: zapnuto Check for self-intersections. Default: true - Check for self-intersections. Default: true + Kontrolovat protínání sama sebe. Výchozí: zapnuto Check for edges that are too small. Default: true - Check for edges that are too small. Default: true + Zkontrolovat hrany, které jsou příliš malé. Výchozí: zapnuto Check for nonrecoverable faces. Default: true - Zkontrolovat neobnovitelné strana. Výchozí: pravda + Zkontrolovat neobnovitelné plochy. Výchozí: zapnuto Check for continuity. Default: true - Check for continuity. Default: true + Kontrola kontinuity. Výchozí: zapnuto Check for incompatible faces. Default: true - Check for incompatible faces. Default: true + Zkontrolovat nekompatibilní plochy. Výchozí: zapnuto Check for incompatible vertices. Default: true - Check for incompatible vertices. Default: true + Zkontrolovat nekompatibilní vrcholy. Výchozí: zapnuto Check for incompatible edges. Default: true - Check for incompatible edges. Default: true + Zkontrolovat nekompatibilní hrany. Výchozí: zapnuto Check for invalid curves on surfaces. Default: true - Check for invalid curves on surfaces. Default: true + Kontrola neplatných křivek na površích. Výchozí: zapnuto @@ -5299,7 +5294,7 @@ Individual boolean operation checks: Results - Results + Výsledky @@ -5307,17 +5302,17 @@ Individual boolean operation checks: Check Geometry Results - Check Geometry Results + Zkontrolovat výsledky geometrie Check is running... - Check is running... + Probíhá kontrola... Boolean operation check... - Boolean operation check... + Kontrola booleovských operací... @@ -5333,27 +5328,27 @@ Individual boolean operation checks: Checking - Checking + Kontrola %1 processed out of %2 selected - %1 processed out of %2 selected + %1 zpracován z %2 vybraných %n invalid shapes. - - %n invalid shapes. - %n invalid shapes. - %n invalid shapes. - %n invalid shapes. + + %n neplatný tvar. + %n neplatné tvary. + %n neplatných tvarů. + %n neplatných tvarů. Checked object - Checked object + Zkontrolovaný objekt @@ -5369,7 +5364,7 @@ Individual boolean operation checks: Don't show this dialog again - Don't show this dialog again + Nezobrazovat tento dialog znovu @@ -5382,7 +5377,7 @@ Individual boolean operation checks: Click on the faces in the 3D view to select them - Click on the faces in the 3D view to select them + Klikněte na plochy ve 3D zobrazení pro jejich výběr @@ -5392,19 +5387,19 @@ Individual boolean operation checks: Resets color for all faces of the part - Resets color for all faces of the part + Obnoví barvu pro všechny plochy dílu Set to default - Nastavit výchzí hodnoty + Nastavit na výchozí When checked, the you can select multiple faces by dragging a selection rectangle in the 3D view - When checked, the you can select multiple faces -by dragging a selection rectangle in the 3D view + Je-li zaškrtnuto, můžete vybrat více ploch +přetažením výběrového obdélníku v 3D pohledu @@ -5471,7 +5466,7 @@ by dragging a selection rectangle in the 3D view Arc - oblouk + Oblouk @@ -5561,7 +5556,7 @@ by dragging a selection rectangle in the 3D view Box selection... - Box selection... + Okno výběru... @@ -5603,7 +5598,7 @@ in the 3D view for the sweep path. Tube - Tube + Trubka @@ -5613,12 +5608,12 @@ in the 3D view for the sweep path. Outer radius - Outer radius + Vnější poloměr Inner radius - Inner radius + Vnitřní poloměr @@ -5707,7 +5702,7 @@ in the 3D view for the sweep path. Part and Part Design workbench - Part and Part Design workbench + Pracovní prostředí pro díl a návrh dílu @@ -5715,7 +5710,7 @@ in the 3D view for the sweep path. Part/Part Design - Part/Part Design + Díl/Návrh dílu @@ -6017,67 +6012,67 @@ Chcete pokračovat? Out Of Enum Range: - Out Of Enum Range: + Mimo rozsah výčtu: Boolean operation: Unknown check - Boolean operation: Unknown check + Booleovská operace: Neznámá kontrola Boolean operation: Bad type - Boolean operation: Bad type + Booleovská operace: Chybný typ Boolean operation: Self-intersection found - Boolean operation: Self-intersection found + Booleovská operace: Nalezeno sebe protínání Boolean operation: Edge too small - Boolean operation: Edge too small + Booleovská operace: Hrana je příliš malá Boolean operation: Non-recoverable face - Boolean operation: Non-recoverable face + Booleovská operace: Neobnovitelná plocha Boolean operation: Incompatibility of vertex - Boolean operation: Incompatibility of vertex + Booleovská operace: Nekompatibilita vrcholu Boolean operation: Incompatibility of edge - Boolean operation: Incompatibility of edge + Booleovská operace: Nekompatibilita hrany Boolean operation: Incompatibility of face - Boolean operation: Incompatibility of face + Booleovská operace: Nekompatibilita plochy Boolean operation: Aborted - Boolean operation: Aborted + Booleovská operace: Přerušeno Boolean operation: GeomAbs_C0 - Boolean operation: GeomAbs_C0 + Booleovská operace: GeomAbs_C0 Boolean operation: Invalid curve on surface - Boolean operation: Invalid curve on surface + Booleovská operace: Neplatná křivka na povrchu Boolean operation: Not valid - Boolean operation: Not valid + Booleovská operace: Neplatné @@ -6104,22 +6099,22 @@ Chcete pokračovat? Reset selection - Reset selection + Obnovit výběr Toggle direct dimensions - Toggle direct dimensions + Přepnout přímé rozměry Toggle orthogonal dimensions - Toggle orthogonal dimensions + Přepnout ortogonální rozměry Clear all dimensions - Clear all dimensions + Vyčistit všechny rozměry @@ -6159,22 +6154,22 @@ Chcete pokračovat? Attachment editor - Attachment editor + Editor připojení Create tube - Create tube + Vytvořit trubku Distance in parameter space - Distance in parameter space + Vzdálenost v parametrickém prostoru Enter distance: - Enter distance: + Zadat vzdálenost: @@ -6182,17 +6177,17 @@ Chcete pokračovat? &Part - &Part + &Díl &Simple - &Simple + &Jednoduchý &Parametric - &Parametric + &Parametrický @@ -6232,7 +6227,7 @@ Chcete pokračovat? Create a copy - Create a copy + Vytvořit kopii @@ -6245,12 +6240,12 @@ Chcete pokračovat? Create tube - Create tube + Vytvořit trubku Creates a tube - Creates a tube + Vytvoří trubku @@ -6258,12 +6253,12 @@ Chcete pokračovat? Computing the result failed with an error: - Computing the result failed with an error: + Výpočet výsledku se nezdařil s chybou: Click 'Continue' to create the feature anyway, or 'Abort' to cancel. - Click 'Continue' to create the feature anyway, or 'Abort' to cancel. + Klikněte na 'Pokračovat' pro vytvoření funkce i tak, nebo na 'Přerušit' pro zrušení. @@ -6271,7 +6266,7 @@ Chcete pokračovat? Bad selection - Bad selection + Špatný výběr @@ -6281,17 +6276,17 @@ Chcete pokračovat? Select at least two objects, or one or more compounds - Select at least two objects, or one or more compounds + Vyberte nejméně dva objekty nebo jednu či více složenin Select base object, then the object to embed, and then invoke this tool. - Select base object, then the object to embed, and then invoke this tool. + Vyberte základní objekt, potom objekt k připojení a nakonec použijte tento nástroj. Select the object to make a cutout in, then the object that should fit into the cutout, and then invoke this tool. - Select the object to make a cutout in, then the object that should fit into the cutout, and then invoke this tool. + Vyberte objekt, ve kterém má být výřez, pak objekt, který má odpovídat výřezu, a nakonec použijte tento nástroj. @@ -6299,12 +6294,12 @@ Chcete pokračovat? Connect objects - Connect objects + Propojit objekty Fuses objects, taking care to preserve voids. - Fuses objects, taking care to preserve voids. + Sloučí objekty se zachováním dutin. @@ -6312,12 +6307,12 @@ Chcete pokračovat? Embed object - Embed object + Vložit objekt Fuses one object into another, taking care to preserve voids. - Fuses one object into another, taking care to preserve voids. + Sloučí jeden objekt do druhého se zachováním dutin. @@ -6325,12 +6320,12 @@ Chcete pokračovat? Cutout for object - Cutout for object + Výřez objektu Makes a cutout in one object to fit another object. - Makes a cutout in one object to fit another object. + Vytvoří výřez v jednom objektu odpovídající jinému objektu. @@ -6340,14 +6335,14 @@ Chcete pokračovat? Computing the result failed with an error: - Computing the result failed with an error: + Výpočet výsledku se nezdařil s chybou: Click 'Continue' to create the feature anyway, or 'Abort' to cancel. - Click 'Continue' to create the feature anyway, or 'Abort' to cancel. + Klikněte na 'Pokračovat' pro vytvoření funkce i tak, nebo na 'Přerušit' pro zrušení. @@ -6358,7 +6353,7 @@ Chcete pokračovat? Bad selection - Bad selection + Špatný výběr @@ -6372,13 +6367,13 @@ Chcete pokračovat? Select at least two objects, or one or more compounds. If only one compound is selected, the compounded shapes will be intersected between each other (otherwise, compounds with self-intersections are invalid). - Select at least two objects, or one or more compounds. If only one compound is selected, the compounded shapes will be intersected between each other (otherwise, compounds with self-intersections are invalid). + Vyberte alespoň dva objekty nebo jednu či více složenin. Je-li vybrána jen jedna složenina, pak bude vytvořen průnik tvarů složeniny (jinak jsou sebe protínající se složeniny neplatné). Select at least two objects. The first one is the object to be sliced; the rest are objects to slice with. - Select at least two objects. The first one is the object to be sliced; the rest are objects to slice with. + Vyberte alespoň dva objekty. První je řezaný objekt; ostatní jsou řezné objekty. @@ -6394,31 +6389,31 @@ Chcete pokračovat? area, or length, or by choosing specific items. If a second object is selected, it will be used as reference, for example, for collision or distance filtering. - Filter out objects from a selected compound by characteristics like volume, -area, or length, or by choosing specific items. -If a second object is selected, it will be used as reference, for example, -for collision or distance filtering. + Odfiltrovat objekty od vybrané složeniny podle vlastností, jako je objem, +plocha nebo délka, nebo výběrem konkrétních položek. +Pokud je vybrán druhý objekt, bude použit jako reference, například +pro kolizní filtrování nebo filtrování vzdálenosti. First select a shape that is a compound. If a second object is selected (optional) it will be treated as a stencil. - First select a shape that is a compound. If a second object is selected (optional) it will be treated as a stencil. + Nejprve vyberte tvar, který je složeninou. Je-li vybraný druhý objekt (volitelně), bude použit jako šablona. Bad selection - Bad selection + Špatný výběr Computing the result failed with an error: - Computing the result failed with an error: + Výpočet výsledku se nezdařil s chybou: Click 'Continue' to create the feature anyway, or 'Abort' to cancel. - Click 'Continue' to create the feature anyway, or 'Abort' to cancel. + Klikněte na 'Pokračovat' pro vytvoření funkce i tak, nebo na 'Přerušit' pro zrušení. @@ -6426,24 +6421,24 @@ for collision or distance filtering. Explode compound - Explode compound + Rozložit složeninu Split up a compound of shapes into separate objects. It will create a 'Compound Filter' for each shape. - Split up a compound of shapes into separate objects. -It will create a 'Compound Filter' for each shape. + Rozdělit složeninu tvarů na samostatné objekty. +Vytvoří "Filtr složenin" pro každý tvar. First select a shape that is a compound. - First select a shape that is a compound. + Nejprve vyberte tvar, který je složeninou. Bad selection - Bad selection + Špatný výběr @@ -6451,22 +6446,22 @@ It will create a 'Compound Filter' for each shape. No object named {} - No object named {} + Žádný objekt s názvem {} Failed to parse link (more than one colon encountered) - Failed to parse link (more than one colon encountered) + Nepodařilo se načíst odkaz (nalezena více než jedna dvojtečka) Object {} is neither movable nor attachable, can't edit attachment - Object {} is neither movable nor attachable, can't edit attachment + Objekt {} není ani pohyblivý, ani připojitelný, nemůže upravovat připojení {} is not attachable. You can still use attachment editor dialog to align the object, but the attachment won't be parametric. - {} is not attachable. You can still use attachment editor dialog to align the object, but the attachment won't be parametric. + {} není připojitelný. Můžete stále použít editační dialog pro zarovnání objektu, ale připojení nebude parametrické. @@ -6483,27 +6478,27 @@ It will create a 'Compound Filter' for each shape. Edit attachment of {} - Edit attachment of {} + Upravit připojení {} Ignored. Can't attach object to itself! - Ignored. Can't attach object to itself! + Ignorováno. Nelze připojit objekt sám k sobě! {} depends on object being attached, can't use it for attachment - {} depends on object being attached, can't use it for attachment + {} závisí na připojovaném objektu, takže nemůže být použit {} (add {}) - {} (add {}) + {} (přidat {}) {} (add more references) - {} (add more references) + {} (přidat více odkazů) @@ -6513,7 +6508,7 @@ It will create a 'Compound Filter' for each shape. Reference{} - Reference{} + Odkaz{} @@ -6523,7 +6518,7 @@ It will create a 'Compound Filter' for each shape. Failed to resolve links. {} - Failed to resolve links. {} + Připojení selhalo. {} @@ -6533,12 +6528,12 @@ It will create a 'Compound Filter' for each shape. Attached with mode {} - Attached with mode {} + Připojeno v režimu {} Error: {} - Error: {} + Chyba: {} @@ -6556,12 +6551,12 @@ It will create a 'Compound Filter' for each shape. Attachment... - Attachment... + Připojení... Edit attachment of selected object. - Edit attachment of selected object. + Upravit připojení vybraného objektu. @@ -6569,7 +6564,7 @@ It will create a 'Compound Filter' for each shape. Shape type - Shape type + Typ tvaru @@ -6604,7 +6599,7 @@ It will create a 'Compound Filter' for each shape. CompSolids - CompSolids + Složená tělesa @@ -6644,7 +6639,7 @@ It will create a 'Compound Filter' for each shape. Curve center - Curve center + Střed křivky @@ -6659,7 +6654,7 @@ It will create a 'Compound Filter' for each shape. Is closed - Is closed + Je uzavřena @@ -6669,12 +6664,12 @@ It will create a 'Compound Filter' for each shape. Global center of mass - Global center of mass + Globální těžiště Global placement - Global placement + Globální umístění @@ -6687,7 +6682,7 @@ It will create a 'Compound Filter' for each shape. Boolean fragments - Boolean fragments + Booleovské fragmenty @@ -6696,11 +6691,11 @@ or from the shapes inside a compound. This is a boolean union which is then sliced at the intersections of the original shapes. A 'Compound Filter' can be used to extract the individual slices. - Create a 'Boolean Fragments' object from two or more selected objects, -or from the shapes inside a compound. -This is a boolean union which is then sliced at the intersections -of the original shapes. -A 'Compound Filter' can be used to extract the individual slices. + Vytvořit objekt 'Booleovské Fragmenty' ze dvou nebo více vybraných objektů, +nebo z tvarů uvnitř složeniny. +Jedná se o booleovské sloučení, která je pak rozděleno na průsečíky +původních tvarů. +'Filtr složenin' lze použít k extrakci jednotlivých částí. @@ -6708,16 +6703,16 @@ A 'Compound Filter' can be used to extract the individual slices. Slice to compound - Slice to compound + Rozřezat na složeninu Slice a selected object by using other objects as cutting tools. The resulting pieces will be stored in a compound. A 'Compound Filter' can be used to extract the individual slices. - Slice a selected object by using other objects as cutting tools. -The resulting pieces will be stored in a compound. -A 'Compound Filter' can be used to extract the individual slices. + Rozřeže vybraný objekt použitím jiných objektů jako řezných nástrojů. +Výsledné části budou definovány jako složenina. +'Filtr složenin' lze použít k extrakci jednotlivých částí. @@ -6725,14 +6720,14 @@ A 'Compound Filter' can be used to extract the individual slices. Slice apart - Slice apart + Rozřezat od sebe Slice a selected object by other objects, and split it apart. It will create a 'Compound Filter' for each slice. - Slice a selected object by other objects, and split it apart. -It will create a 'Compound Filter' for each slice. + Rozřeže vybraný objekt jinými objekty a rozdělí je od sebe. +Vytvoří 'Filtr složenin' pro každý řez. @@ -6740,7 +6735,7 @@ It will create a 'Compound Filter' for each slice. Boolean XOR - Boolean XOR + Booleovský XOR @@ -6748,10 +6743,10 @@ It will create a 'Compound Filter' for each slice. or with the shapes inside a compound. This means the overlapping volumes of the shapes will be removed. A 'Compound Filter' can be used to extract the remaining pieces. - Perform an 'exclusive OR' boolean operation with two or more selected objects, -or with the shapes inside a compound. -This means the overlapping volumes of the shapes will be removed. -A 'Compound Filter' can be used to extract the remaining pieces. + Provede booleovskou operaci 'exkluzivní OR' se dvěma nebo více vybranými objekty, +nebo s tvary uvnitř složeniny. +To znamená, že budou odstraněny překrývající se objemy tvarů. +K extrakci zbývajících částí může být použitý 'Filtr složenin'. @@ -6764,47 +6759,47 @@ A 'Compound Filter' can be used to extract the remaining pieces. X Factor - X Factor + Měřítko X Factor - měřítko + Měřítko Z Factor - Z Factor + Měřítko Z Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Škáluje objekt pomocí jediného měřítka ve všech směrech. Uniform Scaling - Uniform Scaling + Jednotné škálování Y Factor - Y Factor + Měřítko Y Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Zadejte různé měřítko škálování pro každý kardinální směr. Non-Uniform Scaling - Non-Uniform Scaling + Nejednotné škálování Select shape(s) that should be scaled - Select shape(s) that should be scaled + Vyberte tvar(y), který by měl být škálován @@ -6812,21 +6807,21 @@ A 'Compound Filter' can be used to extract the remaining pieces. Útvar - + No scalable shapes selected - No scalable shapes selected + Nejsou vybrány žádné škálovatelné tvary - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 - Creating Scale failed. + Selhalo vytvoření škálování. %1 @@ -6845,7 +6840,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. Scale a selected shape - Scale a selected shape + Škálovat vybraný tvar diff --git a/src/Mod/Part/Gui/Resources/translations/Part_de.ts b/src/Mod/Part/Gui/Resources/translations/Part_de.ts index c298e3ed21..120ce521cc 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_de.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_de.ts @@ -435,7 +435,7 @@ Intersection AttachmentLine mode caption - Schnitt + Schnittstelle @@ -859,7 +859,7 @@ Align XY plane to pass through three vertices. Attachment3D mode tooltip - Richten Sie die XY-Ebene aus, um durch drei Ecken zu passieren. + Richtet die XY-Ebene so aus, dass sie durch drei Knoten verläuft. @@ -1672,7 +1672,7 @@ X-, Y- und Z-Komponenten zerlegt wird. Part - Part + Formteil @@ -1690,7 +1690,7 @@ X-, Y- und Z-Komponenten zerlegt wird. Part - Formteil + Part @@ -2209,7 +2209,7 @@ der Projektion. Part - Bauteil + Formteil @@ -4948,7 +4948,7 @@ nur die beschnittenen Objeke sichtbar Attachment Offset (in local coordinates): - Versatz der Anhänge (in lokalen Koordinaten): + Versatz der Befestigung (in lokalen Koordinaten): @@ -5429,7 +5429,7 @@ indem Sie ein Auswahlrechteck in der 3D-Ansicht aufziehen Offset - Versatz + Versetzen @@ -5470,7 +5470,7 @@ indem Sie ein Auswahlrechteck in der 3D-Ansicht aufziehen Intersection - Schnittstelle + Schnitt @@ -6531,7 +6531,7 @@ Es wird ein 'Compound-Filter'-Objekt für jede Form erzeugt. Attachment Offset (in local coordinates): - Versatz der Befestigung (in lokalen Koordinaten): + Versatz der Anhänge (in lokalen Koordinaten): @@ -6751,7 +6751,7 @@ Ein 'Verbundfilter' kann verwendet werden, um die restlichen Stücke zu extrahie X Factor - X Factor + X-Faktor @@ -6761,37 +6761,37 @@ Ein 'Verbundfilter' kann verwendet werden, um die restlichen Stücke zu extrahie Z Factor - Z Factor + Z-Faktor Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Skaliert das Objekt mit demselben Faktor in alle Richtungen. Uniform Scaling - Uniform Scaling + Einheitliche Skalierung Y Factor - Y Factor + Y-Faktor Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Verwendet unterschiedliche Skalierungsfaktoren für jede der Hauptrichtungen. Non-Uniform Scaling - Non-Uniform Scaling + Uneinheitliche Skalierung Select shape(s) that should be scaled - Select shape(s) that should be scaled + Form(en) auswählen, die extrudiert werden soll(en) @@ -6799,21 +6799,21 @@ Ein 'Verbundfilter' kann verwendet werden, um die restlichen Stücke zu extrahie Form - + No scalable shapes selected - No scalable shapes selected + Keine skalierbaren Formen ausgewählt - + The document '%1' doesn't exist. Das Dokument '%1' existiert nicht. - - + + Creating Scale failed. %1 - Creating Scale failed. + Fehler beim Erstellen der Skalierung. %1 @@ -6822,7 +6822,7 @@ Ein 'Verbundfilter' kann verwendet werden, um die restlichen Stücke zu extrahie Part - Formteil + Bauteil @@ -6832,7 +6832,7 @@ Ein 'Verbundfilter' kann verwendet werden, um die restlichen Stücke zu extrahie Scale a selected shape - Scale a selected shape + Skaliert eine ausgewählte Form diff --git a/src/Mod/Part/Gui/Resources/translations/Part_el.ts b/src/Mod/Part/Gui/Resources/translations/Part_el.ts index 5af9e9705a..320427b02e 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_el.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_el.ts @@ -6806,18 +6806,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Σχήμα - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts b/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts index d6a151317f..730d2d160a 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_es-AR.ts @@ -6327,7 +6327,7 @@ Do you want to continue? Makes a cutout in one object to fit another object. - Realizar un recorte en un objeto para encajar otro objeto. + Hace un recorte en un objeto para encajar con otro objeto. @@ -6391,10 +6391,10 @@ Do you want to continue? area, or length, or by choosing specific items. If a second object is selected, it will be used as reference, for example, for collision or distance filtering. - Filtrar objetos de un compuesto seleccionado por características como volumen, + Filtra objetos de un compuesto seleccionado por características como volumen, área o longitud, o eligiendo elementos específicos. Si se selecciona un segundo objeto, se utilizará como referencia, por ejemplo, -para el filtrado de colisión o distancia. +para filtrado de colisión o distancia. @@ -6429,8 +6429,8 @@ para el filtrado de colisión o distancia. Split up a compound of shapes into separate objects. It will create a 'Compound Filter' for each shape. - Divida un compuesto de formas en objetos separados. -Se creará un 'Filtro Compuesto' para cada forma. + Divide un compuesto de formas en objetos separados. +Creará un 'Filtro Compuesto' para cada forma. @@ -6705,14 +6705,14 @@ Un 'Filtro Compuesto' se puede utilizar para extraer los cortes individuales. Slice to compound - Recortar en compuesto + Seccionar a compuesto Slice a selected object by using other objects as cutting tools. The resulting pieces will be stored in a compound. A 'Compound Filter' can be used to extract the individual slices. - Corte un objeto seleccionado usando otros objetos como herramientas de corte. + Corta un objeto seleccionado usando otros objetos como herramientas de corte. Las piezas resultantes se almacenarán en un compuesto. Un 'Filtro Compuesto' se puede utilizar para extraer los cortes individuales. @@ -6722,13 +6722,13 @@ Un 'Filtro Compuesto' se puede utilizar para extraer los cortes individuales. Slice apart - Cortar aparte + Cortes separados Slice a selected object by other objects, and split it apart. It will create a 'Compound Filter' for each slice. - Cortar un objeto seleccionado por otros objetos, y dividirlo por separado. + Corta un objeto seleccionado por otros objetos, y lo divide aparte. Se creará un 'Filtro Compuesto' para cada corte. @@ -6761,7 +6761,7 @@ Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes. X Factor - X Factor + Factor X @@ -6771,22 +6771,22 @@ Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes. Z Factor - Z Factor + Factor Z Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Escala el objeto por un solo factor en todas las direcciones. Uniform Scaling - Uniform Scaling + Escalado uniforme Y Factor - Y Factor + Factor Y @@ -6809,18 +6809,18 @@ Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes.Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. @@ -6842,7 +6842,7 @@ Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes. Scale a selected shape - Scale a selected shape + Escala una forma seleccionada diff --git a/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts b/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts index c7c2c5cef6..d7be682189 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_es-ES.ts @@ -6756,7 +6756,7 @@ Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes. X Factor - X Factor + Factor X @@ -6766,22 +6766,22 @@ Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes. Z Factor - Z Factor + Factor Z Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Escala el objeto por un solo factor en todas las direcciones. Uniform Scaling - Uniform Scaling + Escalado uniforme Y Factor - Y Factor + Factor Y @@ -6804,18 +6804,18 @@ Un 'Filtro Compuesto' se puede utilizar para extraer las piezas restantes.Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_eu.ts b/src/Mod/Part/Gui/Resources/translations/Part_eu.ts index a744132ff2..6293f3e11b 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_eu.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_eu.ts @@ -6759,7 +6759,7 @@ Horrek esan nahi du gainjarrita dauden formen bolumenak kendu egingo direla. X Factor - X Factor + X faktorea @@ -6769,37 +6769,37 @@ Horrek esan nahi du gainjarrita dauden formen bolumenak kendu egingo direla. Z Factor - Z Factor + Z faktorea Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Eskalatu objektua faktore bakarraren arabera norabide guztietan. Uniform Scaling - Uniform Scaling + Eskalatze uniformea Y Factor - Y Factor + Y faktorea Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Zehaztu eskala-faktore desberdina norabide kardinal bakoitzerako. Non-Uniform Scaling - Non-Uniform Scaling + Eskalatze ez uniformea Select shape(s) that should be scaled - Select shape(s) that should be scaled + Hautatu eskalatu behar d(ir)en forma(k) @@ -6807,21 +6807,21 @@ Horrek esan nahi du gainjarrita dauden formen bolumenak kendu egingo direla. Forma - + No scalable shapes selected - No scalable shapes selected + Ez dira forma eskalagarriak hautatu - + The document '%1' doesn't exist. %1' dokumentua ez da existitzen. - - + + Creating Scale failed. %1 - Creating Scale failed. + Eskala sortzeak huts egin du. %1 @@ -6840,7 +6840,7 @@ Horrek esan nahi du gainjarrita dauden formen bolumenak kendu egingo direla. Scale a selected shape - Scale a selected shape + Eskalatu hautatutako forma bat diff --git a/src/Mod/Part/Gui/Resources/translations/Part_fi.ts b/src/Mod/Part/Gui/Resources/translations/Part_fi.ts index cd9889bd11..e87806d331 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_fi.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_fi.ts @@ -6813,18 +6813,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Muoto - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_fr.ts b/src/Mod/Part/Gui/Resources/translations/Part_fr.ts index 8fd3fdd701..d0905bbc34 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_fr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_fr.ts @@ -1167,7 +1167,7 @@ Part - Part + Pièce @@ -1361,7 +1361,7 @@ décomposée en ses composantes X, Y et Z. Part - Pièce + Part @@ -1381,7 +1381,7 @@ décomposée en ses composantes X, Y et Z. Part - Part + Pièce @@ -2343,7 +2343,7 @@ La vue caméra détermine la direction de la projection. Wire - Fil + Polyligne @@ -3067,7 +3067,7 @@ Si les deux longueurs sont nulles, la grandeur de la direction est utilisée. Length: - Longueur : + Longueur : @@ -3275,7 +3275,7 @@ Please check one or more edge entities first. Import - Importer + Importation @@ -3385,7 +3385,7 @@ during file reading (slower but higher details). Position: - Position : + Position : @@ -3438,7 +3438,7 @@ during file reading (slower but higher details). Position: - Position : + Position : @@ -3468,12 +3468,12 @@ during file reading (slower but higher details). Radius: - Rayon : + Rayon : Height: - Hauteur : + Hauteur : @@ -3639,7 +3639,7 @@ during file reading (slower but higher details). Length: - Longueur : + Longueur : @@ -3663,7 +3663,7 @@ during file reading (slower but higher details). Radius: - Rayon : + Rayon : @@ -3952,17 +3952,17 @@ during file reading (slower but higher details). X: - X : + X : Y: - Y : + Y : Z: - Z : + Z : @@ -4042,7 +4042,7 @@ during file reading (slower but higher details). Angle: - Angle : + Angle : @@ -4864,7 +4864,7 @@ seules les coupes créées seront visibles Wrong selection - Sélection incorrecte + Sélection invalide @@ -5160,8 +5160,7 @@ Valeur par défaut : false Log errors to report view. Default: true - Journal des erreurs vers la vue rapport. -Par défaut: true + Les logs d'erreurs vers la Vue rapport. Par défaut : true @@ -5423,7 +5422,7 @@ en traçant un rectangle de sélection dans la vue 3D Create solid - Créer le solide + Créer un solide @@ -5498,7 +5497,7 @@ en traçant un rectangle de sélection dans la vue 3D Faces - Faces + Faces  @@ -5585,7 +5584,7 @@ en traçant un rectangle de sélection dans la vue 3D Create solid - Créer un solide + Créer le solide @@ -5624,7 +5623,7 @@ in the 3D view for the sweep path. Height: - Hauteur : + Hauteur : @@ -5833,7 +5832,7 @@ Voulez-vous continuer ? Wire - Polyligne + Fil @@ -6359,7 +6358,7 @@ Voulez-vous continuer ? Bad selection - Sélection non valide + Mauvaise sélection @@ -6442,7 +6441,7 @@ Cela créera un "filtre composé" pour chaque forme. Bad selection - Mauvaise sélection + Sélection non valide @@ -6588,7 +6587,7 @@ Cela créera un "filtre composé" pour chaque forme. Faces - Faces  + Faces @@ -6760,7 +6759,7 @@ Un "filtre composé" peut être utilisé pour extraire les morceaux restants. X Factor - X Factor + Facteur X @@ -6770,37 +6769,37 @@ Un "filtre composé" peut être utilisé pour extraire les morceaux restants. Z Factor - Z Factor + Facteur Z Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Mettre l'objet à l'échelle d'un seul facteur dans toutes les directions. Uniform Scaling - Uniform Scaling + Mise à l'échelle uniforme Y Factor - Y Factor + Facteur Y Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Spécifier un facteur d'échelle différent pour chaque direction principale. Non-Uniform Scaling - Non-Uniform Scaling + Mise à l'échelle non uniforme Select shape(s) that should be scaled - Select shape(s) that should be scaled + Sélectionner la ou les forme(s) qui doivent être mises à l'échelle @@ -6808,21 +6807,21 @@ Un "filtre composé" peut être utilisé pour extraire les morceaux restants.Forme - + No scalable shapes selected - No scalable shapes selected + Aucune forme à mettre à l'échelle n'a été sélectionnée - + The document '%1' doesn't exist. Document « %1 » inexistant. - - + + Creating Scale failed. %1 - Creating Scale failed. + La création d'une échelle a échoué. %1 @@ -6831,7 +6830,7 @@ Un "filtre composé" peut être utilisé pour extraire les morceaux restants. Part - Pièce + Part @@ -6841,7 +6840,7 @@ Un "filtre composé" peut être utilisé pour extraire les morceaux restants. Scale a selected shape - Scale a selected shape + Mettre à l'échelle une forme sélectionnée diff --git a/src/Mod/Part/Gui/Resources/translations/Part_gl.ts b/src/Mod/Part/Gui/Resources/translations/Part_gl.ts index 86ceff886f..77e005fa47 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_gl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_gl.ts @@ -6803,18 +6803,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_hr.ts b/src/Mod/Part/Gui/Resources/translations/Part_hr.ts index e704c69b94..80c9754a4e 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_hr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_hr.ts @@ -6852,18 +6852,18 @@ To znači da će se ukloniti preklapajući volumeni oblika. Oblik - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_hu.ts b/src/Mod/Part/Gui/Resources/translations/Part_hu.ts index c96b906ff3..57405c584d 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_hu.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_hu.ts @@ -4048,7 +4048,7 @@ a fájl olvasása közben (lassabb, de pontosabb). Angle: - Szög: + Dőlésszög: @@ -6804,18 +6804,18 @@ A fennmaradó darabok kivonására az 'összetevő szűrő' használható.Alakzat - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. A '%1' dokumentum nem létezik. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_id.ts b/src/Mod/Part/Gui/Resources/translations/Part_id.ts index d3c992974d..8b33e9638d 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_id.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_id.ts @@ -6920,18 +6920,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Bentuk - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_it.ts b/src/Mod/Part/Gui/Resources/translations/Part_it.ts index 4cf7842edc..8048eebe5f 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_it.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_it.ts @@ -5726,7 +5726,7 @@ in the 3D view for the sweep path. Wrong selection - Selezione sbagliata + Selezione errata @@ -6806,18 +6806,18 @@ Un 'Composto Filtro' può essere usato per estrarre i pezzi rimanenti.Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. Il documento '%1' non esiste. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ja.ts b/src/Mod/Part/Gui/Resources/translations/Part_ja.ts index 7e05985a0a..0d8312bb10 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ja.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ja.ts @@ -6787,18 +6787,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. シェイプ - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ka.ts b/src/Mod/Part/Gui/Resources/translations/Part_ka.ts index 2e84f2f913..2e42cabef6 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ka.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ka.ts @@ -226,7 +226,7 @@ Vertex AttachmentPoint mode caption - Vertex + წვერო @@ -265,7 +265,7 @@ Deactivated AttachmentLine mode caption - გამორთული + დეაქტივირებულია @@ -707,7 +707,7 @@ Deactivated Attachment3D mode caption - დეაქტივირებულია + გამორთული @@ -2196,7 +2196,7 @@ of projection. Torus - ტორი + ტორუსი @@ -2308,7 +2308,7 @@ of projection. Refine shape - მოხაზულობის გამკვეთრება + მოხაზულობის დაზუსტება @@ -2359,7 +2359,7 @@ of projection. Solid - მყარი სხეული + მყარი @@ -2992,7 +2992,7 @@ If both lengths are zero, magnitude of direction is used. Shape - ფიგურა + მოხაზულობა @@ -3068,7 +3068,7 @@ If both lengths are zero, magnitude of direction is used. Length: - Length: + სიგრძე: @@ -3579,7 +3579,7 @@ during file reading (slower but higher details). Torus - ტორუსი + ტორი @@ -3643,7 +3643,7 @@ during file reading (slower but higher details). Length: - სიგრძე: + Length: @@ -4869,7 +4869,7 @@ only created cuts will be visible Wrong selection - არასწორი მონიშნული + არასწორი არჩევანი @@ -5073,7 +5073,7 @@ of object being attached. Selecting... - მონიშვნა... + არჩევა... @@ -5400,7 +5400,7 @@ by dragging a selection rectangle in the 3D view Box selection - არეალის მონიშვნა + ყუთის არჩევანი @@ -5488,7 +5488,7 @@ by dragging a selection rectangle in the 3D view Faces - სიბრტყეები + ზედაპირები @@ -5542,7 +5542,7 @@ by dragging a selection rectangle in the 3D view Refine shape - მოხაზულობის დაზუსტება + მოხაზულობის გამკვეთრება @@ -5640,7 +5640,7 @@ in the 3D view for the sweep path. Input error - შეყვანის შეცდომა + Input error @@ -5787,7 +5787,7 @@ Do you want to continue? Face - ზედაპირი + სიბრტყე @@ -5799,7 +5799,7 @@ Do you want to continue? Vertex - წვერო + Vertex @@ -5814,7 +5814,7 @@ Do you want to continue? Solid - მყარი + მყარი სხეული @@ -5829,7 +5829,7 @@ Do you want to continue? Shape - მოხაზულობა + ფიგურა @@ -6189,7 +6189,7 @@ Do you want to continue? Solids - მასივები + მყარი სხეულები @@ -6229,7 +6229,7 @@ Do you want to continue? Measure - გაზომვა + საზომი @@ -6339,7 +6339,7 @@ Do you want to continue? Click 'Continue' to create the feature anyway, or 'Abort' to cancel. - დააწექით "გაგრძელება"-ს თვისების მაინც შესაქმნელად, ან "შეწყვეტა"-ს, გაუქმებისთვის. + დააწექით "გაგრძელებას" თვისების მაინც შესაქმნელად, ან "შეწყვეტას", გაუქმებისთვის. @@ -6410,7 +6410,7 @@ for collision or distance filtering. Click 'Continue' to create the feature anyway, or 'Abort' to cancel. - დააწექით "გაგრძელებას" თვისების მაინც შესაქმნელად, ან "შეწყვეტას", გაუქმებისთვის. + დააწექით "გაგრძელება"-ს თვისების მაინც შესაქმნელად, ან "შეწყვეტა"-ს, გაუქმებისთვის. @@ -6510,7 +6510,7 @@ It will create a 'Compound Filter' for each shape. Selecting... - არჩევა... + მონიშვნა... @@ -6581,7 +6581,7 @@ It will create a 'Compound Filter' for each shape. Faces - ზედაპირები + სიბრტყეები @@ -6591,7 +6591,7 @@ It will create a 'Compound Filter' for each shape. Solids - მყარი სხეულები + მასივები @@ -6641,7 +6641,7 @@ It will create a 'Compound Filter' for each shape. Continuity - უწყვეტობა + გაგრძელება @@ -6756,7 +6756,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. X Factor - X Factor + ფაქტორი X @@ -6766,37 +6766,37 @@ A 'Compound Filter' can be used to extract the remaining pieces. Z Factor - Z Factor + ფაქტორი Z Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + ობიექტის ერთი კოეფიციენტით მასშტაბირება ყველა მიმართულებით. Uniform Scaling - Uniform Scaling + ერთგვაროვანი მასშტაბირება Y Factor - Y Factor + ფაქტორი Y Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + მიუთითეთ სხვადასხვა მასშტაბის კოეფიციენტი თითოეული ძირითადი მიმართულებისთვის. Non-Uniform Scaling - Non-Uniform Scaling + არაერთგვაროვანი მასშტაბირება Select shape(s) that should be scaled - Select shape(s) that should be scaled + მონიშნეთ მოხაზულობა (ებ-ი), რომლების მასშტაბირებაც მოხდება @@ -6804,21 +6804,21 @@ A 'Compound Filter' can be used to extract the remaining pieces. ფიგურა - + No scalable shapes selected - No scalable shapes selected + მასშტაბირებადი მოხაზულობები არჩეული არაა - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 - Creating Scale failed. + მასშტაბის შექმნა ჩავარდა. %1 @@ -6837,7 +6837,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. Scale a selected shape - Scale a selected shape + მონიშნული მონახაზის მასშტაბი diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ko.ts b/src/Mod/Part/Gui/Resources/translations/Part_ko.ts index 372169da70..c018bd106f 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ko.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ko.ts @@ -6809,18 +6809,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. 셰이프 - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_nl.ts b/src/Mod/Part/Gui/Resources/translations/Part_nl.ts index dabe25b2ba..cc1c31809d 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_nl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_nl.ts @@ -3923,7 +3923,7 @@ during file reading (slower but higher details). Show all - Alles tonen + Alles weergeven @@ -6812,18 +6812,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Vorm - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_pl.ts b/src/Mod/Part/Gui/Resources/translations/Part_pl.ts index 57a80b89c1..e2d7f212fa 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_pl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_pl.ts @@ -2253,7 +2253,7 @@ Ujęcie widoku określa kierunek rzutowania. Section - Przekrój + Przecięcie @@ -2556,7 +2556,7 @@ Uwaga: Położenie jest wyrażone w przestrzeni lokalnej dołączanego obiektu.< Section - Przecięcie + Przekrój @@ -4871,7 +4871,7 @@ only created cuts will be visible Wrong selection - Nieprawidłowy wybór + Niewłaściwy wybór @@ -5793,7 +5793,7 @@ Do you want to continue? Face - Ściana + Powierzchnia @@ -6356,7 +6356,7 @@ Do you want to continue? Bad selection - Błędny wybór + Nieprawidłowy wybór @@ -6408,7 +6408,7 @@ do filtrowania według kolizji lub odległości. Bad selection - Nieprawidłowy wybór + Błędny wybór @@ -6764,7 +6764,7 @@ Oznacza to, że nakładające się na siebie objętości kształtów zostaną us X Factor - X Factor + Współczynnik X @@ -6774,37 +6774,37 @@ Oznacza to, że nakładające się na siebie objętości kształtów zostaną us Z Factor - Z Factor + Współczynnik Z Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Skaluj obiekt tym samym współczynnikiem we wszystkich kierunkach. Uniform Scaling - Uniform Scaling + Skalowanie ujednolicone Y Factor - Y Factor + Współczynnik Y Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Określ indywidualny współczynnik skalowania dla każdego głównego kierunku. Non-Uniform Scaling - Non-Uniform Scaling + Skalowanie niejednolite Select shape(s) that should be scaled - Select shape(s) that should be scaled + Wybierz kształt, który ma zostać przeskalowany @@ -6812,21 +6812,21 @@ Oznacza to, że nakładające się na siebie objętości kształtów zostaną us Kształt - + No scalable shapes selected - No scalable shapes selected + Wybór nie zawiera kształtów, które mogą zostać przeskalowane - + The document '%1' doesn't exist. Dokument "%1" nie istnieje. - - + + Creating Scale failed. %1 - Creating Scale failed. + Operacja skalowania nie powiodła się. %1 @@ -6845,7 +6845,7 @@ Oznacza to, że nakładające się na siebie objętości kształtów zostaną us Scale a selected shape - Scale a selected shape + Skaluj wybrany kształt diff --git a/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts b/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts index 5a459ee301..3b9cf61ff0 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_pt-BR.ts @@ -6791,18 +6791,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. O documento '%1' não existe. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts b/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts index e03e4e4617..a0fc314a04 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_pt-PT.ts @@ -6803,18 +6803,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ro.ts b/src/Mod/Part/Gui/Resources/translations/Part_ro.ts index 5f002bb28d..5c72a4059f 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ro.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ro.ts @@ -6809,18 +6809,18 @@ Un "Filtru combinat" poate fi folosit pentru a extrage piesele rămase.Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_ru.ts b/src/Mod/Part/Gui/Resources/translations/Part_ru.ts index c26e119a05..60b00e6ec1 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_ru.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_ru.ts @@ -2254,7 +2254,7 @@ of projection. Section - Разрез (Сечение) + Разделить @@ -2360,7 +2360,7 @@ of projection. Solid - Твердое тело + Твердотельный объект @@ -2557,7 +2557,7 @@ Note: The placement is expressed in local space of object being attached. Section - Разделить + Разрез (Сечение) @@ -2685,7 +2685,7 @@ Note: The placement is expressed in local space of object being attached. STEP - STEP + ШАГ @@ -2994,7 +2994,7 @@ If both lengths are zero, magnitude of direction is used. Shape - Фигура(ы) + Фигура @@ -3278,7 +3278,7 @@ Please check one or more edge entities first. Import - импорт + Импорт @@ -3389,7 +3389,7 @@ during file reading (slower but higher details). Position: - Расположение: + Позиция: @@ -3442,7 +3442,7 @@ during file reading (slower but higher details). Position: - Позиция: + Расположение: @@ -3524,7 +3524,7 @@ during file reading (slower but higher details). STEP - ШАГ + STEP @@ -4514,7 +4514,7 @@ the sketch plane's normal vector will be used Loft - Чердак (под крышей) + Профиль @@ -4870,7 +4870,7 @@ only created cuts will be visible Wrong selection - Неправильное выделение + Неправильный выбор @@ -5413,7 +5413,7 @@ by dragging a selection rectangle in the 3D view Loft - Профиль + Чердак (под крышей) @@ -5727,7 +5727,7 @@ in the 3D view for the sweep path. Wrong selection - Неправильный выбор + Неправильное выделение @@ -5818,7 +5818,7 @@ Do you want to continue? Solid - Твердотельный объект + Твердое тело @@ -5833,7 +5833,7 @@ Do you want to continue? Shape - Фигура + Фигура(ы) @@ -6193,7 +6193,7 @@ Do you want to continue? Solids - Массивы + Твердотельные объекты @@ -6233,7 +6233,7 @@ Do you want to continue? Measure - Измерения + Измерить @@ -6595,7 +6595,7 @@ It will create a 'Compound Filter' for each shape. Solids - Твердотельные объекты + Массивы @@ -6765,7 +6765,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. X Factor - X Factor + X фактор @@ -6775,37 +6775,37 @@ A 'Compound Filter' can be used to extract the remaining pieces. Z Factor - Z Factor + Z фактор Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Масштабировать объект одним коэффициентом во всех направлениях. Uniform Scaling - Uniform Scaling + Равномерное масштабирование Y Factor - Y Factor + Y Фактор Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Укажите разный коэффициент шкалы для каждого основного направления. Non-Uniform Scaling - Non-Uniform Scaling + Неединообразное масштабирование Select shape(s) that should be scaled - Select shape(s) that should be scaled + Выберите форму(ы), которые должны быть масштабированы @@ -6813,21 +6813,21 @@ A 'Compound Filter' can be used to extract the remaining pieces. Фигура(ы) - + No scalable shapes selected - No scalable shapes selected + Не выбраны масштабируемые фигуры - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 - Creating Scale failed. + Создание масштаба не удалось. %1 @@ -6846,7 +6846,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. Scale a selected shape - Scale a selected shape + Масштабировать выбранную фигуру diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sl.ts b/src/Mod/Part/Gui/Resources/translations/Part_sl.ts index fc58132502..bde505a621 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sl.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sl.ts @@ -226,7 +226,7 @@ Vertex AttachmentPoint mode caption - Vertex + Oglišče @@ -2995,7 +2995,7 @@ If both lengths are zero, magnitude of direction is used. Shape - Oblika(e) + Oblika @@ -4873,7 +4873,7 @@ bodo prikazane le prerezne ploskve Wrong selection - Napačen izbor + Napačna izbira @@ -4954,7 +4954,7 @@ bodo prikazane le prerezne ploskve Attachment Offset (in local coordinates): - Odmik pripetka (v lokalnih koordinatah): + Odmik pripetka (v krajevnih sorednicah): @@ -5809,7 +5809,7 @@ Ali želite nadaljevati? Vertex - Oglišče + Vertex @@ -5839,7 +5839,7 @@ Ali želite nadaljevati? Shape - Oblika + Oblika(e) @@ -6479,7 +6479,7 @@ Za vsako obliko bo ustvarjeno "Sito sestava". Continue - Naprej + Nadaljuj @@ -6545,7 +6545,7 @@ Za vsako obliko bo ustvarjeno "Sito sestava". Attachment Offset (in local coordinates): - Odmik pripetka (v krajevnih sorednicah): + Odmik pripetka (v lokalnih koordinatah): @@ -6813,18 +6813,18 @@ Ostale dele lahko izvelečet s "sitom sestava". Oblika(e) - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts b/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts index 0ad39d6b6d..827ebf265f 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sr-CS.ts @@ -6760,7 +6760,7 @@ Ova bulova logička operacija uklanja sve delove objekata koji se preklapaju. X Factor - X Factor + X koeficijent @@ -6770,37 +6770,37 @@ Ova bulova logička operacija uklanja sve delove objekata koji se preklapaju. Z Factor - Z Factor + Z koeficijent Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Skaliraj objekat sa jednim koeficijentom u svim smerovima. Uniform Scaling - Uniform Scaling + Ujednačeno skaliranje Y Factor - Y Factor + Y koeficijent Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Zadaj drugačiji koeficijent skaliranja za svaki pravac. Non-Uniform Scaling - Non-Uniform Scaling + Neujednačeno skaliranje Select shape(s) that should be scaled - Select shape(s) that should be scaled + Izaberi oblik(e) koji treba da budu skalirani @@ -6808,21 +6808,21 @@ Ova bulova logička operacija uklanja sve delove objekata koji se preklapaju. Oblik - + No scalable shapes selected - No scalable shapes selected + Nema izabranih oblika pogodnih za skaliranje - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 - Creating Scale failed. + Skaliranje nije uspelo. %1 @@ -6841,7 +6841,7 @@ Ova bulova logička operacija uklanja sve delove objekata koji se preklapaju. Scale a selected shape - Scale a selected shape + Skaliraj izabrani oblik diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sr.ts b/src/Mod/Part/Gui/Resources/translations/Part_sr.ts index 81b0f0bb34..77193c66d7 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sr.ts @@ -6759,7 +6759,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. X Factor - X Factor + X коефицијент @@ -6769,37 +6769,37 @@ A 'Compound Filter' can be used to extract the remaining pieces. Z Factor - Z Factor + Z коефицијент Scale the object by a single factor in all directions. - Scale the object by a single factor in all directions. + Скалирај објекат са једним коефицијентом у свим смеровима. Uniform Scaling - Uniform Scaling + Уједначено скалирање Y Factor - Y Factor + Y коефицијент Specify a different scale factor for each cardinal direction. - Specify a different scale factor for each cardinal direction. + Задај другачији коефицијент скалирања за сваки правац. Non-Uniform Scaling - Non-Uniform Scaling + Неуједначено скалирање Select shape(s) that should be scaled - Select shape(s) that should be scaled + Изабери облик(е) који треба да буду скалирани @@ -6807,21 +6807,21 @@ A 'Compound Filter' can be used to extract the remaining pieces. Облик - + No scalable shapes selected - No scalable shapes selected + Нема изабраних облика погодних за скалирање - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 - Creating Scale failed. + Скалирање није успело. %1 @@ -6840,7 +6840,7 @@ A 'Compound Filter' can be used to extract the remaining pieces. Scale a selected shape - Scale a selected shape + Скалирај изабрани облик diff --git a/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts b/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts index 12e1c815e1..742b4b752e 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_sv-SE.ts @@ -5777,7 +5777,7 @@ Vill du fortsätta? All Files - Alla filer + Alla Filer @@ -6811,18 +6811,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Form - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. Dokumentet "%1" finns inte. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_tr.ts b/src/Mod/Part/Gui/Resources/translations/Part_tr.ts index 2a4dca115c..ad0b6502cc 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_tr.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_tr.ts @@ -6790,18 +6790,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Şekil - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_uk.ts b/src/Mod/Part/Gui/Resources/translations/Part_uk.ts index 6d8ba222e4..2b93dce463 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_uk.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_uk.ts @@ -6814,18 +6814,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Форма - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts b/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts index 9b9ee3252f..5f9f5bc4f7 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_val-ES.ts @@ -6803,18 +6803,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. Forma - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts b/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts index 797b9017c0..528dec8d47 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_zh-CN.ts @@ -6801,18 +6801,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. 形状 - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. 文件 '%1' 不存在. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts b/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts index 44732df9fd..3c828ce0c9 100644 --- a/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts +++ b/src/Mod/Part/Gui/Resources/translations/Part_zh-TW.ts @@ -226,7 +226,7 @@ Vertex AttachmentPoint mode caption - Vertex + 頂點 @@ -5772,7 +5772,7 @@ Do you want to continue? Vertex - 頂點 + Vertex @@ -6439,7 +6439,7 @@ It will create a 'Compound Filter' for each shape. Continue - 繼續 + Continue @@ -6764,18 +6764,18 @@ A 'Compound Filter' can be used to extract the remaining pieces. 造型 - + No scalable shapes selected No scalable shapes selected - + The document '%1' doesn't exist. The document '%1' doesn't exist. - - + + Creating Scale failed. %1 Creating Scale failed. diff --git a/src/Mod/Part/JoinFeatures.py b/src/Mod/Part/JoinFeatures.py index 7dbf25ee37..7a70348ece 100644 --- a/src/Mod/Part/JoinFeatures.py +++ b/src/Mod/Part/JoinFeatures.py @@ -142,10 +142,10 @@ class _ViewProviderPartJoinFeature: def unsetEdit(self, vobj, mode): return - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def claimChildren(self): diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts index 39bff485dc..6dcc65217f 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_cs.ts @@ -71,7 +71,7 @@ tj. proti směru hodinových ručiček při pohybu podél osy. If set, the result will be the intersection of the profile and the preexisting body. - Pokud je nastaveno, výsledkem bude průsečík profilu a již existujícího těla. + Pokud je nastaveno, výsledkem bude průsečík profilu a již existujícího tělesa. @@ -83,7 +83,7 @@ aby se zabránilo sebe. Number of gear teeth - Počet zubů ozubeního kola + Počet zubů ozubeného kola @@ -93,37 +93,37 @@ aby se zabránilo sebe. Pressure angle of gear teeth - Pressure angle of gear teeth + Úhel záběru zubů kola True=2 curves with each 3 control points False=1 curve with 4 control points. - True=2 curves with each 3 control points False=1 curve with 4 control points. + Pravda=2 křivky s každými 3 kontrolními body; Nepravda=1 křivka se 4 kontrolními body. True=external Gear False=internal Gear - True=external Gear False=internal Gear + Pravda=vnější ozubení; Nepravda=vnitřní ozubení The height of the tooth from the pitch circle up to its tip, normalized by the module. - The height of the tooth from the pitch circle up to its tip, normalized by the module. + Výška zubu od roztečné kružnice nahoru k jeho špičce, normalizovaná modulem. The height of the tooth from the pitch circle down to its root, normalized by the module. - The height of the tooth from the pitch circle down to its root, normalized by the module. + Výška zubu od roztečné kružnice dolů k jeho kořenu, normalizovaná modulem. The radius of the fillet at the root of the tooth, normalized by the module. - The radius of the fillet at the root of the tooth, normalized by the module. + Poloměr zaoblení u kořene zubu, normalizovaný modulem. The distance by which the reference profile is shifted outwards, normalized by the module. - The distance by which the reference profile is shifted outwards, normalized by the module. + Vzdálenost, o kterou je referenční profil posunut směrem ven, normalizovaná modulem. @@ -141,7 +141,7 @@ aby se zabránilo sebe. Sweep a selected sketch along a helix - Táhnout vybranou skicu podél šroubovice + Táhnout vybraný náčrt podél šroubovice @@ -172,7 +172,7 @@ aby se zabránilo sebe. Additive pipe - Aditivní potrubí + Příčíst potrubí @@ -195,7 +195,7 @@ aby se zabránilo sebe. Create a new body and make it active - Vytvořit nové tělo a aktivovat ho + Vytvoří nové těleso a aktivuje ho @@ -280,7 +280,7 @@ aby se zabránilo sebe. Draft - Ponor + Zkosení @@ -303,7 +303,7 @@ aby se zabránilo sebe. Duplicates the selected object and adds it to the active body - Duplikuje vybraný objekt a přidá jej k aktivnímu tělu + Duplikuje vybraný objekt a přidá jej k aktivnímu tělesu @@ -334,12 +334,12 @@ aby se zabránilo sebe. Groove - Vybrání + Drážka Groove a selected sketch - Vybrání z vybranho náčrtu + Vytvořit drážku pomocí vybraného náčrtu @@ -442,12 +442,12 @@ aby se zabránilo sebe. Move object to other body - Přesunout objekt k jinému tělu + Přesunout objekt k jinému tělesu Moves the selected object to another body - Přesune vybraný objekt k jinému tělu + Přesune vybraný objekt k jinému tělesu @@ -483,7 +483,7 @@ aby se zabránilo sebe. Move the tip of the body - Přesunout vrchol těla + Přesunout špičku tělesa @@ -537,7 +537,7 @@ aby se zabránilo sebe. Pad a selected sketch - Přidat vysunutím vybranou skicou + Vytvořit desku pomocí vybraného náčrtu @@ -609,7 +609,7 @@ aby se zabránilo sebe. Create a polar pattern feature - Vytvořit prvek polárního pole + Vytvořit prvek kruhového pole @@ -622,12 +622,12 @@ aby se zabránilo sebe. Revolution - Přidat rotací + Otáčka Revolve a selected sketch - Vytvoří prvek rotací předvybraného náčrtu + Vytvořit otáčku pomocí vybraného náčrtu @@ -645,7 +645,7 @@ aby se zabránilo sebe. Create a scaled feature - Vytvořit škálovaný prvek + Vytvořit prvek změnou měřítka @@ -677,7 +677,7 @@ aby se zabránilo sebe. Create a sub-object(s) shape binder - Vytvořit tvar dílčího(ch) objektu + Vytvořit pořadač tvarů podobjektu(ů) @@ -695,7 +695,7 @@ aby se zabránilo sebe. Sweep a selected sketch along a helix and remove it from the body - Táhnout vybranou skicu podél šroubovice a odstranit je z těla + Táhnout vybraný náčrt podél šroubovice a odstranit z tělesa @@ -713,7 +713,7 @@ aby se zabránilo sebe. Loft a selected profile through other profile sections and remove it from the body - Profilovat skrz vybrané profilové řezy a odstranit je z těla + Profilovat skrz vybrané profilové řezy a odstranit z tělesa @@ -726,12 +726,12 @@ aby se zabránilo sebe. Subtractive pipe - Odečtové potrubí + Odečíst potrubí Sweep a selected sketch along a path or to other profiles and remove it from the body - Táhnout vybraný náčrt podél trasy nebo podél dalšího profilu a odstranit je z těla + Táhnout vybraný náčrt podél trasy nebo podél dalšího profilu a odstranit z tělesa @@ -749,7 +749,7 @@ aby se zabránilo sebe. Make a thick solid - Vytvořit skořepinu + Vytvořit tloušťku tělesa @@ -763,7 +763,7 @@ aby se zabránilo sebe. Create an additive primitive - Vytvořit přídavné prvky + Přičíst primitivní těleso @@ -817,12 +817,12 @@ aby se zabránilo sebe. Create a subtractive primitive - Vytvořit odečtové těleso + Odečíst primitivní těleso Subtractive Box - Odečítový kvádr + Odečtový kvádr @@ -912,7 +912,7 @@ aby se zabránilo sebe. Add a Body - Přidat tělo + Přidat těleso @@ -985,7 +985,7 @@ aby se zabránilo sebe. Sketch belongs to another Body feature - Náčrt patří k prvku jiného těla + Náčrt patří k prvku jiného tělesa @@ -1026,7 +1026,7 @@ aby se zabránilo sebe. Number of teeth: - počet zubů: + Počet zubů: @@ -1063,22 +1063,22 @@ aby se zabránilo sebe. Addendum Coefficient - Addendum Coefficient + Koeficient výšky ke špičce Dedendum Coefficient - Dedendum Coefficient + Koeficient výšky ke kořenu Root Fillet Coefficient - Root Fillet Coefficient + Koeficient zaoblení kořene Profile Shift Coefficient - Profile Shift Coefficient + Koeficient posunu profilu @@ -1086,7 +1086,7 @@ aby se zabránilo sebe. Active Body Required - Je potřeba aktivní Tělo + Je potřeba aktivní těleso @@ -1293,7 +1293,7 @@ Je-li nulový, rovná se Poloměr2 Coordinate system: - Systém souřadnic: + Souřadnicový systém: @@ -1384,7 +1384,7 @@ Je-li nulový, rovná se Poloměr2 You selected geometries which are not part of the active body. Please define how to handle those selections. If you do not want those references, cancel the command. - Vybrali jste geometrie, které nejsou součástí aktivního těla. Definujte, jak s těmito výběry nakládat. Pokud nechcete tyto odkazy, zrušte příkaz. + Vybrali jste geometrie, které nejsou součástí aktivního tělesa. Definujte, jak s těmito výběry nakládat. Pokud nechcete tyto odkazy, zrušte příkaz. @@ -1415,12 +1415,12 @@ Je-li nulový, rovná se Poloměr2 Add body - Přidat tělo + Přidat těleso Remove body - Odstranit tělo + Odstranit těleso @@ -1512,7 +1512,7 @@ klikněte znovu pro ukončení výběru - select an item to highlight it - double-click on an item to see the chamfers - vyberte položku pro zvýraznění -- dvakrát klikněte na položku pro zobrazení zkosení +- dvakrát klikněte na položku pro zobrazení sražení @@ -1563,7 +1563,7 @@ klikněte znovu pro ukončení výběru Empty chamfer created ! - Empty chamfer created ! + Prázdné sražení vytvořeno! @@ -1572,12 +1572,12 @@ klikněte znovu pro ukončení výběru Empty body list - Prázdný seznam těla + Prázdný seznam těles The body list cannot be empty - Seznam těla nemůže být prázdný + Seznam těles nemůže být prázdný @@ -1659,7 +1659,7 @@ klikněte znovu pro ukončení výběru Empty draft created ! - Empty draft created ! + Prázdné zkosení vytvořeno! @@ -1728,7 +1728,7 @@ klikněte znovu pro ukončení výběru Click on a face in the model - Click on a face in the model + Klikněte na plochu v modelu @@ -1791,7 +1791,7 @@ klikněte znovu pro ukončení výběru Belongs to another body - Patří k jinému tělu + Patří k jinému tělesu @@ -1801,7 +1801,7 @@ klikněte znovu pro ukončení výběru Doesn't belong to any body - Nepatří k žádnému tělu + Nepatří k žádnému tělesu @@ -1854,7 +1854,7 @@ klikněte znovu pro ukončení výběru Empty fillet created ! - Empty fillet created ! + Prázdné zaoblení vytvořeno! @@ -2000,12 +2000,12 @@ klikněte znovu pro ukončení výběru Warning: helix might be self intersecting - Warning: helix might be self intersecting + Varování: šroubovice může protínat sama sebe Error: helix touches itself - Error: helix touches itself + Chyba: šroubovice se dotýká sama sebe @@ -2028,7 +2028,7 @@ klikněte znovu pro ukončení výběru Counterdrill - Counterdrill + Válcové i kuželové zahloubení @@ -2101,7 +2101,7 @@ klikněte znovu pro ukončení výběru Overall Length - Overall Length + Celková délka @@ -2286,17 +2286,17 @@ klikněte znovu pro ukončení výběru Add linear pattern - Přidat lineární vzor + Přidat lineární pole Add polar pattern - Přidat polární vzor + Přidat kruhové pole Add scaled transformation - Přidat měřítko transformace + Přidat transformaci měřítka @@ -2324,7 +2324,7 @@ klikněte znovu pro ukončení výběru Offset from face at which pad will end - Odsazení od plochy, u kterého bude deska ukončena + Odsazení od plochy, u které bude deska ukončena @@ -2667,7 +2667,7 @@ měřena ve stanoveném směru No active body - Žádné aktivní tělo + Žádné aktivní těleso @@ -2723,7 +2723,7 @@ měřena ve stanoveném směru Offset from face at which pocket will end - Odsazení od plochy, u kterého bude kapsa ukončena + Odsazení od plochy, u které bude kapsa ukončena @@ -2791,12 +2791,12 @@ měřena ve stanoveném směru Overall Angle - Overall Angle + Celkový úhel Offset Angle - Offset Angle + Úhel odstupu @@ -2906,7 +2906,7 @@ měřena ve stanoveném směru Revolution parameters - Parametry přidání rotací + Parametry otáčky @@ -3037,7 +3037,7 @@ klikněte znovu pro ukončení výběru Arc - oblouk + Oblouk @@ -3054,7 +3054,7 @@ klikněte znovu pro ukončení výběru Empty thickness created ! - Empty thickness created ! + Prázdná tloušťka vytvořena! @@ -3131,7 +3131,7 @@ klikněte znovu pro ukončení výběru Toggle active body - Přepnout aktivní tělo + Přepnout aktivní těleso @@ -3186,7 +3186,7 @@ klikněte znovu pro ukončení výběru LinearPattern parameters - Parametry lineárního vzoru + Parametry lineárního pole @@ -3194,7 +3194,7 @@ klikněte znovu pro ukončení výběru MultiTransform parameters - MultiTransform parameters + Parametry vícenásobné transformace @@ -3202,7 +3202,7 @@ klikněte znovu pro ukončení výběru PolarPattern parameters - PolarPattern parameters + Parametry kruhového pole @@ -3320,12 +3320,12 @@ klikněte znovu pro ukončení výběru Select body - Vyberte tělo + Vyberte těleso Select a body from the list - Vyberte tělo ze seznamu + Vyberte těleso ze seznamu @@ -3348,12 +3348,12 @@ klikněte znovu pro ukončení výběru The moved feature appears after the currently set tip. - The moved feature appears after the currently set tip. + Přesunutý prvek se zobrazí za aktuálně nastavenou špičkou. Do you want the last feature to be the new tip? - Do you want the last feature to be the new tip? + Přejete si, aby byl poslední prvek novou špičkou? @@ -3378,12 +3378,12 @@ klikněte znovu pro ukončení výběru There is no active body. Please make a body active before inserting a datum entity. - Tělo není aktivní. Prosím aktivujte tělo před výběrem pomocné entity. + Žádné těleso není aktivní. Prosím aktivujte těleso před výběrem pomocné entity. Sub-Shape Binder - Sub-Shape Binder + Pořadač dílčích tvarů @@ -3454,22 +3454,22 @@ klikněte znovu pro ukončení výběru Cannot use this command as there is no solid to subtract from. - Cannot use this command as there is no solid to subtract from. + Tento příkaz nelze použít, protože zde není plné těleso ze kterého by šlo odečíst. Ensure that the body contains a feature before attempting a subtractive command. - Ensure that the body contains a feature before attempting a subtractive command. + Ujistěte se, že těleso obsahuje prvek před pokusem o vykonání příkazu odečtení. Cannot use selected object. Selected object must belong to the active body - Vybraný objekt nelze použít. Vybraný objekt musí patřit k aktivnímu tělu + Vybraný objekt nelze použít. Vybraný objekt musí patřit k aktivnímu tělesu Consider using a ShapeBinder or a BaseFeature to reference external geometry in a body. - Consider using a ShapeBinder or a BaseFeature to reference external geometry in a body. + Zvažte použití pořadače tvarů nebo základního prvku pro referenční vnější geometrii v tělese. @@ -3490,18 +3490,18 @@ klikněte znovu pro ukončení výběru Select an edge, face, or body from a single body. - Vyberte hranu, plochu nebo tělo ze samostatného těla. + Vyberte hranu, plochu nebo těleso ze samostatného tělesa. Selection is not in Active Body - Výběr není v aktivním těle + Výběr není v aktivním tělese Select an edge, face, or body from an active body. - Vyberte hranu, plochu nebo tělo z aktivního těla. + Vyberte hranu, plochu nebo těleso z aktivního tělesa. @@ -3531,7 +3531,7 @@ klikněte znovu pro ukončení výběru Please select only one feature in an active body. - Please select only one feature in an active body. + Vyberte prosím pouze jeden prvek v aktivním tělese. @@ -3549,17 +3549,17 @@ klikněte znovu pro ukončení výběru Bad base feature - Špatná základní prvek + Špatný základní prvek Body can't be based on a PartDesign feature. - Tělo nemůže být založeno na PartDesign prvku. + Těleso nemůže být založeno na prvku tvorby dílu. %1 already belongs to a body, can't use it as base feature for another body. - %1 již náleží k tělu, takže nelze použít jako základní prvek pro jiné tělo. + %1 již náleží k tělesu, takže nelze použít jako základní prvek pro jiné těleso. @@ -3602,12 +3602,12 @@ To může vést k neočekávaným výsledkům. Body may be based on no more than one feature. - Tělo nemůže být založeno na více než jednom prvku. + Těleso nemůže být založeno na více než jednom prvku. Body - Tělo + Těleso @@ -3617,7 +3617,7 @@ To může vést k neočekávaným výsledkům. No PartDesign features found that don't belong to a body. Nothing to migrate. - No PartDesign features found that don't belong to a body. Nothing to migrate. + Nebyly nalezeny PartDesign prvky, které by nepatřili k tělesu. Není nic k migraci. @@ -3641,17 +3641,17 @@ To může vést k neočekávaným výsledkům. Select exactly one PartDesign feature or a body. - Vyberte právě jeden PartDesign prvek nebo tělo. + Vyberte právě jeden PartDesign prvek nebo těleso. Couldn't determine a body for the selected feature '%s'. - Nelze určit tělo pro vybraný prvek '%s'. + Nelze určit těleso pro vybraný prvek '%s'. Only a solid feature can be the tip of a body. - Jen prvek tělesa může být vrcholem těla. + Jen pevný prvek může být vrcholem tělesa. @@ -3663,12 +3663,12 @@ To může vést k neočekávaným výsledkům. Some of the selected features have dependencies in the source body - Některé z vybraných prvků mají závislosti ve zdrojovém těle + Některé z vybraných prvků mají závislosti ve zdrojovém tělese Only features of a single source Body can be moved - Přesunuty mohou být pouze prvky ze jednoho výchozího těla + Přesunuty mohou být pouze prvky z jednoho výchozího tělesa @@ -3678,17 +3678,17 @@ To může vést k neočekávaným výsledkům. Impossible to move the base feature of a body. - Nelze přesunout základní prvek těla. + Nelze přesunout základní prvek tělesa. Select one or more features from the same body. - Vyberte jeden nebo více prvků ze stejného těla. + Vyberte jeden nebo více prvků ze stejného tělesa. Beginning of the body - Začátek těla + Začátek tělesa @@ -3700,7 +3700,7 @@ To může vést k neočekávaným výsledkům. Early feature must not depend on later feature. - Early feature must not depend on later feature. + Časný prvek nesmí záviset na pozdějším prvku. @@ -3741,29 +3741,29 @@ To může vést k neočekávaným výsledkům. In order to use PartDesign you need an active Body object in the document. Please make one active (double click) or create one. If you have a legacy document with PartDesign objects without Body, use the migrate function in PartDesign to put them into a Body. - Pro použití PartDesignu je potřený v dokumentu aktivní objekt Tělo. Aktivujte prosím jeden (dvojklikem) nebo ho vytvořte. + Pro použití PartDesignu je potřeba mít v dokumentu aktivní objekt tělesa. Aktivujte prosím jeden (dvojklikem) nebo ho vytvořte. -Pokud máte starší dokument s objekty PartDesignu bez Těla, použijte funkci pro migraci, která je umístí do Těla. +Pokud máte starší dokument s objekty PartDesignu bez tělesa, použijte funkci pro migraci, která je umístí do tělesa. Active Body Required - Je potřeba aktivní Tělo + Je potřeba aktivní těleso To create a new PartDesign object, there must be an active Body object in the document. Please make one active (double click) or create a new Body. - Pro vytvoření nového PartDesign objektu musí být v dokumentu aktivní objekt Tělo. Aktivujte prosím jeden (dvojklikem) nebo vytvořte nové Tělo. + Pro vytvoření nového PartDesign objektu musí být v dokumentu aktivní objekt tělesa. Aktivujte prosím jeden (dvojklikem) nebo vytvořte nové těleso. Feature is not in a body - Prvek není tělo + Prvek není v tělesu In order to use this feature it needs to belong to a body object in the document. - Pro použití tohoto prvku je potřebné, aby patřil k objektu těla v dokumentu. + Pro použití tohoto prvku je potřeba, aby patřil k objektu tělesa v dokumentu. @@ -3836,7 +3836,7 @@ Tento prvek je rozbitý a nelze upravovat. Edit groove - Upravit vybrání + Upravit drážku @@ -3871,7 +3871,7 @@ Tento prvek je rozbitý a nelze upravovat. Edit revolution - Upravit rotaci + Upravit otáčku @@ -3928,9 +3928,9 @@ Tento prvek je rozbitý a nelze upravovat. Note: If you choose to migrate you won't be able to edit the file with an older FreeCAD version. If you refuse to migrate you won't be able to use new PartDesign features like Bodies and Parts. As a result you also won't be able to use your parts in the assembly workbench. Although you will be able to migrate any moment later with 'Part Design -> Migrate'. - Note: If you choose to migrate you won't be able to edit the file with an older FreeCAD version. -If you refuse to migrate you won't be able to use new PartDesign features like Bodies and Parts. As a result you also won't be able to use your parts in the assembly workbench. -Although you will be able to migrate any moment later with 'Part Design -> Migrate'. + Poznámka: Rozhodnete-li se migrovat, nebude možné upravit soubor ve starších verzích FreeCADu. +Pokud migraci odmítnete, tak nebude možné použít nové prvky Tvorby dílu jako jsou tělesa a díly. Tím nebude možné použít díly ani v pracovním prostředí sestav. +Přesto můžete provést migraci kdykoliv později pomocí 'Tvorba dílu -> Migrace'. @@ -3945,27 +3945,27 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi Edit chamfer - Edit chamfer + Upravit sražení Edit draft - Edit draft + Upravit zkosení Edit fillet - Edit fillet + Upravit zaoblení Edit linear pattern - Edit linear pattern + Upravit lineární pole Edit mirrored - Edit mirrored + Upravit zrcadlení @@ -3975,12 +3975,12 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi Edit polar pattern - Edit polar pattern + Upravit kruhové pole Edit scaled - Edit scaled + Upravit měřítko @@ -3998,7 +3998,7 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi Number of teeth: - počet zubů: + Počet zubů: @@ -4123,37 +4123,37 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi Motorcycle 420 - Motorcycle 420 + Motocykl 420 Motorcycle 425 - Motorcycle 425 + Motocykl 425 Motorcycle 428 - Motorcycle 428 + Motocykl 428 Motorcycle 520 - Motorcycle 520 + Motocykl 520 Motorcycle 525 - Motorcycle 525 + Motocykl 525 Motorcycle 530 - Motorcycle 530 + Motocykl 530 Motorcycle 630 - Motorcycle 630 + Motocykl 630 @@ -4163,7 +4163,7 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi 0 in - 0 in + 0 v @@ -4181,7 +4181,7 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi Position - Position + Poloha @@ -4341,8 +4341,8 @@ Although you will be able to migrate any moment later with 'Part Design -> Mi Live update of changes to the thread Note that the calculation can take some time - Live update of changes to the thread -Note that the calculation can take some time + Živá aktualizace změn závitu +Vezměte na vědomí, že výpočet může nějakou dobu trvat @@ -4352,7 +4352,7 @@ Note that the calculation can take some time Customize thread clearance - Customize thread clearance + Přizpůsobit volnost závitu @@ -4363,12 +4363,12 @@ Note that the calculation can take some time Clearance - Uvolnění + Volnost Custom Thread clearance value - Custom Thread clearance value + Hodnota volnosti vlastního závitu @@ -4394,8 +4394,8 @@ Note that the calculation can take some time Hole clearance Only available for holes without thread - Hole clearance -Only available for holes without thread + Volnost díry +K dispozici pouze pro díry bez závitu @@ -4408,13 +4408,13 @@ Only available for holes without thread Close - Zavřít + Uzavřená Wide - Šířka + Široká @@ -4424,7 +4424,7 @@ Only available for holes without thread Tolerance class for threaded holes according to hole profile - Tolerance class for threaded holes according to hole profile + Toleranční třída děr se závitem podle profilu díry @@ -4488,7 +4488,7 @@ Only available for holes without thread Check to override the values predefined by the 'Type' - Check to override the values predefined by the 'Type' + Zaškrtněte pro přepsání hodnot předdefinovaných v 'Typu' @@ -4499,8 +4499,8 @@ Only available for holes without thread For countersinks this is the depth of the screw's top below the surface - For countersinks this is the depth of -the screw's top below the surface + Pro kuželová zahloubení se jedná o hloubku +vršku šroubu pod povrchem @@ -4526,8 +4526,8 @@ the screw's top below the surface The size of the drill point will be taken into account for the depth of blind holes - The size of the drill point will be taken into -account for the depth of blind holes + Velikost bodu zahloubení bude zohledněna +pro hloubku slepých otvorů @@ -4542,7 +4542,7 @@ account for the depth of blind holes Tapered - Kuželový + Zkosení @@ -4550,15 +4550,15 @@ account for the depth of blind holes 90 degree: straight hole under 90: smaller hole radius at the bottom over 90: larger hole radius at the bottom - Taper angle for the hole -90 degree: straight hole -under 90: smaller hole radius at the bottom -over 90: larger hole radius at the bottom + Úhel zkosení díry +90 stupňů: přímá díra +pod 90: menší poloměr díry ve spodní části +nad 90: větší poloměr díry ve spodní části Reverses the hole direction - Reverses the hole direction + Obrátit směr zkosení @@ -4568,12 +4568,12 @@ over 90: larger hole radius at the bottom Normal - Normála + Normální Loose - Loose + Rozšířená @@ -4649,7 +4649,7 @@ over 90: larger hole radius at the bottom Toggle 3D - Přepnout 3D + Přepnout přímé @@ -4672,7 +4672,7 @@ over 90: larger hole radius at the bottom Creates or edit the involute gear definition. - Creates or edit the involute gear definition. + Vytvoří nebo upraví definici evolventního ozubeného kola. @@ -4733,27 +4733,27 @@ over 90: larger hole radius at the bottom Shaft wizard - Shaft wizard + Průvodce hřídele Section 1 - Section 1 + Sekce 1 Section 2 - Section 2 + Sekce 2 Add column - Add column + Přidat sloupec Section %s - Section %s + Sekce %s @@ -4766,12 +4766,12 @@ over 90: larger hole radius at the bottom Missing module - Missing module + Chybějící modul You may have to install the Plot add-on - You may have to install the Plot add-on + Možná budete muset nainstalovat doplněk Plot @@ -4784,7 +4784,7 @@ over 90: larger hole radius at the bottom Start the shaft design wizard - Spustit průvodce konstrukce hřídele + Spustit průvodce konstrukcí hřídele @@ -4797,7 +4797,7 @@ over 90: larger hole radius at the bottom Start the shaft design wizard - Spustit průvodce konstrukce hřídele + Spustit průvodce konstrukcí hřídele @@ -4805,63 +4805,63 @@ over 90: larger hole radius at the bottom Linked object is not a PartDesign feature - Linked object is not a PartDesign feature + Propojený objekt není prvkem Tvorby dílu Tip shape is empty - Tip shape is empty + Tvar špičky je prázdný BaseFeature link is not set - BaseFeature link is not set + Odkaz na základní prvek není nastaven BaseFeature must be a Part::Feature - BaseFeature must be a Part::Feature + Základní prvek musí být prvek dílu BaseFeature has an empty shape - BaseFeature has an empty shape + Základní prvek má prázdný tvar Cannot do boolean cut without BaseFeature - Cannot do boolean cut without BaseFeature + Booleovský řez nelze provést bez základního prvku Cannot do boolean with anything but Part::Feature and its derivatives - Cannot do boolean with anything but Part::Feature and its derivatives + Boolean nelze provést s ničím jiným než prvkem dílu a její derivací Cannot do boolean operation with invalid base shape - Cannot do boolean operation with invalid base shape + Booleovskou operaci nelze provést s neplatným základním tvarem Cannot do boolean on feature which is not in a body - Cannot do boolean on feature which is not in a body + Boolean nelze provést na prvku, který není v tělesu Base shape is null - Base shape is null + Základní tvar je null Tool shape is null - Tool shape is null + Nástroj tvaru je null Fusion of tools failed - Fusion of tools failed + Sloučení nástrojů se nezdařilo @@ -4876,17 +4876,17 @@ over 90: larger hole radius at the bottom Resulting shape is not a solid - Resulting shape is not a solid + Výsledný tvar není plné těleso Cut out failed - Cut out failed + Výřez se nezdařil Common operation failed - Common operation failed + Operace průniku selhala @@ -4906,65 +4906,65 @@ over 90: larger hole radius at the bottom Result has multiple solids: that is not currently supported. - Result has multiple solids: that is not currently supported. + Výsledek se skládá z více těles: to není v současné době podporováno. Failed to create chamfer - Failed to create chamfer + Nepodařilo se vytvořit sražení Resulting shape is null - Resulting shape is null + Výsledný tvar je null Resulting shape is invalid - Resulting shape is invalid + Výsledný tvar je neplatný Size must be greater than zero - Size must be greater than zero + Velikost musí být větší než nula Size2 must be greater than zero - Size2 must be greater than zero + Velikost2 musí být větší než nula Angle must be greater than 0 and less than 180 - Angle must be greater than 0 and less than 180 + Úhel musí být větší než 0 a menší než 180 Failed to create draft - Failed to create draft + Nepodařilo se vytvořit zkosení Fillet radius must be greater than zero - Fillet radius must be greater than zero + Poloměr zaoblení musí být větší než nula Failed to create fillet - Failed to create fillet + Nepodařilo se vytvořit zaoblení Angle of groove too large - Angle of groove too large + Úhel drážky příliš velký Angle of groove too small - Angle of groove too small + Úhel drážky příliš malý @@ -4974,68 +4974,68 @@ over 90: larger hole radius at the bottom material to be removed; - the selected sketch does not belong to the active Body. Nelze vytvořit požadovaný prvek. Důvodem může být: - - aktivní Tělo neobsahuje základní tvar, takže zde - není materiál k odstranění; - - vybraný náčrt nepatří k aktivnímu Tělu. + - aktivní těleso neobsahuje základní tvar, takže zde + není materiál k odstranění; + - vybraný náčrt nepatří k aktivnímu tělesu. Creating a face from sketch failed - Creating a face from sketch failed + Vytvoření plochy z náčrtu selhalo Revolve axis intersects the sketch - Revolve axis intersects the sketch + Osa otáčení protíná náčrt Cut out of base feature failed - Cut out of base feature failed + Výřez zakladního prvku selhal Could not revolve the sketch! - Could not revolve the sketch! + Nelze otočit náčrt! Could not create face from sketch. Intersecting sketch entities in a sketch are not allowed. - Could not create face from sketch. -Intersecting sketch entities in a sketch are not allowed. + Nelze vytvořit plochu z náčrtu. +Protínání entit náčrtu v náčrtu není povoleno. Error: Pitch too small - Error: Pitch too small + Chyba: Příliš malá rozteč Error: height too small! - Error: height too small! + Chyba: příliš malá výška! Error: pitch too small! - Error: pitch too small! + Chyba: příliš malá rozteč! Error: turns too small! - Error: turns too small! + Chyba: příliš málo otáček! Error: either height or growth must not be zero! - Error: either height or growth must not be zero! + Chyba: ani výška ani růst nesmí být nulový! @@ -5045,17 +5045,17 @@ Intersecting sketch entities in a sketch are not allowed. Error: No valid sketch or face - Error: No valid sketch or face + Chyba: Žádný platný náčrt nebo plocha Error: Face must be planar - Error: Face must be planar + Chyba: Plocha musí být rovinná Error: Could not build - Error: Could not build + Chyba: Nelze vytvořit @@ -5063,99 +5063,99 @@ Intersecting sketch entities in a sketch are not allowed. Error: Result is not a solid - Error: Result is not a solid + Chyba: Výsledek není plné těleso Error: There is nothing to subtract - Error: There is nothing to subtract + Chyba: Není co odečíst Error: Result has multiple solids - Error: Result has multiple solids + Chyba: Výsledek se skládá z více těles Error: Adding the helix failed - Error: Adding the helix failed + Chyba: Přidání šroubovice selhalo Error: Intersecting the helix failed - Error: Intersecting the helix failed + Chyba: Protínání šroubovice selhalo Error: Subtracting the helix failed - Error: Subtracting the helix failed + Šroubovice: Odečtení šroubovice selhalo Error: Could not create face from sketch - Error: Could not create face from sketch + Chyba: Nelze vytvořit plochu z náčrtu Hole error: Creating a face from sketch failed - Hole error: Creating a face from sketch failed + Chyba díry: Vytvoření plochy z náčrtu selhalo Hole error: Unsupported length specification - Hole error: Unsupported length specification + Chyba díry: Specifikována nepodporovaná délka Hole error: Invalid hole depth - Hole error: Invalid hole depth + Chyba díry: Neplatná hloubka díry Hole error: Invalid taper angle - Hole error: Invalid taper angle + Chyba díry: Neplatný úhel zkosení Hole error: Hole cut diameter too small - Hole error: Hole cut diameter too small + Chyba díry: průměr řezu díry je příliš malý Hole error: Hole cut depth must be less than hole depth - Hole error: Hole cut depth must be less than hole depth + Chyba díry: Hloubka řezu díry musí být menší než hloubka otvoru Hole error: Hole cut depth must be greater or equal to zero - Hole error: Hole cut depth must be greater or equal to zero + Chyba díry: Hloubka řezu díry musí být větší nebo rovna nule Hole error: Invalid countersink - Hole error: Invalid countersink + Chyba díry: Neplatné kuželové zahloubení Hole error: Invalid drill point angle - Hole error: Invalid drill point angle + Chyba díry: Neplatný úhel bodu zahloubení Hole error: Invalid drill point - Hole error: Invalid drill point + Chyba díry: Neplatný bod zahloubení Hole error: Could not revolve sketch - Hole error: Could not revolve sketch + Chyba díry: Nelze otočit náčrt Hole error: Resulting shape is empty - Hole error: Resulting shape is empty + Chyba díry: Výsledný tvar je prázdný @@ -5174,8 +5174,8 @@ Intersecting sketch entities in a sketch are not allowed. Could not create face from sketch. Intersecting sketch entities or multiple faces in a sketch are not allowed for making a pocket up to a face. - Could not create face from sketch. -Intersecting sketch entities or multiple faces in a sketch are not allowed for making a pocket up to a face. + Nelze vytvořit plochu z náčrtu. +Protínání entit náčrtu nebo několika ploch v náčrtu není povoleno pro vytvoření kapsy k ploše. @@ -5195,97 +5195,97 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed for m Loft: At least one section is needed - Loft: At least one section is needed + Profilování: Nejméně jedna sekce je potřeba Loft: Could not obtain profile shape - Loft: Could not obtain profile shape + Profilování: Nelze získat tvar profilu Loft: When using points for profile/sections, the sketch should have a single point - Loft: When using points for profile/sections, the sketch should have a single point + Profilování: Pokud používáte body pro profil/sekce, náčrt by měl mít jeden bod Loft: All sections need to be part features - Loft: All sections need to be part features + Profilování: Všechny sekce musí být prvky dílu Loft: Could not obtain section shape - Loft: Could not obtain section shape + Profilování: Nelze získat tvar sekce Loft: A section doesn't contain any wires nor is a single vertex - Loft: A section doesn't contain any wires nor is a single vertex + Profilování: Sekce neobsahuje žádné dráty ani jeden vrchol Loft: Only the profile and the last section can be vertices - Loft: Only the profile and the last section can be vertices + Profilování: Pouze profil a poslední sekce mohou být vrcholy Loft: For closed lofts only the profile can be a vertex - Loft: For closed lofts only the profile can be a vertex + Profilování: Pro uzavření profilování může být pouze profil vrcholem Loft: all loft sections need to have the same amount of inner wires - Loft: all loft sections need to have the same amount of inner wires + Profilování: všechny sekce profilování musí mít stejné množství vnitřních drátů Loft could not be built - Loft could not be built + Profilování nelze postavit Loft: Result is not a solid - Loft: Result is not a solid + Profilování: Výsledek není plné těleso Loft: There is nothing to subtract from - Loft: There is nothing to subtract from + Profilování: Není co odečíst Loft: Adding the loft failed - Loft: Adding the loft failed + Profilování: Přidání profilování selhalo Loft: Subtracting the loft failed - Loft: Subtracting the loft failed + Profilování: Odečtení profilování selhalo Loft: A fatal error occurred when making the loft - Loft: A fatal error occurred when making the loft + Profilování: Při zpracování profilování došlo k fatální chybě Pad: Creation failed because direction is orthogonal to sketch's normal vector - Pad: Creation failed because direction is orthogonal to sketch's normal vector + Deska: Vytvoření selhalo, protože směr je kolmý k normálovému vektoru náčrtu Pad: Creating a face from sketch failed - Pad: Creating a face from sketch failed + Deska: Vytvoření plochy z náčrtu selhalo Pad: Resulting shape is empty - Pad: Resulting shape is empty + Deska: Výsledný tvar je prázdný Pad: Fusion with base feature failed - Pad: Fusion with base feature failed + Deska: Sjednocení se základním prvkem selhalo @@ -5297,7 +5297,7 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed. Pipe: Could not obtain profile shape - Pipe: Could not obtain profile shape + Potrubí: Nelze získat tvar profilu @@ -5312,27 +5312,27 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed. Pipe: Only one isolated point is needed if using a sketch with isolated points for section - Pipe: Only one isolated point is needed if using a sketch with isolated points for section + Potrubí: Pro sekci je zapotřebí pouze jednoho izolovaného bodu při použití náčrtu s izolovanými body Pipe: At least one section is needed when using a single point for profile - Pipe: At least one section is needed when using a single point for profile + Potrubí: Při použití jednoho bodu pro profil je potřeba alespoň jedna sekce Pipe: All sections need to be part features - Pipe: All sections need to be part features + Potrubí: Všechny sekce musí být prvky dílu Pipe: Could not obtain section shape - Pipe: Could not obtain section shape + Potrubí: Nelze získat tvar sekce Pipe: Only the profile and last section can be vertices - Pipe: Only the profile and last section can be vertices + Potrubí: Pouze profil a poslední sekce mohou být vrcholy @@ -5347,7 +5347,7 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed. Pipe could not be built - Pipe could not be built + Potrubí nelze postavit @@ -5357,22 +5357,22 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed. Pipe: There is nothing to subtract from - Pipe: There is nothing to subtract from + Potrubí: Není co odečíst Adding the pipe failed - Adding the pipe failed + Přidání potrubí selhalo Subtracting the pipe failed - Subtracting the pipe failed + Odečtení potrubí selhalo A fatal error occurred when making the pipe - A fatal error occurred when making the pipe + Potrubí: Při zpracování potrubí došlo k fatální chybě @@ -5402,47 +5402,47 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed. Pocket: Creation failed because direction is orthogonal to sketch's normal vector - Pocket: Creation failed because direction is orthogonal to sketch's normal vector + Kapsa: Vytvoření selhalo, protože směr je kolmý k normálovému vektoru náčrtu Pocket: Creating a face from sketch failed - Pocket: Creating a face from sketch failed + Kapsa: Vytvoření plochy z náčrtu selhalo Pocket: Extruding up to a face is only possible if the sketch is located on a face - Pocket: Extruding up to a face is only possible if the sketch is located on a face + Kapsa: vysunutí k ploše je možné pouze tehdy, je-li náčrt umístěn na ploše Pocket: Up to face: Could not get SubShape! - Pocket: Up to face: Could not get SubShape! + Kapsa: K ploše: Nelze získat dílčí tvar! Pocket: Resulting shape is empty - Pocket: Resulting shape is empty + Kapsa: Výsledný tvar je prázdný Pocket: Cut out of base feature failed - Pocket: Cut out of base feature failed + Kapsa: Výřez zakladního prvku selhal Cannot subtract primitive feature without base feature - Cannot subtract primitive feature without base feature + Nelze odečíst primitivní prvek bez základního prvku Adding the primitive failed - Adding the primitive failed + Přidání primitivného tělesa selhalo Subtracting the primitive failed - Subtracting the primitive failed + Odečtení primitivního tělesa selhalo @@ -5550,17 +5550,17 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed. Angle of revolution too large - Angle of revolution too large + Úhel otáčky příliš velký Angle of revolution too small - Angle of revolution too small + Úhel otáčky příliš malý Fusion with base feature failed - Fusion with base feature failed + Sjednocení se základním prvkem selhalo @@ -5585,12 +5585,12 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed. Shape of additive/subtractive feature is empty - Shape of additive/subtractive feature is empty + Tvar přídavného/odečtového prvku je prázdný Only additive and subtractive features can be transformed - Only additive and subtractive features can be transformed + Lze transformovat pouze přídavné a odečtové prvky diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts index cd1b5632ab..7774a62bfb 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_de.ts @@ -1235,12 +1235,12 @@ Wenn Null, ist er gleich Radius2 Radius in local xy-plane - Radius in lokaler XY-Ebene + Radius auf lokaler XY-Ebene Radius in local xz-plane - Radius in lokaler XZ-Ebene + Radius auf lokaler XZ-Ebene @@ -2780,7 +2780,7 @@ entlang der angegebenen Richtung gemessen Reverse direction - Umgekehrte Richtung + Richtung umkehren @@ -3112,17 +3112,17 @@ Nochmaliges Klicken beendet den Auswahl-Modus. Base XY plane - Basis XY-Ebene + XY-Basis-Ebene Base YZ plane - Basis YZ-Ebene + YZ-Basis-Ebene Base XZ plane - Basis XZ-Ebene + XZ-Basis-Ebene diff --git a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts index 9cebb2c402..60f8bb7c04 100644 --- a/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts +++ b/src/Mod/PartDesign/Gui/Resources/translations/PartDesign_zh-TW.ts @@ -93,7 +93,7 @@ so that self intersection is avoided. Pressure angle of gear teeth - 輪齒壓力角度 + 輪齒壓力角 @@ -3835,7 +3835,7 @@ This feature is broken and can't be edited. Edit loft - 編輯拉伸體 + 編輯拉伸成形 @@ -5242,7 +5242,7 @@ Intersecting sketch entities or multiple faces in a sketch are not allowed for m Loft: Adding the loft failed - Loft: Adding the loft failed + 拉伸成形:添加拉伸成形失敗 diff --git a/src/Mod/PartDesign/InvoluteGearFeature.py b/src/Mod/PartDesign/InvoluteGearFeature.py index 2f25221e3a..bd91d495b9 100644 --- a/src/Mod/PartDesign/InvoluteGearFeature.py +++ b/src/Mod/PartDesign/InvoluteGearFeature.py @@ -163,10 +163,10 @@ class _ViewProviderInvoluteGear: FreeCADGui.Control.closeDialog() return - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/PartDesign/SprocketFeature.py b/src/Mod/PartDesign/SprocketFeature.py index ebbeb5abf0..d473a03305 100644 --- a/src/Mod/PartDesign/SprocketFeature.py +++ b/src/Mod/PartDesign/SprocketFeature.py @@ -172,10 +172,10 @@ class ViewProviderSprocket: FreeCADGui.Control.closeDialog() return - def __getstate__(self): + def dumps(self): return None - def __setstate__(self,state): + def loads(self,state): return None diff --git a/src/Mod/Path/Gui/Resources/translations/Path.ts b/src/Mod/Path/Gui/Resources/translations/Path.ts index 1c3dfe31f0..1c8b182cf9 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path.ts @@ -6451,232 +6451,353 @@ For example: Path_Sanity - - + + Check the path job for common errors - + + Setup Report for FreeCAD Job + + + + + Table of Contents + + + + + Part Information + + + + + Run Summary + + + + + Rough Stock + + + + + Tool Data + + + + + Output + + + + + Fixtures + + + + + Squawks + + + + + Base Object(s) - + + Job Sequence - + + Job Description - + + Job Type - + + CAD File Name - + + Last Save Date - + + Customer - + + Designer - - + + + + Operation - + + Minimum Z Height - + + Maximum Z Height - + + Cycle Time - + + Coolant - + + TOTAL JOB - + + Tool Number - + + Description - + + Manufacturer - + + Part Number - + + URL - + + Inspection Notes - + + Tool Controller - + + Feed Rate - + + Spindle Speed - + + Tool Shape - + + Tool Diameter - + + X Size - + + Y Size - + + Z Size - + + Material - + + Work Offsets - + + Order By - + + Part Datum - + + G-code File - + + Last Post Process Date - + + Stops - + + Programmer - + + Machine - + + Postprocessor - + + Post Processor Flags - + + File Size (kB) - + + Line Count - + + Note - + + Operator - + + Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + + Tool number {} used by multiple tools + + + + + Tool Controller '{}' has no spindlespeed + + + + + Tool Controller '{}' is not used + + + + + Consider Specifying the Stock Material + + + + + The Job has not been post-processed + + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_be.ts b/src/Mod/Path/Gui/Resources/translations/Path_be.ts index 9f1c20f24c..71a6957da1 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_be.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_be.ts @@ -6628,232 +6628,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Праверыць заданне траекторыі на наяўнасць распаўсюджаных памылак - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Вывад + + + + Fixtures + Арматура + + + + Squawks + Squawks + + + + Base Object(s) Асноўныя аб'екты - + + Job Sequence Паслядоўнасць выканання заданняў - + + Job Description Апісанне задання - + + Job Type Тып задання - + + CAD File Name Імя файла CAD - + + Last Save Date Дата апошняга захавання - + + Customer Кліент - + + Designer Афарміцель - - + + + + Operation Аперацыя - + + Minimum Z Height Найменшая вышыня па восі Z - + + Maximum Z Height Найбольшая вышыня па восі Z - + + Cycle Time Час цыклу - + + Coolant Астуджальная вадкасць - + + TOTAL JOB Усяго заданняў - + + Tool Number Нумар інструмента - + + Description Апісанне - + + Manufacturer Вытворца - + + Part Number Артыкул дэталі - + + URL URL-адрас - + + Inspection Notes Заўвагі да праверкі - + + Tool Controller Кантролер інструментаў - + + Feed Rate Хуткасць падачы - + + Spindle Speed Хуткасць шпіндаля - + + Tool Shape Фігура інструменту - + + Tool Diameter Дыяметр інструменту - + + X Size Памер па восі X - + + Y Size Памер па восі Y - + + Z Size Памер па восі Z - + + Material Матэрыял - + + Work Offsets Працоўныя зрушэнні - + + Order By Парадкаваць па - + + Part Datum Апорныя каардынаты дэталі - + + G-code File Файл G-кода - + + Last Post Process Date Дата апошняй апрацоўкі - + + Stops Спыненні - + + Programmer Праграміст - + + Machine Станок - + + Postprocessor Пасляапрацоўка - + + Post Processor Flags Флагі пасляапрацоўкі - + + File Size (kB) Памер файла (Кб) - + + Line Count Колькасць ліній - + + Note Заўвага - + + Operator Аператар - + + Date Дата + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ca.ts b/src/Mod/Path/Gui/Resources/translations/Path_ca.ts index cd5b36ca79..0e6a453599 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ca.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ca.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Sortida + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operació - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Refrigerant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Descripció - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Controlador d'eina - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Material - + + Work Offsets Work Offsets - + + Order By Ordena per - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programador - + + Machine Màquina - + + Postprocessor Postprocessador - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Nota - + + Operator Operador - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_cs.ts b/src/Mod/Path/Gui/Resources/translations/Path_cs.ts index 905b97b998..5f2ba6434a 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_cs.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_cs.ts @@ -568,7 +568,7 @@ For stock from the Base object's bounding box it means the extra material in all Select the body to be used to constrain the underlying Path. - Vyberte tělo, které se použije k omezení základní cesty. + Vyberte těleso, které se použije k omezení základní cesty. @@ -1541,7 +1541,7 @@ The latter can be used to face of the entire stock area to ensure uniform height Specify if the profile should be performed inside or outside the base geometry features. This only matters if Use Compensation is checked (the default) - Specify if the profile should be performed inside or outside the base geometry features. This only matters if Use Compensation is checked (the default) + Určete, zda by se měl profil provádět uvnitř nebo vně základních geometrických prvků. Záleží pouze na tom, pokud je kontrolováno použití kompenzace (výchozí) @@ -1977,7 +1977,7 @@ Výchozí: OpToolDiameter Clearance - Uvolnění + Volnost @@ -2608,7 +2608,7 @@ If left empty no template will be preselected. Position - Position + Poloha @@ -2669,7 +2669,7 @@ Should multiple tools or tool shapes with the same name exist in different direc The default color for new shapes - Přednastavená barva pro nové tvary + Výchozí barva pro nové tvary @@ -2689,7 +2689,7 @@ Should multiple tools or tool shapes with the same name exist in different direc The default line thickness for new shapes - Přednastavená tloušťka čáry pro nové tvary + Výchozí tloušťka čáry pro nové tvary @@ -2709,7 +2709,7 @@ Should multiple tools or tool shapes with the same name exist in different direc The default line color for new shapes - Přednastavená barva čáry pro nové tvary + Výchozí barva čáry pro nové tvary @@ -2944,7 +2944,7 @@ Should multiple tools or tool shapes with the same name exist in different direc Arc - oblouk + Oblouk @@ -4098,7 +4098,7 @@ Výchozí: OpToolDiameter Clearance - Uvolnění + Volnost @@ -5421,7 +5421,7 @@ For example: Choose how to process multiple Base Geometry features. - Zvolte způsob zpracování více prvků základní geometrie. + Zvolte způsob zpracování více základních geometrických prvků. @@ -5798,7 +5798,7 @@ For example: Set thread orientation - Set thread orientation + Nastavit orientaci závitu @@ -5991,7 +5991,7 @@ For example: The parametrized body representing the tool bit - The parametrized body representing the tool bit + Parametrizované těleso reprezentující bit nástroj @@ -6581,232 +6581,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Zkontrolujte, zda úloha cesty neobsahuje běžné chyby - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Výstup + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Základní objekty - + + Job Sequence Job Sequence - + + Job Description Popis úlohy - + + Job Type Typ úlohy - + + CAD File Name Název CAD souboru - + + Last Save Date Datum posledního uložení - + + Customer Zákazník - + + Designer Konstruktér - - + + + + Operation Operace - + + Minimum Z Height Minimální výška Z - + + Maximum Z Height Maximální výška Z - + + Cycle Time Čas cyklu - + + Coolant Chladivo - + + TOTAL JOB CELKEM ÚLOH - + + Tool Number Číslo nástroje - + + Description Popis - + + Manufacturer Výrobce - + + Part Number Číslo dílu - + + URL URL - + + Inspection Notes Poznámky k inspekci - + + Tool Controller Ovladač nástrojů - + + Feed Rate Posuv - + + Spindle Speed Otáčky - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Materiál - + + Work Offsets Work Offsets - + + Order By Seřadit podle - + + Part Datum Part Datum - + + G-code File Soubor G-kódu - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programátor - + + Machine Stroj - + + Postprocessor Postprocesor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Velikost souboru (kB) - + + Line Count Line Count - + + Note Poznámka - + + Operator Operátor - + + Date Datum + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator @@ -7274,7 +7396,7 @@ For example: Only a vertex selected. Add another feature to the Base Geometry. - Only a vertex selected. Add another feature to the Base Geometry. + Vybrán pouze vrchol. Přidejte k základní geometrii další prvek. diff --git a/src/Mod/Path/Gui/Resources/translations/Path_de.ts b/src/Mod/Path/Gui/Resources/translations/Path_de.ts index 544c84052f..37afb5a694 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_de.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_de.ts @@ -6584,232 +6584,354 @@ Zum Beispiel: Path_Sanity - - + + Check the path job for common errors Path-Auftrag auf typische Fehler überprüfen - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Ausgabe + + + + Fixtures + Armaturen + + + + Squawks + Squawks + + + + Base Object(s) Basisobjekt(e) - + + Job Sequence Auftragsablauf - + + Job Description Auftragsbeschreibung - + + Job Type Auftragsart - + + CAD File Name CAD-Dateiname - + + Last Save Date Letztes Speicherdatum - + + Customer Kunde - + + Designer Konstrukteur - - + + + + Operation Operation - + + Minimum Z Height Minimale Z-Höhe - + + Maximum Z Height Maximale Z-Höhe - + + Cycle Time Durchlaufzeit - + + Coolant Kühlmittel - + + TOTAL JOB Gesamter Auftrag - + + Tool Number Werkzeugnummer - + + Description Beschreibung - + + Manufacturer Hersteller - + + Part Number Bauteilnummer - + + URL URL - + + Inspection Notes Anmerkungen zur Inspektion - + + Tool Controller Werkzeugsteuerung - + + Feed Rate Vorschubgeschwindigkeit - + + Spindle Speed Spindeldrehzahl - + + Tool Shape Werkzeugform - + + Tool Diameter Werkzeugdurchmesser - + + X Size X-Größe - + + Y Size Y-Größe - + + Z Size Z-Größe - + + Material Material - + + Work Offsets Nullpunktveschiebungen - + + Order By Sortieren nach - + + Part Datum Bauteil Datum - + + G-code File G-Code Datei - + + Last Post Process Date Letztes Postprozess-Datum - + + Stops Haltepunkte - + + Programmer Programmierer - + + Machine Maschine - + + Postprocessor Nachberarbeitungs-Programm - + + Post Processor Flags Post-Prozessor-Flags - + + File Size (kB) Dateigröße (kB) - + + Line Count Anzahl der Zeilen - + + Note Notiz - + + Operator Operator - + + Date Datum + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_el.ts b/src/Mod/Path/Gui/Resources/translations/Path_el.ts index fe8a96f8bd..46af9cfe16 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_el.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_el.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Έξοδος + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Περιγραφή - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL Διεύθυνση URL - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Υλικό - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Note - + + Operator Τελεστής - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts b/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts index 2512fe8377..602ef1d2e4 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_es-AR.ts @@ -6586,232 +6586,354 @@ Por ejemplo: Path_Sanity - - + + Check the path job for common errors Compruebe el trabajo de ruta para errores comunes - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Salida + + + + Fixtures + Fijaciones + + + + Squawks + Squawks + + + + Base Object(s) Objeto(s) base - + + Job Sequence Secuencia de trabajo - + + Job Description Descripción del trabajo - + + Job Type Tipo de trabajo - + + CAD File Name Nombre del Archivo CAD - + + Last Save Date Última Fecha de Guardado - + + Customer Cliente - + + Designer Diseñador - - + + + + Operation Operación - + + Minimum Z Height Altura mínima de Z - + + Maximum Z Height Altura máxima de Z - + + Cycle Time Tiempo de Ciclo - + + Coolant Refrigerante - + + TOTAL JOB TRABAJO TOTAL - + + Tool Number Número de Herramienta - + + Description Descripción - + + Manufacturer Fabricante - + + Part Number Número de pieza - + + URL URL - + + Inspection Notes Notas de Inspección - + + Tool Controller Controlador de herramienta - + + Feed Rate Tasa de Avance - + + Spindle Speed Velocidad del eje - + + Tool Shape Forma de herramienta - + + Tool Diameter Diámetro de Herramienta - + + X Size Tamaño X - + + Y Size Tamaño Y - + + Z Size Tamaño Z - + + Material Material - + + Work Offsets Desplazamientos de trabajo - + + Order By Ordenado por - + + Part Datum Referencia de Pieza - + + G-code File Archivo G-code - + + Last Post Process Date Fecha del último Post Proceso - + + Stops Paradas - + + Programmer Programador - + + Machine Máquina - + + Postprocessor Postprocesador - + + Post Processor Flags Indicadores del post procesador - + + File Size (kB) Tamaño del Archivo (kB) - + + Line Count Número de líneas - + + Note Nota - + + Operator Operador - + + Date Fecha + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts b/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts index 9dab1a4aa8..b32cfaa6f8 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_es-ES.ts @@ -6586,232 +6586,354 @@ Por ejemplo: Path_Sanity - - + + Check the path job for common errors Compruebe el trabajo de ruta para errores comunes - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Salida + + + + Fixtures + Fijaciones + + + + Squawks + Squawks + + + + Base Object(s) Objeto(s) base - + + Job Sequence Secuencia de trabajo - + + Job Description Descripción del trabajo - + + Job Type Tipo de trabajo - + + CAD File Name Nombre del Archivo CAD - + + Last Save Date Última Fecha de Guardado - + + Customer Cliente - + + Designer Diseñador - - + + + + Operation Operación - + + Minimum Z Height Altura mínima de Z - + + Maximum Z Height Altura máxima de Z - + + Cycle Time Tiempo de Ciclo - + + Coolant Refrigerante - + + TOTAL JOB TRABAJO TOTAL - + + Tool Number Número de Herramienta - + + Description Descripción - + + Manufacturer Fabricante - + + Part Number Número de pieza - + + URL URL - + + Inspection Notes Notas de Inspección - + + Tool Controller Controlador de herramienta - + + Feed Rate Tasa de Avance - + + Spindle Speed Velocidad del eje - + + Tool Shape Forma de herramienta - + + Tool Diameter Diámetro de Herramienta - + + X Size Tamaño X - + + Y Size Tamaño Y - + + Z Size Tamaño Z - + + Material Material - + + Work Offsets Desplazamientos de trabajo - + + Order By Ordenado por - + + Part Datum Referencia de Pieza - + + G-code File Archivo G-code - + + Last Post Process Date Fecha del último Post Proceso - + + Stops Paradas - + + Programmer Programador - + + Machine Máquina - + + Postprocessor Postprocesador - + + Post Processor Flags Indicadores del post procesador - + + File Size (kB) Tamaño del Archivo (kB) - + + Line Count Número de líneas - + + Note Nota - + + Operator Operador - + + Date Fecha + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_eu.ts b/src/Mod/Path/Gui/Resources/translations/Path_eu.ts index 952c0b1051..b6493dcda3 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_eu.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_eu.ts @@ -6586,232 +6586,354 @@ Adibidez: Path_Sanity - - + + Check the path job for common errors Aztertu bide-lana errore arruntak bilatzeko - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Irteera + + + + Fixtures + Finkapenak + + + + Squawks + Squawks + + + + Base Object(s) Oinarri-objektua(k) - + + Job Sequence Lan-sekuentzia - + + Job Description Lanaren deskribapena - + + Job Type Lan mota - + + CAD File Name CAD fitxategiaren izena - + + Last Save Date Azken gordetze-data - + + Customer Bezeroa - + + Designer Diseinatzailea - - + + + + Operation Eragiketa - + + Minimum Z Height Z altuera minimoa - + + Maximum Z Height Z altuera maximoa - + + Cycle Time Ziklo-denbora - + + Coolant Hozgarria - + + TOTAL JOB LAN OSOA - + + Tool Number Tresna-zenbakia - + + Description Deskribapena - + + Manufacturer Fabrikatzailea - + + Part Number Pieza-zenbakia - + + URL URLa - + + Inspection Notes Ikuskatze-oharrak - + + Tool Controller Tresna-kontrolagailua - + + Feed Rate Elikatze-tasa - + + Spindle Speed Hax-abiadura - + + Tool Shape Tresna-forma - + + Tool Diameter Tresna-diametroa - + + X Size X tamaina - + + Y Size Y tamaina - + + Z Size Z tamaina - + + Material Materiala - + + Work Offsets Laneko desplazamenduak - + + Order By Ordenatu honen arabera: - + + Part Datum Piezaren zero puntua - + + G-code File G-code fitxategia - + + Last Post Process Date Post-prozesatzearen azken data - + + Stops Geldiuneak - + + Programmer Programatzailea - + + Machine Makina - + + Postprocessor Post-prozesatzailea - + + Post Processor Flags Post-prozesatzailearen banderak - + + File Size (kB) Fitxategi tamaina (kB) - + + Line Count Lerro kopurua - + + Note Oharra - + + Operator Eragilea - + + Date Data + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_fi.ts b/src/Mod/Path/Gui/Resources/translations/Path_fi.ts index 47a92dfec3..6f3d5b3be3 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_fi.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_fi.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Tuloste + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Kuvaus - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Materiaali - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Tiedoston koko (kilotavua) - + + Line Count Line Count - + + Note Note - + + Operator Operaattori - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_fr.ts b/src/Mod/Path/Gui/Resources/translations/Path_fr.ts index bdd6c2c8cb..f60befd389 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_fr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_fr.ts @@ -1465,7 +1465,7 @@ Ce dernier peut être utilisé pour surfacer l'ensemble de la zone du brut afin Use Rest Machining - Utiliser l'usinage de finition + Utiliser l'usinage des résidus @@ -5490,12 +5490,12 @@ Par exemple : The areas cleared by this operation, one area per height, stored as a compound part. Used internally for rest machining. - Les zones détourées par cette opération, une zone par hauteur, sont enregistrées comme une pièce composée. Utilisées en interne pour l'usinage de finition. + Les zones détourées par cette opération, une zone par hauteur, sont enregistrées comme une pièce composée. Utilisées en interne pour l'usinage des résidus. Flag to indicate that the rest machining regions have never been computed, and must be recomputed before being used. - Indicateur indiquant que les régions d'usinage de finition n'ont jamais été calculées, et doivent être recalculées avant d'être utilisées. + Balise signalant les régions d'usinage des résidus qui n'ont jamais été calculées et doivent être recalculées avant d'être utilisées. @@ -6581,232 +6581,354 @@ Les valeurs seront converties dans l'unité souhaitée pendant le post-traitemen Path_Sanity - - + + Check the path job for common errors Vérifier les erreurs courantes dans la tâche du parcours - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Sortie + + + + Fixtures + Accessoires + + + + Squawks + Squawks + + + + Base Object(s) Objet(s) de base - + + Job Sequence Séquence de tâche - + + Job Description Description de la tâche - + + Job Type Type de tâche - + + CAD File Name Nom du fichier CAO - + + Last Save Date Date de la dernière sauvegarde - + + Customer Client - + + Designer Concepteur - - + + + + Operation Opération - + + Minimum Z Height Hauteur minimale de Z - + + Maximum Z Height Hauteur maximale de Z - + + Cycle Time Temps du cycle - + + Coolant Liquide de refroidissement - + + TOTAL JOB TÂCHE TOTAL - + + Tool Number Numéro de l'outil - + + Description Description - + + Manufacturer Fabricant - + + Part Number Numéro de la pièce - + + URL URL - + + Inspection Notes Notes d'inspection - + + Tool Controller Contrôleur d'outil - + + Feed Rate Débit d'alimentation - + + Spindle Speed Vitesse de la broche - + + Tool Shape Forme de l'outil - + + Tool Diameter Diamètre de l'outil - + + X Size Dimension X - + + Y Size Dimension Y - + + Z Size Dimension Z - + + Material Matériau - + + Work Offsets Décalages de travail - + + Order By Trier par - + + Part Datum Référence de la pièce - + + G-code File Fichier G-code - + + Last Post Process Date Date du dernier post-traitement - + + Stops Stops - + + Programmer Programmeur - + + Machine Machine - + + Postprocessor Post-processeur - + + Post Processor Flags Balises du post-processeur - + + File Size (kB) Taille du fichier (ko) - + + Line Count Nombre de lignes - + + Note Note - + + Operator Opérateur - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator @@ -6869,7 +6991,7 @@ Les valeurs seront converties dans l'unité souhaitée pendant le post-traitemen Previous operation %s is required for rest machining, but it has no stored rest machining metadata. Recomputing to generate this metadata... - L'opération précédente %s est requise pour l'usinage de finition, mais elle n'a pas de métadonnées d'usinage de finition. Recalculer pour générer ces métadonnées... + L'opération précédente %s est requise pour l'usinage des résidus, mais elle n'a pas de métadonnées d'usinage des résidus. Recalculer pour générer ces métadonnées... diff --git a/src/Mod/Path/Gui/Resources/translations/Path_gl.ts b/src/Mod/Path/Gui/Resources/translations/Path_gl.ts index 7c45f83322..baefc4eb3d 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_gl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_gl.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Saída + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operación - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Descrición - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Ferramenta de control - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Material - + + Work Offsets Work Offsets - + + Order By Ordenar por - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programador - + + Machine Máquina - + + Postprocessor Pos-procesador - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Nota - + + Operator Operador - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_hr.ts b/src/Mod/Path/Gui/Resources/translations/Path_hr.ts index 3934710eb6..df8d887724 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_hr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_hr.ts @@ -6615,232 +6615,354 @@ Staza koju treba kopirati Path_Sanity - - + + Check the path job for common errors Provjerite ima li u stazi putanje uobičajenih pogrešaka - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Izlaz + + + + Fixtures + Armatura + + + + Squawks + Squawks + + + + Base Object(s) Osnovni Objekt(i) - + + Job Sequence Redoslijed posla - + + Job Description Opis posla - + + Job Type Vrsta posla - + + CAD File Name Ime CAD datoteke - + + Last Save Date Zadnje spremljeni datum - + + Customer Klijent - + + Designer Dizajner - - + + + + Operation Operacija - + + Minimum Z Height Minimalna Z visina - + + Maximum Z Height Maksimalna Z visina - + + Cycle Time Vrijeme Ciklusa - + + Coolant Hlađenje - + + TOTAL JOB CIJELI POSAO - + + Tool Number Alatni broj - + + Description Opis - + + Manufacturer Proizvođač - + + Part Number Broj Djela - + + URL URL - + + Inspection Notes Inspekcijske zabilješke - + + Tool Controller Kontroler Alata - + + Feed Rate Brzina Pomaka - + + Spindle Speed Brzina Glodala - + + Tool Shape Oblik Alata - + + Tool Diameter Promjer Alata - + + X Size Veličina X - + + Y Size Veličina Y - + + Z Size Veličina Z - + + Material Materijal - + + Work Offsets Radni Pomaci (Offsets) - + + Order By Posloži po - + + Part Datum Datum Komponente - + + G-code File G-code Datoteka - + + Last Post Process Date Datum zadnjeg post procesa - + + Stops Stajališta - + + Programmer Programer - + + Machine Stroj - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Veličina Datoteke (kB) - + + Line Count Broj linija - + + Note Bilješka - + + Operator Operator - + + Date Datum + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_hu.ts b/src/Mod/Path/Gui/Resources/translations/Path_hu.ts index 6b363d52fa..03b3f40ee5 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_hu.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_hu.ts @@ -6580,232 +6580,354 @@ Például: Path_Sanity - - + + Check the path job for common errors Ellenőrizze a szerszámpálya útvonalát a gyakori hibákra - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Kimenet + + + + Fixtures + Berendezési tárgyak + + + + Squawks + Squawks + + + + Base Object(s) Alap tárgy(ak) - + + Job Sequence Feladatsor - + + Job Description Feladat leírás - + + Job Type Feladat típusa - + + CAD File Name CAD fájl név - + + Last Save Date Utolsó mentés dátuma - + + Customer Ügyfél - + + Designer Tervező - - + + + + Operation Művelet - + + Minimum Z Height Minimális Z magasság - + + Maximum Z Height Maximális Z magasság - + + Cycle Time Ciklusidő - + + Coolant Hűtőfolyadék - + + TOTAL JOB ÖSSZES MUNKAFOLYAMAT - + + Tool Number Eszköz szám - + + Description Leírás - + + Manufacturer Gyártó - + + Part Number Cikkszám - + + URL URL - + + Inspection Notes Vizsgálati megjegyzés - + + Tool Controller Eszköz vezérlő - + + Feed Rate Előtolási sebesség - + + Spindle Speed Orsó sebessége - + + Tool Shape Szerszám alakja - + + Tool Diameter Szerszám étmérő - + + X Size X méret - + + Y Size Y méret - + + Z Size Z méret - + + Material Anyag - + + Work Offsets Nullapontos eltolások - + + Order By Rendezés - + + Part Datum Alkatrész referenciarendszer - + + G-code File G-kód fájl - + + Last Post Process Date Utolsó feldolgozott dátum - + + Stops Álj - + + Programmer Programozó - + + Machine Gép - + + Postprocessor Utófeldolgozó - + + Post Processor Flags Utófeldolgozó zászlók - + + File Size (kB) Fájl méret (kB) - + + Line Count Sorok száma - + + Note Megjegyzés - + + Operator Irányító - + + Date Dátum + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_id.ts b/src/Mod/Path/Gui/Resources/translations/Path_id.ts index 3937c5c342..9119866951 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_id.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_id.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Keluaran + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Description - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Bahan - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Note - + + Operator Operator - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_it.ts b/src/Mod/Path/Gui/Resources/translations/Path_it.ts index 5d4ca5776c..94b56de416 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_it.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_it.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Output + + + + Fixtures + Infissi + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operazione - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Refrigerante - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Descrizione - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Controllore Strumento - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Materiale - + + Work Offsets Work Offsets - + + Order By Ordina per - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmatore - + + Machine Macchina - + + Postprocessor Postprocessore - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Dimensione File (kB) - + + Line Count Line Count - + + Note Nota - + + Operator Operatore - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ja.ts b/src/Mod/Path/Gui/Resources/translations/Path_ja.ts index bcd29cfca4..ad87c82621 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ja.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ja.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + 出力 + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation オペレーション - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant 冷却剤 - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description 説明 - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material マテリアル - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer プログラマー - + + Machine マシン - + + Postprocessor ポストプロセッサー - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note 注記 - + + Operator 演算子 - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ka.ts b/src/Mod/Path/Gui/Resources/translations/Path_ka.ts index f7c05ebdd2..00270724b7 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ka.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ka.ts @@ -6586,232 +6586,354 @@ For example: Path_Sanity - - + + Check the path job for common errors ტრაექტორიის დავალების გავრცელებულ შეცდომებზე შემოწმება - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + გამოტანა + + + + Fixtures + არმატურები + + + + Squawks + Squawks + + + + Base Object(s) საბაზისო ობიექტ(ებ)ი - + + Job Sequence დავალებების მიმდევრობა - + + Job Description დავალების აღწერა - + + Job Type დავალების ტიპი - + + CAD File Name CAD ფაილის სახელი - + + Last Save Date ბოლოს შენახვის თარიღი - + + Customer შემკვეთი - + + Designer დიზაინერი - - + + + + Operation ოპერაცია - + + Minimum Z Height მინიმალური Z სიმაღლე - + + Maximum Z Height მაქსიმალური Z სიმაღლე - + + Cycle Time ციკლის დრო - + + Coolant გამაგრილებელი - + + TOTAL JOB სრული დავალება - + + Tool Number ხელსაწყოს ნომერი - + + Description აღწერა - + + Manufacturer მწარმოებელი - + + Part Number ნაწილის ნომერი - + + URL URL - + + Inspection Notes ინსპექციის შენიშვნები - + + Tool Controller ხელსაწყოს კონტროლერი - + + Feed Rate მიწოდების სიჩქარე - + + Spindle Speed შპინდელის სიჩქარე - + + Tool Shape ხელსაწყოს ფორმა - + + Tool Diameter ხელსაწყოს დიამეტრი - + + X Size X ზომა - + + Y Size Y ზომა - + + Z Size Z ზომა - + + Material მასალა - + + Work Offsets სამუშაოს წანაცვლებები - + + Order By დალაგება - + + Part Datum ნაწილის თარიღი - + + G-code File G-code-ის ფაილი - + + Last Post Process Date ბოლო პოსტპროცესის თარიღი - + + Stops გაჩერებები - + + Programmer პროგრამისტი - + + Machine მანქანა - + + Postprocessor პოსტპროცესორი - + + Post Processor Flags პოსტპროცესორის პარამეტრები - + + File Size (kB) ფაილის ზომა (კბ) - + + Line Count ხაზების რაოდენობა - + + Note შენიშვნა - + + Operator ოპერატორი - + + Date თარიღი + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ko.ts b/src/Mod/Path/Gui/Resources/translations/Path_ko.ts index e092d7250a..44f21edf24 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ko.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ko.ts @@ -6580,232 +6580,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + 출력 + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description 설명 - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material 재료 - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Note - + + Operator 연산자 - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_nl.ts b/src/Mod/Path/Gui/Resources/translations/Path_nl.ts index a4405321b2..d39ed5a7a0 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_nl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_nl.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Uitvoer + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Basisobject(en) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD-bestandsnaam - + + Last Save Date Laatste opslagdatum - + + Customer Klant - + + Designer Ontwerper - - + + + + Operation Bewerking - + + Minimum Z Height Minimale Z-hoogte - + + Maximum Z Height Maximale Z-hoogte - + + Cycle Time Cyclustijd - + + Coolant Koelvloeistof - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Omschrijving - + + Manufacturer Fabrikant - + + Part Number Onderdeelnummer - + + URL URL - + + Inspection Notes Inspectienotities - + + Tool Controller Gereedschapsregelaar - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X-grootte - + + Y Size Y-grootte - + + Z Size Z-grootte - + + Material Materiaal - + + Work Offsets Work Offsets - + + Order By Sorteren op - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmeur - + + Machine Machine - + + Postprocessor Nabewerking - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Bestandsgrootte (kB) - + + Line Count Line Count - + + Note Aantekening - + + Operator Operand - + + Date Datum + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_pl.ts b/src/Mod/Path/Gui/Resources/translations/Path_pl.ts index 6876d53235..4847f0266d 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_pl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_pl.ts @@ -6592,232 +6592,354 @@ OL Dropcutter* lub Eksperymentalny (nieoparty na OCL). Path_Sanity - - + + Check the path job for common errors Sprawdź zadanie ścieżki pod kątem typowych błędów - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Wyjście + + + + Fixtures + Uchwyty + + + + Squawks + Squawks + + + + Base Object(s) Obiekty bazowe - + + Job Sequence Sekwencja zadania - + + Job Description Opis zadania - + + Job Type Typ zadania - + + CAD File Name Nazwa pliku CAD - + + Last Save Date Data ostatniego zapisu - + + Customer Klient - + + Designer Projektant - - + + + + Operation Operacja - + + Minimum Z Height Minimalna wysokość Z - + + Maximum Z Height Maksymalna wysokość Z - + + Cycle Time Czas cyklu - + + Coolant Chłodziwo - + + TOTAL JOB Zadanie ogółem - + + Tool Number Numer narzędzia - + + Description Opis - + + Manufacturer Producent - + + Part Number Numer części - + + URL Adres URL - + + Inspection Notes Uwagi do kontroli - + + Tool Controller Kontroler narzędzi - + + Feed Rate Posuw - + + Spindle Speed Prędkość wrzeciona - + + Tool Shape Kształt narzędzia - + + Tool Diameter Średnica narzędzia - + + X Size Rozmiar X - + + Y Size Rozmiar Y - + + Z Size Rozmiar Z - + + Material Materiał - + + Work Offsets Przesunięcia punktu zerowego - + + Order By Sortuj według - + + Part Datum Układ odniesienia detalu - + + G-code File Plik G-code - + + Last Post Process Date Data ostatniego przetwarzania - + + Stops Zatrzymaj - + + Programmer Programista - + + Machine Maszyna - + + Postprocessor Postprocesor - + + Post Processor Flags Flagi postprocesora - + + File Size (kB) Rozmiar pliku (kB) - + + Line Count Liczba linii - + + Note Uwaga - + + Operator Operator - + + Date Data + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts b/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts index 1d06d3a133..aad50c7616 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_pt-BR.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Saída + + + + Fixtures + Fixações + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operação - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Líquido de refrigeração - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Descrição - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Controlador de ferramenta - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Material - + + Work Offsets Work Offsets - + + Order By Ordenar por - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programador - + + Machine Máquina - + + Postprocessor Pós-processador - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Tamanho do Arquivo (kB) - + + Line Count Line Count - + + Note Observação - + + Operator Operador - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts b/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts index 5aa6506bd3..6f5e404049 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_pt-PT.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Destino + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operação - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Refrigerante - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Descrição - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Controlador de Ferramenta - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Material - + + Work Offsets Work Offsets - + + Order By Ordenar Por - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programador - + + Machine Máquina - + + Postprocessor Pós-processador - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Tamanho do Arquivo (kB) - + + Line Count Line Count - + + Note Nota - + + Operator Operador - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ro.ts b/src/Mod/Path/Gui/Resources/translations/Path_ro.ts index 91b9f91050..59544402cb 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ro.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ro.ts @@ -6591,232 +6591,354 @@ De exemplu: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Ieşire + + + + Fixtures + Reparații + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operațiune - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Descriere - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Controler sculă - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Materialul - + + Work Offsets Work Offsets - + + Order By Ordonare după - + + Part Datum Part Datum - + + G-code File Fișier G-code - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programator - + + Machine Mașină - + + Postprocessor Postprocesor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Notă - + + Operator Operator - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_ru.ts b/src/Mod/Path/Gui/Resources/translations/Path_ru.ts index e91db576cd..e800e28eb1 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_ru.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_ru.ts @@ -6578,232 +6578,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Проверьте задание пути на распространенные ошибки - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Вывод + + + + Fixtures + Зажимы(либо Арматура) + + + + Squawks + Squawks + + + + Base Object(s) Базовый объект(ы) - + + Job Sequence Последовательность заданий обработки - + + Job Description Описание задания обработки - + + Job Type Тип задания - + + CAD File Name Имя файла CAD - + + Last Save Date Дата последнего сохранения - + + Customer Клиент - + + Designer Дизайнер - - + + + + Operation Операция - + + Minimum Z Height Минимальная высота Z - + + Maximum Z Height Максимум Z высота - + + Cycle Time Время цикла - + + Coolant Охлаждающая жидкость - + + TOTAL JOB ВСЕГО ЗАДАНИЙ ОБРАБОТКИ - + + Tool Number Инструмент № - + + Description Описание - + + Manufacturer Производитель - + + Part Number Артикул детали - + + URL Ссылка - + + Inspection Notes Инспекционные примечания - + + Tool Controller Контроллер инструмента - + + Feed Rate Подача рабочая - + + Spindle Speed Скорость шпинделя - + + Tool Shape Форма инструмента - + + Tool Diameter Диаметр инструмента - + + X Size Размер по оси X - + + Y Size Размер по оси Y - + + Z Size Размер по оси Z - + + Material Материал - + + Work Offsets Рабочие смещения - + + Order By Упорядочить По - + + Part Datum Опорные координаты детали - + + G-code File Файл G Code - + + Last Post Process Date Дата последнего пост-процесса - + + Stops Остановки - + + Programmer Программист - + + Machine Станок - + + Postprocessor Постпроцессор - + + Post Processor Flags Флаги Пост-процессора - + + File Size (kB) Размер файла (кбайт) - + + Line Count Кол-во Линий - + + Note Заметка - + + Operator Оператор - + + Date Дата + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sl.ts b/src/Mod/Path/Gui/Resources/translations/Path_sl.ts index 0b47c7ab91..563aedcddc 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sl.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sl.ts @@ -6586,232 +6586,354 @@ Na primer: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Izpis + + + + Fixtures + Vgrajena oprema + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Dejanje - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Hladilo - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Opis - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Orodni krmilnik - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Snov - + + Work Offsets Work Offsets - + + Order By Razvrsti po - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programer - + + Machine Naprava - + + Postprocessor Poopravilnik - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Opomba - + + Operator Operator - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts b/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts index fb9fb04b77..4dd46bc595 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sr-CS.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Izlaz + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Rashladna tečnost - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Opis - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL adresa - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Materijal - + + Work Offsets Work Offsets - + + Order By Razvrstaj po - + + Part Datum Part Datum - + + G-code File G-kod datoteka - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Veličina datoteke (kB) - + + Line Count Line Count - + + Note Note - + + Operator Operator - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sr.ts b/src/Mod/Path/Gui/Resources/translations/Path_sr.ts index a598e4f4ef..c98abd275f 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sr.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Излаз + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Расхладна течност - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Опис - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL адреса - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Материјал - + + Work Offsets Work Offsets - + + Order By Разврстај по - + + Part Datum Part Datum - + + G-code File Г-код датотека - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) Величина датотеке (кБ) - + + Line Count Line Count - + + Note Напомена - + + Operator Оператор - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts b/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts index 02f545893d..6e088ab7ef 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_sv-SE.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Utmatning + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Kylmedel - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Beskrivning - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Material - + + Work Offsets Work Offsets - + + Order By Beställt av - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmerare - + + Machine Maskin - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Anteckning - + + Operator Operator - + + Date Datum + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_tr.ts b/src/Mod/Path/Gui/Resources/translations/Path_tr.ts index b47fbb8eaa..9fcc289b36 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_tr.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_tr.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Çıktı + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation İşlem - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Soğutma sıvısı - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Açıklama - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Araç Denetleyicisi - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Malzeme - + + Work Offsets Work Offsets - + + Order By Sıralama - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programcı - + + Machine Makine - + + Postprocessor Post işlemcisi - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Not - + + Operator İşleç - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_uk.ts b/src/Mod/Path/Gui/Resources/translations/Path_uk.ts index 4cf5a05cc8..ce576bdf33 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_uk.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_uk.ts @@ -6589,232 +6589,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Вивід + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Опис - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL Посилання - + + Inspection Notes Inspection Notes - + + Tool Controller Інструмент - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Матеріал - + + Work Offsets Work Offsets - + + Order By Сортувати за - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Примітка - + + Operator Оператор - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts b/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts index d0b9d9970e..d77ffd6b7b 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_val-ES.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + Eixida + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operació - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description Descripció - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL URL - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material Material - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Note - + + Operator Operador - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts b/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts index 25000b3996..bb55174591 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_zh-CN.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + 输出 + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation 操作 - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant Coolant - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description 描述 - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL 网址 - + + Inspection Notes Inspection Notes - + + Tool Controller 工具控制器 - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material 材质 - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note 备注 - + + Operator 运算符 - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts b/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts index f28175bf06..ffb5525f0b 100644 --- a/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts +++ b/src/Mod/Path/Gui/Resources/translations/Path_zh-TW.ts @@ -6588,232 +6588,354 @@ For example: Path_Sanity - - + + Check the path job for common errors Check the path job for common errors - + + Setup Report for FreeCAD Job + Setup Report for FreeCAD Job + + + + Table of Contents + Table of Contents + + + + Part Information + Part Information + + + + Run Summary + Run Summary + + + + Rough Stock + Rough Stock + + + + Tool Data + Tool Data + + + + Output + 輸出 + + + + Fixtures + Fixtures + + + + Squawks + Squawks + + + + Base Object(s) Base Object(s) - + + Job Sequence Job Sequence - + + Job Description Job Description - + + Job Type Job Type - + + CAD File Name CAD File Name - + + Last Save Date Last Save Date - + + Customer Customer - + + Designer Designer - - + + + + Operation Operation - + + Minimum Z Height Minimum Z Height - + + Maximum Z Height Maximum Z Height - + + Cycle Time Cycle Time - + + Coolant 冷卻劑 - + + TOTAL JOB TOTAL JOB - + + Tool Number Tool Number - + + Description 說明 - + + Manufacturer Manufacturer - + + Part Number Part Number - + + URL 網址 - + + Inspection Notes Inspection Notes - + + Tool Controller Tool Controller - + + Feed Rate Feed Rate - + + Spindle Speed Spindle Speed - + + Tool Shape Tool Shape - + + Tool Diameter Tool Diameter - + + X Size X Size - + + Y Size Y Size - + + Z Size Z Size - + + Material 材質 - + + Work Offsets Work Offsets - + + Order By Order By - + + Part Datum Part Datum - + + G-code File G-code File - + + Last Post Process Date Last Post Process Date - + + Stops Stops - + + Programmer Programmer - + + Machine Machine - + + Postprocessor Postprocessor - + + Post Processor Flags Post Processor Flags - + + File Size (kB) File Size (kB) - + + Line Count Line Count - + + Note Note - + + Operator 操作 - + + Date Date + + + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + Tool number {} is a legacy tool. Legacy tools not + supported by Path-Sanity + + + + Tool number {} used by multiple tools + Tool number {} used by multiple tools + + + + Tool Controller '{}' has no spindlespeed + Tool Controller '{}' has no spindlespeed + + + + Tool Controller '{}' is not used + Tool Controller '{}' is not used + + + + Consider Specifying the Stock Material + Consider Specifying the Stock Material + + + + The Job has not been post-processed + The Job has not been post-processed + Path_Simulator diff --git a/src/Mod/Path/Path/Base/Gui/IconViewProvider.py b/src/Mod/Path/Path/Base/Gui/IconViewProvider.py index 1a9eea7db7..c92531cc6e 100644 --- a/src/Mod/Path/Path/Base/Gui/IconViewProvider.py +++ b/src/Mod/Path/Path/Base/Gui/IconViewProvider.py @@ -55,14 +55,14 @@ class ViewProvider(object): self.vobj = vobj self.obj = vobj.Object - def __getstate__(self): + def dumps(self): attrs = {"icon": self.icon} if hasattr(self, "editModule"): attrs["editModule"] = self.editModule attrs["editCallback"] = self.editCallback return attrs - def __setstate__(self, state): + def loads(self, state): self.icon = state["icon"] if state.get("editModule", None): self.editModule = state["editModule"] diff --git a/src/Mod/Path/Path/Base/Gui/PropertyBag.py b/src/Mod/Path/Path/Base/Gui/PropertyBag.py index 39911b2703..1dc4b01e14 100644 --- a/src/Mod/Path/Path/Base/Gui/PropertyBag.py +++ b/src/Mod/Path/Path/Base/Gui/PropertyBag.py @@ -65,10 +65,10 @@ class ViewProvider(object): def getIcon(self): return ":/icons/Path-SetupSheet.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def getDisplayMode(self, mode): diff --git a/src/Mod/Path/Path/Base/Gui/SetupSheet.py b/src/Mod/Path/Path/Base/Gui/SetupSheet.py index 73aa0d5ff5..8c8b5cf98a 100644 --- a/src/Mod/Path/Path/Base/Gui/SetupSheet.py +++ b/src/Mod/Path/Path/Base/Gui/SetupSheet.py @@ -67,10 +67,10 @@ class ViewProvider: def getIcon(self): return ":/icons/Path_SetupSheet.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def getDisplayMode(self, mode): diff --git a/src/Mod/Path/Path/Base/PropertyBag.py b/src/Mod/Path/Path/Base/PropertyBag.py index f466e79b4d..e5f2657112 100644 --- a/src/Mod/Path/Path/Base/PropertyBag.py +++ b/src/Mod/Path/Path/Base/PropertyBag.py @@ -76,10 +76,10 @@ class PropertyBag(object): ) self.onDocumentRestored(obj) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def __sanitizePropertyName(self, name): diff --git a/src/Mod/Path/Path/Base/SetupSheet.py b/src/Mod/Path/Path/Base/SetupSheet.py index 840382331f..4d72df3059 100644 --- a/src/Mod/Path/Path/Base/SetupSheet.py +++ b/src/Mod/Path/Path/Base/SetupSheet.py @@ -222,10 +222,10 @@ class SetupSheet: obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): for obj in FreeCAD.ActiveDocument.Objects: if hasattr(obj, "Proxy") and obj.Proxy == self: self.obj = obj diff --git a/src/Mod/Path/Path/Dressup/Boundary.py b/src/Mod/Path/Path/Dressup/Boundary.py index 08a4293fd6..2305b888a3 100644 --- a/src/Mod/Path/Path/Dressup/Boundary.py +++ b/src/Mod/Path/Path/Dressup/Boundary.py @@ -78,10 +78,10 @@ class DressupPathBoundary(object): self.safeHeight = None self.clearanceHeight = None - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onDocumentRestored(self, obj): diff --git a/src/Mod/Path/Path/Dressup/DogboneII.py b/src/Mod/Path/Path/Dressup/DogboneII.py index 949c7218c5..fd6568f930 100644 --- a/src/Mod/Path/Path/Dressup/DogboneII.py +++ b/src/Mod/Path/Path/Dressup/DogboneII.py @@ -264,10 +264,10 @@ class Proxy(object): self.obj = obj obj.setEditorMode("BoneBlacklist", 2) # hide - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def toolRadius(self, obj): diff --git a/src/Mod/Path/Path/Dressup/Gui/AxisMap.py b/src/Mod/Path/Path/Dressup/Gui/AxisMap.py index 8a980d18c6..2f0e7a786d 100644 --- a/src/Mod/Path/Path/Dressup/Gui/AxisMap.py +++ b/src/Mod/Path/Path/Dressup/Gui/AxisMap.py @@ -69,10 +69,10 @@ class ObjectDressup: obj.AxisMap = "Y->A" obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def _linear2angular(self, radius, length): @@ -239,10 +239,10 @@ class ViewProviderDressup: def claimChildren(self): return [self.obj.Base] - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onDelete(self, arg1=None, arg2=None): diff --git a/src/Mod/Path/Path/Dressup/Gui/Boundary.py b/src/Mod/Path/Path/Dressup/Gui/Boundary.py index 77e5125c1d..e27c0169e8 100644 --- a/src/Mod/Path/Path/Dressup/Gui/Boundary.py +++ b/src/Mod/Path/Path/Dressup/Gui/Boundary.py @@ -207,10 +207,10 @@ class DressupPathBoundaryViewProvider(object): def __init__(self, vobj): self.attach(vobj) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def attach(self, vobj): diff --git a/src/Mod/Path/Path/Dressup/Gui/Dogbone.py b/src/Mod/Path/Path/Dressup/Gui/Dogbone.py index d5faf7df50..be11dc11fa 100644 --- a/src/Mod/Path/Path/Dressup/Gui/Dogbone.py +++ b/src/Mod/Path/Path/Dressup/Gui/Dogbone.py @@ -478,10 +478,10 @@ class ObjectDressup(object): def onDocumentRestored(self, obj): obj.setEditorMode("BoneBlacklist", 2) # hide this one - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def theOtherSideOf(self, side): @@ -1320,10 +1320,10 @@ class ViewProviderDressup(object): panel.setupUi() return True - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onDelete(self, arg1=None, arg2=None): diff --git a/src/Mod/Path/Path/Dressup/Gui/DogboneII.py b/src/Mod/Path/Path/Dressup/Gui/DogboneII.py index bc184b3001..5c3ecfea27 100644 --- a/src/Mod/Path/Path/Dressup/Gui/DogboneII.py +++ b/src/Mod/Path/Path/Dressup/Gui/DogboneII.py @@ -290,10 +290,10 @@ class ViewProviderDressup(object): panel.setupUi() return True - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onDelete(self, arg1=None, arg2=None): diff --git a/src/Mod/Path/Path/Dressup/Gui/Dragknife.py b/src/Mod/Path/Path/Dressup/Gui/Dragknife.py index 31545e8a85..301174b8c7 100644 --- a/src/Mod/Path/Path/Dressup/Gui/Dragknife.py +++ b/src/Mod/Path/Path/Dressup/Gui/Dragknife.py @@ -83,10 +83,10 @@ class ObjectDressup: obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def shortcut(self, queue): @@ -578,10 +578,10 @@ class ViewProviderDressup: def claimChildren(self): return [self.Object.Base] - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onDelete(self, arg1=None, arg2=None): diff --git a/src/Mod/Path/Path/Dressup/Gui/LeadInOut.py b/src/Mod/Path/Path/Dressup/Gui/LeadInOut.py index bb794e0392..23f9e6f73f 100644 --- a/src/Mod/Path/Path/Dressup/Gui/LeadInOut.py +++ b/src/Mod/Path/Path/Dressup/Gui/LeadInOut.py @@ -137,10 +137,10 @@ class ObjectDressup: self.wire = None self.rapids = None - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def setup(self, obj): @@ -546,7 +546,7 @@ class ObjectDressup: queue = [] if ( obj.IncludeLayers - and curCommand.z < currLocation["Z"] + and curCommand.z < currLocation["Z"] and not Path.Geom.isRoughly(curCommand.z, currLocation["Z"]) and prevCmd.Name in movecommands ): # Layer change within move cmds @@ -660,10 +660,10 @@ class ViewProviderDressup: arg1.Object.Base = None return True - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def clearTaskPanel(self): diff --git a/src/Mod/Path/Path/Dressup/Gui/RampEntry.py b/src/Mod/Path/Path/Dressup/Gui/RampEntry.py index 6df13bba3f..79b98c6363 100644 --- a/src/Mod/Path/Path/Dressup/Gui/RampEntry.py +++ b/src/Mod/Path/Path/Dressup/Gui/RampEntry.py @@ -164,10 +164,10 @@ class ObjectDressup: return data - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onChanged(self, obj, prop): @@ -884,10 +884,10 @@ class ViewProviderDressup: arg1.Object.Base = None return True - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None diff --git a/src/Mod/Path/Path/Dressup/Gui/Tags.py b/src/Mod/Path/Path/Dressup/Gui/Tags.py index cfe0490e6e..b0c4d2affd 100644 --- a/src/Mod/Path/Path/Dressup/Gui/Tags.py +++ b/src/Mod/Path/Path/Dressup/Gui/Tags.py @@ -384,10 +384,10 @@ class PathDressupTagViewProvider: # return True return False - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def setupColors(self): diff --git a/src/Mod/Path/Path/Dressup/Gui/ZCorrect.py b/src/Mod/Path/Path/Dressup/Gui/ZCorrect.py index baa9fc0ee8..f14ee420a4 100644 --- a/src/Mod/Path/Path/Dressup/Gui/ZCorrect.py +++ b/src/Mod/Path/Path/Dressup/Gui/ZCorrect.py @@ -91,10 +91,10 @@ class ObjectDressup: obj.ArcInterpolate = 0.1 obj.SegInterpolate = 1.0 - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onChanged(self, fp, prop): @@ -325,10 +325,10 @@ class ViewProviderDressup: panel.setupUi() return True - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onDelete(self, arg1=None, arg2=None): diff --git a/src/Mod/Path/Path/Dressup/Tags.py b/src/Mod/Path/Path/Dressup/Tags.py index ecc84cd420..15e492fb2a 100644 --- a/src/Mod/Path/Path/Dressup/Tags.py +++ b/src/Mod/Path/Path/Dressup/Tags.py @@ -998,10 +998,10 @@ class ObjectTagDressup: obj.Proxy = self obj.Base = base - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): self.obj = state self.solids = [] self.tags = [] diff --git a/src/Mod/Path/Path/Main/Gui/Fixture.py b/src/Mod/Path/Path/Main/Gui/Fixture.py index ebc2f62122..605d692192 100644 --- a/src/Mod/Path/Path/Main/Gui/Fixture.py +++ b/src/Mod/Path/Path/Main/Gui/Fixture.py @@ -112,10 +112,10 @@ class _ViewProviderFixture: vobj.setEditorMode("Transparency", mode) vobj.setEditorMode("Visibility", mode) - def __getstate__(self): # mandatory + def dumps(self): # mandatory return None - def __setstate__(self, state): # mandatory + def loads(self, state): # mandatory return None def getIcon(self): # optional diff --git a/src/Mod/Path/Path/Main/Gui/Job.py b/src/Mod/Path/Path/Main/Gui/Job.py index c181605791..aec6fe875f 100644 --- a/src/Mod/Path/Path/Main/Gui/Job.py +++ b/src/Mod/Path/Path/Main/Gui/Job.py @@ -149,10 +149,10 @@ class ViewProvider: sw = coin.SO_SWITCH_ALL if yes else coin.SO_SWITCH_NONE self.switch.whichChild = sw - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def deleteObjectsOnReject(self): diff --git a/src/Mod/Path/Path/Main/Gui/Sanity.py b/src/Mod/Path/Path/Main/Gui/Sanity.py index 8e7834634d..ad49f4ada7 100644 --- a/src/Mod/Path/Path/Main/Gui/Sanity.py +++ b/src/Mod/Path/Path/Main/Gui/Sanity.py @@ -52,7 +52,7 @@ else: class CommandPathSanity: - def resolveOutputPath(self, job): + def resolveOutputFile(self, job): if job.PostProcessorOutputFile != "": filepath = job.PostProcessorOutputFile elif Path.Preferences.defaultOutputFile() != "": @@ -100,6 +100,10 @@ class CommandPathSanity: Path.Log.debug("filepath: {}".format(filepath)) + return filepath + + def resolveOutputPath(self, filepath): + # Make sure the filepath is fully qualified if os.path.basename(filepath) == filepath: filepath = f"{os.path.dirname(FreeCAD.ActiveDocument.FileName)}/{filepath}" @@ -145,10 +149,11 @@ class CommandPathSanity: FreeCADGui.addIconPath(":/icons") self.squawkData = {"items": []} obj = FreeCADGui.Selection.getSelectionEx()[0].Object - self.outputpath = self.resolveOutputPath(obj) + self.outputFile = self.resolveOutputFile(obj) + self.outputpath = self.resolveOutputPath(self.outputFile) Path.Log.debug(f"outputstring: {self.outputpath}") data = self.__summarize(obj) - html = self.__report(data) + html = self.__report(data, obj) if html is not None: webbrowser.open(html) if FreeCAD.GuiUp: @@ -202,7 +207,7 @@ class CommandPathSanity: return "{}_t.png".format(imagepath) - def __report(self, data): + def __report(self, data, obj): """ generates an asciidoc file with the report information """ @@ -1184,296 +1189,31 @@ class CommandPathSanity: """ - reportTemplate = """ -= Setup Report for FreeCAD Job: {jobname} -:toc: -:icons: font -:imagesdir: "" -:data-uri: - -== Part Information - -|=== -{infoTable} -|=== - - -== Run Summary - -|=== -{runTable} -|=== - -== Rough Stock - -|=== -{stockTable} -|=== - -== Tool Data - -{toolTables} - -== Output (Gcode) - -|=== -{outTable} -|=== - -== Fixtures and Workholding - -|=== -{fixtureTable} -|=== - -== Squawks - -|=== -{squawkTable} -|=== - -""" - # Generate the markup for the Part Information Section - - infoTable = "" - - PartLabel = translate("Path_Sanity", "Base Object(s)") - SequenceLabel = translate("Path_Sanity", "Job Sequence") - DescriptionLabel = translate("Path_Sanity", "Job Description") - JobTypeLabel = translate("Path_Sanity", "Job Type") - CADLabel = translate("Path_Sanity", "CAD File Name") - LastSaveLabel = translate("Path_Sanity", "Last Save Date") - CustomerLabel = translate("Path_Sanity", "Customer") - DesignerLabel = translate("Path_Sanity", "Designer") - - d = data["designData"] - b = data["baseData"] - - jobname = d["JobLabel"] - - basestable = "!===\n" - for key, val in b["bases"].items(): - basestable += "! " + key + " ! " + val + "\n" - - basestable += "!===" - - infoTable += ( - "|*" - + PartLabel - + "* a| " - + basestable - + " .7+a|" - + "image::" - + b["baseimage"] - + "[" - + PartLabel - + "]\n" - ) - infoTable += "|*" + SequenceLabel + "*|" + d["Sequence"] - infoTable += "|*" + JobTypeLabel + "*|" + d["JobType"] - infoTable += "|*" + DescriptionLabel + "*|" + d["JobDescription"] - infoTable += "|*" + CADLabel + "*|" + d["FileName"] - infoTable += "|*" + LastSaveLabel + "*|" + d["LastModifiedDate"] - infoTable += "|*" + CustomerLabel + "*|" + d["Customer"] - infoTable += "|*" + DesignerLabel + "*|" + d["Designer"] - - # Generate the markup for the Run Summary Section - - runTable = "" - opLabel = translate("Path_Sanity", "Operation") - zMinLabel = translate("Path_Sanity", "Minimum Z Height") - zMaxLabel = translate("Path_Sanity", "Maximum Z Height") - cycleTimeLabel = translate("Path_Sanity", "Cycle Time") - coolantLabel = translate("Path_Sanity", "Coolant") - jobTotalLabel = translate("Path_Sanity", "TOTAL JOB") - - d = data["runData"] - - runTable += ( - "|*" - + opLabel - + "*|*" - + zMinLabel - + "*|*" - + zMaxLabel - + "*|*" - + coolantLabel - + "*|*" - + cycleTimeLabel - + "*\n" - ) - - for i in d["items"]: - runTable += "|{}".format(i["opName"]) - runTable += "|{}".format(i["minZ"]) - runTable += "|{}".format(i["maxZ"]) - runTable += "|{}".format(i["coolantMode"]) - runTable += "|{}".format(i["cycleTime"]) - - runTable += ( - "|*" - + jobTotalLabel - + "* |{} |{} |{}".format(d["jobMinZ"], d["jobMaxZ"], d["cycletotal"]) - ) - - # Generate the markup for the Tool Data Section - toolTables = "" - - toolLabel = translate("Path_Sanity", "Tool Number") - descriptionLabel = translate("Path_Sanity", "Description") - manufLabel = translate("Path_Sanity", "Manufacturer") - partNumberLabel = translate("Path_Sanity", "Part Number") - urlLabel = translate("Path_Sanity", "URL") - inspectionNotesLabel = translate("Path_Sanity", "Inspection Notes") - opLabel = translate("Path_Sanity", "Operation") - tcLabel = translate("Path_Sanity", "Tool Controller") - feedLabel = translate("Path_Sanity", "Feed Rate") - speedLabel = translate("Path_Sanity", "Spindle Speed") - shapeLabel = translate("Path_Sanity", "Tool Shape") - diameterLabel = translate("Path_Sanity", "Tool Diameter") - - d = data["toolData"] - - for key, value in d.items(): - toolTables += "=== {}: T{}\n".format(toolLabel, key) - - toolTables += "|===\n" - - toolTables += "|*{}*| {} a| image::{}[{}]\n".format( - descriptionLabel, value["description"], value["imagepath"], key - ) - toolTables += "|*{}* 2+| {}\n".format(manufLabel, value["manufacturer"]) - toolTables += "|*{}* 2+| {}\n".format(partNumberLabel, value["partNumber"]) - toolTables += "|*{}* 2+| {}\n".format(urlLabel, value["url"]) - toolTables += "|*{}* 2+| {}\n".format( - inspectionNotesLabel, value["inspectionNotes"] - ) - toolTables += "|*{}* 2+| {}\n".format(shapeLabel, value["shape"]) - toolTables += "|*{}* 2+| {}\n".format(diameterLabel, value["diameter"]) - toolTables += "|===\n" - - toolTables += "|===\n" - toolTables += ( - "|*" - + opLabel - + "*|*" - + tcLabel - + "*|*" - + feedLabel - + "*|*" - + speedLabel - + "*\n" - ) - for o in value["ops"]: - toolTables += ( - "|" - + o["Operation"] - + "|" - + o["ToolController"] - + "|" - + o["Feed"] - + "|" - + o["Speed"] - + "\n" - ) - toolTables += "|===\n" - - toolTables += "\n" - - # Generate the markup for the Rough Stock Section - stockTable = "" - xDimLabel = translate("Path_Sanity", "X Size") - yDimLabel = translate("Path_Sanity", "Y Size") - zDimLabel = translate("Path_Sanity", "Z Size") - materialLabel = translate("Path_Sanity", "Material") - - d = data["stockData"] - - stockTable += "|*{}*|{} .4+a|image::{}[stock]\n".format( - materialLabel, d["material"], d["stockImage"] - ) - stockTable += "|*{}*|{}".format(xDimLabel, d["xLen"]) - stockTable += "|*{}*|{}".format(yDimLabel, d["yLen"]) - stockTable += "|*{}*|{}".format(zDimLabel, d["zLen"]) - - # Generate the markup for the Fixture Section - - fixtureTable = "" - offsetsLabel = translate("Path_Sanity", "Work Offsets") - orderByLabel = translate("Path_Sanity", "Order By") - datumLabel = translate("Path_Sanity", "Part Datum") - - d = data["fixtureData"] - - fixtureTable += "|*{}*|{}\n".format(offsetsLabel, d["fixtures"]) - fixtureTable += "|*{}*|{}\n".format(orderByLabel, d["orderBy"]) - fixtureTable += "|*{}* a| image::{}[]".format(datumLabel, d["datumImage"]) - - # Generate the markup for the Output Section - - outTable = "" - d = data["outputData"] - - gcodeFileLabel = translate("Path_Sanity", "G-code File") - lastpostLabel = translate("Path_Sanity", "Last Post Process Date") - stopsLabel = translate("Path_Sanity", "Stops") - programmerLabel = translate("Path_Sanity", "Programmer") - machineLabel = translate("Path_Sanity", "Machine") - postLabel = translate("Path_Sanity", "Postprocessor") - flagsLabel = translate("Path_Sanity", "Post Processor Flags") - fileSizeLabel = translate("Path_Sanity", "File Size (kB)") - lineCountLabel = translate("Path_Sanity", "Line Count") - - outTable += "|*{}*|{}\n".format(gcodeFileLabel, d["lastgcodefile"]) - outTable += "|*{}*|{}\n".format(lastpostLabel, d["lastpostprocess"]) - outTable += "|*{}*|{}\n".format(stopsLabel, d["optionalstops"]) - outTable += "|*{}*|{}\n".format(programmerLabel, d["programmer"]) - outTable += "|*{}*|{}\n".format(machineLabel, d["machine"]) - outTable += "|*{}*|{}\n".format(postLabel, d["postprocessor"]) - outTable += "|*{}*|{}\n".format(flagsLabel, d["postprocessorFlags"]) - outTable += "|*{}*|{}\n".format(fileSizeLabel, d["filesize"]) - outTable += "|*{}*|{}\n".format(lineCountLabel, d["linecount"]) - - # Generate the markup for the Squawk Section - - noteLabel = translate("Path_Sanity", "Note") - operatorLabel = translate("Path_Sanity", "Operator") - dateLabel = translate("Path_Sanity", "Date") - - squawkTable = "|*{}*|*{}*|*{}*\n".format(noteLabel, operatorLabel, dateLabel) - - d = data["squawkData"] - for i in d["items"]: - squawkTable += "a|{}: {}".format(i["squawkType"], i["Note"]) - squawkTable += "|{}".format(i["Operator"]) - squawkTable += "|{}".format(i["Date"]) - squawkTable += "\n" - - # merge template and custom markup - - report = reportTemplate.format( - jobname=jobname, - infoTable=infoTable, - runTable=runTable, - toolTables=toolTables, - stockTable=stockTable, - fixtureTable=fixtureTable, - outTable=outTable, - squawkTable=squawkTable, - ) # Save the report + subsLookup = os.path.splitext(os.path.basename(obj.PostProcessorOutputFile))[0] + foundSub = False + + for elem in ["%D", "%d", "%M", "%j"]: + if elem in subsLookup: + foundSub = True + break + + if foundSub: + filepath = self.resolveOutputFile(obj) + Path.Log.debug("filepath: {}".format(filepath)) + + # Make sure the filepath is fully qualified + if os.path.basename(filepath) == filepath: + filepath = f"{os.path.dirname(FreeCAD.ActiveDocument.FileName)}/{filepath}" + Path.Log.debug("filepath: {}".format(filepath)) + base_name = os.path.splitext(filepath)[0] + reporthtml = base_name + ".html" + else: + reporthtml = self.outputpath + data["outputData"]["outputfilename"] + ".html" + - reportraw = self.outputpath + data["outputData"]["outputfilename"] + ".asciidoc" - reporthtml = self.outputpath + data["outputData"]["outputfilename"] + ".html" # Python 3.11 aware - with codecs.open(reportraw, encoding="utf-8", mode="w") as fd: - fd.write(report) - fd.close() - FreeCAD.Console.PrintMessage( - "asciidoc file written to {}\n".format(reportraw) - ) - with codecs.open(reporthtml, encoding="utf-8", mode="w") as fd: fd.write(reportHtmlTemplate) fd.close() diff --git a/src/Mod/Path/Path/Main/Job.py b/src/Mod/Path/Path/Main/Job.py index ff1acd87f4..816f6494d3 100644 --- a/src/Mod/Path/Path/Main/Job.py +++ b/src/Mod/Path/Path/Main/Job.py @@ -655,10 +655,10 @@ class ObjectJob: attrs[JobTemplate.Description] = obj.Description return attrs - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): for obj in FreeCAD.ActiveDocument.Objects: if hasattr(obj, "Proxy") and obj.Proxy == self: self.obj = obj diff --git a/src/Mod/Path/Path/Main/Stock.py b/src/Mod/Path/Path/Main/Stock.py index 23d970d59b..6d14b66c0d 100644 --- a/src/Mod/Path/Path/Main/Stock.py +++ b/src/Mod/Path/Path/Main/Stock.py @@ -194,10 +194,10 @@ class StockFromBase(Stock): self.width = None self.height = None - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def execute(self, obj): @@ -260,10 +260,10 @@ class StockCreateBox(Stock): obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def execute(self, obj): @@ -305,10 +305,10 @@ class StockCreateCylinder(Stock): obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def execute(self, obj): diff --git a/src/Mod/Path/Path/Op/Base.py b/src/Mod/Path/Path/Op/Base.py index 0dcd89b89a..8154066ab9 100644 --- a/src/Mod/Path/Path/Op/Base.py +++ b/src/Mod/Path/Path/Op/Base.py @@ -466,12 +466,12 @@ class ObjectOp(object): self.setEditorModes(obj, features) self.opOnDocumentRestored(obj) - def __getstate__(self): + def dumps(self): """__getstat__(self) ... called when receiver is saved. Can safely be overwritten by subclasses.""" return None - def __setstate__(self, state): + def loads(self, state): """__getstat__(self) ... called when receiver is restored. Can safely be overwritten by subclasses.""" return None diff --git a/src/Mod/Path/Path/Op/Gui/Array.py b/src/Mod/Path/Path/Op/Gui/Array.py index 0031a1adba..48537bd750 100644 --- a/src/Mod/Path/Path/Op/Gui/Array.py +++ b/src/Mod/Path/Path/Op/Gui/Array.py @@ -148,10 +148,10 @@ class ObjectArray: self.setEditorModes(obj) obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def setEditorModes(self, obj): @@ -431,10 +431,10 @@ class ViewProviderArray: self.Object = vobj.Object return - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def claimChildren(self): diff --git a/src/Mod/Path/Path/Op/Gui/Base.py b/src/Mod/Path/Path/Op/Gui/Base.py index 6429fb3d28..0de7699b48 100644 --- a/src/Mod/Path/Path/Op/Gui/Base.py +++ b/src/Mod/Path/Path/Op/Gui/Base.py @@ -135,8 +135,8 @@ class ViewProvider(object): if self.panel: self.panel.reject(False) - def __getstate__(self): - """__getstate__() ... callback before receiver is saved to a file. + def dumps(self): + """dumps() ... callback before receiver is saved to a file. Returns a dictionary with the receiver's resources as strings.""" Path.Log.track() state = {} @@ -146,9 +146,9 @@ class ViewProvider(object): state["OpPageClass"] = self.OpPageClass return state - def __setstate__(self, state): - """__setstate__(state) ... callback on restoring a saved instance, pendant to __getstate__() - state is the dictionary returned by __getstate__().""" + def loads(self, state): + """loads(state) ... callback on restoring a saved instance, pendant to dumps() + state is the dictionary returned by dumps().""" self.OpName = state["OpName"] self.OpIcon = state["OpIcon"] self.OpPageModule = state["OpPageModule"] diff --git a/src/Mod/Path/Path/Op/Gui/Comment.py b/src/Mod/Path/Path/Op/Gui/Comment.py index a359347892..ae04273043 100644 --- a/src/Mod/Path/Path/Op/Gui/Comment.py +++ b/src/Mod/Path/Path/Op/Gui/Comment.py @@ -44,10 +44,10 @@ class Comment: mode = 2 obj.setEditorMode("Placement", mode) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onChanged(self, obj, prop): @@ -74,10 +74,10 @@ class _ViewProviderComment: vobj.setEditorMode("Transparency", mode) vobj.setEditorMode("Visibility", mode) - def __getstate__(self): # mandatory + def dumps(self): # mandatory return None - def __setstate__(self, state): # mandatory + def loads(self, state): # mandatory return None def getIcon(self): # optional diff --git a/src/Mod/Path/Path/Op/Gui/Copy.py b/src/Mod/Path/Path/Op/Gui/Copy.py index 001591ba5b..7e27330778 100644 --- a/src/Mod/Path/Path/Op/Gui/Copy.py +++ b/src/Mod/Path/Path/Op/Gui/Copy.py @@ -51,10 +51,10 @@ class ObjectPathCopy: ) obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def execute(self, obj): @@ -79,10 +79,10 @@ class ViewProviderPathCopy: def getIcon(self): return ":/icons/Path_Copy.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None diff --git a/src/Mod/Path/Path/Op/Gui/Hop.py b/src/Mod/Path/Path/Op/Gui/Hop.py index d3b2a04f32..789e728cb1 100644 --- a/src/Mod/Path/Path/Op/Gui/Hop.py +++ b/src/Mod/Path/Path/Op/Gui/Hop.py @@ -46,10 +46,10 @@ class ObjectHop: ) obj.Proxy = self - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def execute(self, obj): @@ -87,10 +87,10 @@ class ViewProviderPathHop: def getIcon(self): return ":/icons/Path_Hop.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None diff --git a/src/Mod/Path/Path/Op/Gui/Stop.py b/src/Mod/Path/Path/Op/Gui/Stop.py index b6dbba9a4f..89d1ac0588 100644 --- a/src/Mod/Path/Path/Op/Gui/Stop.py +++ b/src/Mod/Path/Path/Op/Gui/Stop.py @@ -46,10 +46,10 @@ class Stop: mode = 2 obj.setEditorMode("Placement", mode) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onChanged(self, obj, prop): @@ -81,10 +81,10 @@ class _ViewProviderStop: vobj.setEditorMode("Transparency", mode) vobj.setEditorMode("Visibility", mode) - def __getstate__(self): # mandatory + def dumps(self): # mandatory return None - def __setstate__(self, state): # mandatory + def loads(self, state): # mandatory return None def getIcon(self): # optional diff --git a/src/Mod/Path/Path/Post/scripts/estlcam_post.py b/src/Mod/Path/Path/Post/scripts/estlcam_post.py index 0068a2a95d..eb3f53ee76 100644 --- a/src/Mod/Path/Path/Post/scripts/estlcam_post.py +++ b/src/Mod/Path/Path/Post/scripts/estlcam_post.py @@ -27,11 +27,13 @@ import FreeCAD from FreeCAD import Units -import PathScripts.PostUtils as PostUtils +import Path +import Path.Base.Util as PathUtil +import Path.Post.Utils as PostUtils +import PathScripts.PathUtils as PathUtils import argparse import datetime import shlex -import PathScripts.PathUtil as PathUtil import re @@ -418,7 +420,7 @@ def parse(pathobj): if OUTPUT_COMMENTS: out += linenumber() + "(Path: " + pathobj.Label + ")\n" - for c in pathobj.Path.Commands: + for c in PathUtils.getPathWithPlacement(pathobj).Commands: outstring = [] command = c.Name diff --git a/src/Mod/Path/Path/Tool/Bit.py b/src/Mod/Path/Path/Tool/Bit.py index 7fb08b9c22..a3f542072d 100644 --- a/src/Mod/Path/Path/Tool/Bit.py +++ b/src/Mod/Path/Path/Tool/Bit.py @@ -183,10 +183,10 @@ class ToolBit(object): self._setupBitShape(obj) self.onDocumentRestored(obj) - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): for obj in FreeCAD.ActiveDocument.Objects: if hasattr(obj, "Proxy") and obj.Proxy == self: self.obj = obj diff --git a/src/Mod/Path/Path/Tool/Gui/Bit.py b/src/Mod/Path/Path/Tool/Gui/Bit.py index 1aa9000242..c50b168579 100644 --- a/src/Mod/Path/Path/Tool/Gui/Bit.py +++ b/src/Mod/Path/Path/Tool/Gui/Bit.py @@ -70,10 +70,10 @@ class ViewProvider(object): return QtGui.QIcon(pixmap) return ":/icons/Path_ToolBit.svg" - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def onDelete(self, vobj, arg2=None): diff --git a/src/Mod/Path/Path/Tool/Gui/Controller.py b/src/Mod/Path/Path/Tool/Gui/Controller.py index 29987bdc62..df3af5a54f 100644 --- a/src/Mod/Path/Path/Tool/Gui/Controller.py +++ b/src/Mod/Path/Path/Tool/Gui/Controller.py @@ -64,10 +64,10 @@ class ViewProvider: vobj.setEditorMode("Visibility", mode) self.vobj = vobj - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): return None def getIcon(self): diff --git a/src/Mod/Points/Gui/Resources/translations/Points_de.ts b/src/Mod/Points/Gui/Resources/translations/Points_de.ts index 1893126d41..122fcc66d1 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_de.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_de.ts @@ -17,7 +17,7 @@ Convert to points - In Punkte umwandeln + Wandelt ausgewählte Objekte in Punkte um diff --git a/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts b/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts index 2498b343da..bfda02d9a9 100644 --- a/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts +++ b/src/Mod/Points/Gui/Resources/translations/Points_pt-BR.ts @@ -74,7 +74,7 @@ Merge several point clouds into one - Mesclar várias pontos nuvens em uma + Mesclar vários pontos nuvens em uma @@ -155,7 +155,7 @@ Cut points - Recortar pontos + Pontos de nó diff --git a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts index bc7f654706..6ce760d197 100644 --- a/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts +++ b/src/Mod/ReverseEngineering/Gui/Resources/translations/ReverseEngineering_de.ts @@ -521,7 +521,7 @@ Minimum number of faces - Minimale Anzahl von Dreiecken + Mindestanzahl von Dreiecken diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot.ts b/src/Mod/Robot/Gui/Resources/translations/Robot.ts index cf90c0963b..71a458fe46 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot - + Add tool - + Add a tool shape to the robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot - + Place robot... - + Place a robot (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot - + Edge to Trajectory... - + Generate a Trajectory from a set of edges @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot - + Kuka full subroutine... - + Export the trajectory as a full KRL subroutine. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot - + Kuka IR125 - + Insert a Kuka IR125 into the document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot - + Kuka IR16 - + Insert a Kuka IR16 into the document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot - + Kuka IR210 - + Insert a Kuka IR210 into the document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot - + Insert in trajectory - + Insert robot Tool location into trajectory @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot - + Insert in trajectory - + Insert preselection position into trajectory (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot - - + + Move to home @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot - + Set default orientation - + Set the default orientation for subsequent commands for waypoint creation @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot - + Set default values - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot - + Simulate a trajectory - + Run a simulation on a trajectory @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot - + Trajectory compound... - + Group and connect some trajectories to one @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot - + Dress-up trajectory... - + Create a dress-up object which overrides some aspects of a trajectory @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection @@ -376,115 +376,115 @@ - + Select one Robot - - - - - + + + + + Select one Robot and one Trajectory object. - + Trajectory not valid - + You need at least two waypoints in a trajectory to simulate. - - + + KRL file - - + + All Files - - + + Export program - + Select one robot and one shape or VRML object. - - + + Select one Trajectory object. - + No preselection - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. - + Set default speed - + speed: (e.g. 1 m/s or 3 cm/s) - + Set default continuity - + continuous ? - + Set default acceleration - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) - + Select the Trajectory which you want to dress up. - + Modify - + No robot files installed - + Please visit %1 and copy the files to %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter + + + Hide / Show + + + + + Edges: 0 + + + + + Cluster: 0 + + + + + Sizing Value: + + + + + Use orientation of edge + + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - - - - - RobotGui::TaskTrajectory - - - |< - - - - - < - - - - - |> - - - - - > - - - - - >| - - - - - 10 ms - - - - - 50 ms - - - - - 100 ms - - - - - 500 ms - - - - - 1 s - - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - - Type - - - - - Name - - - - - C - - - - - V - - - - - A - - - - - Trajectory - - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - - - - - TaskEdge2TracParameter - - - Hide / Show - - - - - Edges: 0 - - - - - Cluster: 0 - - - - - Sizing Value: - - - - - Use orientation of edge - - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + + + + + < + + + + + |> + + + + + > + + + + + >| + + + + + 10 ms + + + + + 50 ms + + + + + 100 ms + + + + + 500 ms + + + + + 1 s + + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + + Type + + + + + Name + + + + + C + + + + + V + + + + + A + + + + + Trajectory + + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_be.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_be.ts index f774064b1e..69705460c5 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_be.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_be.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Робат - + Add tool Дадаць інструмент - + Add a tool shape to the robot Дадаць інструмент фігуры для робата @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Робат - + Place robot... Размясціць робата... - + Place a robot (experimental!) Размясціць робат (эксперыментальна!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Робат - + Edge to Trajectory... Рабро ў Траекторыю... - + Generate a Trajectory from a set of edges Стварыць траекторыю з набору рэбраў @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Робат - + Kuka full subroutine... Поўная Kuka падпраграма... - + Export the trajectory as a full KRL subroutine. Экспарт траекторыі як поўная KRL падпраграма. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Робат - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Уставіць Kuka IR125 у дакумент. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Робат - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Уставіць Kuka IR16 у дакумент. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Робат - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Уставіць Kuka IR210 у дакумент. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Робат - + Insert in trajectory Уставіць у траекторыю - + Insert robot Tool location into trajectory Уставіць месцазнаходжанне інструмента робата ў траекторыю @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Робат - + Insert in trajectory Уставіць у траекторыю - + Insert preselection position into trajectory (W) Уставіць папярэдняе становішча ў траекторыю (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Робат - - + + Move to home Рухацца ў першапачатковую кропку @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Робат - + Set default orientation Задаць першапачатковую арыентацыю - + Set the default orientation for subsequent commands for waypoint creation Задаць першапачатковую арыентацыю для наступных каманд для стварэння шляхавай кропкі @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Робат - + Set default values Задаць першапачатковае значэнне - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Задаць першапачатковае значэнне для хуткасці, паскарэння і бесперапыннасці для наступных каманд стварэння шляхавых кропак @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Робат - + Simulate a trajectory Мадэляванне траекторыі - + Run a simulation on a trajectory Выканаць мадэляваную траекторыю @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Робат - + Trajectory compound... Злучэнне траекторый... - + Group and connect some trajectories to one Згрупаваць і злучыць некалькі траекторый у адну @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Робат - + Dress-up trajectory... Паляпшэнне траекторыі... - + Create a dress-up object which overrides some aspects of a trajectory Стварыць аб'ект паляпшэння, які замяняе некаторыя аспекты траекторыі @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Няправільны выбар @@ -376,115 +376,115 @@ Абраць адзін Робат, каб задаць першапачатковае становішча - + Select one Robot Абраць адзін Робат - - - - - + + + + + Select one Robot and one Trajectory object. Абраць адзін Робат і адну траекторыю аб'екта. - + Trajectory not valid Недапушчальная траекторыя - + You need at least two waypoints in a trajectory to simulate. Для мадэлявання патрэбна, прынамсі, дзве шляхавыя кропкі на траекторыі. - - + + KRL file KRL файл - - + + All Files Усе файлы - - + + Export program Экспарт праграмы - + Select one robot and one shape or VRML object. Абраць адзін робат і адну фігуру ці VRML аб'ект. - - + + Select one Trajectory object. Абраць адну траекторыю аб'екта. - + No preselection Нічога не абрана - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Каб ужыць каманду, навядзіце курсор мышы на геаметрыю (папярэдне абраную). Падрабязнасці глядзіце ў дакументацыі. - + Set default speed Задаць першапачатковую хуткасць - + speed: (e.g. 1 m/s or 3 cm/s) хуткасць: (напрыклад 1 м/с ці 3 см/с) - + Set default continuity Задаць першапачатковую бесперапыннасць - + continuous ? працягласць ? - + Set default acceleration Задаць першапачатковае паскарэнне - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) паскарэнне: (напрыклад 1 м/с^2 ці 3 см/с^2) - + Select the Trajectory which you want to dress up. Абраць траекторыю, якую патрэбна палепшыць. - + Modify Змяніць - + No robot files installed Файлы робата не ўсталяваны - + Please visit %1 and copy the files to %2 Калі ласка, наведайце %1 і скапіруйце файлы ў %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Схаваць / Паказаць + + + + Edges: 0 + Рэбры: 0 + + + + Cluster: 0 + Кластер: 0 + + + + Sizing Value: + Памер значэння: + + + + Use orientation of edge + Ужыць арыентацыю рабра + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 мс - - - - 50 ms - 50 мс - - - - 100 ms - 100 мс - - - - 500 ms - 500 мс - - - - 1 s - 1 с - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Тып - - - - Name - Назва - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Схаваць / Паказаць - - - - Edges: 0 - Рэбры: 0 - - - - Cluster: 0 - Кластер: 0 - - - - Sizing Value: - Памер значэння: - - - - Use orientation of edge - Ужыць арыентацыю рабра - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 мс + + + + 50 ms + 50 мс + + + + 100 ms + 100 мс + + + + 500 ms + 500 мс + + + + 1 s + 1 с + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Тып + + + + Name + Назва + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_ca.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_ca.ts index 5a9e7b590b..a0a285bb36 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_ca.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_ca.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Afegeix una eina - + Add a tool shape to the robot Afegeix una forma d'eina al robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Col·loca un robot... - + Place a robot (experimental!) Col·loca un robot (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Vora de la trajectòria... - + Generate a Trajectory from a set of edges Genera la trajectòria d'un conjunt de vores @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Subrutina Kuka completa... - + Export the trajectory as a full KRL subroutine. Exporta la trajectòria com una subrutina KRL. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Insereix un Kuka IR125 en el document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Insereix un Kuka IR125 en el document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Insereix un Kuka IR210 en el document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Insereix en la trajectòria - + Insert robot Tool location into trajectory Insereix ubicació d'eina del robot a trajectòria @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Insereix en la trajectòria - + Insert preselection position into trajectory (W) Insereix la preselecció de posició en trajectòria (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Desplaça-ho a casa @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Estableix l'orientació per defecte - + Set the default orientation for subsequent commands for waypoint creation Estableix l'orientació per defecte per a ordres posteriors per a la creació de fites @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Estableix els valors per defecte - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Estableix els valors per defecte de velocitat, acceleració i continuïtat per a ordres posteriors de creació de fites @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simula una trajectòria - + Run a simulation on a trajectory Executa una simulació en una trajectòria @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Compost de trajectòria... - + Group and connect some trajectories to one Agrupar i connectar algunes trajectòries a una @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Modificació de la trajectòria... - + Create a dress-up object which overrides some aspects of a trajectory Crea un objecte modificat que invalida alguns aspectes d'una trajectòria @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Selecció incorrecta @@ -376,115 +376,115 @@ Seleccionar un Robot per establir la posició inicial - + Select one Robot Selecciona un Robot - - - - - + + + + + Select one Robot and one Trajectory object. Selecciona un Robot i un objecte de trajectòria. - + Trajectory not valid Trajectòria no vàlida - + You need at least two waypoints in a trajectory to simulate. Necessiteu almenys dos punts de camí en una trajectòria per a la simulació. - - + + KRL file Fitxer KRL - - + + All Files Tots els fitxers - - + + Export program Programa d'exportació - + Select one robot and one shape or VRML object. Seleccionar un robot i una forma o objecte VRML. - - + + Select one Trajectory object. Selecciona un objecte trajectòria. - + No preselection Cap preselecció - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Heu de passar per sobre d'una geometria (preselecció) amb el ratolí per a utilitzar aquesta instrucció. Vegeu la documentació per a més detalls. - + Set default speed Estableix la velocitat per defecte - + speed: (e.g. 1 m/s or 3 cm/s) velocitat: (per exemple, 1 m/s o 3 cm/s) - + Set default continuity Estableix la continuïtat per defecte - + continuous ? continu? - + Set default acceleration Estableix l'acceleració per defecte - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) acceleració: (per exemple, 1 m/s^2 o 3 cm/s^2) - + Select the Trajectory which you want to dress up. Seleccionar la trajectòria que vol modificar. - + Modify Modifica - + No robot files installed No hi ha fitxers de robot instal·lats - + Please visit %1 and copy the files to %2 Si us plau visiteu %1 i copieu els fitxers a %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Amaga / Mostra + + + + Edges: 0 + Vores: 0 + + + + Cluster: 0 + Clúster: 0 + + + + Sizing Value: + Valor de la dimensió: + + + + Use orientation of edge + Utilitza l'orientació de la vora + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343, 343) - - - - Type - Tipus - - - - Name - Nom - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Amaga / Mostra - - - - Edges: 0 - Vores: 0 - - - - Cluster: 0 - Clúster: 0 - - - - Sizing Value: - Valor de la dimensió: - - - - Use orientation of edge - Utilitza l'orientació de la vora - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343, 343) + + + + Type + Tipus + + + + Name + Nom + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_cs.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_cs.ts index b4c172894f..fe9d37d946 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_cs.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_cs.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Přidat nástroj - + Add a tool shape to the robot Přidat robotovi tvar nástroje @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Umístit robota... - + Place a robot (experimental!) Unístit robota (experimentální!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Trajektorie z hrany... - + Generate a Trajectory from a set of edges Vytvořit trajektorii z množiny hran @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Plný podprogram Kuki... - + Export the trajectory as a full KRL subroutine. Exportovat trajektorii jako plný KRL podprogram. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Vložit Kuka IR125 do dokumentu. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Vložit Kuka IR16 do dokumentu. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Vložit Kuka IR210 do dokumentu. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Vložit do trajektorie - + Insert robot Tool location into trajectory Vložit polohu robotova nástroje do trajektorie @@ -202,31 +202,31 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Vložit do trajektorie - + Insert preselection position into trajectory (W) - Vložit předvolenou pozici do trajektorie (W) + Vložit předvolenou polohu do trajektorie (W) CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Posunout do počátku @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Nastavit výchozí orientaci - + Set the default orientation for subsequent commands for waypoint creation Nastavit výchozí orientaci pro následující příkazy vytvářející body trajektorie @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Nastavit výchozí hodnoty - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Nastavit výchozí hodnoty pro rychlost, zrychlení a spojení mezi následujícícmi příkazy tvorby bodů trajektorie @@ -278,23 +278,23 @@ Set the home position - Nastavit výchozí pozici + Nastavit výchozí polohu CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simulovat trajektorii - + Run a simulation on a trajectory Spustit simulaci na trajektorii @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Složená trajektorie... - + Group and connect some trajectories to one Seskupit a propojit trajektorie do jedné @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Nastavit trajektorii... - + Create a dress-up object which overrides some aspects of a trajectory Vytvoří objekt nastavavení, který přepíše některé aspekty trajektorie @@ -357,134 +357,134 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Neplatný výběr Select one Robot to set home position - Vyberte jednoho robota k nastavení výchozí souřadnice + Vyberte jednoho robota k nastavení výchozí polohy - + Select one Robot Vyberte robota - - - - - + + + + + Select one Robot and one Trajectory object. Vyberte jednoho robota a objekt jedné trakjektorie. - + Trajectory not valid Trajektorie není platná - + You need at least two waypoints in a trajectory to simulate. K simulaci potřebujete alespoň dva body na trajektorii. - - + + KRL file KRL soubor - - + + All Files Všechny soubory - - + + Export program Exportovat program - + Select one robot and one shape or VRML object. Vyberte jednoho robota a jeden objekt tvaru nebo VRML objekt. - - + + Select one Trajectory object. Vyberte jeden objekt trajektorie. - + No preselection Prázdný předvýběr - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Pro použití tohoto příkazu musíte najet myší na geometrii (předvýběr). Detaily viz dokumentace. - + Set default speed Nastavit výchozí rychlost - + speed: (e.g. 1 m/s or 3 cm/s) rychlost: (např. 1 m/s nebo 3 cm/s) - + Set default continuity Nastavit výchozí spojitost - + continuous ? kontinuální? - + Set default acceleration Nastavit výchozí zrychlení - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) zrychlení: (např. 1 m/s^2 nebo 3 cm/s^2) - + Select the Trajectory which you want to dress up. Vyberte trajektrorii, kterou chcete nastavit. - + Modify Upravit - + No robot files installed Nejsou nainstalovány soubory robota - + Please visit %1 and copy the files to %2 Prosím, navštivte %1 a zkopírujte soubory do %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Skrýt / Zobrazit + + + + Edges: 0 + Hran: 0 + + + + Cluster: 0 + Svazek: 0 + + + + Sizing Value: + Hodnota velikosti: + + + + Use orientation of edge + Použít orientaci hrany + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pozice: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Typ - - - - Name - Jméno - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Skrýt / Zobrazit - - - - Edges: 0 - Hran: 0 - - - - Cluster: 0 - Svazek: 0 - - - - Sizing Value: - Hodnota velikosti: - - - - Use orientation of edge - Použít orientaci hrany - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pozice: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Typ + + + + Name + Jméno + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: @@ -905,7 +893,7 @@ Position and Orientation: - Umístění a orientace: + Poloha a orientace: @@ -920,7 +908,7 @@ Add Position - Přidat pozici + Přidat polohu diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_de.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_de.ts index 4b091fcb39..dea34f7ea4 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_de.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_de.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Roboter - + Add tool Werkzeug hinzufügen - + Add a tool shape to the robot Hinzufügen einer Werkzeug-Form zum Roboter @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Roboter - + Place robot... Plaziert einen Roboter... - + Place a robot (experimental!) Platziere einen Roboter (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Roboter - + Edge to Trajectory... Bewegungsbahn aus Kanten... - + Generate a Trajectory from a set of edges Erstellen einer Bewegungsbahn aus einer Menge von Kanten @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Roboter - + Kuka full subroutine... KUKA vollständiges Unterprogramm ... - + Export the trajectory as a full KRL subroutine. Exportieren Sie die Bewegungsbahn als eine volle KRL-Unterroutine. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Roboter - + Kuka IR125 KUKA IR125 - + Insert a Kuka IR125 into the document. Einen Kuka-IR125 in das Dokument einfügen. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Roboter - + Kuka IR16 KUKA IR16 - + Insert a Kuka IR16 into the document. Einen Kuka-IR16 in das Dokument einfügen. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Roboter - + Kuka IR210 KUKA IR210 - + Insert a Kuka IR210 into the document. Einen Kuka-IR210 in das Dokument einfügen. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Roboter - + Insert in trajectory In Bewegungsbahn einfügen - + Insert robot Tool location into trajectory Lage des Roboterwerkzeugs in Bewegungsbahn einfügen @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Roboter - + Insert in trajectory In Bewegungsbahn einfügen - + Insert preselection position into trajectory (W) Vorausgewählte Position in Bewegungsbahn einfügen (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Roboter - - + + Move to home Zur Ausgangsposition bewegen @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Roboter - + Set default orientation Setze Standardrichtung - + Set the default orientation for subsequent commands for waypoint creation Lege die Standardausrichtung für nachfolgende Befehle zur Wegpunkterstellung fest @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Roboter - + Set default values Festlegen von Standardwerten - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Lege die Standardwerte für Geschwindigkeit, Beschleunigung und Dauer für nachfolgende Befehle zur Wegpunkterstellung fest @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Roboter - + Simulate a trajectory Simulieren einer Bewegungsbahn - + Run a simulation on a trajectory Simulation der Bewegungsbahn starten @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Roboter - + Trajectory compound... Bewegungsbahnverbund ... - + Group and connect some trajectories to one Gruppieren und Verbinden mehrerer Bewegungsbahnen zu einer einzigen @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Roboter - + Dress-up trajectory... Verkleidete Bewegungsbahn... - + Create a dress-up object which overrides some aspects of a trajectory Erstellt ein Verkleidungsobjekt, das gewisse Eigenschaften einer Bewegungsbahn überschreibt @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Falsche Auswahl @@ -376,116 +376,116 @@ Wählen Sie einen Roboter aus, um die Home Position festzulegen - + Select one Robot Einen Roboter auswählen - - - - - + + + + + Select one Robot and one Trajectory object. Wählen Sie einen Roboter und eine Bewegungsbahn. - + Trajectory not valid Bewegungsbahn nicht gültig - + You need at least two waypoints in a trajectory to simulate. Sie benötigen für die Simulation mindestens zwei Wegpunkte auf der Bewegungsbahn. - - + + KRL file KRL-Datei - - + + All Files Alle Dateien - - + + Export program Programm exportieren - + Select one robot and one shape or VRML object. Wählen Sie einen Roboter und eine Form oder ein VRML-Objekt. - - + + Select one Trajectory object. Eine Bewegungsbahn wählen. - + No preselection Keine Vorauswahl - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Sie müssen die Maus über eine Geometrie (Preselection) positionieren, um diesen Befehl zu verwenden. Siehe Dokumentation für Details. - + Set default speed Standardgeschwindigkeit einstellen - + speed: (e.g. 1 m/s or 3 cm/s) Geschwindigkeit: (z.B. 1 m/s oder 3 cm/s) - + Set default continuity Setze Standart Dauer - + continuous ? Fortlaufend ? - + Set default acceleration Standardbeschleunigung einstellen - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) Beschleunigung: (zB 1 m / s ^ 2 oder 3 cm / s ^ 2) - + Select the Trajectory which you want to dress up. Wählen Sie die Bewegungsbahn die Sie verwenden wollen. - + Modify Bearbeiten - + No robot files installed Keine Roboter-Dateien installiert - + Please visit %1 and copy the files to %2 Bitte gehen Sie zu %1 und kopieren Sie die Dateien in %2 @@ -555,6 +555,31 @@ Siehe Dokumentation für Details. TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Verbergen / Zeigen + + + + Edges: 0 + Punkte: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Größenwert: + + + + Use orientation of edge + Verwende Richtung der Kante + RobotGui::TaskRobot6Axis @@ -607,145 +632,10 @@ Siehe Dokumentation für Details. RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Position: (200,23, 300,23, 400,23, 234, 343, 343) - - - - Type - Typ - - - - Name - Name - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Bewegungsbahn - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Verbergen / Zeigen - - - - Edges: 0 - Punkte: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Größenwert: - - - - Use orientation of edge - Verwende Richtung der Kante - - - - TaskRobotControl X+ @@ -858,7 +748,12 @@ Siehe Dokumentation für Details. - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -866,7 +761,100 @@ Siehe Dokumentation für Details. - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Position: (200,23, 300,23, 400,23, 234, 343, 343) + + + + Type + Typ + + + + Name + Name + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Bewegungsbahn + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_el.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_el.ts index 918882cf33..6793847337 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_el.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_el.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Ρομπότ - + Add tool Προσθήκη εργαλείου - + Add a tool shape to the robot Προσθήκη ενός σχήματος εργαλείου στο ρομπότ @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Ρομπότ - + Place robot... Τοποθέτηση ρομπότ... - + Place a robot (experimental!) Τοποθέτηση ενός ρομπότ (πειραματική!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Ρομπότ - + Edge to Trajectory... Ακμή της Τροχιάς... - + Generate a Trajectory from a set of edges Δημιουργήστε μια Τροχιά από ένα σύνολο ακμών @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Ρομπότ - + Kuka full subroutine... Πλήρης υπορουτίνα Kuka... - + Export the trajectory as a full KRL subroutine. Εξαγωγή της τροχιάς ως μιας πλήρους υπορουτίνας KRL. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Ρομπότ - + Kuka IR125 Ρομπότ Kuka IR125 - + Insert a Kuka IR125 into the document. Εισαγωγή ενός ρομπότ Kuka IR125 στο έγγραφο. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Ρομπότ - + Kuka IR16 Ρομπότ Kuka IR16 - + Insert a Kuka IR16 into the document. Εισαγωγή ενός ρομπότ Kuka IR16 στο έγγραφο. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Ρομπότ - + Kuka IR210 Ρομπότ Kuka IR210 - + Insert a Kuka IR210 into the document. Εισαγωγή ενός ρομπότ Kuka IR210 στο έγγραφο. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Ρομπότ - + Insert in trajectory Εισαγωγή στην τροχιά - + Insert robot Tool location into trajectory Εισαγωγή της θέσης του Εργαλείου ρομπότ στην τροχιά @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Ρομπότ - + Insert in trajectory Εισαγωγή στην τροχιά - + Insert preselection position into trajectory (W) Εισαγωγή της θέσης προεπιλογής στην τροχιά (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Ρομπότ - - + + Move to home Μετακίνηση στην θέση εκκίνησης @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Ρομπότ - + Set default orientation Ορισμός προεπιλεγμένου προσανατολισμού - + Set the default orientation for subsequent commands for waypoint creation Ορισμός του προεπιλεγμένου προσανατολισμού για μεταγενέστερες εντολές δημιουργίας σημείου διέλευσης @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Ρομπότ - + Set default values Ορισμός προεπιλεγμένων τιμών - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Ορισμός προεπιλεγμένων τιμών ταχύτητας, επιτάχυνσης και συνέχειας για μεταγενέστερες εντολές δημιουργίας σημείου διέλευσης @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Ρομπότ - + Simulate a trajectory Προσομοίωση μιας τροχιάς - + Run a simulation on a trajectory Εκτέλεση μιας προσομοίωσης τροχιάς @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Ρομπότ - + Trajectory compound... Σύνθετη τροχιά... - + Group and connect some trajectories to one Ομαδοποίηση και ένωση μερικών τροχιών σε μια @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Ρομπότ - + Dress-up trajectory... Αναδιαμόρφωση τροχιάς... - + Create a dress-up object which overrides some aspects of a trajectory Δημιουργήστε ένα αντικείμενο αναδιαμόρφωσης που αντικαθιστά κάποιες πτυχές μιας τροχιάς @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Λάθος επιλογή @@ -376,115 +376,115 @@ Επιλέξτε ένα Ρομπότ για ορισμό της θέσης εκκίνησης - + Select one Robot Επιλέξτε ένα Ρομπότ - - - - - + + + + + Select one Robot and one Trajectory object. Επιλέξτε ένα Ρομπότ και ένα Αντικείμενο Τροχιάς. - + Trajectory not valid Η τροχιά δεν είναι έγκυρη - + You need at least two waypoints in a trajectory to simulate. Απαιτούνται τουλάχιστον δύο σημεία της τροχιά για προσομοίωση. - - + + KRL file Αρχείο KRL - - + + All Files Όλα τα Αρχεία - - + + Export program Εξαγωγή προγράμματος - + Select one robot and one shape or VRML object. Επιλέξτε ένα ρομπότ και ένα σχήμα ή αντικείμενο VRML. - - + + Select one Trajectory object. Επιλέξτε ένα αντικείμενο Τροχιάς. - + No preselection Καμία προεπιλογή - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Πρέπει να τοποθετήσετε το ποντίκι πάνω από μια γεωμετρία (Προεπιλογή) με το ποντίκι για να χρησιμοποιήσετε αυτήν την εντολή. Δείτε τεκμηρίωση για λεπτομέρειες. - + Set default speed Ορισμός προεπιλεγμένης τιμής ταχύτητας - + speed: (e.g. 1 m/s or 3 cm/s) ταχύτητα: (π.χ. 1 μέτρο/δευτερόλεπτο^2 ή 3 εκατοστά/δευτερόλεπτο^2) - + Set default continuity Ορισμός προεπιλεγμένης τιμής συνέχειας - + continuous ? συνεχής ; - + Set default acceleration Ορισμός προεπιλεγμένης τιμής επιτάχυνσης - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) επιτάχυνση: (π.χ. 1 μέτρο/δευτερόλεπτο^2 ή 3 εκατοστά/δευτερόλεπτο^2) - + Select the Trajectory which you want to dress up. Επιλέξτε την Τροχιά που θέλετε να αναδιαμορφώσετε. - + Modify Τροποποίηση - + No robot files installed Δεν έχουν εγκατασταθεί αρχεία ρομπότ - + Please visit %1 and copy the files to %2 Παρακαλώ επισκεφθείτε το %1 και αντιγράψτε τα αρχεία στο %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Απόκρυψη / Εμφάνιση + + + + Edges: 0 + Ακμές: 0 + + + + Cluster: 0 + Σύμπλεγμα: 0 + + + + Sizing Value: + Τιμή Μεγέθους: + + + + Use orientation of edge + Χρήση του προσανατολισμού της ακμής + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 χιλιοστά του δευτερολέπτου - - - - 50 ms - 50 χιλιοστά του δευτερολέπτου - - - - 100 ms - 100 χιλιοστά του δευτερολέπτου - - - - 500 ms - 500 χιλιοστά του δευτερολέπτου - - - - 1 s - 1 δευτερόλεπτο - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Θέση (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Τύπος - - - - Name - Όνομα - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Απόκρυψη / Εμφάνιση - - - - Edges: 0 - Ακμές: 0 - - - - Cluster: 0 - Σύμπλεγμα: 0 - - - - Sizing Value: - Τιμή Μεγέθους: - - - - Use orientation of edge - Χρήση του προσανατολισμού της ακμής - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 χιλιοστά του δευτερολέπτου + + + + 50 ms + 50 χιλιοστά του δευτερολέπτου + + + + 100 ms + 100 χιλιοστά του δευτερολέπτου + + + + 500 ms + 500 χιλιοστά του δευτερολέπτου + + + + 1 s + 1 δευτερόλεπτο + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Θέση (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Τύπος + + + + Name + Όνομα + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_es-AR.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_es-AR.ts index 6694b311c6..dc2991f699 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_es-AR.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_es-AR.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Agregar herramienta - + Add a tool shape to the robot Agregar una forma de herramienta al robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Colocar robot... - + Place a robot (experimental!) Colocar un robot (¡experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Arista a Trayectoria... - + Generate a Trajectory from a set of edges Generar una trayectoria a partir de un conjunto de aristas @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Kuka subrutina completa... - + Export the trajectory as a full KRL subroutine. Exportar la trayectoria como una subrutina KRL completa. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Insertar un Kuka IR125 en el documento. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Insertar un Kuka IR16 en el documento. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Insertar un Kuka IR210 en el documento. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Insertar en trayectoria - + Insert robot Tool location into trajectory Insertar la ubicación de la Herramienta robot en la trayectoria @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Insertar en trayectoria - + Insert preselection position into trajectory (W) Insertar posición de preselección en la trayectoria (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Mover a inicio @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Establecer orientación predeterminada - + Set the default orientation for subsequent commands for waypoint creation Establecer la orientación predeterminada para los comandos posteriores para la creación de puntos de paso @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Establecer valores predeterminados - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Establecer los valores predeterminados para la velocidad, aceleración y continuidad de los comandos subsiguientes de creación de puntos de paso @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simular una trayectoria - + Run a simulation on a trajectory Ejecutar una simulación en una trayectoria @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Trayectoria compuesta... - + Group and connect some trajectories to one Agrupar y conectar algunas trayectorias a una @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Trayectoria disfrazada... - + Create a dress-up object which overrides some aspects of a trajectory Crear un objeto disfrazado que reemplaza a algunos aspectos de una trayectoria @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Selección Incorrecta @@ -376,115 +376,115 @@ Seleccione un Robot para establecer la posición de inicio - + Select one Robot Seleccionar un Robot - - - - - + + + + + Select one Robot and one Trajectory object. Seleccione un Robot y un objeto de Trayectoria. - + Trajectory not valid Trayectoria no válida - + You need at least two waypoints in a trajectory to simulate. Necesitas al menos dos puntos de paso en una trayectoria para simular. - - + + KRL file Archivo KRL - - + + All Files Todos los Archivos - - + + Export program Exportar programa - + Select one robot and one shape or VRML object. Seleccione un robot y una forma o objeto VRML. - - + + Select one Trajectory object. Seleccione un objeto de Trayectoria. - + No preselection Ninguna preselección - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Tiene que pasar el mouse sobre una geometría (Preselección) con el mouse para usar este comando. Ver la documentación para más detalles. - + Set default speed Establecer velocidad predeterminada - + speed: (e.g. 1 m/s or 3 cm/s) velocidad: (por ejemplo, 1 m/s o 3 cm/s) - + Set default continuity Establecer continuidad predeterminada - + continuous ? ¿continúa? - + Set default acceleration Establecer aceleración predeterminada - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) aceleración: (por ejemplo, 1 m/s^2 o 3 cm/s^2) - + Select the Trajectory which you want to dress up. Seleccionar la trayectoria que desea disfrazar. - + Modify Modificar - + No robot files installed No hay archivos robot instalados - + Please visit %1 and copy the files to %2 Por favor, visita %1 y copia los archivos a %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter Parámetro TaskEdge2Trac + + + Hide / Show + Ocultar / Mostrar + + + + Edges: 0 + Aristas: 0 + + + + Cluster: 0 + Clúster: 0 + + + + Sizing Value: + Valor de dimensionamiento: + + + + Use orientation of edge + Usar la orientación de la arista + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl Control de tareas de robot - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - Mensaje de tareas de robot - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Tipo - - - - Name - Nombre - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trayectoria - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Parámetro de revestido - - - - TaskEdge2TracParameter - - - Hide / Show - Ocultar / Mostrar - - - - Edges: 0 - Aristas: 0 - - - - Cluster: 0 - Clúster: 0 - - - - Sizing Value: - Valor de dimensionamiento: - - - - Use orientation of edge - Usar la orientación de la arista - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + Mensaje de tareas de robot + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Tipo + + + + Name + Nombre + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trayectoria + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Parámetro de revestido + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_es-ES.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_es-ES.ts index 264f0abeca..8690a82fc9 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_es-ES.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_es-ES.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Agregar herramienta - + Add a tool shape to the robot Agregar una forma de herramienta para el robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Colocar robot... - + Place a robot (experimental!) Colocar un robot (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Borde de trayectoria... - + Generate a Trajectory from a set of edges Generar una trayectoria de un conjunto de aristas @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Subrutina Kuka completa ... - + Export the trajectory as a full KRL subroutine. Exportar la trayectoria como una subrutina KRL completa. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka iR125 - + Insert a Kuka IR125 into the document. Inserte un Kuka IR125 en el documento. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Inserte un Kuka IR16 en el documento. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Inserte un Kuka IR210 en el documento. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Insertar en la trayectoria - + Insert robot Tool location into trajectory Inserte la herramienta localización del robot en la trayectoria @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Insertar en la trayectoria - + Insert preselection position into trajectory (W) Introduzca la posición de preselección en la trayectoria (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Mover al inicio @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Establecer orientación por defecto - + Set the default orientation for subsequent commands for waypoint creation Establezca la orientación predeterminada para los comandos subsiguientes para la creación de waypoint @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Establecer valores por defecto - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Establezca los valores predeterminados de velocidad, aceleración y continuidad para los comandos subsiguientes de creación de puntos de ruta @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simular una trayectoria - + Run a simulation on a trajectory Ejecutar una simulación en una trayectoria @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Componer trayectoria... - + Group and connect some trajectories to one Agrupar y conectar algunas trayectorias en una @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Trayectoria dress-up... - + Create a dress-up object which overrides some aspects of a trajectory Crear un objeto dress-up que reemplaza a algunos aspectos de una trayectoria @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Selección incorrecta @@ -376,115 +376,115 @@ Seleccione un Robot para fijar posición inicial - + Select one Robot Seleccione un Robot - - - - - + + + + + Select one Robot and one Trajectory object. Seleccione un robot y un objeto trayectoria. - + Trajectory not valid La trayectoria no es válida - + You need at least two waypoints in a trajectory to simulate. Necesitas al menos dos puntos de ruta en una trayectoria para simular. - - + + KRL file Archivo KRL - - + + All Files Todos los Archivos - - + + Export program Exportar programa - + Select one robot and one shape or VRML object. Seleccione un robot y una forma u objeto VRML. - - + + Select one Trajectory object. Seleccione un objeto de trayectoria. - + No preselection Sin preselección - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Usted tiene que pasar el ratón por encima de una geometría (preselección) para utilizar este comando. Consulte la documentación para obtener más detalles. - + Set default speed Establecer la velocidad predeterminada - + speed: (e.g. 1 m/s or 3 cm/s) velocidad: (p.e. 1 m/s o 3 cm/s) - + Set default continuity Establecer la continuidad predeterminada - + continuous ? ¿continuo? - + Set default acceleration Establecer aceleración predeterminada - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) aceleración: (p.e., 1 m/s ^ 2 o 3 cm/s ^ 2) - + Select the Trajectory which you want to dress up. Seleccione la Trayectoria que desea cubrir. - + Modify Modificar - + No robot files installed No hay archivos de robot instalados - + Please visit %1 and copy the files to %2 Por favor, visite %1 y copie los archivos en %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter Parámetro TaskEdge2Trac + + + Hide / Show + Ocultar / Mostrar + + + + Edges: 0 + Bordes: 0 + + + + Cluster: 0 + Clúster: 0 + + + + Sizing Value: + Valor de tamaño: + + + + Use orientation of edge + Utilizar la orientación del borde + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl Control de tareas de robot - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - Mensaje de tareas de robot - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Tipo - - - - Name - Nombre - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trayectoria - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Parámetro de revestido - - - - TaskEdge2TracParameter - - - Hide / Show - Ocultar / Mostrar - - - - Edges: 0 - Bordes: 0 - - - - Cluster: 0 - Clúster: 0 - - - - Sizing Value: - Valor de tamaño: - - - - Use orientation of edge - Utilizar la orientación del borde - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + Mensaje de tareas de robot + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Tipo + + + + Name + Nombre + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trayectoria + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Parámetro de revestido + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts index 5c6afc6181..46d57d024e 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_eu.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robota - + Add tool Gehitu tresna - + Add a tool shape to the robot Gehitu tresna-forma bat robotari @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robota - + Place robot... Kokatu robota... - + Place a robot (experimental!) Kokatu robot bat (esperimentala!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robota - + Edge to Trajectory... Ertza ibilbidera... - + Generate a Trajectory from a set of edges Sortu ibilbide bat ertz multzo batetik @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robota - + Kuka full subroutine... Kuka azpierrutina osoa... - + Export the trajectory as a full KRL subroutine. Esportatu ibilbidea KRL azpierrutina oso gisa. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robota - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Txertatu Kuka IR125 bat dokumentuan. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robota - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Txertatu Kuka IR16 bat dokumentuan. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robota - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Txertatu Kuka IR210 bat dokumentuan. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robota - + Insert in trajectory Txertatu ibilbidean - + Insert robot Tool location into trajectory Txertatu robot-tresnaren kokapena ibilbidean @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robota - + Insert in trajectory Txertatu ibilbidean - + Insert preselection position into trajectory (W) Txertatu aurrehautaketa-posizioa ibilbidean (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robota - - + + Move to home Joan orri nagusira @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robota - + Set default orientation Ezarri orientazio lehenetsia - + Set the default orientation for subsequent commands for waypoint creation Ezarri orientazio lehenetsia bide-puntuak sortzeko ondoren erabiliko diren komandoetarako @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robota - + Set default values Ezarri balio lehenetsiak - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Ezarri balio lehenetsiak abiadurarako, azeleraziorako eta jarraitutasunerako, bide-puntuak sortzeko ondoren erabiliko diren komandoetarako @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robota - + Simulate a trajectory Simulatu ibilbide bat - + Run a simulation on a trajectory Exekutatu simulazio bat ibilbide batean @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robota - + Trajectory compound... Ibilbide-konposatua... - + Group and connect some trajectories to one Multzokatu eta konektatu hainbat ibilbide, ibilbide bakarra sortuz @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robota - + Dress-up trajectory... Jantzi ibilbidea... - + Create a dress-up object which overrides some aspects of a trajectory Sortu jantzi-objektu bat ibilbide baten zenbait ezaugarri gainidazteko @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Hautapen okerra @@ -376,115 +376,115 @@ Hautatu robot bat hasierako posizioa ezartzeko - + Select one Robot Hautatu robot bat - - - - - + + + + + Select one Robot and one Trajectory object. Hautatu robot bat eta ibilbide-objektu bat. - + Trajectory not valid Ibilbidea ez da baliozkoa - + You need at least two waypoints in a trajectory to simulate. Gutxienez bi bide-puntu behar dituzu ibilbidean, simulazioa sortzeko. - - + + KRL file KRL fitxategia - - + + All Files Fitxategi guztiak - - + + Export program Esportatu programa - + Select one robot and one shape or VRML object. Hautatu robot bat eta forma edo VRML objektu bat. - - + + Select one Trajectory object. Hautatu ibilbide-objektu bat. - + No preselection Aurretiazko hautapenik ez - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Geometria baten gainetik igaro behar duzu sagua (aurrehautaketa) komando hau erabili ahal izateko. Begiratu dokumentazioa xehetasun gehiago jasotzeko. - + Set default speed Ezarri abiadura lehenetsia - + speed: (e.g. 1 m/s or 3 cm/s) abiadura: (adib. 1 m/s edo 3 cm/s) - + Set default continuity Ezarri jarraitutasun lehenetsia - + continuous ? jarraia? - + Set default acceleration Ezarri azelerazio lehenetsia - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) azelerazioa: (adib. 1 m/s^2 edo 3 cm/s^2) - + Select the Trajectory which you want to dress up. Hautatu jantzi nahi duzun ibilbidea. - + Modify Aldatu - + No robot files installed Ez dago robot-fitxategirik instalatuta - + Please visit %1 and copy the files to %2 Bisitatu %1 eta kopiatu fitxategiak %2 helbidera @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Ezkutatu / erakutsi + + + + Edges: 0 + Ertzak: 0 + + + + Cluster: 0 + Multzokatzea: 0 + + + + Sizing Value: + Tamaina aldatzeko balioa: + + + + Use orientation of edge + Erabili ertzaren orientazioa + RobotGui::TaskRobot6Axis @@ -600,151 +625,16 @@ TaskRobot6Axis - TaskRobot6Axis + 6 ardatzeko robot-ataza RobotGui::TaskRobotControl - + TaskRobotControl - TaskRobotControl + Robot-atazen kontrola - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Mota - - - - Name - Izena - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Ibilbidea - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Jantzi-parametroa - - - - TaskEdge2TracParameter - - - Hide / Show - Ezkutatu / erakutsi - - - - Edges: 0 - Ertzak: 0 - - - - Cluster: 0 - Multzokatzea: 0 - - - - Sizing Value: - Tamaina aldatzeko balioa: - - - - Use orientation of edge - Erabili ertzaren orientazioa - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + Robot-atazen mezuak + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Mota + + + + Name + Izena + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Ibilbidea + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Jantzi-parametroa + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_fi.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_fi.ts index b7571f13bc..3997578b33 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_fi.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_fi.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robotti - + Add tool Lisää työkalu - + Add a tool shape to the robot Lisää työkalun muoto robotille @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robotti - + Place robot... Paikoita robotti ... - + Place a robot (experimental!) Paikoita robotti (kokeellinen!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robotti - + Edge to Trajectory... Reuna liikeradalle... - + Generate a Trajectory from a set of edges Luo liikeradan asetetuista reunoista @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robotti - + Kuka full subroutine... Kuka täydellinen alirutiini... - + Export the trajectory as a full KRL subroutine. Vie liikerata kuten täydellinen KRL-alirutiini. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robotti - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Lisää Kuka IR125 dokumenttiin. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robotti - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Lisää Kuka IR16 dokumenttiin. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robotti - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Lisää Kuka IR500 dokumenttiin. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robotti - + Insert in trajectory Lisää liikeradalle - + Insert robot Tool location into trajectory Lisää robotti työkalun sijainti liikerataan @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robotti - + Insert in trajectory Lisää liikeradalle - + Insert preselection position into trajectory (W) Aseta esivalinnan asema liikerataan (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robotti - - + + Move to home Siirrä alkuasentoon @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robotti - + Set default orientation Aseta oletussuunta - + Set the default orientation for subsequent commands for waypoint creation Aseta oletussuunta myöhemmille komennoille reittipisteen luontia varten @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robotti - + Set default values Aseta oletusarvot - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Aseta oletusarvot nopeudelle, lisäykselle ja jatkuvuudelle myöhempien komentojen reittipisteen luontia varten @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robotti - + Simulate a trajectory Simuloi liikerata - + Run a simulation on a trajectory Aja liikerata simulaatio @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robotti - + Trajectory compound... Liitä liikerata... - + Group and connect some trajectories to one Ryhmitä ja yhdistä joku liikerata yhdelle @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robotti - + Dress-up trajectory... Liikeradan peitto... - + Create a dress-up object which overrides some aspects of a trajectory Luo peittokohde, joka naamioi joitakin piirretyn kuvion liikeratoja @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Väärä valinta @@ -376,115 +376,115 @@ Valitse yksi Robotti asettaaksesi aloitussijainnin - + Select one Robot Valitse yksi robotti - - - - - + + + + + Select one Robot and one Trajectory object. Valitse yksi robotti ja yksi liikeradan objekti. - + Trajectory not valid Liikerata ei kelpaa - + You need at least two waypoints in a trajectory to simulate. Tarvitset ainakin kaksi reittipistettä reitin varrella simuloidaksesi. - - + + KRL file KRL-tiedosto - - + + All Files Kaikki tiedostot - - + + Export program Vie ohjelma - + Select one robot and one shape or VRML object. Valitse yksi robotti ja yksi muoto tai VRML-objekti. - - + + Select one Trajectory object. Valitse yksi liikeradan objekti. - + No preselection Ei esivalintaa - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Kohdista hiiren kursori lähelle geometriaa (esivalinta), kun haluat käyttää tätä komentoa. Katso lisätietoja ohjeista. - + Set default speed Aseta oletusnopeus - + speed: (e.g. 1 m/s or 3 cm/s) nopeus: (esim. 1 m/s tai 3 cm/s) - + Set default continuity Aseta oletus jatkuvuudelle - + continuous ? jatkuva ? - + Set default acceleration Aseta oletuskiihtyvyys - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) kiihtyvyys: (esimerkiksi 1 m/s ^ 2 tai 3 cm/s ^ 2) - + Select the Trajectory which you want to dress up. Valitse liikerata, jonka haluat luoda. - + Modify Muokkaa - + No robot files installed Robottitiedostoja ei ole asennettu - + Please visit %1 and copy the files to %2 Siirry %1: een ja kopioi sieltä tiedostot %2: oon @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Piilota/Näytä + + + + Edges: 0 + Reunat: 0 + + + + Cluster: 0 + Ryhmittely: 0 + + + + Sizing Value: + Mitoitusarvo: + + + + Use orientation of edge + Käytä reunan suuntaa + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl Robotin tehtävien hallinta - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - Robotin tehtävien viestit - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23,300.23,400.23,234,343,343) - - - - Type - Tyyppi - - - - Name - Nimi - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Liikerata - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Piilota/Näytä - - - - Edges: 0 - Reunat: 0 - - - - Cluster: 0 - Ryhmittely: 0 - - - - Sizing Value: - Mitoitusarvo: - - - - Use orientation of edge - Käytä reunan suuntaa - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + Robotin tehtävien viestit + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23,300.23,400.23,234,343,343) + + + + Type + Tyyppi + + + + Name + Nimi + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Liikerata + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_fr.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_fr.ts index 0027e3544d..03008d510f 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_fr.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_fr.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Ajouter l'outil - + Add a tool shape to the robot Ajouter une forme d'outil pour le robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Placer un robot... - + Place a robot (experimental!) Placez un robot (expérimental !) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Arête vers trajectoire ... - + Generate a Trajectory from a set of edges Générer une trajectoire à partir d'un ensemble d'arêtes @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... sous-programme complet Kuka... - + Export the trajectory as a full KRL subroutine. Exporter la trajectoire comme un sous-programme KRL intégral. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Insérer un IR125 Kuka dans le document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Insérer un IR500 Kuka dans le document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Insérer un IR210 Kuka dans le document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Insérer dans la trajectoire - + Insert robot Tool location into trajectory Insérer la position de l'outil robot dans la trajectoire @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Insérer dans la trajectoire - + Insert preselection position into trajectory (W) Insérer la position de la présélection dans la trajectoire (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Passer à la position de départ @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Définir l'orientation par défaut - + Set the default orientation for subsequent commands for waypoint creation Définir l’orientation par défaut pour les commandes suivantes pour la création du point de passage @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Définir les valeurs par défaut - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Définir les valeurs par défaut pour la vitesse, l’accélération et la continuité pour les commandes suivantes de la création des points de passage @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simuler une trajectoire - + Run a simulation on a trajectory Lancer une simulation sur une trajectoire @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Composé de trajectoire... - + Group and connect some trajectories to one Grouper et connecter des trajectoires en une seule @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Mise en forme de la trajectoire... - + Create a dress-up object which overrides some aspects of a trajectory Créer un objet de mise en forme qui remplace certains aspects d'une trajectoire @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Mauvaise sélection @@ -376,116 +376,116 @@ Sélectionner un robot pour lui donner sa position d'origine - + Select one Robot Sélectionnez un robot - - - - - + + + + + Select one Robot and one Trajectory object. Sélectionnez un robot et une trajectoire. - + Trajectory not valid Trajectoire non valide - + You need at least two waypoints in a trajectory to simulate. Vous avez besoin d’au moins deux points de passage sur une trajectoire pour la simulation. - - + + KRL file Fichier KRL - - + + All Files Tous les fichiers - - + + Export program Exporter le programme - + Select one robot and one shape or VRML object. Sélectionnez un robot et une forme ou un objet VRML. - - + + Select one Trajectory object. Sélectionnez un objet de trajectoire. - + No preselection Aucune présélection - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Avec la souris, vous devez passer au-dessus d'une géométrie (présélection) pour utiliser cette commande. Consultez la documentation pour plus de détails. - + Set default speed Définir une vitesse par défaut - + speed: (e.g. 1 m/s or 3 cm/s) Vitesse : (par exemple 1 m/s ou 3 cm/s) - + Set default continuity Définir la continuité par défaut - + continuous ? en continu ? - + Set default acceleration Définir l'accélération par défaut - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) accélération : (p.ex. 1 m/s^2 or 3 cm/s^2) - + Select the Trajectory which you want to dress up. Sélectionnez la trajectoire que vous voulez habiller. - + Modify Modifier - + No robot files installed Aucun fichier de robot installé - + Please visit %1 and copy the files to %2 Visitez %1 et copiez les fichiers vers %2 @@ -555,6 +555,31 @@ pour utiliser cette commande. Consultez la documentation pour plus de détails.< TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Afficher / Masquer + + + + Edges: 0 + Arêtes : 0 + + + + Cluster: 0 + Groupe : 0 + + + + Sizing Value: + Valeur de dimensionnement : + + + + Use orientation of edge + Utiliser l'orientation de l'arête + RobotGui::TaskRobot6Axis @@ -607,145 +632,10 @@ pour utiliser cette commande. Consultez la documentation pour plus de détails.< RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos : (200.23, 300.23, 400.23, 234, 343, 343) - - - - Type - Type - - - - Name - Nom - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectoire - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Paramètre d'habillage - - - - TaskEdge2TracParameter - - - Hide / Show - Afficher / Masquer - - - - Edges: 0 - Arêtes : 0 - - - - Cluster: 0 - Groupe : 0 - - - - Sizing Value: - Valeur de dimensionnement : - - - - Use orientation of edge - Utiliser l'orientation de l'arête - - - - TaskRobotControl X+ @@ -858,7 +748,12 @@ pour utiliser cette commande. Consultez la documentation pour plus de détails.< - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -866,7 +761,100 @@ pour utiliser cette commande. Consultez la documentation pour plus de détails.< - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos : (200.23, 300.23, 400.23, 234, 343, 343) + + + + Type + Type + + + + Name + Nom + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectoire + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Paramètre d'habillage + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_gl.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_gl.ts index 1a0ad1f45c..17a61d4af1 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_gl.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_gl.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Engadir ferramenta - + Add a tool shape to the robot Engadir unha ferramenta de forma ó robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Situar o robot... - + Place a robot (experimental!) Situar un robot (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Bordo para traxectoria... - + Generate a Trajectory from a set of edges Xerar unha traxectoria a partir dun conxunto de bordos @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Subrutina Kuka completa... - + Export the trajectory as a full KRL subroutine. Exportar a traxectoria coma unha subrutina KRL completa. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Insire un Kuka iR125 no documento. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Insire un Kuka iR16 no documento. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Insire un Kuka iR210 no documento. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Inserir na traxectoria - + Insert robot Tool location into trajectory Inserir localizacion da ferramenta de robot na traxectoria @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Inserir na traxectoria - + Insert preselection position into trajectory (W) Insira a pre-escolma de posición na traxectoria (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Mover ó principio @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Estabelecer orientación por defecto - + Set the default orientation for subsequent commands for waypoint creation Conxunto da orientación por defecto para subseguintes comandos para creación de waypoint @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Estabelecer valores por defecto - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Conxunto dos valores por defecto para velocidade, aceleración e continuidad para comandos subseguintes de creación de puntos de ruta @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simular unha traxectoria - + Run a simulation on a trajectory Corre unha simulación dunha traxectoria @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Compor traxectoria... - + Group and connect some trajectories to one Agrupar e conectar algunhas traxectorias nunha @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Aspecto de traxectoria... - + Create a dress-up object which overrides some aspects of a trajectory Crea un obxecto aspecto que troca algunhas características dunha traxectoria @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Escolma errada @@ -376,115 +376,115 @@ Escolme un Robot para estabelecer a posición de principio - + Select one Robot Escolmar un Robot - - - - - + + + + + Select one Robot and one Trajectory object. Escolmar un robot mais un obxecto traxectoria. - + Trajectory not valid Traxectoria non válida - + You need at least two waypoints in a trajectory to simulate. Necesitas canda menos dous puntos na ruta da traxectoria para simular. - - + + KRL file Ficheiro KRL - - + + All Files Tódolos ficheiros - - + + Export program Exportar programa - + Select one robot and one shape or VRML object. Escolmar un robot mais unha forma ou obxecto VRML. - - + + Select one Trajectory object. Escolme un obxecto Traxectoria. - + No preselection Sen pre-escolma - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Ten que pasar o rato por riba dunha xeometría (pre-escolma) para usar este comando. Consulte a documentación para obter máis detalles. - + Set default speed Conxunto da velocidade predeterminada - + speed: (e.g. 1 m/s or 3 cm/s) Velocidade: (ex.: 1 m/s ou 3 cm/s) - + Set default continuity Conxunto continuidade por defecto - + continuous ? continuo? - + Set default acceleration Conxunto aceleración por defecto - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) aceleración: (ex.: 1 m/s^2 ou 3 cm/s^2) - + Select the Trajectory which you want to dress up. Escolme a traxectoria que quere cubrir. - + Modify Modificar - + No robot files installed Non hai ficheiros de robot instalados - + Please visit %1 and copy the files to %2 Por favor, vaia a %1 e copie os ficheiros en %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Agochar / Amosar + + + + Edges: 0 + Bordos: 0 + + + + Cluster: 0 + Grupo: 0 + + + + Sizing Value: + Valor de tamaño: + + + + Use orientation of edge + Usar a orientación do bordo + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Tipo - - - - Name - Nome - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Agochar / Amosar - - - - Edges: 0 - Bordos: 0 - - - - Cluster: 0 - Grupo: 0 - - - - Sizing Value: - Valor de tamaño: - - - - Use orientation of edge - Usar a orientación do bordo - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Tipo + + + + Name + Nome + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_hr.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_hr.ts index 395b4c56ba..d6a2e1fd34 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_hr.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_hr.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Dodaj alat - + Add a tool shape to the robot Dodavanje alata za oblik za robota @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Postavi robota... - + Place a robot (experimental!) Postavite robota (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... rub na putanji ... - + Generate a Trajectory from a set of edges Generirajte putanju za set rubova @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Kuka puni potprogram ... - + Export the trajectory as a full KRL subroutine. Izvoz putanje kao pun KRL potprogram. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Umetnite Kuka IR500 u dokument. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Umetnite Kuka IR500 u dokument. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Umetnite Kuka IR500 u dokument. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Umetni u putanju - + Insert robot Tool location into trajectory Umetnite alata robota, mjesto u putanji @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Umetni u putanju - + Insert preselection position into trajectory (W) Umetnite "preselekcija položaj" u putanju (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Pomakni na početak (home) @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Postavi zadanu orijentaciju - + Set the default orientation for subsequent commands for waypoint creation Postavite zadano usmjerenje za naknadne naredbe za stvaranje putne točke @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Postavi zadane vrijednosti - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Postavljanje zadanih vrijednosti za brzinu, ubrzanja i kontinuitet za naknadne naredbe stvaranja putne točke @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simulirati putanju - + Run a simulation on a trajectory Pokrenite simulaciju na putanji @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Spoj Putanje ... - + Group and connect some trajectories to one Grupiraj i poveži neke putanje kao jednu @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Odijevanje putanje... - + Create a dress-up object which overrides some aspects of a trajectory Napravite odjevni objekt koji mijenja neke značajke putanje @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Pogrešan odabir @@ -376,115 +376,115 @@ Izaberite jednog robota za postavljanje početne pozicije - + Select one Robot Odaberite jedan Robot - - - - - + + + + + Select one Robot and one Trajectory object. Odaberite jedan robot i jedanu putanju objekta. - + Trajectory not valid Putanja ne vrijedi - + You need at least two waypoints in a trajectory to simulate. Potrebno je najmanje dvije putne točke u putanji za simulaciju. - - + + KRL file KRL datoteka - - + + All Files Sve datoteke - - + + Export program Prijenos programa - + Select one robot and one shape or VRML object. Odaberite jedan robot i jedan oblik ili objekt VRML. - - + + Select one Trajectory object. Odaberite jednu putanju objekta. - + No preselection Nema predselekcije - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Morate lebjeti iznad geometrije (predselekcije) s mišem kako bi koristili ovu naredbu. Pogledajte dokumentaciju za detalje. - + Set default speed Postavi zadanu brzinu - + speed: (e.g. 1 m/s or 3 cm/s) brzina: (npr. 1 m/s ili 3 cm/s) - + Set default continuity Postavljanje zadanog kontinuiteta - + continuous ? kontinuirano? - + Set default acceleration Postavljanje zadanog ubrzanja - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) ubrzanje: (npr. 1 m/s^2 ili 3 cm/s^2) - + Select the Trajectory which you want to dress up. Odaberite putanju koju želite doraditi. - + Modify Izmjene - + No robot files installed Nema instaliranih robot datoteka - + Please visit %1 and copy the files to %2 Molimo posjetite %1 i kopirajte datoteke u %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Sakrij / prikaži + + + + Edges: 0 + Rubovi: 0 + + + + Cluster: 0 + Grozd: 0 + + + + Sizing Value: + Dimenzioniranje vrijednosti: + + + + Use orientation of edge + Koristi orijentaciju ruba + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Poz: (200,23, 300,23, 400,23, 234, 343, 343) - - - - Type - Vrsta - - - - Name - Ime - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Putanja - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Ravni parametar - - - - TaskEdge2TracParameter - - - Hide / Show - Sakrij / prikaži - - - - Edges: 0 - Rubovi: 0 - - - - Cluster: 0 - Grozd: 0 - - - - Sizing Value: - Dimenzioniranje vrijednosti: - - - - Use orientation of edge - Koristi orijentaciju ruba - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Poz: (200,23, 300,23, 400,23, 234, 343, 343) + + + + Type + Tip + + + + Name + Ime + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Putanja + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Ravni parametar + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_hu.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_hu.ts index bc9d1ffb32..90176b6283 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_hu.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_hu.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Szerszám hozzáadása - + Add a tool shape to the robot Formázó szerszám hozzáadása a robothoz @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Robot elhelyezése... - + Place a robot (experimental!) Robot helye (kísérleti!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Él az útvonalhoz... - + Generate a Trajectory from a set of edges Útvonal létrehozása élek alapján @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Kuka teljes eljárás ... - + Export the trajectory as a full KRL subroutine. Útvonal exportálása teljes KRL eljárásként. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Helyezzen be egy Kuka IR125-öt a dokumentumba. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Helyezzen be egy Kuka IR16-ot a dokumentumba. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Helyezzen be egy Kuka IR210-et a dokumentumba. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Útvonal beszúrása - + Insert robot Tool location into trajectory Robot szerszám elhelyezése az útvonalon @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Útvonal beszúrása - + Insert preselection position into trajectory (W) Beállítási pozíció beszúrása az útvonalba (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Alaphelyzetbe állít @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Alapértelmezett helyzet - + Set the default orientation for subsequent commands for waypoint creation Szakaszpont létrehozása a későbbi parancsok alapértelmezett tájolásának beállításához @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Alapértelmezett értékek - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Alapértelmezett sebesség, gyorsulás és folytonossági szakaszpont értékeinek beállítása a későbbi parancsok alapértelmezett tájolásának beállításához @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Útvonal szimuláció - + Run a simulation on a trajectory Szimuláció futtatása az útvonalon @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Pálya összetétel... - + Group and connect some trajectories to one Csoportosít és közössé tesz bizonyos pályákat @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Pálya alapértékek megváltoztatása... - + Create a dress-up object which overrides some aspects of a trajectory Felülír egyes pálya aspektust a pálya alapértékek megváltoztatásával @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Rossz kiválasztás @@ -376,115 +376,115 @@ Válasszon egy Robot -ot a kiinduló helyzet beállításához - + Select one Robot Válasszon ki egy robotot - - - - - + + + + + Select one Robot and one Trajectory object. Egy Robot és egy útvonal objektum kijelölése. - + Trajectory not valid Érvénytelen útvonal - + You need at least two waypoints in a trajectory to simulate. Legalább két útvonalpontra van szükség a pályán a szimulációhoz. - - + + KRL file KRL fájl - - + + All Files Összes fájl - - + + Export program Program exportálása - + Select one robot and one shape or VRML object. Egy robot és egy alakzat vagy VRML objektum kijelölése. - - + + Select one Trajectory object. Válasszon ki egy pálya objektumot. - + No preselection Nincs előzetes kijelölés - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. A geometria (előválasztás) fölé kell vinni az egérrel a kurzort, hogy használni tudja ezt a parancsot. Részleteket a dokumentációban talál. - + Set default speed Állítsa be az alapértelmezett sebességet - + speed: (e.g. 1 m/s or 3 cm/s) sebesség: (pl. 1 m/s vagy 3 cm/s) - + Set default continuity Állítsa be az alapértelmezett folytonosságot - + continuous ? folyamatos? - + Set default acceleration Állítsa be az alapértelmezett gyorsulást - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) gyorsulás: (pl. 1 m/s^2 vagy 3 cm/s^2) - + Select the Trajectory which you want to dress up. Válassza ki a megváltoztatni kívánt pályát. - + Modify Módosít - + No robot files installed Nincs telepített robot-fájl - + Please visit %1 and copy the files to %2 Kérjük, látogasson el ide: %1 és másolja a fájlokat a következő helyre: %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Elrejt/megjelenít + + + + Edges: 0 + Élek: 0 + + + + Cluster: 0 + Klaszter: 0 + + + + Sizing Value: + Méret érték: + + + + Use orientation of edge + Használja az él orientációját + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotIrányítás - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotÜzenetek - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Típus - - - - Name - Név - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Pálya - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Felruházási paraméter - - - - TaskEdge2TracParameter - - - Hide / Show - Elrejt/megjelenít - - - - Edges: 0 - Élek: 0 - - - - Cluster: 0 - Klaszter: 0 - - - - Sizing Value: - Méret érték: - - - - Use orientation of edge - Használja az él orientációját - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotÜzenetek + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Típus + + + + Name + Név + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Pálya + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Felruházási paraméter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_id.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_id.ts index d771dffcea..b4e06beb00 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_id.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_id.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Tambahkan alat - + Add a tool shape to the robot Tambahkan bentuk alat ke robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Place robot... - + Place a robot (experimental!) Tempatkan robot (eksperimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Edge to Trajectory... - + Generate a Trajectory from a set of edges Menghasilkan lintasan dari seperangkat tepi @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Kuka penuh subrutin... - + Export the trajectory as a full KRL subroutine. Ekspor lintasan sebagai subrutin KRL penuh. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Insert a Kuka IR125 into the document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Insert a Kuka IR16 into the document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Insert a Kuka IR210 into the document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Insert in trajectory - + Insert robot Tool location into trajectory Insert robot Tool location into trajectory @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Insert in trajectory - + Insert preselection position into trajectory (W) Insert preselection position into trajectory (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Move to home @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Set default orientation - + Set the default orientation for subsequent commands for waypoint creation Atur orientasi default untuk perintah selanjutnya untuk pembuatan waypoint @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Set default values - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Tetapkan nilai default untuk kecepatan, akselerasi, dan kontinuitas untuk perintah pembuatan titik arah berikutnya @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simulasikan sebuah lintasan - + Run a simulation on a trajectory Jalankan simulasi pada lintasan @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Trajectory compound... - + Group and connect some trajectories to one Kelompokkan dan hubungkan beberapa lintasan ke satu jalur @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Dress-up lintasan... - + Create a dress-up object which overrides some aspects of a trajectory Buat objek berpakaian yang menimpa beberapa aspek lintasan @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Pilihan salah @@ -376,115 +376,115 @@ Pilih satu Robot untuk mengatur posisi rumah - + Select one Robot Pilih satu Robot - - - - - + + + + + Select one Robot and one Trajectory object. Pilih satu Robot dan satu objek lintasan. - + Trajectory not valid Lintasan tidak valid - + You need at least two waypoints in a trajectory to simulate. Anda memerlukan setidaknya dua titik arah dalam lintasan untuk disimulasikan. - - + + KRL file File KRL - - + + All Files Semua data - - + + Export program Program ekspor - + Select one robot and one shape or VRML object. Select one robot and one shape or VRML object. - - + + Select one Trajectory object. Pilih satu objek lintasan. - + No preselection No preselection - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Anda harus melayang di atas geometri (Presipitasi) dengan mouse untuk menggunakan perintah ini. Lihat dokumentasi untuk rinciannya. - + Set default speed Tetapkan kecepatan default - + speed: (e.g. 1 m/s or 3 cm/s) speed: (e.g. 1 m/s or 3 cm/s) - + Set default continuity Mengatur kontinuitas default - + continuous ? terus menerus? - + Set default acceleration Mengatur akselerasi default - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) percepatan: (misalnya 1 m / s ^ 2 atau 3 cm / s ^ 2) - + Select the Trajectory which you want to dress up. Select the Trajectory which you want to dress up. - + Modify Modifikasi - + No robot files installed No robot files installed - + Please visit %1 and copy the files to %2 Silakan kunjungi %1 dan salin file ke %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Hide / Show + + + + Edges: 0 + Edges: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Sizing Value: + + + + Use orientation of edge + Use orientation of edge + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - | < - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - > - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Jenis - - - - Name - Nama - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Hide / Show - - - - Edges: 0 - Edges: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Sizing Value: - - - - Use orientation of edge - Use orientation of edge - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + | < + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + > + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Jenis + + + + Name + Nama + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_it.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_it.ts index 9fe71d08a5..06ae6d222d 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_it.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_it.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Aggiungi strumento - + Add a tool shape to the robot Aggiunge la forma di uno strumento al robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Posiziona robot... - + Place a robot (experimental!) Posiziona un robot (sperimentale!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Crea una traiettoria... - + Generate a Trajectory from a set of edges Genera una traiettoria da un insieme di bordi @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Subroutine Kuka completa... - + Export the trajectory as a full KRL subroutine. Esporta la traiettoria come una subroutine KRL completa. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Inserisce un Kuka IR125 nel documento. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Inserisce un Kuka IR16 nel documento. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Inserisce un Kuka IR210 nel documento. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Inserisci un punto nella traiettoria - + Insert robot Tool location into trajectory Inserisce il percorso dell'utensile del robot nella traiettoria @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Inserisci un punto nella traiettoria - + Insert preselection position into trajectory (W) Inserisce la posizione di preselezione in traiettoria (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Sposta alla posizione di partenza @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Imposta l'orientamento predefinito - + Set the default orientation for subsequent commands for waypoint creation Imposta l'orientamento predefinito per i comandi successivi per la creazione del punto di passaggio @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Imposta i valori predefiniti - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Imposta i valori predefiniti per la velocità, l'accelerazione e la continuità per i successivi comandi di creazione del punto di passaggio @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simula una traiettoria - + Run a simulation on a trajectory Esegue una simulazione su una traiettoria @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Traiettoria composta... - + Group and connect some trajectories to one Raggruppa e collega alcune traiettorie in una unica @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Foggia una traiettoria... - + Create a dress-up object which overrides some aspects of a trajectory Crea un oggetto di vestizione che sostituisce alcuni aspetti di una traiettoria @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Selezione errata @@ -376,115 +376,115 @@ Selezionare un robot per impostare la posizione di partenza - + Select one Robot Selezionare un Robot - - - - - + + + + + Select one Robot and one Trajectory object. Selezionare un Robot e un oggetto Traiettoria. - + Trajectory not valid Traiettoria non valida - + You need at least two waypoints in a trajectory to simulate. Per simulare una traiettoria sevono almeno due punti di passaggio. - - + + KRL file File KRL - - + + All Files Tutti i file - - + + Export program Esporta programma - + Select one robot and one shape or VRML object. Selezionare un robot e una forma oppure un oggetto VRML. - - + + Select one Trajectory object. Selezionare un oggetto traiettoria. - + No preselection Nessuna preselezione - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. È necessario passare col mouse sopra una geometria (preselezione) per utilizzare questo comando. Vedere la documentazione per i dettagli. - + Set default speed Imposta la velocità predefinita - + speed: (e.g. 1 m/s or 3 cm/s) velocità: (ad esempio 1 m/s o 3 cm/s) - + Set default continuity Imposta la continuità predefinita - + continuous ? Continuo ? - + Set default acceleration Imposta l'accelerazione predefinita - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) accelerazione: (ad es. 1 m/s^2 o 3 cm/s^2) - + Select the Trajectory which you want to dress up. Selezionare la traiettoria da vestire. - + Modify Modifica - + No robot files installed Nessun file robot installato - + Please visit %1 and copy the files to %2 Si prega di visitare %1 e copiare i file in %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Mostra/Nascondi + + + + Edges: 0 + Bordi: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Valore di ridimensionamento: + + + + Use orientation of edge + Usa l'orientamento del bordo + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Tipo - - - - Name - Nome - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Traiettoria - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Parametri Dress Up - - - - TaskEdge2TracParameter - - - Hide / Show - Mostra/Nascondi - - - - Edges: 0 - Bordi: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Valore di ridimensionamento: - - - - Use orientation of edge - Usa l'orientamento del bordo - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Tipo + + + + Name + Nome + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Traiettoria + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Parametri Dress Up + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_ja.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_ja.ts index f1f366b48b..cf4908f683 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_ja.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_ja.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot ロボット - + Add tool ツールを追加 - + Add a tool shape to the robot 工具のシェイプをロボットに追加 @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot ロボット - + Place robot... ロボットを配置... - + Place a robot (experimental!) ロボットを配置(テスト中!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot ロボット - + Edge to Trajectory... エッジから軌道へ... - + Generate a Trajectory from a set of edges エッジから軌道を生成 @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot ロボット - + Kuka full subroutine... Kukaのフルサブルーチン... - + Export the trajectory as a full KRL subroutine. 軌道をフルKRLサブルーチンとしてエクスポート @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot ロボット - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Kuka IR125をドキュメントに挿入. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot ロボット - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Kuka IR16をドキュメントに挿入 @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot ロボット - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Kuka IR210をドキュメントに挿入 @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot ロボット - + Insert in trajectory 軌道に挿入 - + Insert robot Tool location into trajectory 軌道にロボットツール位置を挿入 @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot ロボット - + Insert in trajectory 軌道に挿入 - + Insert preselection position into trajectory (W) 軌道 (W) に選択前位置を挿入 @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot ロボット - - + + Move to home ホームへ移動 @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot ロボット - + Set default orientation デフォルトの向きを設定 - + Set the default orientation for subsequent commands for waypoint creation 通過点の作成コマンドの後で、適用に必要となる既定値の設定 @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot ロボット - + Set default values デフォルト値を設定 - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation 通過点の作成コマンドの後で必要とする加速と連続性に就いて、速度の既定値を設定する。 @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot ロボット - + Simulate a trajectory 軌道をシミュレート - + Run a simulation on a trajectory 軌道のシミュレーションを実行 @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot ロボット - + Trajectory compound... 軌道を合成... - + Group and connect some trajectories to one 複数の軌道を一つに連結してグループ化 @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot ロボット - + Dress-up trajectory... 軌道をドレスアップ - + Create a dress-up object which overrides some aspects of a trajectory 軌道の複数面を上書きするドレスアップオブジェクトを作成 @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection 誤った選択 @@ -376,115 +376,115 @@ ホーム位置を設定するロボットを1つ選択 - + Select one Robot 1台のロボットを選択する - - - - - + + + + + Select one Robot and one Trajectory object. 1 つのロボットと軌道オブジェクトを 1 つ選択します。 - + Trajectory not valid 軌道が無効です。 - + You need at least two waypoints in a trajectory to simulate. シミュレーションをするためには、軌道に対して少なくとも2つの通過地点を必要としています。 - - + + KRL file KRLファイル - - + + All Files すべてのファイル - - + + Export program プログラムをエクスポート - + Select one robot and one shape or VRML object. ロボット1台と1つの図形かVRMLオブジェクトを選択してください. - - + + Select one Trajectory object. 1 つの軌道のオブジェクトを選択します。 - + No preselection 事前選択がありません - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. このコマンドを使用するにはマウスを使ってジオメトリ(事前選択)の上にカーソルを移動する必要があります。詳細についてはマニュアルを参照してください。 - + Set default speed デフォルト速度を設定 - + speed: (e.g. 1 m/s or 3 cm/s) 速度:(例 1m/s 3cm/s) - + Set default continuity デフォルトに継続を設定 - + continuous ? 続けますか? - + Set default acceleration デフォルト加速を設定 - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) 加速度: (例: 1 m/s ^2 または 3 cm/s ^2) - + Select the Trajectory which you want to dress up. ドレスアップする軌道を選択 - + Modify 変更 - + No robot files installed ロボットファイルがインストールされていません - + Please visit %1 and copy the files to %2 %1 を見てファイルを %2 にコピーしてください @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + 表示/非表示 + + + + Edges: 0 + エッジ: 0 + + + + Cluster: 0 + クラスタ: 0 + + + + Sizing Value: + サイジング値: + + + + Use orientation of edge + エッジの方向を使用 + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - タイプ - - - - Name - 名前 - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - 表示/非表示 - - - - Edges: 0 - エッジ: 0 - - - - Cluster: 0 - クラスタ: 0 - - - - Sizing Value: - サイジング値: - - - - Use orientation of edge - エッジの方向を使用 - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + タイプ + + + + Name + 名前 + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_ka.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_ka.ts index abe0898c3d..79ab9e50d0 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_ka.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_ka.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot რობოტი - + Add tool ხელსაწყოს დამატება - + Add a tool shape to the robot რობოტისთვის წესის დამატება @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot რობოტი - + Place robot... რობოტის მოთავსება... - + Place a robot (experimental!) რობოტის მოთავსება (ექსპერიმენტალური!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot რობოტი - + Edge to Trajectory... ტრაექტორიის ნაპირი... - + Generate a Trajectory from a set of edges ტრაექტორიის შექმნა წიბოების ჯგუფისგან @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot რობოტი - + Kuka full subroutine... სრული ქვეპროგრამა Kuka... - + Export the trajectory as a full KRL subroutine. ტრაექტორიის, როგორც KRL სრული ქვეპროგრამის გატანა. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot რობოტი - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Kuka IR125-ის დოკუმენტში ჩასმა. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot რობოტი - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Kuka IR16-ის დოკუმენტში ჩასმა. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot რობოტი - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Kuka IR210-ის დოკუმენტში ჩასმა. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot რობოტი - + Insert in trajectory ტრაექტორიაში ჩასმა - + Insert robot Tool location into trajectory რობოტის ხელსაწყოს მდებარეობა ტრაექტორიაში ჩასმა @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot რობოტი - + Insert in trajectory ტრაექტორიაში ჩასმა - + Insert preselection position into trajectory (W) წინასწარ შერჩევის პოზიციის ჩასმა ტრაექტორიაში (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot რობოტი - - + + Move to home მთავარზე გადასვლა @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot რობოტი - + Set default orientation ნაგულისხმევი ორიენტაციის დაყენება - + Set the default orientation for subsequent commands for waypoint creation დააყენეთ ნაგულისხმევი ორიენტაცია შემდგომი ბრძანებებისთვის საგზაო წერტილის შესაქმნელად @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot რობოტი - + Set default values ნაგულისხმევი მნიშვნელობების დაყენება - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation დააყენეთ ნაგულისხმევი მნიშვნელობები სიჩქარისთვის, აჩქარებისთვის და უწყვეტობისთვის საგზაო წერტილის შექმნის შემდგომი ბრძანებებისთვის @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot რობოტი - + Simulate a trajectory ტრაექტორიის სიმულაცია - + Run a simulation on a trajectory ტრაექტორიაზე სიმულაციის გაშვება @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot რობოტი - + Trajectory compound... ტრაექტორიების შეერთება... - + Group and connect some trajectories to one ტრაექტორიების ერთში შეგროვება და შეერთება @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot რობოტი - + Dress-up trajectory... ბაზური ტრაექტორიის შეცვლა... - + Create a dress-up object which overrides some aspects of a trajectory ზღუდარის ისეთ ობიექტის შექმნა, რომელიც გადაფარავს ტრაექტორიის რაღაც ნაწილს @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection არასწორი არჩევანი @@ -376,115 +376,115 @@ საწყისი პოზიციის ასარჩევად მონიშნეთ ერთი რობოტი - + Select one Robot ერთი რობოტის ჩასმა - - - - - + + + + + Select one Robot and one Trajectory object. აირჩიეთ ერთი რობოტი და ერთი ტრაექტორიის ობიექტი. - + Trajectory not valid ტრაექტორია არასწორია - + You need at least two waypoints in a trajectory to simulate. ტრაექტორიის სიმულაციისთვის საჭიროა მინიმუმ 2 წერტილი. - - + + KRL file KRL ფაილი - - + + All Files ყველა ფაილი - - + + Export program პროგრამის გატანა - + Select one robot and one shape or VRML object. აირჩიეთ ერთი რობოტი და ერთი ფორმა ან VRML ობიექტი. - - + + Select one Trajectory object. აირჩიეთ ტრაექტორიის ერთი ობიექტი. - + No preselection მონიშნული არაფერი არაა - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. ამ ბრძანების გამოსაყენებლად მაუსის საშუალებით გეომეტრიის (წინასწარი შერჩევის) ზემოთ უნდა გადახვიდეთ. დეტალებისთვის იხილეთ დოკუმენტაცია. - + Set default speed ნაგულისხმევი სიჩქარის დაყენება - + speed: (e.g. 1 m/s or 3 cm/s) სიჩქარე: (მაგ 1 მ/წმ ან 3 სმ/წმ) - + Set default continuity ნაგულისხმევი ხანგრძლივობის დაყენება - + continuous ? ხანგრძლივობა ? - + Set default acceleration ნაგულისხმევი აჩქარების დაყენება - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) აჩქარება: (მაგ 1 მ/წმ^2 ან 3 სმ/წმ^2) - + Select the Trajectory which you want to dress up. აირჩიეთ გასაფორმებელი ტრაექტორია. - + Modify შეცვლა - + No robot files installed რობოტის ფაილები დაყენებული არაა - + Please visit %1 and copy the files to %2 გთხოვთ გადახვიდეთ %1-ზე და ჩააკოპიროთ ფაილები %2-ში @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + დამალვა / ჩვენება + + + + Edges: 0 + საზღვრები: 0 + + + + Cluster: 0 + კლასტერი: 0 + + + + Sizing Value: + მნიშვნელობების ზომა: + + + + Use orientation of edge + საზღვრის ორიენტაციის გამოყენება + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 მწმ - - - - 50 ms - 50 მწმ - - - - 100 ms - 100 მწმ - - - - 500 ms - 500 მწმ - - - - 1 s - 1 წმ - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - პოზ: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - ტიპი - - - - Name - სახელი - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - დამალვა / ჩვენება - - - - Edges: 0 - საზღვრები: 0 - - - - Cluster: 0 - კლასტერი: 0 - - - - Sizing Value: - მნიშვნელობების ზომა: - - - - Use orientation of edge - საზღვრის ორიენტაციის გამოყენება - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 მწმ + + + + 50 ms + 50 მწმ + + + + 100 ms + 100 მწმ + + + + 500 ms + 500 მწმ + + + + 1 s + 1 წმ + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + პოზ: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + ტიპი + + + + Name + სახელი + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_ko.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_ko.ts index b8c5a8277a..0164e64917 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_ko.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_ko.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool 추가 도구 - + Add a tool shape to the robot 로봇을 도구 셰이프 추가 @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... 장소 로봇... - + Place a robot (experimental!) 로봇 배치하기(실험적) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Edge to Trajectory... - + Generate a Trajectory from a set of edges Generate a Trajectory from a set of edges @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Kuka full subroutine... - + Export the trajectory as a full KRL subroutine. Export the trajectory as a full KRL subroutine. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Insert a Kuka IR125 into the document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Insert a Kuka IR16 into the document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Insert a Kuka IR210 into the document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Insert in trajectory - + Insert robot Tool location into trajectory Insert robot Tool location into trajectory @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Insert in trajectory - + Insert preselection position into trajectory (W) Insert preselection position into trajectory (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Move to home @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Set default orientation - + Set the default orientation for subsequent commands for waypoint creation Set the default orientation for subsequent commands for waypoint creation @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Set default values - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simulate a trajectory - + Run a simulation on a trajectory Run a simulation on a trajectory @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Trajectory compound... - + Group and connect some trajectories to one Group and connect some trajectories to one @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Dress-up trajectory... - + Create a dress-up object which overrides some aspects of a trajectory Create a dress-up object which overrides some aspects of a trajectory @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection 잘못 된 선택 @@ -376,115 +376,115 @@ Select one Robot to set home position - + Select one Robot 로봇 하나 선택하기 - - - - - + + + + + Select one Robot and one Trajectory object. Select one Robot and one Trajectory object. - + Trajectory not valid Trajectory not valid - + You need at least two waypoints in a trajectory to simulate. You need at least two waypoints in a trajectory to simulate. - - + + KRL file KRL 파일 - - + + All Files 모든 파일 - - + + Export program Export program - + Select one robot and one shape or VRML object. Select one robot and one shape or VRML object. - - + + Select one Trajectory object. Select one Trajectory object. - + No preselection No preselection - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. - + Set default speed Set default speed - + speed: (e.g. 1 m/s or 3 cm/s) 속도: (예: 1 m/s 또는 3 cm/s) - + Set default continuity Set default continuity - + continuous ? continuous ? - + Set default acceleration Set default acceleration - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) - + Select the Trajectory which you want to dress up. Select the Trajectory which you want to dress up. - + Modify Modify - + No robot files installed No robot files installed - + Please visit %1 and copy the files to %2 Please visit %1 and copy the files to %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + 숨기기 / 표시 + + + + Edges: 0 + Edges: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Sizing Value: + + + + Use orientation of edge + Use orientation of edge + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 밀리초 - - - - 50 ms - 50 밀리초 - - - - 100 ms - 100 밀리초 - - - - 500 ms - 500 밀리초 - - - - 1 s - 1초 - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - 유형 - - - - Name - 이름 - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - 숨기기 / 표시 - - - - Edges: 0 - Edges: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Sizing Value: - - - - Use orientation of edge - Use orientation of edge - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 밀리초 + + + + 50 ms + 50 밀리초 + + + + 100 ms + 100 밀리초 + + + + 500 ms + 500 밀리초 + + + + 1 s + 1초 + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + 유형 + + + + Name + 이름 + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_nl.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_nl.ts index 9aa825e806..040ee34c35 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_nl.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_nl.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Gereedschap toevoegen - + Add a tool shape to the robot Voeg een gereedschapvorm toe aan de robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Plaats robot... - + Place a robot (experimental!) Plaats een robot (experimenteel!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Rand naar traject... - + Generate a Trajectory from a set of edges Genereer een Traject uit een set van randen @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Kuka volledige subroutine... - + Export the trajectory as a full KRL subroutine. Exporteer het traject als een volledige KRL subroutine. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Voeg een Kuka IR125 toe aan het document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Voeg een Kuka IR16 toe aan het document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Voeg een Kuka IR210 toe aan het document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Toevoegen aan traject - + Insert robot Tool location into trajectory Robot gereedschapslocatie invoegen in traject @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Toevoegen aan traject - + Insert preselection position into trajectory (W) Plaats de voorselectie-positie in het traject (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Ga naar de beginpositie @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Set standaard oriëntatie - + Set the default orientation for subsequent commands for waypoint creation Zet de standaard orientatie voor nieuw aan te maken tussenpunten @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Standaardwaarden instellen - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Zet de standaard waarde voor snelheid, versnelling en continuïteit voor toekomstige aan te maken tussenpunten @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simuleer een traject - + Run a simulation on a trajectory Voer een simulatie uit op een traject @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Traject samenstelling... - + Group and connect some trajectories to one Groepeer en verbind enkele trajecten tot een @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Verkledingstraject... - + Create a dress-up object which overrides some aspects of a trajectory Een verkleding-object maken, die bepaalde aspecten van een traject wijzigt @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Verkeerde selectie @@ -376,115 +376,115 @@ Selecteer een robot om de beginpositie in te stellen - + Select one Robot Selecteer een Robot - - - - - + + + + + Select one Robot and one Trajectory object. Selecteer één robot en één traject-object. - + Trajectory not valid Traject ongeldig - + You need at least two waypoints in a trajectory to simulate. Minimaal 2 tussenpunten in baan nodig voor simulatie. - - + + KRL file KRL bestand - - + + All Files Alle bestanden - - + + Export program Exporteer programma - + Select one robot and one shape or VRML object. Selecteer één robot en één shape of VRML-object. - - + + Select one Trajectory object. Één traject object selecteren. - + No preselection Geen voorselectie - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Je moet zweven boven een geometrie (Voorselectie) met de muis om dit commando te gebruiken. Zie documentatie voor details. - + Set default speed Zet standaard snelheid - + speed: (e.g. 1 m/s or 3 cm/s) snelheid: (bijv. 1 m/s of 3 cm/s) - + Set default continuity Zet standaard continuïteit - + continuous ? continu? - + Set default acceleration Zet standaard versnelling - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) versnelling: (bijv. 1 m/s^2 of 3 cm/s^2) - + Select the Trajectory which you want to dress up. Selecteer het traject dat u wilt aankleden. - + Modify Modificeer - + No robot files installed Geen robot bestanden geïnstalleerd - + Please visit %1 and copy the files to %2 Bezoek %1 en kopieer de bestanden naar %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Verbergen / weergeven + + + + Edges: 0 + Randen: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Dimensionering Waarde: + + + + Use orientation of edge + Gebruik oriëntatie van de rand + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaakRobotBesturing - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaakRobotBerichten - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Type - - - - Name - Naam - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Traject - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Aankleed Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Verbergen / weergeven - - - - Edges: 0 - Randen: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Dimensionering Waarde: - - - - Use orientation of edge - Gebruik oriëntatie van de rand - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaakRobotBerichten + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Type + + + + Name + Naam + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Traject + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Aankleed Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts index 913adbedc4..9d87199b4a 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_pl.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Dodaj narzędzie - + Add a tool shape to the robot Dodaj kształt narzędzia robotowi @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Umieść robota... - + Place a robot (experimental!) Umieść robota (eksperymentalne!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Wstaw krawędź w tor ruchu ... - + Generate a Trajectory from a set of edges Generuj tor pracy z zestawu krawędzi @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Pełny podprogram Kuka... - + Export the trajectory as a full KRL subroutine. Wyeksportuj tor ruchu jako kompletny podprogram KRL. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Wstaw Kuka IR125 do dokumentu. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Wstaw Kuka IR16 do dokumentu. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Wstaw Kuka IR210 do dokumentu. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Wstaw narzędzie w tor ruchu - + Insert robot Tool location into trajectory Wstaw lokację narzędzia robota na tor ruchu @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Wstaw narzędzie w tor ruchu - + Insert preselection position into trajectory (W) Wstaw pozycję wyboru wstępnego do toru ruchu @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Przejdź do pozycji startowej @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Ustaw domyślną orientację - + Set the default orientation for subsequent commands for waypoint creation Ustaw domyślną orientację dla kolejnych poleceń przy tworzeniu punktów trasy @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Ustaw domyślne wartości - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Ustaw domyślne wartości prędkości, przyspieszenia i ciągłości dla kolejnych poleceń tworzenia punktów trasy @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Symulacja toru ruchu - + Run a simulation on a trajectory Uruchom symulację dotyczącą toru ruchu @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Złożenie toru pracy ... - + Group and connect some trajectories to one Grupuj i połącz kilka torów pracy w jeden @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Ulepszenie toru pracy... - + Create a dress-up object which overrides some aspects of a trajectory Utwórz obiekt ulepszenia, który zastępuje pewne cechy toru pracy @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Nieprawidłowy wybór @@ -376,115 +376,115 @@ Wybierz jednego Robota aby ustawić pozycje startową - + Select one Robot Zaznacz jednego Robota - - - - - + + + + + Select one Robot and one Trajectory object. Wybierz jednego robota i jedną trasę pracy. - + Trajectory not valid Niewłaściwa trajektoria - + You need at least two waypoints in a trajectory to simulate. Potrzebujesz co najmniej dwóch punktów w trasie pracy do symulacji. - - + + KRL file Plik KRL - - + + All Files Wszystkie pliki - - + + Export program Eksport programu - + Select one robot and one shape or VRML object. Wybierz jednego robota i jeden kształt lub obiekt VRML. - - + + Select one Trajectory object. Zaznacz jeden obiekt trasy pracy. - + No preselection Brak wstępnego wyboru - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Aby użyć tego polecenia, musisz najechać kursorem myszki na geometrię (wybór wstępny). Więcej informacji można znaleźć w dokumentacji. - + Set default speed Ustaw domyślną prędkość - + speed: (e.g. 1 m/s or 3 cm/s) prędkość: (np. 1 m/s lub 3 cm/s) - + Set default continuity Ustaw domyślną ciągłość - + continuous ? kontynuować ? - + Set default acceleration Ustaw domyślne przyśpieszenie - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) przyspieszenie: (przykład 1 m/s ^ 2 lub 3 cm/s ^ 2) - + Select the Trajectory which you want to dress up. Wybierz trasę pracy, którą chcesz wykonać. - + Modify Zmodyfikuj - + No robot files installed Brak zainstalowanych plików robota - + Please visit %1 and copy the files to %2 Odwiedź %1 i skopiuj pliki do %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter Zadanie Edge na Parametr Trac + + + Hide / Show + Ukryj / Pokaż + + + + Edges: 0 + Krawędzie: 0 + + + + Cluster: 0 + Klaster: 0 + + + + Sizing Value: + Wartość zmiany rozmiaru: + + + + Use orientation of edge + Użyj orientacji krawędzi + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl Kontrola zadania robota - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - Komunikaty zadania robota - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343, 343) - - - - Type - Typ - - - - Name - Nazwa - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Tor pracy - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Parametry ulepszenia - - - - TaskEdge2TracParameter - - - Hide / Show - Ukryj / Pokaż - - - - Edges: 0 - Krawędzie: 0 - - - - Cluster: 0 - Klaster: 0 - - - - Sizing Value: - Wartość zmiany rozmiaru: - - - - Use orientation of edge - Użyj orientacji krawędzi - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + Komunikaty zadania robota + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343, 343) + + + + Type + Typ + + + + Name + Nazwa + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Tor pracy + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Parametry ulepszenia + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_pt-BR.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_pt-BR.ts index 9490e55c38..6b8b4d92c6 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_pt-BR.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_pt-BR.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robô - + Add tool Adicionar ferramenta - + Add a tool shape to the robot Adicionar uma ferramenta de forma ao robô @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robô - + Place robot... Colocar robô... - + Place a robot (experimental!) Colocar um robô (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robô - + Edge to Trajectory... Aresta para trajetória... - + Generate a Trajectory from a set of edges Gerar uma trajetória a partir de um conjunto de arestas @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robô - + Kuka full subroutine... KUKA sub-rotina completa... - + Export the trajectory as a full KRL subroutine. Exporte a trajetória como uma sub-rotina KRL completa. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robô - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Inserir um Kuka IR125 no documento. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robô - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Inserir um Kuka IR16 no documento. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robô - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Inserir um Kuka IR210 no documento. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robô - + Insert in trajectory Inserir na trajetória - + Insert robot Tool location into trajectory Inserir localização de ferramenta de robô na trajetória @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robô - + Insert in trajectory Inserir na trajetória - + Insert preselection position into trajectory (W) Inserir posição da pre-seleção na trajetória (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robô - - + + Move to home Mover para a posição inicial @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robô - + Set default orientation Definir a orientação padrão - + Set the default orientation for subsequent commands for waypoint creation Definir a orientação padrão para os seguintes comandos para criação de ponto de passagem @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robô - + Set default values Definir valores padrão - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Defina os valores padrão para velocidade, aceleração e continuidade para os seguintes comandos para criar o ponto de passagem @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robô - + Simulate a trajectory Simular uma trajetória - + Run a simulation on a trajectory Executar uma simulação sobre uma trajetória @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robô - + Trajectory compound... Composto de trajetória... - + Group and connect some trajectories to one Agrupar e conectar algumas trajetórias a uma @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robô - + Dress-up trajectory... Trajetória de vestimento... - + Create a dress-up object which overrides some aspects of a trajectory Cria um objeto de vestimento que substitui alguns aspectos de uma trajetória @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Seleção errada @@ -376,115 +376,115 @@ Selecione um robô para definir a posição de origem - + Select one Robot Selecione um robô - - - - - + + + + + Select one Robot and one Trajectory object. Selecione um robô e uma trajetória. - + Trajectory not valid A trajetória não é válida - + You need at least two waypoints in a trajectory to simulate. Você precisa de pelo menos dois pontos em uma trajetória para simular. - - + + KRL file Arquivo KRL - - + + All Files Todos os Arquivos - - + + Export program Exportar programa - + Select one robot and one shape or VRML object. Selecione um robô e uma forma ou objeto VRML. - - + + Select one Trajectory object. Selecione um objeto de trajetória. - + No preselection Nenhuma preseleção - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Coloque o mouse em cima de um objeto (preseleção) para usar este comando. Veja a documentação para mais detalhes. - + Set default speed Definir velocidade padrão - + speed: (e.g. 1 m/s or 3 cm/s) Velocidade: (por exemplo, 1 m/s ou 3 cm/s) - + Set default continuity Definir continuidade padrão - + continuous ? Contínuo ? - + Set default acceleration Definir aceleração padrão - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) Aceleração: (por exemplo, 1 m/s^2 ou 3 cm/s^2) - + Select the Trajectory which you want to dress up. Selecione a trajetória que você deseja vestir. - + Modify Modificar - + No robot files installed Nenhum arquivo de robô instalado - + Please visit %1 and copy the files to %2 Por favor, visite %1 e copie os arquivos para %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Ocultar / Mostrar + + + + Edges: 0 + Arestas: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Valor de dimensionamento: + + + + Use orientation of edge + Utiliza a orientação da aresta + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl ControleRobôTarefas - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - MensagensRobôTarefas - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Tipo - - - - Name - Nome - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajetória - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Parâmetro de vestimento - - - - TaskEdge2TracParameter - - - Hide / Show - Ocultar / Mostrar - - - - Edges: 0 - Arestas: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Valor de dimensionamento: - - - - Use orientation of edge - Utiliza a orientação da aresta - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + MensagensRobôTarefas + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Tipo + + + + Name + Nome + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajetória + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Parâmetro de vestimento + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_pt-PT.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_pt-PT.ts index 34053a99e1..4ca82bfd2a 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_pt-PT.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_pt-PT.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robô - + Add tool Adicionar Ferramenta - + Add a tool shape to the robot Adicionar uma Ferramenta de Formas para o Robô @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robô - + Place robot... Colocar Robô ... - + Place a robot (experimental!) Colocar Robô (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robô - + Edge to Trajectory... Aresta para trajetória... - + Generate a Trajectory from a set of edges Gerar uma trajetória a partir de um conjunto de arestas @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robô - + Kuka full subroutine... Kuka sub-rotina completa... - + Export the trajectory as a full KRL subroutine. Exporte a trajetória como uma sub-rotina KRL completa. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robô - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Inserir Kuka IR125 no Documento. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robô - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Inserir Kuka IR16 no Documento. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robô - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Inserir Kuka IR210 no Documento. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robô - + Insert in trajectory Inserir na Trajetória - + Insert robot Tool location into trajectory Inserir localização da ferramenta de robô na trajetória @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robô - + Insert in trajectory Inserir na Trajetória - + Insert preselection position into trajectory (W) Insira a pré-selecção posição na trajetória (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robô - - + + Move to home Mover p/ Início @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robô - + Set default orientation Definir Orientação Predefinida - + Set the default orientation for subsequent commands for waypoint creation Definir a orientação predefinida para os comandos subsequentes para a criação de waypoint @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robô - + Set default values Definir Valores Predefinidos - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Defina os valores predefinidos para a velocidade, aceleração e continuidade para comandos subsequentes de criação de waypoint @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robô - + Simulate a trajectory Simular uma Trajetória - + Run a simulation on a trajectory Executar uma Simulação numa Trajetória @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robô - + Trajectory compound... Composto de trajetória... - + Group and connect some trajectories to one Agrupar e conectar algumas trajetórias a outra @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robô - + Dress-up trajectory... Cobrir (dress-up) trajetória... - + Create a dress-up object which overrides some aspects of a trajectory Cria um objeto cobrir (dress-up) que substitui alguns aspectos de uma trajetória @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Seleção errada @@ -376,115 +376,115 @@ Selecione um robô para definir a posição de origem - + Select one Robot Selecione um robô - - - - - + + + + + Select one Robot and one Trajectory object. Selecionar um Robô e um Objeto da Trajetória - + Trajectory not valid Trajetória inválida - + You need at least two waypoints in a trajectory to simulate. Você precisa de pelo menos dois pontos numa trajetória para simular. - - + + KRL file Ficheiro KRL - - + + All Files Todos os Ficheiros - - + + Export program Exportar Programa - + Select one robot and one shape or VRML object. Selecione um robô e uma forma ou objeto VRML. - - + + Select one Trajectory object. Selecione um objeto de trajetória. - + No preselection Nenhuma Pré-seleção - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Coloque o rato em cima de um objeto (preseleção) para usar este comando. Veja a documentação para mais detalhes. - + Set default speed Definir velocidade predefinida - + speed: (e.g. 1 m/s or 3 cm/s) Velocidade: (ex.: 1 m/s ou 3 cm/s) - + Set default continuity Definir continuidade predefinida - + continuous ? Contínuo? - + Set default acceleration Definir aceleração predefinida - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) Aceleração: (ex.: 1 m/s^2 ou 3 cm/s^2) - + Select the Trajectory which you want to dress up. Selecione a trajetória que você deseja vestir (dress-up). - + Modify Modificar - + No robot files installed Não há ficheiros de robô instalados - + Please visit %1 and copy the files to %2 Por favor visite o %1 e copie os ficheiros para %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Ocultar / Mostrar + + + + Edges: 0 + Arestas: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Valor de dimensionamento: + + + + Use orientation of edge + Utiliza a orientação da aresta + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Tipo - - - - Name - Nome - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajetória - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Ocultar / Mostrar - - - - Edges: 0 - Arestas: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Valor de dimensionamento: - - - - Use orientation of edge - Utiliza a orientação da aresta - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Tipo + + + + Name + Nome + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajetória + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_ro.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_ro.ts index 5b7d56764a..cfd7876582 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_ro.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_ro.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Adaugă instrument - + Add a tool shape to the robot Adăugaţi o formă de instrument la robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Plasaţi robotul... - + Place a robot (experimental!) Plasaţi robotul (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Muchie la Traiectorie... - + Generate a Trajectory from a set of edges Generați o Traiectorie de la un set de muchii @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Subrutină completă Kuka... - + Export the trajectory as a full KRL subroutine. Exportaţi traiectoria ca o subrutină KRL completă. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Inserați un Kuka IR125 în document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Inserați un Kuka IR16 în document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Inserați un Kuka IR210 în document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Inseraţi în traiectorie - + Insert robot Tool location into trajectory Introduceţi locaţia uneltei robotului în traiectorie @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Inseraţi în traiectorie - + Insert preselection position into trajectory (W) Introduceţi poziţia preselectată în traiectorie (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Mută spre casă @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Setați orientarea implicită - + Set the default orientation for subsequent commands for waypoint creation Definește orientarea implicită pentru comenzile subsecvente pentru punctul de trecere @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Setați valorile implicite - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Definește valorile implicite pentru viteză, accelerație și continuitatea ale comenzilor subsecvente pentru crearea punctului de trecere @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simulaţi o traiectorie - + Run a simulation on a trajectory Rulaţi o simulare a traiectoriei @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Traiectorie combinată... - + Group and connect some trajectories to one Grupați și uniți unele traiectorii într-una singură @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Mise en forme de la trajectoire... - + Create a dress-up object which overrides some aspects of a trajectory Créarea unui objet de mise en forme care înlocuiește unele aspecte ale unei traiectorii @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Selecţie greşită @@ -376,115 +376,115 @@ Selectaţi un Robot pentru a seta poziţia de origine - + Select one Robot Selectaţi un Robot - - - - - + + + + + Select one Robot and one Trajectory object. Selectaţi un obiect Robot şi un obiect de Traiectorie. - + Trajectory not valid Traiectoria nu este validă - + You need at least two waypoints in a trajectory to simulate. Aveți nevoie de cel puțin două puncte de trecere pentru a defini traiectoria de simulat. - - + + KRL file KRL fişier - - + + All Files Toate fișierele - - + + Export program Program de export - + Select one robot and one shape or VRML object. Selectaţi un robot şi o formă sau un obiect VRML. - - + + Select one Trajectory object. Selectaţi un obiect Traiectorie. - + No preselection Nici o preselecţie - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Va trebui să treceţi peste o formă geometrică (Preselectie) cu mouse-ul pentru a utiliza această comandă. Consultați documentaţia pentru mai multe detalii. - + Set default speed Definește viteza implicită - + speed: (e.g. 1 m/s or 3 cm/s) viteza: (de ex: 1 m/s sau 3 cm/s) - + Set default continuity Definește continuitatea implicită - + continuous ? continuu? - + Set default acceleration Definiți accelerația implicită - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) accelerația: (ex. 1 m/s^2 sau 3 cm/s^2) - + Select the Trajectory which you want to dress up. Selectaţi traiectoria pe care doriţi să o îmbrăcaţi. - + Modify Modifica - + No robot files installed Nici un fișier pentru robot instalat - + Please visit %1 and copy the files to %2 Vă rugăm să vizitaţi %1 şi copiaţi fişierele în %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Ascunde / Arată + + + + Edges: 0 + Muchii: 0 + + + + Cluster: 0 + Cluster: 0 + + + + Sizing Value: + Valoarea de dimensionare: + + + + Use orientation of edge + Folosiţi orientarea muchiei + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Poz: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Tip - - - - Name - Nume - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Ascunde / Arată - - - - Edges: 0 - Muchii: 0 - - - - Cluster: 0 - Cluster: 0 - - - - Sizing Value: - Valoarea de dimensionare: - - - - Use orientation of edge - Folosiţi orientarea muchiei - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Poz: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Tip + + + + Name + Nume + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_ru.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_ru.ts index d665e3e1b6..16dd56229d 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_ru.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_ru.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Робот - + Add tool Добавить инструмент - + Add a tool shape to the robot Добавить правило для робота @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Робот - + Place robot... Добавить робота... - + Place a robot (experimental!) Добавить робота (экспериментально!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Робот - + Edge to Trajectory... Преобразовать ребра в траекторию... - + Generate a Trajectory from a set of edges Создать траекторию из ребер @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Робот - + Kuka full subroutine... Полная подпрограмма Kuka... - + Export the trajectory as a full KRL subroutine. Экспортировать траекторию как полноправную KRL-подпрограмму. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Робот - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Вставить Кuka IR125 в документ. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Робот - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Вставить Кuka IR16 в документ. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Робот - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Вставить Кuka IR500 в документ. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Робот - + Insert in trajectory Вставить текущее положение робота в траекторию - + Insert robot Tool location into trajectory Вставьте местоположение робота на траектории @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Робот - + Insert in trajectory Вставить текущее положение робота в траекторию - + Insert preselection position into trajectory (W) Вставить предварительную позицию на траектории (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Робот - - + + Move to home Вернуть в исходное положение @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Робот - + Set default orientation Настроить значения ориентации по умолчанию - + Set the default orientation for subsequent commands for waypoint creation Задать ориентацию по умолчанию для последующих команд для создания маршрутной точки @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Робот - + Set default values Настроить значения по умолчанию - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Задать значения по умолчанию для скорости, ускорения и непрерывности для последующих команд создания маршрутной точки @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Робот - + Simulate a trajectory Имитация траектории - + Run a simulation on a trajectory Смоделировать движение робота по указанной траектории @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Робот - + Trajectory compound... Соединение траекторий... - + Group and connect some trajectories to one Группировать и соединить траектории в одну @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Робот - + Dress-up trajectory... Изменить базовую траекторию... - + Create a dress-up object which overrides some aspects of a trajectory Создать корректирующий объект, меняющий некоторые аспекты базовой траектории @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Неверный выбор @@ -376,115 +376,115 @@ Выберите одного робота, чтобы задать исходное положение - + Select one Robot Выберите одного робота - - - - - + + + + + Select one Robot and one Trajectory object. Выберите робота и траекторию движения. - + Trajectory not valid Траектория не действительна - + You need at least two waypoints in a trajectory to simulate. Для симуляции траектория должна иметь хотя бы две точки. - - + + KRL file KRL файл - - + + All Files Все файлы - - + + Export program Экспорт программы - + Select one robot and one shape or VRML object. Выберите один робот и одну фигуру или объект VRML. - - + + Select one Trajectory object. Выделите один объект траектории. - + No preselection Не выбрано - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Чтобы использовать данную команду, наведите курсор на выбранную фигуру. См. документацию. - + Set default speed Установить скорость по умолчанию - + speed: (e.g. 1 m/s or 3 cm/s) скорость: (3 см/с или 1 м/с) - + Set default continuity Установить непрерывность по умолчанию - + continuous ? непрерывно ? - + Set default acceleration Установить ускорение по умолчанию - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) ускорение: (например, 1 м/с^2 или 3 см/с^2) - + Select the Trajectory which you want to dress up. Выберите траекторию, которую вы хотите оформить. - + Modify Изменить - + No robot files installed Нет установленных файлов робота - + Please visit %1 and copy the files to %2 Пожалуйста, посетите %1 и скопируйте файлы в %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Скрыть / Показать + + + + Edges: 0 + Краев: 0 + + + + Cluster: 0 + Кластеров: 0 + + + + Sizing Value: + Калибровка значений: + + + + Use orientation of edge + Используйте ориентацию ребра + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl задание автоматического управления - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - создание автоматического сообщения - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 мс - - - - 50 ms - 50 мс - - - - 100 ms - 100 мс - - - - 500 ms - 500 мс - - - - 1 s - 1 с - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Поз: (200.23, 300.23, 400.23, 234, 343, 343) - - - - Type - Тип - - - - Name - Название - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Траектории - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Параметр - - - - TaskEdge2TracParameter - - - Hide / Show - Скрыть / Показать - - - - Edges: 0 - Краев: 0 - - - - Cluster: 0 - Кластеров: 0 - - - - Sizing Value: - Калибровка значений: - - - - Use orientation of edge - Используйте ориентацию ребра - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + создание автоматического сообщения + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 мс + + + + 50 ms + 50 мс + + + + 100 ms + 100 мс + + + + 500 ms + 500 мс + + + + 1 s + 1 с + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Поз: (200.23, 300.23, 400.23, 234, 343, 343) + + + + Type + Тип + + + + Name + Название + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Траектории + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Параметр + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_sl.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_sl.ts index 87dcb67d9b..66598b02c0 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_sl.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_sl.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Dodaj orodje - + Add a tool shape to the robot Dodaj obliko orodja k robotu @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Postavi robota … - + Place a robot (experimental!) Postavi robota (preizkusno) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Rob v pot … - + Generate a Trajectory from a set of edges Ustvari pot iz niza robov @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Polna podrutina Kuka … - + Export the trajectory as a full KRL subroutine. Izvozi pot kot polno podrutino KRL. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Vstavi Kuko IR125 v dokument. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Vstavi Kuko IR16 v dokument. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Vstavi Kuko IR310 v dokument. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Vstavi v pot - + Insert robot Tool location into trajectory Vstavi mesto orodja robota v pot @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Vstavi v pot - + Insert preselection position into trajectory (W) Vstavi položaj predizbire v pot (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Premakni v izh. položaj @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Nastavi privzeto usmerjenost - + Set the default orientation for subsequent commands for waypoint creation Nastavi privzeto usmerjenost naknadnih ukazov za ustvarjanje točk @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Nastavi privzete vrednosti - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Nastavi privzete vrednosti hitrosti, pospeška in kontinuitete za naknadne ukaze ustvarjanja točk @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simuliraj pot - + Run a simulation on a trajectory Zaženi simulacijo poti @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Sestav poti … - + Group and connect some trajectories to one Združi in poveži poti v eno @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Dodelaj pot … - + Create a dress-up object which overrides some aspects of a trajectory Ustvari dodelovalni predmet, ki preglasi nekatere lastnosti poti @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Napačen izbor @@ -376,115 +376,115 @@ Izberite enega robota za nastavitev izhodiščnega položaja - + Select one Robot Izberite enega robota - - - - - + + + + + Select one Robot and one Trajectory object. Izberite enega robota in eno pot - + Trajectory not valid Pot ni veljavna - + You need at least two waypoints in a trajectory to simulate. V poti potrebujete vsaj dve točki za simulacijo. - - + + KRL file Datoteka KRL - - + + All Files Vse datoteke - - + + Export program Izvozi program - + Select one robot and one shape or VRML object. Izberite enega robota in eno obliko ali objekt VRML. - - + + Select one Trajectory object. Izberite eno pot. - + No preselection Ni predizbire - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Za uporabo tega ukaza se morate z miško pomakniti preko geometrije (predizbira). Za podrobnosti glejte dokumentacijo. - + Set default speed Nastavi privzeto hitrost - + speed: (e.g. 1 m/s or 3 cm/s) hitrost: (npr.: 1 m/s ali 3 cm/s) - + Set default continuity Nastavi privzeto kontinuiteto - + continuous ? neprekinjeno? - + Set default acceleration Nastavi privzeti pospešek - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) pospešek: (npr.: 1 m/s² ali 3 cm/s²) - + Select the Trajectory which you want to dress up. Izberite pot, ki jo želite dodelati. - + Modify Spremeni - + No robot files installed Nobene datoteke robota ni nameščene - + Please visit %1 and copy the files to %2 Obiščite %1 in kopirajte datoteke v %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Skrij/Prikaži + + + + Edges: 0 + Robov: 0 + + + + Cluster: 0 + Gruč: 0 + + + + Sizing Value: + Vrednost velikosti: + + + + Use orientation of edge + Uporabi usmerjenost roba + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pol.: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Vrsta - - - - Name - Naziv - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Skrij/Prikaži - - - - Edges: 0 - Robov: 0 - - - - Cluster: 0 - Gruč: 0 - - - - Sizing Value: - Vrednost velikosti: - - - - Use orientation of edge - Uporabi usmerjenost roba - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pol.: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Vrsta + + + + Name + Ime + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_sr-CS.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_sr-CS.ts index 6f35eebb21..0f41eed972 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_sr-CS.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_sr-CS.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Dodaj alat - + Add a tool shape to the robot Dodaj alat za oblik robotu @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Postavi robota... - + Place a robot (experimental!) Postavi robota (eksperimentalno) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Ivica u Putanju... - + Generate a Trajectory from a set of edges Stvori Putanju od više ivica @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Kuka ceo podprogram... - + Export the trajectory as a full KRL subroutine. Izvezi putanju kao potpun KRL podprogram. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Umetni Kuka IR125 u dokument. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Umetni Kuka IR16 u dokument. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Umetni Kuka IR210 u dokument. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Umetni putanju - + Insert robot Tool location into trajectory Umetni lokaciju Alata robota u putanju @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Umetni putanju - + Insert preselection position into trajectory (W) Umetni prethodno izabranu poziciju u putanju (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Pomeri na početnu poziciju @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Podesi podrazumevanu orijentaciju - + Set the default orientation for subsequent commands for waypoint creation Podesi podrazumevanu orijentaciju za prateće komande stvaranja tačaka putanje @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Podesi podrazumevane vrednosti - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Podesi podrazumevane vrednosti za brzinu, ubrzanje i kontinuitet za prateće komande stvaranja tačaka putanje @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simuliraj putanju - + Run a simulation on a trajectory Pokreni simulaciju na putanji @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Spoj putanje... - + Group and connect some trajectories to one Grupiši i spoji neke putanje u jednu @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Opremi putanju... - + Create a dress-up object which overrides some aspects of a trajectory Napravi opremljen objekat koji će nadglasati neke aspekte putanje @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Pogrešan izbor @@ -376,115 +376,115 @@ Izaberi jednog Robota da podesiš početni položaj - + Select one Robot Izaberi jednog Robota - - - - - + + + + + Select one Robot and one Trajectory object. Izaberi jednog Robota i jedan objekat Putanje. - + Trajectory not valid Putanja je nevažeća - + You need at least two waypoints in a trajectory to simulate. Potrebne su bar dve tačke putanje za cimulaciju. - - + + KRL file KRL datoteka - - + + All Files Sve datoteke - - + + Export program Izvezi program - + Select one robot and one shape or VRML object. Izaberi jednog robota i jedan oblik, ili VRML objekat. - - + + Select one Trajectory object. Izaberi jedan objekat Putanje. - + No preselection Nema predizbora - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Morate prelaziti preko geometrije (predizbora) sa mišem, da bi koristili ovu komandu. Pogledajte dokumentaciju za detalje. - + Set default speed Podesi podrazumevanu brzinu - + speed: (e.g. 1 m/s or 3 cm/s) brzina: (e.g. 1 m/s or 3 cm/s) - + Set default continuity Podesi podrazumevani kontinuitet - + continuous ? neprekidno ? - + Set default acceleration Podesi podrazumevano ubrzanje - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) ubrzanje: (e.g. 1 m/s^2 or 3 cm/s^2) - + Select the Trajectory which you want to dress up. Izaberi Putanju koju želite da opremite. - + Modify Izmeni - + No robot files installed Nema instaliranih robot datoteka - + Please visit %1 and copy the files to %2 Poseti %1 i kopirajte datoteke u %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Sakrij / Prikaži + + + + Edges: 0 + Ivice: 0 + + + + Cluster: 0 + Jato: 0 + + + + Sizing Value: + Kalibrisanje Vrednosti: + + + + Use orientation of edge + Koristi orijentaciju ivice + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Poz: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Vrsta - - - - Name - Ime - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Sakrij / Prikaži - - - - Edges: 0 - Ivice: 0 - - - - Cluster: 0 - Jato: 0 - - - - Sizing Value: - Kalibrisanje Vrednosti: - - - - Use orientation of edge - Koristi orijentaciju ivice - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Poz: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Vrsta + + + + Name + Ime + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_sr.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_sr.ts index 115901bfb0..3ba36c9694 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_sr.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_sr.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Робот - + Add tool Додаj алат - + Add a tool shape to the robot Додај алат за облик роботу @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Робот - + Place robot... Поcтави робота... - + Place a robot (experimental!) Поcтави робота (екcпериментално) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Робот - + Edge to Trajectory... Руб у Путању... - + Generate a Trajectory from a set of edges Створи Путању од више ивица @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Робот - + Kuka full subroutine... Kuka цео подпрограм... - + Export the trajectory as a full KRL subroutine. Извези путању као потпун KRL подпрограм. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Робот - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Уметни Kuka IR125 у документ. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Робот - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Уметни Kuka IR16 у документ. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Робот - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Уметни Kuka IR210 у документ. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Робот - + Insert in trajectory Уметни путању - + Insert robot Tool location into trajectory Уметни локацију Алата робота у путању @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Робот - + Insert in trajectory Уметни путању - + Insert preselection position into trajectory (W) Уметни претходно изабрани положај у путању (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Робот - - + + Move to home Помери на почетну позицију @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Робот - + Set default orientation Подеcи подразумевану оријентацију - + Set the default orientation for subsequent commands for waypoint creation Постави подразумевану оријентацију за пратеће команде стварања тачака путање @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Робот - + Set default values Постави подразумеване вредности - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Подеcи подразумеване вредноcти за брзину, убрзање и континуитет за пратеће команде стварања тачака путање @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Робот - + Simulate a trajectory Cимулирај путању - + Run a simulation on a trajectory Покрени cимулацију на путањи @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Робот - + Trajectory compound... Cпој путање... - + Group and connect some trajectories to one Групиши и cпоји неке путање у једну @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Робот - + Dress-up trajectory... Опреми путању... - + Create a dress-up object which overrides some aspects of a trajectory Направи опремљен објекат који ће надглаcати неке аcпекте путање @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Погрешан избор @@ -376,115 +376,115 @@ Изабери једног Робота да подесиш почетни положај - + Select one Robot Изабери једног Робота - - - - - + + + + + Select one Robot and one Trajectory object. Изабери једног Робота и један објекат Путање. - + Trajectory not valid Путања је неважећа - + You need at least two waypoints in a trajectory to simulate. Потребне cу бар две тачке путање за cимулацију. - - + + KRL file KRL датотека - - + + All Files Све датотеке - - + + Export program Извези програм - + Select one robot and one shape or VRML object. Изабери једног робота и један облик, или VRML објекат. - - + + Select one Trajectory object. Изабери један објекат Путање. - + No preselection Нема предизбора - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Морате прелазити преко геометрије (предизбора) cа мишем,да би кориcтили ову команду.Погледајте документацију за детаље. - + Set default speed Подеси подразумевану брзину - + speed: (e.g. 1 m/s or 3 cm/s) брзина: (e.g. 1 m/s or 3 cm/s) - + Set default continuity Подеси подразумевани континуитет - + continuous ? непрекидно ? - + Set default acceleration Подеcи подразумевано убрзање - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) убрзање: (e.g. 1 m/s^2 or 3 cm/s^2) - + Select the Trajectory which you want to dress up. Изабери Путању коју желиш да опремиш. - + Modify Измени - + No robot files installed Нема инсталираних робот датотека - + Please visit %1 and copy the files to %2 Посетите %1 и копирајте датотеке у %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Сакриј / Прикажи + + + + Edges: 0 + Ивице: 0 + + + + Cluster: 0 + Јато: 0 + + + + Sizing Value: + Калибриcање Вредноcти: + + + + Use orientation of edge + Користи оријентацију ивице + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 мс - - - - 50 ms - 50 мс - - - - 100 ms - 100 мс - - - - 500 ms - 500 мс - - - - 1 s - 1 с - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Поз: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Врста - - - - Name - Име - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Сакриј / Прикажи - - - - Edges: 0 - Ивице: 0 - - - - Cluster: 0 - Јато: 0 - - - - Sizing Value: - Калибриcање Вредноcти: - - - - Use orientation of edge - Користи оријентацију ивице - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 мс + + + + 50 ms + 50 мс + + + + 100 ms + 100 мс + + + + 500 ms + 500 мс + + + + 1 s + 1 с + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Поз: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Врста + + + + Name + Име + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_sv-SE.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_sv-SE.ts index 30419578fd..2804be81b6 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_sv-SE.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_sv-SE.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Lägg till verktyg - + Add a tool shape to the robot Lägg till en verktygsform till roboten @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Placera roboten ... - + Place a robot (experimental!) Placera en robot (experimentell!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Kant till bana... - + Generate a Trajectory from a set of edges Generera en bana från en uppsättning med kanter @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... fullständig KUKA subrutin ... - + Export the trajectory as a full KRL subroutine. Exportera banan som en fullständig KRL subrutin. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 KUKA IR125 - + Insert a Kuka IR125 into the document. Sätt in en Kuka IR125 i dokumentet. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 KUKA IR16 - + Insert a Kuka IR16 into the document. Sätt in en Kuka IR16 i dokumentet. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 KUKA IR210 - + Insert a Kuka IR210 into the document. Sätt in en Kuka IR210 i dokumentet. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Sätt in i bana - + Insert robot Tool location into trajectory Infoga robotverktygets plats i banan @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Sätt in i bana - + Insert preselection position into trajectory (W) Infoga förvalsposition till banan (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Flytta till hemposition @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Ange standard orientering - + Set the default orientation for subsequent commands for waypoint creation Ange standardorienteringen för efterföljande kommandon vid skapande av banpunkter @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Ange standardvärden - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Ange standardvärden för hastighet, acceleration och kontinuitet för efterföljande kommandon för banpunkter @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simulera en bana - + Run a simulation on a trajectory Kör en simulering på en bana @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Sammansatt bana... - + Group and connect some trajectories to one Gruppera och anslut vissa banor till en @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Bekläd färdbana... - + Create a dress-up object which overrides some aspects of a trajectory Skapa ett utklädnadsobjekt som åsidosätter vissa aspekter hos en färdbana @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Fel val @@ -376,115 +376,115 @@ Välj en robot för att ställa in hempositionen - + Select one Robot Välj en Robot - - - - - + + + + + Select one Robot and one Trajectory object. Välj en robot och ett banobjekt. - + Trajectory not valid Banan inte giltig - + You need at least two waypoints in a trajectory to simulate. Du behöver minst två banpunkter i en bana för att simulera. - - + + KRL file KRL fil - - + + All Files Alla filer - - + + Export program Exportera programmet - + Select one robot and one shape or VRML object. Välj en robot och en form eller ett VRML objekt. - - + + Select one Trajectory object. Välj ett banobjekt. - + No preselection Inga förval - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Du måste sväva ovanför en geometri (Förval) med musen för att använda detta kommando. Se dokumentationen för detaljer. - + Set default speed Ange standardhastighet - + speed: (e.g. 1 m/s or 3 cm/s) hastighet: (t.ex. 1 m/s eller 3 cm/s) - + Set default continuity Ange standardkontinuitet - + continuous ? Kontinuerlig? - + Set default acceleration Ange standardacceleration - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) acceleration: (t.ex. 1 m/s^2 eller 3 cm/s^2) - + Select the Trajectory which you want to dress up. Markera banan som du vill klä upp. - + Modify Modifiera - + No robot files installed Inga robotfiler installerade - + Please visit %1 and copy the files to %2 Besök %1 och kopiera filerna till %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Dölj / Visa + + + + Edges: 0 + Kanter: 0 + + + + Cluster: 0 + Kluster: 0 + + + + Sizing Value: + Storleksguide Värde: + + + + Use orientation of edge + Använd orientering av kanten + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl Uppgift Robotkontroll - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - Uppgift Robot meddelanden - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Typ - - - - Name - Namn - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Rörelsebana - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Klä upp Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Dölj / Visa - - - - Edges: 0 - Kanter: 0 - - - - Cluster: 0 - Kluster: 0 - - - - Sizing Value: - Storleksguide Värde: - - - - Use orientation of edge - Använd orientering av kanten - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + Uppgift Robot meddelanden + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Typ + + + + Name + Namn + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Rörelsebana + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Klä upp Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_tr.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_tr.ts index 4ffe98cd83..7eb42a50cd 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_tr.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_tr.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Araç ekle - + Add a tool shape to the robot Robota şekil aracı ekle @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Robot ekle... - + Place a robot (experimental!) Bir robot yerleştir (deneyseldir!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Kenardan yörüngeye... - + Generate a Trajectory from a set of edges Bir kenarlık kümesinden bir yörünge oluştur @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Tam Kuka alt yordamı... - + Export the trajectory as a full KRL subroutine. Yörüngeyi tam bir KRL alt yordamı olarak dışarı aktar. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Belgeye Kuka IR125 ekle. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Belgeye Kuka IR16 ekle. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Belgeye Kuka IR210 ekle. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Yörüngeye ekle - + Insert robot Tool location into trajectory Yörüngeye robot araç konumu ekler @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Yörüngeye ekle - + Insert preselection position into trajectory (W) Yörüngeye (W) önceden seçilmiş konumu ekler @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Başlangıca taşı @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Varsayılan yönlendirmeyi ayarlar - + Set the default orientation for subsequent commands for waypoint creation Yol noktası oluşturmak üzere bir sonraki komutlar için varsayılan oryantasyonu ayarla @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Varsayılan değerleri ayarla - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Bir sonraki yol noktası oluşturma komutları için hız, ivme ve süreklilik için varsayılan değerleri ayarlayın @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Yörüngenin benzetimini yap - + Run a simulation on a trajectory Yörünge üzerinde bir benzetim çalıştır @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Yörünge bileşimi... - + Group and connect some trajectories to one Bazı yörüngeli grupla ve tek bir yörünge olarak birleştir @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Giydirme yörüngesi... - + Create a dress-up object which overrides some aspects of a trajectory Bir yörüngenin bazı yönlerini geçersiz kılacak bir giyinme nesnesi oluşturun @@ -358,16 +358,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Yanlış seçim @@ -377,115 +377,115 @@ Ana konumu ayarlamak için bir Robot seçin - + Select one Robot Bir Robot seç - - - - - + + + + + Select one Robot and one Trajectory object. Bir Robot ve bir Yörünge nesnesi seçin. - + Trajectory not valid Yörünge geçerli değil - + You need at least two waypoints in a trajectory to simulate. Simüle etmek için bir yörüngede en az iki geçiş noktasına ihtiyacınız var. - - + + KRL file KRL dosyası - - + + All Files Tüm Dosyalar - - + + Export program Uygulamayı dışarı aktar - + Select one robot and one shape or VRML object. Bir robot ve bir şekil veya bir VRML nesnesi seç. - - + + Select one Trajectory object. Bir Yörünge nesnesi seç. - + No preselection Önseçim yapılmamış - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Bu komutu kullanmak için fareyle bir geometri (Seçim) üzerinde durmanız gerekir. Ayrıntılar için dokümanlara bakın. - + Set default speed Varsayılan hızı ayarla - + speed: (e.g. 1 m/s or 3 cm/s) hız: (örn. 1 m/s veya 3 cm/s) - + Set default continuity Varsayılan sürekliliği ayarla - + continuous ? sürekli ? - + Set default acceleration Varsayılan ivmeyi ayarla - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) ivme: (örn. 1 m/s^2 veya 3 cm/s^2) - + Select the Trajectory which you want to dress up. Giydirmek istediğiniz yörüngeyi seçin. - + Modify Değiştir - + No robot files installed Kurulu hiçbir robot dosyası yok - + Please visit %1 and copy the files to %2 Lütfen %1 'i ziyaret edin ve %2 'e dosyaları kopyalayın @@ -555,6 +555,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Gizle/Göster + + + + Edges: 0 + Kenarlar: 0 + + + + Cluster: 0 + Küme: 0 + + + + Sizing Value: + Boyutlandırma Değeri: + + + + Use orientation of edge + Kenarın yönlendirmesini kullan + RobotGui::TaskRobot6Axis @@ -607,145 +632,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 sn - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Konum: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Türü - - - - Name - Isim - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Gizle/Göster - - - - Edges: 0 - Kenarlar: 0 - - - - Cluster: 0 - Küme: 0 - - - - Sizing Value: - Boyutlandırma Değeri: - - - - Use orientation of edge - Kenarın yönlendirmesini kullan - - - - TaskRobotControl X+ @@ -858,7 +748,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -866,7 +761,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 sn + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Konum: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Türü + + + + Name + Isim + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_uk.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_uk.ts index 05ca32de53..de331a93a3 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_uk.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_uk.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Робот - + Add tool Додати інструмент - + Add a tool shape to the robot Додати інструмент форми до робота @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Робот - + Place robot... Розмістити робота ... - + Place a robot (experimental!) Розмістити робота (експериментально!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Робот - + Edge to Trajectory... Ребра в Траєкторію... - + Generate a Trajectory from a set of edges Генерувати Траєкторію із встановлених ребер @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Робот - + Kuka full subroutine... Повна підпрограма Kuka... - + Export the trajectory as a full KRL subroutine. Експортувати траєкторію як повну KRL підпрограму. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Робот - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Вставити Kuka IR125 в документ. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Робот - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Вставити Kuka IR16 в документ. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Робот - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Вставити Kuka IR210 в документ. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Робот - + Insert in trajectory Вставити в траєкторію - + Insert robot Tool location into trajectory Вставте інструмент розміщення робота на траєкторії @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Робот - + Insert in trajectory Вставити в траєкторію - + Insert preselection position into trajectory (W) Вставити попередньо обрану позицію в траєкторію (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Робот - - + + Move to home Рухатись до домівки @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Робот - + Set default orientation Встановити стандартну орієнтацію - + Set the default orientation for subsequent commands for waypoint creation Встановити орієнтацію за замовчуванням для наступних команд та створення маршрутних точок @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Робот - + Set default values Встановити стандартні значення - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Встановити значення за замовчуванням для швидкості, прискорення та наступності для подальших команд створення маршрутних точок @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Робот - + Simulate a trajectory Моделювання траєкторії - + Run a simulation on a trajectory Виконати моделювання на траєкторії @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Робот - + Trajectory compound... Об'єднання траєкторії... - + Group and connect some trajectories to one Групування та підключення деякий траєкторій в одну @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Робот - + Dress-up trajectory... Маскувати траєкторію... - + Create a dress-up object which overrides some aspects of a trajectory Створити об'єкт, який маскує деякі елементи траєкторії @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Невірний вибір @@ -376,115 +376,115 @@ Виберіть один робот для встановлення домашньої позиції - + Select one Robot Оберіть одного Робота - - - - - + + + + + Select one Robot and one Trajectory object. Виберіть один робот і одну траєкторію об'єкта. - + Trajectory not valid Траєкторія не дійсна - + You need at least two waypoints in a trajectory to simulate. Для моделювання, потрібно, принаймні, дві точки на траєкторії. - - + + KRL file KRL файл - - + + All Files Всі файли - - + + Export program Експорт програми - + Select one robot and one shape or VRML object. Виберіть один робот і одну форму або VRML об'єкт. - - + + Select one Trajectory object. Оберіть одну Траєкторію об’єкта. - + No preselection Нічого не вибрано - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Щоб використовувати цю команду, курсор миші повинен знаходитися над попередньо обраною геометричною побудовою. Подробиці дивіться у документації. - + Set default speed Встановити швидкість за замовчуванням - + speed: (e.g. 1 m/s or 3 cm/s) швидкість: (напр. 1 м/с або 3 см/с) - + Set default continuity Встановити послідовність за замовчуванням - + continuous ? послідовність ? - + Set default acceleration Встановити прискорення за замовчуванням - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) прискорення: (напр. 1 м/с^2 або 3 см/с^2) - + Select the Trajectory which you want to dress up. Оберіть траєкторію, за якою буде відбуватися побудова зовнішнього покрову. - + Modify Змінити - + No robot files installed Файли робота не встановлено - + Please visit %1 and copy the files to %2 Будь ласка, відвідайте %1 та скопіюйте файли до %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Сховати / Показати + + + + Edges: 0 + Ребра: 0 + + + + Cluster: 0 + Кластер: 0 + + + + Sizing Value: + Значення калібрування: + + + + Use orientation of edge + Використовувати орієнтацію ребра + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 мс - - - - 50 ms - 50 мс - - - - 100 ms - 100 мс - - - - 500 ms - 500 мс - - - - 1 s - 1 с - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Поз: (200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - Тип - - - - Name - Назва - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Траєкторія - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Параметри Одягання - - - - TaskEdge2TracParameter - - - Hide / Show - Сховати / Показати - - - - Edges: 0 - Ребра: 0 - - - - Cluster: 0 - Кластер: 0 - - - - Sizing Value: - Значення калібрування: - - - - Use orientation of edge - Використовувати орієнтацію ребра - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 мс + + + + 50 ms + 50 мс + + + + 100 ms + 100 мс + + + + 500 ms + 500 мс + + + + 1 s + 1 с + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Поз: (200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + Тип + + + + Name + Назва + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Траєкторія + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Параметри Одягання + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_val-ES.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_val-ES.ts index bc054103be..2f9b800124 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_val-ES.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_val-ES.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot Robot - + Add tool Afig una eina - + Add a tool shape to the robot Afig una forma d'eina al robot @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot Robot - + Place robot... Situa el robot... - + Place a robot (experimental!) Emplaça un robot (experimental!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot Robot - + Edge to Trajectory... Vora per a trajectòria... - + Generate a Trajectory from a set of edges Genera una trajectòria a partir d'un conjunt de vores @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot Robot - + Kuka full subroutine... Subrutina compacta de Kuka... - + Export the trajectory as a full KRL subroutine. Exporta la trajectòria com a subrutina completa KRL. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot Robot - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. Insereix un Kuka IR125 en el document. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot Robot - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. Insereix un Kuka IR125 en el document. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot Robot - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. Insereix un Kuka IR210 en el document. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot Robot - + Insert in trajectory Insereix en la trajectòria - + Insert robot Tool location into trajectory Insereix la posició de l'eina robot en la trajectòria @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot Robot - + Insert in trajectory Insereix en la trajectòria - + Insert preselection position into trajectory (W) Insereix la posició de la preselecció en la trajectòria (W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot Robot - - + + Move to home Desplaça-ho a l'inici @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot Robot - + Set default orientation Estableix l'orientació per defecte - + Set the default orientation for subsequent commands for waypoint creation Estableix l'orientació per defecte per a ordres posteriors per a la creació de fites @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot Robot - + Set default values Estableix els valors per defecte - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation Estableix els valors per defecte de velocitat, acceleració i continuïtat per a ordres posteriors de creació de fites @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot Robot - + Simulate a trajectory Simula una trajectòria - + Run a simulation on a trajectory Executa una simulació en una trajectòria @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot Robot - + Trajectory compound... Trajectòria composta... - + Group and connect some trajectories to one Agrupa i connecta algunes trajectòries en una sola @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot Robot - + Dress-up trajectory... Modificació de trajectòria... - + Create a dress-up object which overrides some aspects of a trajectory Crea un objecte modificat que sobreescriu alguns aspectes d'una trajectòria @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection Selecció incorrecta @@ -376,115 +376,115 @@ Seleccioneu un robot per a establir-ne la posició inicial - + Select one Robot Seleccioneu un robot - - - - - + + + + + Select one Robot and one Trajectory object. Seleccioneu un robot i una trajectòria - + Trajectory not valid La trajectòria no és vàlida. - + You need at least two waypoints in a trajectory to simulate. Necessiteu almenys dos punts de camí en una trajectòria per a la simulació. - - + + KRL file Fitxer KRL - - + + All Files Tots els fitxers - - + + Export program Programa d'exportació - + Select one robot and one shape or VRML object. Seleccioneu un robot i una forma o un objecte VRML. - - + + Select one Trajectory object. Seleccioneu un objecte trajectòria - + No preselection No hi ha cap preselecció. - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. Heu de passar per damunt d'una geometria (preselecció) amb el ratolí per a utilitzar aquesta ordre. Consulteu la documentació per a més detalls. - + Set default speed Estableix la velocitat per defecte - + speed: (e.g. 1 m/s or 3 cm/s) velocitat: (p. ex. 1 m/s o 3 cm/s) - + Set default continuity Estableix la continuïtat per defecte - + continuous ? continu? - + Set default acceleration Estableix l'acceleració per defecte - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) acceleració: (p. ex. 1 m/s^2 o 3 cm/s^2) - + Select the Trajectory which you want to dress up. Seleccioneu la trajectòria que voleu modificar - + Modify Modifica - + No robot files installed No hi ha cap fitxer de robot instal·lat. - + Please visit %1 and copy the files to %2 Visiteu %1 i copieu els fitxers a %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + Amaga / Mostra + + + + Edges: 0 + Vores: 0 + + + + Cluster: 0 + Clúster: 0 + + + + Sizing Value: + Valor de la redimensionament: + + + + Use orientation of edge + Utilitza l'orientació de la vora + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100 ms - - - - 500 ms - 500 ms - - - - 1 s - 1 s - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - Pos: (200.23, 300.23, 400.23, 234, 343, 343) - - - - Type - Tipus - - - - Name - Nom - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - Amaga / Mostra - - - - Edges: 0 - Vores: 0 - - - - Cluster: 0 - Clúster: 0 - - - - Sizing Value: - Valor de la redimensionament: - - - - Use orientation of edge - Utilitza l'orientació de la vora - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100 ms + + + + 500 ms + 500 ms + + + + 1 s + 1 s + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + Pos: (200.23, 300.23, 400.23, 234, 343, 343) + + + + Type + Tipus + + + + Name + Nom + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_zh-CN.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_zh-CN.ts index 044549cf22..79ba90d2d1 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_zh-CN.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_zh-CN.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot 机器人 - + Add tool 新增工具 - + Add a tool shape to the robot 将工具形状添加到机器人 @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot 机器人 - + Place robot... 放置机器人... - + Place a robot (experimental!) 放置机器人(实验!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot 机器人 - + Edge to Trajectory... 边缘到轨迹... - + Generate a Trajectory from a set of edges 由一组边生成轨迹 @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot 机器人 - + Kuka full subroutine... 库卡完整子例程... - + Export the trajectory as a full KRL subroutine. 导出轨迹为完整 KRL 子例程. @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot 机器人 - + Kuka IR125 库卡 IR125 - + Insert a Kuka IR125 into the document. 将库卡 IR125 导入文档. @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot 机器人 - + Kuka IR16 库卡 IR16 - + Insert a Kuka IR16 into the document. 将库卡 IR16 导入文档. @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot 机器人 - + Kuka IR210 库卡 IR210 - + Insert a Kuka IR210 into the document. 将库卡 IR210 导入文档. @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot 机器人 - + Insert in trajectory 在轨迹中插入 - + Insert robot Tool location into trajectory 导入机器人工具位置到轨迹 @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot 机器人 - + Insert in trajectory 在轨迹中插入 - + Insert preselection position into trajectory (W) 预选位置插入轨迹(W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot 机器人 - - + + Move to home 移动到初始 @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot 机器人 - + Set default orientation 设置默认方向 - + Set the default orientation for subsequent commands for waypoint creation 设置随后命令的默认方向,以创建航点 @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot 机器人 - + Set default values 设置默认值 - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation 设置为随后创建航点命令的速度、加速和连续性的默认值 @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot 机器人 - + Simulate a trajectory 模拟轨迹 - + Run a simulation on a trajectory 在轨迹上模拟 @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot 机器人 - + Trajectory compound... 复合轨迹... - + Group and connect some trajectories to one 将轨迹组合并连接成一个 @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot 机器人 - + Dress-up trajectory... 修饰轨迹... - + Create a dress-up object which overrides some aspects of a trajectory 创建覆盖轨迹部分设定的修饰对象 @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection 选择错误 @@ -376,115 +376,115 @@ 选择一个机器人来设置初始位置 - + Select one Robot 选择一个机器人 - - - - - + + + + + Select one Robot and one Trajectory object. 选择一个机器人和一个轨迹对象. - + Trajectory not valid 无效轨迹 - + You need at least two waypoints in a trajectory to simulate. 需要至少两个航点来模拟。 - - + + KRL file KRL 文件 - - + + All Files 所有文件 - - + + Export program 导出程序 - + Select one robot and one shape or VRML object. 选择一个机器人和一个形状或 VRML 对象. - - + + Select one Trajectory object. 选择一个轨迹对象. - + No preselection 无预选 - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. 您必须悬停鼠标于(预选)几何体以使用该命令.详情请参考文档. - + Set default speed 设置默认速度 - + speed: (e.g. 1 m/s or 3 cm/s) 速度: (如 1 m/s 或 3 cm/s) - + Set default continuity 设置默认连续性 - + continuous ? 连续? - + Set default acceleration 设置默认加速度 - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) 加速度: (如 1 m/s^2 或 3 cm/s^2) - + Select the Trajectory which you want to dress up. 选择您要遵循的轨迹. - + Modify 修改 - + No robot files installed 未安装机器人文件 - + Please visit %1 and copy the files to %2 请访问 %1 并复制文件到 %2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter 边转轨迹任务参数 + + + Hide / Show + 隐藏/显示 + + + + Edges: 0 + 边:0 + + + + Cluster: 0 + 集群:0 + + + + Sizing Value: + 调整大小的值: + + + + Use orientation of edge + 使用边缘的方向 + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl 任务机器人控制 - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - 机器人信息任务 - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10 ms - - - - 50 ms - 50 ms - - - - 100 ms - 100毫秒 - - - - 500 ms - 500毫秒 - - - - 1 s - 1秒 - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - 位置:(200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - 类型 - - - - Name - 名称 - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - 轨迹 - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - 修饰参数 - - - - TaskEdge2TracParameter - - - Hide / Show - 隐藏/显示 - - - - Edges: 0 - 边:0 - - - - Cluster: 0 - 集群:0 - - - - Sizing Value: - 调整大小的值: - - - - Use orientation of edge - 使用边缘的方向 - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + 机器人信息任务 + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10 ms + + + + 50 ms + 50 ms + + + + 100 ms + 100毫秒 + + + + 500 ms + 500毫秒 + + + + 1 s + 1秒 + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + 位置:(200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + 类型 + + + + Name + 名称 + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + 轨迹 + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + 修饰参数 + Speed & Acceleration: diff --git a/src/Mod/Robot/Gui/Resources/translations/Robot_zh-TW.ts b/src/Mod/Robot/Gui/Resources/translations/Robot_zh-TW.ts index e4491ff1af..8226bca49c 100644 --- a/src/Mod/Robot/Gui/Resources/translations/Robot_zh-TW.ts +++ b/src/Mod/Robot/Gui/Resources/translations/Robot_zh-TW.ts @@ -4,17 +4,17 @@ CmdRobotAddToolShape - + Robot 機器人 - + Add tool 新增工具 - + Add a tool shape to the robot 於機器人上增加工具造型 @@ -22,17 +22,17 @@ CmdRobotConstraintAxle - + Robot 機器人 - + Place robot... 放置機器人... - + Place a robot (experimental!) 放置一個機器人(測試!) @@ -58,17 +58,17 @@ CmdRobotEdge2Trac - + Robot 機器人 - + Edge to Trajectory... 邊至軌跡... - + Generate a Trajectory from a set of edges 由一組邊產生軌跡 @@ -94,17 +94,17 @@ CmdRobotExportKukaFull - + Robot 機器人 - + Kuka full subroutine... Kuka完整子程式... - + Export the trajectory as a full KRL subroutine. 以完整KRL子程式匯出軌跡 @@ -112,17 +112,17 @@ CmdRobotInsertKukaIR125 - + Robot 機器人 - + Kuka IR125 Kuka IR125 - + Insert a Kuka IR125 into the document. 於此文件中插入Kula IR125 @@ -130,17 +130,17 @@ CmdRobotInsertKukaIR16 - + Robot 機器人 - + Kuka IR16 Kuka IR16 - + Insert a Kuka IR16 into the document. 於此文件中插入Kula IR16 @@ -148,17 +148,17 @@ CmdRobotInsertKukaIR210 - + Robot 機器人 - + Kuka IR210 Kuka IR210 - + Insert a Kuka IR210 into the document. 於此文件中插入Kula IR210 @@ -184,17 +184,17 @@ CmdRobotInsertWaypoint - + Robot 機器人 - + Insert in trajectory 於軌跡中插入 - + Insert robot Tool location into trajectory 插入機器人工具位置至軌跡中 @@ -202,17 +202,17 @@ CmdRobotInsertWaypointPreselect - + Robot 機器人 - + Insert in trajectory 於軌跡中插入 - + Insert preselection position into trajectory (W) 插入預選位置至軌跡(W) @@ -220,13 +220,13 @@ CmdRobotRestoreHomePos - + Robot 機器人 - - + + Move to home 移動至原點 @@ -234,17 +234,17 @@ CmdRobotSetDefaultOrientation - + Robot 機器人 - + Set default orientation 設定預設方向 - + Set the default orientation for subsequent commands for waypoint creation 設定預設的方向為後續建立航點的命令 @@ -252,17 +252,17 @@ CmdRobotSetDefaultValues - + Robot 機器人 - + Set default values 設定預設值 - + Set the default values for speed, acceleration and continuity for subsequent commands of waypoint creation 設定預設值給速率, 加速度和連續性為了後續命令建立新航點 @@ -284,17 +284,17 @@ CmdRobotSimulate - + Robot 機器人 - + Simulate a trajectory 模擬軌跡 - + Run a simulation on a trajectory 於軌跡上進行模擬 @@ -302,17 +302,17 @@ CmdRobotTrajectoryCompound - + Robot 機器人 - + Trajectory compound... 軌跡物件... - + Group and connect some trajectories to one 連結並群組數個軌跡成一個 @@ -320,17 +320,17 @@ CmdRobotTrajectoryDressUp - + Robot 機器人 - + Dress-up trajectory... 修改軌跡 - + Create a dress-up object which overrides some aspects of a trajectory 建立覆蓋軌跡部分設定的修改物件 @@ -357,16 +357,16 @@ QObject - - - - - - - - - - + + + + + + + + + + Wrong selection 錯誤的選取 @@ -376,115 +376,115 @@ 選擇要設置起始位置之機器人 - + Select one Robot 選取一機器人 - - - - - + + + + + Select one Robot and one Trajectory object. 選取一個機器人和一軌跡物件 - + Trajectory not valid 無效軌跡 - + You need at least two waypoints in a trajectory to simulate. 軌跡中至少需要兩個航路點才能進行模擬. - - + + KRL file KRL 檔 - - + + All Files 所有檔案 - - + + Export program 匯出程式 - + Select one robot and one shape or VRML object. 選取一個機器人和一造型或VRML物件 - - + + Select one Trajectory object. 選取一軌跡物件 - + No preselection 無預選 - + You have to hover above a geometry (Preselection) with the mouse to use this command. See documentation for details. 您需要將滑鼠停留於幾何(預選)上方來使用此功能,相系說明請查詢文件 - + Set default speed 設定預設的速率 - + speed: (e.g. 1 m/s or 3 cm/s) 速度:(e.g. 1 m/s or 3 cm/s) - + Set default continuity 設定預設的連續性 - + continuous ? 連續? - + Set default acceleration 設定預設加速度 - + acceleration: (e.g. 1 m/s^2 or 3 cm/s^2) 加速度:(e.g. 1 m/s^2 or 3 cm/s^2) - + Select the Trajectory which you want to dress up. 選取您想要修改的軌跡 - + Modify 修改 - + No robot files installed 無安裝之機器人檔案 - + Please visit %1 and copy the files to %2 請參照%1並複製至檔案%2 @@ -554,6 +554,31 @@ TaskEdge2TracParameter TaskEdge2TracParameter + + + Hide / Show + 隱藏/顯示 + + + + Edges: 0 + 邊: 0 + + + + Cluster: 0 + 群組:0 + + + + Sizing Value: + 尺寸值: + + + + Use orientation of edge + 使用邊之方向 + RobotGui::TaskRobot6Axis @@ -606,145 +631,10 @@ RobotGui::TaskRobotControl - + TaskRobotControl TaskRobotControl - - - RobotGui::TaskRobotMessages - - - TaskRobotMessages - TaskRobotMessages - - - - RobotGui::TaskTrajectory - - - |< - |< - - - - < - < - - - - |> - |> - - - - > - > - - - - >| - >| - - - - 10 ms - 10毫秒 - - - - 50 ms - 50毫秒 - - - - 100 ms - 100毫秒 - - - - 500 ms - 500毫秒 - - - - 1 s - 1秒 - - - - Pos: (200.23, 300.23, 400.23, 234, 343 ,343) - 位置:(200.23, 300.23, 400.23, 234, 343 ,343) - - - - Type - 類型 - - - - Name - 名稱 - - - - C - C - - - - V - V - - - - A - A - - - - Trajectory - Trajectory - - - - RobotGui::TaskTrajectoryDressUpParameter - - - Dress Up Parameter - Dress Up Parameter - - - - TaskEdge2TracParameter - - - Hide / Show - 隱藏/顯示 - - - - Edges: 0 - 邊: 0 - - - - Cluster: 0 - 群組:0 - - - - Sizing Value: - 尺寸值: - - - - Use orientation of edge - 使用邊之方向 - - - - TaskRobotControl X+ @@ -857,7 +747,12 @@ - TaskRobotMessages + RobotGui::TaskRobotMessages + + + TaskRobotMessages + TaskRobotMessages + clear @@ -865,7 +760,100 @@ - TaskTrajectoryDressUpParameter + RobotGui::TaskTrajectory + + + |< + |< + + + + < + < + + + + |> + |> + + + + > + > + + + + >| + >| + + + + 10 ms + 10毫秒 + + + + 50 ms + 50毫秒 + + + + 100 ms + 100毫秒 + + + + 500 ms + 500毫秒 + + + + 1 s + 1秒 + + + + Pos: (200.23, 300.23, 400.23, 234, 343 ,343) + 位置:(200.23, 300.23, 400.23, 234, 343 ,343) + + + + Type + 類型 + + + + Name + 名稱 + + + + C + C + + + + V + V + + + + A + A + + + + Trajectory + Trajectory + + + + RobotGui::TaskTrajectoryDressUpParameter + + + Dress Up Parameter + Dress Up Parameter + Speed & Acceleration: diff --git a/src/Mod/Show/mTempoVis.py b/src/Mod/Show/mTempoVis.py index f611b15ec1..f33da1f3f6 100644 --- a/src/Mod/Show/mTempoVis.py +++ b/src/Mod/Show/mTempoVis.py @@ -574,8 +574,8 @@ class TempoVis(object): return [obj for obj in doc_obj_or_list if is3DObject(obj)] - def __getstate__(self): + def dumps(self): return None - def __setstate__(self, state): + def loads(self, state): self._init_attrs() diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 32918af027..87fad0f0ff 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -660,6 +660,84 @@ int SketchObject::moveDatumsToEnd() return 0; } +void SketchObject::reverseAngleConstraintToSupplementary(Constraint* constr, int constNum) +{ + std::swap(constr->First, constr->Second); + std::swap(constr->FirstPos, constr->SecondPos); + constr->FirstPos = (constr->FirstPos == Sketcher::PointPos::start) ? Sketcher::PointPos::end : Sketcher::PointPos::start; + + // Edit the expression if any, else modify constraint value directly + if (constraintHasExpression(constNum)) { + std::string expression = getConstraintExpression(constNum); + setConstraintExpression(constNum, reverseAngleConstraintExpression(expression)); + } + else { + double actAngle = constr->getValue(); + constr->setValue(M_PI - actAngle); + } +} + +bool SketchObject::constraintHasExpression(int constNum) const +{ + App::ObjectIdentifier path = Constraints.createPath(constNum); + auto info = getExpression(path); + if (info.expression) { + return true; + } + return false; +} + +std::string SketchObject::getConstraintExpression(int constNum) const +{ + App::ObjectIdentifier path = Constraints.createPath(constNum); + auto info = getExpression(path); + if (info.expression) { + std::string expression = info.expression->toString(); + return expression; + } + + return {}; +} + +void SketchObject::setConstraintExpression(int constNum, const std::string& newExpression) +{ + App::ObjectIdentifier path = Constraints.createPath(constNum); + auto info = getExpression(path); + if (info.expression) { + try { + std::shared_ptr expr(App::Expression::parse(this, newExpression)); + setExpression(path, expr); + } + catch (const Base::Exception&) { + Base::Console().Error("Failed to set constraint expression."); + } + } +} + +std::string SketchObject::reverseAngleConstraintExpression(std::string expression) +{ + // Check if expression contains units (°, deg, rad) + if (expression.find("°") != std::string::npos + || expression.find("deg") != std::string::npos + || expression.find("rad") != std::string::npos) { + if (expression.substr(0, 9) == "180 ° - ") { + expression = expression.substr(9, expression.size() - 9); + } + else { + expression = "180 ° - (" + expression + ")"; + } + } + else { + if (expression.substr(0, 6) == "180 - ") { + expression = expression.substr(6, expression.size() - 6); + } + else { + expression = "180 - (" + expression + ")"; + } + } + return expression; +} + int SketchObject::setVirtualSpace(int ConstrId, bool isinvirtualspace) { // no need to check input data validity as this is an sketchobject managed operation. @@ -9099,16 +9177,6 @@ int SketchObject::changeConstraintsLocking(bool bLock) return cntSuccess; } -bool SketchObject::constraintHasExpression(int constrid) const -{ - App::ObjectIdentifier spath = this->Constraints.createPath(constrid); - - App::PropertyExpressionEngine::ExpressionInfo expr_info = this->getExpression(spath); - - return (expr_info.expression != nullptr); -} - - /*! * \brief SketchObject::port_reversedExternalArcs finds constraints that link to endpoints of * external-geometry arcs, and swaps the endpoints in the constraints. This is needed after CCW diff --git a/src/Mod/Sketcher/App/SketchObject.h b/src/Mod/Sketcher/App/SketchObject.h index 4274a27c57..f153ce3646 100644 --- a/src/Mod/Sketcher/App/SketchObject.h +++ b/src/Mod/Sketcher/App/SketchObject.h @@ -269,6 +269,20 @@ public: /// Move Dimensional constraints at the end of the properties array int moveDatumsToEnd(); + /// Change an angle constraint to its supplementary angle. + void reverseAngleConstraintToSupplementary(Constraint* constr, int constNum); + /// Modify an angle constraint expression string to its supplementary angle + static std::string reverseAngleConstraintExpression(std::string expression); + + // Check if a constraint has an expression associated. + bool constraintHasExpression(int constNum) const; + // Get a constraint associated expression + std::string getConstraintExpression(int constNum) const; + // Set a constraint associated expression + void setConstraintExpression(int constNum, const std::string& newExpression); + void setExpression(const App::ObjectIdentifier& path, + std::shared_ptr expr) override; + /// set the driving status of this constraint and solve int setVirtualSpace(int ConstrId, bool isinvirtualspace); /// set the driving status of a group of constraints at once @@ -461,8 +475,6 @@ public: bool isPointOnCurve(int geoIdCurve, double px, double py); double calculateConstraintError(int ConstrId); int changeConstraintsLocking(bool bLock); - /// returns whether a given constraint has an associated expression or not - bool constraintHasExpression(int constrid) const; /// porting functions int port_reversedExternalArcs(bool justAnalyze); @@ -725,9 +737,6 @@ protected: void buildShape(); - void setExpression(const App::ObjectIdentifier& path, - std::shared_ptr expr) override; - std::string validateExpression(const App::ObjectIdentifier& path, std::shared_ptr expr); diff --git a/src/Mod/Sketcher/App/planegcs/Constraints.cpp b/src/Mod/Sketcher/App/planegcs/Constraints.cpp index 46bbbef181..ce081f7fdf 100644 --- a/src/Mod/Sketcher/App/planegcs/Constraints.cpp +++ b/src/Mod/Sketcher/App/planegcs/Constraints.cpp @@ -20,6 +20,10 @@ * * ***************************************************************************/ +#ifdef _MSC_VER +#pragma warning(disable : 4251) +#endif + #include #define DEBUG_DERIVS 0 #if DEBUG_DERIVS diff --git a/src/Mod/Sketcher/App/planegcs/SubSystem.cpp b/src/Mod/Sketcher/App/planegcs/SubSystem.cpp index 9df1d84937..494d6a8fd4 100644 --- a/src/Mod/Sketcher/App/planegcs/SubSystem.cpp +++ b/src/Mod/Sketcher/App/planegcs/SubSystem.cpp @@ -20,6 +20,10 @@ * * ***************************************************************************/ +#ifdef _MSC_VER +#pragma warning(disable : 4251) +#endif + #include #include diff --git a/src/Mod/Sketcher/Gui/CommandConstraints.cpp b/src/Mod/Sketcher/Gui/CommandConstraints.cpp index b9ef7c96d4..658e29a5a6 100644 --- a/src/Mod/Sketcher/Gui/CommandConstraints.cpp +++ b/src/Mod/Sketcher/Gui/CommandConstraints.cpp @@ -1794,10 +1794,21 @@ protected: void makeCts_1Circle(bool& selAllowed, Base::Vector2d onSketchPos) { - //Radius/diameter. Mode changes in createRadiusDiameterConstrain. - restartCommand(QT_TRANSLATE_NOOP("Command", "Add Radius constraint")); - createRadiusDiameterConstrain(selCircleArc[0].GeoId, onSketchPos); - selAllowed = true; + const Part::Geometry* geom = Obj->getGeometry(selCircleArc[0].GeoId); + Q_UNUSED(geom) + + if (availableConstraint == AvailableConstraint::FIRST + || availableConstraint == AvailableConstraint::SECOND) { + //Radius/diameter. Mode changes in createRadiusDiameterConstrain. + restartCommand(QT_TRANSLATE_NOOP("Command", "Add Radius constraint")); + createRadiusDiameterConstrain(selCircleArc[0].GeoId, onSketchPos); + selAllowed = true; + } + if (availableConstraint == AvailableConstraint::THIRD) { + restartCommand(QT_TRANSLATE_NOOP("Command", "Add arc angle constraint")); + createArcAngleConstrain(selCircleArc[0].GeoId, onSketchPos); + availableConstraint = AvailableConstraint::RESET; + } } void makeCts_2Circle(bool& selAllowed, Base::Vector2d onSketchPos) @@ -2037,9 +2048,10 @@ protected: radius = circle->getRadius(); } - if (isBsplinePole(geom)) + if (isBsplinePole(geom)) { Gui::cmdAppObjectArgs(Obj, "addConstraint(Sketcher.Constraint('Weight',%d,%f)) ", GeoId, radius); + } else { ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher/dimensioning"); bool dimensioningDiameter = hGrp->GetBool("DimensioningDiameter", true); @@ -2048,8 +2060,10 @@ protected: bool firstCstr = true; if (availableConstraint != AvailableConstraint::FIRST) { firstCstr = false; - //This way if key is pressed again it goes back to FIRST - availableConstraint = AvailableConstraint::RESET; + if (!isArcOfCircle(*geom)) { + //This way if key is pressed again it goes back to FIRST + availableConstraint = AvailableConstraint::RESET; + } } if ((firstCstr && dimensioningRadius && !dimensioningDiameter) || @@ -2213,6 +2227,26 @@ protected: } } + void createArcAngleConstrain(int GeoId, Base::Vector2d onSketchPos) { + const Part::Geometry* geom = Obj->getGeometry(GeoId); + if (isArcOfCircle(*geom)) { + + const auto* arc = static_cast(geom); + double angle = arc->getAngle(/*EmulateCCWXY=*/true); + + Gui::cmdAppObjectArgs(Obj, "addConstraint(Sketcher.Constraint('Angle',%d,%f))", + GeoId, angle); + + const std::vector& ConStr = Obj->Constraints.getValues(); + if (isPointOrSegmentFixed(Obj, GeoId) || constraintCreationMode == Reference) { + // it is a constraint on a external line, make it non-driving + Gui::cmdAppObjectArgs(Obj, "setDriving(%i,%s)", ConStr.size() - 1, "False"); + } + numberOfConstraintsCreated++; + moveConstraint(ConStr.size() - 1, onSketchPos); + } + } + void createVerticalConstrain(int GeoId1, Sketcher::PointPos PosId1, int GeoId2, Sketcher::PointPos PosId2) { if (selLine.size() == 1) { Gui::cmdAppObjectArgs(sketchgui->getObject(), "addConstraint(Sketcher.Constraint('Vertical',%d)) ", GeoId1); @@ -8772,7 +8806,7 @@ void CmdSketcherConstrainAngle::activated(int iMsg) return; } } - else if (isEdge(GeoId1, PosId1)) {// line angle + else if (isEdge(GeoId1, PosId1)) {// line angle or arc angle if (GeoId1 < 0 && GeoId1 >= Sketcher::GeoEnum::VAxis) { Gui::TranslatedUserWarning( Obj, @@ -8812,9 +8846,7 @@ void CmdSketcherConstrainAngle::activated(int iMsg) } else if (isArcOfCircle(*geom)) { auto arc = static_cast(geom); - double startangle, endangle; - arc->getRange(startangle, endangle, /*EmulateCCWXY=*/true); - double angle = endangle - startangle; + double angle = arc->getAngle(/*EmulateCCWXY=*/true); openCommand(QT_TRANSLATE_NOOP("Command", "Add angle constraint")); Gui::cmdAppObjectArgs(selection[0].getObject(), diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts index 6952356310..4b19439706 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle - + Constrain an arc or a circle - + Constrain radius - + Constrain diameter - + Constrain auto radius/diameter @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle - + Fix the angle of a line or the angle between two lines @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block - + Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter - + Fix the diameter of a circle or an arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance - + Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance - + Fix the horizontal distance between two points or line ends @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance - + Fix the vertical distance between two points or line ends @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal - + Create an equality constraint between two lines or between circles and arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally - + Create a horizontal constraint on the selected item @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock - + Create both a horizontal and a vertical distance constraint on the selected vertex @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel - + Create a parallel constraint between two lines @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular - + Create a perpendicular constraint between two lines @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object - + Fix a point onto an object @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. @@ -598,12 +585,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical - + Create a symmetry constraint between two points with respect to a line or a third point @@ -612,12 +599,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent - + Create a tangent constraint between two entities @@ -625,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically - + Create a vertical constraint on the selected item @@ -1484,12 +1471,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint - + Activates or deactivates the selected constraints @@ -1510,12 +1497,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode @@ -1587,370 +1574,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint - - - + + + Add horizontal alignment - - + + Add vertical constraint - + Add vertical alignment - + Add 'Lock' constraint - + Add relative 'Lock' constraint - + Add fixed constraint - + Add 'Block' constraint - + Add block constraint - - - + + + Add coincident constraint - - + + Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint - - + + Add point to point distance constraint - - - + + + Add point to line Distance constraint - - + + Add circle to circle distance constraint - + Add circle to line distance constraint - - - - - - + + + + + + Add length constraint - - + + + Dimension - + Add lock constraint - + Add 'Distance to origin' constraint - - - + + + Add Distance constraint - - - + + + Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints - - + + Add Symmetry constraint - - + + Add Symmetry constraints - - + + Add Distance constraints - + Add Horizontal constraint - + Add Vertical constraint - + Add Block constraint - + Add Angle constraint - - - - + + + + Add Equality constraint - + Add Equality constraints - + Add Radius constraint - + + Add arc angle constraint + + + + Add concentric and length constraint - + Add DistanceX constraint - + Add DistanceY constraint - + Add point to circle Distance constraint - - + + Add point on object constraint - - + + Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint - + Add fixed y-coordinate constraint - - + + Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint - + Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point - - - - + + + + Add radius constraint - - - - + + + + Add diameter constraint - - - - + + + + Add radiam constraint - - - - - - + + + + + + Add angle constraint - - + + Add equality constraint - - - - - + + + + + Add symmetric constraint - + Add Snell's law constraint - + Toggle constraint to driving/reference - + Activate/Deactivate constraint @@ -2026,7 +2019,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc @@ -2277,59 +2270,59 @@ invalid constraints, degenerated geometry, etc. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. - - + + BSpline Geometry Index (GeoID) is out of bounds. - + You are requesting no change in knot multiplicity. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. - + The multiplicity cannot be decreased beyond zero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. - + Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. @@ -2397,134 +2390,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2572,329 +2565,329 @@ invalid constraints, degenerated geometry, etc. - + Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. - - + + Select an edge from the sketch. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint - - - - + + + + The selected edge is not a line segment. - - - - - - + + + + + + Double constraint - - - - - + + + + + The selected edge already has a horizontal constraint! - - - + + + The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! - + The selected item(s) can't accept a horizontal constraint! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! - + The selected item(s) can't accept a vertical constraint! - - - + + + Select vertices from the sketch. - + Select one vertex from the sketch other than the origin. - + Select only vertices from the sketch. The last selected vertex may be the origin. - + Wrong solver status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. - + Select only edges from the sketch. - + Number of selected objects is not 3 - + Error - + Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. - + Select two or more points from the sketch. - + Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. - + Cannot add a length constraint on an axis! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. - - - - + + + + Select exactly one line or up to two points from the sketch. - + Cannot add a horizontal length constraint on an axis! - + Cannot add a fixed x-coordinate constraint on the origin point! - - + + This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! - + Cannot add a fixed y-coordinate constraint on the origin point! - + Select two or more lines from the sketch. - - + + Select at least two lines from the sketch. - + Select a valid line. - - + + The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2902,42 +2895,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c - + Select some geometry from the sketch. perpendicular constraint - - + + Cannot add a perpendicularity constraint at an unconnected point! - - - + + + Perpendicular to B-spline edge currently unsupported. - - + + One of the selected edges should be a line. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2945,182 +2938,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c - + Select some geometry from the sketch. tangent constraint - - - + + + Cannot add a tangency constraint at an unconnected point! - - + + Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! - - + + With 3 objects, there must be 2 curves and 1 point. - - - + + + Tangency to B-spline edge currently unsupported. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. - - + + Select one or two lines from the sketch. Or select two edges and a point. - - + + Parallel lines - - + + An angle constraint cannot be set for two parallel lines. - + Cannot add an angle constraint on an axis! - + Select two edges from the sketch. - + Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. - - - - + + + + Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. - - + + Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw - + Selected objects are not just geometry from one sketch. - + Cannot create constraint with external geometry only. - + Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. @@ -3619,12 +3612,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c - + Refractive index ratio - + Ratio n2/n1: @@ -5188,119 +5181,119 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch - + A dialog is already open in the task panel - + Do you want to close this dialog? - + Invalid sketch - + Do you want to open the sketch validation tool? - + The sketch is invalid and cannot be edited. - + Please remove the following constraint: - + Please remove at least one of the following constraints: - + Please remove the following redundant constraint: - + Please remove the following redundant constraints: - + The following constraint is partially redundant: - + The following constraints are partially redundant: - + Please remove the following malformed constraint: - + Please remove the following malformed constraints: - + Empty sketch - + Over-constrained: - + Malformed constraints: - + Redundant constraints: - + Partially redundant: - + Solver failed to converge - + Under constrained: - + %n DoF(s) - + Fully constrained @@ -5398,8 +5391,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc @@ -5407,7 +5400,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc @@ -5415,20 +5409,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - - - Sketcher_Copy @@ -6037,7 +6023,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more @@ -6258,7 +6244,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6268,7 +6254,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6293,7 +6279,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6316,13 +6302,13 @@ The grid spacing change if it becomes smaller than this number of pixel. - - - - - - - + + + + + + + @@ -6333,7 +6319,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc @@ -6447,7 +6433,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add rounded rectangle @@ -6628,14 +6614,14 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6656,14 +6642,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension - + Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + + + + + Fix the radius of a circle or an arc + + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts index 44e0683168..b4768a1fed 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_be.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Абмежаванне дугі альбо акружнасці - + Constrain an arc or a circle Абмежаванне дугі альбо акружнасці - + Constrain radius Абмежаванне радыуса - + Constrain diameter Абмежаванне дыяметра - + Constrain auto radius/diameter Аўтаматычнае абмежаванне радыуса/дыяметра @@ -163,7 +163,7 @@ Creates a clone of the geometry taking as reference the last selected point - Стварае дублікат геаметрыі, у якасці эталону ўжывае апошнюю абраную кропку + Стварае клон геаметрыі, у якасці эталону ўжывае апошнюю абраную кропку @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Абмежаванне вугла - + Fix the angle of a line or the angle between two lines Фіксаваць вугал лініі ці вугал паміж дзвюма лініямі @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Абмежаванне руху - + Block the selected edge from moving Абмежаваць рух абранага рабра @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Абмежаванне накладання кропак - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Стварыць абмежаванне супадзення паміж кропкамі, ці канцэнтрычнае абмежаванне паміж акружнасцямі, дугамі і эліпсамі @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Абмежаванне дыяметра - + Fix the diameter of a circle or an arc Задаць дыяметр акружнасці ці дугі @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Абмежаванне адлегласці - + Fix a length of a line or the distance between a line and a vertex or between two circles Задаць даўжыню лініі, альбо адлегласць паміж лініяй і вяршыняй, альбо паміж дзвюма акружнасцямі @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Абмежаванне гарызантальнай адлегласці - + Fix the horizontal distance between two points or line ends Задаць адлегласць па гарызанталі паміж дзвюма кропкамі ці канцамі лініі @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Абмежаванне вертыкальнай адлегласці - + Fix the vertical distance between two points or line ends Задаць вертыкальную адлегласць паміж дзвюма кропкамі ці канцамі лініі @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Абмежаванне роўнасцю - + Create an equality constraint between two lines or between circles and arcs Стварыць абмежаванне роўнасці паміж дзвюма лініямі ці паміж акружнасцямі і дугамі @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Абмежаванне гарызантальнасці - + Create a horizontal constraint on the selected item Стварыць абмежаванне гарызантальнасці для абранага элемента @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Абмежаванне блакавання - + Create both a horizontal and a vertical distance constraint on the selected vertex Стварыць абмежаванне адлегласці па гарызанталі і вертыкалі для абранай вяршыні @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Абмежаванне паралельнасці - + Create a parallel constraint between two lines Стварыць паралельнае абмежаванне паміж дзвюма лініямі @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Абмежаванне перпендыкулярнасці - + Create a perpendicular constraint between two lines Стварыць перпендыкулярнае абмежаванне паміж дзвюма адрэзкамі @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Абмежаваць кропку на аб'екце - + Fix a point onto an object Прывязаць кропку да аб'екта @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Аўтаматычнае абмежаванне радыуса/дыяметра - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Задаць дыяметр, калі абрана акружнасць, альбо радыус, калі абраны полюс дугі/сплайну - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Абмежаванне радыуса ці вагі - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Задаць радыус акружнасці ці дугі альбо задаць вагу полюса B-сплайна - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Абмежаванне праламлення (закон Снеліуса) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Стварыць абмежаванне па закону праламлення свету (закон Снеліуса) паміж дзвюма канчатковымі кропкамі прамянёў і рабром у якасці мяжы падзелу асяроддзя. @@ -598,12 +585,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Абмежаванне сіметрычнасці - + Create a symmetry constraint between two points with respect to a line or a third point Стварыць абмежаванне сіметрыі паміж дзвюма кропкамі адносна лініі ці трэцяй кропкі @@ -612,12 +599,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Абмежаванне датычнай - + Create a tangent constraint between two entities Стварыць датычнае абмежаванне паміж дзвюма сутнасцямі @@ -625,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Абмежаванне вертыкальнасці - + Create a vertical constraint on the selected item Стварыць абмежаванне вертыкальнасці для абранага элемента @@ -1487,12 +1474,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Задзейнічаць/адключыць абмежаванні - + Activates or deactivates the selected constraints Задзейнічае ці адключае абраныя абмежаванні @@ -1513,12 +1500,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Пераключыць кіруючае/апорнае абмежаванне - + Set the toolbar, or the selected constraints, into driving or reference mode Пераключае панэль інструментаў ці пераўтварае абраныя абмежаванні @@ -1591,370 +1578,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Дадаць гарызантальныя абмежаванні - - - + + + Add horizontal alignment Дадаць гарызантальнае выраўноўванне - - + + Add vertical constraint Дадаць вертыкальныя абмежаванні - + Add vertical alignment Дадаць вертыкальнае выраўноўванне - + Add 'Lock' constraint Дадаць абмежаванне 'Блакаванне' - + Add relative 'Lock' constraint Дадаць адноснае абмежаванне 'Блакаванне' - + Add fixed constraint Дадаць фіксаванае абмежаванне - + Add 'Block' constraint Дадаць абмежаванне 'Абмежаванне' - + Add block constraint Дадаць абмежаванае абмежаванне - - - + + + Add coincident constraint Дадаць абмежаванне супадзення - - + + Add distance from horizontal axis constraint Дадаць абмежаванне адлегласці ад гарызантальнай восі - - + + Add distance from vertical axis constraint Дадаць абмежаванне адлегласці ад вертыкальнай восі - - + + Add point to point distance constraint Дадаць абмежаванне кропкі да адлегласці кропкі - - - + + + Add point to line Distance constraint Дадаць абмежаванне кропкі да адлегласці лініі - - + + Add circle to circle distance constraint Дадаць абмежаванне акружнасці да адлегласці акружнасці - + Add circle to line distance constraint Дадаць абмежаванне акружнасці да адлегласці акружнасці - - - - - - + + + + + + Add length constraint Дадаць абмежаванне даўжыні - - + + + Dimension Вымярэнне - + Add lock constraint Дадаць абмежаванне блакавання - + Add 'Distance to origin' constraint Дадаць абмежаванне 'Адлегласць да пачатку каардынат' - - - + + + Add Distance constraint Дадаць абмежаванне адлегласці - - - + + + Add 'Horizontal' constraints Дадаць абмежаванне 'Гарызантальнасць' - - - + + + Add 'Vertical' constraints Дадаць абмежаванне 'Вертыкальнасць' - - + + Add Symmetry constraint Дадаць абмежаванне сіметрычнасці - - + + Add Symmetry constraints Дадаць абмежаванні сіметрычнасці - - + + Add Distance constraints Дадаць абмежаванні адлегласці - + Add Horizontal constraint Дадаць абмежаванне гарызантальнасці - + Add Vertical constraint Дадаць абмежаванне вертыкальнасці - + Add Block constraint Дадаць абмежаванне блакавання - + Add Angle constraint Дадаць абмежаванне вугла - - - - + + + + Add Equality constraint Дадаць абмежаванне роўнасці - + Add Equality constraints Дадаць абмежаванні роўнасці - + Add Radius constraint Дадаць абмежаванне радыусу - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Дадаць абмежаванне канцентрычнасці і даўжыні - + Add DistanceX constraint Дадаць абмежаванне адлегласці X - + Add DistanceY constraint Дадаць абмежаванне адлегласці Y - + Add point to circle Distance constraint Дадаць абмежаванне кропкі да адлегласці акружнасці - - + + Add point on object constraint Дадаць кропку на абмежаванне аб'екта - - + + Add point to point horizontal distance constraint Дадаць абмежаванне кропкі да адлегласці па гарызанталі - + Add fixed x-coordinate constraint Дадаць фіксаванае абмежаванне x-каардынаты - - + + Add point to point vertical distance constraint Дадаць абмежаванне кропкі да адлегласці па вертыкалі - + Add fixed y-coordinate constraint Дадаць фіксаванае абмежаванне y-каардынаты - - + + Add parallel constraint Дадаць абмежаванні паралельнасці - - - - - - - + + + + + + + Add perpendicular constraint Дадаць абмежаванні перпендыкуляру - + Add perpendicularity constraint Дадаць абмежаванні перпендыкулярнасці - + Swap coincident+tangency with ptp tangency Памяняць супадзенне+дотык з дотыкам кропка-кропка - + Swap PointOnObject+tangency with point to curve tangency Памяняць КропкаНаАб'еце+дотык з кропкай дотыку крывой - - - - - - - + + + + + + + Add tangent constraint Дадаць абмежаванне датычнай - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Дадаць абмежаванне датычнай да кропкі - - - - + + + + Add radius constraint Дадаць абмежаванне радыусу - - - - + + + + Add diameter constraint Дадаць абмежаванне дыяметру - - - - + + + + Add radiam constraint Дадаць абмежаванне радыусу/дыяметру - - - - - - + + + + + + Add angle constraint Дадаць абмежаванне кута - - + + Add equality constraint Дадаць абмежаванне роўнасці - - - - - + + + + + Add symmetric constraint Дадаць абмежаванне сіметрычнасці - + Add Snell's law constraint Дадаць абмежаванне па закону Снеліуса - + Toggle constraint to driving/reference Пераключае абмежаванне паміж кіруючым і апорным - + Activate/Deactivate constraint Задзейнічаць/Адключыць абмежаванне @@ -2030,7 +2023,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Дадаць эскіз дугі @@ -2281,59 +2274,59 @@ invalid constraints, degenerated geometry, etc. Памылка аўтаматычнага абмежавання: Невырашальны эскіз пасля ўжывання абмежаванняў роўнасці. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Немагчыма разлічыць скрыжаванне крывых. Паспрабуйце дадаць абмежаванні супадзенняў паміж вяршынямі крывых, якія вы збіраецеся акругліць. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline ідэнтыфікатар геаметрыі (GeoID) знаходзіцца за межамі дапушчальных значэнняў. - + You are requesting no change in knot multiplicity. Вы не запытваеце аніякіх зменах у кратнасці вузлоў. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Ідэнтыфікатар геаметрыі (GeoId) не з'яўляецца крывой B-сплайна. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Індэкс вузла знаходзіцца за межамі дапушчальных значэнняў. Звярніце ўвагу, што ў адпаведнасці з назначэннем OCC першы вузел мае індэкс 1, а не 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. Кратнасць не можа быць павялічана звыш ступені B-сплайна. - + The multiplicity cannot be decreased beyond zero. Кратнасць не можа быць паменшана ніжэй за 0. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OpenCASCADE не можа паменшыць кратнасць у межах найбольшай дакладнасці. - + Knot cannot have zero multiplicity. Вузел не можа мець нулявую кратнасць. - + Knot multiplicity cannot be higher than the degree of the BSpline. Кратнасць вузла не можа быць вышэй ступені B-сплайна. - + Knot cannot be inserted outside the BSpline parameter range. Вузел не можа быць устаўлены за межы дыяпазону наладаў B-сплайна. @@ -2401,134 +2394,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2576,329 +2569,329 @@ invalid constraints, degenerated geometry, etc. Памернае абмежаванне - + Cannot add a constraint between two external geometries. Не атрымалася дадаць абмежаванне паміж дзвюма вонкавымі геаметрыямі. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Не атрымалася дадаць абмежаванне паміж дзвюма фіксаванымі геаметрыямі. Фіксаваная геаметрыя ўключае вонкавую геаметрыю, абмежаваную геаметрыю, альбо спецыяльныя кропкі, такія як вузлавыя кропкі B-сплайну. - + Sketcher Constraint Substitution Замена абмежаванняў Варштата эскізу - + Keep notifying me of constraint substitutions Працягнуць апавяшчаць мяне аб зменах абмежаванняў - - - + + + Only sketch and its support are allowed to be selected. Дазволена абіраць толькі эскіз і яго падтрымку. - + One of the selected has to be on the sketch. Адзін з абраных павінен быць на эскізе. - - + + Select an edge from the sketch. Абраць рабро на эскізе. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Немагчымае абмежаванне - - - - + + + + The selected edge is not a line segment. Абранае рабро не з'яўляецца адрэзкам лініі. - - - - - - + + + + + + Double constraint Залішняе абмежаванне - - - - - + + + + + The selected edge already has a horizontal constraint! Абранае рабро ўжо мае гарызантальнае абмежаванне! - - - + + + The selected edge already has a vertical constraint! Абранае рабро ўжо мае вертыкальнае абмежаванне! - - - - - - + + + + + + The selected edge already has a Block constraint! Абранае рабро ўжо мае абмежаванне руху! - + The selected item(s) can't accept a horizontal constraint! Абраны элемент(-ы) не можа прымаць гарызантальнае абмежаванне! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Абрана некалькі фіксаваных кропак. Абярыце найбольш адну фіксаваную кропку! - + The selected item(s) can't accept a vertical constraint! Абраны элемент(-ы) не можа прымаць вертыкальнае абмежаванне! - - - + + + Select vertices from the sketch. Абраць вяршыню на эскізе. - + Select one vertex from the sketch other than the origin. Абраць адну вяршыню з эскіза, акрамя кропкі пачатку каардынат. - + Select only vertices from the sketch. The last selected vertex may be the origin. Абраць толькі вяршыні з эскіза. Апошняя абраная вяршыня можа быць кропкай пачатку каардынат. - + Wrong solver status Няправільны статус сродку рашэння - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Абмежаванае абмежаванне не можа быць дададзена, калі эскіз не вырашаны альбо мае залішнія і абмежаванні, якія канфліктуюць. - + Select one edge from the sketch. Абраць адно рабро на эскізе. - + Select only edges from the sketch. Абраць толькі рэбры на эскізе. - + Number of selected objects is not 3 Колькасць абраных аб'ектаў не 3 - + Error Памылка - + Unexpected error. More information may be available in the Report View. Нечаканая памылка. Больш падрабязная інфармацыя можа быць даступная ў Праглядзе справаздачы. - + Endpoint to endpoint tangency was applied instead. Замест канчатковай кропкі ўжыты дотык да канчатковай кропкі. - + Select two or more points from the sketch. Абраць дзве ці болей кропак на эскізе. - + Select two or more vertices from the sketch. Абраць дзве ці болей вяршыні на эскізе. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Абраць дзве ці болей вяршыні на эскізе для абмежавання супадзення альбо дзве ці болей акружнасцяў, эліпсаў, дуг або дуг эліпса для канцэнтрычнага абмежавання. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Абраць дзве вяршыні на эскізе для абмежавання супадзення альбо дзве акружнасці, эліпсаў, дуг або дуг эліпса для канцэнтрычнага абмежавання. - + Select exactly one line or one point and one line or two points from the sketch. Абраць на эскізе адну лінію, альбо адну кропку і адну лінію, альбо дзве кропкі. - + Cannot add a length constraint on an axis! Не атрымалася дадаць абмежаванне даўжыні на вось! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Абраць на эскізе адну лінію, альбо адну кропку і адну лінію, альбо дзве кропкі, альбо дзве акружнасці. - + This constraint does not make sense for non-linear curves. Абмежаванне не мае сэнсу для нелінейных крывых. - + Endpoint to edge tangency was applied instead. Замест канчатковай кропкі ўжыты дотык да рабра. - - - - - - - + + + + + + + Select the right things from the sketch. Абраць неабходныя аб'екты на эскізе. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Абраць рабро, якое не з'яўляецца вагой B-сплайна. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ні адна з абраных кропак не была абмежаваная адпаведнымі крывымі, таму што яны з'яўляюцца часткамі аднаго і таго ж элемента, таму што яны абодва з'яўляюцца вонкавай геаметрыяй альбо таму, што рабро не падыходзіць. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ні адна з абраных кропак не была абмежаваная адпаведнымі крывымі, альбо таму што яны з'яўляюцца часткамі аднаго і таго ж элемента, альбо таму што яны абодва з'яўляюцца вонкавай геаметрыяй. - - - - + + + + Select exactly one line or up to two points from the sketch. Абраць на эскізе адну лінію, альбо не болей дзвюх кропак. - + Cannot add a horizontal length constraint on an axis! Не атрымалася дадаць гарызантальнае абмежаванне даўжыні на вось! - + Cannot add a fixed x-coordinate constraint on the origin point! Не атрымалася дадаць фіксаванае абмежаванне каардынаты X да кропкі пачатку каардынат! - - + + This constraint only makes sense on a line segment or a pair of points. Абмежаванне мае сэнс толькі для адрэзка лініі ці пары кропак. - + Cannot add a vertical length constraint on an axis! Не атрымалася дадаць вертыкальнае абмежаванне даўжыні на вось! - + Cannot add a fixed y-coordinate constraint on the origin point! Не атрымалася дадаць фіксаванае абмежаванне каардынаты Y да кропкі пачатку каардынат! - + Select two or more lines from the sketch. Абраць дзве ці болей ліній на эскізе. - - + + Select at least two lines from the sketch. Абраць па крайняй меры дзве лініі на эскізе. - + Select a valid line. Абраць дапушчальную лінію. - - + + The selected edge is not a valid line. Абранае рабро не з'яўляецца дапушчальнай ліняй. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2908,42 +2901,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Дапушчальныя камбінацыі: дзве крывыя; канчатковая кропка і крывая; дзве канчатковыя кропкі; дзве крывыя і кропка. - + Select some geometry from the sketch. perpendicular constraint Абраць некаторую геаметрыю на эскізе. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не атрымалася дадаць абмежаванне перпендыкулярнасці ў нязлучанай кропцы! - - - + + + Perpendicular to B-spline edge currently unsupported. Перпендыкуляр да рабра B-сплайна ў бягучым часе не падтрымліваецца. - - + + One of the selected edges should be a line. Адно з абраных рэбраў павінна быць лініяй. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Ужыты дотык канчатковай кропкі да канчатковай кропкі. Абмежаванне супадзення было выдалена. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Ужыты дотык канчатковай кропкі да рабра. Абмежаванне кропкі на аб'екце было выдалена. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2953,182 +2946,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Дапушчальныя камбінацыі: дзве крывыя; канчатковая кропка і крывая; дзве канчатковыя кропкі; дзве крывыя і кропка. - + Select some geometry from the sketch. tangent constraint Абраць некаторую геаметрыю на эскізе. - - - + + + Cannot add a tangency constraint at an unconnected point! Не атрымалася дадаць абмежаванне дотыку ў нязлучанай кропцы! - - + + Tangent constraint at B-spline knot is only supported with lines! Датычная абмежаванне ў вузле B-сплайна падтрымліваецца толькі лініямі! - + B-spline knot to endpoint tangency was applied instead. Замест вузла B-сплайну ўжыты дотык да канчатковай кропкі. - + Select either one point and several curves, or one curve and several points. Абраць альбо адну кропку і некалькі крывых, альбо адну крывую і некалькі кропак. - - + + Wrong number of selected objects! Няправільная колькасць абраных аб'ектаў! - - + + With 3 objects, there must be 2 curves and 1 point. З 3 аб'ектамі павінна быць 2 крывыя і 1 кропка. - - - + + + Tangency to B-spline edge currently unsupported. Дотык да рабра B-сплайна ў бягучым часе не падтрымліваецца. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Абраць адну ці болей дуг альбо акружнасцяў на эскізе. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Абраці альбо толькі адзін ці некалькі палюсоў B-сплайну, альбо толькі адну ці некалькі дуг або акружнасцяў на эскізе, але не змешаных. - - - + + + Constraint only applies to arcs or circles. Абмежаванне прымяняецца толькі на дугах ці акружнасцях. - - + + Select one or two lines from the sketch. Or select two edges and a point. Абраць адну ці дзве лініі, альбо дзве крывыя і кропку. - - + + Parallel lines Паралельныя лініі - - + + An angle constraint cannot be set for two parallel lines. Не атрымалася задаць абмежаванне вугла паміж паралельнымі лініямі. - + Cannot add an angle constraint on an axis! Не атрымалася дадаць абмежаванне вугла на вось! - + Select two edges from the sketch. Абраць два рабра на эскізе. - + Select two or more compatible edges. Абраць два ці больш сумяшчальных рабра. - + Sketch axes cannot be used in equality constraints. Восі эскізу нельга ўжываць у абмежаваннях роўнасці. - + Equality for B-spline edge currently unsupported. Абмежаванні роўнасці на рэбры B-сплайна ў бягучым часе не падтрымліваецца. - - - - + + + + Select two or more edges of similar type. Абярыце два ці больш рэбраў аналагічнага тыпу. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Абярыце на эскізе дзве кропкі і лінію сіметрыі, альбо дзве кропкі і кропку сіметрыі, альбо лінію і кропку сіметрыі. - - + + Cannot add a symmetry constraint between a line and its end points. Не атрымалася дадаць абмежаванне сіметрыі паміж лініяй і яе канчатковымі кропкамі. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Не атрымалася дадаць абмежаванне сіметрыі паміж лініяй і яе канчатковымі кропкамі! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Абраць дзве канчатковыя кропкі ліній, якія будуць дзейнічаць як прамяні, і рабро, якое прадстаўляе мяжу. Першая абраная кропка адпавядае індэксу n1, другая - n2, а апорнае значэнне вызначаецца суадносінамі n2/n1. - + Selected objects are not just geometry from one sketch. Абраныя аб'екты не з'яўляюцца проста геаметрыяй з аднаго эскіза. - + Cannot create constraint with external geometry only. Не атрымалася стварыць абмежаванне з ужываннем толькі вонкавай геаметрыі. - + Incompatible geometry is selected. Абрана несумяшчальная геаметрыя. - + SnellsLaw on B-spline edge is currently unsupported. Закон Снеліуса для рабра B-сплайна ў бягучым часе не падтрымліваецца. - - - - - + + + + + Select constraints from the sketch. Абраць абмежаванне на эскізе. @@ -3629,12 +3622,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Даўжыня: - + Refractive index ratio Суадносіны каэфіцыента праламлення - + Ratio n2/n1: Суадносіны n2/n1: @@ -5224,112 +5217,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Змяніць эскіз - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch Хібны эскіз - + Do you want to open the sketch validation tool? Адчыніць інструмент праверкі эскіза? - + The sketch is invalid and cannot be edited. Эскіз хібны і не можа быць зменены. - + Please remove the following constraint: Калі ласка, выдаліце наступнае абмежаванне: - + Please remove at least one of the following constraints: Калі ласка, выдаліце, прынамсі, адное з наступных абмежаванняў: - + Please remove the following redundant constraint: Калі ласка, выдаліце наступнае залішняе абмежаванне: - + Please remove the following redundant constraints: Калі ласка, выдаліце наступныя залішнія абмежаванні: - + The following constraint is partially redundant: Наступнае абмежаванне часткова залішняе: - + The following constraints are partially redundant: Наступныя абмежаванні часткова залішнія: - + Please remove the following malformed constraint: Калі ласка, выдаліце наступнае скажонае абмежаванне: - + Please remove the following malformed constraints: Калі ласка, выдаліце наступныя скажоныя абмежаванні: - + Empty sketch Пусты эскіз - + Over-constrained: Празмерна-абмежаваны: - + Malformed constraints: Скажоныя абмежаванні: - + Redundant constraints: Залішнія абмежаванні: - + Partially redundant: Часткова залішнія: - + Solver failed to converge Сродку рашэння не атрымалася сысціся - + Under constrained: Ва ўмовах абмежавання: - + %n DoF(s) %n ступень свабоды @@ -5339,7 +5332,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Цалкам абмежаваны @@ -5413,7 +5406,7 @@ This is done by analyzing the sketch geometries and constraints. Creates a clone of the geometry taking as reference the last selected point - Стварае клон геаметрыі, у якасці эталону ўжывае апошнюю абраную кропку + Стварае дублікат геаметрыі, у якасці эталону ўжывае апошнюю абраную кропку @@ -5437,8 +5430,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Задаць дыяметр акружнасці ці дугі @@ -5446,7 +5439,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Задаць радыус/дыяметр акружнасці ці дугі @@ -5454,20 +5448,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Задаць радыус акружнасці ці дугі - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Задаць радыус/дыяметр акружнасці ці дугі - - Sketcher_Copy @@ -6084,7 +6070,7 @@ Eigen Sparse QR - аптымізаваны для разрэджаных мат ViewProviderSketch - + and %1 more і яшчэ %1 @@ -6307,7 +6293,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Эскіз мае часткова залішнія абмежаванні! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Парабалы былі перанесены. Перанесеныя файлы не будуць адчыняцца ў папярэдніх версіях FreeCAD!! @@ -6318,7 +6304,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6343,7 +6329,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6366,13 +6352,13 @@ The grid spacing change if it becomes smaller than this number of pixel.Абмежаванне змяшчае недапушчальную інфармацыю аб індэксе і з'яўляецца скажоным. - - - - - - - + + + + + + + @@ -6383,7 +6369,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Не атрымалася дадаць дугу @@ -6497,7 +6483,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Не атрымалася дадаць паралелепіпед - + Failed to add rounded rectangle Немагчыма дадаць закруглены прастакутнік @@ -6683,18 +6669,18 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Вымярэнне - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Абмяжоўвае кантэкстуальную ў залежнасці ад вашага выбару. -У залежнасці ад вашага выбару ў вас можа быць некалькі даступных абмежаванняў. Вы можаце перамыкацца паміж імі, калі ўжываеце клавішу <Shift>. -Пстрычка <левай кнопкай мышы> па пустой прасторы пацвердзіць бягучае абмежаванне. Пстрычка <правай кнопкай мышы> ці націск клавішы <Esc> прывядзе да адмены. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6713,14 +6699,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Вымярэнне - + Dimension tools. Інструменты вымярэння. + + CmdSketcherConstrainRadius + + + Constrain radius + Абмежаванне радыуса + + + + Fix the radius of a circle or an arc + Задаць радыус акружнасці ці дугі + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts index 4f3a456ab1..ad21227f34 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ca.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringeix l'arc o la circumferència - + Constrain an arc or a circle Restringeix un arc o una circumferència - + Constrain radius Restringeix el radi - + Constrain diameter Restringeix el diàmetre - + Constrain auto radius/diameter Limiteu el radi/diàmetre automàtic @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restricció de angle - + Fix the angle of a line or the angle between two lines Fixa l'angle d'una línia o l'angle entre dues línies @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restringeix el bloc - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restricció coincident - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea una restricció coincident entre punts o una restricció concèntrica entre cercles, arcs i el·lipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringeix el diàmetre - + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restricció de distància - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Fixa la distància horitzontal entre dos punts o extrems de línia @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restringir la distància vertical - + Fix the vertical distance between two points or line ends Fixa la distància vertical entre dos punts o extrems de línia @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restricció igual - + Create an equality constraint between two lines or between circles and arcs Crea una restricció d'igualtat entre dues línies o entre cercles i arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restricció horitzontal - + Create a horizontal constraint on the selected item Crea una restricció horitzontal en l'element seleccionat @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restricció de bloqueig - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restricció de parel·lelisme - + Create a parallel constraint between two lines Crea una restricció de paral·lelisme entre dues línies @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restricció de perpendicularitat - + Create a perpendicular constraint between two lines Crea una restricció de perpendicularitat entre dues línies @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restricció d'un punt sobre l'objecte - + Fix a point onto an object Fixa un punt sobre un objecte @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Limiteu el radi/diàmetre automàtic - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Restricció de radi o pes - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Corretgir el radi d'un cercle o un arc o fixar el pes d'un poste o d'una B-spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restricció de simetria - + Create a symmetry constraint between two points with respect to a line or a third point Crea una restricció de simetria entre dos punts respecte a una línia o a un tercer punt @@ -614,12 +601,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Restricció tangent - + Create a tangent constraint between two entities Crea una restricció tangent entre dues entitats @@ -627,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Restricció veertical - + Create a vertical constraint on the selected item Crea una restricció vertical en l'element seleccionat @@ -1490,12 +1477,12 @@ Això esborrarà la propietat 'Suport', si existeix. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activa/desactiva la restricció - + Activates or deactivates the selected constraints Activa o desactiva les restriccions seleccionades @@ -1516,12 +1503,12 @@ Això esborrarà la propietat 'Suport', si existeix. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Canvia la restricció de guia a referència - + Set the toolbar, or the selected constraints, into driving or reference mode Estableix la barra d'eines o les restriccions seleccionades, en mode guia o referència @@ -1594,370 +1581,376 @@ restriccions invàlides, geometries degenerades, etc. Command - - + + Add horizontal constraint Afegeix restricció horitzontal - - - + + + Add horizontal alignment Afegeix alinieació horitzontal - - + + Add vertical constraint Afegeix restricció vertical - + Add vertical alignment Afegeix alineació vertical - + Add 'Lock' constraint Afegir restricció 'Bloquejar' - + Add relative 'Lock' constraint Afegeix una restricció de bloqueig relatiu - + Add fixed constraint Afegir restricció fixa - + Add 'Block' constraint Afegir restricció 'Bloqueig' - + Add block constraint Afegir restricció de Bloqueig - - - + + + Add coincident constraint Afegir restricció de coincidència - - + + Add distance from horizontal axis constraint Afegir distancia des-de la restricció del eix horitzontal - - + + Add distance from vertical axis constraint Afegir distancia des-de la restricció del eix vertical - - + + Add point to point distance constraint Afegeix una restricció de distància entre dos punts - - - + + + Add point to line Distance constraint Afegeix una restricció de distància de punt a línia - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Afegeix una restricció de longitud - - + + + Dimension Cota - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Afegeix una restricció de punt sobre l'objecte - - + + Add point to point horizontal distance constraint Afegeix una restricció punt a punt de distància horitzontal - + Add fixed x-coordinate constraint Afegeix restricció de coordenada x fixa - - + + Add point to point vertical distance constraint Afegeix una restricció de distància vertical punt a punt - + Add fixed y-coordinate constraint Afegeix una restricció de coordenada x fixe - - + + Add parallel constraint Afegeix una restricció paral·lela - - - - - - - + + + + + + + Add perpendicular constraint Afegeix una restricció perpendicular - + Add perpendicularity constraint Afegeix una restricció de perpendicularitat - + Swap coincident+tangency with ptp tangency Canvia tangència+coincident amb tangència punt a punt - + Swap PointOnObject+tangency with point to curve tangency Canvia PointOnObject+tangència amb tangència punt a corba - - - - - - - + + + + + + + Add tangent constraint Afegeix una restricció tangent - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Afegeix un punt de restricció de tangent - - - - + + + + Add radius constraint Afegeix una restricció de radi - - - - + + + + Add diameter constraint Afegeix una restricció de diàmetre - - - - + + + + Add radiam constraint Afegeix una restricció de radi - - - - - - + + + + + + Add angle constraint Afegeix una restricció d'angle - - + + Add equality constraint Afegeix una restricció d'igualtat - - - - - + + + + + Add symmetric constraint Afegeix una restricció de simetria - + Add Snell's law constraint Afegeix una restricció de Llei de Snell - + Toggle constraint to driving/reference Canvia restricció entre guia i referència - + Activate/Deactivate constraint Activa o desactiva la restricció @@ -2033,7 +2026,7 @@ restriccions invàlides, geometries degenerades, etc. - + Add sketch arc Afegeix un arc al corquis @@ -2284,59 +2277,59 @@ restriccions invàlides, geometries degenerades, etc. Error d'autorestricció: croquis irresoluble si s'apliquen restriccions d'igualtat. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. No es pot esbrinar la intersecció de corbes. Proveu d'afegir una restricció de coincidència entre els vèrtexs de les corbes que intenteu arrodonir. - - + + BSpline Geometry Index (GeoID) is out of bounds. l'index de geometria BSpline (GeoID) esta fora de les restriccions. - + You are requesting no change in knot multiplicity. Se us ha demanat que no canvieu la multiplicitat del nus. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. L'índex de geometria (GeoId) proporcionada no és una corba de B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. L'índex del nus és fora dels límits. Tingueu en compte que d'acord amb la notació d'OCC, el primer nus té l'índex 1 i no zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. La multiplicitat no pot augmentar més enllà del grau de la B-spline. - + The multiplicity cannot be decreased beyond zero. La multiplicitat no es pot reduir més enllà de zero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC no pot reduir la multiplicitat dins de la tolerància màxima. - + Knot cannot have zero multiplicity. El node no pot tenir multiplicitat zero. - + Knot multiplicity cannot be higher than the degree of the BSpline. La multiplicitat de nodes no pot ser superior al grau de la BSpline. - + Knot cannot be inserted outside the BSpline parameter range. El node no es pot inserir fora de l'interval de paràmetres BSpline. @@ -2404,134 +2397,134 @@ restriccions invàlides, geometries degenerades, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2579,329 +2572,329 @@ restriccions invàlides, geometries degenerades, etc. Restricció de dimensió - + Cannot add a constraint between two external geometries. No es pot afegir una restricció entre dues geometries externes. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. No es pot afegir una restricció entre dues geometries fixes. Les geometries fixes inclouen geometria externa, geometria bloquejada i punts especials com ara punts de node B-spline. - + Sketcher Constraint Substitution Substitució de restriccions de Sketcher "Esbos" - + Keep notifying me of constraint substitutions Continueu notificant-me les substitucions de restriccions - - - + + + Only sketch and its support are allowed to be selected. Només es permet seleccionar l'esbós i el seu suport. - + One of the selected has to be on the sketch. Un dels seleccionats ha d'estar a l'esbós. - - + + Select an edge from the sketch. Seleccioneu una aresta del croquis. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricció impossible - - - - + + + + The selected edge is not a line segment. L'aresta seleccionada no és un segment de línia. - - - - - - + + + + + + Double constraint Restricció doble - - - - - + + + + + The selected edge already has a horizontal constraint! La vora seleccionat ja té una restricció horitzontal! - - - + + + The selected edge already has a vertical constraint! La vora seleccionat ja té una restricció vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! La vora seleccionat ja té una restricció de bloc! - + The selected item(s) can't accept a horizontal constraint! El/s element/s seleccionat/s no poden acceptar una restricció horitzontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hi ha més d'un fix punts seleccionats. Seleccioneu un màxim d'un punt fix! - + The selected item(s) can't accept a vertical constraint! El/s element/s seleccionat/s no poden acceptar una restricció vertical! - - - + + + Select vertices from the sketch. Seleccioneu vèrtexs del croquis. - + Select one vertex from the sketch other than the origin. Seleccioneu un vèrtex del croquis que no sigui l'origen. - + Select only vertices from the sketch. The last selected vertex may be the origin. Seleccioneu només vèrtexs del croquis. L'últim vèrtex seleccionat pot ser l'origen. - + Wrong solver status Estat del Solver incorrecte - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. No es pot afegir una restricció de bloqueig si el croquis no està resolt o hi ha restriccions redundants i en conflicte. - + Select one edge from the sketch. Seleccioneu una aresta del corquis. - + Select only edges from the sketch. Seleccioneu sols arestes del croquis. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Error - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. En el seu lloc s'ha aplicat una tangència entre extrems. - + Select two or more points from the sketch. Seleccioneu dos o més punts del corquis. - + Select two or more vertices from the sketch. Seleccioneu dos o més vèrtexs de l'esbós. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Seleccioneu exactament una línia, o un punt i una línia, o dos punts del croquis. - + Cannot add a length constraint on an axis! No es pot afegir una restricció de longitud sobre un eix! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. Aquesta restricció no té sentit per a corbes no lineals. - + Endpoint to edge tangency was applied instead. En el seu lloc, s'ha aplicat la tangència de punt final a vora. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccioneu els elements correctes del croquis. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Seleccioneu una vora que no sigui un pes B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Cap dels punts seleccionats estava restringit sobre les respectives corbes, perquè són parts del mateix element, perque ambdós són geometries externes, o perquè l'aresta no és eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Cap dels punts seleccionats estaven limitats a les respectives corbes, perquè són peces del mateix element o perquè són tant geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccioneu exactament una línia o fins a dos punts del croquis. - + Cannot add a horizontal length constraint on an axis! No es pot afegir una restricció de longitud horitzontal sobre un eix! - + Cannot add a fixed x-coordinate constraint on the origin point! No es pot afegir una limitació coordenada x fixa en el punt d'origen! - - + + This constraint only makes sense on a line segment or a pair of points. Aquesta restricció només té sentit en un segment de línia o un parell de punts. - + Cannot add a vertical length constraint on an axis! No es pot afegir una restricció de longitud vertical sobre un eix! - + Cannot add a fixed y-coordinate constraint on the origin point! No es pot afegir una limitació coordenada x fixa en el punt d'origen! - + Select two or more lines from the sketch. Seleccioneu dues o més línies del croquis. - - + + Select at least two lines from the sketch. Seleccioneu almenys dues línies del croquis. - + Select a valid line. Seleccioneu una línia vàlida. - - + + The selected edge is not a valid line. L'aresta seleccionada no és una línia vàlida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2909,42 +2902,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. perpendicular constraint Seleccioneu alguna geometria del croquis. - - + + Cannot add a perpendicularity constraint at an unconnected point! No es pot afegir una restricció de perpendicularitat en un punt no connectat! - - - + + + Perpendicular to B-spline edge currently unsupported. Actualment no s'admet una perpendicular a la vora del B-spline. - - + + One of the selected edges should be a line. Una de les arestes seleccionades ha de ser una línia. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. S'ha aplicat una tangència entre extrems. S'han suprimit les restriccions coincidents. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. S'ha aplicat la tangència de punt final a vora. S'ha suprimit el punt sobre la restricció d'objectes. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2952,182 +2945,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. tangent constraint Seleccioneu alguna geometria del croquis. - - - + + + Cannot add a tangency constraint at an unconnected point! No es pot afegir una restricció de tangència en un punt no connectat! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! El nombre d'objectes seleccionats és incorrecte! - - + + With 3 objects, there must be 2 curves and 1 point. Amb 3 objectes, hi ha d'haver 2 corbes i 1 punt. - - - + + + Tangency to B-spline edge currently unsupported. Actualment no s'admet la tangència a la vora del B-spline. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccioneu un o més arcs o cercles del croquis. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Seleccioneu o bé un o diversos pols de B-spline, o bé un o més arcs o circumferències del croquis, però no els mescleu. - - - + + + Constraint only applies to arcs or circles. La restricció només s'aplica a arcs i cercles. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccioneu una o dues línies del croquis. O seleccioneu dues arestes i un punt. - - + + Parallel lines Línies paral·leles - - + + An angle constraint cannot be set for two parallel lines. Una restricció d'angle no es pot definir per dues línies paral·leles. - + Cannot add an angle constraint on an axis! No es pot afegir una restricció d'angle sobre un eix! - + Select two edges from the sketch. Seleccioneu dues arestes del croquis. - + Select two or more compatible edges. Seleccioneu dues o més arestes compatibles. - + Sketch axes cannot be used in equality constraints. Els eixos d'esbós no es poden utilitzar en restriccions d'igualtat. - + Equality for B-spline edge currently unsupported. Actualment no s'admet la igualtat per a la vora del B-spline. - - - - + + + + Select two or more edges of similar type. Seleccioneu dues o més arestes de tipus similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccioneu dos punts i una línia de simetria, dos punts i un punt de simetria, o bé una línia i un punt de simetria del croquis. - - + + Cannot add a symmetry constraint between a line and its end points. No es pot afegir una restricció de simetria entre una línia i els seus extrems. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! No es pot afegir una restricció de simetria entre una línia i els seus extrems! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Seleccioneu dos extrems de línia per actuar com a raigs, i una aresta que representi un límit. El primer punt seleccionat correspon a l'índex n1, el segon a n2, i el valor de la restricció estableix una ràtio n2/n1. - + Selected objects are not just geometry from one sketch. Els objectes seleccionats no són només geometria d'un corquis. - + Cannot create constraint with external geometry only. No es pot crear una restricció només amb geometria externa. - + Incompatible geometry is selected. S'ha seleccionat geometria incompatible. - + SnellsLaw on B-spline edge is currently unsupported. Actualment no es suporta la Llei de Snell en arestes de B-spline. - - - - - + + + + + Select constraints from the sketch. Seleccioneu restriccions del croquis. @@ -3626,12 +3619,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Longitud: - + Refractive index ratio Índex de refracció - + Ratio n2/n1: Relació n2/n1: @@ -5211,114 +5204,114 @@ Això es fa mitjançant l'anàlisi de les geometries i restriccions de l'esbós. SketcherGui::ViewProviderSketch - + Edit sketch Editar croquis - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch El croquis no és vàlid - + Do you want to open the sketch validation tool? Voleu obrir l'eina de validació d'esbossos? - + The sketch is invalid and cannot be edited. El croquis no és vàlid i no es pot editar. - + Please remove the following constraint: Suprimiu la restricció següent: - + Please remove at least one of the following constraints: Suprimiu almenys una de les restriccions següents: - + Please remove the following redundant constraint: Suprimiu la restricció redundant següent: - + Please remove the following redundant constraints: Suprimiu les restriccions redundants següents: - + The following constraint is partially redundant: La restricció següent és parcialment redundant: - + The following constraints are partially redundant: Les següents restriccions són parcialment redundants: - + Please remove the following malformed constraint: Si us plau, elimineu la restricció defectuosa següent: - + Please remove the following malformed constraints: Si us plau, elimineu les restriccions defectuoses següents: - + Empty sketch Croquis buit - + Over-constrained: Sobre-restringit: - + Malformed constraints: Selecciona restriccions defectuoses: - + Redundant constraints: Restriccions redundants: - + Partially redundant: Parcialment redundant: - + Solver failed to converge El solucionador no ha pogut convergir - + Under constrained: Sub-restringit: - + %n DoF(s) %n Grau(s) de llibertat @@ -5326,7 +5319,7 @@ El solucionador no ha pogut convergir - + Fully constrained Esbós completament restringit @@ -5424,8 +5417,8 @@ El solucionador no ha pogut convergir Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -5433,7 +5426,8 @@ El solucionador no ha pogut convergir Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fixeu el radi/diàmetre d'un cercle o d'un arc @@ -5441,20 +5435,12 @@ El solucionador no ha pogut convergir Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixa el radi d'un cercle o arc - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fixeu el radi/diàmetre d'un cercle o d'un arc - - Sketcher_Copy @@ -6070,7 +6056,7 @@ L'algoritme Eigen Sparse QR està optimitzat per a matrius escasses; generalment ViewProviderSketch - + and %1 more i % 1 més @@ -6293,7 +6279,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6304,7 +6290,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6329,7 +6315,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6352,13 +6338,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6369,7 +6355,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6483,7 +6469,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6665,17 +6651,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Cota - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6695,14 +6681,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Cota - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Restringeix el radi + + + + Fix the radius of a circle or an arc + Fixa el radi d'un cercle o arc + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts index 88af02a878..7d6754c1e3 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_cs.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Vazba oblouku nebo kružnice - + Constrain an arc or a circle Vazba oblouku nebo kružnice - + Constrain radius Vazba poloměru - + Constrain diameter Vazba průměru - + Constrain auto radius/diameter Vazba automatický rádius/průměr @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Vazba úhlu - + Fix the angle of a line or the angle between two lines Zadá úhel čáry nebo úhel mezi dvěma čarami @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Vazba blokace - + Block the selected edge from moving Blokuje pohyb vybrané hrany @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Vazba totožnosti - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Vytvoří souosou vazbu mezi body nebo soustřednou vazbu mezi kružnicemi, oblouky a elipsami @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Vazba průměru - + Fix the diameter of a circle or an arc Zadá průměr kružnice nebo oblouku @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Vazba vzdálenosti - + Fix a length of a line or the distance between a line and a vertex or between two circles Zadá délku čáry nebo vzdálenost mezi čárou a vrcholem nebo mezi dvěma kružnicemi @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Vazba vodorovné vzdálenosti - + Fix the horizontal distance between two points or line ends Zadá vodorovnou vzdálenost mezi dvěma body nebo konci čáry @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Vazba svislé vzdálenosti - + Fix the vertical distance between two points or line ends Zadá svislou vzdálenost mezi dvěma body nebo konci čáry @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Vazba shodnosti - + Create an equality constraint between two lines or between circles and arcs Vytvoří shodnost mezi dvěma čarami, kruhy nebo oblouky @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Vazba vodorovně - + Create a horizontal constraint on the selected item Vytvoří vodorovnou vazbu na vybranou položku @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Vazba uzamknutí - + Create both a horizontal and a vertical distance constraint on the selected vertex Vytvoří vodorovnou i svislou vazbu vzdálenosti na vybraném vrcholu @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Vazba rovnoběžnosti - + Create a parallel constraint between two lines Vytvoří rovnoběžnost mezi dvěma čarami @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Vazba kolmosti - + Create a perpendicular constraint between two lines Vytvoří kolmost mezi dvěma čarami @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Vazba bodu k objektu - + Fix a point onto an object Umístí bod na objekt @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Vazba automatický rádius/průměr - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fixujte průměr, pokud je vybrána kružnice, nebo poloměr, pokud je vybrán oblouk/spline pól - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Vazba poloměru nebo váhy - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Zadá poloměr kružnice nebo oblouku nebo zadá váhu pólu B-splajnu - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Vazba lomu (Snellův zákon) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Vytvoří vazbu podle zákona lomu (Snellův zákon) mezi @@ -599,12 +586,12 @@ dvěma koncovými body paprsků a hranou jako rozhraní. CmdSketcherConstrainSymmetric - + Constrain symmetrical Vazba symetrie - + Create a symmetry constraint between two points with respect to a line or a third point Vytvoří symetrii mezi dvěma body vzhledem k čáře nebo třetímu bodu @@ -613,12 +600,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Vazba tečnosti - + Create a tangent constraint between two entities Vytvoří tečnost mezi dvěma objekty @@ -626,12 +613,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Vazba svisle - + Create a vertical constraint on the selected item Vytvoří svislou vazbu na vybranou položku @@ -1088,7 +1075,7 @@ with respect to a line or a third point Extend an edge with respect to the picked position - Prodlouží hranu vzhledem k vybrané pozici + Prodlouží hranu vzhledem k vybrané poloze @@ -1458,7 +1445,7 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. When in edit mode, stop the active operation (drawing, constraining, etc.). - Zastavit aktivní operaci, když je zapnutý editační mód (kreslení, vazbení, atd.). + Zastavit aktivní operaci, když je aktivní režim úprav (kreslení, vazbení, atd.). @@ -1490,12 +1477,12 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktivovat/deaktivovat vazbu - + Activates or deactivates the selected constraints Aktivuje nebo deaktivuje vybrané vazby @@ -1516,12 +1503,12 @@ Tímto se vymaže vlastnost "Podpora", pokud existuje. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Přepnout řídící/referenční vazbu - + Set the toolbar, or the selected constraints, into driving or reference mode Nastavit panel nástrojů nebo vybrané vazby @@ -1576,7 +1563,7 @@ neplatných vazeb, degenerované geometrie atd. When in edit mode, switch between section view and full view. - Přepnout mezi řezem a plným zobrazením, když je aktivní editační režim. + Přepnout mezi řezem a plným zobrazením, když je aktivní režim úprav. @@ -1589,376 +1576,382 @@ neplatných vazeb, degenerované geometrie atd. When in edit mode, set the camera orientation perpendicular to the sketch plane. - Nastavit pohled kolmo na rovinu náčrtu, když je aktivní editační režim. + Nastavit pohled kolmo na rovinu náčrtu, když je aktivní režim úprav. Command - - + + Add horizontal constraint Přidat vodorovnou vazbu - - - + + + Add horizontal alignment Přidat vodorovné zarovnání - - + + Add vertical constraint Přidat vertikální vazbu - + Add vertical alignment Přidat svislé zarovnání - + Add 'Lock' constraint Přidat vazbu 'Uzamčení' - + Add relative 'Lock' constraint Přidat vazbu relativního 'Uzamčení' - + Add fixed constraint Přidat pevnou vazbu - + Add 'Block' constraint Přidat vazbu 'Blokace' - + Add block constraint Přidat vazbu blokace - - - + + + Add coincident constraint Přidat vazbu totožnosti - - + + Add distance from horizontal axis constraint Přidat vazbu vzdálenosti od vodorovné osy - - + + Add distance from vertical axis constraint Přidat vazbu vzdálenosti od svislé osy - - + + Add point to point distance constraint Přidat vazbu vzdálenosti dvou bodů - - - + + + Add point to line Distance constraint Přidat vazbu vzdálenosti bodu a čáry - - + + Add circle to circle distance constraint Přidat kruh do kružnice – omezení vzdálenosti - + Add circle to line distance constraint Přidání vazby vzdálenosti kružnice od čáry - - - - - - + + + + + + Add length constraint Přidat vazbu délky - - + + + Dimension Rozměr - + Add lock constraint Přidat vazbu uzamčení - + Add 'Distance to origin' constraint Přidat vazbu 'Vzdálenost k počátku' - - - + + + Add Distance constraint Přidat vazbu vzdálenosti - - - + + + Add 'Horizontal' constraints Přidat 'Vodorovné' vazby - - - + + + Add 'Vertical' constraints Přidat 'Vertikální' vazby - - + + Add Symmetry constraint Přidat vazbu symetrie - - + + Add Symmetry constraints Přidat vazby symetrie - - + + Add Distance constraints Přidat vazby vzdálenosti - + Add Horizontal constraint Přidat vodorovnou vazbu - + Add Vertical constraint Přidat vertikální vazbu - + Add Block constraint Přidat vazbu blokace - + Add Angle constraint Přidat vazbu úhlu - - - - + + + + Add Equality constraint Přidat vazbu rovnosti - + Add Equality constraints Přidat vazby rovnosti - + Add Radius constraint Přidat vazbu poloměru - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Přidat soustřednou a délkovou vazbu - + Add DistanceX constraint Přidat vazbu vodorovné vzdálenosti - + Add DistanceY constraint Přidat vazbu svislé vzdálenosti - + Add point to circle Distance constraint Přidat vazbu vzdálenosti bodu od kružnice - - + + Add point on object constraint Přidat vazbu bodu na objektu - - + + Add point to point horizontal distance constraint Přidat vazbu vodorovné vzdálenosti dvou bodů - + Add fixed x-coordinate constraint Přidat vazbu pevné souřadnice x - - + + Add point to point vertical distance constraint Přidat vazbu svislé vzdálenosti dvou bodů - + Add fixed y-coordinate constraint Přidat vazbu pevné souřadnice y - - + + Add parallel constraint Přidat paralelní vazbu - - - - - - - + + + + + + + Add perpendicular constraint Přidat kolmou vazbu - + Add perpendicularity constraint Přidat vazbu kolmosti - + Swap coincident+tangency with ptp tangency Prohodit shodnost+tečnost s tečností v bodech - + Swap PointOnObject+tangency with point to curve tangency Bod na křivce + tečnost prohodit s tečností v bodě křivky - - - - - - - + + + + + + + Add tangent constraint Přidat vazbu tečnosti - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Přidat vazbu bodu tečnosti - - - - + + + + Add radius constraint Přidat vazbu poloměru - - - - + + + + Add diameter constraint Přidat vazbu průměru - - - - + + + + Add radiam constraint Přidat vazbu poloměr-průměr - - - - - - + + + + + + Add angle constraint Přidat úhlovou vazbu - - + + Add equality constraint Přidat vazbu rovnosti - - - - - + + + + + Add symmetric constraint Přidat vazbu symetrie - + Add Snell's law constraint Přidat vazbu Snellova zákona - + Toggle constraint to driving/reference Přepnout vazbu na řídící/referenční - + Activate/Deactivate constraint Aktivovat/Deaktivovat vazbu @@ -2034,7 +2027,7 @@ neplatných vazeb, degenerované geometrie atd. - + Add sketch arc Přidat oblouk náčrtu @@ -2285,59 +2278,59 @@ neplatných vazeb, degenerované geometrie atd. Chyba automatických vazeb: Neřešitelný náčrt po aplikaci vazeb rovnosti. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Nelze odhadnout průsečík křivek. Zkuste přidat vazbu totožnosti mezi vrcholy křivek, které chcete zaoblit. - - + + BSpline Geometry Index (GeoID) is out of bounds. Geometrický index (GeoID) B-splajnu je mimo meze. - + You are requesting no change in knot multiplicity. Nepožadujete změnu v násobnosti uzlů. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Daný geometrický index (GeoId) neodpovídá B-splajn křivce. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Index uzlu je mimo hranice. Všimněte si, že v souladu s OCC zápisem je index prvního uzlu 1 a ne 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. Násobnost nemůže být zvýšena nad stupeň B-splajnu. - + The multiplicity cannot be decreased beyond zero. Násobnost nemůže být snížena pod nulu. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC není schopno snížit násobnost na maximální toleranci. - + Knot cannot have zero multiplicity. Uzel nemůže mít nulovou násobnost. - + Knot multiplicity cannot be higher than the degree of the BSpline. Násobnost uzlu nemůže být vyšší než stupeň BSplajnu. - + Knot cannot be inserted outside the BSpline parameter range. Nelze vložit uzel mimo rozsah parametrů BSplajnu. @@ -2405,134 +2398,134 @@ neplatných vazeb, degenerované geometrie atd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ neplatných vazeb, degenerované geometrie atd. Vazba vzdálenosti - + Cannot add a constraint between two external geometries. Nelze přidat vazbu mezi dvěma vnějšími geometriemi. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nelze přidat vazbu mezi dvě pevné geometrie. Pevné geometrie obsahují vnější geometrii, blokovanou geometrii a speciální body jako jsou uzly B-splajnu. - + Sketcher Constraint Substitution Nahrazení vazeb náčrtu - + Keep notifying me of constraint substitutions Informovat o nahrazování vazeb - - - + + + Only sketch and its support are allowed to be selected. Vybrán může být pouze náčert a jeho podpora. - + One of the selected has to be on the sketch. Jeden z vybraných musí být na náčrt. - - + + Select an edge from the sketch. Vyber hranu z náčrtu. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemožné omezení - - - - + + + + The selected edge is not a line segment. Vybraný okraj není segment čáry. - - - - - - + + + + + + Double constraint Dvojité omezení - - - - - + + + + + The selected edge already has a horizontal constraint! Vybraná hrana již má vodorovnou vazbu! - - - + + + The selected edge already has a vertical constraint! Vybraná hrana již má vertikální vazbu! - - - - - - + + + + + + The selected edge already has a Block constraint! Vybraná hrana již má vazbu blokace! - + The selected item(s) can't accept a horizontal constraint! Vybrané položky nemohou přijmout vodorovnou vazbu! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Je vybráno více pevných bodů. Vyberte nejvýše jeden pevný bod! - + The selected item(s) can't accept a vertical constraint! Vybrané položky nemohou přijmout svislou vazbu! - - - + + + Select vertices from the sketch. Vyberte vrcholy z náčrtu. - + Select one vertex from the sketch other than the origin. Vyberte jeden vrchol z náčrtu jiný než počátek. - + Select only vertices from the sketch. The last selected vertex may be the origin. Vyberte jen vrcholy z náčrtu. Poslední vybraný vrchol může být počátek. - + Wrong solver status Špatný status řešiče - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Vazba blokace nemůže být přidána, pokud je náčrt nevyřešený nebo pokud obsahuje nadbytečné či konfliktní vazby. - + Select one edge from the sketch. Vyberte jednu hranu z náčrtu. - + Select only edges from the sketch. Vyberte pouze hrany z náčrtu. - + Number of selected objects is not 3 Počet vybraných objektů není 3 - + Error Chyba - + Unexpected error. More information may be available in the Report View. Neočekávaná chyba. Více informací může být k dispozici v zobrazení zprávy. - + Endpoint to endpoint tangency was applied instead. Namísto toho byla aplikována tečnost v koncových bodech. - + Select two or more points from the sketch. Vyberte dva nebo více bodů z náčrtu. - + Select two or more vertices from the sketch. Vyberte dva nebo více vrcholů z náčrtu. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Vyberte dva nebo více vrcholů z náčrtu pro vazbu totožnosti nebo dvě nebo více kružnic, elips, oblouků nebo oblouků elips pro soustřednou vazbu. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Vyberte dva vrcholy z náčrtu pro vazbu totožnosti nebo dvě kružnice, elipsy, oblouky nebo oblouky elipsy pro soustřednou vazbu. - + Select exactly one line or one point and one line or two points from the sketch. Vyberte právě jednu úsečku nebo jeden bod a úsečku nebo dva body z náčrtu. - + Cannot add a length constraint on an axis! Nelze přidat délkovou vazbu osy! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Vyberte přesně jednu čáru nebo jeden bod a jednu čáru nebo dva body nebo dvě kružnice z náčrtu. - + This constraint does not make sense for non-linear curves. Tato vazba nedává smysl pro nelineární křivky. - + Endpoint to edge tangency was applied instead. Namísto toho byla použita tečnost hrany v koncovém bodě. - - - - - - - + + + + + + + Select the right things from the sketch. Výberte správné věci z náčrtu. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Vyberte hranu, která není váhou B-splajnu. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Žádný z vybraných bodů nebyl napojen na příslušnou křivku, protože jsou součástí téhož elementu nebo tvoří oba vnější geometrii. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Žádný z vybraných bodů nebyl napojen na příslušnou křivku, protože jsou buď součístí téhož elementu nebo tvoří oba vnější geometrii. - - - - + + + + Select exactly one line or up to two points from the sketch. Vyberte právě jednu úsečku nebo až dva body z náčrtu. - + Cannot add a horizontal length constraint on an axis! Nelze přidat vodorovnou délkovou vazbu osy! - + Cannot add a fixed x-coordinate constraint on the origin point! Nelze přidat vazbu souřadnice x na počátek souřadnic! - - + + This constraint only makes sense on a line segment or a pair of points. Tato vazba má smysl pouze na segmentu čáry nebo na dvojici bodů. - + Cannot add a vertical length constraint on an axis! Nelze přidat svislou délkovou vazbu osy! - + Cannot add a fixed y-coordinate constraint on the origin point! Nelze přidat vazbu souřadnice y na počátek souřadnic! - + Select two or more lines from the sketch. Vyberte dvě nebo více úseček z náčrtu. - - + + Select at least two lines from the sketch. Vyberte nejméně dvě úsečky z náčrtu. - + Select a valid line. Vyberte platnou úsečku. - - + + The selected edge is not a valid line. Vybraná hrana není platnou úsečkou. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; dvě křivky a bod. - + Select some geometry from the sketch. perpendicular constraint Vyberte geometrii z náčrtu. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nelze přidat kolmou vazbu na volný bod! - - - + + + Perpendicular to B-spline edge currently unsupported. Kolmost na hranu B-splajnu momentálně není podpofována. - - + + One of the selected edges should be a line. Jedna z vybraných hran by měla být úsečka. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Byla aplikována tečnost v koncových bodech. Vazba totožnosti byla smazána. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Byla použita tečnost hrany v koncovém bodě. Vazba bodu na objektu byla smazána. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; dvě křivky a bod. - + Select some geometry from the sketch. tangent constraint Vyberte geometrii z náčrtu. - - - + + + Cannot add a tangency constraint at an unconnected point! Nelze přidat tangentní vazbu na volný bod! - - + + Tangent constraint at B-spline knot is only supported with lines! Omezení tečny u B-spline uzlu je podporováno pouze čarami! - + B-spline knot to endpoint tangency was applied instead. Místo toho byl použit uzel B-spline k tečnosti koncového bodu. - + Select either one point and several curves, or one curve and several points. Vyberte buď jeden bod a několik křivek, nebo jednu křivku a několik bodů. - - + + Wrong number of selected objects! Nesprávný počet vybraných objektů! - - + + With 3 objects, there must be 2 curves and 1 point. Mezi třemi objekty musí být 2 křivky a 1 bod. - - - + + + Tangency to B-spline edge currently unsupported. Tangentnost na hranu B-splajnu momentálně není podporována. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Vyberte jeden nebo více oblouků nebo kružnic z náčrtu. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Vyberte buď pouze jeden nebo více pólů B-Splajnu nebo pouze jeden oblouk nebo kružnici z náčrtu, ale ne jejich kombinace. - - - + + + Constraint only applies to arcs or circles. Vazbu lze použít jen na oblouky nebo kružnice. - - + + Select one or two lines from the sketch. Or select two edges and a point. Vyberte jednu nebo dvě úsečky z náčrtu. Nebo vyberte dvě hrany a bod. - - + + Parallel lines Rovnoběžné úsečky - - + + An angle constraint cannot be set for two parallel lines. Úhlová vazba nemůže být nastavena pro dvě rovnoběžné úsečky. - + Cannot add an angle constraint on an axis! Nelze přidat úhlovou vazbu na osu! - + Select two edges from the sketch. Vyberte dvě hrany z náčrtu. - + Select two or more compatible edges. Vyberte dvě nebo více kompatibilních hran. - + Sketch axes cannot be used in equality constraints. Osy náčrtu nelze použít pro vazby rovnosti. - + Equality for B-spline edge currently unsupported. Shodnost pro hranu B-splajnu momentálně není podporována. - - - - + + + + Select two or more edges of similar type. Vyberte dvě nebo více hran podobného typu. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Vyberte dva body a čáru symetrie, dva body a bod symetrie nebo čáru a bod symetrie z náčrtu. - - + + Cannot add a symmetry constraint between a line and its end points. Nelze přidat vazbu symetrie mezi čárou a jejími koncovými body. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nelze přidat symetrickou vazbu mezi úsečku a její koncový bod! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Vyberte koncové body úsečky představující paprsek a hranu reprezentující rozhraní. První vybraný bod odpovídá indexu n1, druhý indexu n2, zadává se hodnota poměru n2/n1. - + Selected objects are not just geometry from one sketch. Vybrané objekty nejsou geometrií jednoho náčrtu. - + Cannot create constraint with external geometry only. Nejde vytvořit vazbu jen s vnější geometrií. - + Incompatible geometry is selected. Je vybrána nekompatibilní geometrie. - + SnellsLaw on B-spline edge is currently unsupported. Snellův zákon na hraně B-splajnu momentálně není podporován. - - - - - + + + + + Select constraints from the sketch. Vybrat vazby z náčrtu. @@ -3337,12 +3330,12 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; This object belongs to another body. Hold Ctrl to allow cross-references. - Tento objekt patří k jinému tělu. Podržením Ctrl umožníte křížové odkazy. + Tento objekt patří k jinému tělesu. Podržením Ctrl umožníte křížové odkazy. This object belongs to another body and it contains external geometry. Cross-reference not allowed. - Tento objekt patří do jiného těla a obsahuje vnější geometrii. Křížové odkazy nejsou povolené. + Tento objekt patří k jinému tělesu a obsahuje vnější geometrii. Křížové odkazy nejsou povolené. @@ -3631,12 +3624,12 @@ Přijatelné kombinace: dvě křivky; koncový bod a křivka; dva koncové body; Délka: - + Refractive index ratio Index lomu - + Ratio n2/n1: Poměr n2/n1: @@ -4098,7 +4091,7 @@ reflected on copies Special solver algorithm will be used while dragging sketch elements. Requires to re-enter edit mode to take effect. Speciální algoritmus řešiče bude použit při přetažení prvků náčrtu. -Vyžaduje znovu otevření editace náčrtu, aby se aktivovalo. +Vyžaduje znovu otevření režimu úprav náčrtu, aby se aktivovalo. @@ -4273,7 +4266,7 @@ Toto nastavení je pouze pro panel nástrojů. Ať už si vyberete cokoliv, vše Color of fully constrained edge color in edit mode - Barva plně zavazbených hran v editačním režimu + Barva plně zavazbených hran v režimu úprav @@ -4289,7 +4282,7 @@ Toto nastavení je pouze pro panel nástrojů. Ať už si vyberete cokoliv, vše Color of fully constrained vertex color in edit mode - Barva plně zavazbených vrcholů v editačním režimu + Barva plně zavazbených vrcholů v režimu úprav @@ -4304,12 +4297,12 @@ Toto nastavení je pouze pro panel nástrojů. Ať už si vyberete cokoliv, vše Color of fully constrained construction edge color in edit mode - Barva plně zavazbených konstrukčních hran v editačním režimu + Barva plně zavazbených konstrukčních hran v režimu úprav Color of construction geometry in edit mode - Barva konstrukční geometrie v editačním režimu + Barva konstrukční geometrie v režimu úprav @@ -4319,7 +4312,7 @@ Toto nastavení je pouze pro panel nástrojů. Ať už si vyberete cokoliv, vše Color of fully constrained internal alignment edge color in edit mode - Barva plně zavazbených hran vnitřního zarovnání v editačním režimu + Barva plně zavazbených hran vnitřního zarovnání v režimu úprav @@ -4344,7 +4337,7 @@ Toto nastavení je pouze pro panel nástrojů. Ať už si vyberete cokoliv, vše Color of fully constrained geometry in edit mode - Barva plně zavazbené geometrie v editačním režimu + Barva plně zavazbené geometrie v režimu úprav @@ -4607,14 +4600,14 @@ Výchozí nastavení: %N = %V Restore camera position after editing - Obnovit pozici kamery po úpravě + Obnovit polohu kamery po úpravě When entering edit mode, force orthographic view of camera. Works only when "Restore camera position after editing" is enabled. Při vstupu do režimu úprav vynutit ortografické zobrazení. -Funguje pouze v případě, že je povoleno "Obnovit pozici kamery po úpravě". +Funguje pouze v případě, že je povoleno "Obnovit polohu kamery po úpravě". @@ -4945,7 +4938,7 @@ Nebyly nalezeny vazby připojené k těmto koncovým bodům. Arc - oblouk + Oblouk @@ -5225,112 +5218,112 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. SketcherGui::ViewProviderSketch - + Edit sketch Upravit náčrt - + A dialog is already open in the task panel Dialog je opravdu otevřen v panelu úloh - + Do you want to close this dialog? Chcete zavřít tento dialog? - + Invalid sketch Neplatný náčrt - + Do you want to open the sketch validation tool? Chcete otevřít nástroje pro ověření náčrtu? - + The sketch is invalid and cannot be edited. Náčrt není platný a nemůže být upravován. - + Please remove the following constraint: Odstraňte, prosím, následující vazbu: - + Please remove at least one of the following constraints: Odstraňte, prosím, alespoň jednu z následujících vazeb: - + Please remove the following redundant constraint: Odstraňte, prosím, následující nadbytečnou vazbu: - + Please remove the following redundant constraints: Odstraňte, prosím, následující nadbytečné vazby: - + The following constraint is partially redundant: Toto omezení je částečně nadbytečné: - + The following constraints are partially redundant: Tato omezení jsou částečně nadbytečná: - + Please remove the following malformed constraint: Odstraňte prosím tuto poškozenou vazbu: - + Please remove the following malformed constraints: Odstraňte prosím tyto poškozené vazby: - + Empty sketch Prázdný náčrt - + Over-constrained: Převazbené: - + Malformed constraints: Poškozené vazby: - + Redundant constraints: Nadbytečné vazby: - + Partially redundant: Částečně nadbytečné: - + Solver failed to converge Řešič nezkonvergoval - + Under constrained: Nedostatečně omezené: - + %n DoF(s) %n Stupeň Volnosti(s) @@ -5341,7 +5334,7 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. - + Fully constrained Plně zavazbené @@ -5439,8 +5432,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Zadá průměr kružnice nebo oblouku @@ -5448,7 +5441,8 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Opravit poloměr/průměr kružnice nebo oblouku @@ -5456,20 +5450,12 @@ Toto se provádí analýzou geometrií a vazeb náčrtu. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Zadá poloměr kružnice nebo oblouku - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Opravit poloměr/průměr kružnice nebo oblouku - - Sketcher_Copy @@ -6085,7 +6071,7 @@ Eigen Sparse QR algoritmus je optimalizován pro řídké matrice; obvykle rychl ViewProviderSketch - + and %1 more a %1 další @@ -6308,7 +6294,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Náčrt má částečně nadbytečné vazby! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Paraboly byly migrovány. Migrované soubory se v předchozích verzích FreeCADu neotevřou!! @@ -6319,7 +6305,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. - + @@ -6344,7 +6330,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. - + @@ -6367,13 +6353,13 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Omezení má neplatné informace o indexu a je chybné. - - - - - - - + + + + + + + @@ -6384,7 +6370,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů. - + Failed to add arc Nepodařilo se přidat oblouk @@ -6498,7 +6484,7 @@ Rozteč mřížky se změní, pokud bude menší než tento počet pixelů.Přidání pole se nezdařilo - + Failed to add rounded rectangle Nepodařilo se přidat zaokrouhlený obdélník @@ -6680,18 +6666,18 @@ Body musí být k lince mřížky blíže než pětina rozteče mřížky, aby s CmdSketcherDimension - + Dimension Rozměr - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Vazba kontextově založená na vašem výběru. -V závislosti na vašem výběru můžete mít k dispozici několik typů vazby. Procházet jimi můžete pomocí klávesy SHIFT. -Levé kliknutí na prázdné místo ověří aktuální vazbu. Pravým kliknutím nebo stisknutím klávesy Esc se zruší. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6710,14 +6696,27 @@ Levé kliknutí na prázdné místo ověří aktuální vazbu. Pravým kliknutí CmdSketcherCompDimensionTools - + Dimension Rozměr - + Dimension tools. Nástroje pro rozměr. + + CmdSketcherConstrainRadius + + + Constrain radius + Vazba poloměru + + + + Fix the radius of a circle or an arc + Zadá poloměr kružnice nebo oblouku + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts index e2ea952dc9..39afaeb948 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_de.ts @@ -45,7 +45,7 @@ Show/hide B-spline control point weight - Gewicht der B-Spline-Kontrollpunkte anzeigen / ausblenden + Gewicht der B-Spline-Kontrollpunkte ein- / ausblenden @@ -122,33 +122,33 @@ Show/hide B-spline control point weight - Gewicht der B-Spline-Kontrollpunkte anzeigen / ausblenden + Gewicht der B-Spline-Kontrollpunkte ein- / ausblenden CmdSketcherCompConstrainRadDia - + Constrain arc or circle Bogen oder Kreis festlegen - + Constrain an arc or a circle Krümmung eines Kreisbogens oder Kreises festlegen - + Constrain radius Radius festlegen - + Constrain diameter Durchmesser festlegen - + Constrain auto radius/diameter Automatisch Radius oder Durchmesser festlegen @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Winkel festlegen - + Fix the angle of a line or the angle between two lines Winkel einer Linie (zur horizontalen Skizzenachse) oder Winkel zwischen zwei Linien festlegen @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Fixieren - + Block the selected edge from moving Ausgewählte Kante fixieren @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Koinzidenz festlegen - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Erstellt eine Randbedingung Koinzidenz festlegen zwischen Punkten oder eine Randbedingung Konzentrisch festlegen zwischen Kreisen, Bögen und Ellipsen @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Durchmesser festlegen - + Fix the diameter of a circle or an arc Durchmesser eines Kreises oder Kreisbogens festlegen @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Abstand festlegen - + Fix a length of a line or the distance between a line and a vertex or between two circles Legt die Länge einer Linie, den Abstand zwischen einer Linie und einem Knotenpunkt oder zwischen zwei Kreisen fest @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Horizontalen Abstand festlegen - + Fix the horizontal distance between two points or line ends Den horizontalen Abstand zwischen zwei Punkten oder Streckenenden festlegen @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Vertikalen Abstand festlegen - + Fix the vertical distance between two points or line ends Den vertikalen Abstand zwischen zwei Punkten oder Streckenenden festlegen @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Gleichheit festlegen - + Create an equality constraint between two lines or between circles and arcs Eine Gleichheitsbeschränkung zwischen zwei Linien oder zwischen Kreisen und Bögen festlegen @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Horizontal festlegen - + Create a horizontal constraint on the selected item Eine horizontale Beschränkung für das gewählte Element setzen @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Sperren - + Create both a horizontal and a vertical distance constraint on the selected vertex Erstellt gleichzeitig Randbedingungen für den horizontalen und @@ -520,12 +520,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainParallel - + Constrain parallel Parallel festlegen - + Create a parallel constraint between two lines Legt die Parallelität zweier Geraden fest @@ -533,12 +533,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainPerpendicular - + Constrain perpendicular Rechtwinklig festlegen - + Create a perpendicular constraint between two lines Erstellt eine Randbedingung, die zwei Linien rechtwinklig zueinander festlegt @@ -546,12 +546,12 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainPointOnObject - + Constrain point onto object Punkt auf Objekt festlegen - + Fix a point onto an object Punkt auf ein Objekt festlegen @@ -559,38 +559,25 @@ den vertikalen Abstand eines ausgewählten Knotens zum Ursprung CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Automatisch Radius oder Durchmesser festlegen - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Legt den Durchmesser fest, wenn ein Kreis ausgewählt wird, oder den Radius, wenn ein Kreisbogen oder Spline-Kontrollpunkt ausgewählt wird - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Radius oder Gewicht festlegen - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Legt den Radius eines Kreises oder eines Bogens fest, oder das Gewicht eines B-Spline-Kontrollpunktes - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Lichtbrechung (nach Snellius-Gesetz) festlegen - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Erstellen Sie eine Lichtbrechung (Snellius-Gesetz) als Einschränkung zwischen zwei Endpunkten der Strahlen und einer Kante als Schnittstelle. @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Symmetrie festlegen - + Create a symmetry constraint between two points with respect to a line or a third point Die Symmetrie zwischen zwei Punkten im Bezug auf eine Linie oder einen dritten Punkt festlegen @@ -613,12 +600,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Tangential festlegen - + Create a tangent constraint between two entities Legt zwei Elementen tangential zueinander fest @@ -626,12 +613,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Vertikal festlegen - + Create a vertical constraint on the selected item Eine vertikale Beschränkung für das gewählte Element setzen @@ -797,7 +784,7 @@ with respect to a line or a third point Create fillet - Abrundung erstellen + Verrundung erstellen @@ -1031,7 +1018,7 @@ with respect to a line or a third point Decrease knot multiplicity - Knoten-Multiplikation verringern + Vielfachheit eines Spline-Knotens verringern @@ -1122,7 +1109,7 @@ with respect to a line or a third point Increase knot multiplicity - Knoten-Multiplikation erhöhen + Vielfachheit eines Spline-Knotens erhöhen @@ -1489,12 +1476,12 @@ Die Eigenschaft 'Support' wird gelöscht. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Einschränkung aktivieren/deaktivieren - + Activates or deactivates the selected constraints Aktiviert oder deaktiviert die ausgewählten Einschränkungen @@ -1515,12 +1502,12 @@ Die Eigenschaft 'Support' wird gelöscht. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Einschränkung zwischen festlegend und anzeigend umschalten - + Set the toolbar, or the selected constraints, into driving or reference mode Die Symbolleiste oder die ausgewählten Einschränkungen @@ -1594,370 +1581,376 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. Command - - + + Add horizontal constraint Horizontal-Einschränkung hinzufügen - - - + + + Add horizontal alignment Horizontale Ausrichtung hinzufügen - - + + Add vertical constraint Vertikal-Einschränkung hinzufügen - + Add vertical alignment Vertikale Ausrichtung hinzufügen - + Add 'Lock' constraint Sperreinschränkung hinzufügen - + Add relative 'Lock' constraint Relative Sperreinschränkung hinzufügen - + Add fixed constraint Sperr-Einschränkung hinzufügen - + Add 'Block' constraint Fixier-Einschränkung hinzufügen - + Add block constraint Fixier-Einschränkung hinzufügen - - - + + + Add coincident constraint Übereinstimmungseinschränkung hinzufügen - - + + Add distance from horizontal axis constraint Einschränkung des Abstands zur horizontalen Achse hinzufügen - - + + Add distance from vertical axis constraint Einschränkung des Abstands zur vertikalen Achse hinzufügen - - + + Add point to point distance constraint Einschränkung des Abstands zweier Punkte hinzufügen - - - + + + Add point to line Distance constraint Einschränkung des Abstands eines Punktes zu einer Linie hinzufügen - - + + Add circle to circle distance constraint Kreisabstand hinzufügen - + Add circle to line distance constraint Abstand von Kreis zu Linie hinzufügen - - - - - - + + + + + + Add length constraint Längeneinschränkung hinzufügen - - + + + Dimension Abmessung - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Punkt-auf-Objekt-Einschränkung hinzufügen - - + + Add point to point horizontal distance constraint Einschränkung des horizontalen Abstands zweier Punkte hinzufügen - + Add fixed x-coordinate constraint Einschränkung zur Sperrung der x-Koordinate hinzufügen - - + + Add point to point vertical distance constraint Einschränkung des vertikalen Abstands zweier Punkte hinzufügen - + Add fixed y-coordinate constraint Einschränkung zur Sperrung der y-Koordinate hinzufügen - - + + Add parallel constraint Parallelitätseinschränkung hinzufügen - - - - - - - + + + + + + + Add perpendicular constraint Rechtwinkligkeitseinschränkung hinzufügen - + Add perpendicularity constraint Rechtwinkligkeitseinschränkung hinzufügen - + Swap coincident+tangency with ptp tangency Deckungsgleichheit + Berührung gegen tangentenstetigen Übergang in einem Punkt tauschen - + Swap PointOnObject+tangency with point to curve tangency Tausche Punkt auf Objekt + Tangentialität gegen Punkt zu Kurve Tangentialität - - - - - - - + + + + + + + Add tangent constraint Tangenteneinschränkung hinzufügen - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Punkt für Tangenteneinschränkung hinzufügen - - - - + + + + Add radius constraint Radius-Einschränkung hinzufügen - - - - + + + + Add diameter constraint Durchmesser-Einschränkung hinzufügen - - - - + + + + Add radiam constraint Radiam-Beschränkung hinzufügen - - - - - - + + + + + + Add angle constraint Winkeleinschränkung hinzufügen - - + + Add equality constraint Gleichheitseinschränkung hinzufügen - - - - - + + + + + Add symmetric constraint Symmetrieeinschränkung hinzufügen - + Add Snell's law constraint Einschränkung nach Snellius-Gesetz (Lichtbrechung) hinzufügen - + Toggle constraint to driving/reference Einschränkung zwischen festlegend und anzeigend umschalten - + Activate/Deactivate constraint Einschränkung aktivieren / deaktivieren @@ -2033,7 +2026,7 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. - + Add sketch arc Skizzenbogen hinzufügen @@ -2077,12 +2070,12 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. Create fillet - Verrundung erstellen + Abrundung erstellen Trim edge - Kante zuschneiden + Kante beschneiden @@ -2284,59 +2277,59 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Fehler automatische Beschränkungen: unlösbare Skizze nach dem Anwenden von gleichheits Beschränkungen. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Der Schnittpunkt der Kurven kann nicht ermittelt werden. Die Randbedingung Koinzidenz festlegen, angewendet auf die Endpunkte der Kurven, die verrundet werden sollen, kann hier helfen. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline Geometrie Index (GeoID) ist außerhalb des gültigen Bereichs. - + You are requesting no change in knot multiplicity. Sie fordern keine Änderung in der Multiplizität der Knoten. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Der bereitgestellte Geometrieindex (GeoId) ist keine B-Spline-Kurve. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Der Knotenindex ist außerhalb der Grenzen. Beachten Sie, dass der erste Knoten gemäß der OCC-Notation den Index 1 und nicht Null hat. - + The multiplicity cannot be increased beyond the degree of the B-spline. Die Vielfachheit kann nicht über den Grad des B-Splines hinaus erhöht werden. - + The multiplicity cannot be decreased beyond zero. Die Vielfachheit kann nicht über Null hinaus verringert werden. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC kann die Multiplizität innerhalb der maximalen Toleranz nicht verringern. - + Knot cannot have zero multiplicity. Ein Knoten kann nicht die Vielfachheit Null haben. - + Knot multiplicity cannot be higher than the degree of the BSpline. Die Vielfachheit kann nicht höher als der Grad des B-Splines sein. - + Knot cannot be inserted outside the BSpline parameter range. Knoten kann nicht außerhalb des BSpline-Parameterbereichs eingefügt werden. @@ -2404,134 +2397,134 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2579,329 +2572,329 @@ ungültigen Einschränkungen, degenerierten Geometrien, etc überprüfen.Maßliche Einschränkung - + Cannot add a constraint between two external geometries. Es ist nicht möglich eine Einschränkung zwischen zwei externen Geometrien hinzuzufügen. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Es ist nicht möglich, eine Randbedingung zwischen zwei unveränderlichen Geometrien hinzuzufügen. Unveränderliche Geometrien schließen externe Geometrie, fixierte Geometrie oder spezielle Punkte, wie B-Spline-Knotenpunkte, ein. - + Sketcher Constraint Substitution Beschränkung Ersetzen - + Keep notifying me of constraint substitutions Benachrichtige mich über Beschränkungssubstitutionen - - - + + + Only sketch and its support are allowed to be selected. Nur eine Skizze und deren Trägerfläche dürfen ausgewählt werden. - + One of the selected has to be on the sketch. Eins der ausgewählten muss auf der Skizze liegen. - - + + Select an edge from the sketch. Wählen Sie eine Kante aus der Skizze. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nicht erfüllbare Bedingung - - - - + + + + The selected edge is not a line segment. Die ausgewählte Kante ist kein Liniensegment. - - - - - - + + + + + + Double constraint Doppelbedingung - - - - - + + + + + The selected edge already has a horizontal constraint! Die ausgewählte Kante hat bereits eine Horizontal-Einschränkung! - - - + + + The selected edge already has a vertical constraint! Die ausgewählte Kante hat bereits eine Vertikal-Einschränkung! - - - - - - + + + + + + The selected edge already has a Block constraint! Die ausgewählte Kante hat bereits eine Fixier-Einschränkung! - + The selected item(s) can't accept a horizontal constraint! Die ausgewählten Elemente können keine Horizontal-Einschränkung annehmen! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Es ist mehr als ein Fixpunkt ausgewählt. Wähle maximal einen Fixpunkt! - + The selected item(s) can't accept a vertical constraint! Die ausgewählten Elemente können keine Vertikal-Einschränkung annehmen! - - - + + + Select vertices from the sketch. Wählen Sie Knoten aus der Skizze aus. - + Select one vertex from the sketch other than the origin. Einen Knoten aus der Skizze auswählen, nur nicht den Ursprung. - + Select only vertices from the sketch. The last selected vertex may be the origin. Nur Knoten aus der Skizze auswählen. Der letzte gewählte Knoten darf der Ursprung sein. - + Wrong solver status Falscher Solver Status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Eine Fixier-Einschränkung kann nicht hinzugefügt werden, solange die Skizze nicht berechnet (gelöst) ist oder redundante und / oder widersprüchliche Einschränkungen enthält. - + Select one edge from the sketch. Wähle eine Kante aus der Skizze aus. - + Select only edges from the sketch. Wähle nur Kanten aus der Skizze aus. - + Number of selected objects is not 3 Die Anzahl der ausgewählten Objekte ist nicht 3 - + Error Fehler - + Unexpected error. More information may be available in the Report View. Unerwarteter Fehler. Das Ausgabefenster könnte weitere Informationen enthalten. - + Endpoint to endpoint tangency was applied instead. Die Endpunkt zu Endpunkt Tangente wurde stattdessen angewendet. - + Select two or more points from the sketch. Wählen Sie aus der Skizze zwei oder mehr Punkte aus. - + Select two or more vertices from the sketch. Zwei oder mehr Knotenpunkte aus der Skizze auswählen. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wähle zwei oder mehr Knotenpunkte aus der Skizze für eine Übereinstimmungseinschränkung, oder zwei oder mehr Kreise, Ellipsen, Bögen oder Ellipsenbögen für einen konzentrischen Zwang. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wähle zwei Knotenpunkte aus der Skizze für eine Übereinstimmunseinschränkung aus, oder zwei Kreise, Ellipsen, Bögen oder Ellipsenbögen für einen konzentrischen Zwang. - + Select exactly one line or one point and one line or two points from the sketch. Wählen Sie genau eine Linie oder einen Punkt und eine Linie oder zwei Punkte aus der Skizze aus. - + Cannot add a length constraint on an axis! Keine Längenbeschränkung einer Achse möglich! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Wählen Sie genau eine Linie oder einen Punkt und eine Linie oder zwei Punkte oder zwei Kreise aus der Skizze aus. - + This constraint does not make sense for non-linear curves. Diese Randbedingung ist für nichtlineare Kurven nicht sinnvoll. - + Endpoint to edge tangency was applied instead. Die Endpunkt zu Kante Tangente wurde stattdessen angewendet. - - - - - - - + + + + + + + Select the right things from the sketch. Wähle die richtigen Dinge aus der Skizze. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Eine Kante auswählen, die kein B-Spline-Gewicht darstellt. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Keiner der ausgewählten Punkte wurde auf die jeweiligen Kurven beschränkt, da sie Teile desselben Elements sind, weil beide externe Geometrien sind oder weil die Kante nicht geeignet ist. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Keiner der gewählten Punkte wurde beschränkt auf die zugehörigen Kurven. Sie sind entweder Bestandteil des gleichen Elements oder Sie sind beide Externe Geometrie. - - - - + + + + Select exactly one line or up to two points from the sketch. Wählen Sie genau eine Linie oder bis zu zwei Punkte aus der Skizze aus. - + Cannot add a horizontal length constraint on an axis! Keine horizontale Längenbeschränkung einer Achse möglich! - + Cannot add a fixed x-coordinate constraint on the origin point! Eine feste x-Einschränkung auf den Ursprung kann nicht hinzugefügt werden! - - + + This constraint only makes sense on a line segment or a pair of points. Diese Randbedingung ist nur für ein Liniensegment oder ein Punktepaar sinnvoll. - + Cannot add a vertical length constraint on an axis! Keine vertikale Längenbeschränkung einer Achse möglich! - + Cannot add a fixed y-coordinate constraint on the origin point! Eine feste y-Einschränkung auf den Ursprung kann nicht hinzugefügt werden! - + Select two or more lines from the sketch. Wählen Sie zwei oder mehr Linien aus der Skizze aus. - - + + Select at least two lines from the sketch. Wählen Sie mindestens zwei Linien aus der Skizze aus. - + Select a valid line. Eine gültige Linie auswählen. - - + + The selected edge is not a valid line. Die ausgewählte Kante ist keine gültige Linie. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2904,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Erlaubte Kombinationen: zwei Kurven; einen Endpunkt und eine Kurve; zwei Endpunkte; zwei Kurven und einen Punkt. - + Select some geometry from the sketch. perpendicular constraint Geometrie aus der Skizze auswählen. - - + + Cannot add a perpendicularity constraint at an unconnected point! Eine Rechtwinkligkeitsbedingung kann nicht zu einem unverbundenen Punkt hinzugefügt werden! - - - + + + Perpendicular to B-spline edge currently unsupported. Senkrecht zur B-Spline-Kante wird derzeit nicht unterstützt. - - + + One of the selected edges should be a line. Eine der ausgewählten Kanten sollte eine Gerade sein. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Eine Endpunkt-zu-Endpunkt-Tangente wurde angelegt. Die Koinzidenz-Einschränkung wurde gelöscht. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Die Endpunkt zu Kante Tangente wurde stattdessen angewendet. Die Punkt auf Objekt Beschränkung wurde gelöscht. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,182 +2949,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Akzeptierte Kombinationen: zwei Kurven; Ein Endpunkt und eine Kurve; Zwei Endpunkte; Zwei Kurven und ein Punkt. - + Select some geometry from the sketch. tangent constraint Geometrie aus der Skizze auswählen. - - - + + + Cannot add a tangency constraint at an unconnected point! Eine Tangentialrandbedingung kann nicht zu einem unverbundenen Punkt hinzugefügt werden! - - + + Tangent constraint at B-spline knot is only supported with lines! Randbedingung Tangential festlegen wird am B-Spline-Knoten wird nur mit Linien unterstützt! - + B-spline knot to endpoint tangency was applied instead. Eine B-Spline-Knoten zu Endpunkt Tangente wurde stattdessen festgelegt. - + Select either one point and several curves, or one curve and several points. Wählen Sie entweder einen Punkt und mehrere Kurven oder eine Kurve und mehrere Punkte. - - + + Wrong number of selected objects! Falsche Anzahl von ausgewählten Objekten! - - + + With 3 objects, there must be 2 curves and 1 point. Bei 3 Objekten müssen diese aus 2 Kurven und 1 Punkt bestehen. - - - + + + Tangency to B-spline edge currently unsupported. Tangentiale zu B-Spline Rand wird derzeit nicht unterstützt. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Wählen Sie eine oder mehrere Bögen oder Kreise aus der Skizze. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Entweder nur einen oder mehrere B-Spline-Kontrollpunkte auswählen oder nur einen oder mehrere Bögen oder Kreise aus der Skizze auswählen, aber nicht gemischt. - - - + + + Constraint only applies to arcs or circles. Einschränkung gilt nur für Bögen oder Kreise. - - + + Select one or two lines from the sketch. Or select two edges and a point. Wählen Sie eine oder zwei Linien aus der Skizze. Oder wählen Sie zwei Kanten und einen Punkt. - - + + Parallel lines Parallele Linien - - + + An angle constraint cannot be set for two parallel lines. Es ist nicht möglich eine Winkel-Einschränkung für zwei parallele Linien festzulegen. - + Cannot add an angle constraint on an axis! Winkelbeschränkung einer Achse nicht möglich! - + Select two edges from the sketch. Wählen Sie zwei Kanten aus der Skizze aus. - + Select two or more compatible edges. Wählen Sie zwei oder mehr kompatible Kanten aus. - + Sketch axes cannot be used in equality constraints. Skizzenachsen können nicht mit der Randbedingung Gleichheit festlegen eingesetzt werden. - + Equality for B-spline edge currently unsupported. Gleichheit für B-Spline Rand wird derzeit nicht unterstützt. - - - - + + + + Select two or more edges of similar type. Zwei oder mehr gleichartige Kanten auswählen. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Wählen Sie zwei Punkte und eine Symmetrielinie, zwei Punkte und einen Symmetriepunkt oder eine Linie und einen Symmetriepunkt von der Skizze. - - + + Cannot add a symmetry constraint between a line and its end points. Es ist nicht möglich eine Symmetrieeinschränkung zwischen einer Linie und ihren Endpunkten hinzuzufügen. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Es ist nicht möglich eine Symmetrieeinschränkung zwischen einer Linie und ihren Endpunkten hinzuzufügen! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Endpunkte zweier Linien, die als Strahlen dienen sollen, und eine Kante, die eine Grenze darstellt, auswählen. Der erste gewählte Punkt entspricht dem Index n1, der zweite dem Index n2 und der Eigabewert legt das Verhältnis n2/n1 fest. - + Selected objects are not just geometry from one sketch. Ausgewählte Objekte sind nicht nur Geometrie aus einer einzigen Skizze. - + Cannot create constraint with external geometry only. Es ist nicht möglich eine Einschränkung zu erstellen, die nur auf externen Geometrien basiert. - + Incompatible geometry is selected. Es wurde unpassende Geometrie ausgewählt. - + SnellsLaw on B-spline edge is currently unsupported. Brechung nach Snellius-Gesetz an B-Spline-Kanten wird derzeit nicht unterstützt. - - - - - + + + + + Select constraints from the sketch. Einschränkungen aus der Skizze auswählen. @@ -3630,12 +3623,12 @@ Akzeptierte Kombinationen: zwei Kurven; Ein Endpunkt und eine Kurve; Zwei Endpun Länge: - + Refractive index ratio Brechungsindex-Verhältnis - + Ratio n2/n1: Verhältnis n2/n1: @@ -5223,112 +5216,112 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. SketcherGui::ViewProviderSketch - + Edit sketch Skizze bearbeiten - + A dialog is already open in the task panel Ein Dialog im Arbeitspanel ist bereits geöffnet - + Do you want to close this dialog? Möchten Sie dieses Dialogfeld schließen? - + Invalid sketch Ungültige Skizze - + Do you want to open the sketch validation tool? Soll das Werkzeug zum Überprüfen der Skizze geöffnet werden? - + The sketch is invalid and cannot be edited. Die Skizze ist ungültig und kann nicht bearbeitet werden. - + Please remove the following constraint: Bitte folgende Beschränkung entfernen: - + Please remove at least one of the following constraints: Bitte mindestens eine der folgenden Beschränkungen entfernen: - + Please remove the following redundant constraint: Bitte folgende redundante Beschränkung entfernen: - + Please remove the following redundant constraints: Bitte folgende, redundante Beschränkungen entfernen: - + The following constraint is partially redundant: Die folgende Randbedingung ist teilweise überflüssig: - + The following constraints are partially redundant: Die folgenden Randbedingungen sind teilweise überflüssig: - + Please remove the following malformed constraint: Bitte folgende fehlerhafte Beschränkung entfernen: - + Please remove the following malformed constraints: Bitte folgende fehlerhafte Beschränkung entfernen: - + Empty sketch Leere Skizze - + Over-constrained: Überbestimmt: - + Malformed constraints: Fehlerhafte Beschränkungen: - + Redundant constraints: Überflüssige Randbedingungen: - + Partially redundant: Teilweise redundant: - + Solver failed to converge Löser konnte nicht konvergieren - + Under constrained: Unterbestimmt: - + %n DoF(s) %n Freiheitsgrad @@ -5336,7 +5329,7 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. - + Fully constrained Vollständig bestimmt @@ -5434,8 +5427,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Durchmesser eines Kreises oder Kreisbogens festlegen @@ -5443,7 +5436,8 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Legt den Radius eines Kreisbogens oder den Durchmesser eines Kreises fest @@ -5451,20 +5445,12 @@ Dies erfolgt durch Analyse der Skizzengeometrien und Randbedingungen. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Radius eines Kreises oder Kreisbogens festlegen - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Legt den Radius eines Kreisbogens oder den Durchmesser eines Kreises fest - - Sketcher_Copy @@ -6079,7 +6065,7 @@ Eigen Sparse QR ein Algorithmus, der für dünn besetzte Matrizen optimiert ist; ViewProviderSketch - + and %1 more und %1 mehr @@ -6302,7 +6288,7 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Die Skizze enthält teilweise redundante Randbedingungen! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabeln wurden intern umstrukturiert. Solche Dateien lassen sich mit früheren Versionen von FreeCAD nicht mehr öffnen!! @@ -6313,7 +6299,7 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< - + @@ -6338,12 +6324,12 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< - + Error - Fehler + Fehlermeldungen @@ -6361,13 +6347,13 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Die Randbedingng hat eine ungültige Indexierung und ist fehlerhaft. - - - - - - - + + + + + + + @@ -6378,7 +6364,7 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< - + Failed to add arc Fehler beim Hinzufügen des Bogens @@ -6492,7 +6478,7 @@ Die Rasterweite ändert sich, wenn er kleiner als diese Anzahl von Pixeln wird.< Fehler beim Hinzufügen des Feldes - + Failed to add rounded rectangle Fehler beim Hinzufügen des abgerundeten Rechtecks @@ -6674,18 +6660,18 @@ Punkte müssen näher als ein Fünftel der Rasterweite an eine Rasterlinie geset CmdSketcherDimension - + Dimension - Abmessung + Maßeintrag - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Kontextabhängige Randbedingung, basierend auf der aktuellen Auswahl. -Abhängig von der Auswahl stehen möglicherweise mehrere Randbedingungen zur Verfügung. Diese können mit der Umschalttaste (SHIFT-key) gewechselt werden. -Ein Linksklick auf einen leeren Bereich, bestätigt die aktuell vorausgewählte Randbedingung. Ein Rechtsklick oder das Drücken von Esc bricht die Ausführung ab. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6704,14 +6690,27 @@ Ein Linksklick auf einen leeren Bereich, bestätigt die aktuell vorausgewählte CmdSketcherCompDimensionTools - + Dimension - Maßeintrag + Abmessung - + Dimension tools. Werkzeuge für Maßeinträge. + + CmdSketcherConstrainRadius + + + Constrain radius + Radius festlegen + + + + Fix the radius of a circle or an arc + Radius eines Kreises oder Kreisbogens festlegen + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts index d885358eb9..e603a530b9 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_el.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Περιορισμός τόξου ή κύκλου - + Constrain an arc or a circle Περιόρισε ένα τόξο ή έναν κύκλο - + Constrain radius Περιορισμός ακτίνας - + Constrain diameter Περιορισμός διαμέτρου - + Constrain auto radius/diameter Περιορισμός αυτόματης ακτίνας/διαμέτρου @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Περιορισμός γωνίας - + Fix the angle of a line or the angle between two lines Καθορισμός της γωνίας μιας γραμμής ή της γωνίας μεταξύ δύο γραμμών @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Περιορισμός Κλειδώματος - + Block the selected edge from moving Αποκλεισμός της επιλεγμένης ακμής από την κίνηση @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Περιορισμός ταύτισης - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Δημιουργία ενός περιορισμού σύμπτωσης μεταξύ σημείων ή ενός ομόκεντρου περιορισμού μεταξύ κύκλων, τόξων και ελλείψεων @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Περιορισμός διαμέτρου - + Fix the diameter of a circle or an arc Όρισε τη σταθερή διάμετρο ενός κύκλου, ή ενός τόξου @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Περιορισμός απόστασης - + Fix a length of a line or the distance between a line and a vertex or between two circles Καθορίστε ένα μήκος μιας γραμμής ή την απόσταση μεταξύ μιας γραμμής και μιας κορυφής ή μεταξύ δύο κύκλων @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Καθορισμός της οριζόντιας απόστασης μεταξύ δύο σημείων ή μεταξύ τελικών σημείων γραμμών @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Καθορισμός της κατακόρυφης απόστασης μεταξύ δύο σημείων ή μεταξύ τελικών σημείων γραμμών @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Περιορισμός ισότητας - + Create an equality constraint between two lines or between circles and arcs Δημιουργία ενός περιορισμού ισότητας μεταξύ δύο γραμμών ή μεταξύ κύκλων και τόξων @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Περιορισμός κατά την οριζόντια διεύθυνση - + Create a horizontal constraint on the selected item Δημιουργία ενός οριζόντιου περιορισμού για το επιλεγμένο αντικείμενο @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Περιορισμός κλειδώματος - + Create both a horizontal and a vertical distance constraint on the selected vertex Δημιουργήστε τόσο οριζόντιο όσο και κατακόρυφο περιορισμό απόστασης @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Περιορισμός παραλληλίας - + Create a parallel constraint between two lines Δημιουργήστε έναν περιορισμό παραλληλίας μεταξύ δύο γραμμών @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Περιορισμός καθετότητας - + Create a perpendicular constraint between two lines Δημιουργία ενός περιορισμού καθετότητας μεταξύ δύο γραμμών @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Περιορισμός θέσης σημείου σε αντικείμενο - + Fix a point onto an object Καθορισμός της θέσης ενός σημείου σε ένα αντικείμενο @@ -559,39 +559,26 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Περιορισμός αυτόματης ακτίνας/διαμέτρου - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Διορθώστε τη διάμετρο, εάν επιλέξεται κύκλο, ή την ακτίνα ενός τόξου/σπιράλ - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Constrain radius or weight - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Διορθώστε την ακτίνα ενός κύκλου ή ενός τόξου ή διορθώστε το βάρος ενός πόλου ενός B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -601,12 +588,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Περιορισμός συμμετρίας - + Create a symmetry constraint between two points with respect to a line or a third point Δημιουργία περιορισμού συμμετρίας μεταξύ δύο σημείων ως προς μια γραμμή ή ένα τρίτο σημείο @@ -615,12 +602,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Περιορισμός εφαπτομένης - + Create a tangent constraint between two entities Δημιουργία ενός περιορισμού επαφής μεταξύ δύο οντοτήτων @@ -628,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Περιορισμός κατά την κατακόρυφη διεύθυνση - + Create a vertical constraint on the selected item Δημιουργία ενός κατακόρυφου περιορισμού στο επιλεγμένο αντικείμενο @@ -1490,12 +1477,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Ενεργοποιεί ή Απενεργοποιεί την κατάσταση λειτουργίας επεξεργασίας του επιλεγμένου αντικείμενου @@ -1516,12 +1503,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1594,370 +1581,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Προσθήκη οριζόντιου περιορισμού - - - + + + Add horizontal alignment Προσθήκη οριζόντιας ευθυγράμμισης - - + + Add vertical constraint Προσθήκη κάθετου περιορισμού - + Add vertical alignment Προσθήκη κάθετης ευθυγράμμισης - + Add 'Lock' constraint Προσθήκη περιορισμού "Κλειδώματος" - + Add relative 'Lock' constraint Προσθήκη σχετικού περιορισμού "Κλειδώματος" - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Προσθήκη περιορισμού 'Κλειδώματος' - + Add block constraint Προσθήκη περιορισμού kλειδώματος - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from vertical axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Add length constraint - - + + + Dimension Διάσταση - + Add lock constraint Προσθήκη περιορισμού κλειδώματος - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Προσθήκη περιορισμού "Κλειδώματος" - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Προσθήκη κάθετου περιορισμού - + Add perpendicularity constraint Προσθήκη περιορισμού καθετότητας - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Προσθήκη περιορισμού διαμέτρου - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Προσθήκη περιορισμού νόμου Snell - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2033,7 +2026,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Προσθήκη τόξου @@ -2284,60 +2277,60 @@ invalid constraints, degenerated geometry, etc. Σφάλμα αυτόματου περιορισμού: Άλυτο σχέδιο μετά την εφαρμογή περιορισμών ισότητας. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Δεν είναι δυνατή η εύρεση τομής καμπυλών. Προσπαθήστε να προσθέσετε τον περιορισμό ταύτισης μεταξύ κορυφών των καμπυλών που σκοπεύετε να συμπληρώσετε. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline Geometry Index (GeoID) is out of bounds. - + You are requesting no change in knot multiplicity. Δεν απαιτείτε καμία αλλαγή της πολλαπλότητας κόμβου. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. The Geometry Index (GeoId) provided is not a B-spline curve. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Ο δείκτης κόμβου είναι εκτός ορίων. Σημειώστε πως σύμφωνα με το σύστημα σημειογραφίας του OCC, ο πρώτος κόμβος έχει δείκτη 1 και όχι μηδέν. - + The multiplicity cannot be increased beyond the degree of the B-spline. The multiplicity cannot be increased beyond the degree of the B-spline. - + The multiplicity cannot be decreased beyond zero. Η πολλαπλότητα δεν δύναται να είναι χαμηλότερη από το μηδέν. - + OCC is unable to decrease the multiplicity within the maximum tolerance. To ΟCC αδυνατεί να μειώσει την πολλαπλότητα εντός των ορίων μέγιστης ανοχής. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2405,134 +2398,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ invalid constraints, degenerated geometry, etc. Περιορισμός διαστάσεων - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Δεν είναι δυνατή η προσθήκη περιορισμού μεταξύ δύο σταθερών γεωμετριών. Οι σταθερές γεωμετρίες περιλαμβάνουν εξωτερική γεωμετρία, φραγμένη γεωμετρία, και ειδικά σημεία όπως σημεία κόμβων καμπύλης B-spline. - + Sketcher Constraint Substitution Αντικατάσταση περιορισμού Σχεδιασμού - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Επιτρέπεται η επιλογή μόνο του σχεδίου και της υποστήριξής του. - + One of the selected has to be on the sketch. Ένα από τα επιλεγμένα πρέπει να βρίσκεται στο σχέδιο. - - + + Select an edge from the sketch. Επιλέξτε μια ακμή από το σχέδιο. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Αδύνατος περιορισμός - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Διπλός περιορισμός - - - - - + + + + + The selected edge already has a horizontal constraint! The selected edge already has a horizontal constraint! - - - + + + The selected edge already has a vertical constraint! The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! Η επιλεγμένη ακμή έχει ήδη έναν περιορισμό! - + The selected item(s) can't accept a horizontal constraint! Το επιλεγμένο αντικείμενο(α) δεν μπορεί να δεχτεί οριζόντιο περιορισμό! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Υπάρχουν περισσότερα από ένα σταθερά σημεία επιλεγμένα. Επιλέξτε το πολύ ένα σταθερό σημείο! - + The selected item(s) can't accept a vertical constraint! Το επιλεγμένα αντικείμενο(α) δεν μπορεί να δεχτεί κατακόρυφο περιορισμό! - - - + + + Select vertices from the sketch. Επιλέξτε κορυφές από το σχέδιο. - + Select one vertex from the sketch other than the origin. Επιλέξτε μια κορυφή από το σκαρίφημα εκτός από το σημείο τομής των αξόνων. - + Select only vertices from the sketch. The last selected vertex may be the origin. Επιλέξτε μόνο τις κορυφές από το σχέδιο. Η τελευταία επιλεγμένη κορυφή δύναται να είναι το σημείο τομής των αξόνων. - + Wrong solver status Λάθος κατάσταση επιλυτή - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Δεν μπορεί να προστεθεί περιορισμός εάν το σχέδιο δεν έχει επιλυθεί ή υπάρχουν περιττοί και αντικρουόμενοι περιορισμοί. - + Select one edge from the sketch. Επιλέξτε μια ακμή από το σχέδιο. - + Select only edges from the sketch. Επιλέξτε μόνο ακμές από το σχέδιο. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Σφάλμα - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Εφαρμόστηκε περιορισμός επαφής μεταξύ άκρων εναλλακτικά. - + Select two or more points from the sketch. Επιλέξτε δύο ή περισσότερα σημεία από το σχέδιο. - + Select two or more vertices from the sketch. Επιλέξτε δύο ή περισσότερες κορυφές από το σχέδιο. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Επιλέξτε ακριβώς μια γραμμή ή ένα σημείο και μια γραμμή ή δύο σημεία από το σχέδιο. - + Cannot add a length constraint on an axis! Αδύνατη η προσθήκη περιορισμού μήκους σε άξονα! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Επιλέξτε τα κατάλληλα στοιχεία από το σχέδιο. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Κανένα από τα επιλεγμένα σημεία δεν ήταν περιορισμένο πάνω στις αντίστοιχες καμπύλες, είτε επειδή είναι τμήματα του ίδιου στοιχείου, είτε επειδή ανήκουν και τα δύο στο ίδιο στοιχείο εξωτερικής γεωμετρίας. - - - - + + + + Select exactly one line or up to two points from the sketch. Επιλέξτε ακριβώς μια γραμμή ή έως και δύο σημεία από το σχέδιο. - + Cannot add a horizontal length constraint on an axis! Αδύνατη η προσθήκη περιορισμού οριζόντιου μήκους σε άξονα! - + Cannot add a fixed x-coordinate constraint on the origin point! Αδυναμία προσθήκης σταθερού περιορισμού συντεταγμένων x στο σημείο αρχής! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Αδύνατη η προσθήκη κατακόρυφου μήκους σε άξονα! - + Cannot add a fixed y-coordinate constraint on the origin point! Δεν είναι δυνατή η προσθήκη ενός σταθερού περιορισμού συντεταγμένων y στο σημείο αρχής! - + Select two or more lines from the sketch. Επιλέξτε δύο ή περισσότερες γραμμές από το σχέδιο. - - + + Select at least two lines from the sketch. Επιλέξτε τουλάχιστον δύο γραμμές από το σχέδιο. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Αποδεκτοί συνδυασμοί: δύο καμπύλες· ένα αρχικό σημείο και μια καμπύλη· ένα αρχικό και ένα τελικό σημείο· δύο καμπύλες και ένα σημείο. - + Select some geometry from the sketch. perpendicular constraint Επιλέξτε γεωμετρικά στοιχεία από το σχέδιο. - - + + Cannot add a perpendicularity constraint at an unconnected point! Αδύνατη η προσθήκη περιορισμού καθετότητας σε ένα ασύνδετο σημείο! - - - + + + Perpendicular to B-spline edge currently unsupported. Δεν υποστηρίζονται περιορισμοί καθετότητας σε ακμές καμπύλης B-spline επί του παρόντος. - - + + One of the selected edges should be a line. Μια από τις επιλεγμένες ακμές θα πρέπει να είναι γραμμή. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Εφαρμόστηκε περιορισμός επαφής μεταξύ άκρων. Ο περιορισμός ταύτισης διαγράφηκε. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Αποδεκτοί συνδυασμοί: δύο καμπύλες· ένα αρχικό σημείο και μια καμπύλη· ένα αρχικό και ένα τελικό σημείο· δύο καμπύλες και ένα σημείο. - + Select some geometry from the sketch. tangent constraint Επιλέξτε γεωμετρικά στοιχεία από το σχέδιο. - - - + + + Cannot add a tangency constraint at an unconnected point! Αδύνατη η προσθήκη περιορισμού επαφής σε ένα ασύνδετο σημείο! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Λάθος αριθμός επιλεγμένων αντικειμένων! - - + + With 3 objects, there must be 2 curves and 1 point. Με 3 αντικείμενα, πρέπει να υπάρχουν 2 καμπύλες και 1 σημείο. - - - + + + Tangency to B-spline edge currently unsupported. Δεν υποστηρίζονται περιορισμοί επαφής σε ακμές καμπύλης B-spline επί του παρόντος. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Επιλέξτε ένα ή περισσότερα τόξα ή κύκλους από το σχέδιο. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Επιλέξτε έναν ή περισσότερους πόλους B-Spline είτε ένα ή περισσότερα τόξα ή κύκλους από το σχέδιο, αλλά όχι ανάμεικτα. - - - + + + Constraint only applies to arcs or circles. Ο περιορισμός εφαρμόζεται μόνο σε τόξα ή κύκλους. - - + + Select one or two lines from the sketch. Or select two edges and a point. Επιλέξτε μια ή δύο γραμμές από το σχέδιο. Ή επιλέξτε δύο ακμές και ένα σημείο. - - + + Parallel lines Παράλληλες γραμμές - - + + An angle constraint cannot be set for two parallel lines. Δεν δύναται να οριστεί γωνιακός περιορισμός για δύο παράλληλες γραμμές. - + Cannot add an angle constraint on an axis! Αδύνατη η προσθήκη γωνιακού περιορισμού σε άξονα! - + Select two edges from the sketch. Επιλέξτε δύο ακμές από το σχέδιο. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Οι άξονες σχεδίου δεν μπορούν να χρησιμοποιηθούν για περιορισμούς ισότητας. - + Equality for B-spline edge currently unsupported. Δεν υποστηρίζονται περιορισμοί ισότητας σε ακμές καμπύλης B-spline επί του παρόντος. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Επιλέξτε δύο σημεία και μια γραμμή συμμετρίας, δύο σημεία και ένα σημείο συμμετρίας ή μια γραμμή και ένα σημείο συμμετρίας από το σχέδιο. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Αδύνατη η προσθήκη περιορισμού μεταξύ μιας γραμμής και του αρχικού ή του τελικού της σημείου! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Τα επιλεγμένα στοιχεία δεν είναι μόνο γεωμετρικά στοιχεία από το ίδιο σκαρίφημα. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Επιλέξτε τους περιορισμούς από το σχέδιο. @@ -3631,12 +3624,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Μήκος: - + Refractive index ratio Δείκτης διάθλασης - + Ratio n2/n1: Λόγος n2/n1: @@ -5225,112 +5218,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Επεξεργασία σκίτσου - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch Μη έγκυρο σχέδιο - + Do you want to open the sketch validation tool? Θέλετε να ανοίξετε το εργαλείο επικύρωσης σχεδίων; - + The sketch is invalid and cannot be edited. Το σχέδιο είναι μη έγκυρο και δε δύναται να υποστεί επεξεργασία. - + Please remove the following constraint: Παρακαλώ αφαιρέστε τον παρακάτω περιορισμό: - + Please remove at least one of the following constraints: Παρακαλώ αφαιρέστε τουλάχιστον έναν από τους παρακάτω περιορισμούς: - + Please remove the following redundant constraint: Παρακαλώ αφαιρέστε τον παρακάτω περιττό περιορισμό: - + Please remove the following redundant constraints: Παρακαλώ αφαιρέστε τους παρακάτω περιττούς περιορισμούς: - + The following constraint is partially redundant: Ο ακόλουθος περιορισμός είναι εν μέρει περιττός: - + The following constraints are partially redundant: Οι ακόλουθοι περιορισμοί είναι εν μέρει περιττοί: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch Κενό σχέδιο - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Περιττοί περιορισμοί: - + Partially redundant: Εν μέρει περιττό: - + Solver failed to converge Solver failed to converge - + Under constrained: Υπό περιορισμούς: - + %n DoF(s) %n DoF(s) @@ -5338,7 +5331,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fully constrained @@ -5436,8 +5429,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Όρισε τη σταθερή διάμετρο ενός κύκλου, ή ενός τόξου @@ -5445,7 +5438,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Καθορισμός της ακτίνας/διαμέτρου ενός κύκλου ή ενός τόξου @@ -5453,20 +5447,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Καθορισμός της ακτίνας ενός κύκλου ή ενός τόξου - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Καθορισμός της ακτίνας/διαμέτρου ενός κύκλου ή ενός τόξου - - Sketcher_Copy @@ -6083,7 +6069,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more and %1 more @@ -6306,7 +6292,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6317,7 +6303,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6342,7 +6328,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6365,13 +6351,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6382,7 +6368,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6496,7 +6482,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6678,17 +6664,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Διάσταση - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6708,14 +6694,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Διάσταση - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Περιορισμός ακτίνας + + + + Fix the radius of a circle or an arc + Καθορισμός της ακτίνας ενός κύκλου ή ενός τόξου + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts index b3f5a8e61f..9edae3c31a 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-AR.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir arco o circunferencia - + Constrain an arc or a circle Restringe un arco o una circunferencia - + Constrain radius Restringir radio - + Constrain diameter Restringir diámetro - + Constrain auto radius/diameter Restricción automática de radio/diámetro @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restringir ángulo - + Fix the angle of a line or the angle between two lines Fija el ángulo de una línea o el ángulo entre dos líneas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restricción en bloque - + Block the selected edge from moving Bloquea el movimiento del borde seleccionado @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restringir coincidencia - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea una restricción coincidente entre puntos, o una restricción concéntrica entre círculos, arcos y elipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir diámetro - + Fix the diameter of a circle or an arc Fija el diámetro de una circunferencia o un arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restringir distancia - + Fix a length of a line or the distance between a line and a vertex or between two circles Fija una longitud de una línea o la distancia entre una línea y un vértice o entre dos círculos @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Restricción de distancia horizontal - + Fix the horizontal distance between two points or line ends Fija la distancia horizontal entre dos puntos o extremos de línea @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restricción de distancia vertical - + Fix the vertical distance between two points or line ends Fija la distancia vertical entre dos puntos o extremos de línea @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restringir igualdad - + Create an equality constraint between two lines or between circles and arcs Crea una restricción de igualdad entre dos líneas o entre circunferencias y arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Crea una restricción horizontal en el elemento seleccionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restringir bloqueo - + Create both a horizontal and a vertical distance constraint on the selected vertex Crea una restricción de distancia horizontal y vertical @@ -520,12 +520,12 @@ en el vértice seleccionado CmdSketcherConstrainParallel - + Constrain parallel Restringir paralela - + Create a parallel constraint between two lines Crea una restricción paralela entre dos líneas @@ -533,12 +533,12 @@ en el vértice seleccionado CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restringir perpendicular - + Create a perpendicular constraint between two lines Crea una restricción perpendicular entre dos líneas @@ -546,12 +546,12 @@ en el vértice seleccionado CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir el punto al objeto - + Fix a point onto an object Fija un punto en un objeto @@ -559,38 +559,25 @@ en el vértice seleccionado CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restricción automática de radio/diámetro - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Corrija el diámetro si se elige un círculo, o el radio si se elige un polo arco/curva - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Restringir radio o peso - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fija el radio de una circunferencia o un arco o corrige el peso del polo de una B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Restricción de refracción (Ley de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crea una restricción de ley de refracción (ley de Snell) entre dos extremos de los rayos @@ -600,12 +587,12 @@ y un borde como interfaz. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restringir simetría - + Create a symmetry constraint between two points with respect to a line or a third point Crea una restricción de simetría entre dos puntos @@ -615,12 +602,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainTangent - + Constrain tangent Restringir tangente - + Create a tangent constraint between two entities Crea una restricción tangente entre dos entidades @@ -628,12 +615,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Crea una restricción vertical en el elemento seleccionado @@ -1491,12 +1478,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activar/desactivar restricción - + Activates or deactivates the selected constraints Activa o desactiva las restricciones seleccionadas @@ -1517,12 +1504,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Alterna las restricciones entre operativas o de referencia - + Set the toolbar, or the selected constraints, into driving or reference mode Fija la barra de herramientas, o las restricciones seleccionadas, @@ -1596,370 +1583,376 @@ restricciones inválidas, geometrías degeneradas, etc. Command - - + + Add horizontal constraint Añadir restricción horizontal - - - + + + Add horizontal alignment Añadir alineación horizontal - - + + Add vertical constraint Añadir restricción vertical - + Add vertical alignment Añadir alineación vertical - + Add 'Lock' constraint Añadir restricción 'Bloquear' - + Add relative 'Lock' constraint Agregar restricción relativa 'Bloquear' - + Add fixed constraint Añadir restricción fija - + Add 'Block' constraint Añadir restricción 'Bloqueo' - + Add block constraint Añadir restricción de bloqueo - - - + + + Add coincident constraint Añadir restricción coincidente - - + + Add distance from horizontal axis constraint Añadir distancia desde la restricción del eje horizontal - - + + Add distance from vertical axis constraint Añadir distancia desde la restricción del eje vertical - - + + Add point to point distance constraint Añadir punto a restricción de distancia de punto - - - + + + Add point to line Distance constraint Añadir punto a restricción de Distancia de Línea - - + + Add circle to circle distance constraint Agrega un círculo a la restricción de distancia circular - + Add circle to line distance constraint Agrega un círculo a la restricción de distancia de línea - - - - - - + + + + + + Add length constraint Añadir restricción de longitud - - + + + Dimension Cota - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint - Add Symmetry constraint + Añadir restricción de simetría - - + + Add Symmetry constraints - Add Symmetry constraints + Añadir restricciones de simetría - - + + Add Distance constraints - Add Distance constraints + Añadir restricciones de distancia - + Add Horizontal constraint - Add Horizontal constraint + Añadir restricción de horizontalidad - + Add Vertical constraint - Add Vertical constraint + Añadir restricción de verticalidad - + Add Block constraint - Add Block constraint + Añadir restricción de bloqueo - + Add Angle constraint - Add Angle constraint + Añadir restricción de ángulo - - - - + + + + Add Equality constraint - Add Equality constraint + Añadir restricción de igualdad - + Add Equality constraints - Add Equality constraints + Añadir restricciones de igualdad - + Add Radius constraint - Add Radius constraint + Añadir restricción de radio - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint - Add concentric and length constraint + Añadir restricción de concentricidad y longitud - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Añadir punto a la restricción del objeto - - + + Add point to point horizontal distance constraint Añadir punto a la restricción de distancia horizontal del punto - + Add fixed x-coordinate constraint Añadir restricción de coordenada-x fija - - + + Add point to point vertical distance constraint Añadir punto a la restricción de distancia vertical del punto - + Add fixed y-coordinate constraint Añadir restricción de coordenada-y fija - - + + Add parallel constraint Añadir restricción paralela - - - - - - - + + + + + + + Add perpendicular constraint Añadir restricción perpendicular - + Add perpendicularity constraint Añadir restricción de perpendicularidad - + Swap coincident+tangency with ptp tangency Intercambia coincidencia + tangencia con la tangencia ptp - + Swap PointOnObject+tangency with point to curve tangency Intercambia Punto en Objeto+tangencia con tangencia de punto a curva - - - - - - - + + + + + + + Add tangent constraint Añadir restricción tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Añadir punto de restricción tangente - - - - + + + + Add radius constraint Añadir restricción de radio - - - - + + + + Add diameter constraint Añadir restricción de diámetro - - - - + + + + Add radiam constraint Añadir restricción de radio - - - - - - + + + + + + Add angle constraint Añadir restricción de ángulo - - + + Add equality constraint Añadir restricción de igualdad - - - - - + + + + + Add symmetric constraint Añadir restricción de simetría - + Add Snell's law constraint Añadir restricción de ley de Snell - + Toggle constraint to driving/reference Cambiar la restricción a la conducción/referencia - + Activate/Deactivate constraint Activar/desactivar restricción @@ -2035,7 +2028,7 @@ restricciones inválidas, geometrías degeneradas, etc. - + Add sketch arc Añadir arco de croquis @@ -2286,59 +2279,59 @@ restricciones inválidas, geometrías degeneradas, etc. Error de auto-restricción: Croquis sin solución después de aplicar restricciones de igualdad. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. No se puede adivinar la intersección de las curvas. Intente agregar una restricción coincidente entre los vértices de las curvas que pretende redondear. - - + + BSpline Geometry Index (GeoID) is out of bounds. Índice de Geometría BSpline (GeoID) está fuera de límites. - + You are requesting no change in knot multiplicity. No está solicitando ningún cambio en la multiplicidad de nudos. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. El índice de geometría (GeoId) proporcionado no es una curva B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. El índice de nudos está fuera de los límites. Tenga en cuenta que de acuerdo con la notación OCC, el primer nudo tiene índice 1 y no 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. La multiplicidad no puede incrementarse más allá del grado de la B-spline. - + The multiplicity cannot be decreased beyond zero. La multiplicidad no puede ser disminuida más allá de cero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC es incapaz de disminuir la multiplicidad dentro de la tolerancia máxima. - + Knot cannot have zero multiplicity. El nodo no puede tener una multiplicidad cero. - + Knot multiplicity cannot be higher than the degree of the BSpline. La multiplicidad del nodo no puede ser mayor que el grado de la BSpline. - + Knot cannot be inserted outside the BSpline parameter range. El nodo no puede ser insertado fuera del rango de parámetros de la B-Spline. @@ -2406,134 +2399,134 @@ restricciones inválidas, geometrías degeneradas, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2581,329 +2574,329 @@ restricciones inválidas, geometrías degeneradas, etc. Restricción de cota - + Cannot add a constraint between two external geometries. No se puede añadir una restricción entre dos geometrias externas. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. No se puede agregar una restricción entre dos geometrías fijas. Las geometrías fijas incluyen geometría externa, geometría bloqueada y puntos especiales como puntos de nodos de B-spline. - + Sketcher Constraint Substitution Sustitución de restricción del croquis - + Keep notifying me of constraint substitutions Seguir notificándome de sustituciones de restricciones - - - + + + Only sketch and its support are allowed to be selected. Solo se permite seleccionar el croquis y su soporte. - + One of the selected has to be on the sketch. Uno de los seleccionados tiene que estar en el croquis. - - + + Select an edge from the sketch. Seleccione un borde del Croquizador. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricción imposible - - - - + + + + The selected edge is not a line segment. El borde seleccionado no es un segmento de línea. - - - - - - + + + + + + Double constraint Restricción doble - - - - - + + + + + The selected edge already has a horizontal constraint! ¡El borde seleccionado ya tiene una restricción horizontal! - - - + + + The selected edge already has a vertical constraint! ¡El borde seleccionado ya tiene una restricción vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! ¡El borde seleccionado ya tiene una restricción de Bloque! - + The selected item(s) can't accept a horizontal constraint! ¡El elemento(s) seleccionado no puede aceptar una restricción horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hay más de un punto fijo seleccionado. ¡Seleccione solamente un punto fijo! - + The selected item(s) can't accept a vertical constraint! ¡El(los) elemento(s) seleccionado(s) no admiten una restricción vertical! - - - + + + Select vertices from the sketch. Selecciona vértices del croquis. - + Select one vertex from the sketch other than the origin. Seleccione un vértice del croquis que no sea el origen. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecciona sólo vértices del croquis. El último vértice seleccionado puede ser el origen. - + Wrong solver status Estado de Solver incorrecto - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Una restricción de Bloqueo no puede ser añadida si el croquis está sin resolver o hay restricciones redundantes y en conflicto. - + Select one edge from the sketch. Seleccione un borde del croquis. - + Select only edges from the sketch. Seleccione solo bordes a partir del croquis. - + Number of selected objects is not 3 El número de objetos seleccionados no es 3 - + Error Error - + Unexpected error. More information may be available in the Report View. Error inesperado. Puede haber más información disponible en la vista de reporte. - + Endpoint to endpoint tangency was applied instead. En su lugar, se aplicó la tangencia de punto final a punto final. - + Select two or more points from the sketch. Seleccione dos o más puntos del croquis. - + Select two or more vertices from the sketch. Seleccione dos o más vértices del croquis. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos o más vértices del croquis para una restricción coincidente, o dos o más círculos, elipses, arcos o arcos de elípse para una restricción concéntrica. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos vértices del croquis para una restricción coincidente, o dos círculos, elipses, arcos o arcos de elipse para una restricción concéntrica. - + Select exactly one line or one point and one line or two points from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos del croquis. - + Cannot add a length constraint on an axis! ¡No se puede agregar una restricción de longitud en un eje! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos o dos círculos del croquis. - + This constraint does not make sense for non-linear curves. Esta restricción no tiene sentido para curvas no lineales. - + Endpoint to edge tangency was applied instead. El punto final a la tangencia del borde se aplicó en su lugar. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccione las cosas correctas desde el croquis. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Seleccione un borde que no sea un peso de B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ninguno de los puntos seleccionados fueron restringidos en sus respectivas curvas, porque son partes del mismo elemento, y porque ambos son geometría externa, o porque la arista no es elegible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ninguno de los puntos seleccionados se restringió a las curvas respectivas, ya sea porque son partes del mismo elemento o porque ambos son geometría externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccione exactamente una línea o hasta dos puntos del croquis. - + Cannot add a horizontal length constraint on an axis! ¡No se puede agregar una restricción de longitud horizontal en un eje! - + Cannot add a fixed x-coordinate constraint on the origin point! ¡No se puede agregar una restricción fija de coordenadas X en el punto de origen! - - + + This constraint only makes sense on a line segment or a pair of points. Esta restricción sólo tiene sentido en un segmento de línea o un par de puntos. - + Cannot add a vertical length constraint on an axis! ¡No se puede agregar una restricción de longitud vertical sobre un eje! - + Cannot add a fixed y-coordinate constraint on the origin point! ¡No se puede agregar una restricción fija de coordenadas Y en el punto de origen! - + Select two or more lines from the sketch. Seleccione dos o más líneas del croquis. - - + + Select at least two lines from the sketch. Seleccione al menos dos líneas del croquis. - + Select a valid line. Seleccione una línea válida. - - + + The selected edge is not a valid line. El borde seleccionado no es una línea válida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2906,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos finales; dos curvas y un punto. - + Select some geometry from the sketch. perpendicular constraint Seleccione alguna geometría del croquis. - - + + Cannot add a perpendicularity constraint at an unconnected point! ¡No se puede agregar una restricción de perpendicularidad en un punto desconectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular al borde de B-spline actualmente no soportado. - - + + One of the selected edges should be a line. Uno de los bordes seleccionados debe ser una línea. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Se aplicó la tangencia de punto final a punto final. La restricción coincidente fue eliminada. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Se aplicó la restricción del punto final a la tangencia. Se eliminó la restricción del punto sobre el objeto. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2958,182 +2951,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos finales; dos curvas y un punto. - + Select some geometry from the sketch. tangent constraint Seleccione alguna geometría del croquis. - - - + + + Cannot add a tangency constraint at an unconnected point! ¡No se puede agregar una restricción de tangencia en un punto desconectado! - - + + Tangent constraint at B-spline knot is only supported with lines! La restricción tangente en nudo de B-spline sólo es compatible con líneas! - + B-spline knot to endpoint tangency was applied instead. En su lugar, se aplicó el punto de la B-spline al extremo de la tangencia. - + Select either one point and several curves, or one curve and several points. Seleccione un punto y varias curvas, o una curva y varios puntos. - - + + Wrong number of selected objects! ¡Número incorrecto de objetos seleccionados! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 objetos, debe haber 2 curvas y 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tangencia a borde de B-spline no soportada actualmente. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccione uno o más arcos o circunferencias del croquis. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Seleccione sólo uno o más polos de B-Spline o sólo uno o más arcos o circunferencias del croquis, pero no mezclado. - - - + + + Constraint only applies to arcs or circles. La restricción sólo se aplica a los arcos o circunferencias. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccione una o dos líneas del croquis. O seleccione dos bordes y un punto. - - + + Parallel lines Líneas paralelas - - + + An angle constraint cannot be set for two parallel lines. No se puede establecer una restricción de ángulo para dos líneas paralelas. - + Cannot add an angle constraint on an axis! ¡No se puede agregar una restricción de ángulo en un eje! - + Select two edges from the sketch. Seleccione dos bordes del croquis. - + Select two or more compatible edges. Seleccione dos o más bordes compatibles. - + Sketch axes cannot be used in equality constraints. Los ejes de dibujo no pueden utilizarse en restricciones de igualdad. - + Equality for B-spline edge currently unsupported. La igualdad para el borde de B-spline no está soportada actualmente. - - - - + + + + Select two or more edges of similar type. Seleccione dos o más bordes de tipo similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccione dos puntos y una línea de simetría, dos puntos y un punto de simetría o una línea y un punto de simetría del croquis. - - + + Cannot add a symmetry constraint between a line and its end points. No se puede añadir una restricción de simetría entre una línea y sus extremos. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! ¡No se puede agregar una restricción de simetría entre una línea y sus puntos finales! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Seleccione dos extremos de líneas para actuar como rayos, y una arista que representa un límite. El primer punto seleccionado corresponde al índice n1, segundo a n2, y el valor de referencia establece la relación n2/n1. - + Selected objects are not just geometry from one sketch. Los objetos seleccionados no son solo geometría de un croquis. - + Cannot create constraint with external geometry only. No se puede crear restricción sólo con geometría externa. - + Incompatible geometry is selected. Se ha seleccionado geometría incompatible. - + SnellsLaw on B-spline edge is currently unsupported. Ley de Snell sobre arista de B-spline no es compatible por el momento. - - - - - + + + + + Select constraints from the sketch. Seleccione restricciones del croquis. @@ -3632,12 +3625,12 @@ Combinaciones aceptadas: dos curvas; un punto final y una curva; dos puntos fina Longitud: - + Refractive index ratio Índice de refracción - + Ratio n2/n1: Relación n2/n1: @@ -4141,12 +4134,12 @@ Requiere volver a ingresar al modo de edición para tener efecto. Dimension Constraint - Dimension Constraint + Restricción de cota Dimensioning constraints: - Dimensioning constraints: + Restricciones de acotación: @@ -4155,16 +4148,16 @@ Requiere volver a ingresar al modo de edición para tener efecto. 'Separated tools': Individual tools for each dimensioning constraint. 'Both': You will have both the 'Dimension' tool and the separated tools. This setting is only for the toolbar. Whichever you chose, all tools are always available in the menu and through shortcuts. - Selecciona el tipo de cotas de restricción para tu barra de herramientas: -'Herramienta sola': Una sola herramienta para todas las cotas de restricción en la barra de herramientas: Distancia, Distancia X / Y, Ángulo, Radio. (Otros en el desplegable) -'Herramientas separadas': Herramientas individuales para cada cota de restricción. -'Ambas': Tendrás ambas la herramienta de Dimensión y las herramientas separadas. -Estos ajustes solo son para la barra de herramientas. Cualquiera que tú escojas, todas las herramientas estan siempre disponible en el menú y a través de atajos. + Selecciona el tipo de restricción de cota para tu barra de herramientas: +'Herramienta única': Una sola herramienta para todas las restricciones de cotas en la barra de herramientas: Distancia, Distancia X / Y, Ángulo, Radio. (Otros en el desplegable) +'Herramientas separadas': Herramientas individuales para cada restricción de cota. +'Ambas': Tendrás ambas la herramienta ´Cota´ y las herramientas separadas. +Estos ajustes solo son para la barra de herramientas. Cualquiera que escojas, todas las herramientas están siempre disponible en el menú y a través de atajos. Dimension tool diameter/radius mode: - Dimension tool diameter/radius mode: + Modo diámetro o radio de la herramienta de acotación: @@ -4172,15 +4165,15 @@ Estos ajustes solo son para la barra de herramientas. Cualquiera que tú escojas 'Auto': The tool will apply radius to arcs and diameter to circles. 'Diameter': The tool will apply diameter to both arcs and circles. 'Radius': The tool will apply radius to both arcs and circles. - While using the Dimension tool you may chose how to handle circles and arcs: -'Auto': The tool will apply radius to arcs and diameter to circles. -'Diameter': The tool will apply diameter to both arcs and circles. -'Radius': The tool will apply radius to both arcs and circles. + Al usar la herramienta Acotación puedes elegir cómo manejar círculos y arcos: +'Auto': La herramienta aplicará el radio a arcos y diámetro a círculos. +'Diámetro': La herramienta aplicará diámetro tanto a arcos como a círculos. +'Radio': la herramienta aplicará radio tanto a arcos como a círculos. Single tool - Single tool + Herramienta única @@ -5228,112 +5221,112 @@ Esto se hace al analizar las geometrías y restricciones del croquis. SketcherGui::ViewProviderSketch - + Edit sketch Editar croquis - + A dialog is already open in the task panel Un diálogo ya está abierto en el panel de tareas - + Do you want to close this dialog? ¿Desea cerrar este diálogo? - + Invalid sketch Croquis no válido - + Do you want to open the sketch validation tool? ¿Quieres abrir la herramienta de validación de croquis? - + The sketch is invalid and cannot be edited. El croquis no es válido y no puede editarse. - + Please remove the following constraint: Por favor, elimine la siguiente restricción: - + Please remove at least one of the following constraints: Por favor, elimine al menos una de las siguientes restricciones: - + Please remove the following redundant constraint: Por favor, elimine la siguiente restricción redundante: - + Please remove the following redundant constraints: Por favor, elimine las siguientes restricciones redundantes: - + The following constraint is partially redundant: La siguiente restricción es parcialmente redundante: - + The following constraints are partially redundant: Las siguientes restricciones son parcialmente redundantes: - + Please remove the following malformed constraint: Por favor, elimine la siguiente restricción mal formada: - + Please remove the following malformed constraints: Por favor, elimine las siguientes restricciones mal formadas: - + Empty sketch Croquis vacío - + Over-constrained: Sobre-restringido: - + Malformed constraints: Restricciones mal formadas: - + Redundant constraints: Restricciones redundantes: - + Partially redundant: Parcialmente redundante: - + Solver failed to converge El solver falló al converger - + Under constrained: Sub-restringido: - + %n DoF(s) %n DoF @@ -5341,7 +5334,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. - + Fully constrained Totalmente restringido @@ -5439,8 +5432,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fija el diámetro de una circunferencia o un arco @@ -5448,7 +5441,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fija el diámetro/radio de una circunferencia o de un arco @@ -5456,20 +5450,12 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fija el radio de una circunferencia o arco - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fija el diámetro/radio de una circunferencia o de un arco - - Sketcher_Copy @@ -6085,7 +6071,7 @@ El algoritmo QR de Eigen Sparse está optimizado para matrices dispersas; genera ViewProviderSketch - + and %1 more y %1 más @@ -6308,7 +6294,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< ¡El croquis tiene restricciones parcialmente redundantes! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas ha sido migrado. Los archivos migrados no se abrirán en versiones anteriores de FreeCAD!! @@ -6319,7 +6305,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - + @@ -6344,7 +6330,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - + @@ -6367,13 +6353,13 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< La restricción tiene información de índice inválida y está mal formada. - - - - - - - + + + + + + + @@ -6384,7 +6370,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - + Failed to add arc Falló al añadir el arco @@ -6498,7 +6484,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Fallo al añadir caja - + Failed to add rounded rectangle Fallo al añadir rectángulo redondeado @@ -6680,17 +6666,17 @@ Los puntos deben estar más cerca de una quinta parte del espacio de la cuadríc CmdSketcherDimension - + Dimension Cota - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6699,25 +6685,38 @@ Left clicking on empty space will validate the current constraint. Right clickin Show/hide circular helper for arcs - Show/hide circular helper for arcs + Mostrar/ocultar ayudante circular para arcos Switches between showing and hiding the circular helper for all arcs - Switches between showing and hiding the circular helper for all arcs + Cambia entre mostrar y ocultar el ayudante circular para todos los arcos CmdSketcherCompDimensionTools - + Dimension Cota - + Dimension tools. Herramientas de acotación + + CmdSketcherConstrainRadius + + + Constrain radius + Restringir radio + + + + Fix the radius of a circle or an arc + Fija el radio de una circunferencia o arco + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts index a3c87c1e1f..9f92a408d1 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_es-ES.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir arco o circunferencia - + Constrain an arc or a circle Restringir un arco o una circunferencia - + Constrain radius Restringir radio - + Constrain diameter Restringir diámetro - + Constrain auto radius/diameter Restricción automática de radio/diámetro @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restringir ángulo - + Fix the angle of a line or the angle between two lines Fijar el ángulo de una línea o el ángulo entre dos líneas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restricción de bloque - + Block the selected edge from moving Bloquear al borde seleccionado de moverse @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restricción de coincidencia - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea una restricción coincidente entre puntos, o una restricción concéntrica entre círculos, arcos y elipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir diámetro - + Fix the diameter of a circle or an arc Fijar el diámetro de una circunferencia o un arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restricción de distancia - + Fix a length of a line or the distance between a line and a vertex or between two circles Fija una longitud de una línea o la distancia entre una línea y un vértice o entre dos círculos @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Restricción de distancia horizontal - + Fix the horizontal distance between two points or line ends Fijar la distancia horizontal entre dos puntos o extremos de línea @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restricción de distancia vertical - + Fix the vertical distance between two points or line ends Fijar la distancia vertical entre dos puntos o extremos de línea @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restringir igualdad - + Create an equality constraint between two lines or between circles and arcs Crear una restricción de igualdad entre dos líneas o entre circunferencias y arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Crear una restricción horizontal en el elemento seleccionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restricción de bloqueo - + Create both a horizontal and a vertical distance constraint on the selected vertex Crea una restricción de distancia horizontal y vertical @@ -520,12 +520,12 @@ en el vértice seleccionado CmdSketcherConstrainParallel - + Constrain parallel Restricción de paralelismo - + Create a parallel constraint between two lines Crear una restricción entre dos líneas paralelas @@ -533,12 +533,12 @@ en el vértice seleccionado CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restricción perpendicular - + Create a perpendicular constraint between two lines Crear una restricción perpendicular entre dos líneas @@ -546,12 +546,12 @@ en el vértice seleccionado CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir punto en objeto - + Fix a point onto an object Fijar un punto sobre un objeto @@ -559,38 +559,25 @@ en el vértice seleccionado CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restricción automática de radio/diámetro - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Corrija el diámetro si se elige un círculo, o el radio si se elige un polo arco/curva - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Limitar radio o peso - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Corregir el radio de una circunferencia o un arco o fija el peso de un poste o de una B-spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Restricción de refracción (Ley de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crea una restricción de ley de refracción (ley de Snell) entre dos extremos de los rayos y una arista como interfaz. @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restricción de simetría - + Create a symmetry constraint between two points with respect to a line or a third point Crear una restricción de simetría entre dos puntos @@ -614,12 +601,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainTangent - + Constrain tangent Restricción tangencial - + Create a tangent constraint between two entities Crear una restricción tangencial entre dos entidades @@ -627,12 +614,12 @@ con respecto a una línea o un tercer punto CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Crear una restricción vertical en el elemento seleccionado @@ -1490,12 +1477,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activar/desactivar restricción - + Activates or deactivates the selected constraints Activa o desactiva las restricciones seleccionadas @@ -1516,12 +1503,12 @@ Esto borrará la propiedad 'Soporte', si la hubiera. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Alternar restricción/referencia - + Set the toolbar, or the selected constraints, into driving or reference mode Establece la barra de herramientas, o las restricciones seleccionadas, @@ -1595,370 +1582,376 @@ restricciones inválidas, geometrías degeneradas, etc. Command - - + + Add horizontal constraint Añadir restricción horizontal - - - + + + Add horizontal alignment Añadir alineación horizontal - - + + Add vertical constraint Añadir restricción vertical - + Add vertical alignment Añadir alineación vertical - + Add 'Lock' constraint Añadir restricción 'Bloquear' - + Add relative 'Lock' constraint Agregar restricción relativa 'Bloquear' - + Add fixed constraint Añadir restricción fija - + Add 'Block' constraint Añadir restricción 'Bloqueo' - + Add block constraint Añadir restricción de bloqueo - - - + + + Add coincident constraint Añadir restricción de coincidencia - - + + Add distance from horizontal axis constraint Añadir distancia desde la restricción del eje horizontal - - + + Add distance from vertical axis constraint Añadir distancia desde la restricción del eje vertical - - + + Add point to point distance constraint Añadir punto a restricción de distancia de punto - - - + + + Add point to line Distance constraint Añadir punto a restricción de Distancia de Línea - - + + Add circle to circle distance constraint Agrega un círculo a la restricción de distancia circular - + Add circle to line distance constraint Agrega un círculo a la restricción de distancia de línea - - - - - - + + + + + + Add length constraint Añadir restricción de longitud - - + + + Dimension Cota - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint - Add Symmetry constraint + Añadir restricción de simetría - - + + Add Symmetry constraints - Add Symmetry constraints + Añadir restricciones de simetría - - + + Add Distance constraints - Add Distance constraints + Añadir restricciones de distancia - + Add Horizontal constraint - Add Horizontal constraint + Añadir restricción de horizontalidad - + Add Vertical constraint - Add Vertical constraint + Añadir restricción de verticalidad - + Add Block constraint - Add Block constraint + Añadir restricción de bloqueo - + Add Angle constraint - Add Angle constraint + Añadir restricción de ángulo - - - - + + + + Add Equality constraint - Add Equality constraint + Añadir restricción de igualdad - + Add Equality constraints - Add Equality constraints + Añadir restricciones de igualdad - + Add Radius constraint - Add Radius constraint + Añadir restricción de radio - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint - Add concentric and length constraint + Añadir restricción de concentricidad y longitud - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Añadir punto a la restricción del objeto - - + + Add point to point horizontal distance constraint Añadir punto a la restricción de distancia horizontal del punto - + Add fixed x-coordinate constraint Añadir restricción de coordenada-x fija - - + + Add point to point vertical distance constraint Añadir punto a la restricción de distancia vertical del punto - + Add fixed y-coordinate constraint Añadir restricción de coordenada-y fija - - + + Add parallel constraint Añadir restricción paralela - - - - - - - + + + + + + + Add perpendicular constraint Añadir restricción perpendicular - + Add perpendicularity constraint Añadir restricción de perpendicularidad - + Swap coincident+tangency with ptp tangency Intercambia coincidencia + tangencia con la tangencia ptp - + Swap PointOnObject+tangency with point to curve tangency Intercambia Punto en Objeto+tangencia con tangencia de punto a curva - - - - - - - + + + + + + + Add tangent constraint Añadir restricción tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Añadir punto de restricción tangente - - - - + + + + Add radius constraint Añadir restricción de radio - - - - + + + + Add diameter constraint Añadir restricción de diámetro - - - - + + + + Add radiam constraint Añadir restricción radiam - - - - - - + + + + + + Add angle constraint Añadir restricción de ángulo - - + + Add equality constraint Añadir restricción de igualdad - - - - - + + + + + Add symmetric constraint Añadir restricción de simetría - + Add Snell's law constraint Añadir restricción de ley de Snell - + Toggle constraint to driving/reference Cambiar la restricción a la conducción/referencia - + Activate/Deactivate constraint Activar/desactivar restricción @@ -2034,7 +2027,7 @@ restricciones inválidas, geometrías degeneradas, etc. - + Add sketch arc Añadir arco de croquis @@ -2285,59 +2278,59 @@ restricciones inválidas, geometrías degeneradas, etc. Error de autorestricción: croquis sin solución después de aplicar restricciones de igualdad. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. No se puede adivinar la intersección de curvas. Intente agregar una restricción coincidente entre los vértices de las curvas que pretende redondear. - - + + BSpline Geometry Index (GeoID) is out of bounds. Índice de geometría BSpline (GeoID) está fuera de restricciones. - + You are requesting no change in knot multiplicity. Usted esta solicitando no cambio en multiplicidad de nudo. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. El índice de geometría (GeoID) proporcionado no es una curva B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. El índice de nudo es fuera de los limites. Note que según en concordancia con notación de la OCC, el primer nudo tiene índice 1 y no 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. La multiplicidad no puede incrementarse más allá del grado de la B-spline. - + The multiplicity cannot be decreased beyond zero. La multiplicidad no puede ser disminuida más allá de cero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC es incapaz de disminuir la multiplicidad dentro de la tolerancia máxima. - + Knot cannot have zero multiplicity. El nodo no puede tener una multiplicidad cero. - + Knot multiplicity cannot be higher than the degree of the BSpline. La multiplicidad del nodo no puede ser mayor que el grado de la BSpline. - + Knot cannot be inserted outside the BSpline parameter range. El nodo no puede ser insertado fuera del rango de parámetros de la B-Spline. @@ -2405,134 +2398,134 @@ restricciones inválidas, geometrías degeneradas, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ restricciones inválidas, geometrías degeneradas, etc. Restricción dimensional - + Cannot add a constraint between two external geometries. No se puede añadir una restricción entre dos geometrias externas. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. No se puede agregar una restricción entre dos geometrías fijas. Las geometrías fijas incluyen geometría externa, geometría bloqueada y puntos especiales como puntos de nodos de B-spline. - + Sketcher Constraint Substitution Sustitución de restricción del croquis - + Keep notifying me of constraint substitutions Seguir notificándome de sustituciones de restricciones - - - + + + Only sketch and its support are allowed to be selected. Solo se permite seleccionar el croquis y su soporte. - + One of the selected has to be on the sketch. Uno de los seleccionados tiene que estar en el croquis. - - + + Select an edge from the sketch. Seleccione una arista del croquis. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricción imposible - - - - + + + + The selected edge is not a line segment. El borde seleccionado no es un segmento de línea. - - - - - - + + + + + + Double constraint Restricción doble - - - - - + + + + + The selected edge already has a horizontal constraint! ¡La arista seleccionada ya tiene una restricción horizontal! - - - + + + The selected edge already has a vertical constraint! ¡El borde seleccionado ya tiene una restricción vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! ¡La arista seleccionada ya tiene una restricción de Bloque! - + The selected item(s) can't accept a horizontal constraint! ¡El(los) elemento(s) seleccionado(s) no pueden aceptar una restricción horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hay mas de un punto fijo seleccionado. Debe seleccionar solamente un punto Fijo! - + The selected item(s) can't accept a vertical constraint! ¡El(los) elemento(s) seleccionado(s) no admiten una restricción vertical! - - - + + + Select vertices from the sketch. Selecciona vértices del croquis. - + Select one vertex from the sketch other than the origin. Seleccione un vértice del croquis que no sea el origen. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecciona sólo vértices del croquis. El último vértice seleccionado puede ser el origen. - + Wrong solver status Estado de Solver Incorrecto - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Una restricción de Bloqueo no puede ser añadida si el croquis está sin resolver o hay restricciones redundantes y en conflicto. - + Select one edge from the sketch. Seleccione una arista del croquis. - + Select only edges from the sketch. Seleccione únicamente aristas de el Croquis. - + Number of selected objects is not 3 El número de objetos seleccionados no es 3 - + Error Error - + Unexpected error. More information may be available in the Report View. Error inesperado. Puede haber más información disponible en la vista de reporte. - + Endpoint to endpoint tangency was applied instead. Una Tangente de Puntos de Extremo se aplicó en su lugar. - + Select two or more points from the sketch. Seleccione dos o más puntos del croquis. - + Select two or more vertices from the sketch. Seleccione dos o más vértices del croquis. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos o más vértices del croquis para una restricción coincidente, o dos o más círculos, elipses, arcos o arcos de elípse para una restricción concéntrica. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleccione dos vértices del croquis para una restricción coincidente, o dos círculos, elipses, arcos o arcos de elipse para una restricción concéntrica. - + Select exactly one line or one point and one line or two points from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos del croquis. - + Cannot add a length constraint on an axis! ¡No se puede añadir una restricción de longitud en un eje! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Seleccione exactamente una línea o un punto y una línea o dos puntos o dos círculos del croquis. - + This constraint does not make sense for non-linear curves. Esta restricción no tiene sentido para curvas no lineales. - + Endpoint to edge tangency was applied instead. El punto final a la tangencia del borde se aplicó en su lugar. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccione las cosas correctas desde el croquis. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Seleccione un borde que no sea un peso de B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ninguno de los puntos seleccionados fueron restringidos en sus respectivas curvas, porque son partes del mismo elemento, y porque ambos son geometría externa, o porque la arista no es elegible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ninguno de los puntos seleccionados fueron limitados en las curvas respectivas, porque son partes de un mismo elemento, o porque son ambos de geometría externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccione exactamente una línea o hasta dos puntos del croquis. - + Cannot add a horizontal length constraint on an axis! ¡No se puede añadir una restricción de longitud horizontal en un eje! - + Cannot add a fixed x-coordinate constraint on the origin point! ¡No se puede agregar una restricción de coordenada x fija en el punto de origen! - - + + This constraint only makes sense on a line segment or a pair of points. Esta restricción sólo tiene sentido en un segmento de línea o un par de puntos. - + Cannot add a vertical length constraint on an axis! ¡No se puede añadir una restricción de longitud vertical sobre un eje! - + Cannot add a fixed y-coordinate constraint on the origin point! ¡No se puede agregar una restricción de coordenada y fija en el punto de origen! - + Select two or more lines from the sketch. Seleccione dos o más líneas del croquis. - - + + Select at least two lines from the sketch. Seleccione al menos dos líneas del croquis. - + Select a valid line. Seleccione una línea válida. - - + + The selected edge is not a valid line. El borde seleccionado no es una línea válida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2904,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Las combinaciones posibles son: dos curvas; extremo y curva; dos extremos; dos curvas y un punto. - + Select some geometry from the sketch. perpendicular constraint Seleccione alguna geometría del croquis. - - + + Cannot add a perpendicularity constraint at an unconnected point! ¡No se puede añadir una restricción de perpendicularidad en un punto no conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular a arista de B-spline no compatible por el momento. - - + + One of the selected edges should be a line. ¡Una de las aristas seleccionadas debe ser una línea. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Una Tangente de Puntos de Estremo fue aplicada, La restricción coincidente fue eliminada. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Se aplicó un punto final al borde tangencial. Se eliminó el punto sobre la restricción del objeto. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,182 +2949,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaciones aceptadas: dos curvas; un extremo y una curva; dos extremos; dos curvas y un punto. - + Select some geometry from the sketch. tangent constraint Seleccione alguna geometría del croquis. - - - + + + Cannot add a tangency constraint at an unconnected point! ¡No se puede añadir una restricción de tangencia en un punto no conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! La restricción tangente en nudo de B-spline sólo es compatible con líneas! - + B-spline knot to endpoint tangency was applied instead. En su lugar, se aplicó tangecia entre el nudo de B-spline y el punto final. - + Select either one point and several curves, or one curve and several points. Seleccione un punto y varias curvas, o una curva y varios puntos. - - + + Wrong number of selected objects! ¡Número incorrecto de objetos seleccionados! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 objetos, debe haber 2 curvas y 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tangencia sobre arista de B-spline no compatible por el momento. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccione uno o más arcos o circunferencias del croquis. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Seleccione sólo uno o más polos de B-Spline o sólo uno o más arcos o circunferencias del croquis, pero no mezclado. - - - + + + Constraint only applies to arcs or circles. La restricción sólo se aplica a los arcos o circunferencias. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccione una o dos líneas del croquis. O seleccione un punto y dos aristas. - - + + Parallel lines Líneas paralelas - - + + An angle constraint cannot be set for two parallel lines. Una restricción de ángulo no puede ser establecida por dos lineas paralelas. - + Cannot add an angle constraint on an axis! ¡No se puede añadir una restricción angular en un eje! - + Select two edges from the sketch. Seleccione dos aristas del croquis. - + Select two or more compatible edges. Seleccione dos o más bordes compatibles. - + Sketch axes cannot be used in equality constraints. Los ejes de dibujo no pueden utilizarse en restricciones de igualdad. - + Equality for B-spline edge currently unsupported. Igualdad para arista de B-Spline no compatible por el momento. - - - - + + + + Select two or more edges of similar type. Seleccione dos o más bordes de tipo similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccione dos puntos y una línea de simetría, dos puntos y un punto de simetría o una línea y un punto de simetría del croquis. - - + + Cannot add a symmetry constraint between a line and its end points. No se puede añadir una restricción de simetría entre una línea y sus extremos. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! ¡No se puede añadir una restricción de simetría entre una línea y sus extremos! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Seleccione dos extremos de líneas para actuar como rayos, y una arista que representa un límite. El primer punto seleccionado corresponde al índice n1, segundo a n2, y el valor de referencia establece la relación n2/n1. - + Selected objects are not just geometry from one sketch. Los objetos seleccionados no son sólo la geometría de un croquis. - + Cannot create constraint with external geometry only. No se puede crear restricción sólo con geometría externa. - + Incompatible geometry is selected. Se ha seleccionado geometría incompatible. - + SnellsLaw on B-spline edge is currently unsupported. Ley de Snell sobre arista de B-spline no es compatible por el momento. - - - - - + + + + + Select constraints from the sketch. Seleccione restricciones del croquis. @@ -3630,12 +3623,12 @@ Combinaciones aceptadas: dos curvas; un extremo y una curva; dos extremos; dos c Longitud: - + Refractive index ratio Índice refracción - + Ratio n2/n1: Razón n2/n1: @@ -5224,112 +5217,112 @@ Esto se hace al analizar las geometrías y restricciones del croquis. SketcherGui::ViewProviderSketch - + Edit sketch Editar croquis - + A dialog is already open in the task panel Un diálogo ya está abierto en el panel de tareas - + Do you want to close this dialog? ¿Desea cerrar este diálogo? - + Invalid sketch Croquis inválido - + Do you want to open the sketch validation tool? ¿Desea abrir la herramienta de validación del croquis? - + The sketch is invalid and cannot be edited. El croquis no es válido y no puede editarse. - + Please remove the following constraint: Elimine la siguiente restricción: - + Please remove at least one of the following constraints: Por favor elimine al menos una de las siguientes restricciones: - + Please remove the following redundant constraint: Por favor elimine la siguiente restricción redundante: - + Please remove the following redundant constraints: Por favor elimine las siguientes restricciones redundante: - + The following constraint is partially redundant: La siguiente restricción es parcialmente redundante: - + The following constraints are partially redundant: Las siguientes restricciones son parcialmente redundantes: - + Please remove the following malformed constraint: Por favor, elimine la siguiente restricción mal formada: - + Please remove the following malformed constraints: Por favor, elimine las siguientes restricciones mal formadas: - + Empty sketch Croquis vacío - + Over-constrained: Sobre-restringido: - + Malformed constraints: Restricciones mal formadas: - + Redundant constraints: Restricciones redundantes: - + Partially redundant: Parcialmente redundante: - + Solver failed to converge El solver falló al converger - + Under constrained: Sub-restringido: - + %n DoF(s) %n DoF @@ -5337,7 +5330,7 @@ Esto se hace al analizar las geometrías y restricciones del croquis. - + Fully constrained Totalmente restringido @@ -5435,8 +5428,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fijar el diámetro de una circunferencia o un arco @@ -5444,7 +5437,8 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fijar el diámetro/radio de una circunferencia o un arco @@ -5452,20 +5446,12 @@ Esto se hace al analizar las geometrías y restricciones del croquis. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fijar el radio de una circunferencia o arco - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fijar el diámetro/radio de una circunferencia o un arco - - Sketcher_Copy @@ -6081,7 +6067,7 @@ El algoritmo QR de Eigen Sparse está optimizado para matrices dispersas; genera ViewProviderSketch - + and %1 more y %1 más @@ -6304,7 +6290,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< El croquis contiene restricciones parcialmente redundantes! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas ha sido migrado. Los archivos migrados no se abrirán en versiones anteriores de FreeCAD!! @@ -6315,7 +6301,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - + @@ -6340,7 +6326,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - + @@ -6363,13 +6349,13 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< La restricción tiene información de índice inválida y está mal formada. - - - - - - - + + + + + + + @@ -6380,7 +6366,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< - + Failed to add arc Falló al añadir el arco @@ -6494,7 +6480,7 @@ El espaciado de la cuadrícula cambia si es menor que este número de píxeles.< Fallo al añadir caja - + Failed to add rounded rectangle Fallo al añadir rectángulo redondeado @@ -6676,17 +6662,17 @@ Los puntos deben estar más cerca de una quinta parte del tamaño de la cuadríc CmdSketcherDimension - + Dimension Cota - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6706,14 +6692,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Cota - + Dimension tools. Herramientas de acotación + + CmdSketcherConstrainRadius + + + Constrain radius + Restringir radio + + + + Fix the radius of a circle or an arc + Fijar el radio de una circunferencia o arco + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts index 76c87c3bd6..adf47eea1e 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_eu.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Murriztu arkua edo zirkulua - + Constrain an arc or a circle Murriztu arku bat edo zirkulu bat - + Constrain radius Murriztu erradioa - + Constrain diameter Murriztu diametroa - + Constrain auto radius/diameter Murriztu erradio/diametro automatikoa @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Murriztu angelua - + Fix the angle of a line or the angle between two lines Finkatu lerro baten angelua edo bi lerroren arteko angelua @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Murriztu blokea - + Block the selected edge from moving Blokeatu hautatutako ertza, lekuz aldatu ez dadin @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Murriztu bat datozenak - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Sortu bat datorren murrizketa bat puntuen artean, edo murrizketa kontzentriko bat zirkuluen, arkuen eta elipseen artean @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Murriztu diametroa - + Fix the diameter of a circle or an arc Finkatu zirkulu baten edo arku baten diametroa @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Murriztu distantzia - + Fix a length of a line or the distance between a line and a vertex or between two circles Finkatu lerro baten luzera edo lerro baten eta erpin baten arteko edo bi zirkuluren arteko distantzia @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Murriztu distantzia horizontala - + Fix the horizontal distance between two points or line ends Finkatu bi punturen edo bi lerro-amaieren arteko distantzia horizontala @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Murriztu distantzia bertikala - + Fix the vertical distance between two points or line ends Finkatu bi punturen edo bi lerro-amaieren arteko distantzia bertikala @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Murriztu berdin - + Create an equality constraint between two lines or between circles and arcs Sortu berdintasun-murrizketa bat bi lerroren artean edo zirkuluen eta arkuen artean @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Murriztu horizontalean - + Create a horizontal constraint on the selected item Sortu murrizketa horizontala hautatutako elementuan @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Blokeo-murrizketa - + Create both a horizontal and a vertical distance constraint on the selected vertex Sortu distantzia-murrizketa horizontala eta bertikala @@ -520,12 +520,12 @@ hautatutako erpinean CmdSketcherConstrainParallel - + Constrain parallel Murriztu paraleloa - + Create a parallel constraint between two lines Sortu murrizketa paraleloa bi lerroren artean @@ -533,12 +533,12 @@ hautatutako erpinean CmdSketcherConstrainPerpendicular - + Constrain perpendicular Murriztu perpendikularra - + Create a perpendicular constraint between two lines Sortu murrizketa perpendikularra bi lerroren artean @@ -546,12 +546,12 @@ hautatutako erpinean CmdSketcherConstrainPointOnObject - + Constrain point onto object Murriztu puntua objektuan - + Fix a point onto an object Finkatu puntu bat objektu batean @@ -559,38 +559,25 @@ hautatutako erpinean CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Murriztu erradio/diametro automatikoa - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Finkatu diamteroa zirkulu bat hautatu bada, edo erradioa arku/spline polo bat hautatu bada - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Murriztu erradioa edo pisua - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Finkatu zirkulu baten edo arku baten erradioa edo finkatu B-spline baten polo baten pisua - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Murriztu errefrakzioa (Snell-en legea) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Sortu Snell-en errefrakzio-legearen murrizketa bat, izpien bi amaiera-punturen @@ -600,12 +587,12 @@ artean eta ertz bat interfaze modura erabilita. CmdSketcherConstrainSymmetric - + Constrain symmetrical Murriztu simetrikoki - + Create a symmetry constraint between two points with respect to a line or a third point Sortu simetria-murrizketa bat bi punturen artean, @@ -615,12 +602,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherConstrainTangent - + Constrain tangent Murriztu tangentea - + Create a tangent constraint between two entities Sortu murrizketa tangentea bi lerroren artean @@ -628,12 +615,12 @@ lerro batekiko edo hirugarren puntu batekiko CmdSketcherConstrainVertical - + Constrain vertically Murriztu bertikalean - + Create a vertical constraint on the selected item Sortu murrizketa bertikala hautatutako elementuan @@ -1492,12 +1479,12 @@ Horrela 'Euskarria' propietatea garbituko da, halakorik badago. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktibatu/desaktibatu murrizketa - + Activates or deactivates the selected constraints Hautatutako murrizketak aktibatzen edo desaktibatzen ditu @@ -1518,12 +1505,12 @@ Horrela 'Euskarria' propietatea garbituko da, halakorik badago. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Aktibatu/desaktibatu gidatze/erreferentziako murrizketa - + Set the toolbar, or the selected constraints, into driving or reference mode Ezarri tresna-barra, edo hautatutako murrizketak, @@ -1597,370 +1584,376 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Command - - + + Add horizontal constraint Gehitu murrizketa horizontala - - - + + + Add horizontal alignment Gehitu lerrokatze horizontala - - + + Add vertical constraint Gehitu murrizketa bertikala - + Add vertical alignment Gehitu lerrokatze bertikala - + Add 'Lock' constraint Gehitu 'Blokeo' murrizketa - + Add relative 'Lock' constraint Gehitu 'Blokeo' erlatiboko murrizketa - + Add fixed constraint Gehitu murrizketa finkoa - + Add 'Block' constraint Gehitu 'Bloke' murrizketa - + Add block constraint Gehitu bloke-murrizketa - - - + + + Add coincident constraint Gehitu bat datorren murrizketa - - + + Add distance from horizontal axis constraint Gehitu distantzia ardatz horizontaleko murrizketatik - - + + Add distance from vertical axis constraint Gehitu distantzia ardatz bertikaleko murrizketatik - - + + Add point to point distance constraint Gehitu puntutik punturako distantzia-murrizketa - - - + + + Add point to line Distance constraint Gehitu puntutik lerrorako distantzia-murrizketa - - + + Add circle to circle distance constraint Gehitu zirkulutik zirkulurako distantzia-murrizketa - + Add circle to line distance constraint Gehitu zirkulutik lerrorako distantzia-murrizketa - - - - - - + + + + + + Add length constraint Gehitu luzera-murrizketa - - + + + Dimension Kota - + Add lock constraint Gehitu blokeo-murrizketa - + Add 'Distance to origin' constraint Gehitu jatorrirako distantzia murrizketa gisa - - - + + + Add Distance constraint Gehitu distantzia-murrizketa - - - + + + Add 'Horizontal' constraints Gehitu murrizketa horizontalak - - - + + + Add 'Vertical' constraints Gehitu murrizketa bertikalak - - + + Add Symmetry constraint Gehitu simetria-murrizketa - - + + Add Symmetry constraints Gehitu simetria-murrizketak - - + + Add Distance constraints Gehitu distantzia-murrizketak - + Add Horizontal constraint Gehitu murrizketa horizontala - + Add Vertical constraint Gehitu murrizketa bertikala - + Add Block constraint Gehitu bloke-murrizketa - + Add Angle constraint Gehitu angelu-murrizketa - - - - + + + + Add Equality constraint Gehitu berdintasun-murrizketa - + Add Equality constraints Gehitu berdintasun-murrizketak - + Add Radius constraint Gehitu erradio-murrizketa - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Gehitu luzeraren eta zentrokidetasunaren murrizketa - + Add DistanceX constraint Gehitu X distantziaren murrizketa - + Add DistanceY constraint Gehitu Y distantziaren murrizketa - + Add point to circle Distance constraint Gehitu puntutik zirkulurako distantzia-murrizketa - - + + Add point on object constraint Gehitu objektu gaineko puntuaren murrizketa - - + + Add point to point horizontal distance constraint Gehitu puntutik punturako distantzia horizontaleko murrizketa - + Add fixed x-coordinate constraint Gehitu X koordenatu finkoko murrizketa - - + + Add point to point vertical distance constraint Gehitu puntutik punturako distantzia bertikaleko murrizketa - + Add fixed y-coordinate constraint Gehitu Y koordenatu finkoko murrizketa - - + + Add parallel constraint Gehitu murrizketa paraleloa - - - - - - - + + + + + + + Add perpendicular constraint Gehitu murrizketa perpendikularra - + Add perpendicularity constraint Gehitu perpendikulartasun-murrizketa - + Swap coincident+tangency with ptp tangency Trukatu bat etortzea+tangentzia ptp tangentziarekin - + Swap PointOnObject+tangency with point to curve tangency Trukatu PuntuaObjektuan+tangentzia puntutik kurbarako tangentziarekin - - - - - - - + + + + + + + Add tangent constraint Gehitu tangente-murrizketa - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Gehitu tangentzia-murrizketako puntua - - - - + + + + Add radius constraint Gehitu erradio-murrizketa - - - - + + + + Add diameter constraint Gehitu diametro-murrizketa - - - - + + + + Add radiam constraint Gehitu erradio/diametro-murrizketa - - - - - - + + + + + + Add angle constraint Gehitu angelu-murrizketa - - + + Add equality constraint Gehitu berdintasun-murrizketa - - - - - + + + + + Add symmetric constraint Gehitu simetria-murrizketa - + Add Snell's law constraint Gehitu Snell-en legearen murrizketa - + Toggle constraint to driving/reference Txandakatu murrizketa gidatze/erreferentziara - + Activate/Deactivate constraint Aktibatu/desaktibatu murrizketa @@ -2036,7 +2029,7 @@ murrizketak, geometria degeneratuak, etab. aztertuta. - + Add sketch arc Gehitu krokis-arkua @@ -2287,59 +2280,59 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Automurrizketa-errorea: Ebatzi ezin den krokisa berdintasun-murrizketak aplikatu ondoren. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Ezin izan da kurben ebakidura antzeman. Saiatu bat datorren murrizketa bat gehitzen biribildu nahi dituzun kurben erpinen artean. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline geometria-indizea (GeoID) mugetatik kanpo dago. - + You are requesting no change in knot multiplicity. Adabegi-aniztasunean aldaketarik ez egitea eskatzen ari zara. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Hornitutako geometria-indizea (GeoId) ez da Bspline kurba bat. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Adabegi-indizea mugetatik kanpo dago. Kontuan izan, OCC notazioaren arabera, lehen adabegiaren indize-zenbakiak 1 izan behar duela, ez 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. Aniztasuna ezin da handitu Bspline-aren gradutik gora. - + The multiplicity cannot be decreased beyond zero. Aniztasuna ezin da txikitu zerotik behera. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC-k ezin du aniztasuna txikitu tolerantzia maximoaren barruan. - + Knot cannot have zero multiplicity. Adabegiak ezin du zero aniztasuna izan. - + Knot multiplicity cannot be higher than the degree of the BSpline. Adabegi-aniztasunak ezin du izan B-spline kurbaren graduak baino handiagoa. - + Knot cannot be inserted outside the BSpline parameter range. Adabegia ezin da txertatu B-spline parametro-barrutiaren kanpoaldean. @@ -2407,134 +2400,134 @@ murrizketak, geometria degeneratuak, etab. aztertuta. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ murrizketak, geometria degeneratuak, etab. aztertuta. Kota-murrizketa - + Cannot add a constraint between two external geometries. Ezin da murrizketa bat gehitu bi kanpo-geometriaren artean. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Ezin da murrizketa bat gehitu bi geometria finkoren artean. Geometria finkoek kanpo-geometriak, blokeatutako geometriak eta puntu bereziak (esaterako, B-spline adabegi-puntuak) barne hartzen dituzte. - + Sketcher Constraint Substitution Kroskisgile-murrizketen ordezkapena - + Keep notifying me of constraint substitutions Jarraitu murrizketa-ordezkapenak jakinarazten - - - + + + Only sketch and its support are allowed to be selected. Krokisa eta bere euskarria soilik onartzen dira hautatzea. - + One of the selected has to be on the sketch. Hautatuetako batek krokisean egon behar du. - - + + Select an edge from the sketch. Hautatu krokiseko ertz bat. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Ezinezko murrizketa - - - - + + + + The selected edge is not a line segment. Hautatutako ertza ez da lerro segmentu bat. - - - - - - + + + + + + Double constraint Murrizketa bikoitza - - - - - + + + + + The selected edge already has a horizontal constraint! Hautatutako ertzak badauka murrizketa horizontal bat! - - - + + + The selected edge already has a vertical constraint! Hautatutako ertzak badauka murrizketa bertikal bat! - - - - - - + + + + + + The selected edge already has a Block constraint! Hautatutako ertzak badauka bloke-murrizketa bat! - + The selected item(s) can't accept a horizontal constraint! Hautatutako elementua(e)k ez du(te) murrizketa horizontal bat onartzen! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Puntu finko bat baino gehiago dago hautatuta. Gehienez puntu finko bakarra hautatu behar duzu! - + The selected item(s) can't accept a vertical constraint! Hautatutako elementua(e)k ez du(te) murrizketa bertikal bat onartzen! - - - + + + Select vertices from the sketch. Hautatu krokiseko erpinak. - + Select one vertex from the sketch other than the origin. Hautatu krokiseko erpin bat, jatorria ez dena. - + Select only vertices from the sketch. The last selected vertex may be the origin. Hautatu krokiseko erpinak soilik. Hautatutako azken erpina jatorria izan daiteke. - + Wrong solver status Ebazle-egoera okerra - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Ezin da bloke-murrizketarik gehitu krokisa ebatzi gabe badago edo murrizketa errepikatuak eta gatazkan daudenak badaude. - + Select one edge from the sketch. Hautatu krokiseko ertz bat. - + Select only edges from the sketch. Hautatu krokiseko ertzak soilik. - + Number of selected objects is not 3 Hautatutako objektuen kopurua ez da 3 - + Error Errorea - + Unexpected error. More information may be available in the Report View. Ustekabeko errorea. Txosten-bistan informazio gehiago aurkitu daiteke. - + Endpoint to endpoint tangency was applied instead. Amaiera-puntutik amaiera-punturako tangentzia aplikatu da horren ordez. - + Select two or more points from the sketch. Hautatu krokiseko bi puntu edo gehiago. - + Select two or more vertices from the sketch. Hautatu krokiseko bi erpin edo gehiago. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Hautatu krokisaren bi erpin edo gehiago bat datorren murrizketa baterako, edo bi edo gehiago zirkulu, elipse, arku edo arkuen elipse, murrizketa kontzentriko baterako. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Hautatu krokisaren bi erpin bat datorren murrizketa baterako, edo bi zirkulu, elipse, arku edo arkuen elipse, murrizketa kontzentriko baterako. - + Select exactly one line or one point and one line or two points from the sketch. Hautatu krokiseko lerro bat edo puntu bat edo lerro bat eta bi puntu. - + Cannot add a length constraint on an axis! Ezin zaio luzera-murrizketa bat gehitu ardatz bati! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Hautatu krokiseko lerro bat edo puntu bat eta lerro bat edo bi puntu edo bi zirkulu. - + This constraint does not make sense for non-linear curves. Murrizketa honek ez du zentzurik linealak ez diren kurbekin. - + Endpoint to edge tangency was applied instead. Amaiera-puntutik ertzerako tangentzia aplikatu da horren ordez. - - - - - - - + + + + + + + Select the right things from the sketch. Hautatu krokiseko elementu egokiak. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Hautatu B-spline pisua ez den ertz bat. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Hautatutako puntuetako bat ere ez dago murriztuta bakoitzari dagokion kurban, elementu bereko osagai direlako, kanpo-geometria direlako edo ertza hautatu ezin delako. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Hautatutako puntuetako bat ere ez dago murriztuta bakoitzari dagokion kurban, bai elementu bereko osagai direlako bai kanpo-geometria direlako. - - - - + + + + Select exactly one line or up to two points from the sketch. Hautatu krokiseko lerro bat, puntu bat edo bi puntu. - + Cannot add a horizontal length constraint on an axis! Ezin zaio luzera horizontaleko murrizketa bat gehitu ardatz bati! - + Cannot add a fixed x-coordinate constraint on the origin point! Ezin zaio X koordenatu finkoko murrizketa bat gehitu jatorri-puntuari! - - + + This constraint only makes sense on a line segment or a pair of points. Murriztapen honek lerro segmentuetan edo puntu-bikoteetan soilik du zentzua. - + Cannot add a vertical length constraint on an axis! Ezin zaio luzera bertikaleko murrizketa bat gehitu ardatz bati! - + Cannot add a fixed y-coordinate constraint on the origin point! Ezin zaio Y koordenatu finkoko murrizketa bat gehitu jatorri-puntuari! - + Select two or more lines from the sketch. Hautatu krokiseko bi lerro edo gehiago. - - + + Select at least two lines from the sketch. Hautatu krokiseko bi lerro, gutxienez. - + Select a valid line. Hautatu baliozko lerro bat. - - + + The selected edge is not a valid line. Hautatutako ertza ez da baliozko lerro bat. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2914,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-puntu; bi kurba eta puntu bat. - + Select some geometry from the sketch. perpendicular constraint Hautatu krokiseko geometriaren bat. - - + + Cannot add a perpendicularity constraint at an unconnected point! Ezin zaio perpendikulartasun-murrizketa bat gehitu konektatu gabeko puntu bati! - - - + + + Perpendicular to B-spline edge currently unsupported. Oraindik ez da onartzen perpendikularra B-spline ertzean. - - + + One of the selected edges should be a line. Hautatutako ertzetako batek lerroa izan behar du. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Amaiera-puntutik amaiera-punturako tangentzia aplikatu da. Bat datorren murrizketa ezabatu egin da. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Amaiera-puntutik ertzerako tangentzia aplikatu da. Objektuaren gaineko puntuaren murrizketa ezabatu egin da. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2959,182 +2952,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-puntu; bi kurba eta puntu bat. - + Select some geometry from the sketch. tangent constraint Hautatu krokiseko geometriaren bat. - - - + + + Cannot add a tangency constraint at an unconnected point! Ezin zaio tangentzia-murrizketa gehitu konektatu gabeko puntu bati! - - + + Tangent constraint at B-spline knot is only supported with lines! B-spline adabegiko tangente-murrizketa lerroekin soilik onartzen da. - + B-spline knot to endpoint tangency was applied instead. B-splinearen adabegitik amaiera-punturako tangentzia aplikatu da horren ordez. - + Select either one point and several curves, or one curve and several points. Hautatu puntu bat edo kurba anitz, edo kurba bat eta puntu anitz. - - + + Wrong number of selected objects! Hautatutako objektu kopuru okerra! - - + + With 3 objects, there must be 2 curves and 1 point. 3 objektu badira, 2 kurba eta puntu1 egon behar dute. - - - + + + Tangency to B-spline edge currently unsupported. Oraindik ez da onartzen tangentea B-spline kurbaren ertzean. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Hautatu krokiseko arku edo zirkulu bat edo gehiago. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Hautatu B-spline polo bat edo gehiago edo zirkuluen arku bat edo gehiago krokisean, baina ez bi motak nahastuta. - - - + + + Constraint only applies to arcs or circles. Murrizketa arkuei edo zirkuluei soilik aplikatzen zaie. - - + + Select one or two lines from the sketch. Or select two edges and a point. Hautatu krokisaren lerro bat edo bi. Edo hautatu bi ertz eta puntu bat. - - + + Parallel lines Lerro paraleloak - - + + An angle constraint cannot be set for two parallel lines. Ezin da angelu-murrizketa bat ezarri bi lerro paralelotarako. - + Cannot add an angle constraint on an axis! Ezin zaio angelu-murrizketa bat gehitu ardatz bati! - + Select two edges from the sketch. Hautatu krokiseko bi ertz. - + Select two or more compatible edges. Hautatu bateragarriak diren bi ertz edo gehiago. - + Sketch axes cannot be used in equality constraints. Krokis-ardatzak ezin dira erabili berdintasun-murrizketetan. - + Equality for B-spline edge currently unsupported. Momentuz ez dago onartuta B-spline ertzen berdintasuna. - - - - + + + + Select two or more edges of similar type. Hautatu antzekoak diren bi ertz edo gehiago. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Hautatu krokiseko bi puntu eta simetria-lerro bat, bi puntu eta simetria-puntu bat edo lerro bat eta simetria-puntu bat. - - + + Cannot add a symmetry constraint between a line and its end points. Ezin da simetria-murrizketarik gehitu lerro baten eta haren amaiera-puntuen artean. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Ezin da simetria-murrizketarik gehitu lerro baten eta haren amaiera-puntuen artean! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Hautatu lerroen bi amaiera-puntu izpi gisa joka dezaten, eta muga bat adieraziko duen ertz bat. Hautatutako lehen puntua n1 indizeari dagokio, bigarrena n2 indizeari, eta zero puntuaren balioak n2/n1 erlazioa ezartzen du. - + Selected objects are not just geometry from one sketch. Hautatutako elementuak ez dira soilik krokis bateko geometria. - + Cannot create constraint with external geometry only. Ezin da murrizketa sortu kanpo-geometria soilik erabiliz. - + Incompatible geometry is selected. Bateragarria ez den geometria hautatu da. - + SnellsLaw on B-spline edge is currently unsupported. Oraindik ez da onartzen Snell-en legea B-spline ertzean. - - - - - + + + + + Select constraints from the sketch. Hautatu krokiseko murrizketak. @@ -3633,12 +3626,12 @@ Onartutako konbinazioak: bi kurba; amaiera-puntu bat eta kurba bat; bi amaiera-p Luzera: - + Refractive index ratio Errefrakzio-indizea - + Ratio n2/n1: n2/n1 erlazioa: @@ -5229,112 +5222,112 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. SketcherGui::ViewProviderSketch - + Edit sketch Editatu krokisa - + A dialog is already open in the task panel Elkarrizketa-koadro bat irekita dago ataza-panelean - + Do you want to close this dialog? Elkarrizketa-koadro hau itxi nahi duzu? - + Invalid sketch Baliogabeko krokisa - + Do you want to open the sketch validation tool? Krokisak balidatzeko tresna ireki nahi al duzu? - + The sketch is invalid and cannot be edited. Krokisa baliogabea da eta ezin da editatu. - + Please remove the following constraint: Kendu honako murrizketa: - + Please remove at least one of the following constraints: Kendu gutxienez honako murrizketetako bat: - + Please remove the following redundant constraint: Kendu erredundantea den honako murrizketa: - + Please remove the following redundant constraints: Kendu erredundanteak diren honako murriketak: - + The following constraint is partially redundant: Honako murrizketa partzialki erredundantea da: - + The following constraints are partially redundant: Honako murrizketak partzialki erredundanteak dira: - + Please remove the following malformed constraint: Kendu gaizki eratuta dagoen honako murrizketa: - + Please remove the following malformed constraints: Kendu gaizki eratuta dauden honako murrizketak: - + Empty sketch Krokis hutsa - + Over-constrained: Gehiegi murriztutakoa: - + Malformed constraints: Gaizki eratutako murrizketak: - + Redundant constraints: Murrizketa erredundanteak: - + Partially redundant: Partzialki erredundantea: - + Solver failed to converge Ebazleak ezin izan du konbergitu - + Under constrained: Gutxiegi murriztutakoa: - + %n DoF(s) Askatasun-gradu %n @@ -5342,7 +5335,7 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. - + Fully constrained Osorik murritua @@ -5440,8 +5433,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Finkatu zirkulu baten edo arku baten diametroa @@ -5449,7 +5442,8 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Finkatu zirkulu baten edo arku baten erradioa/diametroa @@ -5457,20 +5451,12 @@ Krokisaren geometriak eta murrizketak analizatzen dira horretarako. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Finkatu zirkulu baten edo arku baten erradioa - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Finkatu zirkulu baten edo arku baten erradioa/diametroa - - Sketcher_Copy @@ -6087,7 +6073,7 @@ Eigen Sparse QR algoritmoa matrize sakabanatuetarako optimizatuta dago; normalea ViewProviderSketch - + and %1 more eta %1 gehiago @@ -6310,7 +6296,7 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Krokisak partzialki erredundanteak diren murrizketak ditu! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolak migratu dira. Migratutako fitxategiak ezin dira ireki FreeCADen aurreko bertsioetan. @@ -6320,7 +6306,7 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada. - + @@ -6345,7 +6331,7 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada. - + @@ -6368,13 +6354,13 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Murrizketak indize-informazio baliogabea du eta gaizki eratuta dago. - - - - - - - + + + + + + + @@ -6385,7 +6371,7 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada. - + Failed to add arc Huts egin du arkua gehitzeak @@ -6499,7 +6485,7 @@ Sareta-tartea aldatuko da pixel-zenbaki hau baino txikiagoa bihurtzen bada.Huts egin du kutxa gehitzeak - + Failed to add rounded rectangle Huts egin du laukizuzen biribildua gehitzeak @@ -6681,18 +6667,18 @@ Puntuak sareta-tartearen bosten bat baino hurbilago ezarri behar dira lerro bate CmdSketcherDimension - + Dimension Kota - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Murriztu testuinguruaren arabera, hautapenean oinarrituta. -Hautapenaren arabera, murriztapen batzuk edo besteak egon daitezke erabilgarri. Haien artean saltatzeko, erabili Shift tekla. -Hutsi dagoen espazioan klik eginda, uneko murriztapena baliozkotuko da. Eskuineko klik eginda edo Esc erabilita ekintza bertan behera geratuko da. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6711,14 +6697,27 @@ Hutsi dagoen espazioan klik eginda, uneko murriztapena baliozkotuko da. Eskuinek CmdSketcherCompDimensionTools - + Dimension Kota - + Dimension tools. Koten tresnak. + + CmdSketcherConstrainRadius + + + Constrain radius + Murriztu erradioa + + + + Fix the radius of a circle or an arc + Finkatu zirkulu baten edo arku baten erradioa + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts index 7fe3df4821..27410b27f8 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fi.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Rajoita ympyrän kaari - + Constrain an arc or a circle Rajoita ympyrän kaari - + Constrain radius Rajoita säde - + Constrain diameter Rajoita halkaisija - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Rajoita kulma - + Fix the angle of a line or the angle between two lines Korjaa viivan kulmaa tai kahden viivan välistä kulma @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Rajoita esteellä - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Samanlaisuus rajoite - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Rajoita halkaisija - + Fix the diameter of a circle or an arc Kiinnitä ympyrän tai kaaren halkaisija @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Etäisyys rajoitus - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Vaakasuoran etäisyyden rajoite - + Fix the horizontal distance between two points or line ends Korjaa kahden pisteen tai viivanpään vaakasuoraa etäisyyttä @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Korjaa kahden pisteen tai viivanpään pystysuoraa etäisyyttä @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Yhtäsuuruus rajoite - + Create an equality constraint between two lines or between circles and arcs Luo yhtäsuuruus rajoite kahdelle viivan tai ympyröiden ja kaarien väliin @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Vaakasuora rajoite - + Create a horizontal constraint on the selected item Luo vaakasuora rajoite valittujen osien välille @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Rajoite lukko - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Rajoita yhdensuuntaiseksi - + Create a parallel constraint between two lines Luo rinnakkaisuus rajoite kahden viivan välille @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Rajoita kohtisuorasti - + Create a perpendicular constraint between two lines Luo kohtisuora rajoitus kahden viivan väliin @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Rajoita piste objektiin - + Fix a point onto an object Korjaa piste objektin paalle @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Rajoita säde tai painokerroin - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Kiinnitä ympyrän tai kaaren säde, tai kiinnitä navan tai B-splinin painokerroin - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Rajoita taittuminen (Snellin laki) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Rajoita symmetrisesti - + Create a symmetry constraint between two points with respect to a line or a third point Luo symmetriarajoite kahden pisteen välille, @@ -615,12 +602,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherConstrainTangent - + Constrain tangent Rajoita tangentti - + Create a tangent constraint between two entities Luo tangenttirajoite kahden yksikön välillä @@ -628,12 +615,12 @@ käyttäen jakajana viivaa tai kolmatta pistettä CmdSketcherConstrainVertical - + Constrain vertically Rajoita pystysuuntaisesti - + Create a vertical constraint on the selected item Luo pystysuora rajoite valitulle kohteelle @@ -1492,12 +1479,12 @@ Tämä tyhjentää 'Tukipiste'-ominaisuuden, jos sellainen on. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktivoi/deaktivoi rajoite - + Activates or deactivates the selected constraints Aktivoi tai deaktivoi valitut rajoitteet @@ -1519,12 +1506,12 @@ rakennetilan ja tavallisen geometrian välillä edestakaisin CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Vaihda rajoite määräävän/referenssin välillä - + Set the toolbar, or the selected constraints, into driving or reference mode Vaihtaa työkalupalkin kuvakkeen, tai valitut rajoitteet, @@ -1598,370 +1585,376 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Command - - + + Add horizontal constraint Lisää vaakasuuntainen rajoite - - - + + + Add horizontal alignment Lisää vaakatasaus - - + + Add vertical constraint Lisää pystysuuntainen rajoite - + Add vertical alignment Lisää pystytasaus - + Add 'Lock' constraint Lisää 'Block' rajoitus - + Add relative 'Lock' constraint Lisää suhteellinen 'Lock' rajoite - + Add fixed constraint Lisää kiinteä rajoite - + Add 'Block' constraint Lisää 'Block' rajoitus - + Add block constraint Lisää lohkon rajoitus - - - + + + Add coincident constraint Lisää yhtenevyys-rajoite - - + + Add distance from horizontal axis constraint Lisää etäisyys vaaka-akselin rajoituksesta - - + + Add distance from vertical axis constraint Lisää etäisyys pystyakselin rajoituksesta - - + + Add point to point distance constraint Lisää pisteestä pisteeseen etäisyyden rajoite - - - + + + Add point to line Distance constraint Lisää piste viivalle etäisyysrajoite - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Lisää pituusrajoite - - + + + Dimension Mitta - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Lisää piste-on-objektilla rajoite - - + + Add point to point horizontal distance constraint Lisää pisteestä pisteeseen vaakasuuntaisen etäisyyden rajoite - + Add fixed x-coordinate constraint Lisää kiinnitetyn x-koordinaatin rajoite - - + + Add point to point vertical distance constraint Lisää pisteestä pisteeseen pystysuuntaisen etäisyyden rajoite - + Add fixed y-coordinate constraint Lisää kiinnitetyn y-koordinaatin rajoite - - + + Add parallel constraint Lisää yhdensuuntaisuuden rajoite - - - - - - - + + + + + + + Add perpendicular constraint Lisää kohtisuora rajoite - + Add perpendicularity constraint Lisää kohtisuoruuden rajoite - + Swap coincident+tangency with ptp tangency Vaihda yhtenevyyden+tangentiaalisuuden ja pisteestä-pisteeseen tangentiaalisuuden välillä - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Lisää tangentiaalisuus-rajoite - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Lisää tangenttirajoitepiste - - - - + + + + Add radius constraint Lisää säteen rajoite - - - - + + + + Add diameter constraint Lisää halkaisijan rajoite - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Lisää kulman rajoite - - + + Add equality constraint Lisää yhtäsuuruuden rajoite - - - - - + + + + + Add symmetric constraint Lisää symmetrisyyden rajoite - + Add Snell's law constraint Lisää Snellin lain rajoite - + Toggle constraint to driving/reference Vaihda rajoite määräävän/referenssin välillä - + Activate/Deactivate constraint Aktivoi/deaktivoi rajoite @@ -2037,7 +2030,7 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. - + Add sketch arc Lisää luonnos kaari @@ -2288,59 +2281,59 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Automaattinen rajoitusvirhe: Ratkaisematon luonnos kun käytetään yhdenmukaisia rajoitteita. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Ei kyetty arvaamaan reunojen risteämispistettä. Kokeile lisätä yhtenevyysrajoite pyöristettävien reunojen kärkipisteiden välille. - - + + BSpline Geometry Index (GeoID) is out of bounds. B-splinin geometria-indeksi (GeoID) on sallittujen rajojen ulkopuolella. - + You are requesting no change in knot multiplicity. Solmun moninkertaisuusarvoon ei pyydetty muutosta. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Annettu geometria-indeksi (GeoID) ei vastaa B-splini-käyrää. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Solmun indeksi on rajojen ulkopuolella. Huomaa, että OCC: n notaation mukaisesti ensimmäisellä solmulla on indeksi 1 eikä nolla. - + The multiplicity cannot be increased beyond the degree of the B-spline. Monimuotoisuusarvoa ei voi kasvattaa B-splinin astetta suuremmaksi. - + The multiplicity cannot be decreased beyond zero. Moninkertaisuusarvoa ei voi pienentää negatiiviseksi. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC ei pysty pienentämään moninkertaisuusarvoa pysyäkseen suurimmassa sallitussa toleranssissa. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2408,134 +2401,134 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2583,329 +2576,329 @@ virheellisiä rajoitteita, rappeutunutta geometriaa jne. Mittarajoite - + Cannot add a constraint between two external geometries. Ei voi lisätä rajoitusta kahden ulkoisen geometrian välillä. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Valitse luonnoksen reuna. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Mahdoton rajoite - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Kaksinkertainen rajoite - - - - - + + + + + The selected edge already has a horizontal constraint! Valitulla reunalla on jo vaakasuuntainen rajoite! - - - + + + The selected edge already has a vertical constraint! Valitulla reunalla on jo pystysuuntainen rajoite! - - - - - - + + + + + + The selected edge already has a Block constraint! Valitulla reunalla on jo lohkon rajoitus! - + The selected item(s) can't accept a horizontal constraint! Valitut kohteet eivät voi hyväksyä vaakasuoraa rajoitetta! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Valittuja pisteitä on enemmän kuin yksi. Valitse enintään yksi kiinteä piste! - + The selected item(s) can't accept a vertical constraint! Valitut kohteet eivät voi hyväksyä pystysuoraa rajoitetta! - - - + + + Select vertices from the sketch. Valitse kärkipisteet luonnoksesta. - + Select one vertex from the sketch other than the origin. Valitse luonnoksesta yksi muu piste kuin origo. - + Select only vertices from the sketch. The last selected vertex may be the origin. Valitse kärkipisteitä vain luonnoksesta. Viimeksi valittu piste saattaa olla origo. - + Wrong solver status Väärä ratkaisualgoritmin tila - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Lohkon rajoitusta ei voida lisätä, jos luonnos on ratkaisematon tai on olemassa tarpeettomia ja ristiriitaisia rajoituksia. - + Select one edge from the sketch. Valitse yksi reuna luonnoksesta. - + Select only edges from the sketch. Valitse vain reunoja luonnoksesta. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Virhe - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Valitun sijasta käytettiin tangentiaalisuutta päätepisteestä päätepisteeseen. - + Select two or more points from the sketch. Valitse kaksi tai useampia pisteitä luonnoksesta. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Valitse täsmälleen yksi viiva tai yksi piste ja yksi viiva tai kaksi pistettä sketsistä. - + Cannot add a length constraint on an axis! Akselille ei voida lisätä pituusrajoitetta! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Valitse oikeat asiat luonnoksesta. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Yksikään valituista pisteistä ei rajoittunut vastaaviin käyriin, joko koska ne ovat saman elementin osia, tai koska ne ovat molemmat ulkoisia geometrioita, tai reuna ei ole tukikelpoinen. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Yksikään valituista pisteistä ei rajoittunut vastaaviin käyriin, joko koska ne ovat saman elementin osia, tai koska ne ovat molemmat ulkoisia geometrioita. - - - - + + + + Select exactly one line or up to two points from the sketch. Valitse täsmälleen yksi viiva tai enintään kaksi pistettä sketsistä. - + Cannot add a horizontal length constraint on an axis! Akselille ei voida lisätä vaakasuoraa pituusrajoitetta! - + Cannot add a fixed x-coordinate constraint on the origin point! Alkupisteeseen ei voi lisätä kiinteää x-koordinaattirajoitetta! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Akselille ei voida lisätä vaakapituusrajoitetta! - + Cannot add a fixed y-coordinate constraint on the origin point! Alkupisteeseen ei voi lisätä kiinteää y-koordinaattirajoitetta! - + Select two or more lines from the sketch. Valitse kaksi tai useampi viiva sketsistä. - - + + Select at least two lines from the sketch. Valitse vähintään kaksi viivaa sketsistä. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2915,42 +2908,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päätepistettä; kaksi käyrää ja piste. - + Select some geometry from the sketch. perpendicular constraint Valitse jokin geometria luonnoksesta. - - + + Cannot add a perpendicularity constraint at an unconnected point! Yhdistämättömille pisteille ei voida lisätä samansuuntausuusrajoitetta! - - - + + + Perpendicular to B-spline edge currently unsupported. Ohjelma ei tällä hetkellä vielä tue kohtisuoruutta B-splinin reunan kanssa. - - + + One of the selected edges should be a line. Yhden valituista reunoista pitäisi olla viiva. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Luotu päästä päähän -tangentti. Sattumarajoitus on poistettu. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2960,182 +2953,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päätepistettä; kaksi käyrää ja piste. - + Select some geometry from the sketch. tangent constraint Valitse jokin geometria luonnoksesta. - - - + + + Cannot add a tangency constraint at an unconnected point! Yhdistämättömään pisteeseen ei voi lisätä samansuuntaisuusrajoitetta! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Väärä lukumäärä valittuja kohteita! - - + + With 3 objects, there must be 2 curves and 1 point. 3 kohteella on oltava 2 käyrää ja 1 piste. - - - + + + Tangency to B-spline edge currently unsupported. Ohjelma ei tällä hetkellä vielä tue tangentiaalisuutta B-splinin reunan kanssa. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Valitse yksi tai userampia kaaria tai ympyröitä luonnoksesta. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Valitse luonnoksesta yksi tai useampi B-Splinien napa, tai yksi tai useampi kaari tai ympyrä, mutta ei molempien ryhmien sekamuotoa. - - - + + + Constraint only applies to arcs or circles. Rajoite sopii vain kaarille tai ympyröille. - - + + Select one or two lines from the sketch. Or select two edges and a point. Valitse yksi tai useampi viiva luonnoksesta. Tai valitse kaksi reunaa ja piste. - - + + Parallel lines Samansuuntaiset viivat - - + + An angle constraint cannot be set for two parallel lines. Kulma-rajoitusta ei voi määrittää kahdelle samansuuntaiselle viivalle. - + Cannot add an angle constraint on an axis! Akseliin ei voi lisätä kulmarajoitetta! - + Select two edges from the sketch. Valitse kaksi reunaa sketsistä. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Ohjelma ei tällä hetkellä vielä tue yhtäsuuruutta B-splinin reunan kanssa. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Valitse kaksi pistettä ja symmetria linja, kaksi pistettä ja symmetria kohta, tai linja ja symmetriakohta luonnoksesta. - - + + Cannot add a symmetry constraint between a line and its end points. Ei voida lisätä symmetristä rajoitusta viivan ja sen päätepisteiden väliin. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Viivan ja sen päätepisteiden välille ei voi lisätä symmetriarajoitetta! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Valitse kaksi viivojen päätepistettä säteinä toimimaan sekä reuna kuvaamaan rajaa. Ensimmäinen valittu piste vastaa indeksiä n1, toinen - n2 ja viitearvo määrittää suhteen n2/n1. - + Selected objects are not just geometry from one sketch. Valitut kohteet eivät ole vain yhden luonnoksen geometriaa. - + Cannot create constraint with external geometry only. Rajoitetta ei voi luoda vain ulkoista geometriaa käyttämällä. - + Incompatible geometry is selected. Valittuna on epäyhteensopivaa geometriaa. - + SnellsLaw on B-spline edge is currently unsupported. Ohjelma ei tällä hetkellä vielä tue Snellin lakia B-splinin reunan kanssa. - - - - - + + + + + Select constraints from the sketch. Valitse rajoitteet luonnoksesta. @@ -3634,12 +3627,12 @@ Hyväksytyt yhdistelmät: kaksi käyrää; päätepiste ja käyrä; kaksi päät Pituus: - + Refractive index ratio Taitekerroin suhdeluku - + Ratio n2/n1: Suhde n2/n1: @@ -5231,112 +5224,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Muokkaa luonnosta - + A dialog is already open in the task panel Valintaikkuna on jo avoinna tehtäväpaneelissa - + Do you want to close this dialog? Haluatko sulkea tämän valintaikkunan? - + Invalid sketch Virheellinen luonnos - + Do you want to open the sketch validation tool? Haluatko avata luonnoksen validointityökalun? - + The sketch is invalid and cannot be edited. Luonnos on virheellinen eikä sitä voi muokata. - + Please remove the following constraint: Poista seuraava rajoite: - + Please remove at least one of the following constraints: Poista ainakin yksi seuraavista rajoitteista: - + Please remove the following redundant constraint: Poista seuraava turha rajoite: - + Please remove the following redundant constraints: Poista seuraavat turhat rajoitteet: - + The following constraint is partially redundant: Seuraava rajoite on osittain tarpeeton: - + The following constraints are partially redundant: Seuraavat rajoitteet ovat osittain tarpeettomia: - + Please remove the following malformed constraint: Poista seuraava virheellinen rajoite: - + Please remove the following malformed constraints: Poista seuraavat virheelliset rajoitteet: - + Empty sketch Tyhjä luonnos - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) @@ -5344,7 +5337,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fully constrained @@ -5442,8 +5435,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Kiinnitä ympyrän tai kaaren halkaisija @@ -5451,7 +5444,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5459,20 +5453,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Korjaa ympyrän tai kaaren sädettä - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc - - Sketcher_Copy @@ -6089,7 +6075,7 @@ Eigen-Sparse-QR -algoritmi on optimoitu matriiseille jotka ovat harvoja; yleens ViewProviderSketch - + and %1 more and %1 more @@ -6312,7 +6298,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6323,7 +6309,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6348,7 +6334,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6371,13 +6357,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6388,7 +6374,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6502,7 +6488,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6684,17 +6670,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Mitta - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6714,14 +6700,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Mitta - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Rajoita säde + + + + Fix the radius of a circle or an arc + Korjaa ympyrän tai kaaren sädettä + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts index 643cadce62..3af178096d 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_fr.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Contrainte d'arc ou de cercle - + Constrain an arc or a circle Contraindre un arc ou un cercle - + Constrain radius Contrainte de rayon - + Constrain diameter Contrainte de diamètre - + Constrain auto radius/diameter Contrainte automatique rayon/diamètre @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Contrainte angulaire - + Fix the angle of a line or the angle between two lines Fixer l'angle d'une ligne ou l'angle entre deux lignes @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Contraindre un blocage - + Block the selected edge from moving Bloquer le déplacement de l'arête sélectionnée @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Contrainte coïncidente - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Créer une contrainte de coïncidence entre les points, ou une contrainte concentrique entre les cercles, les arcs et les ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Contrainte de diamètre - + Fix the diameter of a circle or an arc Fixer le diamètre d'un cercle ou d'un arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Contrainte dimensionnelle - + Fix a length of a line or the distance between a line and a vertex or between two circles Fixer la longueur d'une ligne ou la distance entre une ligne et un sommet ou entre deux cercles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Contrainte de distance horizontale - + Fix the horizontal distance between two points or line ends Fixer la distance horizontale entre deux points ou extrémités de ligne @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Contrainte de distance verticale - + Fix the vertical distance between two points or line ends Fixer la distance verticale entre deux points ou extrémités de ligne @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Contrainte d'égalité - + Create an equality constraint between two lines or between circles and arcs Créer une contrainte d'égalité entre deux lignes ou entre des cercles et/ou des arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Contrainte horizontale - + Create a horizontal constraint on the selected item Créer une contrainte horizontale sur l'élément sélectionné @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Contrainte fixe - + Create both a horizontal and a vertical distance constraint on the selected vertex Créer deux contraintes de distance (horizontale et verticale) sur le sommet sélectionné @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Contrainte parallèle - + Create a parallel constraint between two lines Créer une contrainte parallèle entre deux lignes @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Contrainte perpendiculaire - + Create a perpendicular constraint between two lines Créer une contrainte de perpendicularité entre deux lignes @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Contrainte point sur objet - + Fix a point onto an object Fixer un point sur un objet @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Contrainte automatique rayon/diamètre - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fixer le diamètre si l'on choisit un cercle ou le rayon si l'on choisit un arc ou un pôle de spline - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Contrainte de rayon ou de poids - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fixe le rayon d’un cercle ou d’un arc ou fixe le poids d’un pôle d’une B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Contrainte de réfraction (loi de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crée une contrainte de réfraction (loi de Snell) entre deux extrémités de lignes et une arête en tant qu'interface. @@ -598,12 +585,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Contrainte symétrique - + Create a symmetry constraint between two points with respect to a line or a third point Crée une contrainte de symétrie entre deux points par rapport à une ligne ou un point @@ -612,12 +599,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Contrainte tangente - + Create a tangent constraint between two entities Créer une contrainte tangente entre deux entités @@ -625,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Contrainte verticale - + Create a vertical constraint on the selected item Créer une contrainte verticale sur l'élément sélectionné @@ -1324,7 +1311,7 @@ Cela effacera la propriété 'Support', le cas échéant. Select conflicting constraints - Sélectionne les contraintes en conflit + Sélectionner les contraintes en conflit @@ -1332,12 +1319,12 @@ Cela effacera la propriété 'Support', le cas échéant. Select associated constraints - Sélectionne les contraintes associées + Sélectionner les contraintes associées Select the constraints associated with the selected geometrical elements - Sélectionne les contraintes associées aux éléments géométriques sélectionnés + Sélectionner les contraintes associées aux éléments géométriques sélectionnés @@ -1350,7 +1337,7 @@ Cela effacera la propriété 'Support', le cas échéant. Select the geometrical elements associated with the selected constraints - Sélectionne les éléments géométriques associés aux contraintes sélectionnées + Sélectionner les éléments géométriques associés aux contraintes sélectionnées @@ -1385,7 +1372,7 @@ Cela effacera la propriété 'Support', le cas échéant. Select malformed constraints - Sélectionne les contraintes malformées + Sélectionner les contraintes malformées @@ -1407,7 +1394,7 @@ Cela effacera la propriété 'Support', le cas échéant. Select partially redundant constraints - Sélectionne les contraintes partiellement redondantes + Sélectionner les contraintes partiellement redondantes @@ -1416,7 +1403,7 @@ Cela effacera la propriété 'Support', le cas échéant. Select redundant constraints - Sélectionne les contraintes redondantes + Sélectionner les contraintes redondantes @@ -1487,12 +1474,12 @@ Cela effacera la propriété 'Support', le cas échéant. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activer/désactiver la contrainte - + Activates or deactivates the selected constraints Active ou désactive les contraintes sélectionnées @@ -1513,12 +1500,12 @@ Cela effacera la propriété 'Support', le cas échéant. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Basculer les contraintes pilotantes/pilotées - + Set the toolbar, or the selected constraints, into driving or reference mode Basculer la barre d'outils, ou les contraintes sélectionnées, @@ -1592,370 +1579,376 @@ les contraintes invalides, les géométries dégénérées, etc. Command - - + + Add horizontal constraint Ajouter une contrainte horizontale - - - + + + Add horizontal alignment Ajouter un alignement horizontal - - + + Add vertical constraint Ajouter une contrainte verticale - + Add vertical alignment Ajouter un alignement vertical - + Add 'Lock' constraint Ajouter la contrainte 'Verrouiller' - + Add relative 'Lock' constraint Ajouter une contrainte "fixe" relative - + Add fixed constraint Ajouter une contrainte fixe - + Add 'Block' constraint Ajouter une contrainte de blocage - + Add block constraint Ajouter une contrainte de blocage - - - + + + Add coincident constraint Ajouter une contrainte de coïncidence - - + + Add distance from horizontal axis constraint Ajouter une contrainte de distance par rapport à l'axe horizontal - - + + Add distance from vertical axis constraint Ajouter une contrainte de distance par rapport à l'axe vertical - - + + Add point to point distance constraint Ajouter une contrainte de distance entre points - - - + + + Add point to line Distance constraint Ajouter une contrainte de distance point à ligne - - + + Add circle to circle distance constraint - Ajouter une contrainte de distance entre les cercles + Ajouter une contrainte de distance d'un cercle à un cercle - + Add circle to line distance constraint - Ajouter une contrainte de distance entre les cercles + Ajouter une contrainte de distance d'un cercle à une ligne - - - - - - + + + + + + Add length constraint Ajouter une contrainte de longueur - - + + + Dimension Dimension - + Add lock constraint Ajouter une contrainte de verrouillage - + Add 'Distance to origin' constraint - Ajouter la contrainte 'Distance à l'origine' + Ajouter une contrainte de distance par rapport à l'origine - - - + + + Add Distance constraint Ajouter une contrainte de distance - - - + + + Add 'Horizontal' constraints - Ajouter des contraintes "horizontales" - - - - - - Add 'Vertical' constraints - Ajouter des contraintes "verticales" + Ajouter une contrainte horizontale - + + + Add 'Vertical' constraints + Ajouter une contrainte verticale + + + + Add Symmetry constraint Ajouter une contrainte de symétrie - - + + Add Symmetry constraints Ajouter des contraintes de symétrie - - + + Add Distance constraints Ajouter des contraintes de distance - + Add Horizontal constraint Ajouter une contrainte horizontale - + Add Vertical constraint Ajouter une contrainte verticale - + Add Block constraint Ajouter une contrainte de blocage - + Add Angle constraint Ajouter une contrainte d'angle - - - - + + + + Add Equality constraint Ajouter une contrainte d'égalité - + Add Equality constraints Ajouter des contraintes d'égalité - + Add Radius constraint Ajouter une contrainte de rayon - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Ajouter une contrainte concentrique et de longueur - + Add DistanceX constraint Ajouter une contrainte de distance en X - + Add DistanceY constraint Ajouter une contrainte de distance en Y - + Add point to circle Distance constraint Ajouter une contrainte de distance d'un point à un cercle - - + + Add point on object constraint Ajouter une contrainte point sur objet - - + + Add point to point horizontal distance constraint Ajouter une contrainte de distance horizontale point à point - + Add fixed x-coordinate constraint Ajouter une contrainte fixe de coordonnée X - - + + Add point to point vertical distance constraint Ajouter une contrainte de distance verticale point à point - + Add fixed y-coordinate constraint Ajouter une contrainte fixe de coordonnée Y - - + + Add parallel constraint Ajouter une contrainte parallèle - - - - - - - + + + + + + + Add perpendicular constraint Ajouter une contrainte perpendiculaire - + Add perpendicularity constraint Ajouter une contrainte de perpendicularité - + Swap coincident+tangency with ptp tangency Permuter coincidence+tangence avec une tangente sommet/sommet - + Swap PointOnObject+tangency with point to curve tangency Échanger Point sur objet + tangence pour Point à courbe + tangence - - - - - - - + + + + + + + Add tangent constraint Ajouter une contrainte de tangence - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Ajouter un point de contrainte de tangence - - - - + + + + Add radius constraint Contraindre le rayon - - - - + + + + Add diameter constraint Contraindre le diamètre - - - - + + + + Add radiam constraint Ajouter une contrainte de rayon/diamètre - - - - - - + + + + + + Add angle constraint Ajouter une contrainte d'angle - - + + Add equality constraint Ajouter une contrainte d'égalité - - - - - + + + + + Add symmetric constraint Ajouter une contrainte de symétrie - + Add Snell's law constraint Ajouter une contrainte de loi de Snell - + Toggle constraint to driving/reference Basculer les contraintes pilotantes/pilotées - + Activate/Deactivate constraint Activer/désactiver la contrainte @@ -2031,7 +2024,7 @@ les contraintes invalides, les géométries dégénérées, etc. - + Add sketch arc Ajouter un arc à l'esquisse @@ -2282,59 +2275,59 @@ les contraintes invalides, les géométries dégénérées, etc. Erreur de contrainte automatique : esquisse insoluble après l'application des contraintes d'égalité. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. L'intersection des courbes n'a pas pu être trouvée. Essayez d’ajouter une contrainte de coïncidence entre les sommets des courbes sur lesquels vous souhaitez appliquer un congé. - - + + BSpline Geometry Index (GeoID) is out of bounds. L'Index de la géométrie de la B-spline (GeoID) est hors limites. - + You are requesting no change in knot multiplicity. Vous ne demandez aucun changement dans la multiplicité du nœud. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. L’Index de la géométrie (GeoID) fourni n’est pas une courbe B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. L’index du nœud est hors limites. Notez que, conformément à la notation OCC, le premier nœud a un indice de 1 et non pas de zéro. - + The multiplicity cannot be increased beyond the degree of the B-spline. La multiplicité ne peut pas être augmentée au-delà du degré de la B-spline. - + The multiplicity cannot be decreased beyond zero. La multiplicité ne peut pas être diminuée au-delà de zéro. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC ne parvient pas à diminuer la multiplicité selon la tolérance maximale. - + Knot cannot have zero multiplicity. Le nœud ne peut pas avoir zéro de multiplicité. - + Knot multiplicity cannot be higher than the degree of the BSpline. La multiplicité du nœud ne peut pas être supérieure au degré de la courbe BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Le nœud ne peut pas être inséré en dehors de la plage de paramètres de la B-spline. @@ -2402,134 +2395,134 @@ les contraintes invalides, les géométries dégénérées, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2577,329 +2570,329 @@ les contraintes invalides, les géométries dégénérées, etc. Contrainte dimensionnelle - + Cannot add a constraint between two external geometries. Impossible d'ajouter une contrainte entre deux géométries externes. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Impossible d'ajouter une contrainte entre deux géométries fixes. Les géométries fixes comprennent la géométrie externe, la géométrie bloquée et les points spéciaux tels que les points de nœuds des B-splines. - + Sketcher Constraint Substitution Substitution de contraintes d'esquisse - + Keep notifying me of constraint substitutions Continuer à me notifier des substitutions de contraintes - - - + + + Only sketch and its support are allowed to be selected. Seule l'esquisse et son support peuvent être sélectionnés. - + One of the selected has to be on the sketch. Une des sélections doit être sur l'esquisse. - - + + Select an edge from the sketch. Sélectionnez une arête de l'esquisse. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Contrainte impossible - - - - + + + + The selected edge is not a line segment. L'arête sélectionnée n'est pas un segment de ligne. - - - - - - + + + + + + Double constraint Double contrainte - - - - - + + + + + The selected edge already has a horizontal constraint! L’arête sélectionnée possède déjà une contrainte horizontale ! - - - + + + The selected edge already has a vertical constraint! L’arête sélectionnée possède déjà une contrainte verticale ! - - - - - - + + + + + + The selected edge already has a Block constraint! L’arête sélectionnée possède déjà une contrainte de blocage ! - + The selected item(s) can't accept a horizontal constraint! Le(s) élément(s) sélectionné(s) ne peu(ven)t pas accepter de contrainte horizontale! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Plus d'un point fixe est sélectionné. Sélectionner au maximum un point fixe ! - + The selected item(s) can't accept a vertical constraint! Le(s) élément(s) sélectionné(s) ne peu(ven)t pas accepter de contrainte verticale! - - - + + + Select vertices from the sketch. Sélectionner des sommets de l’esquisse. - + Select one vertex from the sketch other than the origin. Sélectionner un sommet de l'esquisse autre que l'origine. - + Select only vertices from the sketch. The last selected vertex may be the origin. Sélectionner uniquement les sommets de l'esquisse. Le dernier sommet sélectionné peut être l'origine. - + Wrong solver status Erreur de statut du solveur - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Une contrainte de blocage ne peut pas être ajoutée si l'esquisse n'est pas résolue ou s'il y a des contraintes redondantes ou conflictuelles. - + Select one edge from the sketch. Sélectionnez une arête de l’esquisse. - + Select only edges from the sketch. Sélectionnez uniquement des arêtes de l'esquisse. - + Number of selected objects is not 3 Le nombre d'objets sélectionnés n'est pas 3 - + Error Erreur - + Unexpected error. More information may be available in the Report View. - Erreur inattendue. Plus d'informations peuvent être disponibles dans la vue rapport. + Erreur inattendue. Plus d'informations peuvent être disponibles dans la Vue rapport. - + Endpoint to endpoint tangency was applied instead. Une contrainte de tangence entre points d'extrémité a été créée à la place. - + Select two or more points from the sketch. Sélectionner deux ou plusieurs points de l’esquisse. - + Select two or more vertices from the sketch. Sélectionner deux sommets de l'esquisse ou plus. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Sélectionner deux sommets ou plus de l’esquisse pour une contrainte de coïncidence, ou deux ou plusieurs cercles, ellipses, arcs ou arcs d’ellipse pour une contrainte concentrique. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Sélectionner deux sommets de l'esquisse pour une contrainte de coïncidence, ou deux cercles, ellipses, arcs ou arcs d'ellipse pour une contrainte concentrique. - + Select exactly one line or one point and one line or two points from the sketch. Sélectionnez soit une seule ligne, ou un point et une ligne, ou deux points de l'esquisse. - + Cannot add a length constraint on an axis! Impossible d'ajouter une contrainte de longueur sur un axe ! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Sélectionner exactement une ligne ou un point et une ligne ou deux points ou deux cercles de l'esquisse. - + This constraint does not make sense for non-linear curves. Cette contrainte n'a pas de sens pour les courbes non linéaires. - + Endpoint to edge tangency was applied instead. Une tangence entre point d'extrémité et arête a été appliquée à la place. - - - - - - - + + + + + + + Select the right things from the sketch. Sélectionner les bons éléments de l'esquisse. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Sélectionner une arête qui ne représente pas un poids d'une B-Spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Aucun des points sélectionnés n'a été contraint aux courbes respectives, soit parce que ce sont des parties du même élément, soit parce qu'ils sont tous deux de la géométrie externe, soit parce que la ligne n'est pas éligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Aucun des points sélectionnés n'ont été contraints aux courbes respectives, soit parce qu'ils font partie du même élément, soit parce qu'ils font tous partie de géométries externes. - - - - + + + + Select exactly one line or up to two points from the sketch. Sélectionner soit une seule ligne soit jusqu'à deux points de l'esquisse. - + Cannot add a horizontal length constraint on an axis! Impossible d'ajouter une contrainte de longueur horizontale sur un axe ! - + Cannot add a fixed x-coordinate constraint on the origin point! Impossible d'ajouter une contrainte fixe de coordonnée x sur le point d'origine ! - - + + This constraint only makes sense on a line segment or a pair of points. Cette contrainte n’a de sens que sur un segment de ligne ou une paire de points. - + Cannot add a vertical length constraint on an axis! Impossible d'ajouter une contrainte de longueur verticale sur un axe ! - + Cannot add a fixed y-coordinate constraint on the origin point! Impossible d'ajouter une contrainte fixe de coordonnée y sur le point d'origine ! - + Select two or more lines from the sketch. Sélectionnez au moins deux lignes de l'esquisse. - - + + Select at least two lines from the sketch. Sélectionner au moins deux lignes de l'esquisse. - + Select a valid line. Sélectionner une ligne valide. - - + + The selected edge is not a valid line. L'arête sélectionnée n'est pas une ligne valide. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2909,42 +2902,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaisons acceptés : deux courbes ; un point d'extrémité et une courbe ; deux points d'extrémités ; deux courbes et un point. - + Select some geometry from the sketch. perpendicular constraint Sélectionnez une géométrie de l'esquisse. - - + + Cannot add a perpendicularity constraint at an unconnected point! Impossible d'ajouter une contrainte de perpendicularité sur un point non connecté ! - - - + + + Perpendicular to B-spline edge currently unsupported. Contrainte perpendiculaire à arête B-spline actuellement non prise en charge. - - + + One of the selected edges should be a line. Une des arêtes sélectionnées doit être une ligne. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Une contrainte de tangence entre points d'extrémité a été créée. La contrainte de coïncidence a été supprimée. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Une contrainte de tangence entre point d'extrémité et arête a été créée. La contrainte point sur objet a été supprimée. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2954,182 +2947,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinaisons acceptés : deux courbes ; un point d'extrémité et une courbe ; deux points d'extrémités ; deux courbes et un point. - + Select some geometry from the sketch. tangent constraint Sélectionnez une géométrie de l'esquisse. - - - + + + Cannot add a tangency constraint at an unconnected point! Impossible d'ajouter une contrainte de tangence à un point non connecté ! - - + + Tangent constraint at B-spline knot is only supported with lines! La contrainte de tangente au nœud de la B-spline n'est pris en charge que par des lignes ! - + B-spline knot to endpoint tangency was applied instead. Le nœud de la B-spline à la tangence du dernier point a été appliqué à la place. - + Select either one point and several curves, or one curve and several points. Sélectionner soit un point et plusieurs courbes, soit une courbe et plusieurs points. - - + + Wrong number of selected objects! Nombre d'objets sélectionnés erroné ! - - + + With 3 objects, there must be 2 curves and 1 point. Pour une sélection de 3 objets, il doit y avoir 2 courbes et 1 point. - - - + + + Tangency to B-spline edge currently unsupported. Tangence à arrête B-spline actuellement non prise en charge. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Sélectionnez un ou plusieurs arcs ou cercles dans l'esquisse. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Sélectionner soit un ou plusieurs pôles B-Spline ou un ou plusieurs arcs ou cercles de l'esquisse, mais pas mélangés. - - - + + + Constraint only applies to arcs or circles. Contrainte applicable qu’aux arcs ou cercles. - - + + Select one or two lines from the sketch. Or select two edges and a point. Sélectionnez une ou deux lignes dans l'esquisse. Ou sélectionnez deux arêtes et un point. - - + + Parallel lines Lignes parallèles - - + + An angle constraint cannot be set for two parallel lines. Une contrainte angulaire ne peut pas être appliquée à deux lignes parallèles. - + Cannot add an angle constraint on an axis! Impossible d'ajouter une contrainte angulaire sur un axe ! - + Select two edges from the sketch. Sélectionnez deux arêtes de l'esquisse. - + Select two or more compatible edges. Sélectionner deux arêtes compatibles ou plus. - + Sketch axes cannot be used in equality constraints. Les axes de l'esquisse ne peuvent pas être utilisés comme des contraintes d'alignement interne. - + Equality for B-spline edge currently unsupported. Égalité pour arête B-Spline actuellement non prise en charge. - - - - + + + + Select two or more edges of similar type. Sélectionner deux arêtes de type similaire ou plus. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Sélectionnez deux points et une ligne de symétrie, deux points et un point de symétrie, ou une ligne et un point de symétrie dans l'esquisse. - - + + Cannot add a symmetry constraint between a line and its end points. Impossible d'ajouter une contrainte de symétrie entre une ligne et ses extrémités. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Impossible d'ajouter une contrainte de symétrie entre une ligne et ses points d'extrémité ! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Sélectionner deux extrémités de lignes pour agir comme des rayons, et une arête qui représente une limite. Le premier point sélectionné correspond à l'indice n1, le deuxième à n2, et la valeur définit la rapport n2/n1. - + Selected objects are not just geometry from one sketch. Les objets sélectionnés ne sont pas seulement des géométries de l'esquisse. - + Cannot create constraint with external geometry only. Impossible de créer une contrainte avec uniquement une géométrie externe. - + Incompatible geometry is selected. La géométrie sélectionnée est incompatible. - + SnellsLaw on B-spline edge is currently unsupported. La loi de Snell sur les arêtes B-spline n'est actuellement pas prise en charge. - - - - - + + + + + Select constraints from the sketch. Sélectionner les contraintes de l'esquisse. @@ -3630,12 +3623,12 @@ Voir la documentation pour plus de détails. Longueur : - + Refractive index ratio Ratio de l'indice de réfraction - + Ratio n2/n1: Ratio n2/n1 : @@ -3950,12 +3943,12 @@ Voir la documentation pour plus de détails. Choose orientation - Sélectionner l'orientation + Sélection du plan Sketch orientation - Orientation de l'esquisse + Plan de l'esquisse @@ -4718,7 +4711,7 @@ Click "Swap endpoints in constraints" button to reassign endpoints. Do this only %2 contraintes sont appliquées aux extrémités. Ces contraintes sont affichées dans la vue rapport (menu Affichage -> Panneaux -> Vue rapport). -Cliquez sur le bouton «Inverser les points d'extrémité des contraintes» pour réaffecter ces extrémités. Ne faites ceci qu'une seule fois pour les esquisses créés avec une version de FreeCAD antérieure à 0.15 +Cliquez sur le bouton "Permuter les extrémité des contraintes" pour réaffecter ces extrémités. Ne faites ceci qu'une seule fois pour les esquisses créés avec une version de FreeCAD antérieure à 0.15 @@ -4753,7 +4746,7 @@ Toutefois, aucune contrainte liée aux extrémités n'a été trouvée. Orientation locking was disabled for %1 constraints. The constraints have been listed in Report view (menu View -> Panels -> Report view). Note that for all future constraints, the locking still defaults to ON. - Le verrouillage de l'orientation a été désactivé pour %1 contraintes. Ces contraintes sont indiquées dans la vue rapport (menu Affichage -> Panneaux -> Vue rapport). Notez que pour les contraintes futures, le verrouillage par défaut est toujours activé. + Le verrouillage de l'orientation a été désactivé pour %1 contraintes. Ces contraintes sont indiquées dans la Vue rapport (menu Affichage -> Panneaux -> Vue rapport). Notez que pour les contraintes futures, le verrouillage par défaut est toujours activé. @@ -4887,7 +4880,7 @@ Toutefois, aucune contrainte liée aux extrémités n'a été trouvée. Settings - Paramètres + Réglages @@ -5224,112 +5217,112 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. SketcherGui::ViewProviderSketch - + Edit sketch Modifier l'esquisse - + A dialog is already open in the task panel Une boîte de dialogue est déjà ouverte dans le panneau des tâches - + Do you want to close this dialog? Voulez-vous fermer cette boîte de dialogue? - + Invalid sketch Esquisse non valide - + Do you want to open the sketch validation tool? Voulez-vous ouvrir l'outil de validation d'esquisse ? - + The sketch is invalid and cannot be edited. L'esquisse n'est pas valide et ne peut pas être éditée. - + Please remove the following constraint: Veuillez supprimer la contrainte suivante : - + Please remove at least one of the following constraints: Veuillez supprimer au moins une des contraintes suivantes : - + Please remove the following redundant constraint: Veuillez supprimer la contrainte redondante suivante : - + Please remove the following redundant constraints: Veuillez supprimer les contraintes redondantes suivantes : - + The following constraint is partially redundant: La contrainte suivante est partiellement redondante : - + The following constraints are partially redundant: Les contraintes suivantes sont partiellement redondantes : - + Please remove the following malformed constraint: Veuillez supprimer la contrainte malformée suivante : - + Please remove the following malformed constraints: Veuillez supprimer les contraintes malformées suivantes : - + Empty sketch Esquisse vide - + Over-constrained: L'esquisse possède trop de contraintes: - + Malformed constraints: Contraintes mal formées : - + Redundant constraints: Contraintes redondantes : - + Partially redundant: Contraintes partiellement redondantes: - + Solver failed to converge Le solveur n'a pas pu converger - + Under constrained: L'esquisse manque de contraintes : - + %n DoF(s) %n Degré de liberté @@ -5337,7 +5330,7 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. - + Fully constrained Entièrement contrainte @@ -5435,8 +5428,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixer le diamètre d'un cercle ou d'un arc @@ -5444,7 +5437,8 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fixer le rayon/diamètre d'un arc ou d'un cercle @@ -5452,20 +5446,12 @@ Cela est fait en analysant les géométries et les contraintes de l'esquisse. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixer le rayon d'un cercle ou d'un arc - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fixer le rayon/diamètre d'un arc ou d'un cercle - - Sketcher_Copy @@ -6080,7 +6066,7 @@ L'algorithme Eigen Sparse QR est optimisé pour les matrices peu denses, génér ViewProviderSketch - + and %1 more et %1 de plus @@ -6303,7 +6289,7 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p L'esquisse a des contraintes partiellement redondantes ! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Les paraboles ont été migrées. Les fichiers migrés ne pourront pas être ouverts par les versions précédentes de FreeCAD !! @@ -6314,7 +6300,7 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p - + @@ -6339,7 +6325,7 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p - + @@ -6362,13 +6348,13 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p La contrainte a des informations d'index non valides et est mal formée. - - - - - - - + + + + + + + @@ -6379,7 +6365,7 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p - + Failed to add arc Impossible d'ajouter un arc @@ -6493,7 +6479,7 @@ L'espacement de la grille est modifié s'il devient inférieur à ce nombre de p Impossible d'ajouter un rectangle - + Failed to add rounded rectangle Impossible d'ajouter un rectangle arrondi @@ -6675,18 +6661,18 @@ Les points doivent être placés à moins d'un cinquième de l'espacement de la CmdSketcherDimension - + Dimension Dimension - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Contrainte contextuellement en fonction de votre sélection. -Selon votre sélection, vous pourriez avoir plusieurs contraintes disponibles. Vous pouvez les parcourir à l'aide de la touche CTRL. -Un clic gauche dans un espace vide validera la contrainte en cours. Cliquez avec le bouton droit ou appuyez sur Échap pour annuler. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6705,14 +6691,27 @@ Un clic gauche dans un espace vide validera la contrainte en cours. Cliquez avec CmdSketcherCompDimensionTools - + Dimension Dimension - + Dimension tools. Outils de dimensionnement. + + CmdSketcherConstrainRadius + + + Constrain radius + Contrainte de rayon + + + + Fix the radius of a circle or an arc + Fixer le rayon d'un cercle ou d'un arc + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts index 6835ba9a13..9a46054774 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_gl.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Constrinxir arco ou círculo - + Constrain an arc or a circle Constrinxir un arco ou un círculo - + Constrain radius Constrinxir raio - + Constrain diameter Constrixir diámetro - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Constrinxir o ángulo - + Fix the angle of a line or the angle between two lines Fixar o ángulo dunha liña ou o ángulo entre dúas liñas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Constrinxir coincidentes - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Constrixir diámetro - + Fix the diameter of a circle or an arc Fixa o diámetro dun círculo ou arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Constrinxir a distancia - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Fixar a distancia horizontal entre dous puntos ou os cabos dunha liña @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Fixar a distancia vertical entre dous puntos ou os cabos dunha liña @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Constrinxir a igualdade - + Create an equality constraint between two lines or between circles and arcs Fai unha constrición de igualdade entre dúas liñas ou entre círculos e arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Constrinxir horizontalmente - + Create a horizontal constraint on the selected item Fai unha constrición horizontal nos elementos escolmados @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Constrición fixa - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Constrinxir o paralelismo - + Create a parallel constraint between two lines Fai unha constrición de paralelismo entre dúas liñas @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Constrinxir a perpendicularidade - + Create a perpendicular constraint between two lines Fai unha constrición de perpendicularidade entre dúas liñas @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Constrinxir un punto a un obxecto - + Fix a point onto an object Fixa un punto a un obxecto @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Constrain radius or weight - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Constrinxir a simetría - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -615,12 +602,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Constrinxir a tanxencia - + Create a tangent constraint between two entities Fai unha constrición de tanxencia entre dúas entidades @@ -628,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Constrinxir verticalmente - + Create a vertical constraint on the selected item Fai unha constrición vertical nos elementos escolmados @@ -1492,12 +1479,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Activates or deactivates the selected constraints @@ -1518,12 +1505,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1597,370 +1584,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Add length constraint - - + + + Dimension Acoutamento - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2036,7 +2029,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Add sketch arc @@ -2287,59 +2280,59 @@ invalid constraints, degenerated geometry, etc. Erro auto constrición: esbozo sen solución despois de aplicar constricións de igualdade. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Non se pode adiviñar a intersección de curvas. Tenta engadir unha constrición entre os vértices das curvas que queres achaflanar. - - + + BSpline Geometry Index (GeoID) is out of bounds. A xeometría BSpline de Index (GeoID) está fora da construción. - + You are requesting no change in knot multiplicity. Vostede está solicitando sen troco en multiplicidade de nodo. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. A Xeometría Index (Geold) proporcionada non é unha curva BSpline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. O índice de nodo está fora dos límites. Note que según en concordancia coa notación da OCC, o primeiro nodo ten índice 1 e non 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. A multiplicidade non pode incrementada máis alá do grao da BSpline. - + The multiplicity cannot be decreased beyond zero. A multiplicidade non pode ser diminuida máis alá de cero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC non é quen de diminuir a multiplicidade dentro da tolerancia máxima. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2407,134 +2400,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ invalid constraints, degenerated geometry, etc. Constrinxir dimensión - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Escolme unha aresta do esbozo. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Imposible constrinxir - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Dobre constrición - - - - - + + + + + The selected edge already has a horizontal constraint! A bordo escolmado xa ten unha constrición horizontal! - - - + + + The selected edge already has a vertical constraint! A bordo escolmado xa ten unha constrición vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! O bordo escolmado xa ten constrición de Bloque! - + The selected item(s) can't accept a horizontal constraint! O/s elemento/s escolmado/s non pode/n aceptar unha constrición horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hai máis dun punto fixo escolmado. Escolma un máximo dun punto fixo! - + The selected item(s) can't accept a vertical constraint! O/s elemento/s escolmado/s non pode/n aceptar unha constrición vertical! - - - + + + Select vertices from the sketch. Escolmar vértices do esbozo. - + Select one vertex from the sketch other than the origin. Escolme un vértice do esbozo distinto da orixe. - + Select only vertices from the sketch. The last selected vertex may be the origin. Escolma só vértices do croquis. O último vértice escolmado pode ser a orixe. - + Wrong solver status Erro no estado do resolvedor - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Escolmado dun bordo dende o esbozo. - + Select only edges from the sketch. Escolmado só de bordos dende esbozos. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Erro - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. No seu lugar aplicouse a tanxencia de punto final ao punto final. - + Select two or more points from the sketch. Escolmar dous ou máis vértices do esbozo. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Escolme unicamente unha liña, unha liña mais un punto ou dous puntos do esbozo. - + Cannot add a length constraint on an axis! Non se pode engadir unha constrición de lonxitude nun eixo! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Escolmar as cousas correctas do esbozo. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ningún dos puntos escolmados foron limitados nas curvas respectivas, ben porque son partes dun mesmo elemento, ou ben porque os dous son de xeometría externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Escolme unicamente unha liña ou ata dous puntos do esbozo. - + Cannot add a horizontal length constraint on an axis! Non se pode engadir unha constrición de lonxitude horizontal nun eixo! - + Cannot add a fixed x-coordinate constraint on the origin point! Non se pode engadir unha constrición de coordenada X no punto de orixe! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Non se pode engadir unha constrición de lonxitude vertical nun eixo! - + Cannot add a fixed y-coordinate constraint on the origin point! Non se pode engadir unha constrición de coordenada Y no punto de orixe! - + Select two or more lines from the sketch. Escolmar dúas ou máis liñas do esbozo. - - + + Select at least two lines from the sketch. Escolmar polo menos dúas liñas do esbozo. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2906,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas curvas mais un punto. - + Select some geometry from the sketch. perpendicular constraint Escolme algunha xeometría do esbozo. - - + + Cannot add a perpendicularity constraint at an unconnected point! Non se pode engadir unha constrición de perpendicularidade nun punto non conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular a arista de B-spline non compatible polo momento. - - + + One of the selected edges should be a line. Unha das arestas escolmadas debe de ser unha liña. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Aplicouse a tanxencia de punto final a punto final. Borrouse a constrición coincidente. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas curvas mais un punto. - + Select some geometry from the sketch. tangent constraint Escolme algunha xeometría do esbozo. - - - + + + Cannot add a tangency constraint at an unconnected point! Non se pode engadir unha constrición de tanxencia nun punto non conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Cantidade incorrecta de obxectos escolmados! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 obxectos, debe de haber 2 curvas e 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tanxencia sobre arista de B-spline non compatible polo momento. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Escolme un ou máis arcos ou círculos no esbozo. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Esta constrición só aplica a arcos ou círculos. - - + + Select one or two lines from the sketch. Or select two edges and a point. Escolme unha ou dúas liñas do esbozo. Ou escolme un punto e dúas arestas. - - + + Parallel lines Liñas paralelas - - + + An angle constraint cannot be set for two parallel lines. Unha constrición de ángulo non pode ser establecida por dúas liñas paralelas. - + Cannot add an angle constraint on an axis! Non se pode engadir unha constrición angular nun eixo! - + Select two edges from the sketch. Escolme dúas arestas do esbozo. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Igualdade para arista de B-Spline non compatible polo momento. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Escolme dous puntos e unha liña de simetría, dous puntos e un punto de simetría ou unha liña e un punto de simetría do esbozo. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Non se pode engadir unha constrición de simetría entre unha liña e os seus puntos finais! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Os obxectos escolmados non son a xeometría dun esbozo unicamente. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. @@ -3631,12 +3624,12 @@ As combinacións aceptadas son: dúas curvas; cabo e curva; dous cabos; dúas cu Lonxitude: - + Refractive index ratio Índice de refracción - + Ratio n2/n1: Razón n2/n1: @@ -5228,112 +5221,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Edit sketch - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch Esbozo non válido - + Do you want to open the sketch validation tool? Quere abrir a ferramenta de validación do esbozo? - + The sketch is invalid and cannot be edited. O esbozo non é válido e non se pode editar. - + Please remove the following constraint: Por favor, remova a seguinte constrición: - + Please remove at least one of the following constraints: Por favor, remova polo menos unha das seguintes constricións: - + Please remove the following redundant constraint: Por favor, remova a seguinte constrición redundante: - + Please remove the following redundant constraints: Por favor, remova a seguintes constricións redundantes: - + The following constraint is partially redundant: The following constraint is partially redundant: - + The following constraints are partially redundant: The following constraints are partially redundant: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch Esbozo baleiro - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) @@ -5341,7 +5334,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fully constrained @@ -5439,8 +5432,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixa o diámetro dun círculo ou arco @@ -5448,7 +5441,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5456,20 +5450,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixa o raio dun círculo ou arco - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc - - Sketcher_Copy @@ -6085,7 +6071,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more and %1 more @@ -6308,7 +6294,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6319,7 +6305,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6344,7 +6330,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6367,13 +6353,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6384,7 +6370,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6498,7 +6484,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6680,17 +6666,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Acoutamento - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6710,14 +6696,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Acoutamento - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Constrinxir raio + + + + Fix the radius of a circle or an arc + Fixa o raio dun círculo ou arco + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts index 33c1913d41..cffd9a9ed5 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hr.ts @@ -130,27 +130,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ograničiti luk ili krug - + Constrain an arc or a circle Ograniči luk ili krug - + Constrain radius Ograniči radijus - + Constrain diameter Ograniči promjer - + Constrain auto radius/diameter Ograničiti automatski polumjer/promjer @@ -390,12 +390,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ograniči kut - + Fix the angle of a line or the angle between two lines Fiksiraj kut linije ili kut između dvije linije @@ -403,12 +403,12 @@ CmdSketcherConstrainBlock - + Constrain block Blok ograničenja - + Block the selected edge from moving Blokira pomjeranje izabranog ruba @@ -416,12 +416,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ograničiti zajedničko - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Stvorite koincidentno ograničenje između točaka ili koncentrično ograničenje između krugova, lukova i elipsa @@ -429,12 +429,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ograniči promjer - + Fix the diameter of a circle or an arc Popravi promjer kruga ili luka @@ -442,12 +442,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ograniči udaljenost - + Fix a length of a line or the distance between a line and a vertex or between two circles Namjestiti duljinu linije ili rastojanje između linije i tjemene točke ili rastojanje između dva kruga @@ -455,12 +455,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ograniči horizontalnu udaljenost - + Fix the horizontal distance between two points or line ends Ograniči horizontalnu udaljenost između dvije točke ili krajeva linije @@ -468,12 +468,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ograničenje okomite udaljenosti - + Fix the vertical distance between two points or line ends Ograniči vertikalnu udaljenost između dvije točke ili krajeva linije @@ -481,12 +481,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ograniči jednaku duljinu - + Create an equality constraint between two lines or between circles and arcs Napravite ograničenje jednakosti između dvije linije ili između kružnica i lukova @@ -494,12 +494,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ograniči vodoravno - + Create a horizontal constraint on the selected item Napravi vodoravno ograničenje na odabranoj jedinici @@ -507,12 +507,12 @@ CmdSketcherConstrainLock - + Constrain lock Ograniči pomicanje - + Create both a horizontal and a vertical distance constraint on the selected vertex Napravi ograničenje vodoravno i okomito ograničenje udaljenosti @@ -522,12 +522,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainParallel - + Constrain parallel Ograniči paralelno - + Create a parallel constraint between two lines Napravi paralelno ograničenje između dvije linije @@ -535,12 +535,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ograniči okomito - + Create a perpendicular constraint between two lines Stvara okomito ograničenje između dvije linije @@ -548,12 +548,12 @@ na odabranoj tjemenoj točki CmdSketcherConstrainPointOnObject - + Constrain point onto object Ograniči točku na objekt - + Fix a point onto an object Fiksiraj točku na objekt @@ -561,40 +561,25 @@ na odabranoj tjemenoj točki CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Ograničiti automatski polumjer/promjer - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fiksirajte promjer ako je odabrana kružnica ili radijus ako je odabran luk/spline pol - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Ograniči radijus ili težinu - - - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Popravite radijus kruga ili luka ili fiksirajte težinu pola B-zavoja - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ograniči lom (Snell's zakon ') - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Stvaranje zakona loma svijetla (Snell's law) ograničenje između dvije krajnje točke zrake i ruba kao sučelja. @@ -603,12 +588,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ograniči simetrijski - + Create a symmetry constraint between two points with respect to a line or a third point Stvoriti simetrično ograničenje između dvije točke u odnosu na liniju ili treću točku @@ -617,12 +602,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Ograniči tangentno - + Create a tangent constraint between two entities Napravi tangentno ograničenje između dva entiteta @@ -630,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Ograniči okomito - + Create a vertical constraint on the selected item Napravi okomito ograničenje na odabranoj jedinici @@ -1504,14 +1489,14 @@ Ovo će očistiti svojstvo "Podrška", ako postoji. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Prebaci aktivirati / isključiti ograničenje - + Activates or deactivates the selected constraints Uključuje ili isključuje odabrana ograničenja @@ -1532,14 +1517,14 @@ Ovo će očistiti svojstvo "Podrška", ako postoji. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Prebacuj vožnje / reference ograničenje - + Set the toolbar, or the selected constraints, into driving or reference mode Postavite alatnu traku ili odabrana ograničenja, @@ -1621,395 +1606,401 @@ nevaljana ograničenja, degenerirana geometrija itd. Command - - + + Add horizontal constraint Dodajte vodoravno ograničenje - - - + + + Add horizontal alignment Dodajte vodoravno poravnavanje - - + + Add vertical constraint Dodajte okomito ograničenje - + Add vertical alignment Dodajte okomito poranavanje - + Add 'Lock' constraint Dodajte 'Zaključaj' ograničenje - + Add relative 'Lock' constraint Dodajte relativno 'Zaključaj' ograničenje - + Add fixed constraint Dodajte fiksno ograničenje - + Add 'Block' constraint Dodajte 'Blok' ograničenje - + Add block constraint Dodaje blok ograničenje - - - + + + Add coincident constraint Dodajte podudarno ograničenje - - + + Add distance from horizontal axis constraint Dodajte udaljenost od ograničenja vodoravne osi - - + + Add distance from vertical axis constraint Dodajte udaljenost od ograničenja okomite osi - - + + Add point to point distance constraint Dodajte ograničenje udaljenosti od točke do točke - - - + + + Add point to line Distance constraint Dodaj ograničenje udaljenosti od točke do linije - - + + Add circle to circle distance constraint Dodaj ograničenje između dva kruga - + Add circle to line distance constraint Dodaj ograničenje između kruga i linije - - - - - - + + + + + + Add length constraint Dodajte ograničenje duljine - - + + + Dimension Dimenzija - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Dodajte ograničenje udaljenosti točka na objektu - - + + Add point to point horizontal distance constraint Dodajte ograničenje vodoravne udaljenosti od točke do točke - + Add fixed x-coordinate constraint Dodajte fiksno x-koordinata ograničenje - - + + Add point to point vertical distance constraint Dodajte ograničenje okomite udaljenosti od točke do točke - + Add fixed y-coordinate constraint Dodajte fiksno y-koordinata ograničenje - - + + Add parallel constraint Dodajte paralelno ograničenje - - - - - - - + + + + + + + Add perpendicular constraint Dodajte vertikalno ograničenje - + Add perpendicularity constraint Dodajte vertikalno ograničenje - + Swap coincident+tangency with ptp tangency Zamijeni slučajnost + tangencija s ptp tangencijom - + Swap PointOnObject+tangency with point to curve tangency Zamijenite točka na objektu+dodiruje s točka na krivulji dodiruje - - - - - - - + + + + + + + Add tangent constraint Dodajte tangencijalno ograničenje - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodajte točku tangencijalno ograničenje - - - - + + + + Add radius constraint Dodajte ograničenje polumjera - - - - + + + + Add diameter constraint Dodajte ograničenje promjera - - - - + + + + Add radiam constraint Dodaj polumjer-promjer ograničenje - - - - - - + + + + + + Add angle constraint Dodajte ograničenje kuta - - + + Add equality constraint Dodajte ograničenje jednakosti - - - - - + + + + + Add symmetric constraint Dodajte ograničenje simetrije - + Add Snell's law constraint Dodajte ograničenje Snell's law - + Toggle constraint to driving/reference Uključivanje ograničenja na pogon / referencu - + Activate/Deactivate constraint Aktiviranje / deaktiviranje ograničenja @@ -2088,7 +2079,7 @@ nevaljana ograničenja, degenerirana geometrija itd. - + Add sketch arc Dodaj luk skice @@ -2357,61 +2348,61 @@ nevaljana ograničenja, degenerirana geometrija itd. Automatsko ograničenje, pogreška: nerješiva skica nakon primjene izjednačavajućih ograničenja. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Nije moguće odrediti sjecište krivulje. Pokušajte dodati podudarno ograničenje između vrhova krivulje koju namjeravate obrubiti. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline Indeks Geometrije (GeoID) je izvan granica. - + You are requesting no change in knot multiplicity. Vi zahtijevate: bez promjena u mnoštvu čvorova. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Indeks Geometrija (GeoId) pod uvjetom da nije B-spline krivulja. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Čvor indeks je izvan granica. Imajte na umu da u skladu s OCC notacijom, prvi čvor ima indeks 1 a ne nula. - + The multiplicity cannot be increased beyond the degree of the B-spline. Mnoštvo se ne može povećavati iznad stupanja mnoštva b-spline krive. - + The multiplicity cannot be decreased beyond zero. Mnoštvo se ne može smanjiti ispod nule. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC je uspio smanjiti mnoštvo unutar maksimalne tolerancije. - + Knot cannot have zero multiplicity. Čvor ne može sa nulom multiplicirati. - + Knot multiplicity cannot be higher than the degree of the BSpline. Mnoštvo čvorova ne može biti veće od stupnja BSplina. - + Knot cannot be inserted outside the BSpline parameter range. Čvor se ne može umetnuti izvan raspona parametara BSpline. @@ -2479,134 +2470,134 @@ nevaljana ograničenja, degenerirana geometrija itd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2654,332 +2645,332 @@ nevaljana ograničenja, degenerirana geometrija itd. Dimenzijonalno ograničenje - + Cannot add a constraint between two external geometries. Nije moguće dodati ograničenja između dvije vanjske geometrije. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nije moguće dodati ograničenje između dvije fiksne geometrije. Fiksne geometrije uključuju vanjsku geometriju, blokiranu geometriju i posebne točke kao što su čvorne točke B-splinea. - + Sketcher Constraint Substitution Zamjena ograničenja skice - + Keep notifying me of constraint substitutions Obavijesti me o zamjeni ograničenja - - - + + + Only sketch and its support are allowed to be selected. Dopušteno je odabrati samo skicu i njenu podršku. - + One of the selected has to be on the sketch. Jedan od odabranih mora biti na skici. - - + + Select an edge from the sketch. Odaberite rub skice. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemoguće ograničenje - - - - + + + + The selected edge is not a line segment. Odabrani rub nije segment linije. - - - - - - + + + + + + Double constraint Ograničenje dvaput - - - - - + + + + + The selected edge already has a horizontal constraint! Odabrani rub već ima vodoravno ograničenje! - - - + + + The selected edge already has a vertical constraint! Odabrani rub već ima okomito ograničenje! - - - - - - + + + + + + The selected edge already has a Block constraint! Odabrani rub već ima blok ograničenje! - + The selected item(s) can't accept a horizontal constraint! Odabrani objekt(i) ne mogu prihvatiti horizontalno ograničenje! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Odabrano više od jedne fiksne točke. Odaberite najviše jednu fiksnu točku! - + The selected item(s) can't accept a vertical constraint! Odabrani objekt(i) ne mogu prihvatiti vertikalno ograničenje! - - - + + + Select vertices from the sketch. Odaberite samo vrhove sa skice. - + Select one vertex from the sketch other than the origin. Odaberite jednu vrh točku iz skice koja nije u ishodištu. - + Select only vertices from the sketch. The last selected vertex may be the origin. Odaberite samo krajnje točke skice. Posljednje odabrana tjemena točka je možda ishodište. - + Wrong solver status Pogrešan status alata za rješavanje (solver) - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Blok ograničenja ne može biti dodan ako skica nije riješena ili postoje redundantna i/ili proturječna ograničenja. - + Select one edge from the sketch. Odaberite jedan rub skice. - + Select only edges from the sketch. Odaberite samo rubove sa skice. - + Number of selected objects is not 3 Broj odabranih objekata nije 3 - + Error Pogreška - + Unexpected error. More information may be available in the Report View. Neočekivana greška. Potražite više informacija u Pregledu izvješća. - + Endpoint to endpoint tangency was applied instead. Tangenta od krajnje točka do krajnje točke je primijenjena umjesto toga. - + Select two or more points from the sketch. Odaberite dvije ili više točaka na skici. - + Select two or more vertices from the sketch. Odaberite dva ili više tjemenih točaka na skici. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Odaberite dva ili više vrhova sa skice za koincidentno ograničenje, ili dva ili više krugova, elipsa, lukova ili lukova elipse za koncentrično ograničenje. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Odaberite dva vrha sa skice za koincidentno ograničenje ili dva kruga, elipse, lukove ili lukove elipse za koncentrično ograničenje. - + Select exactly one line or one point and one line or two points from the sketch. Odaberite točno jednu liniju ili jednu točku i jednu liniju ili dvije točke iz skice. - + Cannot add a length constraint on an axis! Ne možete dodati ograničenje duljine na osi! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Izaberi točno jednu liniju ili jednu točku i jednu liniju ili dvije točke ili dva kruga na skici. - + This constraint does not make sense for non-linear curves. Ovo ograničenje nema smisla za nelinearne krivulje. - + Endpoint to edge tangency was applied instead. Tangenta od krajnje točka do ruba je primijenjena umjesto toga. - - - - - - - + + + + + + + Select the right things from the sketch. Odaberite prave stvari sa skice. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Odaberite rub koji nije težina B-krive. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nijedna od odabranih točaka nije ograničena na dotične krivulje, jer su dijelovi istog elementa, jer su obje vanjska geometrija ili zato što rub ne ispunjava uvjete. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nijedna od odabranih točaka nije bila je ograničena na dotične krivulje, ili su dijelovi isti element, ili su oba vanjske geometrije. - - - - + + + + Select exactly one line or up to two points from the sketch. Odaberite točno jednu liniju ili do dvije točke iz skice. - + Cannot add a horizontal length constraint on an axis! Nemoguće je dodati ograničenje duljine na os! - + Cannot add a fixed x-coordinate constraint on the origin point! Nije moguće dodati fiksno ograničenje X koordinate na izvornu točku! - - + + This constraint only makes sense on a line segment or a pair of points. Ovo ograničenje samo ima smisla na segmentu crte ili paru točaka. - + Cannot add a vertical length constraint on an axis! Nemoguće je dodati ograničenje duljine na os! - + Cannot add a fixed y-coordinate constraint on the origin point! Nije moguće dodati fiksno ograničenje Y koordinate na izvornu točku! - + Select two or more lines from the sketch. Odaberite dvije ili više linija iz skice. - - + + Select at least two lines from the sketch. Odaberite barem dvije linije iz skice. - + Select a valid line. Odaberite ispravnu liniju. - - + + The selected edge is not a valid line. Odabrani rub nije valjana linija. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2989,42 +2980,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije krajnje točke; dvije krivulje i točka. - + Select some geometry from the sketch. perpendicular constraint Odaberite neke geometrije sa skice. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nemoguće je postaviti okomicu na nepovezanoj točki! - - - + + + Perpendicular to B-spline edge currently unsupported. Okomito na rub B-spline krive trenutno nije podržano. - - + + One of the selected edges should be a line. Jedan od doabranih rubova bi trebala biti linija. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Primijenjena je tangenta krajnja točka do krajnje točke. Podudarna ograničenja su izbrisana. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Primijenjena je tangenta krajnja točka do ruba. Točka na objekt ograničenja su izbrisana. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -3034,186 +3025,186 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije krajnje točke; dvije krivulje i točka. - + Select some geometry from the sketch. tangent constraint Odaberite neke geometrije sa skice. - - - + + + Cannot add a tangency constraint at an unconnected point! Nemoguće je postaviti tangentu u nepovezanoj točki! - - + + Tangent constraint at B-spline knot is only supported with lines! Ograničenje tangente na B-krivulja čvoru podržano je samo s linijama! - + B-spline knot to endpoint tangency was applied instead. B-krivulja od krajnje točka do krajnje točke je primijenjena umjesto toga. - + Select either one point and several curves, or one curve and several points. Izaberi ili jednu točku i nekoliko krivih, ili jednu krivu i nekoliko točaka. - - + + Wrong number of selected objects! Pogrešan broj odabranih objekata! - - + + With 3 objects, there must be 2 curves and 1 point. Sa 3 objekta, ondje mora biti 2 krivulje i 1 točka. - - - + + + Tangency to B-spline edge currently unsupported. Tangencijalno na rub B-Spline krive trenutno nije podržano. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Odaberite jedan ili više lukova ili krugovima iz skice. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Odaberite samo jedan ili više B-Spline stupova ili samo jedan ili više lukova ili krugova sa skice, ali ne i mejšano. - - - + + + Constraint only applies to arcs or circles. Ograničenje se odnosi samo na lukove i krugove. - - + + Select one or two lines from the sketch. Or select two edges and a point. Odaberite jednu ili dvije linije na skici. Ili odaberite dva ruba i točku. - - + + Parallel lines Paralelne linije - - + + An angle constraint cannot be set for two parallel lines. Kut ograničenje ne može se postaviti za dvije paralelne linije. - + Cannot add an angle constraint on an axis! Nemoguće je dodati ograničenje kuta osi! - + Select two edges from the sketch. Odaberite dva ruba iz skice. - + Select two or more compatible edges. Odaberite dva ili više kompatibilnih rubova. - + Sketch axes cannot be used in equality constraints. Osi skice ne mogu se koristiti u ograničenjima jednakosti. - + Equality for B-spline edge currently unsupported. Izjednačavanje na rub B-Spline krive trenutno nije podržano. - - - - + + + + Select two or more edges of similar type. Odaberite dva ili više rubova sličnog tipa. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Odaberite dvije točke i liniju simetrije, dvije točke i točku simetrije ili liniju i točku simetrije iz skice. - - + + Cannot add a symmetry constraint between a line and its end points. Nije moguće dodati ograničenje simetrije između crte i njenih krajnjih točaka. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nemoguće je postaviti simetriju između linije i njenih vrhova! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Odaberite dvije krajnje točke linije kao zrake, rub predstavlja granicu. Prva odabrana točka odgovara indeksu n1, druga indeksu n2 a vrijednost polazišta postavlja omjer na n2/n1. - + Selected objects are not just geometry from one sketch. Odabrani objekti nisu samo geometrije iz jedne skice. - + Cannot create constraint with external geometry only. Ne možete stvoriti ograničenja samo s vanjskom geometrijom. - + Incompatible geometry is selected. Nespojiva geometrije je odabrana. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw na B-spline trenutno nije podržano. - - - - - + + + + + Select constraints from the sketch. Odaberite ograničenja sa skice. @@ -3716,12 +3707,12 @@ Prihvatljive kombinacije: dvije krivulje; jedna krajnja točka i krivulja; dvije Duljina: - + Refractive index ratio Omjer indeksa loma - + Ratio n2/n1: Omjer n2/n1: @@ -5351,112 +5342,112 @@ To se radi analizom geometrije i ograničenja skice. SketcherGui::ViewProviderSketch - + Edit sketch Uredi skicu - + A dialog is already open in the task panel Dijalog je već otvoren u ploči zadataka - + Do you want to close this dialog? Želite li zatvoriti ovaj dijalog? - + Invalid sketch Neispravna skica - + Do you want to open the sketch validation tool? Želite li otvoriti alat provjera valjanosti skice? - + The sketch is invalid and cannot be edited. Skica je neispravna i ne može se uređivati. - + Please remove the following constraint: Molim uklonite sljedeće ograničenje: - + Please remove at least one of the following constraints: Molim uklonite barem jedno od sljedećih ograničenja: - + Please remove the following redundant constraint: Molimo obrišite ovo redundantno ograničenje: - + Please remove the following redundant constraints: Molimo obrišite ova redundantna ograničenja: - + The following constraint is partially redundant: Sljedeće ograničenje je djelomično suvišno: - + The following constraints are partially redundant: Sljedeća ograničenja su djelomično suvišna: - + Please remove the following malformed constraint: Uklonite sljedeće deformirano ograničenje: - + Please remove the following malformed constraints: Uklonite sljedeća deformirana ograničenja: - + Empty sketch Prazan skica - + Over-constrained: Pretjerano ograničeno: - + Malformed constraints: Deformirana ograničenja: - + Redundant constraints: Suvišna ograničenja: - + Partially redundant: Djelomično suvišno: - + Solver failed to converge Solver nije uspio konvergirati - + Under constrained: Premalo ograničen: - + %n DoF(s) %n Stupanj slobode @@ -5465,7 +5456,7 @@ To se radi analizom geometrije i ograničenja skice. - + Fully constrained Potpuno ograničen @@ -5565,8 +5556,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Popravi promjer kruga ili luka @@ -5574,7 +5565,8 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Popravi polumjer/promjer kruga ili luka @@ -5582,20 +5574,12 @@ To se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fiksiraj radijus kruga ili luka - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Popravi polumjer/promjer kruga ili luka - - Sketcher_Copy @@ -6228,7 +6212,7 @@ Eigen Sparse QR algoritam optimiziran je za rijetke matrice; obično brže ViewProviderSketch - + and %1 more i %1 još @@ -6456,7 +6440,7 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. Skica ima djelomično suvišna ograničenja! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabole su migrirane. Migrirane datoteke neće se otvoriti u prethodnim verzijama FreeCAD-a!! @@ -6466,7 +6450,7 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. - + @@ -6491,7 +6475,7 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. - + @@ -6514,13 +6498,13 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. Ograničenje ima neispravnu index informaciju i neispravno je. - - - - - - - + + + + + + + @@ -6531,7 +6515,7 @@ Razmak mreže se mijenja ako postane manji od ovog broja piksela. - + Failed to add arc Nije uspjelo dodavanje luka @@ -6646,7 +6630,7 @@ Greška kod brisanja zadnjeg pola B-krive Nije uspjelo dodavanje okvira - + Failed to add rounded rectangle Nije uspjelo dodavanje zaobljenog pravokutnika @@ -6828,17 +6812,17 @@ Točke moraju biti postavljene bliže od petine razdaljine rešetke kako bi se p CmdSketcherDimension - + Dimension Dimenzija - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6858,14 +6842,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimenzija - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Ograniči radijus + + + + Fix the radius of a circle or an arc + Fiksiraj radijus kruga ili luka + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts index 852e883a05..820b6c1461 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_hu.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Kör vagy körív kényszer - + Constrain an arc or a circle Egy kör vagy körív kényszerítése - + Constrain radius Sugár illesztés - + Constrain diameter Átmérő kényszer - + Constrain auto radius/diameter Kényszeríti az automatikus sugarat/átmérőt @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Szög zárolása - + Fix the angle of a line or the angle between two lines Rögzítsen szöget a vonalon, vagy a szöget két vonalon @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Kényszerítő kocka - + Block the selected edge from moving A kijelölt él mozgásának letiltása @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Egymásra llesztés - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Konvergens kényszer létrehozása pontok között vagy koncentrikus kötés létrehozása körök, ívek és ellipszisek között @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Átmérő kényszer - + Fix the diameter of a circle or an arc Rögzíteni egy kör vagy egy ív átmérőjét @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Távolság kényszer - + Fix a length of a line or the distance between a line and a vertex or between two circles Vonal hosszának rögzítése vagy adott távolság tartása két kör között @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Vízszintes távolság zárolása - + Fix the horizontal distance between two points or line ends Két pont közötti vagy vonal végek közötti vízszintes távolság zárolása @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Függőleges távolság kényszerítése - + Fix the vertical distance between two points or line ends Két pont közötti vagy vonal végek közötti függőleges távolság zárolása @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Illesztás megtartása - + Create an equality constraint between two lines or between circles and arcs Hozzon létre egy egyenlőség illesztést két vonal között, illetve körök és ívek között @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Vízszintes illesztés - + Create a horizontal constraint on the selected item Vízszintes illesztés létrehozása a kiválasztott elemen @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Illesztés zárolása - + Create both a horizontal and a vertical distance constraint on the selected vertex Vízszintes és függőleges távolságkényszerítés létrehozása @@ -520,12 +520,12 @@ a kijelölt csúcsponton CmdSketcherConstrainParallel - + Constrain parallel Párhuzamosság tartása - + Create a parallel constraint between two lines Két vonal közötti párhuzamos kényszerítés @@ -533,12 +533,12 @@ a kijelölt csúcsponton CmdSketcherConstrainPerpendicular - + Constrain perpendicular Merőleges illesztés - + Create a perpendicular constraint between two lines Merőleges illesztést hoz létre két vonal közt @@ -546,12 +546,12 @@ a kijelölt csúcsponton CmdSketcherConstrainPointOnObject - + Constrain point onto object A pont illesztése a tárgyra - + Fix a point onto an object Pont rögzítése egy tárgyra @@ -559,38 +559,25 @@ a kijelölt csúcsponton CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Kényszeríti az automatikus sugarat/átmérőt - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Beállítja az átmérőt kör kiválasztásakor, illetve a sugarat, ha ív/görbe pólus van kiválasztva - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Kényszersugár vagy súly - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Beállítja egy kör vagy ív sugarát, vagy beállítja a B-görbe pólus súlyát - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Illesztés törésmutatója (Snellius–Descartes-törvény) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Hozzon létre egy fénytörés törvény (Snellius-törvény) kényszerítést sugarak két végpontja között és egy élt mint határfelületet. @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Szimmetria illesztés - + Create a symmetry constraint between two points with respect to a line or a third point Állítsa be a szimmetriát két pont között egy vonalhoz vagy egy harmadik ponthoz képest @@ -613,12 +600,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Érintő illesztés - + Create a tangent constraint between two entities Hozzon létre egy érintő illesztést két rész között @@ -626,12 +613,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Függőleges illesztés - + Create a vertical constraint on the selected item Függőleges kényszerítés alkalmazása a kijelölt elemen @@ -1490,12 +1477,12 @@ A 'Támogatás' tulajdonság törlődik, ha van. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Kényszerítés bekapcsolása/kikapcsolása - + Activates or deactivates the selected constraints A kijelölt kényszerítések engedélyezése vagy letiltása @@ -1516,12 +1503,12 @@ A 'Támogatás' tulajdonság törlődik, ha van. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Kényszerítés váltása a meghatározott és a megjelenített között - + Set the toolbar, or the selected constraints, into driving or reference mode Állítsa be az eszköztárat vagy a kijelölt kényszerítéseket, @@ -1595,370 +1582,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Vízszintes kényszerítés hozzáadása - - - + + + Add horizontal alignment Vízszintes igazítást hozzáadása - - + + Add vertical constraint Függőleges kényszerítést hozzáadása - + Add vertical alignment Függőleges igazítás hozzáadása - + Add 'Lock' constraint 'Zár' kényszerítés hozzáadása - + Add relative 'Lock' constraint Viszonyított 'Zár' kényszerítés hozzáadása - + Add fixed constraint Rögzített kényszerítést ad hozzá - + Add 'Block' constraint 'Blokk' kényszerítés hozzáadása - + Add block constraint Blokk kényszerítés hozzáadása - - - + + + Add coincident constraint Véletlenszerű kényszerítés hozzáadása - - + + Add distance from horizontal axis constraint Vízszintes tengelymegkötéstől való távolság hozzáadása - - + + Add distance from vertical axis constraint Függőleges tengelymegkötéstől való távolság hozzáadása - - + + Add point to point distance constraint Ponttól pontig távolság kényszerítést ad hozzá - - - + + + Add point to line Distance constraint Ponttól a vonalig távolság kényszerítést ad hozzá - - + + Add circle to circle distance constraint Kör hozzáadása a kör távolsági kényszerítéséhez - + Add circle to line distance constraint Kör hozzáadása a vonal távolsági kényszerítéséhez - - - - - - + + + + + + Add length constraint Hossz kényszerítés hozzáadása - - + + + Dimension Dimenzió - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Pont a tárgyon kényszerítés hozzáadása - - + + Add point to point horizontal distance constraint Ponttól pontig vízszintes távolság kényszerítés hozzáadása - + Add fixed x-coordinate constraint Rögzített x-koordináta kényszerítés hozzáadása - - + + Add point to point vertical distance constraint Ponttól pontig függőleges távolság kényszerítés hozzáadása - + Add fixed y-coordinate constraint Rögzített y-koordináta kényszerítés hozzáadása - - + + Add parallel constraint Párhuzamos kényszerítés hozzáadása - - - - - - - + + + + + + + Add perpendicular constraint Merőleges kényszerítés hozzáadása - + Add perpendicularity constraint Függőlegesség kényszerítés hozzáadása - + Swap coincident+tangency with ptp tangency Egybeeső érintő felcserélése ptp érintővel - + Swap PointOnObject+tangency with point to curve tangency Felcseréli a tárgyat+érintőpontot a görbe érintőpontjához ponttal - - - - - - - + + + + + + + Add tangent constraint Érintő kényszerítés hozzáadása - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Érintő pont kényszerítés hozzáadása - - - - + + + + Add radius constraint Sugár kényszerítés hozzáadása - - - - + + + + Add diameter constraint Átmérőhöz kényszerítés hozzáadása - - - - + + + + Add radiam constraint Sugár/átm-kényszer hozzáadása - - - - - - + + + + + + Add angle constraint Szöghöz kényszerítés hozzáadása - - + + Add equality constraint Egyenlőség kényszerítés hozzáadása - - - - - + + + + + Add symmetric constraint Szimmetrikus kényszerítés hozzáadása - + Add Snell's law constraint Fénytörés (Snellius-törvény) kényszerítés hozzáadása - + Toggle constraint to driving/reference Kényszerítés váltása megvezetés/hivatkozás közt - + Activate/Deactivate constraint Kényszerítés bekapcsolása/kikapcsolása @@ -2034,7 +2027,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Vázlat ív hozzáadása @@ -2285,59 +2278,59 @@ invalid constraints, degenerated geometry, etc. Autókényszer hiba: megoldhatatlan vázlat egyenlőségi kényszer alkalmazása után. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Nem tudja meghatározni a görbék metszéspontját. Próbáljon meg hozzáadni egybeesés kényszerítést a görbék csúcsaihoz, melyeket le szeretné kerekíteni. - - + + BSpline Geometry Index (GeoID) is out of bounds. Bgörbe geometria Index (GeoID) nem rendelkezik kényszerítésekkel. - + You are requesting no change in knot multiplicity. Nem kér változtatást a csomó többszörözésére. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. A megadott geometria Index (GeoId) nem egy Bgörbe. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. A csomó jelölés határvonalakon kívülre esik. Ne feledje, hogy a megfelelő OCC jelölés szerint, az első csomót jelölése 1 és nem nulla. - + The multiplicity cannot be increased beyond the degree of the B-spline. A sokszorozás nem nőhet a B-görbe szögének értéke fölé. - + The multiplicity cannot be decreased beyond zero. A sokszorozást nem csökkentheti nulla alá. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC képtelen csökkenteni a sokszorozást a maximális megengedett tűrésen belül. - + Knot cannot have zero multiplicity. A csomónak nem lehet nulla sokszorozása. - + Knot multiplicity cannot be higher than the degree of the BSpline. Csomó sokszorozás nem lehet magasabb, mint a B-görbe mértéke. - + Knot cannot be inserted outside the BSpline parameter range. Csomó nem illeszthető be a B-görbe paramétertartományon kívülre. @@ -2405,134 +2398,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ invalid constraints, degenerated geometry, etc. Méretezett illesztés - + Cannot add a constraint between two external geometries. Két külső geometria között nem lehet kényszerítés hozzáadni. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nem lehet kényszerítést hozzáadni két rögzített geometria közé. A rögzített geometriák közé tartozik a külső geometria, a blokkolt geometria és a speciális pontok, például a B-görbe csomópontok. - + Sketcher Constraint Substitution Vázlatolói kényszerítés helyettesítése - + Keep notifying me of constraint substitutions Folyamatosan értesítsen a kényszerítés helyettesítéséről - - - + + + Only sketch and its support are allowed to be selected. Csak vázlat és annak támogatása választható ki. - + One of the selected has to be on the sketch. Az egyik kiválasztottnak szerepelnie kell a vázlaton. - - + + Select an edge from the sketch. Egy él kiválasztása a vázlaton. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Lehetetlen kényszerítés - - - - + + + + The selected edge is not a line segment. A kiválasztott él nem egy egyenes szakasz. - - - - - - + + + + + + Double constraint Kettős kényszerítés - - - - - + + + + + The selected edge already has a horizontal constraint! A kiválasztott él már rendelkezik egy vízszintes kényszerítéssel! - - - + + + The selected edge already has a vertical constraint! A kiválasztott él már rendelkezik egy függőleges kényszerítéssel! - - - - - - + + + + + + The selected edge already has a Block constraint! A kijelölt élnek már van blokk kényszerítése! - + The selected item(s) can't accept a horizontal constraint! A kiválasztott elem(ek) nem fogadják el a vízszintes illesztést! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Több mint egy rögzített pontot választott. Válasszon legfeljebb egy rögzített pontot! - + The selected item(s) can't accept a vertical constraint! A kiválasztott elem(ek) nem fogadják el a függőleges illesztést! - - - + + + Select vertices from the sketch. Válasszon sarkokat a vázlatból. - + Select one vertex from the sketch other than the origin. Jelöljön ki a vázlaton egy, a kiindulási ponttól eltérő, végpontot. - + Select only vertices from the sketch. The last selected vertex may be the origin. Csak sarkokat válasszon a vázlatból. Az utoljára kiválasztott végpont lehet a kezdőpont. - + Wrong solver status Rossz a megoldó állapota - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Egy blokk kényszerítést nem adhat hozzá, ha a vázlat megoldatlan vagy felesleges és ellentmondó kényszerítései vannak. - + Select one edge from the sketch. Válasszon egy élt a vázlaton. - + Select only edges from the sketch. Csak éleket válasszon a vázlaton. - + Number of selected objects is not 3 A kijelölt tárgyak száma nem 3 - + Error Hiba - + Unexpected error. More information may be available in the Report View. Váratlan hiba. További információ a Jelentés nézetben érhető el. - + Endpoint to endpoint tangency was applied instead. Végpont-végpont érintőt alkalmazott helyette. - + Select two or more points from the sketch. Jelöljön ki két vagy több pontot a vázlatból. - + Select two or more vertices from the sketch. Jelöljön ki két vagy több csúcspontot a vázlatból. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Válasszon két vagy több csúcsot a vázlatból az egybeeső kényszerítéshez, vagy legalább két kört, ellipszist, ívet vagy elliptikus ívet a koncentrikus kényszerhez. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Válasszon két csúcsot a vázlatból az egybeeső kényszerítéshez, vagy két kört, ellipszist, ívet vagy elliptikus ívet a koncentrikus kényszerhez. - + Select exactly one line or one point and one line or two points from the sketch. Válasszon ki pontosan egy sort vagy egy pontot és egy sort és két pontot a vázlatból. - + Cannot add a length constraint on an axis! Nem adható hozzá a hosszanti illesztés egy tengelyen! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Válasszon ki pontosan egy vonalat vagy egy pontot és egy vonalat vagy két pontot vagy két kört a vázlatból. - + This constraint does not make sense for non-linear curves. Ennek a kényszerítésnek nincs értelme a nem-lineáris görbéknél. - + Endpoint to edge tangency was applied instead. Ehelyett a végpont és az él érintője került alkalmazásra. - - - - - - - + + + + + + + Select the right things from the sketch. Válassza ki a megfelelő dolgokat a vázlatból. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Jelöljön ki egy olyan élt, amely nem B-görbe vastagságú. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. A kijelölt pontok egyike sem volt korlátozva a megfelelő görbékre, mivel ugyanannak az elemnek a részei, valamint mindkettő külső geometria, vagy mert az éle nem megfelelő. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. A kijelölt pontok egyike sincs kényszerítve a vonatkozó görbékhez, mert azok részei ugyanannak az elemnek, vagy azért, mert mindkét külső geometria. - - - - + + + + Select exactly one line or up to two points from the sketch. Válasszon ki pontosan egy vonalat, vagy legfeljebb két pontot a vázlatból. - + Cannot add a horizontal length constraint on an axis! Nem lehet hozzáadni egy vízszintes hosszanti illesztést egy tengelyen! - + Cannot add a fixed x-coordinate constraint on the origin point! Nem adható hozzá a rögzített x-koordináta illesztése a kezdő ponthoz! - - + + This constraint only makes sense on a line segment or a pair of points. Ez a kényszerítés csak egy vonalszakaszon vagy egy pont páron érvényesül. - + Cannot add a vertical length constraint on an axis! Nem adható hozzá a függőleges hosszanti illesztés egy tengelyen! - + Cannot add a fixed y-coordinate constraint on the origin point! Nem adható hozzá a rögzített y-koordináta illesztése a kezdő ponthoz! - + Select two or more lines from the sketch. Válasszon ki két vagy több vonalat a vázlatból. - - + + Select at least two lines from the sketch. Válasszon ki legalább két vonalat a vázlatból. - + Select a valid line. Válasszon ki egy érvényes egyenest. - - + + The selected edge is not a valid line. A kiválasztott él nem egy érvényes egyenes. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpont; két görbe és egy pont. - + Select some geometry from the sketch. perpendicular constraint Válasszon ki néhány geometriát a vázlatból. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nem lehet hozzáadni a függőlegesség illesztést a független ponton! - - - + + + Perpendicular to B-spline edge currently unsupported. Merőleges a B-görbe élre, jelenleg nem támogatott. - - + + One of the selected edges should be a line. Az egyik kijelölt élnek egy vonalnak kell lennie. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Végpont-végpont érintőt alkalmazott. Az egybeeső kényszerítést törölve lett. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Végponttól az élig érintőt alkalmaztak. A tárgy kényszerítés pontját törölték. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpont; két görbe és egy pont. - + Select some geometry from the sketch. tangent constraint Válasszon ki néhány geometriát a vázlatból. - - - + + + Cannot add a tangency constraint at an unconnected point! Nem lehet hozzáadni egy érintő illesztést a független ponton! - - + + Tangent constraint at B-spline knot is only supported with lines! A B-görbe csomó érintő kényszerítését csak vonalak támogatják! - + B-spline knot to endpoint tangency was applied instead. B-görbe csomó a végponthoz érintőt alkalmazott helyette. - + Select either one point and several curves, or one curve and several points. Válasszon ki egy pontot és több görbét, vagy egy görbét és több pontot. - - + + Wrong number of selected objects! Kijelölt objektumok téves mennyisége! - - + + With 3 objects, there must be 2 curves and 1 point. 3 tárggyal, két görbének és 1 pontnak kell lennie. - - - + + + Tangency to B-spline edge currently unsupported. Érintő B-görbe élével jelenleg nem támogatott. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Válasszon egy vagy több ívet vagy kört a vázlatból. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Jelöljön ki egy vagy több B-görbe pólust, vagy egy vagy több ívet vagy kört a vázlatból, de nem keverve. - - - + + + Constraint only applies to arcs or circles. Kényszerítés csak az ívekre és körökre vonatkozik. - - + + Select one or two lines from the sketch. Or select two edges and a point. Válasszon egy vagy két vonalat a vázlatból. Vagy válasszon ki két élet és egy pontot. - - + + Parallel lines Párhuzamos vonalak - - + + An angle constraint cannot be set for two parallel lines. Egy szög kényszerítést nem lehet beállítani két párhuzamos vonalra. - + Cannot add an angle constraint on an axis! Nem lehet hozzáadni egy szög illesztést egy tengelyhez! - + Select two edges from the sketch. Két él kiválasztása a vázlaton. - + Select two or more compatible edges. Válasszon ki két vagy több kompatibilis élt. - + Sketch axes cannot be used in equality constraints. Vázlat tengelyek nem használhatók egyenlőségi kényszerítésekhez. - + Equality for B-spline edge currently unsupported. Egyenlőség B-görbe élével jelenleg nem támogatott. - - - - + + + + Select two or more edges of similar type. Jelöljön ki két vagy több hasonló típusú élt. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Válasszon ki két pontot és egy szimmetria vonalat, két pontot és egy szimmetria pontot vagy egy vonalat és egy szimmetria pontot a vázlatból. - - + + Cannot add a symmetry constraint between a line and its end points. Nem lehet hozzáadni a szimmetria kényszerítést a vonalhoz és annak végpontjaihoz. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nem lehet hozzáadni a szimmetria illesztést a vonalhoz és annak végpontjaihoz! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Jelöljön ki két vonalvégpontot sugarakként, és egy szegélyt jelölő élt. Az első kijelölt pont megfelel az n1 indexnek, a második az n2-nek, és a méretadat állítja be az n2/n1 arányt. - + Selected objects are not just geometry from one sketch. A kijelölt tárgyak nem csak egy vázlat geometriái. - + Cannot create constraint with external geometry only. Kényszerítést nem lehet szimplán külső geometriával létrehozni. - + Incompatible geometry is selected. Inkompatibilis geometriát jelölt ki. - + SnellsLaw on B-spline edge is currently unsupported. A Snellius–Descartes-törvény a B-görbe élén jelenleg nem támogatott. - - - - - + + + + + Select constraints from the sketch. Válasszon kényszerítéseket a vázlatból. @@ -3631,12 +3624,12 @@ Elfogadott kombinációk: két görbe; egy végpont és egy görbe; két végpon Hossz: - + Refractive index ratio Refraktív index arány - + Ratio n2/n1: Arány n2/n1: @@ -5226,112 +5219,112 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. SketcherGui::ViewProviderSketch - + Edit sketch Vázlat szerkesztése - + A dialog is already open in the task panel Egy párbeszédablak már nyitva van a feladat panelen - + Do you want to close this dialog? Szeretné bezárni a párbeszédpanelt? - + Invalid sketch Érvénytelen vázlat - + Do you want to open the sketch validation tool? Szeretné megnyitni a vázlat érvényesítés eszközt? - + The sketch is invalid and cannot be edited. A vázlat érvénytelen, és nem szerkeszthető. - + Please remove the following constraint: Kérjük, távolítsa el az alábbi ilesztést: - + Please remove at least one of the following constraints: Kérjük, távolítsa el, legalább az egyiket a következő kényszerítésekből: - + Please remove the following redundant constraint: Kérjük, távolítsa el a következő felesleges kényszerítést: - + Please remove the following redundant constraints: Kérjük, távolítsa el a következő felesleges kényszerítéseket: - + The following constraint is partially redundant: A következő kényszerítés részben felesleges: - + The following constraints are partially redundant: A következő kényszerítések részben feleslegesek: - + Please remove the following malformed constraint: Távolítsa el a következő hibás kényszerítést: - + Please remove the following malformed constraints: Távolítsa el a következő hibás kényszerítéseket: - + Empty sketch Üres vázlat - + Over-constrained: Eltúlzott kényszertés: - + Malformed constraints: Hibásan formázott kényszerítés: - + Redundant constraints: Felesleges kényszerítések: - + Partially redundant: Részben felesleges: - + Solver failed to converge A megoldó nem tudott hasonlítani - + Under constrained: Kényszerítés alatt: - + %n DoF(s) %n szabadságfok(ok) @@ -5339,7 +5332,7 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. - + Fully constrained Teljesen kényszertett @@ -5437,8 +5430,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Rögzíteni egy kör vagy egy ív átmérőjét @@ -5446,7 +5439,8 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Sugár/Átmérő illesztése körre vagy ívre @@ -5454,20 +5448,12 @@ Ez a vázlat geometriáinak és kényszerítéseinek elemzésével történik. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Sugár illesztése körre vagy ívre - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Sugár/Átmérő illesztése körre vagy ívre - - Sketcher_Copy @@ -6083,7 +6069,7 @@ Az Eigen Sparse QR algoritmus ritka mátrixokra van optimalizálva; általában ViewProviderSketch - + and %1 more és további %1 @@ -6306,7 +6292,7 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.A vázlat részlegesen felesleges kényszerítéseket tartalmaz! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! A parabolákat áttelepítették. Az áttelepített fájlok nem nyílnak meg a FreeCAD korábbi verzióiban!! @@ -6317,7 +6303,7 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám. - + @@ -6342,7 +6328,7 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám. - + @@ -6365,13 +6351,13 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.A korlátozás érvénytelen indexinformációval rendelkezik, és rosszul formázott. - - - - - - - + + + + + + + @@ -6382,7 +6368,7 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám. - + Failed to add arc Ív hozzáadása sikertelen @@ -6496,7 +6482,7 @@ A rácsháló távolsága megváltozik, ha kisebb lesz, mint ez a pixelszám.Sikertelen a mező hozzáadása - + Failed to add rounded rectangle Sikertelen a lekerekített téglalap hozzáadása @@ -6678,17 +6664,17 @@ A pontokat a rácsháló távolságának egyötödénél közelebb kell állíta CmdSketcherDimension - + Dimension Dimenzió - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6708,14 +6694,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimenzió - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Sugár illesztés + + + + Fix the radius of a circle or an arc + Sugár illesztése körre vagy ívre + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts index ebcfbb6662..e495094e71 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_id.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Constrain arc or circle - + Constrain an arc or a circle Constrain an arc or a circle - + Constrain radius Kendalikan radius - + Constrain diameter Constrain diameter - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -390,12 +390,12 @@ CmdSketcherConstrainAngle - + Constrain angle Kendalikan sudut - + Fix the angle of a line or the angle between two lines Perbaiki sudut garis atau sudut antara dua garis @@ -403,12 +403,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -416,12 +416,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Kendala bertepatan - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -429,12 +429,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Constrain diameter - + Fix the diameter of a circle or an arc Fix the diameter of a circle or an arc @@ -442,12 +442,12 @@ CmdSketcherConstrainDistance - + Constrain distance Kendalikan jarak - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -455,12 +455,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Perbaiki jarak horizontal antara dua titik atau garis ujung @@ -468,12 +468,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Perbaiki jarak vertikal antara dua titik atau garis ujung @@ -481,12 +481,12 @@ CmdSketcherConstrainEqual - + Constrain equal Kendalikan sama - + Create an equality constraint between two lines or between circles and arcs Buat batasan kesetaraan antara dua garis atau antara lingkaran dan busur @@ -494,12 +494,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Kendalikan secara horisontal - + Create a horizontal constraint on the selected item Buat kendala horizontal pada item yang dipilih @@ -507,12 +507,12 @@ CmdSketcherConstrainLock - + Constrain lock Kendalikan kunci - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -522,12 +522,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Kendalikan sejajar - + Create a parallel constraint between two lines Buat batasan paralel antara dua baris @@ -535,12 +535,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Kendalikan tegak lurus - + Create a perpendicular constraint between two lines Buat kendala tegak lurus antara dua garis @@ -548,12 +548,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Konstruksikan titik ke objek - + Fix a point onto an object Perbaiki sebuah titik pada sebuah objek @@ -561,38 +561,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Constrain radius or weight - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -602,12 +589,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Konstruksikan simetris - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -617,12 +604,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Kendalikan singgung - + Create a tangent constraint between two entities Buat kendala singgung antara dua entitas @@ -630,12 +617,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Kendalikan secara vertikal - + Create a vertical constraint on the selected item Buat kendala vertikal pada item yang dipilih @@ -1494,12 +1481,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Activates or deactivates the selected constraints @@ -1520,12 +1507,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1599,370 +1586,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Add length constraint - - + + + Dimension Dimensi - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2038,7 +2031,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Add sketch arc @@ -2289,59 +2282,59 @@ invalid constraints, degenerated geometry, etc. Autoconstrain error: Unsolvable sketch after applying equality constraints. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline Geometry Index (GeoID) is out of bounds. - + You are requesting no change in knot multiplicity. Bspline GeoId berada di luar batas. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. The Geometry Index (GeoId) provided is not a B-spline curve. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Indeks simpul berada di luar batas. Perhatikan bahwa sesuai dengan notasi OCC, simpul pertama memiliki indeks 1 dan bukan nol. - + The multiplicity cannot be increased beyond the degree of the B-spline. The multiplicity cannot be increased beyond the degree of the B-spline. - + The multiplicity cannot be decreased beyond zero. Multiplisitas tidak dapat ditingkatkan melampaui tingkat b-spline. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC tidak dapat mengurangi multiplisitas dalam toleransi maksimum. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2409,134 +2402,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2584,329 +2577,329 @@ invalid constraints, degenerated geometry, etc. Batasan dimensi - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Pilih tepi dari sketsa. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Kendala yang tidak mungkin - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Kendala ganda - - - - - + + + + + The selected edge already has a horizontal constraint! The selected edge already has a horizontal constraint! - - - + + + The selected edge already has a vertical constraint! The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! The selected edge already has a Block constraint! - + The selected item(s) can't accept a horizontal constraint! The dipilih item (s) tidak dapat menerima horisontal kendala ! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! There are more than one fixed points selected. Select a maximum of one fixed point! - + The selected item(s) can't accept a vertical constraint! Dipilih item (s) tidak dapat menerima vertikal kendala! - - - + + + Select vertices from the sketch. Pilih simpul dari para sketsa . - + Select one vertex from the sketch other than the origin. Pilih salah satu titik dari satu sketsa selain asal . - + Select only vertices from the sketch. The last selected vertex may be the origin. Pilih hanya simpul dari para sketsa . Yang terakhir dipilih vertex mungkin asal . - + Wrong solver status Wrong solver status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Select one edge from the sketch. - + Select only edges from the sketch. Select only edges from the sketch. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Kesalahan - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Endpoint to endpoint tangency was applied instead. - + Select two or more points from the sketch. Pilih dua atau lebih poin dari para sketsa . - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Pilih tepat satu baris atau satu titik dan satu garis atau dua poin dari para sketsa . - + Cannot add a length constraint on an axis! Tidak dapat menambahkan batasan panjang pada sumbu! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Pilih hal yang benar dari yang sketsa . - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Tak satu pun dari titik-titik yang dipilih dibatasi ke masing-masing kurva, entah karena mereka adalah bagian dari elemen yang sama, atau karena keduanya adalah geometri eksternal . - - - - + + + + Select exactly one line or up to two points from the sketch. Pilih tepat satu baris atau sampai dengan dua poin dari para sketsa . - + Cannot add a horizontal length constraint on an axis! Tidak dapat menambahkan batasan panjang horizontal pada sumbu! - + Cannot add a fixed x-coordinate constraint on the origin point! Cannot add a fixed x-coordinate constraint on the origin point! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Tidak dapat menambahkan batasan panjang vertikal pada sumbu! - + Cannot add a fixed y-coordinate constraint on the origin point! Cannot add a fixed y-coordinate constraint on the origin point! - + Select two or more lines from the sketch. Pilih dua atau lebih baris dari para sketsa . - - + + Select at least two lines from the sketch. Pilih setidaknya dua baris dari para sketsa . - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2914,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Ada beberapa cara kendala ini bisa diterapkan. Kombinasi yang diterima: dua kurva; titik akhir dan kurva; dua titik akhir; dua tikungan dan satu titik . - + Select some geometry from the sketch. perpendicular constraint Pilih beberapa geometri dari para sketsa . - - + + Cannot add a perpendicularity constraint at an unconnected point! Tidak dapat menambahkan batasan tegak lurus pada titik yang tidak terhubung ! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular ke tepi B-spline saat ini tidak didukung. - - + + One of the selected edges should be a line. Salah satu tepi yang dipilih harus berupa garis . - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Endpoint to endpoint tangency was applied. The coincident constraint was deleted. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Ada beberapa cara kendala ini bisa diterapkan. Kombinasi yang diterima: dua kurva; titik akhir dan kurva; dua titik akhir; dua tikungan dan satu titik . - + Select some geometry from the sketch. tangent constraint Pilih beberapa geometri dari para sketsa . - - - + + + Cannot add a tangency constraint at an unconnected point! Tidak dapat menambahkan kendala singgung pada titik yang tidak terhubung ! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Salah jumlah objek terpilih ! - - + + With 3 objects, there must be 2 curves and 1 point. Dengan 3 objek, harus ada 2 kurva dan 1 titik . - - - + + + Tangency to B-spline edge currently unsupported. Tangensi ke tepi B-spline saat ini tidak didukung. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Pilih satu atau lebih busur atau lingkaran dari para sketsa . - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Kendala hanya berlaku untuk busur atau lingkaran. - - + + Select one or two lines from the sketch. Or select two edges and a point. Pilih satu atau dua baris dari para sketsa . Atau pilih dua sisi dan satu titik . - - + + Parallel lines Garis sejajar - - + + An angle constraint cannot be set for two parallel lines. Kendala sudut tidak dapat diatur untuk dua garis sejajar. - + Cannot add an angle constraint on an axis! Tidak dapat menambahkan batasan sudut pada sumbu! - + Select two edges from the sketch. Pilih dua sisi dari satu sketsa . - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Kesetaraan untuk tepi B-spline saat ini tidak didukung. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Pilih dua poin dan simetri garis , dua poin dan simetri titik atau garis dan simetri titik dari yang sketsa . - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Tidak dapat menambahkan batasan simetri antara garis dan titik akhirnya! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Objek yang dipilih bukan hanya geometri dari satu sketsa . - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. @@ -3631,12 +3624,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Length: - + Refractive index ratio Rasio indeks bias - + Ratio n2/n1: Rasio n2 / n1: @@ -5226,119 +5219,119 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Edit sketch - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch Sketsa tidak valid - + Do you want to open the sketch validation tool? Apakah Anda ingin membuka alat validasi sketsa ? - + The sketch is invalid and cannot be edited. sketsa tidak valid dan tidak dapat diedit. - + Please remove the following constraint: Harap hapus batasan berikut : - + Please remove at least one of the following constraints: Harap hapus setidaknya satu dari batasan berikut: - + Please remove the following redundant constraint: Harap hapus batasan berlebihan berikut ini : - + Please remove the following redundant constraints: Harap hapus batasan berlebihan berikut ini : - + The following constraint is partially redundant: The following constraint is partially redundant: - + The following constraints are partially redundant: The following constraints are partially redundant: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch Sketsa kosong - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) - + Fully constrained Fully constrained @@ -5436,8 +5429,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fix the diameter of a circle or an arc @@ -5445,7 +5438,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5453,20 +5447,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Perbaiki jari-jari lingkaran atau busur - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc - - Sketcher_Copy @@ -6082,7 +6068,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more and %1 more @@ -6305,7 +6291,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6316,7 +6302,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6341,7 +6327,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6364,13 +6350,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6381,7 +6367,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6495,7 +6481,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6677,17 +6663,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensi - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6707,14 +6693,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimensi - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Kendalikan radius + + + + Fix the radius of a circle or an arc + Perbaiki jari-jari lingkaran atau busur + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts index a64353234d..d08e9b21e9 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_it.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Vincola l'arco o il cerchio - + Constrain an arc or a circle Vincola l'arco o il cerchio - + Constrain radius Raggio - + Constrain diameter Vincola il diametro - + Constrain auto radius/diameter Vincola raggio/diametro automatico @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Angolo - + Fix the angle of a line or the angle between two lines Fissa l'angolo di una linea o l'angolo tra due linee @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Vincolo di blocco - + Block the selected edge from moving Blocca il bordo selezionato dallo spostamento @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Coincidenza - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Crea un vincolo coincidente tra i punti, o un vincolo concentrico tra cerchi, archi ed ellissi @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Vincola il diametro - + Fix the diameter of a circle or an arc Vincola il diametro di un cerchio o di un arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Distanza - + Fix a length of a line or the distance between a line and a vertex or between two circles Fissare una lunghezza di una linea o la distanza tra una linea e un vertice o tra due cerchi @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Distanza orizzontale - + Fix the horizontal distance between two points or line ends Fissa la distanza orizzontale tra due punti o estremi di una linea @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Distanza verticale - + Fix the vertical distance between two points or line ends Fissa la distanza verticale tra due punti o estremi di una linea @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Uguale - + Create an equality constraint between two lines or between circles and arcs Crea un vincolo di uguaglianza tra due linee o tra cerchi e archi @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Orizzontale - + Create a horizontal constraint on the selected item Crea un vincolo orizzontale sull'elemento selezionato @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Blocca - + Create both a horizontal and a vertical distance constraint on the selected vertex Crea sia un vincolo di distanza orizzontale e che verticale @@ -520,12 +520,12 @@ sul vertice selezionato CmdSketcherConstrainParallel - + Constrain parallel Parallelo - + Create a parallel constraint between two lines Crea un vincolo di parallelismo tra due linee @@ -533,12 +533,12 @@ sul vertice selezionato CmdSketcherConstrainPerpendicular - + Constrain perpendicular Perpendicolare - + Create a perpendicular constraint between two lines Crea un vincolo di perpendicolarità tra due linee @@ -546,12 +546,12 @@ sul vertice selezionato CmdSketcherConstrainPointOnObject - + Constrain point onto object Punto su oggetto - + Fix a point onto an object Fissa un punto su un oggetto @@ -559,38 +559,25 @@ sul vertice selezionato CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Vincola raggio/diametro automatico - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fissare il diametro se si sceglie un cerchio, o il raggio se si sceglie un arco/spline - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Vincola il raggio o il peso - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fissa il raggio del cerchio o di un arco o il peso del polo di una B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Vincolo di rifrazione (legge di Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Crea un vincolo di rifrazione (legge di Snell) tra due punti finali di raggi e con un bordo come interfaccia. @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Simmetria - + Create a symmetry constraint between two points with respect to a line or a third point Crea un vincolo di simmetria tra due punti @@ -614,12 +601,12 @@ rispetto a una linea o a un terzo punto CmdSketcherConstrainTangent - + Constrain tangent Tangente - + Create a tangent constraint between two entities Crea un vincolo di tangenza tra due entità @@ -627,12 +614,12 @@ rispetto a una linea o a un terzo punto CmdSketcherConstrainVertical - + Constrain vertically Verticale - + Create a vertical constraint on the selected item Crea un vincolo verticale sull'elemento selezionato @@ -1491,12 +1478,12 @@ Questo cancellerà la proprietà 'Supporto', se presente. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Attiva/disattiva vincolo - + Activates or deactivates the selected constraints Attiva o disattiva i vincoli selezionati @@ -1517,12 +1504,12 @@ Questo cancellerà la proprietà 'Supporto', se presente. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Attiva/disattiva vincolo di guida/riferimento - + Set the toolbar, or the selected constraints, into driving or reference mode Imposta la barra degli strumenti, o i vincoli selezionati, @@ -1596,370 +1583,376 @@ vincoli non validi, geometria degenerata, ecc. Command - - + + Add horizontal constraint Vincola orizzontale - - - + + + Add horizontal alignment Aggiunge allineamento orizzontale - - + + Add vertical constraint Vincola verticale - + Add vertical alignment Aggiunge allineamento verticale - + Add 'Lock' constraint Aggiungi vincolo bloccato - + Add relative 'Lock' constraint Aggiungi vincolo di blocco relativo - + Add fixed constraint Aggiungi vincolo fisso - + Add 'Block' constraint Aggiungi vincolo di blocco - + Add block constraint Aggiungi vincolo di blocco - - - + + + Add coincident constraint Vincola la coincidenza - - + + Add distance from horizontal axis constraint Vincola la distanza dall'asse orizzontale - - + + Add distance from vertical axis constraint Vincola la distanza dall'asse verticale - - + + Add point to point distance constraint Vincola la distanza tra i punti - - - + + + Add point to line Distance constraint Vincola la Distanza da punto a linea - - + + Add circle to circle distance constraint Aggiungi il vincolo di distanza da cerchio a cerchio - + Add circle to line distance constraint Aggiungi il vincolo di distanza dal cerchio alla linea - - - - - - + + + + + + Add length constraint Vincola lunghezza - - + + + Dimension Dimensione - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Vincola il punto all'oggetto - - + + Add point to point horizontal distance constraint Vincola la distanza orizzontale tra i punti - + Add fixed x-coordinate constraint Vincola la coordinata X - - + + Add point to point vertical distance constraint Vincola la distanza verticale tra i punti - + Add fixed y-coordinate constraint Vincola la coordinata Y - - + + Add parallel constraint Vincola parallelismo - - - - - - - + + + + + + + Add perpendicular constraint Vincola perpendicolare - + Add perpendicularity constraint Aggiungi vincolo di perpendicolarità - + Swap coincident+tangency with ptp tangency Scambia coincidenza+tangenza con tangenza ptp - + Swap PointOnObject+tangency with point to curve tangency Scambiare PointOnObject+tangenza con il punto a tangenza curva - - - - - - - + + + + + + + Add tangent constraint Vincola la tangenza - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Aggiungi punto di vincolo tangente - - - - + + + + Add radius constraint Vincola il raggio - - - - + + + + Add diameter constraint Vincola il diametro - - - - + + + + Add radiam constraint Vincolare il raggio - - - - - - + + + + + + Add angle constraint Vincola l'angolo - - + + Add equality constraint Vincola uguaglianza - - - - - + + + + + Add symmetric constraint Vincola simmetria - + Add Snell's law constraint Aggiungi vincolo di legge di Snell's - + Toggle constraint to driving/reference Commuta il vincolo guida/riferimento - + Activate/Deactivate constraint Attiva/disattiva vincolo @@ -2035,7 +2028,7 @@ vincoli non validi, geometria degenerata, ecc. - + Add sketch arc Aggiungi arco di schizzo @@ -2286,59 +2279,59 @@ vincoli non validi, geometria degenerata, ecc. Errore di vincolo automatico: schizzo non risolvibile dopo l'applicazione dei vincoli di uguaglianza. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Impossibile determinare l'intersezione delle curve. Provare ad aggiungere un vincolo di coincidenza tra i vertici delle curve che si intende raccordare. - - + + BSpline Geometry Index (GeoID) is out of bounds. L'indice della geometria della B-spline (GeoID) è fuori limite. - + You are requesting no change in knot multiplicity. Non stai richiedendo modifiche nella molteplicità dei nodi. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. L'indice della geometria (GeoID) fornito non è una curva B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. L'indice del nodo è fuori dai limiti. Notare che, in conformità alla numerazione OCC, il primo nodo ha indice 1 e non zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. La molteplicità non può essere aumentata oltre il grado della B-spline. - + The multiplicity cannot be decreased beyond zero. La molteplicità non può essere diminuita al di là di zero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC non è in grado di diminuire la molteplicità entro la tolleranza massima. - + Knot cannot have zero multiplicity. Il nodo non può avere una molteplicità zero. - + Knot multiplicity cannot be higher than the degree of the BSpline. La molteplicità del nodo non può essere superiore al grado della BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Il nodo non può essere inserito al di fuori dell'intervallo di parametri B-Spline. @@ -2406,134 +2399,134 @@ vincoli non validi, geometria degenerata, ecc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2581,329 +2574,329 @@ vincoli non validi, geometria degenerata, ecc. Lunghezza - + Cannot add a constraint between two external geometries. Impossibile aggiungere un vincolo tra due geometrie esterne. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Non è possibile aggiungere un vincolo tra due geometrie bloccate! Le geometrie bloccate comprendono la geometria esterna, la geometria fissata o i punti speciali come i punti di nodo delle B-Spline. - + Sketcher Constraint Substitution Sostituzione vincoli dello Schizzo - + Keep notifying me of constraint substitutions Continuare a notificare le sostituzione dei vincoli - - - + + + Only sketch and its support are allowed to be selected. È consentito selezionare solo lo schizzo e il suo supporto. - + One of the selected has to be on the sketch. Uno dei selezionati deve essere sullo schizzo. - - + + Select an edge from the sketch. Seleziona un bordo dello schizzo. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Vincolo Impossible - - - - + + + + The selected edge is not a line segment. Il bordo selezionato non è un segmento di linea. - - - - - - + + + + + + Double constraint Doppio vincolo - - - - - + + + + + The selected edge already has a horizontal constraint! Il bordo selezionato ha già un vincolo orizzontale! - - - + + + The selected edge already has a vertical constraint! Il bordo selezionato ha già un vincolo verticale! - - - - - - + + + + + + The selected edge already has a Block constraint! Il bordo selezionato ha già un vincolo di fissaggio! - + The selected item(s) can't accept a horizontal constraint! Gli elementi selezionati non possono accettare un vincolo orizzontale! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Sono stati selezionati più punti bloccati. Selezionare al massimo un punto bloccato! - + The selected item(s) can't accept a vertical constraint! Gli elementi selezionati non possono accettare un vincolo verticale! - - - + + + Select vertices from the sketch. Selezionare i vertici nello schizzo. - + Select one vertex from the sketch other than the origin. Selezionare dallo schizzo un vertice diverso dall'origine. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selezionare solo i vertici dallo schizzo. L'ultimo vertice selezionato può essere l'origine. - + Wrong solver status Stato del risolutore difettoso - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Un vincolo di blocco non può essere aggiunto se lo schizzo è irrisolto o ci sono vincoli ridondanti e conflittuali. - + Select one edge from the sketch. Seleziona un bordo dello schizzo. - + Select only edges from the sketch. Selezionare solo i bordi dallo schizzo. - + Number of selected objects is not 3 Il numero di oggetti selezionati non è 3 - + Error Errore - + Unexpected error. More information may be available in the Report View. Errore inatteso. Ulteriori informazioni possono essere disponibili nel registro eventi. - + Endpoint to endpoint tangency was applied instead. È stata invece applicata la tangenza punto finale su punto finale. - + Select two or more points from the sketch. Selezionare due o più punti dallo schizzo. - + Select two or more vertices from the sketch. Seleziona due o più vertici dallo schizzo. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleziona due o più vertici dallo schizzo per un vincolo coincidente, o due o più cerchi, ellissi, archi o archi di ellisse per un vincolo concentrico. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Seleziona due vertici dallo schizzo per un vincolo coincidente, o due cerchi, ellissi, archi o archi di ellisse per un vincolo concentrico. - + Select exactly one line or one point and one line or two points from the sketch. Selezionare una linea o un punto più una linea, oppure due punti dello schizzo. - + Cannot add a length constraint on an axis! Non è possibile aggiungere un vincolo di lunghezza su un asse! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Selezionare esattamente una linea o un punto e una linea o due punti o due cerchi dallo schizzo. - + This constraint does not make sense for non-linear curves. Questo vincolo non ha senso per le curve non lineari. - + Endpoint to edge tangency was applied instead. È stata applicata invece la tangenza segmento sul punto finale. - - - - - - - + + + + + + + Select the right things from the sketch. Selezionare le cose giuste dallo schizzo. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Selezionare un bordo che non è un peso B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nessuno dei punti selezionati è stato vincolato alle rispettive curve, perché sono parti dello stesso elemento, perché entrambi sono geometria esterna, o perché il bordo non è ammissibile. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nessuno dei punti selezionati è stato vincolato sulla rispettiva curva, perchè essi sono parti dello stesso elemento, o perchè sono entrambi una geometria esterna. - - - - + + + + Select exactly one line or up to two points from the sketch. Selezionare solo una linea oppure al massimo due punti dello schizzo. - + Cannot add a horizontal length constraint on an axis! Non è possibile aggiungere un vincolo di lunghezza orizzontale su un asse! - + Cannot add a fixed x-coordinate constraint on the origin point! Non è possibile aggiungere un vincolo di coordinata x nel punto di origine! - - + + This constraint only makes sense on a line segment or a pair of points. Questo vincolo ha senso solo su un segmento di linea o su una coppia di punti. - + Cannot add a vertical length constraint on an axis! Non è possibile aggiungere un vincolo di lunghezza verticale su un asse! - + Cannot add a fixed y-coordinate constraint on the origin point! Non è possibile aggiungere un vincolo di coordinata y nel punto di origine! - + Select two or more lines from the sketch. Selezionare due o più linee dello schizzo. - - + + Select at least two lines from the sketch. Selezionare almeno due linee dello schizzo. - + Select a valid line. Selezionare una linea valida. - - + + The selected edge is not a valid line. Il bordo selezionato non è una linea valida. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2906,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; due curve e un punto. - + Select some geometry from the sketch. perpendicular constraint Selezionare alcune geometrie dello schizzo. - - + + Cannot add a perpendicularity constraint at an unconnected point! Non è possibile aggiungere un vincolo di perpendicolarità in un punto non connesso! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicolare al bordo di una B-spline attualmente non è supportato. - - + + One of the selected edges should be a line. Uno degli spigoli selezionati deve essere una linea. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. È stato applicato il vincolo tangenza punto finale su punto finale. È stato eliminato il vincolo coincidente. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. È stato applicato il vincolo tangenza segmento su punto finale. È stato eliminato il vincolo punto su oggetto. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2958,182 +2951,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; due curve e un punto. - + Select some geometry from the sketch. tangent constraint Selezionare alcune geometrie dello schizzo. - - - + + + Cannot add a tangency constraint at an unconnected point! Non è possibile aggiungere un vincolo di tangenza in un punto non connesso! - - + + Tangent constraint at B-spline knot is only supported with lines! Il vincolo tangente al nodo B-spline è supportato solo con le linee! - + B-spline knot to endpoint tangency was applied instead. È stata invece applicata la tangenza del nodo B-spline sul punto finale. - + Select either one point and several curves, or one curve and several points. Selezionare un punto e diverse curve, oppure una curva e diversi punti. - - + + Wrong number of selected objects! Numero di oggetti selezionati errato! - - + + With 3 objects, there must be 2 curves and 1 point. Con 3 oggetti, ci devono essere 2 curve e 1 punto. - - - + + + Tangency to B-spline edge currently unsupported. Tangente al bordo di una B-spline attualmente non è supportato. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selezionare uno o più archi o cerchi nello schizzo. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selezionare solo uno o più poli B-Spline o solo uno o più archi o cerchi dallo schizzo, ma non miscelati. - - - + + + Constraint only applies to arcs or circles. Vincolo applicato solo ad archi o cerchi. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selezionare una o due linee dello schizzo, oppure selezionare due bordi e un punto. - - + + Parallel lines Linee parallele - - + + An angle constraint cannot be set for two parallel lines. Un vincolo di angolo non può essere impostato per due linee parallele. - + Cannot add an angle constraint on an axis! Non è possibile aggiungere un vincolo di angolo su un asse! - + Select two edges from the sketch. Selezionare due spigoli dello schizzo. - + Select two or more compatible edges. Selezionare due o più spigoli compatibili. - + Sketch axes cannot be used in equality constraints. Gli assi dello schizzo non possono essere usati nei vincoli di uguaglianza. - + Equality for B-spline edge currently unsupported. Uguaglianza tra bordi di una B-spline attualmente non è supportato. - - - - + + + + Select two or more edges of similar type. Seleziona due o più bordi di tipo simile. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selezionare due punti e una linea di simmetria, o due punti e un punto di simmetria, o una linea e un punto di simmetria nello schizzo. - - + + Cannot add a symmetry constraint between a line and its end points. Impossibile aggiungere un vincolo di simmetria tra una linea e i suoi punti finali. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Non è possibile aggiungere un vincolo di simmetria tra una linea e i suoi estremi! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selezionare i due punti finali delle linee da usare come raggi e un bordo che rappresenta il limite. Il primo punto selezionato corrisponde all'indice n1, il secondo a n2 e il valore è definito dal rapporto n2/n1. - + Selected objects are not just geometry from one sketch. Gli oggetti selezionati non sono delle geometrie dello stesso schizzo. - + Cannot create constraint with external geometry only. Impossibile creare il vincolo solo con la geometria esterna. - + Incompatible geometry is selected. Le geometrie selezionate sono incompatibili. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw sul bordo di una B-spline attualmente non è supportato. - - - - - + + + + + Select constraints from the sketch. Seleziona i vincoli dallo schizzo. @@ -3632,12 +3625,12 @@ Combinazioni ammesse: due curve; un punto finale e una curva; due punti finali; Lunghezza: - + Refractive index ratio Indice di rifrazione - + Ratio n2/n1: Rapporto n2/n1: @@ -5225,112 +5218,112 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. SketcherGui::ViewProviderSketch - + Edit sketch Modifica lo schizzo - + A dialog is already open in the task panel Nel pannello azioni c'è già una finestra di dialogo aperta - + Do you want to close this dialog? Vuoi chiudere questa finestra di dialogo? - + Invalid sketch Schizzo non valido - + Do you want to open the sketch validation tool? Vuoi aprire lo strumento di convalida di schizzo? - + The sketch is invalid and cannot be edited. Lo schizzo non è valido e non può essere modificato. - + Please remove the following constraint: Si prega di rimuovere il seguente vincolo: - + Please remove at least one of the following constraints: Si prega di rimuovere almeno uno dei seguenti vincoli: - + Please remove the following redundant constraint: Si prega di rimuovere il seguente vincolo ridondante: - + Please remove the following redundant constraints: Si prega di rimuovere i seguenti vincoli ridondanti: - + The following constraint is partially redundant: Il seguente vincolo è parzialmente ridondante: - + The following constraints are partially redundant: I seguenti vincoli sono parzialmente ridondanti: - + Please remove the following malformed constraint: Rimuovere il seguente vincolo malformato: - + Please remove the following malformed constraints: Rimuovere i seguenti vincoli malformati: - + Empty sketch Schizzo vuoto - + Over-constrained: Sovravincolato: - + Malformed constraints: Vincoli malformati: - + Redundant constraints: Vincoli ridondanti: - + Partially redundant: Parzialmente ridondante: - + Solver failed to converge Risolutore impossibilitato a convergere - + Under constrained: Sotto vincolati: - + %n DoF(s) %n Grado(i) di libertà @@ -5338,7 +5331,7 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. - + Fully constrained Completamente vincolato @@ -5436,8 +5429,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Vincola il diametro di un cerchio o di un arco @@ -5445,7 +5438,8 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fissare il diametro/raggio di un cerchio o di un arco @@ -5453,20 +5447,12 @@ Questo viene fatto analizzando le geometrie e i vincoli dello schizzo. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fissa il raggio di un cerchio o di un arco - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fissare il diametro/raggio di un cerchio o di un arco - - Sketcher_Copy @@ -6080,7 +6066,7 @@ L'algoritmo di Eigen Sparse QR è ottimizzato per matrici sparsi; solitamente pi ViewProviderSketch - + and %1 more e %1 in più @@ -6303,7 +6289,7 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Lo schizzo contiene vincoli parzialmente ridondanti! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Le parabole sono state convertite. I file convertiti non si apriranno nelle versioni precedenti di FreeCAD!! @@ -6314,7 +6300,7 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p - + @@ -6339,7 +6325,7 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p - + @@ -6362,13 +6348,13 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Il vincolo ha informazioni sull'indice non valide ed è malformato. - - - - - - - + + + + + + + @@ -6379,7 +6365,7 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p - + Failed to add arc Impossibile aggiungere l'arco @@ -6493,7 +6479,7 @@ La spaziatura della griglia cambia se diventa più piccola di questo numero di p Impossibile aggiungere il rettangolo - + Failed to add rounded rectangle Impossibile aggiungere il rettangolo arrotondato @@ -6675,17 +6661,17 @@ I punti devono essere impostati più vicino di un quinto della spaziatura della CmdSketcherDimension - + Dimension Dimensione - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6705,14 +6691,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimensione - + Dimension tools. Strumenti di quotature. + + CmdSketcherConstrainRadius + + + Constrain radius + Raggio + + + + Fix the radius of a circle or an arc + Fissa il raggio di un cerchio o di un arco + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts index fe788a8b80..ee9bf37c10 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ja.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 円弧や円を拘束する - + Constrain an arc or a circle 円弧や円を拘束する - + Constrain radius 半径拘束 - + Constrain diameter 直径拘束 - + Constrain auto radius/diameter 半径/直径を自動拘束 @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 角度を拘束 - + Fix the angle of a line or the angle between two lines 直線の角度または2直線間の角度を拘束 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block ブロック拘束 - + Block the selected edge from moving 選択したエッジが動かないようブロック @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 一致拘束 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses 点間の一致拘束、または円、円弧、楕円の間の同心拘束を作成 @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 直径拘束 - + Fix the diameter of a circle or an arc 円または円弧の直径を固定 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 距離拘束 - + Fix a length of a line or the distance between a line and a vertex or between two circles 直線の長さ、直線と節点の間の距離、または2つの円の間の距離を拘束 @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 水平距離拘束 - + Fix the horizontal distance between two points or line ends 2点間または直線端点間の水平距離を拘束 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 垂直距離拘束 - + Fix the vertical distance between two points or line ends 2点間または直線端点間の垂直距離を拘束 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 等値拘束 - + Create an equality constraint between two lines or between circles and arcs 2直線間または円と円弧間の等値拘束を作成 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 水平拘束 - + Create a horizontal constraint on the selected item 選択されているアイテムに対して水平拘束を作成 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock ロック拘束 - + Create both a horizontal and a vertical distance constraint on the selected vertex 選択した頂点に水平距離拘束と垂直距離拘束の両方を作成 @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 平行拘束 - + Create a parallel constraint between two lines 2直線間の平行拘束を作成 @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 直角拘束 - + Create a perpendicular constraint between two lines 2直線間の垂直拘束を作成 @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object オブジェクト上の点拘束 - + Fix a point onto an object 点をオブジェクト上に拘束 @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 半径/直径を自動拘束 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 円を選択した場合は直径を拘束、円弧/スプラインを選択した場合は半径を拘束 - - CmdSketcherConstrainRadius - - - Constrain radius or weight - 半径または重みを拘束 - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - 円・円弧の半径、またはB-スプラインの極の重みを固定 - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) 屈折率拘束(スネルの法則) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. 光線の2端点と境界のエッジの間に屈折の法則 (スネル則の法則) による拘束を作成 @@ -598,12 +585,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 対称拘束 - + Create a symmetry constraint between two points with respect to a line or a third point 線または第3点に対して、2点間の対称拘束を作成 @@ -612,12 +599,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 正接拘束 - + Create a tangent constraint between two entities 2 つのエンティティ間に正接拘束を作成 @@ -625,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 垂直拘束 - + Create a vertical constraint on the selected item 選択されているアイテムに対して垂直拘束を作成 @@ -1487,12 +1474,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 拘束をアクティブ化/非アクティブ化 - + Activates or deactivates the selected constraints 選択した拘束をアクティブ化・非アクティブ化 @@ -1513,12 +1500,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 駆動拘束/参照拘束の切り替え - + Set the toolbar, or the selected constraints, into driving or reference mode ツールバー、または選択した拘束を駆動モードまたは参照モードに設定 @@ -1590,370 +1577,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 水平拘束を追加 - - - + + + Add horizontal alignment 水平配置を追加 - - + + Add vertical constraint 垂直拘束を追加 - + Add vertical alignment 垂直配置を追加 - + Add 'Lock' constraint 「ロック」拘束を追加 - + Add relative 'Lock' constraint 相対的な「ロック」拘束を追加 - + Add fixed constraint 固定拘束を追加 - + Add 'Block' constraint 「ブロック」拘束を追加 - + Add block constraint ブロック拘束を追加 - - - + + + Add coincident constraint 一致拘束を追加 - - + + Add distance from horizontal axis constraint 水平軸からの距離拘束を追加 - - + + Add distance from vertical axis constraint 垂直軸からの距離拘束を追加 - - + + Add point to point distance constraint 点間の距離拘束を追加 - - - + + + Add point to line Distance constraint 点と線の間の距離拘束を追加 - - + + Add circle to circle distance constraint 円と円の間の距離拘束を追加 - + Add circle to line distance constraint 円と線の間の距離拘束を追加 - - - - - - + + + + + + Add length constraint 寸法拘束を追加 - - + + + Dimension 寸法 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint オブジェクト上への点の拘束を追加 - - + + Add point to point horizontal distance constraint 点間の水平距離拘束を追加 - + Add fixed x-coordinate constraint X座標固定拘束を追加 - - + + Add point to point vertical distance constraint 点間の垂直距離拘束を追加 - + Add fixed y-coordinate constraint Y座標固定拘束を追加 - - + + Add parallel constraint 並行拘束を追加 - - - - - - - + + + + + + + Add perpendicular constraint 直角拘束を追加 - + Add perpendicularity constraint 垂直拘束を追加 - + Swap coincident+tangency with ptp tangency 点間正接によって一致と正接を入れ替え - + Swap PointOnObject+tangency with point to curve tangency 点曲線間正接によってオブジェクト上点と正接を入れ替え - - - - - - - + + + + + + + Add tangent constraint 正接拘束を追加 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 正接拘束点を追加 - - - - + + + + Add radius constraint 半径拘束を追加 - - - - + + + + Add diameter constraint 直径拘束を追加 - - - - + + + + Add radiam constraint 径拘束を追加 - - - - - - + + + + + + Add angle constraint 角度拘束を追加 - - + + Add equality constraint 等値拘束を追加 - - - - - + + + + + Add symmetric constraint 対称拘束を追加 - + Add Snell's law constraint スネル則拘束を追加 - + Toggle constraint to driving/reference 拘束の駆動/参照を切り替え - + Activate/Deactivate constraint 拘束をアクティブ化/非アクティブ化 @@ -2029,7 +2022,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc スケッチ円弧を追加 @@ -2280,59 +2273,59 @@ invalid constraints, degenerated geometry, etc. 自動拘束エラー: 等値拘束の適用後にスケッチの求解に失敗しました。 - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. 曲線の交点を推定できません。フィレット対象の曲線の頂点の間に一致拘束を追加してみてください。 - - + + BSpline Geometry Index (GeoID) is out of bounds. B-スプラインのジオメトリー番号(ジオID)が範囲外です。 - + You are requesting no change in knot multiplicity. ノット多重度で変更が起きないように要求しています。 - - + + The Geometry Index (GeoId) provided is not a B-spline curve. 入力されたジオメトリー番号(ジオID)がB-スプライン曲線になりません。 - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. ノット・インデックスが境界外です。OCCの記法に従うと最初のノットは1と非ゼロのインデックスを持ちます。 - + The multiplicity cannot be increased beyond the degree of the B-spline. B-スプラインの次数を越えて多重度を増やすことはできません。 - + The multiplicity cannot be decreased beyond zero. 0を越えて多重度を減らすことはできません。 - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCCは最大許容範囲内で多重度を減らすことができまぜん。 - + Knot cannot have zero multiplicity. ノットがゼロ多重性を持つことはでいません。 - + Knot multiplicity cannot be higher than the degree of the BSpline. B-スプラインの次数を超えてノット多重度を増やすことはできません。 - + Knot cannot be inserted outside the BSpline parameter range. B-スプラインパラメーターの範囲外にノットを挿入することはできません。 @@ -2400,134 +2393,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2575,329 +2568,329 @@ invalid constraints, degenerated geometry, etc. 寸法拘束 - + Cannot add a constraint between two external geometries. 2つの外部形状間に拘束を追加することはできません。 - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. 2つの固定ジオメトリーの間に拘束を追加することができません。固定ジオメトリーに外部ジオメトリー、ブロック拘束されたジオメトリー、B-スプラインの節点といった特殊な点が含まれています。 - + Sketcher Constraint Substitution スケッチャー拘束の置換 - + Keep notifying me of constraint substitutions 拘束置換の通知を継続 - - - + + + Only sketch and its support are allowed to be selected. スケッチとそのサポートのみが選択可能です. - + One of the selected has to be on the sketch. 選択されているアイテムの1つがスケッチ上にある必要があります. - - + + Select an edge from the sketch. スケッチからエッジを選択 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 拘束不可 - - - - + + + + The selected edge is not a line segment. 選択したエッジは線分ではありません. - - - - - - + + + + + + Double constraint 二重拘束 - - - - - + + + + + The selected edge already has a horizontal constraint! 選択されたエッジにはすでに水平拘束が設定されています! - - - + + + The selected edge already has a vertical constraint! 選択されたエッジにはすでに垂直拘束が設定されています! - - - - - - + + + + + + The selected edge already has a Block constraint! 選択されたエッジにはすでにブロック拘束が設定されています! - + The selected item(s) can't accept a horizontal constraint! 選択されているアイテムは水平拘束出来ません! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! 複数の固定点が選択されています。固定点を1つだけ選択してください! - + The selected item(s) can't accept a vertical constraint! 選択されているアイテムは垂直拘束出来ません! - - - + + + Select vertices from the sketch. スケッチから頂点を選択 - + Select one vertex from the sketch other than the origin. スケッチから原点以外の節点を 1 つ選択します。 - + Select only vertices from the sketch. The last selected vertex may be the origin. スケッチから頂点のみを選択してください。最後に選択された頂点は原点になります。 - + Wrong solver status 不適切なソルバー状態 - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. スケッチが求解されていない場合や冗長/競合する拘束がある場合はブロック拘束を追加できません。 - + Select one edge from the sketch. スケッチから1本のエッジを選択 - + Select only edges from the sketch. スケッチからエッジのみを選択 - + Number of selected objects is not 3 選択したオブジェクトの数が3ではありません。 - + Error エラー - + Unexpected error. More information may be available in the Report View. 予期しないエラーです。詳細についてはレポートビューで確認できます。 - + Endpoint to endpoint tangency was applied instead. 代わりに端点間の正接拘束が適用されました。 - + Select two or more points from the sketch. スケッチから2点以上の節点を選択 - + Select two or more vertices from the sketch. スケッチから2点以上の節点を選択してください。 - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. スケッチから一致拘束のための複数の頂点、または同心拘束のための複数の円、楕円、円弧、楕円弧を選択してください。 - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. スケッチから一致拘束のための2頂点、または同心拘束のための2つの円、楕円、円弧、楕円弧を選択してください。 - + Select exactly one line or one point and one line or two points from the sketch. スケッチから1直線または1点と1直線または2点を選択してください - + Cannot add a length constraint on an axis! 軸に対して長さ拘束を追加することはできません! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. スケッチから1直線、1点と1直線、2点、または2円を選択してください。 - + This constraint does not make sense for non-linear curves. この拘束は非線形な曲線に対して無効です。 - + Endpoint to edge tangency was applied instead. 代わりに端点とエッジの正接拘束が適用されました。 - - - - - - - + + + + + + + Select the right things from the sketch. スケッチから正しい対象を選択してください。 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. B-スプラインの重みではないエッジを選択してください。 - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. 選択した点をそれぞれの曲線上に拘束することができません。同じ要素の一部であるか、両方とも外部ジオメトリーであるか、適切なエッジでないことが原因です。 - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 選択した点をそれぞれの曲線上に拘束することができません。同じ要素のパーツであるか、両方とも外部ジオメトリーであることが原因です。 - - - - + + + + Select exactly one line or up to two points from the sketch. スケッチから1直線または2つ以下の点を選択してください - + Cannot add a horizontal length constraint on an axis! 軸に対して水平距離拘束を追加することはできません! - + Cannot add a fixed x-coordinate constraint on the origin point! 原点に対してX座標を固定する拘束を追加することはできません! - - + + This constraint only makes sense on a line segment or a pair of points. この拘束は1線分または点ペアに対してのみ有効です。 - + Cannot add a vertical length constraint on an axis! 軸に対して垂直距離拘束を追加することはできません! - + Cannot add a fixed y-coordinate constraint on the origin point! 原点に対してY座標を固定する拘束を追加することはできません! - + Select two or more lines from the sketch. スケッチから2本以上の直線を選択してください - - + + Select at least two lines from the sketch. スケッチから2本以上の直線を選択してください - + Select a valid line. 有効な直線を選択してください。 - - + + The selected edge is not a valid line. 選択されたエッジは有効な直線ではありません。 - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2907,42 +2900,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 可能な組み合わせ: 2曲線; 1端点と1曲線; 2端点; 2曲線と1点 - + Select some geometry from the sketch. perpendicular constraint スケッチから幾つかのジオメトリを選択してください。 - - + + Cannot add a perpendicularity constraint at an unconnected point! 接続していない点に対して垂直拘束を追加することはできません! - - - + + + Perpendicular to B-spline edge currently unsupported. B-スプラインエッジの直角拘束は現在サポートされていません。 - - + + One of the selected edges should be a line. 選択されているエッジの1つが直線である必要があります - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. 端点間の正接拘束が適用されました。一致拘束は削除されました。 - + Endpoint to edge tangency was applied. The point on object constraint was deleted. 端点とエッジの正接拘束が適用されました。点のオブジェクト上への拘束は削除されました。 - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2952,182 +2945,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 可能な組み合わせ: 2曲線; 端点と曲線; 2端点; 2曲線と1点 - + Select some geometry from the sketch. tangent constraint スケッチから幾つかのジオメトリを選択してください。 - - - + + + Cannot add a tangency constraint at an unconnected point! 接続されていない点に対して正接拘束を追加することはできません! - - + + Tangent constraint at B-spline knot is only supported with lines! B-スプラインのノットでの接線拘束は線でのみサポートされています! - + B-spline knot to endpoint tangency was applied instead. 代わりにB-スプラインのノットと端点の正接拘束が適用されました。 - + Select either one point and several curves, or one curve and several points. 1点と複数の曲線、または1曲線と複数の点を選択してください。 - - + + Wrong number of selected objects! 選択したオブジェクトの数が正しくありません ! - - + + With 3 objects, there must be 2 curves and 1 point. 使用される3オブジェクトは2つの曲線と1つの点である必要があります。 - - - + + + Tangency to B-spline edge currently unsupported. B-スプラインエッジの正接拘束は現在サポートされていません。 - - - - - - + + + + + + Select one or more arcs or circles from the sketch. スケッチから 1 つ以上の円弧または円を選択してください。 - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. 1つ以上のB-スプラインの極、または1つ以上の円・円弧をスケッチから選択してください。ただし混在はできません。 - - - + + + Constraint only applies to arcs or circles. 円弧または円のみに適用される拘束です。 - - + + Select one or two lines from the sketch. Or select two edges and a point. スケッチから1本か2本の線分を選択してください。あるいは2つのエッジと頂点を選択します。 - - + + Parallel lines 平行線 - - + + An angle constraint cannot be set for two parallel lines. 2つの平行線に角度拘束を設定できません。 - + Cannot add an angle constraint on an axis! 軸に対して角度拘束を追加することはできません! - + Select two edges from the sketch. スケッチから2本のエッジを選択してください - + Select two or more compatible edges. 複数の互換性のあるエッジを選択してください。 - + Sketch axes cannot be used in equality constraints. スケッチ軸を等値拘束で使用することはできません。 - + Equality for B-spline edge currently unsupported. B-スプラインエッジの等値拘束は現在サポートされていません。 - - - - + + + + Select two or more edges of similar type. 複数の同じタイプのエッジを選択してください。 - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 2つの点と対称線、2つの点と対称点、あるいは1本の直線と対称点をスケッチから選択してください。 - - + + Cannot add a symmetry constraint between a line and its end points. 直線とその端点間に対称拘束を追加することはできません。 - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 直線とその端点間に対称拘束を追加することはできません! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw 光線として使用される直線の2端点と境界を表すエッジを選択してください。1つ目に選択された点がインデックスn1、2つ目の点がインデックスn2と対応し、データ値は比n2/n1を設定します。 - + Selected objects are not just geometry from one sketch. 選択されたオブジェクトは1つのスケッチから成るジオメトリーではありません。 - + Cannot create constraint with external geometry only. 外部ジオメトリーのみからなる拘束を作成することはできません。 - + Incompatible geometry is selected. 互換性のないジオメトリーが選択されています。 - + SnellsLaw on B-spline edge is currently unsupported. B-スプラインエッジのスネル則拘束は現在サポートされていません。 - - - - - + + + + + Select constraints from the sketch. スケッチから拘束を選択 @@ -3626,12 +3619,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 長さ: - + Refractive index ratio 屈折率 - + Ratio n2/n1: 比 n2/n1: @@ -5217,119 +5210,119 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch スケッチを編集 - + A dialog is already open in the task panel タスクパネルで既にダイアログが開かれています - + Do you want to close this dialog? このダイアログを閉じますか? - + Invalid sketch スケッチが無効です - + Do you want to open the sketch validation tool? スケッチ検証ツールを起動しますか? - + The sketch is invalid and cannot be edited. スケッチが不正で、編集できません。 - + Please remove the following constraint: 以下の拘束を削除してください: - + Please remove at least one of the following constraints: 以下の拘束から少なくとも1つを削除してください: - + Please remove the following redundant constraint: 以下の不要な拘束を削除してください: - + Please remove the following redundant constraints: 以下の不要な拘束を削除してください: - + The following constraint is partially redundant: 以下の拘束は一部が冗長です: - + The following constraints are partially redundant: 以下の拘束は一部が冗長です: - + Please remove the following malformed constraint: 次の不正な拘束を削除してください: - + Please remove the following malformed constraints: 次の不正な拘束を削除してください: - + Empty sketch スケッチが空です - + Over-constrained: 過剰拘束: - + Malformed constraints: 不正な拘束: - + Redundant constraints: 冗長な拘束: - + Partially redundant: 部分的に冗長: - + Solver failed to converge ソルバーの収束に失敗 - + Under constrained: 拘束中: - + %n DoF(s) %n 自由度 - + Fully constrained 完全拘束 @@ -5427,8 +5420,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 円または円弧の直径を固定 @@ -5436,7 +5429,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc 円または円弧の半径/直径を固定 @@ -5444,20 +5438,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 円または円弧の半径を固定 - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - 円または円弧の半径/直径を固定 - - Sketcher_Copy @@ -6071,7 +6057,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more %1 以上 @@ -6294,7 +6280,7 @@ The grid spacing change if it becomes smaller than this number of pixel.スケッチに一部が冗長な拘束があります! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! 放物線がバージョン変換されました。変換されたファイルは以前のバージョンのFreeCADでは開けません!! @@ -6305,7 +6291,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6330,7 +6316,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6353,13 +6339,13 @@ The grid spacing change if it becomes smaller than this number of pixel.この拘束には無効なインデックス情報が含まれており、形式が正しくありません。 - - - - - - - + + + + + + + @@ -6370,7 +6356,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc 円弧を追加できませんでした。 @@ -6484,7 +6470,7 @@ The grid spacing change if it becomes smaller than this number of pixel.長方形を追加できませんでした。 - + Failed to add rounded rectangle 角丸長方形を追加できませんでした。 @@ -6666,17 +6652,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 寸法 - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6696,14 +6682,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension 寸法 - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + 半径拘束 + + + + Fix the radius of a circle or an arc + 円または円弧の半径を固定 + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts index 7cc30af8e8..ab34dde49c 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ka.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle რკალის ან წრის შეზღუდვა - + Constrain an arc or a circle რკალის ან წრის შეზღუდვა - + Constrain radius რადიუსის სეზღუდვა - + Constrain diameter დიამეტრის შეზღუდვა - + Constrain auto radius/diameter ავტომატური რადიუსის/დიამეტრის შეზღუდვა @@ -158,7 +158,7 @@ Clone - კლონი + ასლი @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle კუთხის შეზღუდვა - + Fix the angle of a line or the angle between two lines ხაზის ან ორ ხაზს შორს კუთხის დაფიქსირება @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block შეზღუდვის ბლოკირება - + Block the selected edge from moving მონიშნული წიბოს გადაადგილების დაბლოკვა @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident დამთხვევის შეზღუდვა - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses წერტილებს შორის დამთხვევის ან წრეწირებს, რკალებსა და ოვალებს შორის კონცენტრულობის შეზღუდვის შექმნა @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter დიამეტრის შეზღუდვა - + Fix the diameter of a circle or an arc წრის ან რკალის რადიუსის გასწორება @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance დაშორების შეზღუდვა - + Fix a length of a line or the distance between a line and a vertex or between two circles დააყენეთ ხაზის სიგრძე ან მანძილი ხაზსა და წვეროს ან ორ წრეწირს შორის @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance ჰორიზონტალური დაშორების შეზღუდვა - + Fix the horizontal distance between two points or line ends ორ წერტილს ან ხაზის ბოლოებს შორის ჰორიზონტალური დაშორების ფიქსირება @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance ვერტიკალური დაშორების შეზღუდვა - + Fix the vertical distance between two points or line ends ორ წერტილს ან ხაზის ბოლოებს შუა დაშორების ფიქსირება @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal ტოლობით შეზღუდვა - + Create an equality constraint between two lines or between circles and arcs ორ ხაზს ან წრეწირსა და რკალებს შორის თანასწორობის შეზღუდვის შექმნა @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally ჰორიზონტალურობის შეზღუდვა - + Create a horizontal constraint on the selected item არჩეულ ელემენტზე ჰორიზონტალური შეზღუდვის შექმნა @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock მდებარეობის ჩაკეტვა - + Create both a horizontal and a vertical distance constraint on the selected vertex ორივე, ჰორიზონტალური და ვერტიკალური შეზღუდვების შექმნა @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel პარალელურობის შეზღუდვა - + Create a parallel constraint between two lines ორ ხაზს შორის პარალელურობის შეზღუდვის შექმნა @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular მართობულობის შეზღუდვა - + Create a perpendicular constraint between two lines ორ ხაზს შორის მართობის შეზღუდვის შექმნა @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object წერტილის ობიექტზე დამაგრება - + Fix a point onto an object წერტილის ობიექტზე მიმაგრება @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter ავტომატური რადიუსის/დიამეტრის შეზღუდვა - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen თუ წრეწირს აირჩევთ, დიამეტრი უცვლელი იქნება, თუ რკალს/სპლაინის პოლუსი - რადიუსი - - CmdSketcherConstrainRadius - - - Constrain radius or weight - რადიუსის ან წონის შეზღუდვა - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - წრის ან რკალის რადიუსის ან B-სპლაინს პოლუსის სიმძიმის დაფიქსირება - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) არეკვლის შეზღუდვა (სნელის კანონი) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. სხივების ორ ბოლო წერტილსა და წიბოს, როგორც საკონტაქტო ზედაპირს შორის გარდატეხის კანონის (სნელის კანონი) შეზღუდვის შექმნა. @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical სიმეტრიულობის შეზღუდვა - + Create a symmetry constraint between two points with respect to a line or a third point სიმეტრიის შეზღუდვის შექმნა ორ წერტილს შორის @@ -614,12 +601,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent მხების შეზღუდვა - + Create a tangent constraint between two entities ორი ობიექტს შორის მხების შეზღუდვის შექმნა @@ -627,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically ვერტიკალურობის შეზღუდვა - + Create a vertical constraint on the selected item არჩეულ ელემენტზე ვერტიკალური შეზღუდვის შექმნა @@ -798,7 +785,7 @@ with respect to a line or a third point Create fillet - მომრგვალებული ნაზოლის შექმნა + მომრგვალების შექმნა @@ -1032,7 +1019,7 @@ with respect to a line or a third point Decrease knot multiplicity - კვანძის გამრავლებადობის შემცირება + კვანძის ჯერადობის შემცირება @@ -1123,7 +1110,7 @@ with respect to a line or a third point Increase knot multiplicity - კვანძის გამრავლებადობის გაზრდა + კვანძის ჯერადობის გაზრდა @@ -1490,12 +1477,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint შეზღუდვის აქტივაცია/დეაქტივაცია - + Activates or deactivates the selected constraints მონიშნული შეზღუდვების ჩართ/გამორთ @@ -1516,12 +1503,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint მშენებლობის/მიმართვის შეზღუდვის გადართვა - + Set the toolbar, or the selected constraints, into driving or reference mode ხელსაწყოთა პანელის, ან მონიშნული შეზღუდვების @@ -1595,370 +1582,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint ჰორიზონტალურობის შეზღუდვის დამატება - - - + + + Add horizontal alignment ჰორიზონტალური სწორების დამატება - - + + Add vertical constraint ვერტიკალურობის შეზღუდვის დამატება - + Add vertical alignment ვერტიკალური სწორების დამატება - + Add 'Lock' constraint "მბლოკავი" შეზღუდვის დამატება - + Add relative 'Lock' constraint ფარდობითი „დაბლოკვის“ შეზღუდვის დამატება - + Add fixed constraint ფიქსირებული შეზღუდვის დამატება - + Add 'Block' constraint 'ბლოკის' ტიპის შეზღუდვის დამატება - + Add block constraint ბლოკის შეზღუდვის დამატება - - - + + + Add coincident constraint დამთხვევის შეზღუდვის დამატება - - + + Add distance from horizontal axis constraint ჰორიზონტალური ღერძის შეზღუდვამდე მანძილის დამატება - - + + Add distance from vertical axis constraint ვერიკალურ ღერძამდე მანძილის შეზღუდვის დამატება - - + + Add point to point distance constraint წერტილიდან წერტილამდე მანძილის შეზღუდვის დამატება - - - + + + Add point to line Distance constraint წერტილიდან ხაზამდე დაშორების შეზღუდვის დამატება - - + + Add circle to circle distance constraint წრეწირიდან წრეწირამდე მანძილის შეზღუდვის დამატება - + Add circle to line distance constraint წრეწირიდან ხაზამდე მანძილის შეზღუდვის დამატება - - - - - - + + + + + + Add length constraint სიგრძის შეზღუდვის დამატება - - + + + Dimension ზომა - + Add lock constraint დაბლოკვის შეზღუდვის დამატება - + Add 'Distance to origin' constraint 'წყარომდე დაშორების' შეზღუდვის დამატება - - - + + + Add Distance constraint დაშორების შეზღუდვის დამატება - - - + + + Add 'Horizontal' constraints 'ჰორიზონტალური' შეზღუდვების დამატება - - - + + + Add 'Vertical' constraints 'ვერტიკალური' შეზღუდვების დამატება - - + + Add Symmetry constraint სიმეტრიის შეზღუდვის დამატება - - + + Add Symmetry constraints სიმეტრიის შეზღუდვების დამატება - - + + Add Distance constraints დაშორების შეზღუდვების დამატება - + Add Horizontal constraint ჰორიზონტალური შეზღუდვის დამატება - + Add Vertical constraint ვერტიკალური შეზღუდვის დამატება - + Add Block constraint ბლოკის შეზღუდვის დამატება - + Add Angle constraint კუთხის შეზღუდვის დამატება - - - - + + + + Add Equality constraint ტოლობის შეზღუდვის დამატება - + Add Equality constraints ტოლობის შეზღუდვების დამატება - + Add Radius constraint რადიუსის შეზღუდვის დამატება - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint კონცენტრირებული და სიგრძის შეზღუდვის დამატებ - + Add DistanceX constraint X დაშორების შეზღუდვის დამატება - + Add DistanceY constraint Y დაშორების შეზღუდვის დამატება - + Add point to circle Distance constraint წერტილიდან წრეწირამდე დაშორების შეზღუდვის დამატება - - + + Add point on object constraint ობექტის შეზღუდვაზე წერტილის დამატება - - + + Add point to point horizontal distance constraint წერტილიდან წერტილამდე ჰორიზონტალური მანძილის შეზღუდვის დამატება - + Add fixed x-coordinate constraint X-კოორდინატის ფიქსირებული შეზღუდვის დამატება - - + + Add point to point vertical distance constraint წერტილიდან წერტილამდე ვერტიკალური მანძილის შეზღუდვის დამატება - + Add fixed y-coordinate constraint Y-კოორდინატის ფიქსირებული შეზღუდვის დამატება - - + + Add parallel constraint პარალელურობის შეზღუდვის დამატება - - - - - - - + + + + + + + Add perpendicular constraint მართკუთხა შეზღუდვის დამატება - + Add perpendicularity constraint მართკუთხობის სეზღუდვის დამატება - + Swap coincident+tangency with ptp tangency დამთხვევის+მხების ptp მხებთან მიმოცვლა - + Swap PointOnObject+tangency with point to curve tangency PointOnObject+მხების მიმოცვლა მრუდის მხების წერტილთან - - - - - - - + + + + + + + Add tangent constraint მხების შეზღუდვის დამატება - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point მხების შეზღუდვის წერტილის დამატება - - - - + + + + Add radius constraint რადიუსის შეზღუდვის დამატება - - - - + + + + Add diameter constraint დიამეტრის შეზღუდვის დამატება - - - - + + + + Add radiam constraint რადიამის შეზღუდვის დამატება - - - - - - + + + + + + Add angle constraint კუთხის შეზღუდვის დამატება - - + + Add equality constraint ტოლობის შეზღუდვის დამატება - - - - - + + + + + Add symmetric constraint სიმეტრიულობის შეზღუდვის დამატება - + Add Snell's law constraint სნელის კანონის შეზღუდვის დამატება - + Toggle constraint to driving/reference მშენებლობის/მიმართვის შეზღუდვის გადართვა - + Activate/Deactivate constraint შეზღუდვის აქტივაცია/დეაქტივაცია @@ -2034,7 +2027,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc ესკიზზე რკალის დამატება @@ -2078,7 +2071,7 @@ invalid constraints, degenerated geometry, etc. Create fillet - მომრგვალების შექმნა + მომრგვალებული ნაზოლის შექმნა @@ -2128,12 +2121,12 @@ invalid constraints, degenerated geometry, etc. Increase knot multiplicity - კვანძის ჯერადობის გაზრდა + კვანძის გამრავლებადობის გაზრდა Decrease knot multiplicity - კვანძის ჯერადობის შემცირება + კვანძის გამრავლებადობის შემცირება @@ -2285,59 +2278,59 @@ invalid constraints, degenerated geometry, etc. ავტომატური შეზღუდვის შეცდომა: თანასწორობის შეზღუდვების გადატარების შემდეგ ესკიზი ამოხსნადი არაა. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. მრუდების კვეთის გამოცნობის შეცდომა. სცადეთ დაამატოთ დამთხვევების შეზღუდვები მრუდების წვეროებზე, რომლის მომრგვალებასაც ცდილობთ. - - + + BSpline Geometry Index (GeoID) is out of bounds. B-სპლაინის გეომეტრიის ინდექსი (GeoID) დაშვებულ ლიმიტებს გარეთაა. - + You are requesting no change in knot multiplicity. თქვენ არ ითხოვთ ცვლილებას კვანძის გაყოფადობაში. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. გეომეტრიის მითითებული ინდექსი (GeoID) B-სპლაინის მრუდს არ წარმოადგენს. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. კვანძის ინდექსი საზღვრებს გარეთაა. დაიმახსოვრეთ, რომ OCC ნოტაციების შესაბამისად, პირველი კვანძის ინდექსი 1-ია და არა 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. სიმრავლე არ შეიძლება გაიზარდოს B-სპლაინის დონის მიღმა. - + The multiplicity cannot be decreased beyond zero. სიმრავლე არ შეიძლება შემცირდეს ნულს მიღმა. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC-ს არ შეუძლია შეამციროს სიმრავლე მაქსიმალური ტოლერანტობის ფარგლებში. - + Knot cannot have zero multiplicity. კვანძებს არ შეიძლება ნულოვანი მამრავლი ჰქონდეს. - + Knot multiplicity cannot be higher than the degree of the BSpline. კვანძის მამრავლი არ შეიძლება B-სპლაინის დონეზე დიდი იყოს. - + Knot cannot be inserted outside the BSpline parameter range. კვანძის ჩასმა B-სპლაინის პარამეტრების დიაპაზონის გარეთ შეუძლებელია. @@ -2405,134 +2398,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ invalid constraints, degenerated geometry, etc. სივრცული შეზღუდვა - + Cannot add a constraint between two external geometries. ორ გარე გეომეტრიას შორის შეზღუდვის დამატება შეუძლებელია. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. ორ დამაგრებულ გეომეტრიას შორის შეზღუდვის დამატება შეუძლებელია. დამაგრებულ გეომეტრიებს მიეკუთვნება გარე გეომეტრია, დაბლოკილი გეომეტრია და ისეთი სპეციალური წერტილები, როგორიცაა B-სპლაინის კვანძის წერტილები. - + Sketcher Constraint Substitution Sketcher-ის შეზღუდვის ჩანაცვლება - + Keep notifying me of constraint substitutions შეზღუდვების ჩანაცვლების შესახებ შეტყობინებების ჩვენების გაგრძელება - - - + + + Only sketch and its support are allowed to be selected. შეიძლება მოინიშნოს მხოლოდ ესკიზი და მისი საყრდენი. - + One of the selected has to be on the sketch. ერთერთი მონიშნული ესკიზზე უნდა იყოს. - - + + Select an edge from the sketch. ესკიზზე წიბოს მონიშვნა. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint შეზღუდვის შეცდომა - - - - + + + + The selected edge is not a line segment. მონიშნული წიბო ხაზის სეგმენტს არ წარმოადგენს. - - - - - - + + + + + + Double constraint ორმაგი შეზღუდვა - - - - - + + + + + The selected edge already has a horizontal constraint! მონიშნულ წიბოს უკვე აქვს ჰორიზონტალური შეზღუდვა! - - - + + + The selected edge already has a vertical constraint! მონიშნულ წიბოს უკვე აქვს ვერტიკალური შეზღუდვა! - - - - - - + + + + + + The selected edge already has a Block constraint! მონიშნულ წიბოს უკვე ადევს შეზღუდვის ბლოკი! - + The selected item(s) can't accept a horizontal constraint! არჩეული ელემენტ(ებ)-ი ვერ მიიღებს ჰორიზონტალურ შეზღუდვას! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! მონიშნულია ერთზე მეტი დამაგრებული წერტილი. მონიშნეთ მაქსიმუმ ერთი დამაგრებული წერტილი! - + The selected item(s) can't accept a vertical constraint! არჩეული ელემენტ(ებ)-ი ვერ მიიღებს ვერტიკალურ შეზღუდვას! - - - + + + Select vertices from the sketch. ესკიზზე წვეროების მონიშვნა. - + Select one vertex from the sketch other than the origin. აირჩიეთ წიბოდან კიდევ ერთი წვერო წყაროს გარდა. - + Select only vertices from the sketch. The last selected vertex may be the origin. ესკიზზე მხოლოდ წვეროები მონიშნეთ. ბოლოს მონიშნული წვერო საწყისი შეიძლება იყოს. - + Wrong solver status ამომხსნელის არასწორი სტატუსი - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. დაბლოკვის შეზღუდვას ვერ დაამატებთ, თუ ესკიზი ამოუხსნელია ან არსებობს დამატებითი, ან ურთიერთგამომრიცხავი შეზღუდვები. - + Select one edge from the sketch. ესკიზიდან მონიშნეთ ერთი წიბო. - + Select only edges from the sketch. ესკიზიდან მონიშნეთ მხოლოდ წიბოები. - + Number of selected objects is not 3 მონიშნული ობიექტების რიცხვი არ უდრის სამს - + Error შეცდომა - + Unexpected error. More information may be available in the Report View. მოულოდნელი შეცდომა. მეტ ინფორმციას შეიძლება ანგარიშის ხედში მიაგნოთ. - + Endpoint to endpoint tangency was applied instead. სამაგიეროდ გამოყენებულია ბოლო წერტილიდან ბოლო წერტილთან მხები. - + Select two or more points from the sketch. აირჩიეთ ორი ან მეტი წერტილი. - + Select two or more vertices from the sketch. ესკიზიდან აირჩიეთ ორი ან მეტი წვერო. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. დამთხვევის შეზღუდვისთვის ესკიზიდან აირჩიეთ ორი წვერო ან მეტი წვერო, ან, კონცენტრული შეზღუდვისთვის, ორი ან მეტი წრეწირი, ოვალები, რკალები ან ოვალის რკალები. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. დამთხვევის შეზღუდვისთვის ესკიზიდან აირჩიეთ ორი წვერო, ან, კონცენტრული შეზღუდვისთვის, ორი წრეწირი, ოვალები, რკალები ან ოვალის რკალები. - + Select exactly one line or one point and one line or two points from the sketch. ესკიზიდან აირჩიეთ მხოლოდ ერთი ხაზი ან ერთი წერტილი და ერთი ხაზი ან ორი წერტილი. - + Cannot add a length constraint on an axis! ღერძზე სიგრძის შეზღუდვის დაწესება შეუძლებელია! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. ესკიზიდან აირჩიეთ მხოლოდ ერთი ხაზი ან ერთი წერტილი და ერთი ხაზი ან ორი წერტილი ან ორი წრეწირი. - + This constraint does not make sense for non-linear curves. ამ შეზღუდვას აზრი არ აქვს არახაზოვანი მრუდებისთვის. - + Endpoint to edge tangency was applied instead. სამაგიეროდ გამოყენებულია ბოლო წერტილიდან წიბოსთნ მხები. - - - - - - - + + + + + + + Select the right things from the sketch. ესკიზიდან სწორი რამეების არჩევა. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. აირჩიეთ წიბო, რომელიც არაა B-სპლაინის წონა. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. არცერთი მონიშნული წერტილი არ შემოიფარგლება შესაბამის მრუდებზე, რადგან ისინი ერთი და იგივე ელემენტის ნაწილებია, რადგან ორივე გარე გეომეტრიაა, ან იმიტომ, რომ წიბო დაუშვებელია. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. არცერთი მონიშნული წერტილი არ შემოიფარგლება შესაბამის მრუდებზე. ისინი ან ერთი და იგივე ელემენტის ნაწილებია, ან გარე გეომეტრიის ნაწილს წარმოადგენენ. - - - - + + + + Select exactly one line or up to two points from the sketch. ესკიზიდან აირჩიეთ ზუსტად ერთი ხაზი ან ორი წერტილი. - + Cannot add a horizontal length constraint on an axis! ღერძზე ჰორიზონტალური სიგრძის შეზღუდვის დაწესება შეუძლებელია! - + Cannot add a fixed x-coordinate constraint on the origin point! საწყის წერტილზე ფიქსირებული X-კოორდინატის შეზღუდვის დამატება შეუძლებელია! - - + + This constraint only makes sense on a line segment or a pair of points. ამ შეზღუდვას აზრი მხოლოდ ხაზის სეგმენტზე ან წერტილების წყვილზე აქვს. - + Cannot add a vertical length constraint on an axis! ღერძზე ვერტიკალური სიგრძის შეზღუდვის დაწესება შეუძლებელია! - + Cannot add a fixed y-coordinate constraint on the origin point! საწყის წერტილზე ფიქსირებული Y-კოორდინატის შეზღუდვის დამატება შეუძლებელია! - + Select two or more lines from the sketch. ესკიზიდან აირჩიეთ ორი ან მეტი ხაზი. - - + + Select at least two lines from the sketch. მონიშნეთ მინიმუმ 2 ხაზი. - + Select a valid line. აირჩიეთ ნამდვილი ხაზი. - - + + The selected edge is not a valid line. მონიშნული წიბო სწორ ხაზს არ წარმოადგენს. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c მხარდაჭერილი კომბინაციებია: ორი მრუდი; ან ბოლო წერტილი და მრუდი; ან ორი ბოლო წერტილი; ან ორი მრუდი და წერტილი. - + Select some geometry from the sketch. perpendicular constraint ესკიზიდან მონიშნეთ რამე გეომეტრია. - - + + Cannot add a perpendicularity constraint at an unconnected point! დაუკავშირებელ წერტილზე მართობული შეზღუდვის დამატება შეუძლებელია! - - - + + + Perpendicular to B-spline edge currently unsupported. მართობი B-სპლაინის წიბოზე ჯერ მხარდაჭერილი არაა. - - + + One of the selected edges should be a line. ერთი მონიშნული წიბოებიდან ხაზი უნდა იყოს. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. ბოლო წერტილიდან წერტილამდე მხები გადატარებულია. დამთხვევის შეზღუდვა წაშლილია. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. ბოლო წერტილიდან წიბომდე მხები გადატარებულია. წერტილი ობიექტის შეზღუდვაზე წაშლილია. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c მხარდაჭერილი კომბინაციებია: ორი მრუდი; ან ბოლო წერტილი და მრუდი; ან ორი ბოლო წერტილი; ან ორი მრუდი და წერტილი. - + Select some geometry from the sketch. tangent constraint ესკიზიდან მონიშნეთ რამე გეომეტრია. - - - + + + Cannot add a tangency constraint at an unconnected point! დაუკავშირებელ წერტილზე მხების შეზღუდვის დამატება შეუძლებელია! - - + + Tangent constraint at B-spline knot is only supported with lines! მხების მზღუდავი B-სპლაინის კვანძთან მხოლოდ ხაზებითაა მხარდაჭერილი! - + B-spline knot to endpoint tangency was applied instead. სამაგიეროდ გამოყენებულია B-სპლაინის კვანძიდან ბოლო წერტილის მხებამდე. - + Select either one point and several curves, or one curve and several points. აირჩიეთ ან ერთი წერტილი და რამდენიმე მრუდი ან ერთ მრუდი და რამდენიმე წერტილი. - - + + Wrong number of selected objects! მონიშნული ობიექტების არასწორი რაოდენობა! - - + + With 3 objects, there must be 2 curves and 1 point. 3 ობიექტით უნდა იყოს 2 მრუდი და 1 წერტილი. - - - + + + Tangency to B-spline edge currently unsupported. მხების B-სპლაინის წიბომდე ჯერ მხარდაუჭერელია. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. აირჩიეთ ერთი ან მეტი რკალი ან წრეწირი ესკიზიდან. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. ესკიზიდან მონიშნეთ მხოლოდ ერთი ან მეტი B-სპლაინი, რკალები ან წრეწირები, მაგრამ ტიპებს ნუ შეურევთ. - - - + + + Constraint only applies to arcs or circles. შეზღუდვები ეხებამხოლოდ რკალებს და წრეწირებს. - - + + Select one or two lines from the sketch. Or select two edges and a point. ესკიზიდან მონიშნეთ ერთი ან ორი ხაზი ან მონიშნეთ ორი წიბო და წერტილი. - - + + Parallel lines პარალელური ხაზები - - + + An angle constraint cannot be set for two parallel lines. კუთხის შეზღუდვის დაყენება პარალელური ხაზებისთვის შეუძლებელია. - + Cannot add an angle constraint on an axis! ღერძზე კუთხის შეზღუდვის დაწესება შეუძლებელია! - + Select two edges from the sketch. მონიშეთ ორი წიბო ესკიზიდან. - + Select two or more compatible edges. მონიშნეთ ორი ან მეტი თავსებადი წიბო. - + Sketch axes cannot be used in equality constraints. ესკიზის ღერძები არ შეიძლება გამოყენებულ იქნას თანასწორობის შეზღუდვაში. - + Equality for B-spline edge currently unsupported. B-სპლაინის წიბოსთვის თანასწორობა ჯერ მხარდაუჭერელია. - - - - + + + + Select two or more edges of similar type. მონიშნეთ ორი ან მეტი ერთნაირი ტიპის წიბო. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. ესკიზზე მონიშნეთ ორი წერტილი და სიმეტრიის ხაზი, ან ორი წერტილი და სიმეტრიის წერტილი ან ხაზი და სიმეტრიის წერტილი. - - + + Cannot add a symmetry constraint between a line and its end points. არ შეიძლება სიმეტრიის შეზღუდვის დამატება ხაზსა და მის ბოლო წერტილებს შორის. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! არ შეიძლება სიმეტრიის შეზღუდვის დამატება ხაზსა და მის ბოლო წერტილებს შორის! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw აირჩიეთ ხაზის ორი ბოლოწერტილები, რომლებსაც სხივის როლში შეუძლიათ გამოსვლა და წიბო, რომელიც ზღვარს წრმოადგენს. პირველი მონიშნული წერტილი შეესაბამება ინდექსს n1, მეორე n2 და მიბმის მნიშვნელობა შესატყვისობას n2/n1-ზე აყენებს. - + Selected objects are not just geometry from one sketch. მონიშნული ობიექტები არ წარმოადგენენ მხოლიდ გეომეტრიებს ერთი ესკიზიდან. - + Cannot create constraint with external geometry only. შეუძლებელია შეზღუდვის შექმნა მხოლოდ გარე გეომეტრიით. - + Incompatible geometry is selected. არჩეულია შეუთავსებელი გეომეტრია. - + SnellsLaw on B-spline edge is currently unsupported. სნელის კანონი B-სპლაინის წიბოზე ჯერ მხარდაჭერილი არაა. - - - - - + + + + + Select constraints from the sketch. აირჩიეთ შეზღუდვები ესკიზიდან. @@ -3631,12 +3624,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c სიგრძე: - + Refractive index ratio გარდატეხვის მაჩვენებლების ფარდობა - + Ratio n2/n1: N2/n1 ფარდობა: @@ -4889,7 +4882,7 @@ However, no constraints linking to the endpoints were found. Settings - მორგება + გამართვა @@ -5226,112 +5219,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch ესკიზის ჩასწორება - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch ესკიზი დაზიანებულია - + Do you want to open the sketch validation tool? გნებავთ ესკიზის გადამოწმების ხელსაწყოს გახსნა? - + The sketch is invalid and cannot be edited. ესკიზი არასწორია. მისი ჩასწორება შეუძლებელია. - + Please remove the following constraint: გთხოვთ, წაშალოთ შემდეგი შეზღუდვა: - + Please remove at least one of the following constraints: გთხოვთ, ამოიღოთ მინიმუმ ერთი შემდეგი შეზღუდვა: - + Please remove the following redundant constraint: გთხოვთ, წაშალოთ შემდეგი დამატებითი შეზღუდვები: - + Please remove the following redundant constraints: გთხოვთ, წაშალოთ შემდეგი დამატებითი შეზღუდვები: - + The following constraint is partially redundant: ეს შეზღუდვა ნაწილობრივ დამატებითია: - + The following constraints are partially redundant: ეს შეზღუდვები ნაწილობრივ დამატებითია: - + Please remove the following malformed constraint: გთხოვთ, წაშალოთ შემდეგი არასწორად ფორმირებული შეზღუდვა: - + Please remove the following malformed constraints: გთხოვთ, წაშალოთ შემდეგი არასწორად ფორმირებული შეზღუდვები: - + Empty sketch ცარიელი ესკიზი - + Over-constrained: ზედმეტად-შეზღუდული: - + Malformed constraints: არასწორად შექმნილი შეზღუდვები: - + Redundant constraints: დამატებითი შეზღუდვები: - + Partially redundant: ნაწილობრივ დამატებითი: - + Solver failed to converge ამომხსნელის შეცდომა შეერთების დროს - + Under constrained: საკმარისზე ნაკლებად შეზღუდული: - + %n DoF(s) %n თხ @@ -5339,7 +5332,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained სრულად შეზღუდული @@ -5421,7 +5414,7 @@ This is done by analyzing the sketch geometries and constraints. Clone - ასლი + კლონი @@ -5437,8 +5430,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc წრის ან რკალის რადიუსის გასწორება @@ -5446,7 +5439,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc წრის ან რკალის რადიუსის/დიამეტრის გასწორება @@ -5454,20 +5448,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc წრეწირის ან რკალის რადიუსის გამუდმივება - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - წრის ან რკალის რადიუსის/დიამეტრის გასწორება - - Sketcher_Copy @@ -6084,7 +6070,7 @@ Eigen Sparse QR ალგორითმი ოპტიმიზებული ViewProviderSketch - + and %1 more და %1 სხვა @@ -6307,7 +6293,7 @@ The grid spacing change if it becomes smaller than this number of pixel.ესკიზი ნაწილობრივ დამატებით შეზღუდვებს შეიცავს! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! პარაბოლები მიგრირებულია. მიგრირებული ფაილები FreeCAD-ის წინა ვერსიებში არ გაიხსნება!! @@ -6318,7 +6304,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6343,7 +6329,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6366,13 +6352,13 @@ The grid spacing change if it becomes smaller than this number of pixel.შეზღუდვას ინდექსის ინფორმაცია არასწორია და ის მიუღებელია. - - - - - - - + + + + + + + @@ -6383,7 +6369,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc რკალის დამატების შეცდომა @@ -6497,7 +6483,7 @@ The grid spacing change if it becomes smaller than this number of pixel.ჩარჩოს დამატების შეცდომა - + Failed to add rounded rectangle მომრგვალებული ოთხკუთხედის შექმნის შეცდომა @@ -6679,17 +6665,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension ზომა - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6709,14 +6695,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension ზომა - + Dimension tools. განზომილების ხელსაწყოები. + + CmdSketcherConstrainRadius + + + Constrain radius + რადიუსის სეზღუდვა + + + + Fix the radius of a circle or an arc + წრეწირის ან რკალის რადიუსის გამუდმივება + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts index b00a0bca1b..a8c0d23f38 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ko.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 호 또는 원 구속 - + Constrain an arc or a circle 호 또는 원을 구속함 - + Constrain radius 제약조건: 반지름 - + Constrain diameter 직경 구속 - + Constrain auto radius/diameter 자동 반지름/직경 구속 @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 제약조건: 각도 - + Fix the angle of a line or the angle between two lines 단일 선의 각도(수평축 기준) 또는 두선 사이의 각도 고정 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block 블록 구속조건 - + Block the selected edge from moving 선택 모서리가 움직이지 않도록 차단 @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 제약조건: 점 일치 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses 점들 사이의 일치 구속 또는 원, 호, 타원 사이의 동심 구속을 생성함 @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 직경 구속 - + Fix the diameter of a circle or an arc 원이나 호의 지름을 수정합니다 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 제약조건: 거리 - + Fix a length of a line or the distance between a line and a vertex or between two circles 선의 길이 또는 선과 꼭짓점 사이 또는 두 원 사이의 거리를 고정함 @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 수평 거리를 구속합니다 - + Fix the horizontal distance between two points or line ends 두 점 또는 선의 수평거리 고정 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 수직 거리 구속 - + Fix the vertical distance between two points or line ends 두 점 또는 선의 수직거리 고정 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 제약조건: 동일 - + Create an equality constraint between two lines or between circles and arcs 두 선 또는 원과 원/호와 호/원과 호에 동일한 치수 부가 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 제약조건: 수평 - + Create a horizontal constraint on the selected item 선택한 요소를 수평하게 고정 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock 제약조건: 고정 - + Create both a horizontal and a vertical distance constraint on the selected vertex 선택 꼭짓점에 수평 및 수직 거리 구속을 생성함 @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 제약조건: 평행 - + Create a parallel constraint between two lines 선택한 요소(두 선)를 평행하게 고정 @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 제약조건: 수직 - + Create a perpendicular constraint between two lines 선택한 요소(두 선)를 수직하게 고정 @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object 제약조건: 점을 선에 일치 - + Fix a point onto an object 점을 선에 일치 @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 자동 반지름/직경 구속 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 원을 선택한 경우 지름을, 호/스플라인 폴을 선택한 경우 반지름을 수정합니다. - - CmdSketcherConstrainRadius - - - Constrain radius or weight - 반지름 또는 중량 구속 - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - 원이나 호의 반지름을 수정하거나 B-스플라인 극의 가중치를 수정합니다. - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. 광선의 두 끝점과 모서리 사이에 굴절 법칙(스넬의 법칙) 구속을 인터페이스interface로 생성합니다. @@ -598,12 +585,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 제약조건: 대칭 - + Create a symmetry constraint between two points with respect to a line or a third point 선 또는 세 번째 점을 기준으로 두 점 사이에 대칭 구속조건을 생성합니다. @@ -612,12 +599,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 제약조건: 탄젠트 - + Create a tangent constraint between two entities 두 엔티티가 서로 접하도록 고정 @@ -625,12 +612,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 제약조건: 수직 - + Create a vertical constraint on the selected item 선택한 요소를 수직하게 고정 @@ -1487,12 +1474,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 구속을 활성화/비활성화합니다. - + Activates or deactivates the selected constraints 선택한 구속을 활성화하거나 비활성화합니다. @@ -1513,12 +1500,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 구동driving/참조reference 구속을 전환합니다. - + Set the toolbar, or the selected constraints, into driving or reference mode 도구 모음 또는 선택한 제약 조건을 주행 또는 참조 모드로 설정합니다 @@ -1590,370 +1577,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 수평 구속을 추가합니다 - - - + + + Add horizontal alignment 수평 정렬을 추가합니다 - - + + Add vertical constraint 수직 구속을 추가합니다 - + Add vertical alignment 수직 정렬을 추가합니다 - + Add 'Lock' constraint '잠금' 구속을 추가합니다 - + Add relative 'Lock' constraint 상대적 '잠금' 구속을 추가합니다 - + Add fixed constraint 고정fixed 구속을 추가합니다 - + Add 'Block' constraint 'Block' 구속을 추가합니다 - + Add block constraint Block 구속을 추가합니다 - - - + + + Add coincident constraint 일치 구속을 추가합니다 - - + + Add distance from horizontal axis constraint 수평축 구속에서 거리 추가하기 - - + + Add distance from vertical axis constraint 수직축 구속에서 거리 추가하기 - - + + Add point to point distance constraint 점에서 점까지 거리 구속 추가하기 - - - + + + Add point to line Distance constraint 점에서 선까지 거리 구속 추가하기 - - + + Add circle to circle distance constraint 원에서 원까지 거리 구속 추가하기 - + Add circle to line distance constraint 원에서 선까지 거리 구속 추가하기 - - - - - - + + + + + + Add length constraint 길이 구속 추가하기 - - + + + Dimension 치수 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 점에서 개체까지 구속 추가하기 - - + + Add point to point horizontal distance constraint 점에서 점까지 수평 거리 구속 추가하기 - + Add fixed x-coordinate constraint 고정 x-좌표 구속 추가하기 - - + + Add point to point vertical distance constraint 점에서 점까지 수직 거리 구속 추가하기 - + Add fixed y-coordinate constraint 고정 y-좌표 구속 추가하기 - - + + Add parallel constraint 평행 구속 추가하기 - - - - - - - + + + + + + + Add perpendicular constraint 수직 구속 추가하기 - + Add perpendicularity constraint 수직도 구속 추가하기 - + Swap coincident+tangency with ptp tangency 일치+접선을 ptp 접선으로 바꾸기 - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint 접선 구속 추가하기 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 접선구속 점 추가하기 - - - - + + + + Add radius constraint 반경 구속 추가하기 - - - - + + + + Add diameter constraint 직경 구속 추가하기 - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint 각도 구속 추가하기 - - + + Add equality constraint 동일 구속 추가하기 - - - - - + + + + + Add symmetric constraint 대칭 구속 추가하기 - + Add Snell's law constraint 스넬의 법칙 구속 추가하기 - + Toggle constraint to driving/reference 구동/참조 구속을 전환하기 - + Activate/Deactivate constraint 구속을 활성화/비활성화하기 @@ -2029,7 +2022,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc 스케치 호 추가하기 @@ -2280,59 +2273,59 @@ invalid constraints, degenerated geometry, etc. 자동구속 오류: 동일 구속 적용 후 해결할 수 없는 스케치 - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. 곡선의 교차점을 추정할 수 없습니다. 모깎기 하려는 곡선의 정점들 사이에 일치 구속을 추가해 보십시오. - - + + BSpline Geometry Index (GeoID) is out of bounds. B스플라인 형상 인덱스(GeoID) 가 범위를 벗어났습니다. - + You are requesting no change in knot multiplicity. 매듭점 다중성에 대한 변경을 요청하지 않으셨습니다. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. 제공된 형상 지수(GeoId) 는 B-스플라인 곡선이 아닙니다. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. 매듭 지수가 범위를 벗어났습니다. OCC 표기법에 따라 첫 번째 매듭은 0이 아닌 지수 1을 가집니다. - + The multiplicity cannot be increased beyond the degree of the B-spline. 다중도는 B-스플라인의 정도 이상으로 증가할 수 없습니다. - + The multiplicity cannot be decreased beyond zero. 다중도는 0 이상으로 감소할 수 없습니다. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC는 최대 공차 내에서 다중도를 감소시킬 수 없습니다. - + Knot cannot have zero multiplicity. 매듭은 0개의 다중도를 가질 수 없습니다. - + Knot multiplicity cannot be higher than the degree of the BSpline. 매듭 다중도는 B스플라인의 정도보다 높을 수 없습니다. - + Knot cannot be inserted outside the BSpline parameter range. 매듭은 B스플라인 매개변수 범위 밖에서 삽입할 수 없습니다. @@ -2400,134 +2393,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2575,329 +2568,329 @@ invalid constraints, degenerated geometry, etc. 치수 제약조건 - + Cannot add a constraint between two external geometries. 두 외부 형상 사이에 구속을 추가할 수 없습니다. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. 두 고정 형상 사이의 구속을 추가할 수 없습니다. 고정 형상에는 외부 형상, 블럭화된 형상 및 B-스플라인 매듭점과 같은 특별한 점이 포함됩니다. - + Sketcher Constraint Substitution 스케쳐 구속 대체 - + Keep notifying me of constraint substitutions 구속 대체를 계속 알림 - - - + + + Only sketch and its support are allowed to be selected. 스케치와 그 지원만 선택할 수 있습니다. - + One of the selected has to be on the sketch. 선택한 항목 중 하나가 스케치에 있어야 합니다. - - + + Select an edge from the sketch. 스케치에서 하나의 모서리를 선택하세요. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 불가능한 제약조건입니다. - - - - + + + + The selected edge is not a line segment. 선택한 모서리가 선분이 아닙니다. - - - - - - + + + + + + Double constraint 이중 제약조건 - - - - - + + + + + The selected edge already has a horizontal constraint! 선택한 모서리에 이미 수평 구속이 있습니다! - - - + + + The selected edge already has a vertical constraint! The selected edge already has a vertical constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! The selected edge already has a Block constraint! - + The selected item(s) can't accept a horizontal constraint! 선택된 요소(들)은 수평 제약조건을 적용할 수 없습니다. - - + + There are more than one fixed points selected. Select a maximum of one fixed point! There are more than one fixed points selected. Select a maximum of one fixed point! - + The selected item(s) can't accept a vertical constraint! 선택된 요소(들)은 수직 제약조건을 적용할 수 없습니다. - - - + + + Select vertices from the sketch. 두개 이상의 점을 선택하세요. - + Select one vertex from the sketch other than the origin. 스케치에서 원점이 아닌 다른 점을 선택하세요. - + Select only vertices from the sketch. The last selected vertex may be the origin. 오직 점만 선택이 가능합니다. 마지막에 선택은 원점이어야 합니다. - + Wrong solver status Wrong solver status - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Select one edge from the sketch. - + Select only edges from the sketch. Select only edges from the sketch. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error 에러 - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Endpoint to endpoint tangency was applied instead. - + Select two or more points from the sketch. 두개 이상의 점을 선택하세요. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. 한 직선 또는 한 점, 한 직선 또는 두 점을 선택하세요. - + Cannot add a length constraint on an axis! 축에는 길이 제약조건을 적용할 수 없습니다! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. 적절한 것을 선택하세요. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 선택된 점들은 동일한 element에 속해 있거나 외부 geometry이므로 해당 곡선에 제약조건이 적용되지 않았습니다. - - - - + + + + Select exactly one line or up to two points from the sketch. 한 직선 또는 최대 2개의 점을 선택하세요. - + Cannot add a horizontal length constraint on an axis! 축에는 수평 길이 제약조건을 적용할 수 없습니다! - + Cannot add a fixed x-coordinate constraint on the origin point! Cannot add a fixed x-coordinate constraint on the origin point! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! 축에는 수직 길이 제약조건을 적용할 수 없습니다! - + Cannot add a fixed y-coordinate constraint on the origin point! Cannot add a fixed y-coordinate constraint on the origin point! - + Select two or more lines from the sketch. 두개 이상의 직선을 선택하세요. - - + + Select at least two lines from the sketch. 최소한 두개 이상의 직선을 선택하세요. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2907,42 +2900,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 사용가능한 조합: 두개의 곡선, 끝점과 곡선, 두개의 끝점, 두개의 곡선과 한 점. - + Select some geometry from the sketch. perpendicular constraint 스케치에서 geometry를 선택하세요. - - + + Cannot add a perpendicularity constraint at an unconnected point! 연결되지 않은 점에 대하여 수직 제약조건을 적용할 수 없습니다! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular to B-spline edge currently unsupported. - - + + One of the selected edges should be a line. 선택된 선중 하나는 직선이어야 합니다. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Endpoint to endpoint tangency was applied. The coincident constraint was deleted. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2952,182 +2945,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 사용가능한 조합: 두개의 곡선, 끝점과 곡선, 두개의 끝점, 두개의 곡선과 한 점. - + Select some geometry from the sketch. tangent constraint 스케치에서 geometry를 선택하세요. - - - + + + Cannot add a tangency constraint at an unconnected point! 연결되지 않은 점에 대하여 탄젠트 제약조건을 적용할 수 없습니다! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! 선택한 객체의 갯수가 잘못되었습니다! - - + + With 3 objects, there must be 2 curves and 1 point. 3개의 객체(2개의 곡선과 1개의 점)가 있어야합니다. - - - + + + Tangency to B-spline edge currently unsupported. Tangency to B-spline edge currently unsupported. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. 하나 이상의 호나 원을 선택하세요. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. 호 또는 원에만 적용 가능한 제약조건입니다. - - + + Select one or two lines from the sketch. Or select two edges and a point. 하나 이상의 직선을 선택하세요. 또는, 두개의 선과 하나의 점을 선택하세요. - - + + Parallel lines 평행 직선 - - + + An angle constraint cannot be set for two parallel lines. 각도 제약조건은 평행한 두 직선에는 적용할 수 없습니다. - + Cannot add an angle constraint on an axis! 축에는 각도 제약조건을 적용할 수 없습니다! - + Select two edges from the sketch. 두개의 선을 선택하세요. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Equality for B-spline edge currently unsupported. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 1)두 점과 대칭선 2)두 점과 대칭 점 또는 3)하나의 선과 대칭 점을 선택하세요. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 선과 선에 포함된 점에는 대칭 제약조건을 적용할 수 없습니다! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. 선택된 객체는 스케치의 geometry가 아닙니다. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. @@ -3626,12 +3619,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 길이: - + Refractive index ratio Refractive index ratio - + Ratio n2/n1: Ratio n2/n1: @@ -5223,119 +5216,119 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch 스케치 수정 - + A dialog is already open in the task panel 테스크 패널에 이미 다이얼로그가 열려있습니다. - + Do you want to close this dialog? 다이얼로그를 닫으시겠습니까? - + Invalid sketch 유효하지 않은 스케치 - + Do you want to open the sketch validation tool? 스케치 확인 도구를 여시겠습니까? - + The sketch is invalid and cannot be edited. 스키체가 유효하지 않으므로 수정할 수 없습니다. - + Please remove the following constraint: 다음 제약조건을 제거하세요. - + Please remove at least one of the following constraints: 다음 제약조건중 하나 이상을 제거하세요. - + Please remove the following redundant constraint: 중복 제약조건을 제거하세요: - + Please remove the following redundant constraints: 중복 제약조건을 제거하세요: - + The following constraint is partially redundant: The following constraint is partially redundant: - + The following constraints are partially redundant: The following constraints are partially redundant: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch 빈 스케치 - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) - + Fully constrained Fully constrained @@ -5433,8 +5426,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 원이나 호의 지름을 수정합니다 @@ -5442,7 +5435,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5450,20 +5444,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 원 또는 호의 반지름을 고정 - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc - - Sketcher_Copy @@ -6080,7 +6066,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more and %1 more @@ -6303,7 +6289,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6314,7 +6300,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6339,7 +6325,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6362,13 +6348,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6379,7 +6365,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6493,7 +6479,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6675,17 +6661,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 치수 - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6705,14 +6691,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension 치수 - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + 제약조건: 반지름 + + + + Fix the radius of a circle or an arc + 원 또는 호의 반지름을 고정 + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts index eb6b17a55b..183f70452e 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_nl.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Beperk de boog of de cirkel - + Constrain an arc or a circle Beperk een boog of een cirkel - + Constrain radius Straal bematen - + Constrain diameter Bemaat de diameter - + Constrain auto radius/diameter Bemaat straal/diameter automatisch @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Beperk hoek - + Fix the angle of a line or the angle between two lines Bemaat de hoek van een lijn of de hoek tussen twee lijnen @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Blok beperkingen - + Block the selected edge from moving Weerhoud de geselecteerde rand van verplaatsen @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Samenvallende beperking - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Maak een samenvallende beperking tussen punten, of een concentrische beperking tussen cirkels, bogen en ellipsen @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Bemaat de diameter - + Fix the diameter of a circle or an arc Bemaat de diameter van een cirkel of een boog @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Afstand beperking - + Fix a length of a line or the distance between a line and a vertex or between two circles Zet de lengte van een lijn vast of de afstand tussen een lijn en een hoekpunt of tussen twee cirkels @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Beperk horizontale afstand - + Fix the horizontal distance between two points or line ends De horizontale afstand tussen twee punten of lijneinden bematen @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Beperk verticale afstand - + Fix the vertical distance between two points or line ends De verticale afstand tussen twee punten of lijneinden bematen @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Gelijke beperken - + Create an equality constraint between two lines or between circles and arcs Maak een Gelijkheidsbeperking tussen twee lijnen of tussen cirkels en bogen @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Horizontale beperking - + Create a horizontal constraint on the selected item Maak een horizontale beperking op het geselecteerde item @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Vastzet beperking - + Create both a horizontal and a vertical distance constraint on the selected vertex Maak zowel een horizontale als een verticale afstandsbeperking op het geselecteerde hoekpunt @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Parallelle-beperking - + Create a parallel constraint between two lines Maak een parallelle beperking tussen twee lijnen @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Beperk loodrecht - + Create a perpendicular constraint between two lines Maak een loodrechte beperking tussen twee lijnen @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Zet punt vast op object - + Fix a point onto an object Een punt op een object vastleggen @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Bemaat straal/diameter automatisch - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Zet de diameter vast als en cirkel is geselecteerd, of de straal als een boog/spline pool is geselecteerd - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Beperking straal of gewicht - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Repareer de straal van een cirkel of een boog of repareer het gewicht van een B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Bepaal de refractie (Wet van Snellius) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Maak een beperking volgens de brekingswet (wet van Snellius) tussen twee eindpunten van lichtstralen en een rand als interface. @@ -598,12 +585,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Symmetrische-beperken - + Create a symmetry constraint between two points with respect to a line or a third point Maak een symmetrie beperking tussen twee punten @@ -613,12 +600,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherConstrainTangent - + Constrain tangent Tangent beperken - + Create a tangent constraint between two entities Tangentiële beperkingen tussen twee entiteiten maken @@ -626,12 +613,12 @@ met betrekking tot een lijn of een derde punt CmdSketcherConstrainVertical - + Constrain vertically Verticale beperking - + Create a vertical constraint on the selected item Maak een verticale beperking op het geselecteerde item @@ -1490,12 +1477,12 @@ Dit zal de 'Support' eigenschap verwijderen, indien van toepassing. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Beperking activeren/deactiveren - + Activates or deactivates the selected constraints Activeert of deactiveert de geselecteerde beperkingen @@ -1516,12 +1503,12 @@ Dit zal de 'Support' eigenschap verwijderen, indien van toepassing. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Schakelt sturende/referentie beperking aan of uit - + Set the toolbar, or the selected constraints, into driving or reference mode Stel de werkbalk of de geselecteerde beperkingen in @@ -1595,370 +1582,376 @@ ongeldige constraints, gedegenereerde geometrie, etc. Command - - + + Add horizontal constraint Voeg horizontale beperking toe - - - + + + Add horizontal alignment Horizontale uitleining toevoegen - - + + Add vertical constraint Voeg verticale beperking toe - + Add vertical alignment Verticale uitlijning toevoegen - + Add 'Lock' constraint Voeg 'vergrendeling' beperking toe - + Add relative 'Lock' constraint Voeg relatieve 'Vergrendeling' beperking toe - + Add fixed constraint Gefixeerde beperking toevoegen - + Add 'Block' constraint Voeg 'Block' beperking toe - + Add block constraint Blok beperking toevoegen - - - + + + Add coincident constraint Voeg samenvallende beperking toe - - + + Add distance from horizontal axis constraint Voeg afstand toe van horizontale as beperking - - + + Add distance from vertical axis constraint Voeg afstand toe van verticale as beperking - - + + Add point to point distance constraint Voeg punt toe aan punt afstand beperking - - - + + + Add point to line Distance constraint Voeg punt toe aan lijnafstand beperking - - + + Add circle to circle distance constraint Voeg cirkel toe aan cirkel afstand beperking - + Add circle to line distance constraint Voeg cirkel toe aan lijnafstand beperking - - - - - - + + + + + + Add length constraint Beperking lengte toevoegen - - + + + Dimension Afmeting - + Add lock constraint - Add lock constraint + Voeg een fixerende beperking toe - + Add 'Distance to origin' constraint - Add 'Distance to origin' constraint + Voeg een 'Afstand tot de oorsprong' beperking toe - - - + + + Add Distance constraint - Add Distance constraint + Voeg een afstand beperking toe - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Voeg punt toe aan object beperking - - + + Add point to point horizontal distance constraint Voeg punt toe aan punt horizontale afstand beperking - + Add fixed x-coordinate constraint Gefixeerde x-coördinaat beperking toevoegen - - + + Add point to point vertical distance constraint Voeg punt toe aan punt verticale afstand beperking - + Add fixed y-coordinate constraint Gefixeerde y-coördinaat beperking toevoegen - - + + Add parallel constraint Parallelle beperking toevoegen - - - - - - - + + + + + + + Add perpendicular constraint Haakse beperking toevoegen - + Add perpendicularity constraint Voeg haakse beperking toe - + Swap coincident+tangency with ptp tangency Wissel samenvallende+tangent met ptp tangens - + Swap PointOnObject+tangency with point to curve tangency Wissel PointOnObject+raaklijn om met punt op raaklijn van kromme - - - - - - - + + + + + + + Add tangent constraint Voeg tangens beperkgin toe - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Voeg tangens beperking toe - - - - + + + + Add radius constraint Voeg straal beperking toe - - - - + + + + Add diameter constraint Voeg diameter beperking - - - - + + + + Add radiam constraint Voeg straal/diameter beperking toe - - - - - - + + + + + + Add angle constraint Hoek beperking toe - - + + Add equality constraint Voeg gelijkheidsbeperking toe - - - - - + + + + + Add symmetric constraint Symmetrische beperking toevoegen - + Add Snell's law constraint Snell's wet beperking toevoegen - + Toggle constraint to driving/reference Schakel Beperking als sturend of als referentie in-/uit - + Activate/Deactivate constraint Beperking activeren/deactiveren @@ -2034,7 +2027,7 @@ ongeldige constraints, gedegenereerde geometrie, etc. - + Add sketch arc Schets boog toevoegen @@ -2285,59 +2278,59 @@ ongeldige constraints, gedegenereerde geometrie, etc. Autoconstrain error: Defecte schets tijdens aanleggen van gelijkheids-constraint. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Niet in staat om het snijpunt van de bochten te raden. Probeer een samenvallende beperking toe te voegen tussen de vertexen van de curven die u wilt afronden. - - + + BSpline Geometry Index (GeoID) is out of bounds. B-spline Geometrie Index (GeoID) buiten bereik. - + You are requesting no change in knot multiplicity. U vraagt geen verandering in de knoop multipliciteit. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. De Geometrie Index (Geold) aangeleverd is geen B-spline lijn. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. De knoop-index is buiten de grenzen. Merk op dat volgens de OCC-notatie de eerste knoop index 1 heeft en niet nul. - + The multiplicity cannot be increased beyond the degree of the B-spline. De multipliciteit mag niet groter zijn dan het aantal graden van de B-spline. - + The multiplicity cannot be decreased beyond zero. De multipliciteit kan niet lager zijn dan nul. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC is niet in staat om de multipliciteit binnen de maximale tolerantie te verlagen. - + Knot cannot have zero multiplicity. Knooppunt kan geen multipliciteit van nul hebben. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knooppunt multipliciteit kan niet hoger zijn dan de graad van de B-spline. - + Knot cannot be inserted outside the BSpline parameter range. Knooppunt kan niet worden toegevoegd buiten de parameters van de B-spline. @@ -2405,134 +2398,134 @@ ongeldige constraints, gedegenereerde geometrie, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ ongeldige constraints, gedegenereerde geometrie, etc. Dimensionale beperking - + Cannot add a constraint between two external geometries. Kan geen beperking toevoegen tussen twee externe geometrieën. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Kan geen beperking toevoegen tussen twee vaste geometrieën. Vaste geometrieën omvatten externe geometrie, geblokkeerde geometrie en speciale punten zoals B-spline knooppunten. - + Sketcher Constraint Substitution Sketcher Beperking Vervanging - + Keep notifying me of constraint substitutions Blijf mij informeren over vervangingen van beperkingen - - - + + + Only sketch and its support are allowed to be selected. Alleen de schets en de ondersteuning ervan mogen worden geselecteerd. - + One of the selected has to be on the sketch. Een van het geselecteerde moet op de schets liggen. - - + + Select an edge from the sketch. Selecteer een rand van de schets. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Onmogelijk beperking - - - - + + + + The selected edge is not a line segment. De geselecteerde rand is geen lijnsegment. - - - - - - + + + + + + Double constraint Dubbele beperking - - - - - + + + + + The selected edge already has a horizontal constraint! De geselecteerde rand heeft al een horizontale constraint! - - - + + + The selected edge already has a vertical constraint! De geselecteerde rand heeft al een vertikale constraint! - - - - - - + + + + + + The selected edge already has a Block constraint! De geselecteerde rand heeft al een blok constraint! - + The selected item(s) can't accept a horizontal constraint! De geselecteerde voorwerp(en) kunnen geen horizontale beperking aannemen! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Er zijn meer dan één vaste punten geselecteerd. Selecteer een maximum van één vast punt! - + The selected item(s) can't accept a vertical constraint! De geselcteerde voorwerp(en) kunnen geen verticale beperking aannemen! - - - + + + Select vertices from the sketch. Selecteer vertexen vanuit de schets. - + Select one vertex from the sketch other than the origin. Kies een andere vertex uit de schets dan de oorsprong. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecteer alleen vertexen uit de schets. De laatst gekozen vertex kan de oorsprong zijn. - + Wrong solver status Verkeerde oplosserstatus - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Een blokbeperking kan niet worden toegevoegd als de schets onopgelost is of er overbodige en tegenstrijdige beperkingen zijn. - + Select one edge from the sketch. Selecteer een rand uit de schets. - + Select only edges from the sketch. Selecteer enkel randen uit de schets. - + Number of selected objects is not 3 Het aantal geselecteerde objecten is niet gelijk aan 3 - + Error Fout - + Unexpected error. More information may be available in the Report View. Onverwachte fout. Meer informatie is mogelijk beschikbaar in de Report View. - + Endpoint to endpoint tangency was applied instead. Eindpunt tot eindpunttangens werd in plaats daarvan toegepast. - + Select two or more points from the sketch. Selecteer twee of meer punten uit de schets. - + Select two or more vertices from the sketch. Selecteer twee of meer hoekpunten van de schets. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selecteer twee of meer hoekpunten van de schets voor een samenvallende beperking, of twee of meer cirkels, ellipsen, bogen of ellipsbogen voor een concentrische beperking. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selecteer twee hoekpunten van de schets voor een samenvallende beperking, of twee cirkels, ellipsen, bogen of ellipsbogen voor een concentrische beperking. - + Select exactly one line or one point and one line or two points from the sketch. Selecteer precies één lijn of een punt en een lijn of twee punten uit de schets. - + Cannot add a length constraint on an axis! Een lengtebeperking is niet mogelijk op een as! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Selecteer precies één lijn of één punt en één lijn, of twee punten of twee cirkels van de schets. - + This constraint does not make sense for non-linear curves. Deze beperking heeft geen zin voor niet-lineaire krommen. - + Endpoint to edge tangency was applied instead. Eindpunt tot de rand raaklijn werd in plaats daarvan toegepast. - - - - - - - + + + + + + + Select the right things from the sketch. Selecteer de juiste elementen uit de schets. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Selecteer een rand die geen B-spline gewicht is. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Geen van de geselecteerde punten zijn op de respectievelijke curves beperkt, omdat het delen van hetzelfde element zijn, omdat ze allebei externe geometrie zijn, of omdat ze niet voor de rand in aanmerking komen. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Geen van de geselecteerde punten werd beperkt tot de respectievelijke curven, ofwel omdat ze deel uitmaken van hetzelfde element, ofwel omdat ze beide externe geometrie zijn. - - - - + + + + Select exactly one line or up to two points from the sketch. Selecteer precies een lijn of tot twee punten uit de schets. - + Cannot add a horizontal length constraint on an axis! Een horizontale lengtebeperking is niet mogelijk op een as! - + Cannot add a fixed x-coordinate constraint on the origin point! Kan geen gefixeerd x-coördinaat constraint plaatsen op het punt van oorsprong! - - + + This constraint only makes sense on a line segment or a pair of points. Deze beperking heeft alleen zin op een lijnsegment of een tweetal punten. - + Cannot add a vertical length constraint on an axis! Een verticale lengtebeperking is niet mogelijk op een as! - + Cannot add a fixed y-coordinate constraint on the origin point! Kan geen gefixeerd y-coördinaat constraint plaatsen op het punt van oorsprong! - + Select two or more lines from the sketch. Selecteer twee of meer lijnen van de schets. - - + + Select at least two lines from the sketch. Kies tenminste twee lijnen van de schets. - + Select a valid line. Selecteer een geldige lijn. - - + + The selected edge is not a valid line. De geselecteerde rand is geen geldige lijn. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunten; twee curven en een punt. - + Select some geometry from the sketch. perpendicular constraint Selecteer wat geometrie uit schets. - - + + Cannot add a perpendicularity constraint at an unconnected point! Kan geen loodrechtheidsbeperking toevoegen op een niet-verbonden punt! - - - + + + Perpendicular to B-spline edge currently unsupported. Loodrecht op B-splinerand wordt momenteel niet ondersteund. - - + + One of the selected edges should be a line. Eén van de geselecteerde randen moet een lijn zijn. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Endpoint op endpointtangens werd toegepast. De toevallige beperking werd verwijderd. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Eindpunt tot rand raaklijn is toegepast. Het punt op de object beperking is verwijderd. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunten; twee curven en een punt. - + Select some geometry from the sketch. tangent constraint Selecteer wat geometrie uit schets. - - - + + + Cannot add a tangency constraint at an unconnected point! Een raakbeperking kan niet worden toegevoegd aan een los punt! - - + + Tangent constraint at B-spline knot is only supported with lines! Raaklijn beperking bij B-spline knoop wordt alleen ondersteund met lijnen! - + B-spline knot to endpoint tangency was applied instead. B-spline knoop tot eindpunt raaklijn werd in plaats hiervan toegepast. - + Select either one point and several curves, or one curve and several points. Selecteer of één punt en meerdere curves of één curve en meerdere punten. - - + + Wrong number of selected objects! Verkeerd aantal geselecteerde objecten! - - + + With 3 objects, there must be 2 curves and 1 point. Met 3 objecten moeten er 2 curven en 1 punt zijn. - - - + + + Tangency to B-spline edge currently unsupported. Tanges op B-splinerand momenteel niet ondersteund. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selecteer een of meer bogen of cirkels uit de schets. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selecteer slechts één of meer B-Spline polen of slechts één of meer bogen of cirkels van de schaap, maar niet gemengd. - - - + + + Constraint only applies to arcs or circles. Beperkingen gelden alleen voor bogen en cirkels. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selecteer een of twee lijnen uit de schets. Of selecteer twee randen en een punt. - - + + Parallel lines Parallellen lijnen - - + + An angle constraint cannot be set for two parallel lines. Een hoekbeperking kan niet worden ingesteld voor twee parallelle lijnen. - + Cannot add an angle constraint on an axis! Een hoekbeperking op een as is niet mogelijk! - + Select two edges from the sketch. Selecteer twee randen van de schets. - + Select two or more compatible edges. Selecteer twee of meer passende randen. - + Sketch axes cannot be used in equality constraints. Schets assen kunnen niet worden gebruikt voor gelijkheid beperkingen. - + Equality for B-spline edge currently unsupported. Gelijkheid voor B-splinerand momenteel niet ondersteund. - - - - + + + + Select two or more edges of similar type. Selecteer twee of meer randen van een vergelijkbaar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selecteer twee punten en een symmetrie-lijn, twee punten en een symmetrie-punt of een lijn en een symmetrie-punt uit de schets. - - + + Cannot add a symmetry constraint between a line and its end points. Kan geen symmetrie beperking toevoegen tussen een lijn en zijn eindpunten. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Kan geen symmetriebeperking tussen een lijn en zijn eindpunten toevoegen! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selecteer twee eindpunten van lijnen om te fungeren als stralen, en een rand die een grens vertegenwoordigt. Het eerste geselecteerde punt komt overeen met index n1, tweede tot n2, en datum waarde bepaalt de verhouding n2/n1. - + Selected objects are not just geometry from one sketch. Geselecteerde objecten zijn niet slechts geometrie uit één schets. - + Cannot create constraint with external geometry only. Kan geen beperking maken met alleen externe geometrie. - + Incompatible geometry is selected. Incompatibele geometrie is geselecteerd. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw op B-spline rand wordt momenteel niet ondersteund. - - - - - + + + + + Select constraints from the sketch. Selecteer beperking(en) uit de schets. @@ -3631,12 +3624,12 @@ Geaccepteerde combinaties: twee curven; een eindpunt en een curve; twee eindpunt Lengte: - + Refractive index ratio Brekingsindexverhouding - + Ratio n2/n1: Verhouding n2/n1: @@ -4789,7 +4782,7 @@ Er zijn echter geen beperkingen gevonden die verband houden met de eindpunten. Degenerated geometry - Niet gegenereerde geometrie + Geen gedegenereerde geometrie @@ -5068,7 +5061,7 @@ Er zijn echter geen beperkingen gevonden die verband houden met de eindpunten. Sketcher validation - Validatie van de schetser + Schets Validatie @@ -5121,8 +5114,8 @@ Dit is puur gebaseerd op samenhang en oriëntatie van de hoekpunten in de schets Finds and displays missing coincidences in the sketch. This is done by analyzing the sketch geometries and constraints. - Finds and displays missing coincidences in the sketch. -This is done by analyzing the sketch geometries and constraints. + Zoekt naar en toont ontbrekende samenvallende punten in de schets. +Dit wordt gedaan door de geometrie en beperkingen van de schets te analyseren. @@ -5167,17 +5160,17 @@ This is done by analyzing the sketch geometries and constraints. Degenerated geometry - Niet gegenereerde geometrie + Geen gedegenereerde geometrie Finds degenerated geometries in the sketch - Finds degenerated geometries in the sketch + Zoekt naar gedegenereerde geometrieën in de schets Tries to fix found degenerated geometries - Tries to fix found degenerated geometries + Probeert de gevonden gedegenereerde geometriën te corrigeren @@ -5187,7 +5180,7 @@ This is done by analyzing the sketch geometries and constraints. Finds reversed external geometries - Finds reversed external geometries + Zoekt naar omgekeerde externe geometrieën @@ -5228,122 +5221,122 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Schets bewerken - + A dialog is already open in the task panel Een dialoog is al geopend in het taakvenster - + Do you want to close this dialog? Wilt u dit dialoogvenster sluiten? - + Invalid sketch Ongeldige schets - + Do you want to open the sketch validation tool? Wilt u het schetsvalidatiegereedschap openen? - + The sketch is invalid and cannot be edited. De schets is ongeldig en kan niet worden bewerkt. - + Please remove the following constraint: Gelieve de volgende beperking te verwijderen: - + Please remove at least one of the following constraints: Gelieve minstens één van de volgende beperkingen te verwijderen: - + Please remove the following redundant constraint: Gelieve de volgende overbodige beperking te verwijderen: - + Please remove the following redundant constraints: Gelieve de volgende overbodige beperkingen te verwijderen: - + The following constraint is partially redundant: De volgende beperking is gedeeltelijk overbodig: - + The following constraints are partially redundant: De volgende beperkingen zijn gedeeltelijk overbodig: - + Please remove the following malformed constraint: Verwijder de volgende conflicterende beperking: - + Please remove the following malformed constraints: Verwijder de volgende conflicterende beperkingen: - + Empty sketch Lege schets - + Over-constrained: - Over-constrained: + Over-bepaald: - + Malformed constraints: Ongeldige beperkingen: - + Redundant constraints: Overbodige beperkingen: - + Partially redundant: Gedeeltelijk overbodig: - + Solver failed to converge Solver kon niet convergeren - + Under constrained: - Under constrained: + On-bepaald: - + %n DoF(s) - %n vrijheidsgraden + %n vrijheidsgra(a)d(en) %n DoF(s) - + Fully constrained - Fully constrained + Volledig bepaald @@ -5439,8 +5432,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Bemaat de diameter van een cirkel of een boog @@ -5448,7 +5441,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Straal/diameter van een cirkel of boog bepalen @@ -5456,20 +5450,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc De straal van een cirkel of boog bematen - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Straal/diameter van een cirkel of boog bepalen - - Sketcher_Copy @@ -5799,7 +5785,7 @@ Wilt u het loskoppelen van de ondersteuning? DOF - DOF + Vrijheidsgraden @@ -6086,7 +6072,7 @@ Eigen Sparse-QR-algoritme is geoptimaliseerd voor spaarzame matrices; meestal sn ViewProviderSketch - + and %1 more en %1 meer @@ -6194,8 +6180,8 @@ Eigen Sparse-QR-algoritme is geoptimaliseerd voor spaarzame matrices; meestal sn Distance between two subsequent grid lines. If 'Grid Auto Spacing' is enabled, will be used as base value. - Distance between two subsequent grid lines. -If 'Grid Auto Spacing' is enabled, will be used as base value. + Afstand tussen twee opeenvolgende rasterlijnen. +Als 'Automatisch rasterformaat' is ingeschakeld, wordt dit gebruikt als basiswaarde. @@ -6206,8 +6192,8 @@ If 'Grid Auto Spacing' is enabled, will be used as base value. While using 'Grid Auto Spacing' this sets a threshold in pixel to the grid spacing. The grid spacing change if it becomes smaller than this number of pixel. - While using 'Grid Auto Spacing' this sets a threshold in pixel to the grid spacing. -The grid spacing change if it becomes smaller than this number of pixel. + Bij gebruik van 'Automatisch rasterformaat' stelt dit een drempelwaarde in pixels in op de ruimte tussen rasterlijnen. +De rasterafstand verandert als deze kleiner wordt dan dit aantal pixels. @@ -6309,7 +6295,7 @@ The grid spacing change if it becomes smaller than this number of pixel.De schets heeft deels overbodige beperkingen! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolen zijn geconverteerd. Geconverteerde bestanden kunnen niet in vorige versies van FreeCAD worden geopend!! @@ -6320,7 +6306,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6345,7 +6331,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6368,13 +6354,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6385,7 +6371,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Kon boog niet toevoegen @@ -6444,7 +6430,7 @@ The grid spacing change if it becomes smaller than this number of pixel. Error removing knot - Error removing knot + Fout bij het verwijderen van een knooppunt @@ -6499,7 +6485,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Kon rechthoek niet toevoegen - + Failed to add rounded rectangle Kon de afgeronde rechthoek niet toevoegen @@ -6531,13 +6517,13 @@ The grid spacing change if it becomes smaller than this number of pixel. B-spline by knots - B-spline by knots + B-spline middels knooppunten Create a B-spline by knots - Create a B-spline by knots + Maak een B-spline middels knooppunten @@ -6545,13 +6531,13 @@ The grid spacing change if it becomes smaller than this number of pixel. Periodic B-spline by knots - Periodic B-spline by knots + Gesloten B-spline middels knooppunten Create a periodic B-spline by knots - Create a periodic B-spline by knots + Maak een gesloten B-spline middels knooppunten @@ -6564,29 +6550,29 @@ The grid spacing change if it becomes smaller than this number of pixel. New points will snap to the currently preselected object. It will also snap to the middle of lines and arcs. - New points will snap to the currently preselected object. It will also snap to the middle of lines and arcs. + Nieuwe punten zullen uitlijnen op het huidig voorgeselecteerde object. En ook uitlijnen op het midden van lijnen en bogen. Snap to grid - Snap to grid + Uitlijnen op raster New points will snap to the nearest grid line. Points must be set closer than a fifth of the grid spacing to a grid line to snap. - New points will snap to the nearest grid line. -Points must be set closer than a fifth of the grid spacing to a grid line to snap. + Nieuwe punten zullen op de dichtstbijzijnde rasterlijn uitlijnen. +De punten moeten dichter dan een vijfde van de rastergrootte bij een rasterlijn worden geplaatst om te kunnen uitlijnen. Snap angle - Snap angle + Uitlijn hoek Angular step for tools that use 'Snap at Angle' (line for instance). Hold CTRL to enable 'Snap at Angle'. The angle starts from the positive X axis of the sketch. - Angular step for tools that use 'Snap at Angle' (line for instance). Hold CTRL to enable 'Snap at Angle'. The angle starts from the positive X axis of the sketch. + Grootte van de hoek voor tools die 'Uitlijnen op hoek' gebruiken (bijvoorbeeld lijn). Houd CTRL ingedrukt om 'Uitlijnen op hoek' in te schakelen. De hoek wordt bepaald met de positieve X-as van de schets. @@ -6631,12 +6617,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna Toggle grid - Toggle grid + Zet raster aan/uit Toggle the grid in the sketch. In the menu you can change grid settings. - Toggle the grid in the sketch. In the menu you can change grid settings. + Zet raster aan/uit in de schets. Rasterinstellingen kunnen in het menu worden ingesteld. @@ -6644,12 +6630,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna Toggle snap - Toggle snap + Zet uitlijnen aan/uit Toggle all snap functionality. In the menu you can toggle 'Snap to grid' and 'Snap to objects' individually, and change further snap settings. - Toggle all snap functionality. In the menu you can toggle 'Snap to grid' and 'Snap to objects' individually, and change further snap settings. + Alle uitlijn functies in-/uitschakelen. In het menu kunt u afzonderlijk 'Uitlijnen op raster' en 'Uitlijnen op objecten' in-/uitschakelen en verdere uitlijn instellingen wijzigen. @@ -6657,12 +6643,12 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna Create B-spline by knots - Create B-spline by knots + Maak een B-spline middels knooppunten Create a B-spline by knots, i.e. by interpolation, in the sketch. - Create a B-spline by knots, i.e. by interpolation, in the sketch. + Maak een gesloten B-spline middels knooppunten, door middel van interpolatie, in de schets. @@ -6670,28 +6656,28 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna Create periodic B-spline by knots - Create periodic B-spline by knots + Maak een gesloten B-spline middels knooppunten Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. - Create a periodic B-spline by knots, i.e. by interpolation, in the sketch. + Maak een gesloten B-spline middels knooppunten, door middel van interpolatie, in de schets. CmdSketcherDimension - + Dimension Afmeting - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6711,14 +6697,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Afmeting - + Dimension tools. Bematingsgereedschappen. + + CmdSketcherConstrainRadius + + + Constrain radius + Straal bematen + + + + Fix the radius of a circle or an arc + De straal van een cirkel of boog bematen + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts index c3a6254406..b696b3e55e 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pl.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Zwiąż łuk lub okrąg - + Constrain an arc or a circle Zwiąż łuk lub okrąg - + Constrain radius Wiązanie promienia - + Constrain diameter Wiązanie średnicy - + Constrain auto radius/diameter Zwiąż automatycznie promień / średnicę @@ -163,7 +163,7 @@ Creates a clone of the geometry taking as reference the last selected point - Tworzy klon geometrii przyjmując za punkt odniesienia ostatni wybrany punkt + Tworzy prostą kopię geometrii przyjmującej jako odniesienie ostatni wybrany punkt @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Wiązanie kąta - + Fix the angle of a line or the angle between two lines Ustaw kąt linii lub kąt pomiędzy 2 liniami @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Wiązanie zablokowania - + Block the selected edge from moving Zablokuj wybraną krawędź przed przeniesieniem @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Wiązanie zbieżności - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Utwórz wiązanie zbieżności między punktami lub wiązanie współśrodkowe między okręgami, łukami i elipsami @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Wiązanie średnicy - + Fix the diameter of a circle or an arc Ustal średnicę okręgu lub łuku @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Wiązanie odległości - + Fix a length of a line or the distance between a line and a vertex or between two circles Ustal długość linii lub odległość między linią a wierzchołkiem lub między dwoma okręgami @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Zwiąż odległość poziomą - + Fix the horizontal distance between two points or line ends Ustal poziomą odległość między dwoma punktami lub końcami linii @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Zwiąż odległość pionową - + Fix the vertical distance between two points or line ends Ustal pionową odległość między dwoma punktami lub końcami linii @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Wiązanie równości - + Create an equality constraint between two lines or between circles and arcs Utwórz wiązanie równości między dwiema liniami lub między okręgami i łukami @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Zwiąż w poziomie - + Create a horizontal constraint on the selected item Utwórz wiązanie poziome na wybranym elemencie @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Wiązanie blokady odległości - + Create both a horizontal and a vertical distance constraint on the selected vertex Wiązanie blokady odległości: utwórz zarówno poziome, jak i pionowe wiązanie odległości @@ -520,12 +520,12 @@ na wybranym wierzchołku CmdSketcherConstrainParallel - + Constrain parallel Wiązanie równoległości - + Create a parallel constraint between two lines Utwórz wiązanie równoległości pomiędzy dwoma liniami @@ -533,12 +533,12 @@ na wybranym wierzchołku CmdSketcherConstrainPerpendicular - + Constrain perpendicular Wiązanie prostopadłości - + Create a perpendicular constraint between two lines Utwórz wiązanie prostopadłości między dwoma liniami @@ -546,12 +546,12 @@ na wybranym wierzchołku CmdSketcherConstrainPointOnObject - + Constrain point onto object Zwiąż punkt na obiekcie - + Fix a point onto an object Ustaw punkt na obiekcie @@ -559,38 +559,25 @@ na wybranym wierzchołku CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Zwiąż automatycznie promień / średnicę - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Ustal średnicę, jeśli wybrano okrąg lub promień, jeśli wybrano łuk lub biegun liniowy - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Wiązanie promienia lub wagi - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Ustal promień okręgu lub łuku albo ustal wagę bieguna krzywej złożonej - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Wiązanie refrakcji (prawo Snell'a) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Tworzy wiązanie refrakcji (prawo Snella) pomiędzy dwoma punktami końcowymi promieni @@ -600,12 +587,12 @@ oraz krawędzią jako interfejsem. CmdSketcherConstrainSymmetric - + Constrain symmetrical Wiązanie symetrii - + Create a symmetry constraint between two points with respect to a line or a third point Utwórz wiązanie symetrii pomiędzy dwoma punktami @@ -615,12 +602,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherConstrainTangent - + Constrain tangent Wiązanie styczności - + Create a tangent constraint between two entities Utwórz wiązanie styczności pomiędzy dwoma obiektami @@ -628,12 +615,12 @@ w odniesieniu do linii lub trzeciego punktu CmdSketcherConstrainVertical - + Constrain vertically Zwiąż w pionie - + Create a vertical constraint on the selected item Utwórz wiązanie pionowe na wybranym elemencie @@ -1124,7 +1111,7 @@ w odniesieniu do linii lub trzeciego punktu Increase knot multiplicity - Zwiększ liczbę węzłów + Zwiększ liczebność węzłów @@ -1492,12 +1479,12 @@ To usunie właściwość "podparcie", jeśli istnieje. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktywuj / dezaktywuj wiązanie - + Activates or deactivates the selected constraints Aktywuje lub wyłącza zaznaczone wiązania @@ -1518,12 +1505,12 @@ To usunie właściwość "podparcie", jeśli istnieje. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Przełącz kontrolę wiązania - + Set the toolbar, or the selected constraints, into driving or reference mode Ustaw pasek narzędzi lub wybrane więzy wymiarowe @@ -1597,370 +1584,376 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Command - - + + Add horizontal constraint Dodaj wiązanie poziome - - - + + + Add horizontal alignment Wyrównaj w poziomie - - + + Add vertical constraint Dodaj wiązanie pionowe - + Add vertical alignment Wyrównaj w pionie - + Add 'Lock' constraint Dodaj wiązanie blokady odległości - + Add relative 'Lock' constraint Dodaj względne wiązanie blokady odległości - + Add fixed constraint Dodaj wiązanie zablokowania - + Add 'Block' constraint Dodaj wiązanie zablokowania - + Add block constraint Dodaj wiązanie zablokowania - - - + + + Add coincident constraint Dodaj wiązanie zbieżności - - + + Add distance from horizontal axis constraint Dodaj odległość od wiązania osi poziomej - - + + Add distance from vertical axis constraint Dodaj odległość od wiązania osi pionowej - - + + Add point to point distance constraint Dodaj ograniczenie odległości punktu od punktu - - - + + + Add point to line Distance constraint Dodaj ograniczeni odległości punktu od linii - - + + Add circle to circle distance constraint Dodaj wiązanie odległości okręgu do okręgu - + Add circle to line distance constraint Dodaj wiązanie odległości okręgu do linii - - - - - - + + + + + + Add length constraint Dodaj wiązanie długości - - + + + Dimension Wymiar - + Add lock constraint Dodaj wiązanie blokady odległości - + Add 'Distance to origin' constraint Dodaj wiązanie Odległość do początku układu współrzędnych - - - + + + Add Distance constraint Dodaj wiązanie odległości - - - + + + Add 'Horizontal' constraints Dodaj wiązanie poziome - - - + + + Add 'Vertical' constraints Dodaj wiązanie pionowe - - + + Add Symmetry constraint Dodaj wiązanie symetrii - - + + Add Symmetry constraints Dodaj wiązania symetrii - - + + Add Distance constraints Dodaj wiązania odległości - + Add Horizontal constraint Dodaj wiązanie poziome - + Add Vertical constraint Dodaj wiązanie pionowe - + Add Block constraint Dodaj wiązanie zablokowania - + Add Angle constraint Dodaj wiązanie kąta - - - - + + + + Add Equality constraint Dodaj wiązanie równości - + Add Equality constraints Dodaj wiązania równości - + Add Radius constraint Dodaj wiązanie promienia - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Dodaj wiązanie współosiowości i długości - + Add DistanceX constraint Dodaj wiązanie odległości X - + Add DistanceY constraint Dodaj wiązanie odległości Y - + Add point to circle Distance constraint Dodaj wiązanie odległości punktu od okręgu - - + + Add point on object constraint Dodaj punkt w miejscu wiązania obiektu - - + + Add point to point horizontal distance constraint Dodaj poziome wiązanie odległości, pomiędzy punktami - + Add fixed x-coordinate constraint Dodaj wiązanie ze stałą współrzędną x - - + + Add point to point vertical distance constraint Dodaj pionowe wiązanie odległości pomiędzy punktami - + Add fixed y-coordinate constraint Dodaj wiązanie ze stałą współrzędną y - - + + Add parallel constraint Dodaj wiązanie równoległości - - - - - - - + + + + + + + Add perpendicular constraint Dodaj wiązanie prostopadłości - + Add perpendicularity constraint Dodaj wiązanie prostopadłości - + Swap coincident+tangency with ptp tangency Zamień styczność krawędzi na styczność od punktu do punktu - + Swap PointOnObject+tangency with point to curve tangency Zamień wiązanie Punkt na obiekcie+styczna z punktem na wiązanie Styczna do krzywej - - - - - - - + + + + + + + Add tangent constraint Dodaj wiązanie kąta - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodaj punkt dostępny dla wiązania styczności - - - - + + + + Add radius constraint Dodaj wiązanie promienia - - - - + + + + Add diameter constraint Dodaj wiązanie średnicy - - - - + + + + Add radiam constraint Dodaj wiązanie promienia - - - - - - + + + + + + Add angle constraint Dodaj wiązanie kąta - - + + Add equality constraint Dodaj wiązanie równości - - - - - + + + + + Add symmetric constraint Dodaj wiązanie symetryczności - + Add Snell's law constraint Dodaj wiązanie prawa Snella - + Toggle constraint to driving/reference Przełączanie wiązania między konstrukcyjnym i informacyjnym - + Activate/Deactivate constraint Aktywuj / dezaktywuj wiązanie @@ -2036,7 +2029,7 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. - + Add sketch arc Dodaj szkic łuku @@ -2130,7 +2123,7 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Increase knot multiplicity - Zwiększ liczebność węzłów + Zwiększ liczbę węzłów @@ -2287,59 +2280,59 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Błąd wiązań automatycznych: Nierozwiązywalny szkic przy stosowaniu wiązania równości. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Nie można ustalić punktu przecięcia się krzywych. Spróbuj dodać wiązanie zbieżne pomiędzy wierzchołkami krzywych, które zamierzasz zaokrąglić. - - + + BSpline Geometry Index (GeoID) is out of bounds. Indeks geometrii krzywej złożonej (GeoID) jest poza wiązaniem. - + You are requesting no change in knot multiplicity. Żądasz niezmienności w wielokrotności węzłów. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Podany indeks geometrii krzywej złożonej (GeoId) nie jest łukiem krzywej złożonej. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Indeks węzłów jest poza wiązaniem. Zauważ, że zgodnie z zapisem OCC, pierwszy węzeł ma indeks 1, a nie zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. Wielokrotność nie może być zwiększona poza stopień krzywej złożonej. - + The multiplicity cannot be decreased beyond zero. Wielokrotność nie może zostać zmniejszona poniżej zera. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC nie jest w stanie zmniejszyć wielokrotności w ramach maksymalnej tolerancji. - + Knot cannot have zero multiplicity. Węzeł nie może mieć zerowej krotności. - + Knot multiplicity cannot be higher than the degree of the BSpline. Krotność węzłów nie może być większa niż stopień krzywej złożonej. - + Knot cannot be inserted outside the BSpline parameter range. Węzła nie można wstawić poza zakresem parametrów krzywej złożonej. @@ -2407,134 +2400,134 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ nieprawidłowych wiązań, zdegenerowanej geometrii itp. Wiązanie wymiaru - + Cannot add a constraint between two external geometries. Nie można dodać wiązania pomiędzy dwoma geometriami zewnętrznymi. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nie można dodać wiązania między dwiema w pełni zdefiniowanymi geometriami. Geometrie te obejmują geometrię zewnętrzną, geometrię blokującą oraz punkty specjalne, takie jak punkty węzłów krzywej złożonej. - + Sketcher Constraint Substitution Zastępowanie wiązania szkicownika - + Keep notifying me of constraint substitutions Powiadamiaj mnie o zastępowaniu wiązań - - - + + + Only sketch and its support are allowed to be selected. Dozwolone jest wybieranie tylko szkicu i jego wsparcia. - + One of the selected has to be on the sketch. Jeden z wyborów musi znajdować się na szkicu. - - + + Select an edge from the sketch. Wybierz krawędź ze szkicu. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Wiązanie niemożliwe do ustalenia - - - - + + + + The selected edge is not a line segment. Wybrana krawędź nie jest odcinkiem linii. - - - - - - + + + + + + Double constraint Zdublowane wiązanie - - - - - + + + + + The selected edge already has a horizontal constraint! Wybrana krawędź ma już wiązanie poziome! - - - + + + The selected edge already has a vertical constraint! Wybrana krawędź ma już wiązanie pionowe! - - - - - - + + + + + + The selected edge already has a Block constraint! Wybrana krawędź ma już wiązanie zablokowania! - + The selected item(s) can't accept a horizontal constraint! Wybrane detale nie mogą zaakceptować ograniczenia poziomego! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Wybrano więcej niż jeden ustalony punkt. Wybierz maksymalnie jeden ustalony punkt! - + The selected item(s) can't accept a vertical constraint! Wybrane detale nie mogą zaakceptować ograniczenia pionowego! - - - + + + Select vertices from the sketch. Wybierz wierzchołki ze szkicu. - + Select one vertex from the sketch other than the origin. Zaznacz jeden wierzchołek ze szkicu inny niż odniesienie położenia. - + Select only vertices from the sketch. The last selected vertex may be the origin. Ze szkicu wybierz tylko wierzchołki. Ostatni wybrany wierzchołek może być odniesieniem położenia. - + Wrong solver status Nieprawidłowy status solvera - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Nie można dodać wiązania zablokowania, jeśli rysunek nie został rozwiązany lub istnieją wiązania zbędne i/lub sprzeczne. - + Select one edge from the sketch. Zaznacz jedną krawędź ze szkicu. - + Select only edges from the sketch. Zaznacz tylko krawędzie ze szkicu. - + Number of selected objects is not 3 Liczba wybranych obiektów nie jest równa 3 - + Error Błąd - + Unexpected error. More information may be available in the Report View. Nieoczekiwany błąd. Więcej informacji może być dostępnych w Widoku raportu. - + Endpoint to endpoint tangency was applied instead. Zamiast tego zastosowano styczne między punktami końcowymi. - + Select two or more points from the sketch. Zaznacz dwa lub więcej punktów ze szkicu. - + Select two or more vertices from the sketch. Wybierz dwa lub więcej wierzchołków ze szkicu. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wybierz dwa lub więcej wierzchołków ze szkicu dla wiązania zbieżności albo co najmniej dwa koła, elipsy, łuki lub łuki eliptyczne do wiązania współśrodkowego. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Wybierz dwa wierzchołki ze szkicu dla wiązania zbieżności albo dwa koła, elipsy, łuki lub łuki eliptyczne do wiązania współśrodkowego. - + Select exactly one line or one point and one line or two points from the sketch. Wybierz dokładnie jedną linię lub jeden punkt i jedną linię lub dwa punkty ze szkicu. - + Cannot add a length constraint on an axis! Nie można dodać ograniczenia długości osi! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Wybierz ze szkicu dokładnie jedną linię lub jeden punkt i jedną linię lub dwa punkty lub dwa okręgi. - + This constraint does not make sense for non-linear curves. Takie wiązanie nie ma sensu w przypadku krzywych nieliniowych. - + Endpoint to edge tangency was applied instead. Zamiast tego zastosowano styczność punktu końcowego do krawędzi. - - - - - - - + + + + + + + Select the right things from the sketch. Wybierz prawidłowe obiekty ze szkicu. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Wybierz krawędź, która nie jest wagą krzywej złożonej. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Żaden z wybranych punktów nie został związany z odpowiednimi krzywymi, ponieważ są one częściami tego samego elementu, ponieważ są geometrią zewnętrzną lub ponieważ krawędź nie kwalifikuje się. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Żaden z wybranych punktów nie został związany na odpowiednich krzywych, albo są one częścią tego samego elementu albo obie są zewnętrzną geometrią. - - - - + + + + Select exactly one line or up to two points from the sketch. Wybierz dokładnie jedną linię lub do dwa punkty ze szkicu. - + Cannot add a horizontal length constraint on an axis! Nie można dodać ograniczenia długości osi w poziomie! - + Cannot add a fixed x-coordinate constraint on the origin point! Nie można dodać określonego wiązania współrzędnych x w punkcie odniesienia położenia! - - + + This constraint only makes sense on a line segment or a pair of points. Takie wiązanie ma sens tylko w przypadku odcinka lub pary punktów. - + Cannot add a vertical length constraint on an axis! Nie można dodać ograniczenia długości osi w pionie! - + Cannot add a fixed y-coordinate constraint on the origin point! Nie można dodać określonego wiązania współrzędnych y w punkcie odniesienia położenia! - + Select two or more lines from the sketch. Wybierz dwie lub więcej linii ze szkicu. - - + + Select at least two lines from the sketch. Wybierz co najmniej dwie linie ze szkicu. - + Select a valid line. Wybierz prawidłową linię. - - + + The selected edge is not a valid line. Wybrana krawędź nie jest prawidłową linią. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2914,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Akceptowane kombinacje: dwie krzywe; punkt końcowy i krzywej; dwa punkty końcowe; dwie krzywe i punkt. - + Select some geometry from the sketch. perpendicular constraint Wybierz dowolną geometrię ze szkicu. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nie można dodać wiązania prostopadłości w niepołączonym punkcie! - - - + + + Perpendicular to B-spline edge currently unsupported. Prostopadła do krawędzi krzywej złozonej obecnie nie jest obsługiwana. - - + + One of the selected edges should be a line. Jedna z zaznaczonych krawędzi powinna być linią. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Zastosowano styczność punktu końcowego do punktu końcowego. Wiązanie zbieżności zostało usunięte. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Zastosowano wiązanie styczności punktu końcowego do krawędzi. Usunięto wiązanie punktu na obiekcie. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2959,182 +2952,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Akceptowane kombinacje: dwie krzywe; punkt końcowy i krzywa; dwa punkty końcowe; dwie krzywe i punkt. - + Select some geometry from the sketch. tangent constraint Wybierz dowolną geometrię ze szkicu. - - - + + + Cannot add a tangency constraint at an unconnected point! Nie można dodać wiązanie styczności w niepołączonym punkcie! - - + + Tangent constraint at B-spline knot is only supported with lines! Wiązanie styczne w węźle krzywej złożonej jest obsługiwane tylko z liniami! - + B-spline knot to endpoint tangency was applied instead. Zamiast tego zastosowano styczność węzła krzywej złożonej do punktu końcowego. - + Select either one point and several curves, or one curve and several points. Wybierz albo jeden punkt i kilka krzywych, albo jedną krzywą i kilka punktów. - - + + Wrong number of selected objects! Niewłaściwa liczba wybranych obiektów! - - + + With 3 objects, there must be 2 curves and 1 point. Z trzech (3) obiektów, dwa (2) muszą być krzywymi i jeden (1) musi być punktem. - - - + + + Tangency to B-spline edge currently unsupported. Styczna do krawędzi krzywej złożonej nie jest obecnie obsługiwana. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Wybierz jeden lub więcej łuków lub okręgów ze szkicu. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Wybierz tylko jeden lub więcej biegunów krzywej złożonej, albo tylko jeden lub więcej łuków lub okręgów ze szkicu, ale nie ich kombinację. - - - + + + Constraint only applies to arcs or circles. Wiązanie dotyczy tylko łuków lub okręgów. - - + + Select one or two lines from the sketch. Or select two edges and a point. Zaznacz jedną lub dwie linie ze szkicu. Albo zaznacz dwie krawędzie oraz punkt. - - + + Parallel lines Linie równoległe - - + + An angle constraint cannot be set for two parallel lines. Nie można zdefiniować wiązania kąta dla dwóch linii równoległych. - + Cannot add an angle constraint on an axis! Nie można dodać ustalonego wiązania kąta na osi! - + Select two edges from the sketch. Zaznacz dwie krawędzie ze szkicu. - + Select two or more compatible edges. Zaznacz dwie lub więcej zgodnych krawędzi. - + Sketch axes cannot be used in equality constraints. Osie szkiców nie mogą być używane z wiązaniami równości. - + Equality for B-spline edge currently unsupported. Równość pomiędzy krawędziami krzywej złożonej obecnie nie jest obsługiwana. - - - - + + + + Select two or more edges of similar type. Wybierz dwie lub więcej krawędzi podobnego typu. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Wybierz dwa punkty i linię symetrii, dwa punkty i punkt symetrii lub linię i punkt symetrii ze szkicu. - - + + Cannot add a symmetry constraint between a line and its end points. Nie można dodać wiązania symetrii między linią i jej punktami końcowymi. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nie można dodać wiązania symetrii między linią i jego punktami końcowymi! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Wybierz dwa końce linii, które mają działać jak półproste, oraz krawędź reprezentującą granicę. Pierwszy wybrany punkt odpowiada indeksowi n1, drugi n2, a wartość odniesienia określa stosunek n2 / n1. - + Selected objects are not just geometry from one sketch. Wybrane obiekty są nie tylko geometrią z jednego szkicu. - + Cannot create constraint with external geometry only. Nie można tworzyć wiązań tylko przy użyciu geometrii zewnętrznej. - + Incompatible geometry is selected. Wybrano niekompatybilną geometrię. - + SnellsLaw on B-spline edge is currently unsupported. Prawo Snell'a na krawędzi krzywej złożonej jest obecnie nieobsługiwana. - - - - - + + + + + Select constraints from the sketch. Wybierz wiązania ze szkicu. @@ -3634,12 +3627,12 @@ Przytrzymaj Ctrl + Alt, aby to zignorować. Długość: - + Refractive index ratio Współczynnik załamania światła - + Ratio n2/n1: Stosunek n2/n1: @@ -5229,112 +5222,112 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. SketcherGui::ViewProviderSketch - + Edit sketch Edytuj szkic - + A dialog is already open in the task panel Okno dialogowe jest już otwarte w panelu zadań - + Do you want to close this dialog? Czy chcesz zamknąć to okno? - + Invalid sketch Nieprawidłowy szkic - + Do you want to open the sketch validation tool? Czy chcesz otworzyć narzędzie sprawdzania szkicu? - + The sketch is invalid and cannot be edited. Szkic jest nieprawidłowy i nie może być edytowany. - + Please remove the following constraint: Usuń następujące wiązania: - + Please remove at least one of the following constraints: Usuń co najmniej jedno z następujących wiązań: - + Please remove the following redundant constraint: Usuń następujący zbędny wiąz: - + Please remove the following redundant constraints: Usuń następujące, nadmiarowe wiązania: - + The following constraint is partially redundant: Następujące wiązanie jest częściowo zbędne: - + The following constraints are partially redundant: Następujące wiązania są częściowo zbędne: - + Please remove the following malformed constraint: Proszę usunąć następujące błędnie sformułowane wiązanie: - + Please remove the following malformed constraints: Proszę usunąć następujące błędnie sformułowane wiązania: - + Empty sketch Pusty szkic - + Over-constrained: Nadmiernie związany szkic: - + Malformed constraints: Zniekształcone wiązania: - + Redundant constraints: Wiązania nadmiarowe: - + Partially redundant: Częściowo nadmiarowe: - + Solver failed to converge Solver nie osiągnął zbieżności - + Under constrained: Niezwiązany: - + %n DoF(s) %n stopień swobody @@ -5344,7 +5337,7 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. - + Fully constrained W pełni związany @@ -5418,7 +5411,7 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Creates a clone of the geometry taking as reference the last selected point - Tworzy prostą kopię geometrii przyjmującej jako odniesienie ostatni wybrany punkt + Tworzy klon geometrii przyjmując za punkt odniesienia ostatni wybrany punkt @@ -5442,8 +5435,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Ustal średnicę okręgu lub łuku @@ -5451,7 +5444,8 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Określ promień / średnicę okręgu lub łuku @@ -5459,20 +5453,12 @@ Odbywa się to przez analizę geometrii szkicu i wiązań. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Ustalenie promienia okręgu lub łuku - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Określ promień / średnicę okręgu lub łuku - - Sketcher_Copy @@ -6089,7 +6075,7 @@ Eigen Sparse QR, algorytm jest zoptymalizowany dla macierzy rzadkich, zwykle szy ViewProviderSketch - + and %1 more i %1 więcej @@ -6312,7 +6298,7 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Szkic zawiera częściowo zbędne wiązania! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabole zostały poddane migracji. Pliki po imporcie nie otworzą się w poprzednich wersjach programu FreeCAD!! @@ -6322,7 +6308,7 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p - + @@ -6347,7 +6333,7 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p - + @@ -6370,13 +6356,13 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Ograniczenie ma nieprawidłowe informacje o indeksie i jest zniekształcone. - - - - - - - + + + + + + + @@ -6387,7 +6373,7 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p - + Failed to add arc Nie udało się dodać łuku @@ -6501,7 +6487,7 @@ Rozstaw siatki zmienia się, jeśli staje się mniejszy niż określona liczba p Nie udało się dodać prostopadłościanu - + Failed to add rounded rectangle Nie udało się dodać zaokrąglonego prostokąta @@ -6684,18 +6670,18 @@ Przytrzymaj CTRL, aby włączyć "Przyciąganie pod kątem". Kąt zaczyna się o CmdSketcherDimension - + Dimension Wymiar - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Ogranicz kontekstowo na podstawie dokonanego wyboru. -W zależności od dokonanego wyboru dostępnych może być kilka rodzajów wiązań. Można je przełączać za pomocą klawisza SHIFT. -Kliknięcie lewym przyciskiem myszy pustego miejsca spowoduje zatwierdzenie bieżącego wiązania. Kliknięcie prawym przyciskiem myszy lub naciśnięcie Esc spowoduje anulowanie. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6714,14 +6700,27 @@ Kliknięcie lewym przyciskiem myszy pustego miejsca spowoduje zatwierdzenie bie CmdSketcherCompDimensionTools - + Dimension Wymiar - + Dimension tools. Narzędzie wymiarowania. + + CmdSketcherConstrainRadius + + + Constrain radius + Wiązanie promienia + + + + Fix the radius of a circle or an arc + Ustalenie promienia okręgu lub łuku + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts index f76c449776..509acab2c0 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-BR.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir arco ou círculo - + Constrain an arc or a circle Restringir um arco ou um círculo - + Constrain radius Restrição de raio - + Constrain diameter Restringir o diâmetro - + Constrain auto radius/diameter Restringir raio/diâmetro automáticos @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ângulo de restrição - + Fix the angle of a line or the angle between two lines Fixar o ângulo de uma linha ou o ângulo entre duas linhas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Restrição de bloqueio - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restrição de coincidência - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir o diâmetro - + Fix the diameter of a circle or an arc Corrigir o diâmetro de um círculo ou arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restrição de distância - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Restrição de distância horizontal - + Fix the horizontal distance between two points or line ends Fixar a distância horizontal entre dois pontos ou extremidades de linha @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Restringir a distância vertical - + Fix the vertical distance between two points or line ends Fixar a distância vertical entre dois pontos ou extremidades de linha @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restrição igual - + Create an equality constraint between two lines or between circles and arcs Criar uma restrição de igualdade entre duas linhas ou círculos e arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Criar uma restrição horizontal sobre o item selecionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restrição de bloqueio - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restrição paralela - + Create a parallel constraint between two lines Criar uma restrição paralela entre duas linhas @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restrição perpendicular - + Create a perpendicular constraint between two lines Criar uma restrição perpendicular entre duas linhas @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir um ponto sobre um objeto - + Fix a point onto an object Fixar um ponto sobre um objeto @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restringir raio/diâmetro automáticos - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Restrição de raio ou peso - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Bloquea o raio de um círculo ou arco ou o peso de um polo de um B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restrição simétrica - + Create a symmetry constraint between two points with respect to a line or a third point Criar uma restrição de simetria entre dois pontos @@ -615,12 +602,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherConstrainTangent - + Constrain tangent Restrição tangente - + Create a tangent constraint between two entities Criar uma restrição tangente entre duas entidades @@ -628,12 +615,12 @@ em relação a uma linha ou um terceiro ponto CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Criar uma restrição vertical sobre o item selecionado @@ -1492,12 +1479,12 @@ Isto irá limpar a propriedade 'Suporte', se houver. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Ativar/desativar restrição - + Activates or deactivates the selected constraints Ativa ou desativa as restrições selecionadas @@ -1518,12 +1505,12 @@ Isto irá limpar a propriedade 'Suporte', se houver. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ativar/desativar restrição atuante ou de referência - + Set the toolbar, or the selected constraints, into driving or reference mode Colocar a barra de ferramentas, ou as restrições selecionadas, @@ -1597,370 +1584,376 @@ restrições inválidas, geometria corrompida, etc. Command - - + + Add horizontal constraint Adicionar restrição horizontal - - - + + + Add horizontal alignment Adicionar alinhamento horizontal - - + + Add vertical constraint Adicionar restrição vertical - + Add vertical alignment Adicionar alinhamento vertical - + Add 'Lock' constraint Adicionar restrição 'Travar' - + Add relative 'Lock' constraint Adicionar restrição 'Travar' relativa - + Add fixed constraint Adicionar restrição fixa - + Add 'Block' constraint Adicionar restrição 'Bloquear' - + Add block constraint Adicionar restrição 'Bloquear' - - - + + + Add coincident constraint Adicionar restrição coincidente - - + + Add distance from horizontal axis constraint Adiciona restrição na distância ao eixo horizontal - - + + Add distance from vertical axis constraint Adiciona restrição na distância ao eixo vertical - - + + Add point to point distance constraint Adiciona restrição na distância ponto a ponto - - - + + + Add point to line Distance constraint Adicionar restrição na distância entre ponto e linha - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Adiciona restrição de comprimento - - + + + Dimension Dimensão - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Adiciona restrição tipo 'ponto-no-objeto' - - + + Add point to point horizontal distance constraint Adicionar restrição de distância horizontal ponto a ponto - + Add fixed x-coordinate constraint Adiciona restrição de coordenada x fixa - - + + Add point to point vertical distance constraint Adiciona restrição de distância vertical ponto a ponto - + Add fixed y-coordinate constraint Adiciona restrição de coordenada y fixa - - + + Add parallel constraint Adiciona restrição paralela - - - - - - - + + + + + + + Add perpendicular constraint Adiciona restrição perpendicular - + Add perpendicularity constraint Adicionar restrição de perpendicularidade - + Swap coincident+tangency with ptp tangency Trocar coincidência+tangência por tangência ponto-a-ponto - + Swap PointOnObject+tangency with point to curve tangency Trocar PointOnObject+tangência por tangência de ponto para curva - - - - - - - + + + + + + + Add tangent constraint Adiciona restrição tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Adiciona ponto de tangência - - - - + + + + Add radius constraint Adicionar restrição de raio - - - - + + + + Add diameter constraint Adicionar restrição de diâmetro - - - - + + + + Add radiam constraint Adicionar restrição de raio - - - - - - + + + + + + Add angle constraint Adicionar restrição de ângulo - - + + Add equality constraint Adicionar restrição de igualdade - - - - - + + + + + Add symmetric constraint Adicionar restrição simétrica - + Add Snell's law constraint Adicionar restrição lei de Snell - + Toggle constraint to driving/reference Alternar o tipo da restrição entre motriz ou referência - + Activate/Deactivate constraint Ativar/desativar restrição @@ -2036,7 +2029,7 @@ restrições inválidas, geometria corrompida, etc. - + Add sketch arc Adicionar esboço de arco @@ -2287,59 +2280,59 @@ restrições inválidas, geometria corrompida, etc. Erro de restrição automática: esboço insolúvel após a aplicação de restrições de igualdade. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Não é possível adivinhar a intersecção das curvas. Tente adicionar uma restrição coincidente entre os vértices das curvas que você pretende filetar. - - + + BSpline Geometry Index (GeoID) is out of bounds. Índice de geometria BSpline (GeoID) está fora dos limites. - + You are requesting no change in knot multiplicity. Você não solicitou nenhuma mudança de multiplicidade em nós. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. O índice de geometria (GeoId) fornecida não é uma curva B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. O índice do nó está fora dos limites. Note que, de acordo com a notação do OCC, o primeiro nó tem índice 1 e não zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. A multiplicidade não pode ser aumentada além do grau de B-spline. - + The multiplicity cannot be decreased beyond zero. A multiplicidade não pode ser diminuída abaixo de zero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. O OCC não consegue diminuir a multiplicidade dentro de tolerância máxima. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2407,134 +2400,134 @@ restrições inválidas, geometria corrompida, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ restrições inválidas, geometria corrompida, etc. Restrição de dimensão - + Cannot add a constraint between two external geometries. Não é possível adicionar uma restrição entre duas geometrias externas. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Substituição de restrição do Esboço - + Keep notifying me of constraint substitutions Continuar me avisando sobre substituições de restrições - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Selecione uma aresta do esboço. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restrição impossível - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Restrição dupla - - - - - + + + + + The selected edge already has a horizontal constraint! A aresta selecionada já tem uma restrição horizontal! - - - + + + The selected edge already has a vertical constraint! A aresta selecionada já tem uma restrição vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! A aresta selecionada já possui uma restrição de Bloqueio! - + The selected item(s) can't accept a horizontal constraint! Os itens selecionados não podem aceitar uma restrição horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Há mais de um ponto fixo selecionado. Selecione no máximo um ponto fixo! - + The selected item(s) can't accept a vertical constraint! Os itens selecionados não podem aceitar uma restrição vertical! - - - + + + Select vertices from the sketch. Selecione vértices do esboço. - + Select one vertex from the sketch other than the origin. Selecione um vértice do esboço que não seja a origem. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecione somente os vértices do esboço. O último vértice selecionado pode ser a origem. - + Wrong solver status Erro no status do calculador - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Uma restrição de bloqueio não pode ser adicionada se o esboço não estiver resolvido ou se existirem restrições redundantes e/ou conflitantes. - + Select one edge from the sketch. Selecione uma aresta do esboço. - + Select only edges from the sketch. Selecione somente arestas do esboço. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Erro - + Unexpected error. More information may be available in the Report View. Erro inesperado. Mais informações podem estar disponíveis na visualização do relatório. - + Endpoint to endpoint tangency was applied instead. Uma tangência de ponto a ponto de extremidade foi aplicado em vez disso. - + Select two or more points from the sketch. Selecione dois ou mais pontos no esboço. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Selecione exatamente uma linha ou um ponto e uma linha ou dois pontos no esboço. - + Cannot add a length constraint on an axis! Não é possível adicionar uma restrição de comprimento em um eixo! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Uma tangência de ponto de extremidade a aresta foi aplicada em vez disso. - - - - - - - + + + + + + + Select the right things from the sketch. Selecione as coisas corretas no esboço. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nenhum dos pontos selecionados foi restrito sobre as respectivas curvas, porque elas são partes do mesmo elemento, porque são ambos geometria externa, ou porque a aresta não é elegível. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nenhum dos pontos selecionados foi restringido para as respectivas curvas, eles são partes do mesmo elemento, ou ambos são geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Selecione exatamente uma linha ou até dois pontos no esboço. - + Cannot add a horizontal length constraint on an axis! Não é possível adicionar uma restrição de comprimento horizontal em um eixo! - + Cannot add a fixed x-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-x fixa no ponto de origem! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Não é possível adicionar uma restrição de comprimento vertical em um eixo! - + Cannot add a fixed y-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-y fixa no ponto de origem! - + Select two or more lines from the sketch. Selecione duas ou mais linhas no esboço. - - + + Select at least two lines from the sketch. Selecione pelo menos duas linhas no esboço. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2914,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. perpendicular constraint Selecione alguma geometria do esboço. - - + + Cannot add a perpendicularity constraint at an unconnected point! Não é possível adicionar uma restrição de perpendicularidade em um ponto não conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular à aresta de Bspline ainda não está suportado. - - + + One of the selected edges should be a line. Uma das arestas selecionadas deve ser uma linha. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uma tangência de ponto a ponto foi aplicada. A restrição de coincidência foi excluída. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Uma tangência de ponto de extremidade a aresta foi aplicada. A restrição de ponto no objeto foi excluída. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2959,182 +2952,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. tangent constraint Selecione alguma geometria do esboço. - - - + + + Cannot add a tangency constraint at an unconnected point! Não é possível adicionar uma restrição de tangência em um ponto não conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Número errado de objetos selecionados! - - + + With 3 objects, there must be 2 curves and 1 point. Com 3 objetos, deve haver 2 curvas e 1 ponto. - - - + + + Tangency to B-spline edge currently unsupported. Tangência à aresta de Bspline ainda não está suportado. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selecione um ou mais arcos ou círculos no esboço. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selecione somente um ou mais polos B-Spline ou apenas um ou mais arcos ou círculos do esboço, mas não misturados. - - - + + + Constraint only applies to arcs or circles. Restrição aplicável somente em arcos ou círculos. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selecione uma ou duas linhas no esboço. Ou selecione um ponto e duas arestas. - - + + Parallel lines Linhas paralelas - - + + An angle constraint cannot be set for two parallel lines. Uma restrição de ângulo não pode ser aplicada em duas linhas paralelas. - + Cannot add an angle constraint on an axis! Não é possível adicionar uma restrição de ângulo em um eixo! - + Select two edges from the sketch. Selecione duas arestas no esboço. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Igualdade para aresta de Bspline ainda não está suportada. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selecione dois pontos e uma linha de simetria, dois pontos e um ponto de simetria ou uma linha e um ponto de simetria no esboço. - - + + Cannot add a symmetry constraint between a line and its end points. Não é possível adicionar uma restrição de simetria entre uma linha e seus pontos finais. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Não é possível adicionar uma restrição de simetria entre uma linha e seus pontos finais! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selecione dois pontos finais de linhas para agir como raios e uma aresta que representa um limite. O primeiro ponto selecionado corresponde ao índice n1, o segundo ao n2, e o valor de datum define a proporção n2/n1. - + Selected objects are not just geometry from one sketch. Objetos selecionados não são apenas geometria de um esboço só. - + Cannot create constraint with external geometry only. Não é possível criar restrições somente com geometria externa. - + Incompatible geometry is selected. Geometria incompatível selecionada. - + SnellsLaw on B-spline edge is currently unsupported. Restrições SnellsLaw em arestas de Bspline ainda não são suportadas. - - - - - + + + + + Select constraints from the sketch. Selecione restrições do esboço. @@ -3633,12 +3626,12 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois Comprimento: - + Refractive index ratio Relação de índice de refração - + Ratio n2/n1: Relação n2/n1: @@ -5230,112 +5223,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Editar esboço - + A dialog is already open in the task panel Uma caixa de diálogo já está aberta no painel de tarefas - + Do you want to close this dialog? Deseja fechar este diálogo? - + Invalid sketch Esboço inválido - + Do you want to open the sketch validation tool? Você quer abrir a ferramenta de validação de esboço? - + The sketch is invalid and cannot be edited. O esboço é inválido e não pode ser editado. - + Please remove the following constraint: Por favor, remova a seguinte restrição: - + Please remove at least one of the following constraints: Por favor remova pelo menos uma das seguintes restrições: - + Please remove the following redundant constraint: Por favor, remova a seguinte restrição redundante: - + Please remove the following redundant constraints: Por favor, remova as seguintes restrições redundantes: - + The following constraint is partially redundant: A restrição seguinte é parcialmente redundante: - + The following constraints are partially redundant: As restrições seguintes são parcialmente redundantes: - + Please remove the following malformed constraint: Por favor remova as seguintes restrições malformadas: - + Please remove the following malformed constraints: Por favor remova as seguintes restrições malformadas: - + Empty sketch Esboço vazio - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) @@ -5343,7 +5336,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fully constrained @@ -5441,8 +5434,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Corrigir o diâmetro de um círculo ou arco @@ -5450,7 +5443,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Corrigir o raio / diâmetro de um círculo ou um arco @@ -5458,20 +5452,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixar o raio de um círculo ou um arco - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Corrigir o raio / diâmetro de um círculo ou um arco - - Sketcher_Copy @@ -6086,7 +6072,7 @@ o algorítimo Eigen Sparse QR é otimizado para matrizes escassas; geralmente é ViewProviderSketch - + and %1 more and %1 more @@ -6309,7 +6295,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6320,7 +6306,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6345,7 +6331,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6368,13 +6354,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6385,7 +6371,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6499,7 +6485,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Falha ao adicionar caixa - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6681,17 +6667,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensão - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6711,14 +6697,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimensão - + Dimension tools. Ferramentas de dimensão. + + CmdSketcherConstrainRadius + + + Constrain radius + Restrição de raio + + + + Fix the radius of a circle or an arc + Fixar o raio de um círculo ou um arco + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts index ebc539ae51..b90e631f92 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_pt-PT.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringir o arco ou círculo - + Constrain an arc or a circle Restringir um arco ou um círculo - + Constrain radius Restringir o raio - + Constrain diameter Restringir o diâmetro - + Constrain auto radius/diameter Restringir raio/diâmetro automático @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restringir o ângulo - + Fix the angle of a line or the angle between two lines Corrigir o ângulo de uma linha ou o ângulo entre duas linhas @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restringir coincidentes - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringir o diâmetro - + Fix the diameter of a circle or an arc Fixar o diâmetro de um círculo ou arco @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restringir distância - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Corrigir a distância horizontal entre dois pontos ou extremidades de linha @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Corrigir a distância vertical entre dois pontos ou extremidades de linha @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restringir igualdade - + Create an equality constraint between two lines or between circles and arcs Criar uma restrição de igualdade entre duas linhas ou entre círculos e arcos @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restringir horizontalmente - + Create a horizontal constraint on the selected item Criar uma restrição horizontal no item selecionado @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restrição de bloqueio - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restringir paralelo - + Create a parallel constraint between two lines Criar uma restrição paralela entre duas linhas @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restringir perpendicular - + Create a perpendicular constraint between two lines Criar uma restrição perpendicular entre duas linhas @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restringir um ponto sobre um objeto - + Fix a point onto an object Fixar um ponto num objeto @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Restringir raio/diâmetro automático - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Restringir raio ou peso - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Restringir refração (lei de Snell) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restringir simetria - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -615,12 +602,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Restringir a tangente - + Create a tangent constraint between two entities Criar uma restrição de tangência entre duas entidades @@ -628,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Restringir verticalmente - + Create a vertical constraint on the selected item Criar uma restrição vertical no item selecionado @@ -1492,12 +1479,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Ativar/desativar restrição - + Activates or deactivates the selected constraints Ativa ou desativa as restrições selecionadas @@ -1518,12 +1505,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ativar/desativar restrição dominante/referência - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1597,370 +1584,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Adicionar restrição horizontal - - - + + + Add horizontal alignment Adicionar alinhamento horizontal - - + + Add vertical constraint Adicionar restrição vertical - + Add vertical alignment Adicionar alinhamento vertical - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Adicionar restrição fixa - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Adicionar restrição de comprimento - - + + + Dimension Dimensão - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Adicionar restrição perpendicular - + Add perpendicularity constraint Adicionar restrição de perpendicularidade - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Adicionar restrição tangente - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2036,7 +2029,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Add sketch arc @@ -2287,59 +2280,59 @@ invalid constraints, degenerated geometry, etc. Erro de restrição automática: esboço insolúvel após a aplicação de restrições de igualdade. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Não é possível calcular a interseção das curvas. Tente adicionar uma restrição coincidente entre os vértices das curvas das quais pretende fazer a concordância. - - + + BSpline Geometry Index (GeoID) is out of bounds. Índice de geometria BSpline (GeoID) está fora dos limites. - + You are requesting no change in knot multiplicity. Você não está a solicitar nenhuma mudança na multiplicidade de nó. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. O índice de geometria (GeoId) fornecida não é uma curva B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. O índice do nó está fora dos limites. Note que, de acordo com a notação de OCC, o primeiro nó tem índice 1 e não zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. A multiplicidade não pode ser aumentada além do grau de B-spline. - + The multiplicity cannot be decreased beyond zero. A multiplicidade não pode ser diminuída, abaixo de zero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC é incapaz de diminuir a multiplicidade dentro de tolerância máxima. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2407,134 +2400,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ invalid constraints, degenerated geometry, etc. Restrição dimensional - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Selecione uma aresta do sketch. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restrição impossível - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Dupla restrição - - - - - + + + + + The selected edge already has a horizontal constraint! A aresta selecionada já tem uma restrição horizontal! - - - + + + The selected edge already has a vertical constraint! A aresta selecionada já tem uma restrição vertical! - - - - - - + + + + + + The selected edge already has a Block constraint! A aresta selecionada já possui uma restrição de Bloqueio! - + The selected item(s) can't accept a horizontal constraint! Os items selecionados não podem aceitar uma restrição horizontal! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Há mais de um ponto fixo selecionado. Selecione no máximo um ponto fixo! - + The selected item(s) can't accept a vertical constraint! Os itens selecionados não podem aceitar uma restrição vertical! - - - + + + Select vertices from the sketch. Selecione vértices do esboço. - + Select one vertex from the sketch other than the origin. Selecione um vértice do esboço que não seja a origem. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selecione somente vértices do esboço. O último vértice selecionado deve ser a origem. - + Wrong solver status Erro no estado do calculador - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Selecione uma aresta do esboço. - + Select only edges from the sketch. Selecione somente arestas do esboço. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Erro - + Unexpected error. More information may be available in the Report View. Erro inesperado. Mais informações podem estar disponíveis na Visualização do Relatório. - + Endpoint to endpoint tangency was applied instead. Uma tangência de ponto a ponto de extremidade foi aplicada como alternativa. - + Select two or more points from the sketch. Selecione dois ou mais pontos no esboço. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Selecione exatamente uma linha ou uma linha e um ponto ou dois pontos do esboço. - + Cannot add a length constraint on an axis! Não é possível adicionar uma restrição de comprimento num eixo! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Selecione as coisas corretas no esboço. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nenhum dos pontos selecionados foi restringido para as respectivas curvas, eles são partes do mesmo elemento, ou são ambos geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Selecione exatamente uma linha ou até dois pontos do esboço. - + Cannot add a horizontal length constraint on an axis! Não é possível adicionar uma restrição de comprimento horizontal num eixo! - + Cannot add a fixed x-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-x fixa no ponto de origem! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Não é possível adicionar uma restrição de comprimento vertical a um eixo! - + Cannot add a fixed y-coordinate constraint on the origin point! Não é possível adicionar uma restrição de coordenada-y fixa no ponto de origem! - + Select two or more lines from the sketch. Selecione duas ou mais linhas do esboço. - - + + Select at least two lines from the sketch. Selecione pelo menos duas linhas do esboço. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2914,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. perpendicular constraint Selecione alguma geometria do esboço (sketch). - - + + Cannot add a perpendicularity constraint at an unconnected point! Não é possível adicionar uma restrição de perpendicularidade num ponto não conectado! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular à aresta da Bspline atualmente sem suporte. - - + + One of the selected edges should be a line. Uma das arestas selecionadas deve ser uma linha. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uma tangência de ponto a ponto foi aplicada. A restrição de coincidência foi excluída. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2959,182 +2952,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois pontos de extremidade; duas curvas e um ponto. - + Select some geometry from the sketch. tangent constraint Selecione alguma geometria do esboço (sketch). - - - + + + Cannot add a tangency constraint at an unconnected point! Não é possível adicionar uma restrição de tangência num ponto não conectado! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Número errado de objetos selecionados! - - + + With 3 objects, there must be 2 curves and 1 point. Com 3 objetos, deve haver 2 curvas e 1 ponto. - - - + + + Tangency to B-spline edge currently unsupported. Tangência à aresta da Bspline atualmente sem suporte. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selecione um ou mais arcos ou círculos no esboço. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Restrição só aplicável a arcos ou círculos. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selecione uma ou duas linhas de desenho (sketch). Ou selecione um ponto e duas arestas. - - + + Parallel lines Linhas paralelas - - + + An angle constraint cannot be set for two parallel lines. Uma restrição de ângulo não pode ser aplicada a duas linhas paralelas. - + Cannot add an angle constraint on an axis! Não é possível adicionar uma restrição de ângulo num eixo! - + Select two edges from the sketch. Selecione duas arestas do esboço. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Igualdade para aresta da Bspline atualmente sem suporte. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selecione dois pontos e uma linha de simetria, dois pontos e um ponto de simetria ou uma linha e um ponto de simetria do esboço. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Não é possível adicionar uma restrição de simetria entre uma linha e seus pontos extremos! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Objetos selecionados não são geometria de apenas um esboço (sketch). - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. @@ -3633,12 +3626,12 @@ Combinações possíveis: duas curvas; um ponto de extremidade e uma curva; dois Comprimento: - + Refractive index ratio Rácio do índice de refração - + Ratio n2/n1: Rácio n2/n1: @@ -5230,112 +5223,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Editar Esboço - + A dialog is already open in the task panel Já está aberta uma janela no painel de tarefas - + Do you want to close this dialog? Deseja fechar esta janela? - + Invalid sketch Esboço (sketch) inválido - + Do you want to open the sketch validation tool? Quer abrir a ferramenta de validação de esboço? - + The sketch is invalid and cannot be edited. O esboço é inválido e não pode ser editado. - + Please remove the following constraint: Por favor, remova a seguinte restrição: - + Please remove at least one of the following constraints: Por favor remova pelo menos uma das seguintes restrições: - + Please remove the following redundant constraint: Por favor, remova a seguinte restrição redundante: - + Please remove the following redundant constraints: Por favor, remova a seguinte restrição redundante: - + The following constraint is partially redundant: The following constraint is partially redundant: - + The following constraints are partially redundant: The following constraints are partially redundant: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch Esboço vazio - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) @@ -5343,7 +5336,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fully constrained @@ -5441,8 +5434,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixar o diâmetro de um círculo ou arco @@ -5450,7 +5443,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5458,20 +5452,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Corrigir o raio de um círculo ou arco - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc - - Sketcher_Copy @@ -6087,7 +6073,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more and %1 more @@ -6310,7 +6296,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6321,7 +6307,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6346,7 +6332,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6369,13 +6355,13 @@ The grid spacing change if it becomes smaller than this number of pixel.A restrição tem informações de índice inválidas e está formatada incorretamente. - - - - - - - + + + + + + + @@ -6386,7 +6372,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Falha ao adicionar arco @@ -6500,7 +6486,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Falha ao adicionar caixa - + Failed to add rounded rectangle Falha ao adicionar retângulo arredondado @@ -6682,17 +6668,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensão - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6712,14 +6698,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimensão - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Restringir o raio + + + + Fix the radius of a circle or an arc + Corrigir o raio de um círculo ou arco + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts index 954f1bfdc4..3daf49018d 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ro.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Constrânge un arc de cerc sau un cerc - + Constrain an arc or a circle Constrânge un arc de cerc sau un cerc - + Constrain radius Rază constrânsă - + Constrain diameter Constrângere diametru - + Constrain auto radius/diameter Constrângere automată radius/diametru @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Unghi constrans - + Fix the angle of a line or the angle between two lines Repară unghiul unei drepte sau unghiul dintre două linii @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Bloc: Constrângere - + Block the selected edge from moving Blochează muchia selectată să se miște @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Constrângere coincidentă - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Creează o constrângere între puncte, sau o constrângere concentrată între cercuri, arcuri și elipse @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Constrângere diametru - + Fix the diameter of a circle or an arc Fixează diametrul unui cerc sau arc de cerc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Distanţă constrânsă - + Fix a length of a line or the distance between a line and a vertex or between two circles Repară lungimea unei linii sau distanța dintre o linie și un nod sau între două cercuri @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrânge distanța orizontală - + Fix the horizontal distance between two points or line ends Bate în cuie distanţa orizontală dintre doua puncte sau capete de linii @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrângere distanţă verticală - + Fix the vertical distance between two points or line ends Bate în cuie distanţa verticală dintre două puncte sau capete de linie @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Egalitate constransă - + Create an equality constraint between two lines or between circles and arcs Crează o egalitate constrânsă între două linii, cercuri sau arce @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Constrângere orizontală - + Create a horizontal constraint on the selected item Crează o constrângere orizontală pentru obiectul selectat @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Constrângere fixă - + Create both a horizontal and a vertical distance constraint on the selected vertex Creați atât o constrângere de distanță orizontală, cât și una verticală @@ -520,12 +520,12 @@ pe vârful selectat CmdSketcherConstrainParallel - + Constrain parallel Constrângere paralelă - + Create a parallel constraint between two lines Crează o constrângere paralelă între două linii @@ -533,12 +533,12 @@ pe vârful selectat CmdSketcherConstrainPerpendicular - + Constrain perpendicular Constrângere perpendiculară - + Create a perpendicular constraint between two lines Crează o constrângere perpendiculară între două linii @@ -546,12 +546,12 @@ pe vârful selectat CmdSketcherConstrainPointOnObject - + Constrain point onto object Constrânge punct pe obiect - + Fix a point onto an object Fixează un punct de un obiect @@ -559,38 +559,25 @@ pe vârful selectat CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrângere automată radius/diametru - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Repară diametrul dacă este ales un cerc sau raza dacă este ales un stâlp ar/splină - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Raza de constrângere sau greutatea - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Repară raza unui cerc sau a unui arc sau fixează greutatea unui stâlp de B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Creați o constrângere de lege de refracție (Legea lui Snell) între două puncte finale ale razelor @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Constrângere simetrică - + Create a symmetry constraint between two points with respect to a line or a third point Creați o constrângere de simetrie între două puncte @@ -615,12 +602,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherConstrainTangent - + Constrain tangent Constrângere tangentă - + Create a tangent constraint between two entities Crează o constrângere tangentă între două entităţi @@ -628,12 +615,12 @@ cu privire la o linie sau un al treilea punct CmdSketcherConstrainVertical - + Constrain vertically Constrângere verticală - + Create a vertical constraint on the selected item Crează o constrângere verticală pe obiectul selectat @@ -1492,12 +1479,12 @@ Acest lucru va șterge proprietatea 'Support', dacă este cazul. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activează/Dezactivează constrângerea - + Activates or deactivates the selected constraints Activează sau dezactivează constrângerile selectate @@ -1518,12 +1505,12 @@ Acest lucru va șterge proprietatea 'Support', dacă este cazul. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Comută constrângerea de condus/referință - + Set the toolbar, or the selected constraints, into driving or reference mode Setează bara de instrumente sau constrângerile selectate, @@ -1597,370 +1584,376 @@ constrângeri nevalide, geometrie degenerată, etc. Command - - + + Add horizontal constraint Adaugă o constrângere orizontală - - - + + + Add horizontal alignment Adaugă aliniere orizontală - - + + Add vertical constraint Adaugă constrângere verticală - + Add vertical alignment Adaugă aliniere verticală - + Add 'Lock' constraint Adaugă constrângere 'Blocare' - + Add relative 'Lock' constraint Adaugă constrângere 'Blocare' - + Add fixed constraint Adaugă o constrângere fixă - + Add 'Block' constraint Adaugă constrângere 'Blocare' - + Add block constraint Adaugă constrângere 'Blocare' - - - + + + Add coincident constraint Adaugă constrângere de coincident - - + + Add distance from horizontal axis constraint Adăugați distanța de la constrângerea axei orizontale - - + + Add distance from vertical axis constraint Adăugați distanța față de constrângerea axei verticale - - + + Add point to point distance constraint Adăugați o constrângere de distanță punct la punct - - - + + + Add point to line Distance constraint Adăugați punct la linie Constrângere de distanță - - + + Add circle to circle distance constraint Adăugați restricție de distanță cerc la cerc - + Add circle to line distance constraint Adăugați cerc la constrângere de distanță pe linie - - - - - - + + + + + + Add length constraint Adăugați o constrângere de lungime - - + + + Dimension Dimensiune - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Adăugați punct asupra constrângerii obiectului - - + + Add point to point horizontal distance constraint Adăugați constrângere de distanță orizontală punct la punct - + Add fixed x-coordinate constraint Adaugă o constrângere fixă la coordonatele x - - + + Add point to point vertical distance constraint Adaugă punct la punctul de distanță verticală constrângere - + Add fixed y-coordinate constraint Adaugă o constrângere fixă la coordonatele y - - + + Add parallel constraint Adaugă o constrângere paralelă - - - - - - - + + + + + + + Add perpendicular constraint Adaugă constrângere perpendiculară - + Add perpendicularity constraint Adaugă constrângere perpendiculară - + Swap coincident+tangency with ptp tangency Schimbă coincidentul+tangență cu tangență ptp - + Swap PointOnObject+tangency with point to curve tangency Schimbă PointOnObject+tangență cu tangență în curbă - - - - - - - + + + + + + + Add tangent constraint Adaugă constrângere tangentă - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Adaugă punct tangent de constrângere - - - - + + + + Add radius constraint Adaugă constrângere rază - - - - + + + + Add diameter constraint Adaugă o constrângere pentru diametru - - - - + + + + Add radiam constraint Adaugă constrângere de rază - - - - - - + + + + + + Add angle constraint Adaugă o constrângere de unghi - - + + Add equality constraint Adaugă constrângere pentru egalitate - - - - - + + + + + Add symmetric constraint Adaugă constrângere simetrică - + Add Snell's law constraint Adaugă constrângere legii lui Snell - + Toggle constraint to driving/reference Comută constrângerea pentru condus/referință - + Activate/Deactivate constraint Activează/Dezactivează constrângerea @@ -2036,7 +2029,7 @@ constrângeri nevalide, geometrie degenerată, etc. - + Add sketch arc Adaugă arc de schiță @@ -2287,59 +2280,59 @@ constrângeri nevalide, geometrie degenerată, etc. Eroare de autoconstrângere: schiță nerezolvabilă după aplicarea constrângerilor de egalitate. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Nu puteți ghici intersecția curbelor. Încercați să adăugați o constrângere de potrivire între vârfurile curbelor pe care intenționați să le completați. - - + + BSpline Geometry Index (GeoID) is out of bounds. Indicele de geometrie BSpline (GeoID) nu este în limite maxime. - + You are requesting no change in knot multiplicity. Nu cereți nicio schimbare în multiplicitatea nodului. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Indicele de geometrie (GeoId) furnizat nu este o curbă B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Indexul nod este în afara limitelor. Reţineţi că în conformitate cu notaţia OCC, primul nod are indexul 1 şi nu zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. Multiplicitatea nu poate fi crescută dincolo de gradul curbei B-spline. - + The multiplicity cannot be decreased beyond zero. Multiplicitatea nu poate fi diminuată sub zero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC este în imposibilitatea de a reduce multiplicarea în limitele toleranței maxime. - + Knot cannot have zero multiplicity. Nu poate avea multiplicitate zero. - + Knot multiplicity cannot be higher than the degree of the BSpline. Multiplicitatea nodului nu poate fi mai mare decât gradul BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Nu se poate insera un nod în afara intervalului parametrului BSpline. @@ -2407,134 +2400,134 @@ constrângeri nevalide, geometrie degenerată, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ constrângeri nevalide, geometrie degenerată, etc. Constrângere dimensională - + Cannot add a constraint between two external geometries. Nu se poate adăuga o constrângere între două geometrii externe. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nu se poate adăuga o constrângere între două geometrii fixe. Geometriile fixe includ geometrii externe, geometriei blocate și puncte speciale cum ar fi puncte de nod B-spline. - + Sketcher Constraint Substitution Constrângere Schiță Substituție - + Keep notifying me of constraint substitutions Continuă să mă notifici cu privire la substituțiile constrângerilor - - - + + + Only sketch and its support are allowed to be selected. Doar schița și suportul său sunt permise pentru a fi selectate. - + One of the selected has to be on the sketch. Una dintre cele selectate trebuie să fie pe schiță. - - + + Select an edge from the sketch. Selectati o margine din schita. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Constrangere imposibila - - - - + + + + The selected edge is not a line segment. Marginea selectată nu este un segment de linie. - - - - - - + + + + + + Double constraint Constrangere dubla - - - - - + + + + + The selected edge already has a horizontal constraint! Marginea selectată are deja o constrângere orizontală! - - - + + + The selected edge already has a vertical constraint! Marginea selectată are deja o constrângere verticală! - - - - - - + + + + + + The selected edge already has a Block constraint! Marginea selectată are deja o constrângere de bloc! - + The selected item(s) can't accept a horizontal constraint! Obiectele selectate nu accepta o constrangere orizontala! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Există mai mult de un punct fix selectat. Selectați maxim un punct fix! - + The selected item(s) can't accept a vertical constraint! Obiectele selectate nu accepta o constrangere verticala! - - - + + + Select vertices from the sketch. Selectează nodurile din Schiță. - + Select one vertex from the sketch other than the origin. Selectează un nod din schiţa altul decât originea. - + Select only vertices from the sketch. The last selected vertex may be the origin. Selectaţi doar nodurile din schiță. Ultimul punct selectat poate fi originea. - + Wrong solver status Status de greşit ak Rezolvitor - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. O constrângere de blocare nu poate fi adăugată dacă schița nu este rezolvată sau există constrângeri redundante și contradictorii. - + Select one edge from the sketch. Selectaţi o margine din Schiță. - + Select only edges from the sketch. Selectaţi o margine din Schiță. - + Number of selected objects is not 3 Numărul de obiecte selectate nu este 3 - + Error Eroare - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Punct final la punctul final de tangenţă a fost aplicat în schimb. - + Select two or more points from the sketch. Selectaţi două sau mai multe puncte din schita. - + Select two or more vertices from the sketch. Selectaţi două sau mai multe noduri din schiţă. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selectați două sau mai multe noduri din schiță pentru o constrângere de coincident, sau două sau mai multe cercuri, elipsuri, arcuri sau arcuri de elipsă pentru o constrângere concentrată. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Selectaţi două vârfuri din schiţă pentru o constrângere de incident, sau două cercuri, elipse, arcuri sau arcuri de elipsă pentru o constrângere concentrată. - + Select exactly one line or one point and one line or two points from the sketch. Selectati exact o linie sau un punct si o linie sau două puncte din schita. - + Cannot add a length constraint on an axis! Nu se poate adauga o constrangere de lungime pentru o axa! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Selectaţi exact o linie sau un punct şi o linie sau două puncte sau două cercuri din schiţă. - + This constraint does not make sense for non-linear curves. Această constrângere nu are sens pentru curbe neliniare. - + Endpoint to edge tangency was applied instead. Tangența la margine a fost aplicată în schimb. - - - - - - - + + + + + + + Select the right things from the sketch. Selectaţi lucruri corecte din schiță. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Selectaţi o muchie care nu este o greutate B-spline. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Niciunul dintre punctele selectate nu a fost constrâns pe curbele respective, deoarece acestea sunt părți ale aceluiași element, pentru că sunt atât geometrie externă, cât şi pentru că marginea nu este eligibilă. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nici unul dintre punctele selectate nu trece prin curbele respective, sau pentru că ele fac parte din același element sau pentru că ele sunt amândouă exterioare din punct de vedere geometric. - - - - + + + + Select exactly one line or up to two points from the sketch. Selectati exact o linie sau maxim doua puncte din schita. - + Cannot add a horizontal length constraint on an axis! Nu se poate adauga o constrangere de lungime orizontala pentru o axa! - + Cannot add a fixed x-coordinate constraint on the origin point! Nu se poate adăuga o constrângere fixă la coordonatele x pe punctul de origine! - - + + This constraint only makes sense on a line segment or a pair of points. Această constrângere are sens doar pe un segment de linie sau pe o pereche de puncte. - + Cannot add a vertical length constraint on an axis! Nu se poate adauga o constrangere verticala pentru o axa! - + Cannot add a fixed y-coordinate constraint on the origin point! Nu se poate adăuga o constrângere fixă la coordonatele y pe punctul de origine! - + Select two or more lines from the sketch. Selectati doua sau mai multe linii din schita. - - + + Select at least two lines from the sketch. Selectati cel putin doua linii din schita. - + Select a valid line. Selectați o linie validă. - - + + The selected edge is not a valid line. Marginea selectată nu este o linie validă. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2913,42 +2906,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Se acceptă combinațiile: două curbe; un punct extrem şi o curbă; două puncte extreme; două curbe şi un punct. - + Select some geometry from the sketch. perpendicular constraint Selectaţi o geometrie din schiță. - - + + Cannot add a perpendicularity constraint at an unconnected point! Nu pot adauga o constrângere perpendiculară pentru un punct neconectat! - - - + + + Perpendicular to B-spline edge currently unsupported. Perpendicular pe marginea B-spline neacceptată în prezent. - - + + One of the selected edges should be a line. Una dintre marginile selectate trebuie sa fie o linie. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Punct final la punctul final de tangenţă a fost aplicat. Coincident restricţia a fost şters. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. A fost aplicat punctul final de la margine tangenței. Punctul de pe obiect a fost șters. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,182 +2949,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Există un număr de moduri în care se poate aplica această constrângere. Se accepta combinațiile: două curbe; un punct extrem şi o curbă; două puncte extreme; două curbe şi un punct. - + Select some geometry from the sketch. tangent constraint Selectaţi o geometrie din schiță. - - - + + + Cannot add a tangency constraint at an unconnected point! Nu pot adauga constrângere tangenţială pentru un punct neconectat! - - + + Tangent constraint at B-spline knot is only supported with lines! Constrângerea tangentă la nodul B-spline este suportată doar cu linii! - + B-spline knot to endpoint tangency was applied instead. Tangenţa B-spline până la final a fost aplicată. - + Select either one point and several curves, or one curve and several points. Selectaţi fie un punct şi mai multe curbe, fie o curbă şi mai multe puncte. - - + + Wrong number of selected objects! Număr greșit al obiectelor selectate! - - + + With 3 objects, there must be 2 curves and 1 point. Cu 3 obiecte, trebuie să existe 2 curbe și un punct. - - - + + + Tangency to B-spline edge currently unsupported. Tangenţă la marginea B-spline neacceptată în prezent. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Selectaţi doar un arc sau un cerc din schiţă. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Selectaţi fie unul sau mai mulţi poli B-Spline sau doar unul sau mai multe arcuri sau cercuri din schiţă, dar nu amestecate. - - - + + + Constraint only applies to arcs or circles. Restricţia se aplică numai pentru arce de cerc sau cercuri. - - + + Select one or two lines from the sketch. Or select two edges and a point. Selectaţi una sau două linii din schiță, sau selectaţi două margini şi un punct. - - + + Parallel lines Linii paralele - - + + An angle constraint cannot be set for two parallel lines. O constrângere unghiulară nu poate fi aplicată la două linii paralele. - + Cannot add an angle constraint on an axis! Nu pot adăuga o constrângere de unghi pe o axă! - + Select two edges from the sketch. Selectaţi două margini din schiţă. - + Select two or more compatible edges. Selectaţi două sau mai multe margini compatibile. - + Sketch axes cannot be used in equality constraints. Axele schiţei nu pot fi folosite în constrângerile de egalitate. - + Equality for B-spline edge currently unsupported. Egalitate pentru muchiile curbelor B-spline, în prezent, nu sunt suportate. - - - - + + + + Select two or more edges of similar type. Selectaţi două sau mai multe margini de tip similar. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Selectaţi două puncte şi o linie de simetrie, două puncte şi un punct de simetrie sau o linie si un punct de simetrie din schiță. - - + + Cannot add a symmetry constraint between a line and its end points. Nu se poate adăuga o constrângere de simetrie între o linie și punctele sale de sfârșit. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nu se poate adăuga o constrângere de simetrie între o linie şi punctele ei de capăt! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Selectaţi două puncte finale ale liniilor pentru a acţiona ca raze, şi o margine reprezentând o limită. Primul punct selectat corespunde indicelui n1, secundă la n2, iar valoarea de referință setează raportul n2/n1. - + Selected objects are not just geometry from one sketch. Obiectele selectate nu sunt geometria doar unui sketch. - + Cannot create constraint with external geometry only. Nu se poate crea constrângere doar cu geometrie externă. - + Incompatible geometry is selected. Geometria incompatibilă este selectată. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw pe marginea curbei B-spline este în prezent neacceptat. - - - - - + + + + + Select constraints from the sketch. Selectează constrângerile din schiță. @@ -3631,12 +3624,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Lungime: - + Refractive index ratio Procentul indicelui de refracție - + Ratio n2/n1: Raportul n2/n1: @@ -5226,112 +5219,112 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi SketcherGui::ViewProviderSketch - + Edit sketch Editaţi schiţa - + A dialog is already open in the task panel O fereastră de dialog este deja deschisă în fereastra de sarcini - + Do you want to close this dialog? Doriţi să închideţi această fereastră de dialog? - + Invalid sketch Schiță nevalidă - + Do you want to open the sketch validation tool? Doriți să să deschideți scula de validare a schiței? - + The sketch is invalid and cannot be edited. Schița nu este validă și nu poate fi editată. - + Please remove the following constraint: Înlătură urmatoarea constrângere: - + Please remove at least one of the following constraints: Înlaturaţi cel puţin una din urmatoarele constrângeri: - + Please remove the following redundant constraint: Înlăturaţi urmatoarele constrângeri redundante: - + Please remove the following redundant constraints: Înlăturaţi urmatoarele constrângeri redundante: - + The following constraint is partially redundant: Următoarea constrângere este parțial redundantă: - + The following constraints are partially redundant: Următoarele constrângeri sunt parțial redundante: - + Please remove the following malformed constraint: Eliminați următoarele constrângeri informate: - + Please remove the following malformed constraints: Eliminați următoarele constrângeri informate: - + Empty sketch Schita goala - + Over-constrained: Supraconstrânse: - + Malformed constraints: Constrângeri incorecte: - + Redundant constraints: Constrângeri redundante: - + Partially redundant: Parţial redundant: - + Solver failed to converge Rezolvitorul nu a putut converge - + Under constrained: Sub constrângeri: - + %n DoF(s) %n ore @@ -5340,7 +5333,7 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi - + Fully constrained Complet constrâns @@ -5438,8 +5431,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixează diametrul unui cerc sau arc de cerc @@ -5447,7 +5440,8 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Repară raza/diametrul unui cerc sau al unui arc @@ -5455,20 +5449,12 @@ Acest lucru se realizează prin analizarea geometrelor și constrângerilor schi Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixează raza unui cerc sau arc - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Repară raza/diametrul unui cerc sau al unui arc - - Sketcher_Copy @@ -6084,7 +6070,7 @@ Algoritmul QR Eigen Sparse este optimizat pentru matrici dispersați; de obicei ViewProviderSketch - + and %1 more și încă %1 @@ -6307,7 +6293,7 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Schița are constrângeri parțial redundante! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolele au fost migrate. Fișierele migrate nu vor fi deschise în versiunile anterioare de FreeCAD! @@ -6318,7 +6304,7 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel - + @@ -6343,7 +6329,7 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel - + @@ -6366,13 +6352,13 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6383,7 +6369,7 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel - + Failed to add arc Failed to add arc @@ -6497,7 +6483,7 @@ Schimbarea spațierii grilei dacă devine mai mică decât acest număr de pixel Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6679,17 +6665,17 @@ Punctele trebuie să fie mai apropiate de o cincime din spațierea grilei de o l CmdSketcherDimension - + Dimension Dimensiune - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6709,14 +6695,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimensiune - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Rază constrânsă + + + + Fix the radius of a circle or an arc + Fixează raza unui cerc sau arc + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts index 4635a394e7..856fbfbebe 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_ru.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ограничение дуги или окружности - + Constrain an arc or a circle Ограничение дуги или окружности - + Constrain radius Ограничение радиуса - + Constrain diameter Ограничение диаметра - + Constrain auto radius/diameter Ограничение радиуса/диаметра автоматически @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ограничение угла - + Fix the angle of a line or the angle between two lines Фиксировать угол отрезка или угол между двумя отрезками @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Ограничение перемещения - + Block the selected edge from moving Блокировать выбранный край от перемещения @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ограничение наложения точек - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Создать ограничение совпадения между точками или ограничение концентричности между кругами, дугами и эллипсами @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ограничение диаметра - + Fix the diameter of a circle or an arc Задать диаметр окружности или дуги @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ограничение расстояния - + Fix a length of a line or the distance between a line and a vertex or between two circles Исправить длину линии или расстояние между линией и вершиной или между двумя кругами @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ограничение расстояния по горизонтали - + Fix the horizontal distance between two points or line ends Фиксировать расстояние по горизонтали между двумя точками или концами отрезка @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ограничение расстояния по вертикали - + Fix the vertical distance between two points or line ends Фиксировать расстояние по вертикали между двумя точками или концами отрезка @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ограничение эквивалентностью - + Create an equality constraint between two lines or between circles and arcs Создать ограничение равенства между двумя отрезками или между окружностями и дугами @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ограничение горизонтальности - + Create a horizontal constraint on the selected item Создать ограничение горизонтальности для выбранных линий @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Ограничение положения - + Create both a horizontal and a vertical distance constraint on the selected vertex Создать ограничение расстояния горизонтального и вертикального расстояния @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Ограничение параллельности - + Create a parallel constraint between two lines Создать ограничение параллельности между двумя линиями @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ограничение перпендикулярности - + Create a perpendicular constraint between two lines Создать ограничение перпендикулярности между двумя линиями @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Ограничить точку на объекте - + Fix a point onto an object Привязать точку к объекту @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Ограничение радиуса/диаметра автоматически - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Назначает диаметр, если выбран круг или радиус, если выбран полюс дуга/сплайн - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Ограничение радиуса или веса - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Зафиксировать радиус окружности или дуги или зафиксировать вес полюса В-сплайна - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ограничение преломления (закон Снеллиуса) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Создать ограничение по закону преломления света (закон Снеллиуса) между двумя конечными точками лучей и отрезком в качестве границы раздела сред. @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ограничение симметричности - + Create a symmetry constraint between two points with respect to a line or a third point Создать ограничение симметрии между двумя точками относительно линии или третьей точки @@ -613,12 +600,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Ограничение касательности - + Create a tangent constraint between two entities Создать ограничение касательности между двумя объектами @@ -626,12 +613,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Ограничение вертикальности - + Create a vertical constraint on the selected item Создать ограничение вертикальности для выделенных линий @@ -1488,12 +1475,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Вкл/выкл ограничение - + Activates or deactivates the selected constraints Вкл/выкл выбранные ограничения @@ -1514,12 +1501,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Переключить ограничения в построительные/основные - + Set the toolbar, or the selected constraints, into driving or reference mode Переключает панель инструментов или преобразует выбранные ограничения, в режим построительной/основной геометрии @@ -1592,370 +1579,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Добавить ограничение по горизонтали - - - + + + Add horizontal alignment Добавить горизонтальное выравнивание - - + + Add vertical constraint Добавить ограничение по вертикали - + Add vertical alignment Добавить вертикальное выравнивание - + Add 'Lock' constraint Добавить 'Блокирующее' ограничение - + Add relative 'Lock' constraint Добавить относительное ограничение 'Блокировка' - + Add fixed constraint Добавить фиксированное ограничение - + Add 'Block' constraint Добавить ограничение 'Блок' - + Add block constraint Добавить ограничение блока - - - + + + Add coincident constraint Добавить ограничение совпадения - - + + Add distance from horizontal axis constraint Добавить ограничение расстояния от горизонтальной оси - - + + Add distance from vertical axis constraint Добавить ограничение расстояния от вертикальной оси - - + + Add point to point distance constraint Добавить точку к ограничению расстояния до точки - - - + + + Add point to line Distance constraint Добавить точку к ограничению расстояния до линии - - + + Add circle to circle distance constraint Добавить круг к ограничениям расстояния круга - + Add circle to line distance constraint Добавить круг к ограниченияю линейного расстояния - - - - - - + + + + + + Add length constraint Добавить ограничение длины - - + + + Dimension Размер - + Add lock constraint Добавить ограничение блокировки - + Add 'Distance to origin' constraint Добавить ограничение "Расстояние до базовой точки" - - - + + + Add Distance constraint Добавить ограничение по расстоянию - - - + + + Add 'Horizontal' constraints Добавить ограничение "горизонтальность" - - - + + + Add 'Vertical' constraints Добавить ограничение "вертикальность" - - + + Add Symmetry constraint Добавить ограничение симметричности - - + + Add Symmetry constraints Добавить ограничения симметричности - - + + Add Distance constraints Добавить ограничения по расстоянию - + Add Horizontal constraint Добавить ограничение "горизонтальность" - + Add Vertical constraint Добавить ограничение "вертикальность" - + Add Block constraint Добавить ограничение "блокировка" - + Add Angle constraint Добавить ограничение угла - - - - + + + + Add Equality constraint Добавить ограничение равенства - + Add Equality constraints Добавить ограничения равенства - + Add Radius constraint Добавить ограничение радиуса - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Добавить ограничения концентричность и равенство длины - + Add DistanceX constraint Добавить ограничение расстояния по X - + Add DistanceY constraint Добавить ограничение расстояния по Y - + Add point to circle Distance constraint Добавить точку в Ограничение расстояния круга - - + + Add point on object constraint Добавить точку на ограничение объекта - - + + Add point to point horizontal distance constraint Добавить точку к ограничению расстояния по горизонтали - + Add fixed x-coordinate constraint Добавить фиксированное ограничение X-координаты - - + + Add point to point vertical distance constraint Добавить точку к ограничению расстояния по вертикали - + Add fixed y-coordinate constraint Добавить фиксированное ограничение Y-координаты - - + + Add parallel constraint Добавить ограничение параллельности - - - - - - - + + + + + + + Add perpendicular constraint Добавить ограничение перпендикулярности - + Add perpendicularity constraint Добавить ограничение перпендикулярности - + Swap coincident+tangency with ptp tangency Поменять совпадение + касание на ptp касание - + Swap PointOnObject+tangency with point to curve tangency Поменять точка на объекте + касательная на касательную к кривой - - - - - - - + + + + + + + Add tangent constraint Добавить касательное ограничение - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Добавить точку касательного ограничения - - - - + + + + Add radius constraint Добавить ограничение радиуса - - - - + + + + Add diameter constraint Добавить ограничение диаметра - - - - + + + + Add radiam constraint Добавить ограничение радиуса - - - - - - + + + + + + Add angle constraint Добавить ограничение угла - - + + Add equality constraint Добавить ограничение равенства - - - - - + + + + + Add symmetric constraint Добавить ограничение симметричности - + Add Snell's law constraint Добавить ограничение по закону Снеллиуса - + Toggle constraint to driving/reference Переключить ограничения в построительные/основные - + Activate/Deactivate constraint Вкл/выкл ограничение @@ -2031,7 +2024,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Добавить эскиз дуги @@ -2282,59 +2275,59 @@ invalid constraints, degenerated geometry, etc. Ошибка автоограничения: Эскиз нерешаем после добавлении ограничения равенства. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Не удалось рассчитать пересечение кривых. Попробуйте добавить ограничение совпадения между вершинами кривых, которые вы намерены скруглить. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline идентификатор геометрии (GeoID) находится вне границ. - + You are requesting no change in knot multiplicity. Вы не запрашиваете никаких изменений в множественности узлов. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Идентификатор геометрии (GeoId) не является B-сплайн кривой. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Индекс узла выходит за границы. Обратите внимание, что в соответствии с нотацией OCC первый узел имеет индекс 1, а не ноль. - + The multiplicity cannot be increased beyond the degree of the B-spline. Кратность не может быть увеличена сверх степени B-сплайна. - + The multiplicity cannot be decreased beyond zero. Кратность не может быть уменьшена ниже нуля. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC неспособен уменьшить кратность в пределах максимального допуска. - + Knot cannot have zero multiplicity. Узел не может иметь нулевой кратности. - + Knot multiplicity cannot be higher than the degree of the BSpline. Кратность узла не может быть выше степени BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Узел не может быть вставлен за пределы диапазона параметров BSpline. @@ -2402,134 +2395,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2577,329 +2570,329 @@ invalid constraints, degenerated geometry, etc. Размерное ограничение - + Cannot add a constraint between two external geometries. Невозможно добавить ограничение между двумя внешними геометриями. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Невозможно добавить ограничение между двумя фиксированными геометриями. Фиксированная геометрия включает в себя внешнюю геометрию, заблокированную геометрию или специальные точки в качестве точек узла B-сплайна. - + Sketcher Constraint Substitution Замена ограничения эскиза - + Keep notifying me of constraint substitutions Продолжайте уведомлять меня о заменах ограничений - - - + + + Only sketch and its support are allowed to be selected. Только эскиз и его поддержка разрешены. - + One of the selected has to be on the sketch. Один из выбранных должен находиться на эскизе. - - + + Select an edge from the sketch. Выбирите ребро в эскизе. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Ограничение невозможно - - - - + + + + The selected edge is not a line segment. Выбранное ребро не является сегментом линии. - - - - - - + + + + + + Double constraint Избыточное ограничение - - - - - + + + + + The selected edge already has a horizontal constraint! Выбранная линия уже имеет ограничение горизонтальности! - - - + + + The selected edge already has a vertical constraint! Выбранная линия уже имеет ограничение вертикальности! - - - - - - + + + + + + The selected edge already has a Block constraint! Выбранная линия уже имеет Блочное ограничение! - + The selected item(s) can't accept a horizontal constraint! На выбранные элемент(ы) нельзя наложить ограничение горизонтальности! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Выбрано несколько фиксированных точек. Выберите максимум одну фиксированную точку! - + The selected item(s) can't accept a vertical constraint! На выбранные элемент(ы) нельзя наложить ограничение вертикальности! - - - + + + Select vertices from the sketch. Выберите вершины из эскиза. - + Select one vertex from the sketch other than the origin. Выберите одну вершину из эскиза, кроме начальной. - + Select only vertices from the sketch. The last selected vertex may be the origin. Выберите только вершины из эскиза. Последняя выбранная вершина может быть начальной. - + Wrong solver status Неправильный статус решателя - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Блокирующее ограничение не может быть добавлено, если эскиз не решаем или имеются избыточные или конфликтующие ограничения. - + Select one edge from the sketch. Выберите одну линию из эскиза. - + Select only edges from the sketch. Выберите линии из эскиза. - + Number of selected objects is not 3 Количество выбранных объектов не 3 - + Error Ошибка - + Unexpected error. More information may be available in the Report View. Неожиданная ошибка. Дополнительные сведения могут быть доступны в представлении отчета. - + Endpoint to endpoint tangency was applied instead. Вместо конечной точки применена касательная. - + Select two or more points from the sketch. Выберите две или более точек на эскизе. - + Select two or more vertices from the sketch. Выберите не менее двух вершин на эскизе. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Выберите две или более вершины из эскиза для ограничения совпадения, или два или более кругов, эллипсов, дуг или дуг эллипса для концентрационного ограничения. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Выберите две вершины из эскиза для ограничения совпадения, или два круга, эллипса, дуги или дуги эллипса для ограничения концентрации. - + Select exactly one line or one point and one line or two points from the sketch. Выделите либо один отрезок, либо точку и отрезок, либо две точки. - + Cannot add a length constraint on an axis! Нельзя наложить ограничение длины на ось! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Выделить ровно одну линию или одну точку и одну линию или две точки или два круга из эскиза. - + This constraint does not make sense for non-linear curves. Это ограничение не имеет смысла для нелинейных кривых. - + Endpoint to edge tangency was applied instead. Вместо этого было применено касание конечной точки к краю. - - - - - - - + + + + + + + Select the right things from the sketch. Выберите нужные объекты из эскиза. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Выберите край, который не является B-сплайном. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ни одна из выбранных точек не была ограничена на соответствующие кривые, поскольку они являются частями одного и того же элемента, потому что они и внешняя геометрия, или потому, что край не является допустимым. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ни одна из выбранных точек не была ограничена соответствующими кривыми либо потому, что они являются частями одного и того же элемента, либо потому, что они являются внешней геометрией. - - - - + + + + Select exactly one line or up to two points from the sketch. Выберите один отрезок или две точки эскиза. - + Cannot add a horizontal length constraint on an axis! Нельзя наложить ограничение длины на ось! - + Cannot add a fixed x-coordinate constraint on the origin point! Невозможно ограничить X-координату точки начала координат! - - + + This constraint only makes sense on a line segment or a pair of points. Это ограничение имеет смысл только для сегмента линии или пары точек. - + Cannot add a vertical length constraint on an axis! Нельзя наложить ограничение длины на ось! - + Cannot add a fixed y-coordinate constraint on the origin point! Невозможно ограничить Y-координату точки начала координат! - + Select two or more lines from the sketch. Выберите два или более отрезков эскиза. - - + + Select at least two lines from the sketch. Нужно выделить как минимум две линии. - + Select a valid line. Выберите правильную линию. - - + + The selected edge is not a valid line. Выделенное ребро некорректно. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2909,42 +2902,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Допустимы следующие комбинации: две кривые; концевая точка и кривая; две концевых точки; две кривых и точка. - + Select some geometry from the sketch. perpendicular constraint Выделите геометрические элементы на эскизе. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не удаётся наложить ограничение перпендикулярности на точку, так как выделенная точка не является концом кривой. - - - + + + Perpendicular to B-spline edge currently unsupported. Перпендикуляр к кромке B-сплайна в настоящее время не поддерживается. - - + + One of the selected edges should be a line. Один из выбранных элементов должен быть линией. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Применена касательность конечной точки к конечной точке. Ограничение совпадения было удалено. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Было применено касание конечной точки к краю. Точка ограничения объекта удалена. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2952,182 +2945,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Существует несколько способов применения этого ограничения. Допустимые комбинации: две кривые; конечная точка и кривая; две конечные точки; две кривые и точка. - + Select some geometry from the sketch. tangent constraint Выделите геометрические элементы на эскизе. - - - + + + Cannot add a tangency constraint at an unconnected point! Не удаётся наложить ограничение касательности на точку, так как выделенная точка не является концом кривой. - - + + Tangent constraint at B-spline knot is only supported with lines! Зависимость касательной в узле B-сплайн поддерживается только линиями! - + B-spline knot to endpoint tangency was applied instead. Вместо этого был применен узел B-сплайна к касанию конечной точки. - + Select either one point and several curves, or one curve and several points. Выберите либо одну точку, либо несколько кривых, либо одну кривую и несколько точек. - - + + Wrong number of selected objects! Неправильное количество выбранных объектов! - - + + With 3 objects, there must be 2 curves and 1 point. С 3 объектами должно быть 2 кривых и 1 точка. - - - + + + Tangency to B-spline edge currently unsupported. Касательность к краю B-сплайна в настоящее время не поддерживается. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Сначала выделите одну или несколько окружностей или дуг окружности из эскиза. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Выберите либо только один или несколько полюсов B-сплайна, либо только одну или несколько дуг или окружностей из эскиза, но не смешивайте их. - - - + + + Constraint only applies to arcs or circles. Ограничение применимо только к дугам или окружностям. - - + + Select one or two lines from the sketch. Or select two edges and a point. Нужно выделить одну линию, или две линии, или две кривые и точку. - - + + Parallel lines Параллельные линии - - + + An angle constraint cannot be set for two parallel lines. Задать ограничение угла между параллельными линиями невозможно. - + Cannot add an angle constraint on an axis! Наложить ограничение угла на ось невозможно! - + Select two edges from the sketch. Выберите два ребра в эскизе. - + Select two or more compatible edges. Выберите совместимые рёбра, два или более. - + Sketch axes cannot be used in equality constraints. Оси эскиза нельзя использовать в ограничениях равенства. - + Equality for B-spline edge currently unsupported. Равенство для края B-сплайна в настоящее время не поддерживается. - - - - + + + + Select two or more edges of similar type. Выберите рёбра аналогичного типа, два или более. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Выделите две точки и линию симметрии, либо две точки и точку симметрии, либо линию и точку симметрии. - - + + Cannot add a symmetry constraint between a line and its end points. Невозможно добавить ограничение симметрии между линией и её конечными точками. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Не удается добавить ограничение симметрии, так как обе точки являются концами линии, задающей ось симметрии. - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Выберите две конечные точки линий, которые будут выступать в качестве лучей, и ребро, представляющее собой границу. Первая выбранная точка соответствует индексу n1, вторая — n2, а значение привязки задает отношение n2/n1. - + Selected objects are not just geometry from one sketch. Выбранные объекты не являются только геометрией из одного эскиза. - + Cannot create constraint with external geometry only. Невозможно создать ограничение с использованием только внешней геометрии. - + Incompatible geometry is selected. Выбрана несовместимая геометрия. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw на кромке B-сплайна в настоящее время не поддерживается. - - - - - + + + + + Select constraints from the sketch. Выделить ограничения в эскизе. @@ -3626,12 +3619,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Длина: - + Refractive index ratio Отношение показателей преломления - + Ratio n2/n1: Отношение n2/n1: @@ -5220,112 +5213,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Редактировать эскиз - + A dialog is already open in the task panel Диалог уже открыт в панели задач - + Do you want to close this dialog? Вы хотите закрыть этот диалог? - + Invalid sketch Эскиз повреждён - + Do you want to open the sketch validation tool? Открыть инструмент проверки наброска? - + The sketch is invalid and cannot be edited. Эскиз содержит ошибки и не может быть изменен. - + Please remove the following constraint: Пожалуйста, удалите следующие ограничения: - + Please remove at least one of the following constraints: Пожалуйста, удалите по крайней мере одно из следующих ограничений: - + Please remove the following redundant constraint: Пожалуйста, удалите следующие избыточные ограничения: - + Please remove the following redundant constraints: Пожалуйста, удалите следующие избыточные ограничения: - + The following constraint is partially redundant: Следующее ограничение частично избыточно: - + The following constraints are partially redundant: Следующие ограничения частично избыточны: - + Please remove the following malformed constraint: Пожалуйста, удалите следующее искаженное ограничение: - + Please remove the following malformed constraints: Пожалуйста, удалите следующие некорректые ограничения: - + Empty sketch Эскиз не содержащий элементов - + Over-constrained: Чрезмерно ограничено: - + Malformed constraints: Неправильные ограничения: - + Redundant constraints: Избыточные ограничения: - + Partially redundant: Частично избыточны: - + Solver failed to converge Решатель не смог сместиться - + Under constrained: Без ограничений: - + %n DoF(s) %n DoF(Степени свободы) @@ -5335,7 +5328,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Полностью ограничен @@ -5433,8 +5426,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Задать диаметр окружности или дуги @@ -5442,7 +5435,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Исправляет радиус/диаметр окружности или дуги @@ -5450,20 +5444,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Зафиксировать радиус окружности или дуги - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Исправляет радиус/диаметр окружности или дуги - - Sketcher_Copy @@ -6078,7 +6064,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more и еще %1 @@ -6301,7 +6287,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Sketch имеет частично избыточные ограничения! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Параболы были перенесены. Перемещенные файлы не будут открыты в предыдущих версиях FreeCAD!! @@ -6312,7 +6298,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6337,12 +6323,12 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Error - Ошибка + Ошибки @@ -6360,13 +6346,13 @@ The grid spacing change if it becomes smaller than this number of pixel.Ограничение имеет неверную индексную информацию и является неправильным. - - - - - - - + + + + + + + @@ -6377,7 +6363,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Не удалось добавить дугу @@ -6491,7 +6477,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Не удалось добавить коробку - + Failed to add rounded rectangle Не удалось добавить округленный прямоугольник @@ -6673,18 +6659,18 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Размер - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Ограничьте контекстуально на основе вашего выбора. -В зависимости от вашего выбора у вас может быть несколько доступных ограничений. Вы можете переключаться между ними, используя клавишу SHIFT. -Щелчок левой кнопкой мыши по пустому пространству подтвердит текущее ограничение. Щелчок правой кнопкой мыши или нажатие Esc приведет к отмене. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6703,14 +6689,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Размер - + Dimension tools. Инструменты измерения. + + CmdSketcherConstrainRadius + + + Constrain radius + Ограничение радиуса + + + + Fix the radius of a circle or an arc + Зафиксировать радиус окружности или дуги + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts index bb3584b6e0..0f059b9005 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sl.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Omeji krožni lok ali krožnico - + Constrain an arc or a circle Omeji krožni lok ali krožnico - + Constrain radius Omeji polmer - + Constrain diameter Omeji premer - + Constrain auto radius/diameter Samodejno omeji polmer/premer @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Kotno omejilo - + Fix the angle of a line or the angle between two lines Določi kót daljice ali kót med dvema daljicama @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Omeji zbir - + Block the selected edge from moving Prepreči premikanje izbranega robu @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Omeji sovpadanje - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Ustvari sovpadno omejilo za točke ali sosrediščno omejilo za kroge, loke in elipse @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Omeji premer - + Fix the diameter of a circle or an arc Določi premer krožnice ali krožnega loka @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Omeji razdaljo - + Fix a length of a line or the distance between a line and a vertex or between two circles Določi dolžino daljice ali razdaljo med daljico in ogliščem oz. med dvema krogoma @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Omeji vodoravno razdaljo - + Fix the horizontal distance between two points or line ends Določi vodoravno razdaljo med dvema točkama ali krajiščema @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Omeji navpično razdaljo - + Fix the vertical distance between two points or line ends Določi navpično razdaljo med dvema točkama ali krajiščema @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Omeji na enakost - + Create an equality constraint between two lines or between circles and arcs Ustvari enakostno omejilo med dvema črtama ali med krogi in loki @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Omeji na vodoravnost - + Create a horizontal constraint on the selected item Ustvari vodoravno omejilo na izbranem predmetu @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Zaklenjeno omejilo - + Create both a horizontal and a vertical distance constraint on the selected vertex Ustvari omejilo navpične in vodoravne oddaljenosti izbranega oglišča @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Omeji z vzporednostjo - + Create a parallel constraint between two lines Ustvari omejilo vzporednosti med dvema črtama @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Omeji s pravokotnostjo - + Create a perpendicular constraint between two lines Ustvari pravokotno omejilo med dvema črtama @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Omeji točko na predmet - + Fix a point onto an object Pritrdi točko na predmet @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Samodejno omeji polmer/premer - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Zakleni premer, če izbran krog, oz. polmer, če je izbran lok/tečaj zlepka - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Omeji polmer ali utežitev - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Zakleni polmer kroga oz. loka ali zakleni utežitev tečaja B-zlepka - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Lomno omejilo (lomni zakon) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Ustvari omejitev lomnega zakona med dvema končnima točkama žarkov @@ -599,12 +586,12 @@ in robom, ki predstavlja mejo. CmdSketcherConstrainSymmetric - + Constrain symmetrical Omeji s somernostjo - + Create a symmetry constraint between two points with respect to a line or a third point Ustvari omejitev somernosti med dvema točkama @@ -614,12 +601,12 @@ glede na črto ali tretjo točko CmdSketcherConstrainTangent - + Constrain tangent Omeji z dotikalnostjo - + Create a tangent constraint between two entities Ustvari dotikalno omejilo med dvema prvinama @@ -627,12 +614,12 @@ glede na črto ali tretjo točko CmdSketcherConstrainVertical - + Constrain vertically Omeji na navpičnost - + Create a vertical constraint on the selected item Ustvari navpičnostno omejilo na izbranem predmetu @@ -1490,12 +1477,12 @@ To bo izbrisalo lastnosti "Podpore", če sploh obstajajo. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Omogoči/onemogoči omejilo - + Activates or deactivates the selected constraints Omogoči ali onemogoči izbrana omejila @@ -1516,12 +1503,12 @@ To bo izbrisalo lastnosti "Podpore", če sploh obstajajo. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Preklopi med gonilnim in sklicnim omejilom - + Set the toolbar, or the selected constraints, into driving or reference mode Nastavi orodno vrstico ali mejilo @@ -1595,370 +1582,376 @@ neveljavna omejila, izrojene geometrije, ... Command - - + + Add horizontal constraint Dodaj vodoravnostno omejilo - - - + + + Add horizontal alignment Dodaj vodoravno poravnavo - - + + Add vertical constraint Dodaj navpičnostno omejilo - + Add vertical alignment Dodaj navpično poravnavo - + Add 'Lock' constraint Dodaj zaklepno omejilo - + Add relative 'Lock' constraint Dodaj odnosno zaklepno omejilo - + Add fixed constraint Dodaj pritrditveno omejilo - + Add 'Block' constraint Dodaj zbirno omejilo - + Add block constraint Dodaj zbirno omejilo - - - + + + Add coincident constraint Dodaj omejilo sovpadanja - - + + Add distance from horizontal axis constraint Dodaj omejilo oddaljenosti od vodoravne osi - - + + Add distance from vertical axis constraint Dodaj omejilo oddaljenosti od navpične osi - - + + Add point to point distance constraint Dodaj omejilo razdalje med točkama - - - + + + Add point to line Distance constraint Dodaj omejilo razdalje med točko in daljico - - + + Add circle to circle distance constraint Dodaj omejilo razdalje med krogoma - + Add circle to line distance constraint Dodaj omejilo razdalje med krogom in črto - - - - - - + + + + + + Add length constraint Dodaj dolžinsko omejilo - - + + + Dimension Mera - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Dodaj omejilo oddaljenosti od izhodišča - - - + + + Add Distance constraint Dodaj omejilo razdalje - - - + + + Add 'Horizontal' constraints Dodaj vodoravnostna omejila - - - + + + Add 'Vertical' constraints Dodaj navpičnostna omejila - - + + Add Symmetry constraint Dodaj somernostno omejilo - - + + Add Symmetry constraints Dodaj somernostna omejila - - + + Add Distance constraints Dodaj omejila razdalje - + Add Horizontal constraint Dodaj vodoravnostno omejilo - + Add Vertical constraint Dodaj navpičnostno omejilo - + Add Block constraint Dodaj zbirno omejilo - + Add Angle constraint Dodaj kotno omejilo - - - - + + + + Add Equality constraint Dodaj enakostno omejilo - + Add Equality constraints Dodaj enakostna omejila - + Add Radius constraint Dodaj polmerno omejilo - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Dodaj sosrediščno in dolžinsko omejilo - + Add DistanceX constraint Dodaj omejilo razdalje po X-u - + Add DistanceY constraint Dodaj omejilo razdalje po Y-u - + Add point to circle Distance constraint Dodaj omejilo razdalje med točko in krožnico - - + + Add point on object constraint Dodaj točko predmetnemu omejilu - - + + Add point to point horizontal distance constraint Dodaj omejilo vodoravne razdalje med točkama - + Add fixed x-coordinate constraint Dodaj omejilo nespremelnjive sorednice x - - + + Add point to point vertical distance constraint Dodaj omejilo navpične razdalje med točkama - + Add fixed y-coordinate constraint Dodaj omejilo nespremelnjive sorednice y - - + + Add parallel constraint Dodaj vzporednostno omejilo - - - - - - - + + + + + + + Add perpendicular constraint Dodaj pravokotnostno omejilo - + Add perpendicularity constraint Dodaj pravokotnostno omejilo - + Swap coincident+tangency with ptp tangency Zamenjaj sovpadanje + dotikalnost z dotikalnostjo vzporednice skozi točko - + Swap PointOnObject+tangency with point to curve tangency Zamenjaj TočkaNaPredmetu+dotikalnost s točka v dotikalnost na krivuljo - - - - - - - + + + + + + + Add tangent constraint Dodaj dotikalnostno omejilo - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodaj točko dotikalnega omejila - - - - + + + + Add radius constraint Dodaj polmerno omejilo - - - - + + + + Add diameter constraint Dodaj premerno omejilo - - - - + + + + Add radiam constraint Dodaj polmer-premerno omejilo - - - - - - + + + + + + Add angle constraint Dodaj kotno omejilo - - + + Add equality constraint Dodaj enakostno omejilo - - - - - + + + + + Add symmetric constraint Dodaj somernostno omejilo - + Add Snell's law constraint Dodaj lomno omejilo - + Toggle constraint to driving/reference Preklapi med gonilnostjo/gnanostjo omejila - + Activate/Deactivate constraint Omogoči/onemogoči omejilo @@ -2034,7 +2027,7 @@ neveljavna omejila, izrojene geometrije, ... - + Add sketch arc Dodaj očrtni lok @@ -2285,59 +2278,59 @@ neveljavna omejila, izrojene geometrije, ... Napaka samodejnega omejila: Nerešljiv očrt po uveljavitiv enakostnega omejila. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Ni mogoče uganiti presečišča krivulj. Poskusite dodati omejilo sovpadanja med vozlišči krivulj, ki jih nameravate zaokrožiti. - - + + BSpline Geometry Index (GeoID) is out of bounds. Kazalo geometrije B-zlepka (GeoID) je izven omejitev. - + You are requesting no change in knot multiplicity. Ne zahtevate spremembe večkratnosti vozla. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Priskrbljeno kazalo geometrije (GeoId) ni krivulja B-zlepek. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Oznaka vozla je izven meja. Upoštevajte, da ima v skladu z OCC zapisom prvi vozel oznako 1 in ne nič. - + The multiplicity cannot be increased beyond the degree of the B-spline. Večkratnost ne more biti povečana preko stopnje B-zlepka. - + The multiplicity cannot be decreased beyond zero. Večkratnost ne more biti zmanjšana pod ničlo. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC ne more zmanjšati večkratnost znotraj največjega dopustnega odstopanja. - + Knot cannot have zero multiplicity. Večkratnost vozla ne more biti nič. - + Knot multiplicity cannot be higher than the degree of the BSpline. Večkratnost vozla ne more biti večja od stopnje B-zlepka. - + Knot cannot be inserted outside the BSpline parameter range. Vozla ni mogoče vstaviti izven razpona določilke B-zlepka. @@ -2405,134 +2398,134 @@ neveljavna omejila, izrojene geometrije, ... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ neveljavna omejila, izrojene geometrije, ... Merska omejitev - + Cannot add a constraint between two external geometries. Ni mogoče dodati omejila med dvema zunanjima geometrijama. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Ni mogoče dodati omejila med dvema nespremenljivima geometrijama. Med nespremenljive geometrije spadajo zunanje geometrije, zamrznjene geometrije in posebne točke, kot so vozlišča B-zlepka. - + Sketcher Constraint Substitution Zamenjava omejila očrtovalnika - + Keep notifying me of constraint substitutions Obveščaj me o zamenjavah omejil - - - + + + Only sketch and its support are allowed to be selected. Izberete lahko le očrt in njegovo podporo. - + One of the selected has to be on the sketch. Eden izmed izbranih mora biti v očrtu. - - + + Select an edge from the sketch. Izberite rob z očrta. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemogočo omejilo - - - - + + + + The selected edge is not a line segment. Izbrani rob ni črtni odsek. - - - - - - + + + + + + Double constraint Dvojna omejitev - - - - - + + + + + The selected edge already has a horizontal constraint! Izbran rob je že omejen na vodoravnost! - - - + + + The selected edge already has a vertical constraint! Izbran rob je že omejen na navpičnost! - - - - - - + + + + + + The selected edge already has a Block constraint! Izbran rob je že zbirno omejen! - + The selected item(s) can't accept a horizontal constraint! Izbranih predmetov ni mogoče vodoravnostno omejiti! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Izbrana je več kot ena nepremična točka. Izberite največ eno nepremično točko! - + The selected item(s) can't accept a vertical constraint! Izbranih predmetov ni mogoče navpičnostno omejiti! - - - + + + Select vertices from the sketch. Izberite oglišča z očrta. - + Select one vertex from the sketch other than the origin. Izberite oglišče z očrta, ki ni izhodišče. - + Select only vertices from the sketch. The last selected vertex may be the origin. Izberite le oglišča z očrta. Zadnje izbrano oglišče je lahko izhodišče. - + Wrong solver status Napačen stanje reševalnika - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Zbirnega omejila ni mogoče dodati, če očrt ni rešen ali ima čezmerna in nasprotujoča si omejila. - + Select one edge from the sketch. Izberite en rob na očrtu. - + Select only edges from the sketch. Izberite le robove z očrta. - + Number of selected objects is not 3 Niso izbrani 3 predmeti - + Error Napaka - + Unexpected error. More information may be available in the Report View. Nepričakovana napaka. Več lahko najdete v poročevalnem pogledu. - + Endpoint to endpoint tangency was applied instead. Namesto tega je bila uporabljena tangentnost med končnima točkama. - + Select two or more points from the sketch. Izberite dve ali več točk na očrtu. - + Select two or more vertices from the sketch. Izberite na očrtu dve ali več oglišč. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izberite dve ali več oglišč na očrtu za sovpadno omejilo ali dva kroga, loka, eliptična loka ali dve elipsi za sosrediščno omejilo. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izberite na očrtu dve oglišči za sovpadno omejilo ali dva kroga, loka, eliptična loka ali dve elipsi za sosrediščno omejilo. - + Select exactly one line or one point and one line or two points from the sketch. Izberite natanko eno črto ali točko in eno črto ali dve točki na skici. - + Cannot add a length constraint on an axis! Omejitve dolžine ni mogoče dodati na os! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Izberite na očrtu natanko eno črto ali točko in eno črto ali dve točki ali pa dva kroga. - + This constraint does not make sense for non-linear curves. To omejilo ni smiselno za nepreme krivulje. - + Endpoint to edge tangency was applied instead. Namesto tega je bila uporabljena dotikalnost iz krajišča na rob. - - - - - - - + + + + + + + Select the right things from the sketch. Izberite prave stvari na skici. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Izberite rob, ki ni utež B-zlepka. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nobena od izbranih točk ni bila omejena na ustrezne krivulje, ker so bodisi del istega predmeta, bodisi so oboji zunanje geometrije, ali pa rob ni izberljiv. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nobena od izbranih točk ni bila omejena na ustrezno krivuljo, ker ali so del istega elementa ali sta obe zunanji geometriji. - - - - + + + + Select exactly one line or up to two points from the sketch. Izberite v očrtu natanko eno daljico ali največ dve točki. - + Cannot add a horizontal length constraint on an axis! Omejitve vodoravne dolžine ni mogoče dodati na os! - + Cannot add a fixed x-coordinate constraint on the origin point! Omejila z nespremenljivo sorednico x ni mogoče dodati na izhodiščno točko! - - + + This constraint only makes sense on a line segment or a pair of points. To omejilo je smiselno le za raven odsek ali par točk. - + Cannot add a vertical length constraint on an axis! Omejitve navpične dolžine ni mogoče dodati na os! - + Cannot add a fixed y-coordinate constraint on the origin point! Omejila z nespremenljivo sorednico y ni mogoče dodati na izhodiščno točko! - + Select two or more lines from the sketch. Izberite v očrtu dve daljici ali več. - - + + Select at least two lines from the sketch. Izberite v očrtu vsaj dve daljici. - + Select a valid line. Izberite veljavno črto. - - + + The selected edge is not a valid line. Izbrani rob ni veljavna črta. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Dovoljene kombinacije: dve krivulji, končna točka in krivulja, dve končni točki, dve krivulji in točka. - + Select some geometry from the sketch. perpendicular constraint Izberite v očrtu neko geometrijo. - - + + Cannot add a perpendicularity constraint at an unconnected point! Pravokotne omejitve ni mogoče dodati na nepovezano točko! - - - + + + Perpendicular to B-spline edge currently unsupported. Pravokotno na B-zlepek rob je trenutno nepodprto. - - + + One of the selected edges should be a line. En od izbranih robov mora biti črta. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uporabljena je bla dotikalnost med krajiščema. Omejilo sovpadanja je bilo izbrisano. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Uporabljena je bila dotikalnost med krajiščem in robom. Omejitev točke na predmet je bila izbrisana. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Dovoljene kombinacije: dve krivulji, končna točka in krivulja, dve končni točki, dve krivulji in točka. - + Select some geometry from the sketch. tangent constraint Izberite v očrtu neko geometrijo. - - - + + + Cannot add a tangency constraint at an unconnected point! Tangentne omejitve ni mogoče dodati na nepovezano točko! - - + + Tangent constraint at B-spline knot is only supported with lines! Dotikalno omejilo v vozlu B-zlepka je podprto le za daljice! - + B-spline knot to endpoint tangency was applied instead. Namesto tega je bila uporabljena dotikalnost vozla B-zlepka na krajišče. - + Select either one point and several curves, or one curve and several points. Izberite bodisi eno točko in več krivulj, bodisi eno krivuljo in več točk. - - + + Wrong number of selected objects! Napačno število izbranih objektov! - - + + With 3 objects, there must be 2 curves and 1 point. Pri 3-h objektih morata obstajati 2 krivulji in 1 točka. - - - + + + Tangency to B-spline edge currently unsupported. Tangentnost na B-zlepek rob je trenutno nepodprta. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Izberite v očrtu enega ali več lokov oz. krogov. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Izberite bodisi enega ali več tečajev B-zlepka, bodisi enega ali več lokov ali krogov skice, toda ne mešano. - - - + + + Constraint only applies to arcs or circles. Omejitev velja samo za loke ali krožnice. - - + + Select one or two lines from the sketch. Or select two edges and a point. Izberite v očrtu bodisi eno ali dve daljici, bodisi dva robova in točko. - - + + Parallel lines Vzporedne črte - - + + An angle constraint cannot be set for two parallel lines. Kotnega omejila ni mogoče nastaviti za dve vzporedni črti. - + Cannot add an angle constraint on an axis! Kotne omejitve ni mogoče dodati na os! - + Select two edges from the sketch. Izberite v očrtu dva robova. - + Select two or more compatible edges. Izberite dva ali več primernih robov. - + Sketch axes cannot be used in equality constraints. Osi očrta ni mogoče uporabiti z enakostnimi omejili. - + Equality for B-spline edge currently unsupported. Enakost za B-zlepek rob je trenutno nepodprta. - - - - + + + + Select two or more edges of similar type. Izberite dva ali več robov podobne vrste. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Izberite dve točki in somernico, dve točki in točko somernosti ali črto in točko somernosti na očrtu. - - + + Cannot add a symmetry constraint between a line and its end points. Somernostnega omejila ni mogoče dati med črto in njenima krajiščema. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Omejitve somernosti ni mogoče dodati med črto in njenima krajiščema! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Izberite dve krajišči daljic, ki naj predstavljata žarka, in rob, ki naj predstavlja mejo. Prva izbrana točka ustreza kazalu n1, druga kazalu n2 in sklicna vrednost nastavi razmerje n2/n1. - + Selected objects are not just geometry from one sketch. Izbrani predmeti niso le geometrija v očrtu. - + Cannot create constraint with external geometry only. Omejila ni mogoče ustvariti le z zunanjimi geometrijami. - + Incompatible geometry is selected. Izbrana je nezdružljiva geometrija. - + SnellsLaw on B-spline edge is currently unsupported. B-zlepkov rob trenutno ne podpira lomnega zakona. - - - - - + + + + + Select constraints from the sketch. Izberite omejila v očrtu. @@ -3632,12 +3625,12 @@ Zaustavljati, Zapirati (pot), Zastirati (svetlobo, pogled) Dolžina: - + Refractive index ratio Lomni količnik - + Ratio n2/n1: Razmerje n2/n1: @@ -5226,112 +5219,112 @@ Izvede se s pregledom geometrij in omejil očrta. SketcherGui::ViewProviderSketch - + Edit sketch Uredi očrt - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch Neveljaven očrt - + Do you want to open the sketch validation tool? Ali želite odprti orodje za preverjanje veljavnosti očrta? - + The sketch is invalid and cannot be edited. Očrt je neveljaven in ga ni mogoče urejati. - + Please remove the following constraint: Odstranite naslednjo omejilo: - + Please remove at least one of the following constraints: Odstranite vsaj eno od naslednjih omejil: - + Please remove the following redundant constraint: Odstranite naslednje čezmerno omejilo: - + Please remove the following redundant constraints: Odstranite naslednja čezmerna omejila: - + The following constraint is partially redundant: Naslednje omejilo je deloma čezmerno: - + The following constraints are partially redundant: Naslednja omejila so deloma čezmerna: - + Please remove the following malformed constraint: Odstranite naslednje narobe oblikovano omejilo: - + Please remove the following malformed constraints: Odstranite naslednja narobe oblikovana omejila: - + Empty sketch Prazen očrt - + Over-constrained: Preomejeno: - + Malformed constraints: Narobe oblikovana omejila: - + Redundant constraints: Čezmerna omejila: - + Partially redundant: Delno čezmerno: - + Solver failed to converge Reševalniku je zbliževanje spodletelo - + Under constrained: Podomejeno: - + %n DoF(s) %n prostostna stopnja @@ -5341,7 +5334,7 @@ Izvede se s pregledom geometrij in omejil očrta. - + Fully constrained Polnoomejen @@ -5439,8 +5432,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Določi premer krožnice ali krožnega loka @@ -5448,7 +5441,8 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Določi polmer oz. premer loka oz. kroga @@ -5456,20 +5450,12 @@ Izvede se s pregledom geometrij in omejil očrta. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Določi polmer kroga ali loka - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Določi polmer oz. premer loka oz. kroga - - Sketcher_Copy @@ -6086,7 +6072,7 @@ Eigen Sparse QR algoritem je optimiziran za redke razpredelnice; običajno hitre ViewProviderSketch - + and %1 more in še %1 @@ -6309,7 +6295,7 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Očrt vsebuje deloma čezmerna omejila! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabole so bile preseljene. Preseljenih datotek ne bo mogoče odpreti v prejšnjih FreeCADih! @@ -6320,7 +6306,7 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t - + @@ -6345,7 +6331,7 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t - + @@ -6368,13 +6354,13 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Omejilo ima neveljavno informacijo kazala in je narobe oblikovano. - - - - - - - + + + + + + + @@ -6385,7 +6371,7 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t - + Failed to add arc Dodajanje loka je spodletelo @@ -6499,7 +6485,7 @@ Medčrtna razdalja se spremeni, če postane manjša od tega števila slikovnih t Dodajanje kvadra spodletelo - + Failed to add rounded rectangle Dodajanje zaokroženega pravokotnika spodletelo @@ -6681,18 +6667,18 @@ Da bi se pripele, morajo biti točke oddaljene od črte do eno petino polja mre CmdSketcherDimension - + Dimension Mera - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Omeji glede na svoj izbor. -Glede na izbrane predmete imate lahko na voljo več omejil. Med njimi se lahko pRemikate s tipko "PREMAKNI". -Z levim klikom v prazno potrdite trenutno omejilo, prekličete pa z desnim klikom ali Esc. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6711,14 +6697,27 @@ Z levim klikom v prazno potrdite trenutno omejilo, prekličete pa z desnim kliko CmdSketcherCompDimensionTools - + Dimension Mera - + Dimension tools. Kotirna orodja. + + CmdSketcherConstrainRadius + + + Constrain radius + Omeji polmer + + + + Fix the radius of a circle or an arc + Določi polmer kroga ali loka + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts index 16f0282b93..9820a7621c 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr-CS.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ograničenje kružnog luka ili kruga - + Constrain an arc or a circle Kotiraj kružni luk ili krug - + Constrain radius Ograničenje poluprečnika - + Constrain diameter Ograničenje prečnika - + Constrain auto radius/diameter Automatsko ograničenje poluprečnika i prečnika @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ograničenje ugla - + Fix the angle of a line or the angle between two lines Kotiraj ugao linije ili ugao između dve linije @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Ograničavanje blokiranjem - + Block the selected edge from moving Blokira pomeranje izabrane ivice @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ograničenje podudarnosti - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Napravi ograničenje podudarnosti između tačaka, ili koncentrično ograničenje između krugova, lukova i elipsa @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ograničenje prečnika - + Fix the diameter of a circle or an arc Kotiraj prečnik kruga ili luka @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ograničenje rastojanja - + Fix a length of a line or the distance between a line and a vertex or between two circles Kotiraj dužinu linije, rastojanje između linije i temena ili rastojanje između dva kruga @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ograničenje horizontalnog rastojanja - + Fix the horizontal distance between two points or line ends Kotiraj horizontalno rastojanje između dve tačke ili krajeva linija @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ograničenje vertikalnog rastojanja - + Fix the vertical distance between two points or line ends Kotiraj vertikalno rastojanje između dve tačke ili krajeva linija @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ograničenje jednakosti - + Create an equality constraint between two lines or between circles and arcs Napravi ograničenje jednakosti između dve linije ili između krugova i lukova @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ograničenje horizontalnosti - + Create a horizontal constraint on the selected item Napravi ograničenje horizontalnosti na izabranoj stavki @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Ograničavanje zaključavanjem - + Create both a horizontal and a vertical distance constraint on the selected vertex Napravi ograničenje horizontalnog i vertikalnog rastojanja na izabranom temenu @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Ograničenje paralelnosti - + Create a parallel constraint between two lines Napravi ograničenje paralelnosti između dve linije @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ograničenje upravnosti - + Create a perpendicular constraint between two lines Napravi ograničenje upravnosti između dva geometrijska elementa @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Ograničenje tačka na objektu - + Fix a point onto an object Ograničenje tačke da bude vezana za objekat @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Automatsko ograničenje poluprečnika i prečnika - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Kotiraj prečnik ako izabereš krug ili poluprečnik ako izabereš luk ili pol splajna - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Kotiraj poluprečnik - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Kotiraj poluprečnik kruga ili luka ili kotirajte krug težine pola B-splajn krive - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ograničenje refrakcije (Snellov zakon) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Napravi ograničenje refrakcije (Snellov zakon) između dve krajnje tačke zraka @@ -599,12 +586,12 @@ i neke ivice koja predstavlja granicu. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ograničenje simetričnosti - + Create a symmetry constraint between two points with respect to a line or a third point Napravi ograničenje simetričnosti između dve tačke @@ -614,12 +601,12 @@ u odnosu na pravu ili treću tačku CmdSketcherConstrainTangent - + Constrain tangent Ograničenje tangentnosti - + Create a tangent constraint between two entities Napravi tangentno ograničenje između dva entiteta @@ -627,12 +614,12 @@ u odnosu na pravu ili treću tačku CmdSketcherConstrainVertical - + Constrain vertically Ograničenje vertikalnosti - + Create a vertical constraint on the selected item Napravi ograničenje vertikalnosti na izabranoj stavki @@ -1490,12 +1477,12 @@ Ovo će obrisati osobinu 'Osnova', ako postoji. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Aktiviraj/deaktiviraj ograničenje - + Activates or deactivates the selected constraints Aktivira ili deaktivira izabrana ograničenja @@ -1516,12 +1503,12 @@ Ovo će obrisati osobinu 'Osnova', ako postoji. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ograničavajuće/referentne kote - + Set the toolbar, or the selected constraints, into driving or reference mode Podesite paletu sa alatkama ili izabrana ograničenja, @@ -1595,370 +1582,376 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Command - - + + Add horizontal constraint Dodaj horizontalno ograničenje - - - + + + Add horizontal alignment Dodaj horizontalno poravnanje - - + + Add vertical constraint Dodaj vertikalno ograničenje - + Add vertical alignment Dodaj vertikalno poravnanje - + Add 'Lock' constraint Dodaj ograničavanje zaključavanjem - + Add relative 'Lock' constraint Dodaj relativno ograničenje zaključavanjem - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Dodaj ograničavanje blokiranjem - + Add block constraint Dodaj ograničavanje blokiranjem - - - + + + Add coincident constraint Dodaj ograničenje podudarnosti - - + + Add distance from horizontal axis constraint Dodaj kotu rastojanja od horizontalne ose - - + + Add distance from vertical axis constraint Dodaj kotu rastojanja od vertikalne ose - - + + Add point to point distance constraint Dodaj kotu vertikalnog rastojanja od tačke do tačke - - - + + + Add point to line Distance constraint Dodaj kotu rastojanja od tačke do linije - - + + Add circle to circle distance constraint Dodaj ograničenje između dva kruga - + Add circle to line distance constraint Dodaj ograničenje rastojanja od kruga do linije - - - - - - + + + + + + Add length constraint Dodaj ograničenje dužine - - + + + Dimension Kota - + Add lock constraint Dodaj ograničenje zaključavanjem - + Add 'Distance to origin' constraint Dodaj ograničenje 'Rastojanje od koordinatnog početka' - - - + + + Add Distance constraint Dodaj ograničenje rastojanja - - - + + + Add 'Horizontal' constraints Dodaj 'horizontalna' ograničenja - - - + + + Add 'Vertical' constraints Dodaj 'vertikalna' ograničenja - - + + Add Symmetry constraint Dodaj ograničenje simetričnosti - - + + Add Symmetry constraints Dodaj ograničenja simetričnosti - - + + Add Distance constraints Dodaj ograničenja rastojanja - + Add Horizontal constraint Dodaj horizontalno ograničenje - + Add Vertical constraint Dodaj vertikalno ograničenje - + Add Block constraint Dodaj ograničenje blokiranjem - + Add Angle constraint Dodaj ograničenje ugla - - - - + + + + Add Equality constraint Dodaj ograničenje jednakosti - + Add Equality constraints Dodaj ograničenja jednakosti - + Add Radius constraint Dodaj ograničenje poluprečnika - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Dodaj ograničenje koncentričnosti i rastojanja - + Add DistanceX constraint Dodaj ograničenje rastojanje X - + Add DistanceY constraint Dodaj ograničenje rastojanje Y - + Add point to circle Distance constraint Dodaj ograničenje rastojanja od tačke do kružnice - - + + Add point on object constraint Dodaj tačku na ograničenje objekta - - + + Add point to point horizontal distance constraint Dodaj ograničenje horizontalnog rastojanja od tačke do tačke - + Add fixed x-coordinate constraint Dodaj ograničenje fiksne x-koordinate - - + + Add point to point vertical distance constraint Dodaj ograničenje vertikalnog rastojanja od tačke do tačke - + Add fixed y-coordinate constraint Dodaj ograničenje fiksne y-koordinate - - + + Add parallel constraint Dodaj ograničenje paralelnosti - - - - - - - + + + + + + + Add perpendicular constraint Dodaj ograničenje upravnosti - + Add perpendicularity constraint Dodaj ograničenje upravnosti - + Swap coincident+tangency with ptp tangency Zameni podudarnost+tangentnost na tangentnost tačaka - + Swap PointOnObject+tangency with point to curve tangency Zameni tačka na objektu+tangentnost sa tangentnost tačke na krivu - - - - - - - + + + + + + + Add tangent constraint Dodaj ograničenje tangentnosti - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Dodaj tačku ograničenja tangentnosti - - - - + + + + Add radius constraint Dodaj ograničenje poluprečnika - - - - + + + + Add diameter constraint Dodaj ograničenje prečnika - - - - + + + + Add radiam constraint Dodaj ograničenje poluprečnik-prečnik - - - - - - + + + + + + Add angle constraint Dodaj ograničenje ugla - - + + Add equality constraint Dodaj ograničenje jednakosti - - - - - + + + + + Add symmetric constraint Dodaj ograničenje simetričnosti - + Add Snell's law constraint Dodaj ograničenje na osnovu Snellovog zakona - + Toggle constraint to driving/reference Prebaci između referentnog i ograničavajućeg režima kota - + Activate/Deactivate constraint Aktiviraj/deaktiviraj ograničenje @@ -2034,7 +2027,7 @@ nevažeća ograničenja, degenerisanu geometriju, itd. - + Add sketch arc Dodaj skicu kružnog luka @@ -2285,59 +2278,59 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Greška automatskog ograničavanja: Nerešiva skica posle primene ograničenja jednakosti. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Nije moguće odrediti presečnu tačku krivih. Pokušaj da dodaš ograničenje podudarnosti između tačaka krivih gde nameravaš da napraviš zaobljenje. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline Geometry Index (GeoID) is out of bounds. - + You are requesting no change in knot multiplicity. Ne zahtevate promenu u višestrukosti čvorova. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. The Geometry Index (GeoId) provided is not a B-spline curve. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. Višestrukost se ne može povećati iznad stepena B-splajn krive. - + The multiplicity cannot be decreased beyond zero. Višestrukost ne može biti manje od nule. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC nije u stanju da smanji višestrukost unutar maksimalne tolerancije. - + Knot cannot have zero multiplicity. Čvor ne može imati nultu višestrukost. - + Knot multiplicity cannot be higher than the degree of the BSpline. Višestrukost čvorova ne može biti veća od stepena B-Splajn krive. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2405,134 +2398,134 @@ nevažeća ograničenja, degenerisanu geometriju, itd. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ nevažeća ograničenja, degenerisanu geometriju, itd. Dimenzionalno ograničenje - + Cannot add a constraint between two external geometries. Nije moguće dodati ograničenje između dve spoljne geometrije. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Nije moguće dodati ograničenje između dve fiksne geometrije. Pod fiksnom geometrijom podrazumevamo spoljašnju geometriju, blokiranu geometriju i posebne tačke kao što su tačke čvorova B-splajn krive. - + Sketcher Constraint Substitution Zamena Sketcher ograničenja - + Keep notifying me of constraint substitutions Nastavi da me obaveštavaš o zamenama ograničenja - - - + + + Only sketch and its support are allowed to be selected. Dozvoljeno je da se izabere samo skica i njena osnova. - + One of the selected has to be on the sketch. Jedan od izabranih mora biti na skici. - - + + Select an edge from the sketch. Izaberi ivicu sa skice. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Nemoguće ograničenje - - - - + + + + The selected edge is not a line segment. Izabrana ivica nije linijski segment. - - - - - - + + + + + + Double constraint Duplo ograničenje - - - - - + + + + + The selected edge already has a horizontal constraint! Izabrana ivica već ima horizontalno ograničenje! - - - + + + The selected edge already has a vertical constraint! Izabrana ivica već ima vertikalno ograničenje! - - - - - - + + + + + + The selected edge already has a Block constraint! Izabrana ivica je već ograničena blokiranjem! - + The selected item(s) can't accept a horizontal constraint! Izabrane stavke(a) ne mogu prihvatiti horizontalno ograničenje! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Izabrano je više od jedne fiksne tačke. Izaberi najviše jednu fiksnu tačku! - + The selected item(s) can't accept a vertical constraint! Izabrane stavke(a) ne mogu prihvatiti vertikalno ograničenje! - - - + + + Select vertices from the sketch. Izaberi temena sa skice. - + Select one vertex from the sketch other than the origin. Izaberi jedno teme sa skice osim koordinatnog početka. - + Select only vertices from the sketch. The last selected vertex may be the origin. Izaberi samo temena sa skice. Poslednje izabrano teme može biti koordinatni početak. - + Wrong solver status Pogrešan status algoritma za rešavanje - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Ograničenje blokiranjem se ne može dodati ako je skica nerešena ili postoje suvišna i konfliktna ograničenja. - + Select one edge from the sketch. Izaberi jednu ivicu sa skice. - + Select only edges from the sketch. Izaberi samo ivice sa skice. - + Number of selected objects is not 3 Broj izabranih objekata nije 3 - + Error Greška - + Unexpected error. More information may be available in the Report View. Neočekivana greška. Potražite više informacija u Pregledaču objava. - + Endpoint to endpoint tangency was applied instead. Umesto toga je primenjena tangentnost u krajnjim tačkama. - + Select two or more points from the sketch. Izaberi dve ili više tačke sa skice. - + Select two or more vertices from the sketch. Izaberi dva ili više temena sa skice. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izaberi dva ili više temena sa skice za ograničenje podudarnosti, ili dva ili više krugova, elipsa, lukova ili lukova elipse za ograničenje koncentričnosti. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Izaberi dva temena sa skice za ograničenje podudarnosti, ili dva kruga, elipse, lukove ili lukove elipse za ograničenje koncentričnosti. - + Select exactly one line or one point and one line or two points from the sketch. Izaberi tačno jednu liniju ili jednu tačku i jednu liniju, ili dve tačke sa skice. - + Cannot add a length constraint on an axis! Ne može se dodati ograničenje dužine na osu! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Izaberi tačno jednu liniju, jednu tačku i jednu liniju, dve tačke ili dva kruga na skici. - + This constraint does not make sense for non-linear curves. Ovo ograničenje nema smisla za nelinearne krive. - + Endpoint to edge tangency was applied instead. Umesto toga je primenjena tangentnost ivice u krajnjoj tački. - - - - - - - + + + + + + + Select the right things from the sketch. Izaberi prave stvari sa skice. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Izaberi ivicu koja nije težina B-splajn kontrolne tačke. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Nijedna od izabranih tačaka nije bila ograničena na dotične krive, jer su delovi istog elementa, jer su obe spoljašnje geometrije ili zato što ivica nije prihvatljiva. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Nijedna od izabranih tačaka nije bila ograničena na odgovarajuće krive, bilo zato što su delovi istog elementa, ili zato što su obe spoljašnje geometrije. - - - - + + + + Select exactly one line or up to two points from the sketch. Izaberi tačno jednu liniju ili najviše dve tačke sa skice. - + Cannot add a horizontal length constraint on an axis! Ne može se primeniti ograničenje horizontalno rastojanje na osu! - + Cannot add a fixed x-coordinate constraint on the origin point! Nije moguće ograničiti x-koordinatu koordinatnog početka! - - + + This constraint only makes sense on a line segment or a pair of points. Ovo ograničenje ima smisla samo na segmentu linije ili paru tačaka. - + Cannot add a vertical length constraint on an axis! Ne može se primeniti ograničenje vertikalno rastojanje na osu! - + Cannot add a fixed y-coordinate constraint on the origin point! Nije moguće ograničiti y-koordinatu koordinatnog početka! - + Select two or more lines from the sketch. Izaberi dve ili više linija sa skice. - - + + Select at least two lines from the sketch. Izaberi najmanje dve linije sa skice. - + Select a valid line. Izaberi važeću ivicu. - - + + The selected edge is not a valid line. Izabrana ivica nije važeća linija. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvatljive kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; dve krive i tačka. - + Select some geometry from the sketch. perpendicular constraint Izaberi neku geometriju sa skice. - - + + Cannot add a perpendicularity constraint at an unconnected point! Ne može se dodati ograničenje upravnosti na tačku pošto ona nije krajnja tačka! - - - + + + Perpendicular to B-spline edge currently unsupported. Primena ograničenja upravnosti na B-splajn krivu trenutno nije podržana. - - + + One of the selected edges should be a line. Jedna od izabranih ivica bi trebala biti linija. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Primenjena je tangentnost na krajnje tačke. Ograničenje podudarnosti je izbrisano. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Primenjena je tangentnost između krajnje tačke i ivice. Ograničenje tačka na objektu je obrisano. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; dve krive i tačka. - + Select some geometry from the sketch. tangent constraint Izaberi neku geometriju sa skice. - - - + + + Cannot add a tangency constraint at an unconnected point! Ne može se dodati ograničenje tangentnosti u tačkama koje se ne poklapaju! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. Umesto toga je primenjena tangentnost između čvora B-splajna i krajnje tačke. - + Select either one point and several curves, or one curve and several points. Izaberi ili jednu tačku i nekoliko krivih, ili jednu krivu i nekoliko tačaka. - - + + Wrong number of selected objects! Pogrešan broj izabranih objekata! - - + + With 3 objects, there must be 2 curves and 1 point. Kod 3 objekta, moraju postojati 2 krive i 1 tačka. - - - + + + Tangency to B-spline edge currently unsupported. Primena ograničenja tangentnosti na B-splajn krivu trenutno nije podržana. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Izaberi jedan ili više lukova ili krugova sa skice. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Izaberi samo jedan ili više polova B-splajn krive ili samo jedan ili više lukova ili krugova sa skice, ali ne pomešano. - - - + + + Constraint only applies to arcs or circles. Ograničenje se odnosi samo na lukove i kružnice. - - + + Select one or two lines from the sketch. Or select two edges and a point. Izaberi jednu ili dve linije sa skice, ili izaberi dve ivice i tačku. - - + + Parallel lines Paralelne linije - - + + An angle constraint cannot be set for two parallel lines. Za dve paralelne prave ne može se postaviti ograničenje ugla. - + Cannot add an angle constraint on an axis! Ne možete dodati ograničenje ugla na osu! - + Select two edges from the sketch. Izaberi dve ivice sa skice. - + Select two or more compatible edges. Izaberi dve ili više kompatibilnih ivica. - + Sketch axes cannot be used in equality constraints. Na ose skice se ne može primeniti ograničenje jednakosti. - + Equality for B-spline edge currently unsupported. Primena ograničenja jednakosti na B-splajn krivu trenutno nije podržana. - - - - + + + + Select two or more edges of similar type. Izaberi dve ili više ivica sličnog tipa. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Izaberi dve tačke i liniju simetrije, dve tačke i tačku simetrije ili pravu i tačku simetrije sa skice. - - + + Cannot add a symmetry constraint between a line and its end points. Nije moguće dodati ograničenje simetričnosti između linije i njenih krajnjih tačaka. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Nije moguće dodati ograničenje simetričnosti između linije i njenih krajnjih tačaka! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Izaberi dve krajnje tačke linija koje će delovati kao zraci i ivicu koja predstavlja granicu. Prva izabrana tačka odgovara indeksu loma n1, druga n2, a odnos n2/n1 je relativni indeks loma. - + Selected objects are not just geometry from one sketch. Izabrani objekti nisu samo geometrija iz jedne skice. - + Cannot create constraint with external geometry only. Nije moguće kreirati ograničenje samo sa spoljnom geometrijom. - + Incompatible geometry is selected. Izabrana je nekompatibilna geometrija. - + SnellsLaw on B-spline edge is currently unsupported. Primena ograničenja refrakcije (Snellov zakon) na B-splajn krivu trenutno nije podržana. - - - - - + + + + + Select constraints from the sketch. Izaberi ograničenja sa skice. @@ -3631,12 +3624,12 @@ Prihvaćene kombinacije: dve krive; krajnja tačka i kriva; dve krajnje tačke; Length: - + Refractive index ratio Relativni indeks loma - + Ratio n2/n1: Odnos n2/n1: @@ -5228,112 +5221,112 @@ Ovo se radi analizom geometrije i ograničenja skice. SketcherGui::ViewProviderSketch - + Edit sketch Uredi skicu - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch Neispravna skica - + Do you want to open the sketch validation tool? Da li želiš da otvoriš alatku za proveru skice? - + The sketch is invalid and cannot be edited. Skica sadrži greške i ne može biti menjana. - + Please remove the following constraint: Ukloni sledeće ograničenje: - + Please remove at least one of the following constraints: Ukloni bar jedno od sledećih ograničenja: - + Please remove the following redundant constraint: Ukloni sledeće suvišno ograničenje: - + Please remove the following redundant constraints: Ukloni sledeća suvišna ograničenja: - + The following constraint is partially redundant: Sledeće ograničenje je suvišno: - + The following constraints are partially redundant: Sledeća ograničenja su suvišna: - + Please remove the following malformed constraint: Ukloni sledeće oštećeno ograničenje: - + Please remove the following malformed constraints: Ukloni sledeće oštećena ograničenja: - + Empty sketch Prazna skica - + Over-constrained: Previše ograničeno: - + Malformed constraints: Oštećena ograničenja: - + Redundant constraints: Suvišna ograničenja: - + Partially redundant: Delimično suvišna: - + Solver failed to converge Solver failed to converge - + Under constrained: Nedovoljno ograničeno: - + %n DoF(s) %n Stepeni slobode @@ -5342,7 +5335,7 @@ Ovo se radi analizom geometrije i ograničenja skice. - + Fully constrained Potpuno ograničen @@ -5440,8 +5433,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Kotiraj prečnik kruga ili luka @@ -5449,7 +5442,8 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Kotiraj poluprečnik/prečnik krugova ili lukova @@ -5457,20 +5451,12 @@ Ovo se radi analizom geometrije i ograničenja skice. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Kotiraj poluprečnik kruga ili luka - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Kotiraj poluprečnik/prečnik krugova ili lukova - - Sketcher_Copy @@ -6087,7 +6073,7 @@ Eigen redak QR algoritam je optimizovan za retke matrice; obično brže ViewProviderSketch - + and %1 more i %1 više @@ -6310,7 +6296,7 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Skica ima delimično suvišna ograničenja! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6321,7 +6307,7 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. - + @@ -6346,7 +6332,7 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. - + @@ -6369,13 +6355,13 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Ograničenje ima pogrešne indeksne informacije tako da je neispravno. - - - - - - - + + + + + + + @@ -6386,7 +6372,7 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. - + Failed to add arc Dodavanje luka nije uspelo @@ -6500,7 +6486,7 @@ Razmak mreže se menja ako postane manji od ovog broja piksela. Dodavanje kutije nije uspelo - + Failed to add rounded rectangle Dodavanje zaobljenog pravougaonika nije uspelo @@ -6682,18 +6668,18 @@ Tačke se moraju nalaziti na udaljenosti manjoj od 1/5 razmaka linija mreže da CmdSketcherDimension - + Dimension Kota - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Ograniči kontekstualno na osnovu izbora. -U zavisnosti od izbora, moguće je na raspolaganju imati nekoliko vrsta ograničenja. Možeš da se krećeš kroz njih pomoću tastera SHIFT. -Levi klik na prazan prostor potvrdiće trenutno ograničenje. Desni klik ili pritisak na Esc će poništiti. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6712,14 +6698,27 @@ Levi klik na prazan prostor potvrdiće trenutno ograničenje. Desni klik ili pr CmdSketcherCompDimensionTools - + Dimension Kota - + Dimension tools. Alatke za kotiranje. + + CmdSketcherConstrainRadius + + + Constrain radius + Ograničenje poluprečnika + + + + Fix the radius of a circle or an arc + Kotiraj poluprečnik kruga ili luka + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts index 2d0630fb06..08c573bf5b 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sr.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Ограничење кружног лука или круга - + Constrain an arc or a circle Котирај кружни лук или круг - + Constrain radius Ограничење полупречника - + Constrain diameter Ограничење пречника - + Constrain auto radius/diameter Аутоматско ограничење полупречника и пречника @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Ограничење угла - + Fix the angle of a line or the angle between two lines Котирај угао линије или угао између две линије @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Ограничавање блокирањем - + Block the selected edge from moving Блокира померање изабране ивице @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Ограничење подударности - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Направи ограничење подударности између тачака или концентрично ограничење између кругова, лукова и елипса @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Ограничење пречника - + Fix the diameter of a circle or an arc Котирај пречник круга или лука @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Ограничење растојања - + Fix a length of a line or the distance between a line and a vertex or between two circles Котирај дужину линије, растојање између линије и темена или растојање између два круга @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Ограничење хоризонталног растојања - + Fix the horizontal distance between two points or line ends Котирај хоризонтално растојање између две тачке или крајева линија @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Ограничење вертикалног растојања - + Fix the vertical distance between two points or line ends Котирај вертикално растојање између две тачке или крајева линија @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Ограничење једнакости - + Create an equality constraint between two lines or between circles and arcs Направи ограничење једнакости између две линије или између кругова и лукова @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Ограничење хоризонталности - + Create a horizontal constraint on the selected item Направи ограничење хоризонталности на изабраној ставки @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Ограничавање закључавањем - + Create both a horizontal and a vertical distance constraint on the selected vertex Направи ограничење хоризонталног и вертикалног растојања на изабраном темену @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Ограничење паралелности - + Create a parallel constraint between two lines Направи ограничење паралелности између две линије @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Ограничење управности - + Create a perpendicular constraint between two lines Направи ограничење управности између два геометријска елемента @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Ограничење тачка на објекту - + Fix a point onto an object Ограничење тачке да буде везана за објекат @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Аутоматско ограничење полупречника и пречника - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Котирај пречник ако изабереш круг или полупречник ако изабереш лук или пол сплајна - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Котирај полупречник - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Котирај полупречник круга или лука или котирајте круг тежине пола Б-сплајн криве - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Ограничење рефракције (Снеллов закон) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Направи ограничење рефракције (Снеллов закон) између две крајње тачке зрака @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Ограничење симетричности - + Create a symmetry constraint between two points with respect to a line or a third point Направи ограничење симетричности између две тачке @@ -614,12 +601,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Ограничење тангентности - + Create a tangent constraint between two entities Направи тангентно ограничење између два ентитета @@ -627,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Ограничење вертикалности - + Create a vertical constraint on the selected item Направи ограничење вертикалности на изабраној ставки @@ -1490,12 +1477,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Активирај/деактивирај ограничење - + Activates or deactivates the selected constraints Активира или деактивира изабрана ограничења @@ -1516,12 +1503,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Ограничавајуће/референтне коте - + Set the toolbar, or the selected constraints, into driving or reference mode Подеси палету са алаткама или изабрана ограничења, @@ -1595,370 +1582,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Додај хоризонтално ограничење - - - + + + Add horizontal alignment Додај хоризонтално поравнање - - + + Add vertical constraint Додај вертикално ограничење - + Add vertical alignment Додај вертикално поравнање - + Add 'Lock' constraint Додај ограничавање закључавањем - + Add relative 'Lock' constraint Додај релативно ограничење закључавањем - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Додај ограничавање блокирањем - + Add block constraint Додај ограничавање блокирањем - - - + + + Add coincident constraint Додај ограничење подударности - - + + Add distance from horizontal axis constraint Додај коту растојања од хоризонталне осе - - + + Add distance from vertical axis constraint Додај коту растојања од вертикалне осе - - + + Add point to point distance constraint Додај коту вертикалног растојања од тачке до тачке - - - + + + Add point to line Distance constraint Додај коту растојања од тачке до линије - - + + Add circle to circle distance constraint Додај ограничење између два круга - + Add circle to line distance constraint Додај ограничење растојања од круга до линије - - - - - - + + + + + + Add length constraint Додај ограничење дужине - - + + + Dimension Кота - + Add lock constraint Додај ограничење закључавањем - + Add 'Distance to origin' constraint Додај ограничење 'Растојање од координатног почетка' - - - + + + Add Distance constraint Додај ограничење растојања - - - + + + Add 'Horizontal' constraints Додај 'хоризонтална' ограничења - - - + + + Add 'Vertical' constraints Додај 'вертикална' ограничења - - + + Add Symmetry constraint Додај ограничење симетричности - - + + Add Symmetry constraints Додај ограничења симетричности - - + + Add Distance constraints Додај ограничења растојања - + Add Horizontal constraint Додај хоризонтално ограничење - + Add Vertical constraint Додај вертикално ограничење - + Add Block constraint Додај ограничење блокирањем - + Add Angle constraint Додај ограничење угла - - - - + + + + Add Equality constraint Додај ограничење једнакости - + Add Equality constraints Додај ограничења једнакости - + Add Radius constraint Додај ограничење полупречника - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Додај ограничење концентричности и растојања - + Add DistanceX constraint Додај ограничење растојање X - + Add DistanceY constraint Додај ограничење растојање Y - + Add point to circle Distance constraint Додај ограничење растојања од тачке до кружнице - - + + Add point on object constraint Додај тачку на ограничење објекта - - + + Add point to point horizontal distance constraint Додај ограничење хоризонталног растојања од тачке до тачке - + Add fixed x-coordinate constraint Додај ограничење фиксне x-координате - - + + Add point to point vertical distance constraint Додај ограничење вертикалног растојања од тачке до тачке - + Add fixed y-coordinate constraint Додај ограничење фиксне y-координате - - + + Add parallel constraint Додај ограничење паралелности - - - - - - - + + + + + + + Add perpendicular constraint Додај ограничење управности - + Add perpendicularity constraint Додај ограничење управности - + Swap coincident+tangency with ptp tangency Замени подударност+тангентност на тангентност тачака - + Swap PointOnObject+tangency with point to curve tangency Замени тачка на објекту+тангентност са тангентност тачке на криву - - - - - - - + + + + + + + Add tangent constraint Додај ограничење тангентности - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Додај тачку ограничења тангентности - - - - + + + + Add radius constraint Додај ограничење полупречника - - - - + + + + Add diameter constraint Додај ограничење пречника - - - - + + + + Add radiam constraint Додај ограничење полупречник-пречник - - - - - - + + + + + + Add angle constraint Додај ограничење угла - - + + Add equality constraint Додај ограничење једнакости - - - - - + + + + + Add symmetric constraint Додај ограничење симетричности - + Add Snell's law constraint Додај ограничење на основу Снелловог закона - + Toggle constraint to driving/reference Пребаци између референтног и ограничавајућег режима кота - + Activate/Deactivate constraint Активирај/деактивирај ограничење @@ -2034,7 +2027,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Додај скицу кружног лука @@ -2285,59 +2278,59 @@ invalid constraints, degenerated geometry, etc. Грешка аутоматског ограничавања: Нерешива скица после примене ограничења једнакости. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Није могуће одредити пресечну тачку кривих. Покушај да додаш ограничење подударности између тачака кривих где намераваш да направиш заобљење. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline Geometry Index (GeoID) is out of bounds. - + You are requesting no change in knot multiplicity. Не захтевате промену у вишеструкости чворова. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. The Geometry Index (GeoId) provided is not a B-spline curve. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. Вишеструкост се не може повећати изнад степена Б-сплајн криве. - + The multiplicity cannot be decreased beyond zero. Вишеструкост не може бити мање од нуле. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC није у стању да смањи вишеструкост унутар максималне толеранције. - + Knot cannot have zero multiplicity. Чвор не може имати нулту вишеструкост. - + Knot multiplicity cannot be higher than the degree of the BSpline. Вишеструкост чворова не може бити већа од степена Б-Сплајн криве. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2405,134 +2398,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2580,329 +2573,329 @@ invalid constraints, degenerated geometry, etc. Димензионално ограничење - + Cannot add a constraint between two external geometries. Није могуће додати ограничење између две спољне геометрије. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Није могуће додати ограничење између две фиксне геометрије. Под фиксном геометријом подразумевамо спољашњу геометрију, блокирану геометрију и посебне тачке као што су тачке чворова Б-сплајн криве. - + Sketcher Constraint Substitution Замена Sketcher ограничења - + Keep notifying me of constraint substitutions Настави да ме обавештаваш о заменама ограничења - - - + + + Only sketch and its support are allowed to be selected. Дозвољено је да се изабере само скица и њена основа. - + One of the selected has to be on the sketch. Један од изабраних мора бити на скици. - - + + Select an edge from the sketch. Изабери ивицу из скице. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Немогуће ограничење - - - - + + + + The selected edge is not a line segment. Изабрана ивица није линијски сегмент. - - - - - - + + + + + + Double constraint Дупло ограничење - - - - - + + + + + The selected edge already has a horizontal constraint! Изабрана ивица већ има хоризонтално ограничење! - - - + + + The selected edge already has a vertical constraint! Изабрана ивица већ има вертикално ограничење! - - - - - - + + + + + + The selected edge already has a Block constraint! Изабрана ивица је већ ограничена блокирањем! - + The selected item(s) can't accept a horizontal constraint! Изабране ставке(а) не могу прихватити хоризонтално ограничење! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Изабрано је више од једне фиксне тачке. Изабери највише једну фиксну тачку! - + The selected item(s) can't accept a vertical constraint! Изабране ставке(а) не могу прихватити вертикално ограничење! - - - + + + Select vertices from the sketch. Изабери темена са скице. - + Select one vertex from the sketch other than the origin. Изабери једно теме са скице осим координатног почетка. - + Select only vertices from the sketch. The last selected vertex may be the origin. Изабери само темена са скице. Последње изабрано теме може бити координатни почетак. - + Wrong solver status Погрешан статус алгоритма за решавање - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Ограничење блокирањем се не може додати ако је скица нерешена или постоје сувишна и конфликтна ограничења. - + Select one edge from the sketch. Изабери једну ивицу са скице. - + Select only edges from the sketch. Изабери само ивице са скице. - + Number of selected objects is not 3 Број изабраних објеката није 3 - + Error Грешка - + Unexpected error. More information may be available in the Report View. Неочекивана грешка. Потражите више информација у Прегледачу објава. - + Endpoint to endpoint tangency was applied instead. Уместо тога је примењена тангентност у крајњим тачкама. - + Select two or more points from the sketch. Изабери две или више тачке са скице. - + Select two or more vertices from the sketch. Изабери два или више темена са скице. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Изабери два или више темена са скице за ограничење подударности, или два или више кругова, елипса, лукова или лукова елипсе за ограничење концентричности. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Изабери два темена са скице за ограничење подударности, или два круга, елипсе, лукове или лукове елипсе за ограничење концентричности. - + Select exactly one line or one point and one line or two points from the sketch. Изабери тачно једну линију или једну тачку и једну линију, или две тачке из скице. - + Cannot add a length constraint on an axis! Не може се додати ограничење дужине на осу! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Изабери тачно једну линију, једну тачку и једну линију, две тачке или два круга на скици. - + This constraint does not make sense for non-linear curves. Ово ограничење нема смисла за нелинеарне криве. - + Endpoint to edge tangency was applied instead. Уместо тога је примењена тангентност ивице у крајњој тачки. - - - - - - - + + + + + + + Select the right things from the sketch. Изабери праве ствари са скице. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Изабери ивицу која није тежина Б-сплајн контролне тачке. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Ниједна од изабраних тачака није била ограничена на дотичне криве, јер су делови истог елемента, јер су обе спољашње геометрије или зато што ивица није прихватљива. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ниједна од изабраних тачака није била ограничена на одговарајуће криве, било зато што су делови истог елемента, или зато што су обе спољашње геометрије. - - - - + + + + Select exactly one line or up to two points from the sketch. Изабери тачно једну линију или највише две тачке са скице. - + Cannot add a horizontal length constraint on an axis! Не може се применити ограничење хоризонтално растојање на осу! - + Cannot add a fixed x-coordinate constraint on the origin point! Није могуће ограничити x-координату координатног почетка! - - + + This constraint only makes sense on a line segment or a pair of points. Ово ограничење има смисла само на сегменту линије или пару тачака. - + Cannot add a vertical length constraint on an axis! Не може се применити ограничење вертикално растојање на осу! - + Cannot add a fixed y-coordinate constraint on the origin point! Није могуће ограничити y-координату координатног почетка! - + Select two or more lines from the sketch. Изабери две или више линија са скице. - - + + Select at least two lines from the sketch. Изабери најмање две линије са скице. - + Select a valid line. Изабери важећу ивицу. - - + + The selected edge is not a valid line. Изабрана ивица није важећа линија. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Прихватљиве комбинације: две криве; крајња тачка и крива; две крајње тачке; две криве и тачка. - + Select some geometry from the sketch. perpendicular constraint Изабери неку геометрију из скице. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не може се додати ограничење управности на тачку пошто она није крајња тачка! - - - + + + Perpendicular to B-spline edge currently unsupported. Примена ограничења управности на Б-сплајн криву тренутно није подржана. - - + + One of the selected edges should be a line. Једна од изабраних ивица би требала бити линија. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Примењена је тангентност на крајње тачке. Ограничење подударности је избрисано. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Примењена је тангентност између крајње тачке и ивице. Ограничење тачка на објекту је обрисано. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2957,182 +2950,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Прихваћене комбинације: две криве; крајња тачка и крива; две крајње тачке; две криве и тачка. - + Select some geometry from the sketch. tangent constraint Изабери неку геометрију из скице. - - - + + + Cannot add a tangency constraint at an unconnected point! Не може се додати ограничење тангентности у тачкама које се не поклапају! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. Уместо тога је примењена тангентност између чвора Б-сплајна и крајње тачке. - + Select either one point and several curves, or one curve and several points. Изабери или једну тачку и неколико кривих, или једну криву и неколико тачака. - - + + Wrong number of selected objects! Погрешан број изабраних објеката! - - + + With 3 objects, there must be 2 curves and 1 point. Код 3 објекта, морају постојати 2 криве и 1 тачка. - - - + + + Tangency to B-spline edge currently unsupported. Примена ограничења тангентности на Б-сплајн криву тренутно није подржана. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Изабери један или више лукова или кругова са скице. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Изабери само један или више полова Б-сплајн криве или само један или више лукова или кругова са скице, али не помешано. - - - + + + Constraint only applies to arcs or circles. Ограничење се односи само на лукове и кружнице. - - + + Select one or two lines from the sketch. Or select two edges and a point. Изабери једну или две линије са скице, или изаберите две ивице и тачку. - - + + Parallel lines Паралелне линије - - + + An angle constraint cannot be set for two parallel lines. За две паралелне праве не може се поставити ограничење угла. - + Cannot add an angle constraint on an axis! Не можете додати ограничење угла на осу! - + Select two edges from the sketch. Изабери две ивице са скице. - + Select two or more compatible edges. Изабери две или више компатибилних ивица. - + Sketch axes cannot be used in equality constraints. На осе скице се не може применити ограничење једнакости. - + Equality for B-spline edge currently unsupported. Примена ограничења једнакости на Б-сплајн криву тренутно није подржана. - - - - + + + + Select two or more edges of similar type. Изабери две или више ивица сличног типа. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Изабери две тачке и линију симетрије, две тачке и тачку симетрије или праву и тачку симетрије са скице. - - + + Cannot add a symmetry constraint between a line and its end points. Није могуће додати ограничење симетричности између линије и њених крајњих тачака. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Није могуће додати ограничење симетричности између линије и њених крајњих тачака! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Изабери две крајње тачке линија које ће деловати као зраци и ивицу која представља границу. Прва изабрана тачка одговара индексу лома н1, друга н2, а однос н2/н1 је релативни индекс лома. - + Selected objects are not just geometry from one sketch. Изабрани објекти нису само геометрија из једне скице. - + Cannot create constraint with external geometry only. Није могуће креирати ограничење само са спољном геометријом. - + Incompatible geometry is selected. Изабрана је некомпатибилна геометрија. - + SnellsLaw on B-spline edge is currently unsupported. Примена ограничења рефракције (Снеллов закон) на Б-сплајн криву тренутно није подржана. - - - - - + + + + + Select constraints from the sketch. Изабери ограничења са скице. @@ -3631,12 +3624,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Дужина: - + Refractive index ratio Релативни индекс лома - + Ratio n2/n1: Однос n2/n1: @@ -5228,112 +5221,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Измени скицу - + A dialog is already open in the task panel Дијалог је већ отворен у панелу задатака - + Do you want to close this dialog? Да ли желите да затворите овај дијалог? - + Invalid sketch Неисправна скица - + Do you want to open the sketch validation tool? Да ли желиш да отвориш алатку за проверу скице? - + The sketch is invalid and cannot be edited. Скица садржи грешке и не може бити мењана. - + Please remove the following constraint: Уклони следеће ограничење: - + Please remove at least one of the following constraints: Уклони бар једно од следећих ограничења: - + Please remove the following redundant constraint: Уклони следеће сувишно ограничење: - + Please remove the following redundant constraints: Уклони следећа сувишна ограничења: - + The following constraint is partially redundant: Следеће ограничење је сувишно: - + The following constraints are partially redundant: Следећа ограничења су сувишна: - + Please remove the following malformed constraint: Уклони следеће оштећено ограничење: - + Please remove the following malformed constraints: Уклони следеће оштећена ограничења: - + Empty sketch Празна скица - + Over-constrained: Превише ограничено: - + Malformed constraints: Оштећена ограничења: - + Redundant constraints: Сувишна ограничења: - + Partially redundant: Делимично сувишна: - + Solver failed to converge Solver failed to converge - + Under constrained: Недовољно ограничено: - + %n DoF(s) %n Степени слободе @@ -5342,7 +5335,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Потпуно ограничен @@ -5440,8 +5433,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Котирај пречник круга или лука @@ -5449,7 +5442,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Котирај полупречник/пречник кругова или лукова @@ -5457,20 +5451,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Котирај полупречник круга или лука - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Котирај полупречник/пречник кругова или лукова - - Sketcher_Copy @@ -6087,7 +6073,7 @@ Eigen редак QR алгоритам је оптимизован за ретк ViewProviderSketch - + and %1 more и %1 више @@ -6310,7 +6296,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Скица има делимично сувишна ограничења! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6321,7 +6307,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6346,7 +6332,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6369,13 +6355,13 @@ The grid spacing change if it becomes smaller than this number of pixel.Ограничење има погрешне индексне информације тако да је неисправно. - - - - - - - + + + + + + + @@ -6386,7 +6372,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Додавање лука није успело @@ -6500,7 +6486,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Додавање кутије није успело - + Failed to add rounded rectangle Додавање заобљеног правоугаоника није успело @@ -6682,18 +6668,18 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Кота - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. - Ограничи контекстуално на основу избора. -У зависности од избора, могуће је на располагању имати неколико врста ограничења. Можеш да се крећеш кроз њих помоћу тастера SHIFT. -Леви клик на празан простор потврдиће тренутно ограничење. Десни клик или притисак на Esc ће поништити. + Constrain contextually based on your selection. +Depending on your selection you might have several constraints available. You can cycle through them using M key. +Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6712,14 +6698,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Кота - + Dimension tools. Алатке за котирање. + + CmdSketcherConstrainRadius + + + Constrain radius + Ограничење полупречника + + + + Fix the radius of a circle or an arc + Котирај полупречник круга или лука + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts index 0b1a4fa3f1..69af870bce 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_sv-SE.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Begränsa båge eller cirkel - + Constrain an arc or a circle Begränsa en båge eller cirkel - + Constrain radius Begränsa radie - + Constrain diameter Begränsa diameter - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Begränsa vinkel - + Fix the angle of a line or the angle between two lines Fixera en linjes vinkel eller vinkeln mellan två linjer @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Begränsa sammanfallande - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Begränsa diameter - + Fix the diameter of a circle or an arc Fixera diametern av en cirkel eller en båge @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Begränsningsavstånd - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Begränsa horisontellt avstånd - + Fix the horizontal distance between two points or line ends Fixera det horisontella avståndet mellan två punkter eller linjeändar @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Begränsa vertikalt avstånd - + Fix the vertical distance between two points or line ends Fixera det vertikala avståndet mellan två punkter eller linjeändar @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Begränsa lika - + Create an equality constraint between two lines or between circles and arcs Skapa en jämlikhetsbegränsning mellan två linjer eller mellan cirklar och cirkelbågar @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Begränsa horisontellt - + Create a horizontal constraint on the selected item Skapa en horisontell begränsning på den valda detaljen @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Begränsa lås - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Begränsa parallellt - + Create a parallel constraint between two lines Skapa en parallell begränsning mellan två linjer @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Begränsa vinkelrätt - + Create a perpendicular constraint between two lines Skapa en vinkelrät begränsning mellan två linjer @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Begränsa punkt på objekt - + Fix a point onto an object Fixera en punkt på ett objekt @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Constrain radius or weight - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Begränsa symmetriskt - + Create a symmetry constraint between two points with respect to a line or a third point Skapa en symmetribegränsning mellan två punkter @@ -615,12 +602,12 @@ med avseende på en linje eller tredje punkt CmdSketcherConstrainTangent - + Constrain tangent Begränsa tangens - + Create a tangent constraint between two entities Skapa en tangentbegränsning mellan två föremål @@ -628,12 +615,12 @@ med avseende på en linje eller tredje punkt CmdSketcherConstrainVertical - + Constrain vertically Begränsa vertikalt - + Create a vertical constraint on the selected item Skapa en vertikal begränsning på den markerade detaljen @@ -1492,12 +1479,12 @@ Detta kommer att rensa "stöd"-egenskapen, om den finns. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Aktiverar eller deaktiverar markerade begränsningar @@ -1518,12 +1505,12 @@ Detta kommer att rensa "stöd"-egenskapen, om den finns. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1597,370 +1584,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Add length constraint - - + + + Dimension Dimension - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2036,7 +2029,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Add sketch arc @@ -2287,59 +2280,59 @@ invalid constraints, degenerated geometry, etc. Auto-begränsningsfel: Olösbar skiss efter tillämpning av likhetsbegränsningar. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Kan inte finna skärning mellan kurvorna. Försök att lägga till en sammanfallande-begränsning mellan ändpunkterna på kurvorna du vill avrunda. - - + + BSpline Geometry Index (GeoID) is out of bounds. B-spline-geometriindex (GeoID) är inte giltigt. - + You are requesting no change in knot multiplicity. Du efterfrågar ingen ändring i knutmultipliciteten. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Geometriindex (GeoId) som är angivet är inte en B-spline-kurva. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Knutindex är inte giltigt. Notera att i enlighet med OCC-notation så har första knuten index 1 och inte index 0. - + The multiplicity cannot be increased beyond the degree of the B-spline. Multipliciteten kan inte ökas mer än graden av B-spline:n. - + The multiplicity cannot be decreased beyond zero. Multipliciteten kan inte minskas under 0. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC kan inte minsta multipliciteten inom den maximala toleransen. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2407,134 +2400,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ invalid constraints, degenerated geometry, etc. Dimensionell begränsning - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Välj en kant från skissen. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Omöjlig begränsning - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Dubbelbegränsning - - - - - + + + + + The selected edge already has a horizontal constraint! Den valda kanten har redan en horisontell begränsning! - - - + + + The selected edge already has a vertical constraint! Den valda kanten har redan en vertikal begränsning! - - - - - - + + + + + + The selected edge already has a Block constraint! Den valda kanten har redan en blockeringsbegränsning! - + The selected item(s) can't accept a horizontal constraint! Markerade objekt kan inte acceptera en horisontell begränsning! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Mer än en fast punkt är vald. Välj högst en fast punkt! - + The selected item(s) can't accept a vertical constraint! Markerade objekt kan inte acceptera en vertikal begränsning! - - - + + + Select vertices from the sketch. Välj hörnpunkter från skissen. - + Select one vertex from the sketch other than the origin. Välj en hörnpunkt från skissen som inte är origo. - + Select only vertices from the sketch. The last selected vertex may be the origin. Välj endast hörnpunkter från skissen. Den sist valda hörnpunkten kan vara origo. - + Wrong solver status Ogiltig status från problemlösaren - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Välj en kant i skissen. - + Select only edges from the sketch. Välj endast kanter i skissen. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Fel - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Slutpunkt till slutpunkt-tangering tillämpades istället. - + Select two or more points from the sketch. Välj två eller fler punkter från skissen. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Välj exakt en linje eller en punkt och en linje eller två punkter från skissen. - + Cannot add a length constraint on an axis! Kan inte lägga till längdbegränsning på en axel! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Välj de rätta sakerna från skissen. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Ingen av de valda punkterna begränsades till de respektive kurvorna, antingen för att de är delar av samma element eller för att båda är yttre geometri. - - - - + + + + Select exactly one line or up to two points from the sketch. Välj exakt en linje eller upp till två punkter från skissen. - + Cannot add a horizontal length constraint on an axis! Kan inte lägga till en horisontell längdbegränsning på en axel! - + Cannot add a fixed x-coordinate constraint on the origin point! Kan inte lägga till en fast x-koordinatsbegränsning på origo! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Kan inte lägga till en vertikal längdbegränsning på en axel! - + Cannot add a fixed y-coordinate constraint on the origin point! Kan inte lägga till en fast y-koordinatsbegränsning på origo! - + Select two or more lines from the sketch. Välj två eller flera linjer från skissen. - - + + Select at least two lines from the sketch. Välj åtminstone två linjer från skissen. - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2914,42 +2907,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunkter; två kurvor och en punkt. - + Select some geometry from the sketch. perpendicular constraint Välj geometri(er) från skissen. - - + + Cannot add a perpendicularity constraint at an unconnected point! Kan inte lägga till en vinkelräthetsbegränsning vid en oansluten punkt! - - - + + + Perpendicular to B-spline edge currently unsupported. Normal till en B-spline-kant stöds inte just nu. - - + + One of the selected edges should be a line. En av de markerade kanterna ska vara en linje. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Slutpunkt till slutpunkt-tangering tillämpades. Sammanfallningsbegränsningen raderades. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2959,182 +2952,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunkter; två kurvor och en punkt. - + Select some geometry from the sketch. tangent constraint Välj geometri(er) från skissen. - - - + + + Cannot add a tangency constraint at an unconnected point! Kan inte lägga till ett tangensbegränsning vid en oansluten punkt! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Felaktigt antal valda objekt! - - + + With 3 objects, there must be 2 curves and 1 point. Med tre objekt måste det vara två kurvor och en punkt. - - - + + + Tangency to B-spline edge currently unsupported. Tangering till B-spline-kant stöds inte just nu. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Markera en eller fler bågar eller cirklar från skissen. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. Begränsning tillämpas bara på bågar eller cirklar. - - + + Select one or two lines from the sketch. Or select two edges and a point. Välj en eller två linjer från skissen, eller två kanter och en punkt. - - + + Parallel lines Parallella linjer - - + + An angle constraint cannot be set for two parallel lines. En vinkelbegränsning kan inte tillämpas på två parallella linjer. - + Cannot add an angle constraint on an axis! Kan inte lägga till vinkelbegränsning på en axel! - + Select two edges from the sketch. Välj två kanter från skissen. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. Likhet för B-spline-kant stöds inte just nu. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Välj två punkter och en symmetrilinje, två punkter och en symmetripunkt eller en linje och en symmetripunkt från skissen. - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Kan inte lägga till symmetribegränsning mellan en linje och dess ändpunkter! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Valda objekt är inte geometri från endast en skiss. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. @@ -3633,12 +3626,12 @@ Accepterade kombinationer: två kurvor; en slutpunkt och en kurva; två slutpunk Längd: - + Refractive index ratio Brytningsindexsförhållande - + Ratio n2/n1: Förhållande n2/n1: @@ -5230,112 +5223,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Redigera skiss - + A dialog is already open in the task panel En dialogruta är redan öppen i uppgiftspanelen - + Do you want to close this dialog? Vill du stänga denna dialogruta? - + Invalid sketch Ogiltig skiss - + Do you want to open the sketch validation tool? Vill du öppna verktyget för skissvalidering? - + The sketch is invalid and cannot be edited. Skissen är ogiltig och kan inte redigeras. - + Please remove the following constraint: Ta bort följande begränsning: - + Please remove at least one of the following constraints: Ta bort minst en av följande begränsningar: - + Please remove the following redundant constraint: Ta bort följande redundanta begränsningen: - + Please remove the following redundant constraints: Ta bort följande redundanta begränsningarna: - + The following constraint is partially redundant: The following constraint is partially redundant: - + The following constraints are partially redundant: The following constraints are partially redundant: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch Tom skiss - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) @@ -5343,7 +5336,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fullständigt begränsad @@ -5441,8 +5434,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixera diametern av en cirkel eller en båge @@ -5450,7 +5443,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5458,20 +5452,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixera cirkelns eller cirkelbågens radie - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc - - Sketcher_Copy @@ -6088,7 +6074,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more and %1 more @@ -6311,7 +6297,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6322,7 +6308,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6347,7 +6333,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6370,13 +6356,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6387,7 +6373,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6501,7 +6487,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6683,17 +6669,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimension - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6713,14 +6699,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimension - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Begränsa radie + + + + Fix the radius of a circle or an arc + Fixera cirkelns eller cirkelbågens radie + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts index 0b8dec6b3f..c8224e8ade 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_tr.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Yay ya da çemberi kısıtla - + Constrain an arc or a circle Bir yayı ya da bir çemberi kısıtla - + Constrain radius Yarıçapı sınırla - + Constrain diameter Çapı sınırla - + Constrain auto radius/diameter Yarı çapı/çapı otomatik kısıtla @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Açı sınırlandır - + Fix the angle of a line or the angle between two lines Bir çizginin açısını veya iki çizgi arasındaki açıyı düzeltin @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Kısıtlamayı Engelle - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Çakıştır - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Çapı sınırla - + Fix the diameter of a circle or an arc Bir çemberin veya bir yayın yarıçapını düzelt @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Mesafeyi sınırla - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends İki nokta veya çizgi uçları arasındaki yatay mesafeyi sabitleyin @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Dikey mesafeyi kısıtla - + Fix the vertical distance between two points or line ends İki nokta veya çizgi ucu arasındaki dikey mesafeyi düzeltin @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Eşitle - + Create an equality constraint between two lines or between circles and arcs İki çizginin veya dairelerin ve yayların değerlerini eşitleyin (kısıtlaması oluşturun) @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Yatay yap - + Create a horizontal constraint on the selected item Seçili öğede yatay bir sınırlama oluşturur @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Kısıtlama kilidi - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Paralel yap - + Create a parallel constraint between two lines İki çizgi arasında paralel kısıtlama oluşturun @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Dikey yap - + Create a perpendicular constraint between two lines İki çizgi arasında dikey bir kısıtlama oluşturun @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Noktayı nesneye çakıştır - + Fix a point onto an object Teğetsel kısıtlama oluştur @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Yarı çapı/çapı otomatik kısıtla - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Yarıçapı veya ağırlığı sınırlayın - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Bir çemberin veya bir yayın yarıçapını düzeltin veya bir B-Spline'ın bir ucunun kalınlığını sabitleyin - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Simetrik kısıtlama - + Create a symmetry constraint between two points with respect to a line or a third point Bir çizgi veya üçüncü bir noktaya göre, iki nokta arasında simetri sınırlaması oluştur @@ -614,12 +601,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Teğet yap - + Create a tangent constraint between two entities İki öğe arasında teğetsel kısıtlama oluşturun @@ -627,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Dikey yap - + Create a vertical constraint on the selected item Seçilen öğeye dikey kısıtlama oluşturun @@ -1488,12 +1475,12 @@ Bu, eğer varsa, 'Destek' özelliğini temizler. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Kısıtlamayı etkinleştir / devre dışı bırak - + Activates or deactivates the selected constraints Seçili kısıtlamaları etkinleştirir veya devre dışı bırakır @@ -1514,12 +1501,12 @@ Bu, eğer varsa, 'Destek' özelliğini temizler. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Sevk / referans kısıtlamasını değiştir - + Set the toolbar, or the selected constraints, into driving or reference mode Araç çubuğunu veya seçili kısıtlamaları, @@ -1593,370 +1580,376 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Command - - + + Add horizontal constraint Yataylık sınırlaması ekle - - - + + + Add horizontal alignment Yatay hizalama ekle - - + + Add vertical constraint Dikeylik sınırlaması ekle - + Add vertical alignment Dikey hizalama ekle - + Add 'Lock' constraint 'Kilitleme' sınırlaması ekle - + Add relative 'Lock' constraint Bağıl 'Kilitleme' sınırlaması ekle - + Add fixed constraint Sabitleme sınırlaması ekle - + Add 'Block' constraint 'Blok' kısıtlaması ekle - + Add block constraint Blok kısıtlaması ekle - - - + + + Add coincident constraint Çakışıklık sınırlaması ekle - - + + Add distance from horizontal axis constraint Yatay eksen sınırlamasından mesafe ekle - - + + Add distance from vertical axis constraint Dikey eksen sınırlamasından mesafe ekle - - + + Add point to point distance constraint 'Noktadan noktaya mesafe' sınırlaması ekle - - - + + + Add point to line Distance constraint 'Noktadan çizgiye mesafe' sınırlaması ekle - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Uzunluk sınırlaması ekle - - + + + Dimension Boyut - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 'Nesne üzerindeki bir nokta' sınırlaması ekle - - + + Add point to point horizontal distance constraint 'Noktadan noktaya yatay mesafe' sınırlaması ekle - + Add fixed x-coordinate constraint Sabit x koordinatı sınırlaması ekle - - + + Add point to point vertical distance constraint 'Noktadan noktaya dikey mesafe' sınırlaması ekle - + Add fixed y-coordinate constraint Sabit y koordinatı sınırlaması ekle - - + + Add parallel constraint Paralellik sınırlaması ekle - - - - - - - + + + + + + + Add perpendicular constraint Diklik sınırlaması ekle - + Add perpendicularity constraint Diklik kısıtlaması ekle - + Swap coincident+tangency with ptp tangency Çakışıklık+teğetliği noktadan noktaya teğetlik ile değiştir - + Swap PointOnObject+tangency with point to curve tangency NesneÜzerindeNokta+teğetlik işlevini eğri teğetliğine nokta işlevi ile değiştir - - - - - - - + + + + + + + Add tangent constraint Teğetlik sınırlaması ekle - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Teğetlik sınırlama noktası ekle - - - - + + + + Add radius constraint Yarıçap sınırlaması ekle - - - - + + + + Add diameter constraint Çap sınırlaması ekle - - - - + + + + Add radiam constraint Yarıçap kısıtlaması ekle - - - - - - + + + + + + Add angle constraint Açı sınırlaması ekle - - + + Add equality constraint Eşitlik sınırlaması ekle - - - - - + + + + + Add symmetric constraint Simetriklik sınırlaması ekle - + Add Snell's law constraint 'Snell kanunu' sınırlaması ekle - + Toggle constraint to driving/reference Kısıtlamayı sevk/referans olarak değiştir - + Activate/Deactivate constraint Kısıtlamayı etkinleştir / devre dışı bırak @@ -2032,7 +2025,7 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. - + Add sketch arc Eskiz yayı ekle @@ -2283,59 +2276,59 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Otomatik kısıtlama hatası: Eşitlik kısıtlamaları uygulandıktan sonra eskiz çözülemez. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Eğrilerin kesişimini tahmin edemiyoruz. Dilimlemeyi planladığınız eğrilerin köşeleri arasında çakışan bir kısıtlama eklemeyi deneyin. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline Geometri Dizini (GeoID) sınırların dışında. - + You are requesting no change in knot multiplicity. Düğüm çokluğunda herhangi bir değişiklik istemiyorsunuz. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Sağlanan Geometri Dizini (GeoId) bir B-spline eğrisi değil. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Düğüm endeksi sınırların dışındadır. OCC gösterimine göre, ilk düğümün indeks 1'i olduğunu ve sıfır olmadığını unutmayın. - + The multiplicity cannot be increased beyond the degree of the B-spline. Çeşitlilik, B-spline'nın derecesinin ötesinde artırılamaz. - + The multiplicity cannot be decreased beyond zero. Çokluk sıfırdan aşağıya düşürülemez. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC, maksimum tolerans dahilinde çokluğu azaltamıyor. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2403,134 +2396,134 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2578,329 +2571,329 @@ bozulmuş geometriye vb. bakarak bir eskizi doğrulayın. Boyutsal kısıtlama - + Cannot add a constraint between two external geometries. İki harici geometri arasına bir sınırlama eklenemez. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Kısıtlaması Değişimi - + Keep notifying me of constraint substitutions Kısıtlama yer değişikliklerinde beni uyarmaya devam et - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Taslaktan bir kenar seç - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint İmkansız kısıt - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Çift kısıtlama - - - - - + + + + + The selected edge already has a horizontal constraint! Seçilen kenar zaten yatay bir kısıtlamaya sahip! - - - + + + The selected edge already has a vertical constraint! Seçilen kenar zaten dikey bir kısıtlamaya sahip! - - - - - - + + + + + + The selected edge already has a Block constraint! Seçilen kenarın zaten bir Blok kısıtlaması var! - + The selected item(s) can't accept a horizontal constraint! Seçilen öğeler yatay bir sınırlamayı kabul edemez! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Seçilen birden fazla sabit nokta vardır. En fazla bir tane sabit nokta seçin! - + The selected item(s) can't accept a vertical constraint! Seçilen öğeler dikey kısıtlamayı kabul edemez! - - - + + + Select vertices from the sketch. Eskiden krokileri seçin. - + Select one vertex from the sketch other than the origin. Köşeden başka bir taslaktan bir köşe seçin. - + Select only vertices from the sketch. The last selected vertex may be the origin. Eskiden sadece köşeleri seçin. Son seçilen köşe orijin olabili. - + Wrong solver status Yanlış çözücü durumu - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Çizim çözülmediyse veya gereksiz ve çelişen kısıtlamalar varsa bir Blok kısıtlaması eklenemez. - + Select one edge from the sketch. Eskizden bir kenar seçin. - + Select only edges from the sketch. Eskizden sadece kenarları seçin. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Hata - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. Bunun yerine, uç noktalar arasında teğetsel bir kısıtlama uygulandı. - + Select two or more points from the sketch. Eskiden iki veya daha fazla nokta seçin. - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Çizimden tam olarak bir çizgi veya bir nokta ve bir çizgi veya iki nokta seçin. - + Cannot add a length constraint on an axis! Bir eksende bir uzunluk sınırlaması eklenemiyor! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Bunun yerine, kenar teğetliğine bitiş noktası uygulandı. - - - - - - - + + + + + + + Select the right things from the sketch. Eskiden eskizlerden birini seçin. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Seçilen noktaların hiçbiri, aynı elemanın parçaları oldukları, her ikisi de harici geometri oldukları için veya kenar uygun olmadığı için ilgili eğrilerle sınırlandırılmadı. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Seçilen noktalardan hiçbiri ilgili eğrilere aynı elemanın parçaları olduğu için ya da ikisi de harici geometri olduğu için kısıtlanmış değildi. - - - - + + + + Select exactly one line or up to two points from the sketch. Çizimden tam olarak bir çizgi veya en fazla iki nokta seçin. - + Cannot add a horizontal length constraint on an axis! Bir eksene yatay uzunluk kısıtlaması eklenemez! - + Cannot add a fixed x-coordinate constraint on the origin point! Orijin noktasına sabit bir x-koordinat kısıtlaması eklenemiyor! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! Bir eksene dikey uzunluk kısıtı eklenemiyor! - + Cannot add a fixed y-coordinate constraint on the origin point! Orijin noktasına sabit bir y-koordinat kısıtlaması eklenemiyor! - + Select two or more lines from the sketch. Eskizden iki veya daha fazla çizgi seçin. - - + + Select at least two lines from the sketch. Çizimden en az iki satır seçin. - + Select a valid line. Geçerli bir çizgi seçin. - - + + The selected edge is not a valid line. Seçilen kenar geçerli bir çizgi değil. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2910,42 +2903,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokta; iki eğri ve bir nokta. - + Select some geometry from the sketch. perpendicular constraint Eskizden bazı geometriyi seçin. - - + + Cannot add a perpendicularity constraint at an unconnected point! Bağlantısız bir noktaya diklik kısıtı eklenemiyor! - - - + + + Perpendicular to B-spline edge currently unsupported. B-spline kenarına dikey şu anda desteklenmiyor. - - + + One of the selected edges should be a line. Seçilen kenarlardan bir tanesi bir çizgi olmalıdır. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Uç noktalar arasında teğetsel bir kısıtlama uygulandı. Çakışık kısıtlama silindi. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Kenar teğetliğine bitiş noktası uygulandı. 'Nesne üzerinde nokta' kısıtlaması silindi. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,182 +2948,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokta; iki eğri ve bir nokta. - + Select some geometry from the sketch. tangent constraint Eskizden bazı geometriyi seçin. - - - + + + Cannot add a tangency constraint at an unconnected point! Bağlantısız bir noktaya bir teğet sınırlaması eklenemiyor! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! Seçilen nesnelerin sayısı yanlış! - - + + With 3 objects, there must be 2 curves and 1 point. 3 nesneyle 2 eğri ve 1 nokta olmalıdır. - - - + + + Tangency to B-spline edge currently unsupported. Şu anda desteklenmeyen B-spline kenarlığı için teğet. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Eskizden bir veya daha fazla yay veya daire seçin. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Yalnızca bir veya daha fazla B-Spline kutbu veya eskizden yalnızca bir veya daha fazla yay veya daire seçin, ancak karıştırmayın. - - - + + + Constraint only applies to arcs or circles. Kısıtlama yalnızca yaylar veya daireler için geçerlidir. - - + + Select one or two lines from the sketch. Or select two edges and a point. Çizimden bir veya iki çizgi seçin. Ya da iki kenar ve bir nokta seçin. - - + + Parallel lines Paralel çizgiler - - + + An angle constraint cannot be set for two parallel lines. İki paralel çizgi için açı sınırlaması ayarlanamaz. - + Cannot add an angle constraint on an axis! Bir eksene açı sınırlaması eklenemiyor! - + Select two edges from the sketch. Eskizden iki kenar seçin. - + Select two or more compatible edges. İki veya daha fazla uyumlu kenar seçin. - + Sketch axes cannot be used in equality constraints. Eskiz ekseni eşitlik kısıtlamalarında kullanılamaz. - + Equality for B-spline edge currently unsupported. B-spline kenarı için eşitlik şu anda desteklenmiyor. - - - - + + + + Select two or more edges of similar type. Benzer tipte iki veya daha fazla kenar seçin. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Eskizden iki nokta ve bir simetri çizgisi, iki nokta ve bir simetri noktası veya bir çizgi ve bir simetri noktası seçin. - - + + Cannot add a symmetry constraint between a line and its end points. Bir çizgi ve uç noktaları arasına simetrik kısıtlama eklenemez. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Bir çizgi ile bitiş noktaları arasında bir simetri kısıtı eklenemez! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Işınlar olarak işlev görecek iki çizgi uç noktası ve bir sınırı temsil eden bir kenar seçin. İlk seçilen nokta indeks n1'e, ikincisi n2'ye karşılık gelir ve sıfır değeri n2 / n1 oranını ayarlar. - + Selected objects are not just geometry from one sketch. Seçilen nesneler sadece bir taslaktaki geometri değildir. - + Cannot create constraint with external geometry only. Sadece dış geometri ile kısıtlama oluşturulamaz. - + Incompatible geometry is selected. Uyumsuz geometri seçildi. - + SnellsLaw on B-spline edge is currently unsupported. B-serbest eğri kenarı üzerinde Snell Kanunu şu an desteklenmiyor. - - - - - + + + + + Select constraints from the sketch. Eskizden sınırlamaları seçin. @@ -3629,12 +3622,12 @@ Kabul edilen kombinasyonlar: iki eğri; bir son nokta ve bir eğri; iki uç nokt Uzunluk: - + Refractive index ratio Refraktif indeks oranı - + Ratio n2/n1: Oran n2/n1: @@ -5222,112 +5215,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Taslağı düzenle - + A dialog is already open in the task panel Araç çubuğunda bir pencere zaten açık - + Do you want to close this dialog? Bu pencereyi kapatmak ister misiniz? - + Invalid sketch Geçersiz eskiz - + Do you want to open the sketch validation tool? Eskiz doğrulama aracını açmak istiyor musunuz? - + The sketch is invalid and cannot be edited. Eskiz geçersizdir ve düzenlenemez. - + Please remove the following constraint: Lütfen aşağıdaki kısıtlamayı kaldırın: - + Please remove at least one of the following constraints: Lütfen aşağıdaki kısıtlamalardan en az birini kaldırın: - + Please remove the following redundant constraint: Lütfen aşağıdaki gereksiz kısıtlamayı kaldırın: - + Please remove the following redundant constraints: Lütfen aşağıdaki gereksiz kısıtlamaları kaldırın: - + The following constraint is partially redundant: Aşağıdaki kısıtlama kısmen gereksizdir: - + The following constraints are partially redundant: Aşağıdaki kısıtlamalar kısmen gereksizdir: - + Please remove the following malformed constraint: Lütfen aşağıdaki hatalı biçimlendirilmiş kısıtlamayı kaldırın: - + Please remove the following malformed constraints: Lütfen aşağıdaki hatalı biçimlendirilmiş kısıtlamaları kaldırın: - + Empty sketch Boş eskiz - + Over-constrained: Aşırı-Kısıtlı: - + Malformed constraints: Hatalı biçimlendirilmiş kısıtlamalar: - + Redundant constraints: Gereksiz kısıtlamalar: - + Partially redundant: Kısmen gereksiz: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) @@ -5335,7 +5328,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fully constrained @@ -5433,8 +5426,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Bir çemberin veya bir yayın yarıçapını düzelt @@ -5442,7 +5435,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Bir çember veya yayın yarı çapını/çapını onar @@ -5450,20 +5444,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Bir dairenin veya bir yayın yarıçapını düzeltme - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Bir çember veya yayın yarı çapını/çapını onar - - Sketcher_Copy @@ -6080,7 +6066,7 @@ Eigen Sparse QR algoritması seyrek matrisler için optimize edilmiştir; genell ViewProviderSketch - + and %1 more and %1 more @@ -6303,7 +6289,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6314,7 +6300,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6339,7 +6325,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6362,13 +6348,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6379,7 +6365,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6493,7 +6479,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6675,17 +6661,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Boyut - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6705,14 +6691,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Boyut - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Yarıçapı sınırla + + + + Fix the radius of a circle or an arc + Bir dairenin veya bir yayın yarıçapını düzeltme + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts index 6826e1697a..837503b642 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_uk.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Обмеження для дуги або кола - + Constrain an arc or a circle Створює обмеження для дуги чи кола - + Constrain radius Обмеження за радіусом - + Constrain diameter Обмеження за діаметром - + Constrain auto radius/diameter Автоматичне обмеження за радіусом/діаметром @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Кутове обмеження - + Fix the angle of a line or the angle between two lines Задає кут нахилу лінії або кут між двома лініями @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Обмеження переміщення - + Block the selected edge from moving Блокує переміщення вибраного ребра @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Обмеження збігу - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Створити обмеження збігу між точками або концентричне обмеження між колами, дугами та еліпсами @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Обмеження за діаметром - + Fix the diameter of a circle or an arc Задає діаметр кола або дуги @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Обмеження відстані - + Fix a length of a line or the distance between a line and a vertex or between two circles Фіксує довжину лінії або відстань між лінією і вершиною або між двома колами @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Обмеження відстані по горизонталі - + Fix the horizontal distance between two points or line ends Задає відстань по горизонталі між двома точками або кінцями відрізку @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Обмеження відстані по вертикалі - + Fix the vertical distance between two points or line ends Задає відстань по вертикалі між двома точками або кінцями відрізку @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Еквівалентне обмеження - + Create an equality constraint between two lines or between circles and arcs Створює обмеження еквівалентності між двома лініями, колами або дугами @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Горизонтальне обмеження - + Create a horizontal constraint on the selected item Створює обмеження горизонтальності для вибраного елементу @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Обмеження фіксації - + Create both a horizontal and a vertical distance constraint on the selected vertex Створює обмеження на горизонтальну і вертикальну відстань для обраної вершини @@ -519,12 +519,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Паралельне обмеження - + Create a parallel constraint between two lines Створює обмеження паралельності між двома лініями @@ -532,12 +532,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Перпендикулярне обмеження - + Create a perpendicular constraint between two lines Створює обмеження перпендикулярності між двома лініями @@ -545,12 +545,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Зафіксувати точку на обʼєкті - + Fix a point onto an object Фіксує точку на обʼєкті @@ -558,38 +558,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Автоматичне обмеження за радіусом/діаметром - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Задає діаметр, якщо вибрано коло, або радіус, якщо вибрано полюс дуги/сплайна - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Обмежити радіус або вагу - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Задає радіус кола чи дуги або задає вагу полюса В-сплайну - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Обмеження за законом заломлення (закон Снеліуса) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Створює обмеження за законом заломлення (закон Снеліуса) між @@ -599,12 +586,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Симетричне обмеження - + Create a symmetry constraint between two points with respect to a line or a third point Створює обмеження симетричності між двома @@ -614,12 +601,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Обмеження дотичності - + Create a tangent constraint between two entities Створює обмеження дотичності між двома обʼєктами @@ -627,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Вертикальне обмеження - + Create a vertical constraint on the selected item Створює обмеження вертикальності для вибраного елементу @@ -1490,12 +1477,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Активувати/деактивувати обмеження - + Activates or deactivates the selected constraints Активує або деактивує виділені обмеження @@ -1516,12 +1503,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Перемкнути обмеження між допоміжними/основними - + Set the toolbar, or the selected constraints, into driving or reference mode Перемикає панель інструментів в режим допоміжної/основної геометрії або перетворює виділені обмеження в допоміжні/основні @@ -1594,370 +1581,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Додати горизонтальне обмеження - - - + + + Add horizontal alignment Додати горизонтальне вирівнювання - - + + Add vertical constraint Додати вертикальне обмеження - + Add vertical alignment Додати вертикальне вирівнювання - + Add 'Lock' constraint Додати обмеження 'Фіксація' - + Add relative 'Lock' constraint Додайте обмеження відносна 'Фіксація' - + Add fixed constraint Додати фіксуюче обмеження - + Add 'Block' constraint Додати обмеження 'Блокування' - + Add block constraint Додати обмеження блокування - - - + + + Add coincident constraint Додати обмеження збігу - - + + Add distance from horizontal axis constraint Додати обмеження відстані від горизонтальної осі - - + + Add distance from vertical axis constraint Додати обмеження відстані від вертикальної осі - - + + Add point to point distance constraint Додати обмеження відстані між двома точками - - - + + + Add point to line Distance constraint Додати обмеження відстані між точкою та лінією - - + + Add circle to circle distance constraint Додати обмеження відстані між двома колами - + Add circle to line distance constraint Додати обмеження відстані між колом та лінією - - - - - - + + + + + + Add length constraint Додати обмеження довжини - - + + + Dimension Розмірність - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Додати обмеження точки на об’єкті - - + + Add point to point horizontal distance constraint Додати обмеження відстані за горизонталлю між двома точками - + Add fixed x-coordinate constraint Додати обмеження фіксованої X-координати - - + + Add point to point vertical distance constraint Додати обмеження відстані за вертикаллю між двома точками - + Add fixed y-coordinate constraint Додати обмеження фіксованої Y-координати - - + + Add parallel constraint Додати обмеження паралельності - - - - - - - + + + + + + + Add perpendicular constraint Додати обмеження перпендикуляру - + Add perpendicularity constraint Додати обмеження перпендикулярності - + Swap coincident+tangency with ptp tangency Перетворити збіг+дотик у дотик точка-точка - + Swap PointOnObject+tangency with point to curve tangency Перетворіть обмеження «Точка на обʼєкті» + дотик на обмеження «Дотик до кривої» - - - - - - - + + + + + + + Add tangent constraint Додати обмеження дотику - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Додати обмеження дотику до точки - - - - + + + + Add radius constraint Додати обмеження радіусу - - - - + + + + Add diameter constraint Додати обмеження діаметру - - - - + + + + Add radiam constraint Додати обмеження радіусу/діаметру - - - - - - + + + + + + Add angle constraint Додати обмеження кута - - + + Add equality constraint Додати обмеження рівності - - - - - + + + + + Add symmetric constraint Додати обмеження симетрії - + Add Snell's law constraint Додати обмеження за законом заломлення Снеліуса - + Toggle constraint to driving/reference Перемкнути обмеження між допоміжними/основними - + Activate/Deactivate constraint Активувати/деактивувати обмеження @@ -2033,7 +2026,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Додати ескіз дуги @@ -2284,59 +2277,59 @@ invalid constraints, degenerated geometry, etc. Помилка автообмеження: Ескіз не вирішується після додавання обмеження рівності. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. Не вдалося розрахувати перетин кривих. Спробуйте додати обмеження збігу між вершинами кривих, які ви хочете заокруглити. - - + + BSpline Geometry Index (GeoID) is out of bounds. BSpline ідентифікатор геометрії (GeoID) знаходиться поза межами. - + You are requesting no change in knot multiplicity. Ви просите не змінювати кратність вузлів. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. Ідентифікатор геометрії (GeoId) не є кривою B-сплайн. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. Індекс вузла виходить за межі. Зверніть увагу, що відповідно до нотації OCC перший вузол має індекс 1, а не нуль. - + The multiplicity cannot be increased beyond the degree of the B-spline. Кратність не може бути збільшена понад ступінь B-сплайну. - + The multiplicity cannot be decreased beyond zero. Кратність не може бути зменшена нижче нуля. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC нездатний зменшити кратність у межах максимального допуску. - + Knot cannot have zero multiplicity. Вузол не може мати нульову кратність. - + Knot multiplicity cannot be higher than the degree of the BSpline. Кратність вузла не повинна перевищувати ступінь B-сплайна. - + Knot cannot be inserted outside the BSpline parameter range. Вузол не можна розмістити за межами діапазону параметрів B-сплайну. @@ -2404,134 +2397,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2579,329 +2572,329 @@ invalid constraints, degenerated geometry, etc. Обмеження розміру - + Cannot add a constraint between two external geometries. Неможливо додати обмеження між двома зовнішніми геометріями. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Неможливо додати обмеження між двома фіксованими геометріями. Фіксована геометрія включає зовнішню геометрію, заблоковану геометрію або спеціальні точки такі як вузли B-сплайну. - + Sketcher Constraint Substitution Заміна обмеження ескізу - + Keep notifying me of constraint substitutions Сповіщайте мене про заміни обмежень - - - + + + Only sketch and its support are allowed to be selected. Дозволено вибрати лише ескіз та його базу. - + One of the selected has to be on the sketch. Один із вибраних має бути на ескізі. - - + + Select an edge from the sketch. Виділіть ребро на ескізі. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Неможливі обмеження - - - - + + + + The selected edge is not a line segment. Виділене ребро не є сегментом лінії. - - - - - - + + + + + + Double constraint Подвійне обмеження - - - - - + + + + + The selected edge already has a horizontal constraint! Виділене ребро вже має обмеження по горизонталі! - - - + + + The selected edge already has a vertical constraint! Виділене ребро вже має обмеження по вертикалі! - - - - - - + + + + + + The selected edge already has a Block constraint! Виділене ребро вже заблоковане! - + The selected item(s) can't accept a horizontal constraint! Виділений елемент(и) не може прийняти горизонтальне обмеження! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Виділено декілька фіксованих точок. Оберіть максимум одну фіксовану точку! - + The selected item(s) can't accept a vertical constraint! Виділений елемент(и) не може прийняти вертикальне обмеження! - - - + + + Select vertices from the sketch. Виділіть вершини на ескізі. - + Select one vertex from the sketch other than the origin. Виділіть одну вершину на ескізі, крім початкової. - + Select only vertices from the sketch. The last selected vertex may be the origin. Виділіть тільки вершини на ескізі. Остання виділена вершина може бути початковою. - + Wrong solver status Неправильний статус вирішувача - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. Блокуюче обмеження не може бути додано, якщо ескіз не можна вирішати або є надлишкові/конфліктуючі обмеження. - + Select one edge from the sketch. Виділіть одне ребро на ескізі. - + Select only edges from the sketch. Виділіть лише ребра на ескізі. - + Number of selected objects is not 3 Кількість виділених об'єктів не 3 - + Error Помилка - + Unexpected error. More information may be available in the Report View. Неочікувана помилка. Більш детальна інформація доступна у Виді Звіт. - + Endpoint to endpoint tangency was applied instead. Замість кінцевої точки застосовано дотичну. - + Select two or more points from the sketch. Виділіть на ескізі принаймні дві точки. - + Select two or more vertices from the sketch. Виділіть на ескізі принаймні дві вершини. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Виберіть дві або більше вершин з ескізу для обмеження збігу, або два або більше кіл, еліпсів, дуг або дуг еліпса для концентричного обмеження. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Виберіть дві вершини з ескізу для обмеження збігу, або два кола, еліпси, дуги або дуги еліпса для концентричного обмеження. - + Select exactly one line or one point and one line or two points from the sketch. Виділіть на ескізі лише одну лінію, або одну точку та лінію, або дві точки. - + Cannot add a length constraint on an axis! Не можу додати обмеження довжини на вісь! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Виділіть на ескізі рівно одну лінію або одну точку і одну лінію або дві точки, або два кола. - + This constraint does not make sense for non-linear curves. Це обмеження не має сенсу для нелінійних кривих. - + Endpoint to edge tangency was applied instead. Замість кінцевої точки застосовано дотичну до ребра. - - - - - - - + + + + + + + Select the right things from the sketch. Виділіть потрібні обʼєкти на ескізі. - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Виділіть ребро, яке не є вагою B-сплайну. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. Жодна з виділених точок не була обмежена відповідними кривими тому, що вони є частинами того ж елементу; вони є зовнішньою геометрією або тому, що ребро не підходить. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Жодна з виділених точок не була обмежена відповідними кривими тому, що вони є частинами того ж елементу або вони є зовнішньою геометрією. - - - - + + + + Select exactly one line or up to two points from the sketch. Виділіть на ескізі лише одну лінію або не більше двох точок. - + Cannot add a horizontal length constraint on an axis! Не можу додати горизонтального обмеження довжини на вісь! - + Cannot add a fixed x-coordinate constraint on the origin point! Не можна обмежити X-координату точки початку координат! - - + + This constraint only makes sense on a line segment or a pair of points. Це обмеження має сенс лише для відрізка або пари точок. - + Cannot add a vertical length constraint on an axis! Не можу додати вертикального обмеження довжини на вісь! - + Cannot add a fixed y-coordinate constraint on the origin point! Не можна обмежити Y-координату точки початку координат! - + Select two or more lines from the sketch. Виділіть на ескізі дві або більше ліній. - - + + Select at least two lines from the sketch. Виділіть на ескізі принаймні дві лінії. - + Select a valid line. Виділіть правильну лінію. - - + + The selected edge is not a valid line. Виділене ребро не є правильною лінією. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2911,42 +2904,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Допустимі комбінації: дві криві; кінцева точка і крива; дві кінцевих точки; дві криві та точка. - + Select some geometry from the sketch. perpendicular constraint Виділіть деяку геометрію ескізу. - - + + Cannot add a perpendicularity constraint at an unconnected point! Не вдалося застосувати обмеження перпендикулярності, бо виділена точка не є частиною кривої! - - - + + + Perpendicular to B-spline edge currently unsupported. Перпендикуляр до ребра B-сплайну не підтримується. - - + + One of the selected edges should be a line. Одне з виділених ребер повинне бути лінією. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. Застосовано обмеження дотичності між кінцевими точками. Обмеження збігу видалено. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Застосовано обмеження дотичності кінцевої точки до ребра. Обмеження точки на об’єкті було видалено. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2956,182 +2949,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Допустимі комбінації: дві криві; кінцева точка та крива; дві кінцеві точки; дві криві та точка. - + Select some geometry from the sketch. tangent constraint Виділіть деяку геометрію ескізу. - - - + + + Cannot add a tangency constraint at an unconnected point! Не можу додати обмеження дотичної у точці, що не належить кривій! - - + + Tangent constraint at B-spline knot is only supported with lines! Дотичне обмеження на вузлі B-сплайна підтримується лише лініями! - + B-spline knot to endpoint tangency was applied instead. Замість цього застосовано дотичну вузла B-сплайна до кінцевої точки. - + Select either one point and several curves, or one curve and several points. Виберіть або одну точку і кілька кривих, або одну криву і кілька точок. - - + + Wrong number of selected objects! Неправильна кількість виділених обʼєктів! - - + + With 3 objects, there must be 2 curves and 1 point. Коли вибрано 3 елементи, це повинні бути 2 криві та одна точка. - - - + + + Tangency to B-spline edge currently unsupported. Дотичність до ребра B-сплайну не підтримується. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Виділіть одну або кілька дуг чи кіл на ескізі. - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Виділіть на ескізі лише один чи декілька полюсів B-сплайну або лише одну чи декілька дуг чи кіл, але не змішуйте сплайни та дуги. - - - + + + Constraint only applies to arcs or circles. Обмеження можна застосовувати лише до дуг або кіл. - - + + Select one or two lines from the sketch. Or select two edges and a point. Виділіть одну або дві лінії на ескізі. Або виділіть два ребра і точку. - - + + Parallel lines Паралельні лінії - - + + An angle constraint cannot be set for two parallel lines. Обмеження кута не можна застосувати до паралельних ліній. - + Cannot add an angle constraint on an axis! Не можу додати обмеження кута на вісі! - + Select two edges from the sketch. Виділіть два ребра на ескізі. - + Select two or more compatible edges. Виділіть два або більше сумісних ребра. - + Sketch axes cannot be used in equality constraints. Вісі ескізу не можна використовувати в обмеженнях еквівалентності. - + Equality for B-spline edge currently unsupported. Обмеження рівності ребра B-сплайну не підтримується. - - - - + + + + Select two or more edges of similar type. Виділіть два або більше ребра однакового типу. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Виділіть на ескізі лише один чи декілька полюсів B-сплайну або лише одну чи декілька дуг чи кіл, але не змішуйте сплайни та дуги. - - + + Cannot add a symmetry constraint between a line and its end points. Неможливо додати обмеження симетрії між лінією та її кінцевими точками. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! Неможливо додати обмеження симетрії між лінією та її кінцевими точками! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Виділіть два кінці ліній, які будуть виконувати роль променів, і ребро, що представляє межу розподілу середовищ. Перша обрана точка відповідає індексу n1, друга n2, а опорне значення визначається співвідношенням n2 / n1. - + Selected objects are not just geometry from one sketch. Виділені обʼєкти з різних ескізів. - + Cannot create constraint with external geometry only. Неможливо створити обмеження з використанням тільки зовнішньої геометрії. - + Incompatible geometry is selected. Виділено несумісну геометрію. - + SnellsLaw on B-spline edge is currently unsupported. Обмеження за законом заломлення на ребрі B-сплайна наразі не підтримується. - - - - - + + + + + Select constraints from the sketch. Виділіть обмеження на ескізі. @@ -3630,12 +3623,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Довжина: - + Refractive index ratio Коефіцієнт заломлення - + Ratio n2/n1: Співвідношення n2/n1: @@ -5228,112 +5221,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Редагувати ескіз - + A dialog is already open in the task panel Діалогове вікно вже відкрито в панелі задач - + Do you want to close this dialog? Ви бажаєте закрити це діалогове вікно? - + Invalid sketch Неприпустимий ескіз - + Do you want to open the sketch validation tool? Відкрити інструмент перевірки ескізу? - + The sketch is invalid and cannot be edited. Ескіз містить помилки та не може бути змінений. - + Please remove the following constraint: Будь ласка, видаліть наступне обмеження: - + Please remove at least one of the following constraints: Будь ласка, видаліть принаймні одне з таких обмежень: - + Please remove the following redundant constraint: Будь ласка, видаліть наступне надлишкове обмеження: - + Please remove the following redundant constraints: Видаліть, будь ласка, наступні надлишкові обмеження: - + The following constraint is partially redundant: Наступне обмеження частково надлишкове: - + The following constraints are partially redundant: Наступні обмеження частково надлишкові: - + Please remove the following malformed constraint: Видаліть, будь ласка, наступне невірне обмеження: - + Please remove the following malformed constraints: Видаліть, будь ласка, наступні невірні обмеження: - + Empty sketch Порожній ескіз - + Over-constrained: Надлишкові обмеження: - + Malformed constraints: Невірні обмеження: - + Redundant constraints: Надлишкові обмеження: - + Partially redundant: Частково надлишкові: - + Solver failed to converge Рішення не сходиться - + Under constrained: Частково обмежений: - + %n DoF(s) %n ступінь свободи @@ -5343,7 +5336,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Повністю обмежений @@ -5441,8 +5434,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Задає діаметр кола або дуги @@ -5450,7 +5443,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Задає радіус/діаметр кола або дуги @@ -5458,20 +5452,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Задає радіус кола або дуги - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Задає радіус/діаметр кола або дуги - - Sketcher_Copy @@ -6088,7 +6074,7 @@ Eigen Dense QR — щільна матриця QR з повним поворот ViewProviderSketch - + and %1 more та %1 більше @@ -6311,7 +6297,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Скетч має частково надлишкові обмеження! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Перенесено параболи. Перенесені файли не відкриватимуться у попередніх версіях FreeCAD!!! @@ -6321,7 +6307,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6346,7 +6332,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6369,13 +6355,13 @@ The grid spacing change if it becomes smaller than this number of pixel.Обмеження має невірну індексну інформацію та є помилковим. - - - - - - - + + + + + + + @@ -6386,7 +6372,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Не вдалося додати дугу @@ -6500,7 +6486,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Не вдалося додати коробку - + Failed to add rounded rectangle Не вдалося додати заокруглений прямокутник @@ -6682,17 +6668,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Розмірність - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6712,14 +6698,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Розмірність - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Обмеження за радіусом + + + + Fix the radius of a circle or an arc + Задає радіус кола або дуги + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts index 35216e827c..ecf9c18552 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_val-ES.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle Restringeix l'arc o el cercle - + Constrain an arc or a circle Restringeix un arc o un cercle - + Constrain radius Restricció del radi - + Constrain diameter Restringeix el diàmetre - + Constrain auto radius/diameter Constrain auto radius/diameter @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle Restricció d'angle - + Fix the angle of a line or the angle between two lines Fixa l'angle d'una línia o l'angle entre dues línies @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block Constrain block - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident Restricció coincident - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter Restringeix el diàmetre - + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance Restricció de distància - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance Constrain horizontal distance - + Fix the horizontal distance between two points or line ends Fixa la distància horitzontal entre dos punts o extrems de línia @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance Constrain vertical distance - + Fix the vertical distance between two points or line ends Fixa la distància vertical entre dos punts o extrems de línia @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal Restricció d'igualtat - + Create an equality constraint between two lines or between circles and arcs Crea una restricció d'igualtat entre dues línies o entre cercles i arcs @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally Restricció horitzontal - + Create a horizontal constraint on the selected item Crea una restricció horitzontal en l'element seleccionat @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock Restricció de bloqueig - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel Restricció de parel·lelisme - + Create a parallel constraint between two lines Crea una restricció de paral·lelisme entre dues línies @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular Restricció de perpendicularitat - + Create a perpendicular constraint between two lines Crea una restricció de perpendicularitat entre dues línies @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object Restricció d'un punt sobre l'objecte - + Fix a point onto an object Fixa un punt sobre un objecte @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter Constrain auto radius/diameter - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen - - CmdSketcherConstrainRadius - - - Constrain radius or weight - Constrain radius or weight - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical Restricció de simetria - + Create a symmetry constraint between two points with respect to a line or a third point Create a symmetry constraint between two points @@ -615,12 +602,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent Restricció tangent - + Create a tangent constraint between two entities Crea una restricció tangent entre dues entitats @@ -628,12 +615,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically Restricció veertical - + Create a vertical constraint on the selected item Crea una restricció vertical en l'element seleccionat @@ -1492,12 +1479,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint Activate/deactivate constraint - + Activates or deactivates the selected constraints Activates or deactivates the selected constraints @@ -1518,12 +1505,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint Toggle driving/reference constraint - + Set the toolbar, or the selected constraints, into driving or reference mode Set the toolbar, or the selected constraints, @@ -1597,370 +1584,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint Add horizontal constraint - - - + + + Add horizontal alignment Add horizontal alignment - - + + Add vertical constraint Add vertical constraint - + Add vertical alignment Add vertical alignment - + Add 'Lock' constraint Add 'Lock' constraint - + Add relative 'Lock' constraint Add relative 'Lock' constraint - + Add fixed constraint Add fixed constraint - + Add 'Block' constraint Add 'Block' constraint - + Add block constraint Add block constraint - - - + + + Add coincident constraint Add coincident constraint - - + + Add distance from horizontal axis constraint Add distance from horizontal axis constraint - - + + Add distance from vertical axis constraint Add distance from vertical axis constraint - - + + Add point to point distance constraint Add point to point distance constraint - - - + + + Add point to line Distance constraint Add point to line Distance constraint - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint Add length constraint - - + + + Dimension Dimensió - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint Add point on object constraint - - + + Add point to point horizontal distance constraint Add point to point horizontal distance constraint - + Add fixed x-coordinate constraint Add fixed x-coordinate constraint - - + + Add point to point vertical distance constraint Add point to point vertical distance constraint - + Add fixed y-coordinate constraint Add fixed y-coordinate constraint - - + + Add parallel constraint Add parallel constraint - - - - - - - + + + + + + + Add perpendicular constraint Add perpendicular constraint - + Add perpendicularity constraint Add perpendicularity constraint - + Swap coincident+tangency with ptp tangency Swap coincident+tangency with ptp tangency - + Swap PointOnObject+tangency with point to curve tangency Swap PointOnObject+tangency with point to curve tangency - - - - - - - + + + + + + + Add tangent constraint Add tangent constraint - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point Add tangent constraint point - - - - + + + + Add radius constraint Add radius constraint - - - - + + + + Add diameter constraint Add diameter constraint - - - - + + + + Add radiam constraint Add radiam constraint - - - - - - + + + + + + Add angle constraint Add angle constraint - - + + Add equality constraint Add equality constraint - - - - - + + + + + Add symmetric constraint Add symmetric constraint - + Add Snell's law constraint Add Snell's law constraint - + Toggle constraint to driving/reference Toggle constraint to driving/reference - + Activate/Deactivate constraint Activate/Deactivate constraint @@ -2036,7 +2029,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc Add sketch arc @@ -2287,59 +2280,59 @@ invalid constraints, degenerated geometry, etc. Error de restricció: esbós irresoluble si s'apliquen restriccions d'igualtat. - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. No s'ha trobat la intersecció de les corbes. Intenteu afegir una restricció coincident entre els vèrtexs de les corbes que esteu intentant arrodonir. - - + + BSpline Geometry Index (GeoID) is out of bounds. L'índex de geometria BSpline (GeoID) està fora de les restriccions. - + You are requesting no change in knot multiplicity. Se us ha demanat que no canvieu la multiplicitat del nus. - - + + The Geometry Index (GeoId) provided is not a B-spline curve. L'índex de geometria (GeoId) proporcionat no és una corba de B-spline. - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. L'índex del nus és fora dels límits. Tingueu en compte que d'acord amb la notació d'OCC, el primer nus té l'índex 1 i no zero. - + The multiplicity cannot be increased beyond the degree of the B-spline. La multiplicitat no es pot augmentar més enllà del grau del B-spline. - + The multiplicity cannot be decreased beyond zero. La multiplicitat no es pot reduir més enllà de zero. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC no pot reduir la multiplicitat dins de la tolerància màxima. - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. Knot cannot be inserted outside the BSpline parameter range. @@ -2407,134 +2400,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2582,329 +2575,329 @@ invalid constraints, degenerated geometry, etc. Restricció de dimensió - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. Seleccioneu una aresta de l'esbós - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint Restricció impossible - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint Restricció doble - - - - - + + + + + The selected edge already has a horizontal constraint! L'aresta seleccionada ja té una restricció horitzontal. - - - + + + The selected edge already has a vertical constraint! L'aresta seleccionada ja té una restricció vertical. - - - - - - + + + + + + The selected edge already has a Block constraint! L'aresta seleccionada ja té una restricció de Bloc. - + The selected item(s) can't accept a horizontal constraint! Els elements seleccionats no poden acceptar una restricció horitzontal. - - + + There are more than one fixed points selected. Select a maximum of one fixed point! Hi ha més d'un punt fixe seleccionat! Seleccioneu-ne com a màxim un de fixe. - + The selected item(s) can't accept a vertical constraint! Els elements seleccionats no poden acceptar una restricció vertical. - - - + + + Select vertices from the sketch. Seleccioneu vèrtexs de l'esbós - + Select one vertex from the sketch other than the origin. Seleccioneu un vèrtex de l'esbós diferent de l'origen - + Select only vertices from the sketch. The last selected vertex may be the origin. Seleccioneu només vèrtexs de l'esbós. L'últim vèrtex seleccionat pot ser l'origen. - + Wrong solver status Estat de sistema de resolució incorrecte - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. Seleccioneu una aresta de l'esbós. - + Select only edges from the sketch. Seleccioneu sols arestes de l'esbós. - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error Error - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. En el seu lloc s'ha aplicat una tangència entre extrems. - + Select two or more points from the sketch. Seleccioneu una o més punts de l'esbós - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. Seleccioneu únicament una línia o un punt i una línia o dos punts de l'esbós - + Cannot add a length constraint on an axis! No es pot afegir una restricció de longitud sobre un eix. - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. Seleccioneu els elements correctes de l'esbós - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. Cap dels punts seleccionats s'han restringit a les corbes respectives, perquè són peces del mateix element o perquè ambdues són de geometria externa. - - - - + + + + Select exactly one line or up to two points from the sketch. Seleccioneu únicament una línia o fins a dos punts de l'esbós - + Cannot add a horizontal length constraint on an axis! No es pot afegir una restricció de longitud horitzontal sobre un eix. - + Cannot add a fixed x-coordinate constraint on the origin point! No es pot afegir una restricció de coordenada x fixa sobre el punt d'origen. - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! No es pot afegir una restricció de longitud vertical sobre un eix. - + Cannot add a fixed y-coordinate constraint on the origin point! No es pot afegir una restricció de coordenada y fixa sobre el punt d'origen. - + Select two or more lines from the sketch. Seleccioneu una o més línies de l'esbós - - + + Select at least two lines from the sketch. Seleccioneu almenys dues línies de l'esbós - + Select a valid line. Select a valid line. - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2912,42 +2905,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. perpendicular constraint Seleccioneu alguna geometria de l'esbós - - + + Cannot add a perpendicularity constraint at an unconnected point! No es pot afegir una restricció de perpendicularitat en un punt no connectat. - - - + + + Perpendicular to B-spline edge currently unsupported. Una perpendicular a la vora del B-spline no s'admet actualment. - - + + One of the selected edges should be a line. Una de les arestes seleccionades ha de ser una línia. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. S'ha aplicat una tangència entre extrems. S'han suprimit les restriccions coincidents. - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,182 +2948,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Aquesta restricció es pot aplicar de diverses maneres. Les combinacions possibles són: dues corbes; un extrem i una corba; dos extrems; dues corbes i un punt. - + Select some geometry from the sketch. tangent constraint Seleccioneu alguna geometria de l'esbós - - - + + + Cannot add a tangency constraint at an unconnected point! No es pot afegir una restricció de tangència en un punt no connectat. - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! El nombre d'objectes seleccionats és incorrecte. - - + + With 3 objects, there must be 2 curves and 1 point. Amb 3 objectes, hi ha d'haver 2 corbes i 1 punt. - - - + + + Tangency to B-spline edge currently unsupported. La tangència a la vora del B-spline no s'admet actualment. - - - - - - + + + + + + Select one or more arcs or circles from the sketch. Seleccioneu un o diversos arcs o cercles de l'esbós - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. La restricció només s'aplica a arcs i cercles. - - + + Select one or two lines from the sketch. Or select two edges and a point. Seleccioneu una o dues línies de l'esbós. O seleccioneu dues arestes i un punt - - + + Parallel lines Línies paral·leles - - + + An angle constraint cannot be set for two parallel lines. Una restricció d'angle no es pot definir per dues línies paral·leles. - + Cannot add an angle constraint on an axis! No es pot afegir una restricció d'angle sobre un eix. - + Select two edges from the sketch. Seleccioneu dues arestes de l'esbós - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. Sketch axes cannot be used in equality constraints. - + Equality for B-spline edge currently unsupported. La igualtat per a la vora del B-spline no s'admet actualment. - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. Seleccioneu de l'esbós dos punts i una línia de simetria, dos punts i un punt de simetria o una línia i un punt de simetria - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! No es pot afegir una restricció de simetria entre una línia i els seus extrems. - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. Els objectes seleccionats no són només geometria d'un esbós. - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. @@ -3629,12 +3622,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c Length: - + Refractive index ratio Índex de refracció - + Ratio n2/n1: Relació n2/n1: @@ -5214,112 +5207,112 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch Edit sketch - + A dialog is already open in the task panel A dialog is already open in the task panel - + Do you want to close this dialog? Do you want to close this dialog? - + Invalid sketch L'esbós no és vàlid. - + Do you want to open the sketch validation tool? Voleu obrir l'eina de validació d'esbossos? - + The sketch is invalid and cannot be edited. L'esbós no és vàlid i no es pot editar. - + Please remove the following constraint: Suprimiu la restricció següent: - + Please remove at least one of the following constraints: Suprimiu almenys una de les restriccions següents: - + Please remove the following redundant constraint: Suprimiu la restricció redundant següent: - + Please remove the following redundant constraints: Suprimiu les restriccions redundants següents: - + The following constraint is partially redundant: The following constraint is partially redundant: - + The following constraints are partially redundant: The following constraints are partially redundant: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch L'esbós és buit. - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: Under constrained: - + %n DoF(s) %n DoF(s) @@ -5327,7 +5320,7 @@ This is done by analyzing the sketch geometries and constraints. - + Fully constrained Fully constrained @@ -5425,8 +5418,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc Fixa el diàmetre d'un cercle o d'un arc @@ -5434,7 +5427,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc Fix the radius/diameter of a circle or an arc @@ -5442,20 +5436,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc Fixa el radi d'un cercle o arc - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - Fix the radius/diameter of a circle or an arc - - Sketcher_Copy @@ -6069,7 +6055,7 @@ L'algoritme Eigen Sparse QR està optimitzat per a matrius escasses; generalment ViewProviderSketch - + and %1 more and %1 more @@ -6292,7 +6278,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6303,7 +6289,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6328,7 +6314,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6351,13 +6337,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6368,7 +6354,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6482,7 +6468,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6664,17 +6650,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension Dimensió - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6694,14 +6680,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension Dimensió - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + Restricció del radi + + + + Fix the radius of a circle or an arc + Fixa el radi d'un cercle o arc + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts index b68b72b87e..e21b9f5c0a 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-CN.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 约束圆弧或圆 - + Constrain an arc or a circle 约束圆弧或圆 - + Constrain radius 半径约束 - + Constrain diameter 约束直径 - + Constrain auto radius/diameter 约束自动半径/直径 @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 角度约束 - + Fix the angle of a line or the angle between two lines 固定一直线角度或两直线夹角 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block 约束块 - + Block the selected edge from moving Block the selected edge from moving @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 重合约束 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses 在点之间创建重合约束,或在圆、弧和椭圆之间的同心约束 @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 约束直径 - + Fix the diameter of a circle or an arc 固定圆或圆弧的直径 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 距离约束 - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 水平距离约束 - + Fix the horizontal distance between two points or line ends 固定两点(或线端点)之间的水平距离 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 限制垂直距离 - + Fix the vertical distance between two points or line ends 固定两点(或线端点)之间的垂直距离 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 相等约束 - + Create an equality constraint between two lines or between circles and arcs 两直线或圆与圆弧间创建相等约束 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 水平约束 - + Create a horizontal constraint on the selected item 在所选对象上创建水平约束 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock 锁定约束 - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 平行约束 - + Create a parallel constraint between two lines 两条线之间创建平行约束 @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 垂直约束 - + Create a perpendicular constraint between two lines 为两条直线创建垂直约束 @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object 点约束至对象 - + Fix a point onto an object 固定点至对象 @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 约束自动半径/直径 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 如果选中了圆,则固定直径,如果选中了圆弧/样条 极点,则固定半径 - - CmdSketcherConstrainRadius - - - Constrain radius or weight - 约束半径和权重 - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - 修复圆或弧的半径或修复B样条曲线的极限。 - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 对称约束 - + Create a symmetry constraint between two points with respect to a line or a third point 对两点作关于一条直线或第三点的对称约束 @@ -614,12 +601,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 相切约束 - + Create a tangent constraint between two entities 在两实体间创建相切约束 @@ -627,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 垂直约束 - + Create a vertical constraint on the selected item 在所选对象上创建垂直约束 @@ -1489,12 +1476,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 激活/停用约束 - + Activates or deactivates the selected constraints 激活或停用选定的约束 @@ -1515,12 +1502,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 切换驱动/参考约束 - + Set the toolbar, or the selected constraints, into driving or reference mode 设置工具栏或选定的约束, @@ -1593,370 +1580,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 添加水平约束 - - - + + + Add horizontal alignment 添加水平对齐 - - + + Add vertical constraint 添加垂直约束 - + Add vertical alignment 添加垂直对齐 - + Add 'Lock' constraint 添加“锁定”约束 - + Add relative 'Lock' constraint 添加相对的“锁定”约束 - + Add fixed constraint 添加固定约束 - + Add 'Block' constraint 添加“块”约束 - + Add block constraint 添加块约束 - - - + + + Add coincident constraint 添加并发约束 - - + + Add distance from horizontal axis constraint 从水平轴约束添加距离 - - + + Add distance from vertical axis constraint 从垂直轴约束添加距离 - - + + Add point to point distance constraint 添加点到点距离约束 - - - + + + Add point to line Distance constraint 添加点到线距离约束 - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint 添加长度约束 - - + + + Dimension 尺寸标注 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 添加对象上点约束 - - + + Add point to point horizontal distance constraint 添加点到点水平距离约束 - + Add fixed x-coordinate constraint 添加固定x坐标约束 - - + + Add point to point vertical distance constraint 添加点到点垂直距离约束 - + Add fixed y-coordinate constraint 添加固定Y坐标约束 - - + + Add parallel constraint 添加平行约束 - - - - - - - + + + + + + + Add perpendicular constraint 添加垂直约束 - + Add perpendicularity constraint 添加垂直约束 - + Swap coincident+tangency with ptp tangency 切换边相切与ptp相切 - + Swap PointOnObject+tangency with point to curve tangency 将点与对象相切与点到曲线相切交换 - - - - - - - + + + + + + + Add tangent constraint 添加切线约束 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 添加正切约束点 - - - - + + + + Add radius constraint 添加半径约束 - - - - + + + + Add diameter constraint 添加直径约束 - - - - + + + + Add radiam constraint 添加半径约束 - - - - - - + + + + + + Add angle constraint 添加角度约束 - - + + Add equality constraint 添加相等约束 - - - - - + + + + + Add symmetric constraint 添加对称约束 - + Add Snell's law constraint 添加斯内尔定律约束 - + Toggle constraint to driving/reference 将约束切换到作用/参考 - + Activate/Deactivate constraint 激活/停用约束 @@ -2032,7 +2025,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc 添加草绘圆弧 @@ -2283,59 +2276,59 @@ invalid constraints, degenerated geometry, etc. 自动约束错误: 应用相等约束后草图无法求解。 - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. 无法猜测曲线的交叉点。尝试在你打算做圆角的曲线顶点之间添加一个重合约束。 - - + + BSpline Geometry Index (GeoID) is out of bounds. 贝赛尔样条几何图形索引(GeoID) 超出了界限。 - + You are requesting no change in knot multiplicity. 你被要求不对多重性节点做任何修改。 - - + + The Geometry Index (GeoId) provided is not a B-spline curve. 提供的几何图形索引 (GeoId) 不是贝赛尔样条曲线 - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. 结指数超出界限。请注意, 按照 OCC 符号, 第一个节点的索引为1, 而不是0。 - + The multiplicity cannot be increased beyond the degree of the B-spline. 无法重复增加到超过贝塞尔曲线的自由度。 - + The multiplicity cannot be decreased beyond zero. 多重性不能小于0. - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC 无法在最大公差范围内减少多重性。 - + Knot cannot have zero multiplicity. Knot cannot have zero multiplicity. - + Knot multiplicity cannot be higher than the degree of the BSpline. Knot multiplicity cannot be higher than the degree of the BSpline. - + Knot cannot be inserted outside the BSpline parameter range. 不能在B样条参数范围之外插入节点。 @@ -2403,134 +2396,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2578,329 +2571,329 @@ invalid constraints, degenerated geometry, etc. 尺寸约束 - + Cannot add a constraint between two external geometries. Cannot add a constraint between two external geometries. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. - + Sketcher Constraint Substitution Sketcher Constraint Substitution - + Keep notifying me of constraint substitutions Keep notifying me of constraint substitutions - - - + + + Only sketch and its support are allowed to be selected. Only sketch and its support are allowed to be selected. - + One of the selected has to be on the sketch. One of the selected has to be on the sketch. - - + + Select an edge from the sketch. 从草图中选择边. - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 不可约束 - - - - + + + + The selected edge is not a line segment. The selected edge is not a line segment. - - - - - - + + + + + + Double constraint 双重约束 - - - - - + + + + + The selected edge already has a horizontal constraint! 所选边已有水平约束! - - - + + + The selected edge already has a vertical constraint! 所选边已有垂直约束! - - - - - - + + + + + + The selected edge already has a Block constraint! 所选边已有块约束! - + The selected item(s) can't accept a horizontal constraint! 所选项目无法应用水平约束! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! 选取了多个固定点。最多只能选择一个固定点! - + The selected item(s) can't accept a vertical constraint! 所选项目无法应用垂直约束! - - - + + + Select vertices from the sketch. 从草绘选择顶点。 - + Select one vertex from the sketch other than the origin. 从草图中选取一个非原点的顶点。 - + Select only vertices from the sketch. The last selected vertex may be the origin. 从草图中仅选取顶点。最后选定的顶点可能是原点。 - + Wrong solver status 错误的求解状态 - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. - + Select one edge from the sketch. 从草绘中选取一个边。 - + Select only edges from the sketch. 仅从草绘中选择边。 - + Number of selected objects is not 3 Number of selected objects is not 3 - + Error 错误 - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. 已应用端点到端点相切作为替代方案。 - + Select two or more points from the sketch. 从草绘选择两个或更多点。 - + Select two or more vertices from the sketch. Select two or more vertices from the sketch. - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. 从草图仅选取一直线, 或一点和一直线, 或两点. - + Cannot add a length constraint on an axis! 无法在坐标轴上添加长度约束! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. This constraint does not make sense for non-linear curves. - + Endpoint to edge tangency was applied instead. Endpoint to edge tangency was applied instead. - - - - - - - + + + + + + + Select the right things from the sketch. 从草绘选择正确的对象。 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. Select an edge that is not a B-spline weight. - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 所选的点没有一个被约束到各自的曲线上,因为它们是在同一元素上的一部分,或是它们都是外部几何形状。 - - - - + + + + Select exactly one line or up to two points from the sketch. 从草图选择一根线或两个点. - + Cannot add a horizontal length constraint on an axis! 无法在坐标轴上添加水平长度约束! - + Cannot add a fixed x-coordinate constraint on the origin point! 无法于原点加入固定x座标的约束! - - + + This constraint only makes sense on a line segment or a pair of points. This constraint only makes sense on a line segment or a pair of points. - + Cannot add a vertical length constraint on an axis! 无法在坐标轴上添加垂直长度约束! - + Cannot add a fixed y-coordinate constraint on the origin point! 无法于原点加入固定y座标的约束! - + Select two or more lines from the sketch. 从草图选择两条或两条以上直线. - - + + Select at least two lines from the sketch. 至少从草图选择两直线. - + Select a valid line. 选择一条有效的直线 - - + + The selected edge is not a valid line. The selected edge is not a valid line. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2910,42 +2903,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 接受的组合: 两条曲线; 一个端点和一个曲线; 两个端点; 两条曲线和一个点。 - + Select some geometry from the sketch. perpendicular constraint 从草图中选取一些几何属性 - - + + Cannot add a perpendicularity constraint at an unconnected point! 不能对没有连接点的两条线段添加"垂直"约束 - - - + + + Perpendicular to B-spline edge currently unsupported. 目前不支持垂直于的贝塞尔曲线边缘。 - - + + One of the selected edges should be a line. 所选边之一须为直线. - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. 已应用端点到端点相切。已删除重合约束。 - + Endpoint to edge tangency was applied. The point on object constraint was deleted. Endpoint to edge tangency was applied. The point on object constraint was deleted. - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2955,182 +2948,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 接受的组合: 两条曲线; 一个端点和一个曲线; 两个端点; 两条曲线和一个点。 - + Select some geometry from the sketch. tangent constraint 从草图中选取一些几何属性 - - - + + + Cannot add a tangency constraint at an unconnected point! 不能对没有连接点的两条线段添加"相切"约束 - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! 选取对象的数量有误! - - + + With 3 objects, there must be 2 curves and 1 point. 3个对象时至少需有2条曲线及1个点。 - - - + + + Tangency to B-spline edge currently unsupported. 目前不支持与贝塞尔曲线边缘相切。 - - - - - - + + + + + + Select one or more arcs or circles from the sketch. 从草图中选择一个或多个弧或圆。 - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. - - - + + + Constraint only applies to arcs or circles. 约束只适用于圆弧或圆。 - - + + Select one or two lines from the sketch. Or select two edges and a point. 从草图中选择一或两条直线。或选择两条边和一个点。 - - + + Parallel lines 平行线 - - + + An angle constraint cannot be set for two parallel lines. 不能为两条平行线设置角度约束。 - + Cannot add an angle constraint on an axis! 无法在坐标轴上添加角度约束! - + Select two edges from the sketch. 从草图选择两条边. - + Select two or more compatible edges. Select two or more compatible edges. - + Sketch axes cannot be used in equality constraints. 草图轴无法用于相等约束. - + Equality for B-spline edge currently unsupported. 目前不支持贝塞尔曲线条边缘的等值约束。 - - - - + + + + Select two or more edges of similar type. Select two or more edges of similar type. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 请从草图中选取2个点及对称线, 2个点及对称点或1条线及1对称点。 - - + + Cannot add a symmetry constraint between a line and its end points. Cannot add a symmetry constraint between a line and its end points. - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 无法在直线及其端点间添加对称约束! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. - + Selected objects are not just geometry from one sketch. 选取的物件并非来自于草图的几何形状。 - + Cannot create constraint with external geometry only. Cannot create constraint with external geometry only. - + Incompatible geometry is selected. Incompatible geometry is selected. - + SnellsLaw on B-spline edge is currently unsupported. SnellsLaw on B-spline edge is currently unsupported. - - - - - + + + + + Select constraints from the sketch. Select constraints from the sketch. @@ -3629,12 +3622,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 长度: - + Refractive index ratio 折射率比 - + Ratio n2/n1: 比例 n2/n1: @@ -5223,119 +5216,119 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch 编辑草绘 - + A dialog is already open in the task panel 一个对话框已在任务面板打开 - + Do you want to close this dialog? 您要关闭此对话框吗? - + Invalid sketch 无效的草图 - + Do you want to open the sketch validation tool? 你想打开草图验证工具么? - + The sketch is invalid and cannot be edited. 该草图不可用并不可编辑。 - + Please remove the following constraint: 请删除以下约束: - + Please remove at least one of the following constraints: 请至少删除以下约束之一: - + Please remove the following redundant constraint: 请删除以下冗余约束: - + Please remove the following redundant constraints: 请删除以下冗余约束: - + The following constraint is partially redundant: The following constraint is partially redundant: - + The following constraints are partially redundant: The following constraints are partially redundant: - + Please remove the following malformed constraint: Please remove the following malformed constraint: - + Please remove the following malformed constraints: Please remove the following malformed constraints: - + Empty sketch 空草图 - + Over-constrained: Over-constrained: - + Malformed constraints: Malformed constraints: - + Redundant constraints: Redundant constraints: - + Partially redundant: Partially redundant: - + Solver failed to converge Solver failed to converge - + Under constrained: 未约束的: - + %n DoF(s) %n个自由度 - + Fully constrained Fully constrained @@ -5433,8 +5426,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 固定圆或圆弧的直径 @@ -5442,7 +5435,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc 固定圆或圆弧的半径/直径 @@ -5450,20 +5444,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 固定圆或圆弧的半径 - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - 固定圆或圆弧的半径/直径 - - Sketcher_Copy @@ -6079,7 +6065,7 @@ Eigen Sparse QR algorithm is optimized for sparse matrices; usually faster ViewProviderSketch - + and %1 more and %1 more @@ -6302,7 +6288,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6313,7 +6299,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6338,7 +6324,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6361,13 +6347,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6378,7 +6364,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6492,7 +6478,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6674,17 +6660,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 尺寸标注 - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6704,14 +6690,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension 尺寸标注 - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + 半径约束 + + + + Fix the radius of a circle or an arc + 固定圆或圆弧的半径 + + diff --git a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts index c194525090..b842204cb5 100644 --- a/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts +++ b/src/Mod/Sketcher/Gui/Resources/translations/Sketcher_zh-TW.ts @@ -128,27 +128,27 @@ CmdSketcherCompConstrainRadDia - + Constrain arc or circle 約束弧或圓的直/半徑 - + Constrain an arc or a circle 約束單一圓弧或圓的直/半徑 - + Constrain radius 半徑拘束 - + Constrain diameter 直徑拘束 - + Constrain auto radius/diameter 自動拘束半徑/直徑 @@ -388,12 +388,12 @@ CmdSketcherConstrainAngle - + Constrain angle 角度拘束 - + Fix the angle of a line or the angle between two lines 固定線之角度或兩線間角度 @@ -401,12 +401,12 @@ CmdSketcherConstrainBlock - + Constrain block 定位拘束 - + Block the selected edge from moving 阻止選定邊的移動 @@ -414,12 +414,12 @@ CmdSketcherConstrainCoincident - + Constrain coincident 共點拘束 - + Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses Create a coincident constraint between points, or a concentric constraint between circles, arcs, and ellipses @@ -427,12 +427,12 @@ CmdSketcherConstrainDiameter - + Constrain diameter 直徑拘束 - + Fix the diameter of a circle or an arc 固定一個圓或弧的直徑 @@ -440,12 +440,12 @@ CmdSketcherConstrainDistance - + Constrain distance 距離拘束 - + Fix a length of a line or the distance between a line and a vertex or between two circles Fix a length of a line or the distance between a line and a vertex or between two circles @@ -453,12 +453,12 @@ CmdSketcherConstrainDistanceX - + Constrain horizontal distance 水平距離拘束 - + Fix the horizontal distance between two points or line ends 固定兩點或線段的水平距離 @@ -466,12 +466,12 @@ CmdSketcherConstrainDistanceY - + Constrain vertical distance 垂直距離拘束 - + Fix the vertical distance between two points or line ends 固定兩點或線段的垂直距離 @@ -479,12 +479,12 @@ CmdSketcherConstrainEqual - + Constrain equal 相等拘束 - + Create an equality constraint between two lines or between circles and arcs 於兩線/圓/弧之間建立等長拘束 @@ -492,12 +492,12 @@ CmdSketcherConstrainHorizontal - + Constrain horizontally 水平拘束 - + Create a horizontal constraint on the selected item 於所選項目建立水平拘束 @@ -505,12 +505,12 @@ CmdSketcherConstrainLock - + Constrain lock 鎖定拘束 - + Create both a horizontal and a vertical distance constraint on the selected vertex Create both a horizontal and a vertical distance constraint @@ -520,12 +520,12 @@ on the selected vertex CmdSketcherConstrainParallel - + Constrain parallel 平行拘束 - + Create a parallel constraint between two lines 於兩條線間建立平行拘束 @@ -533,12 +533,12 @@ on the selected vertex CmdSketcherConstrainPerpendicular - + Constrain perpendicular 垂直拘束 - + Create a perpendicular constraint between two lines 於兩條線間建立垂直拘束 @@ -546,12 +546,12 @@ on the selected vertex CmdSketcherConstrainPointOnObject - + Constrain point onto object 拘束點於物件上 - + Fix a point onto an object 固定點於物件上 @@ -559,38 +559,25 @@ on the selected vertex CmdSketcherConstrainRadiam - + Constrain auto radius/diameter 自動拘束半徑/直徑 - + Fix the diameter if a circle is chosen, or the radius if an arc/spline pole is chosen 如果選擇圓,則固定直徑,如果選擇圓弧/spline 極點,則固定半徑 - - CmdSketcherConstrainRadius - - - Constrain radius or weight - 半徑或權重拘束 - - - - Fix the radius of a circle or an arc or fix the weight of a pole of a B-Spline - 修正圓或弧之半徑或是修正 B 雲形線一個極點之權重 - - CmdSketcherConstrainSnellsLaw - + Constrain refraction (Snell's law) Constrain refraction (Snell's law) - + Create a refraction law (Snell's law)constraint between two endpoints of rays and an edge as an interface. Create a refraction law (Snell's law)constraint between two endpoints of rays @@ -600,12 +587,12 @@ and an edge as an interface. CmdSketcherConstrainSymmetric - + Constrain symmetrical 對稱拘束 - + Create a symmetry constraint between two points with respect to a line or a third point 於兩個點間藉由一條線或第3點建立一個對稱拘束 @@ -614,12 +601,12 @@ with respect to a line or a third point CmdSketcherConstrainTangent - + Constrain tangent 相切拘束 - + Create a tangent constraint between two entities 於兩個實體間建立相切拘束 @@ -627,12 +614,12 @@ with respect to a line or a third point CmdSketcherConstrainVertical - + Constrain vertically 垂直拘束 - + Create a vertical constraint on the selected item 建立垂直拘束 @@ -1489,12 +1476,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleActiveConstraint - + Activate/deactivate constraint 啟動/關閉拘束 - + Activates or deactivates the selected constraints 啟用或關閉選擇拘束 @@ -1515,12 +1502,12 @@ This will clear the 'Support' property, if any. CmdSketcherToggleDrivingConstraint - + Toggle driving/reference constraint 切換驅動/參考拘束 - + Set the toolbar, or the selected constraints, into driving or reference mode 設置工具列,或選定的拘束,進入驅動或參考模式 @@ -1592,370 +1579,376 @@ invalid constraints, degenerated geometry, etc. Command - - + + Add horizontal constraint 添加水平約束 - - - + + + Add horizontal alignment 添加水平對齊 - - + + Add vertical constraint 創建垂直約束 - + Add vertical alignment 垂直對齊 - + Add 'Lock' constraint 添加定位拘束 - + Add relative 'Lock' constraint 添加相對定位拘束 - + Add fixed constraint 添加固定拘束 - + Add 'Block' constraint 添加定位拘束 - + Add block constraint 添加定位拘束 - - - + + + Add coincident constraint 添加共點約束 - - + + Add distance from horizontal axis constraint 添加與水平軸拘束的距離 - - + + Add distance from vertical axis constraint 添加與垂直軸拘束的距離 - - + + Add point to point distance constraint 添加點到點的距離約束 - - - + + + Add point to line Distance constraint 添加點到線的距離約束 - - + + Add circle to circle distance constraint Add circle to circle distance constraint - + Add circle to line distance constraint Add circle to line distance constraint - - - - - - + + + + + + Add length constraint 添加長度拘束 - - + + + Dimension 標註 - + Add lock constraint Add lock constraint - + Add 'Distance to origin' constraint Add 'Distance to origin' constraint - - - + + + Add Distance constraint Add Distance constraint - - - + + + Add 'Horizontal' constraints Add 'Horizontal' constraints - - - + + + Add 'Vertical' constraints Add 'Vertical' constraints - - + + Add Symmetry constraint Add Symmetry constraint - - + + Add Symmetry constraints Add Symmetry constraints - - + + Add Distance constraints Add Distance constraints - + Add Horizontal constraint Add Horizontal constraint - + Add Vertical constraint Add Vertical constraint - + Add Block constraint Add Block constraint - + Add Angle constraint Add Angle constraint - - - - + + + + Add Equality constraint Add Equality constraint - + Add Equality constraints Add Equality constraints - + Add Radius constraint Add Radius constraint - + + Add arc angle constraint + Add arc angle constraint + + + Add concentric and length constraint Add concentric and length constraint - + Add DistanceX constraint Add DistanceX constraint - + Add DistanceY constraint Add DistanceY constraint - + Add point to circle Distance constraint Add point to circle Distance constraint - - + + Add point on object constraint 在物件拘束上添加點 - - + + Add point to point horizontal distance constraint 添加點到點的水平距離約束 - + Add fixed x-coordinate constraint 添加固定的 x 座標拘束 - - + + Add point to point vertical distance constraint 添加點到點的垂直距離約束 - + Add fixed y-coordinate constraint 添加固定的 y 座標拘束 - - + + Add parallel constraint 添加平行拘束 - - - - - - - + + + + + + + Add perpendicular constraint 添加垂直拘束 - + Add perpendicularity constraint 添加垂直度拘束 - + Swap coincident+tangency with ptp tangency 以 ptp 相切交換共點+相切 - + Swap PointOnObject+tangency with point to curve tangency 以點對曲線相切交換物件上點(PoingOnObject)+相切 - - - - - - - + + + + + + + Add tangent constraint 添加切線拘束 - - - - - - - - - - - - - - + + + + + + + + + + + + + + Add tangent constraint point 添加切線拘束點 - - - - + + + + Add radius constraint 添加半徑拘束 - - - - + + + + Add diameter constraint 添加直徑拘束 - - - - + + + + Add radiam constraint 添加半徑拘束 - - - - - - + + + + + + Add angle constraint 添加角度拘束 - - + + Add equality constraint 添加相等拘束 - - - - - + + + + + Add symmetric constraint 添加對稱拘束 - + Add Snell's law constraint 添加司乃耳定律拘束 - + Toggle constraint to driving/reference 切換拘束以作驅動/參考 - + Activate/Deactivate constraint 啟動/關閉拘束 @@ -2031,7 +2024,7 @@ invalid constraints, degenerated geometry, etc. - + Add sketch arc 添加弧線草圖 @@ -2282,59 +2275,59 @@ invalid constraints, degenerated geometry, etc. 自動拘束錯誤: 套用對稱拘束後無法解出此草圖 - + Unable to guess intersection of curves. Try adding a coincident constraint between the vertices of the curves you are intending to fillet. 無法猜測曲線交叉點。試著添加共點拘束在你要倒圓角的點及曲線間。 - - + + BSpline Geometry Index (GeoID) is out of bounds. B 雲形線幾何索引 (GeoID) 超出範圍。 - + You are requesting no change in knot multiplicity. 您正在要求不要改變結點多重性 - - + + The Geometry Index (GeoId) provided is not a B-spline curve. 提供的幾何索引 (GeoId) 不是 B 雲形線曲線。 - + The knot index is out of bounds. Note that in accordance with OCC notation, the first knot has index 1 and not zero. 結點索引超過範圍。請注意在 OCC 表示中,第一個結點的索引為 1 而不是 0。 - + The multiplicity cannot be increased beyond the degree of the B-spline. 結點多重性不能比 B 雲形線之多項式次數高 - + The multiplicity cannot be decreased beyond zero. 多重性不能減少到超過零。 - + OCC is unable to decrease the multiplicity within the maximum tolerance. OCC 無法在最大容差範圍內降低多重性。 - + Knot cannot have zero multiplicity. 結點之多重性不能為零。 - + Knot multiplicity cannot be higher than the degree of the BSpline. 結點多重性不能比 B 雲形線之次數高。 - + Knot cannot be inserted outside the BSpline parameter range. 結點不能在 B 雲形線參數範圍外面插入 @@ -2402,134 +2395,134 @@ invalid constraints, degenerated geometry, etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2577,329 +2570,329 @@ invalid constraints, degenerated geometry, etc. 尺度拘束 - + Cannot add a constraint between two external geometries. 於兩個外部幾何間無法建立拘束. - + Cannot add a constraint between two fixed geometries. Fixed geometries include external geometry, blocked geometry, and special points such as B-spline knot points. 無法在兩個固定幾何之間添加拘束。固定幾何包括外部幾何、區塊幾何和特殊點例如 B 雲形線之結點。 - + Sketcher Constraint Substitution 草圖拘束替換 - + Keep notifying me of constraint substitutions 繼續通知我拘束替換 - - - + + + Only sketch and its support are allowed to be selected. 只允許選擇草圖及其支撐。 - + One of the selected has to be on the sketch. 被選擇之一必須在草圖上。 - - + + Select an edge from the sketch. 於草圖中選擇邊 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + Impossible constraint 無法拘束 - - - - + + + + The selected edge is not a line segment. 所選之邊非為線段. - - - - - - + + + + + + Double constraint 雙重拘束 - - - - - + + + + + The selected edge already has a horizontal constraint! 選取的邊線已經有水平拘束! - - - + + + The selected edge already has a vertical constraint! 選取的邊線已經有垂直拘束! - - - - - - + + + + + + The selected edge already has a Block constraint! 所選邊線已套用定位拘束! - + The selected item(s) can't accept a horizontal constraint! 所選項目無法使用水平拘束! - - + + There are more than one fixed points selected. Select a maximum of one fixed point! 選取超過一個固定點. 請選取最多一個固定點! - + The selected item(s) can't accept a vertical constraint! 所選項目無法使用垂直拘束! - - - + + + Select vertices from the sketch. 從草圖中選取頂點 - + Select one vertex from the sketch other than the origin. 從草圖中選取一個非原點之頂點 - + Select only vertices from the sketch. The last selected vertex may be the origin. 從草圖中只選擇端點。 最後選擇的頂點可能是原點。 - + Wrong solver status 求解器狀態錯誤 - + A Block constraint cannot be added if the sketch is unsolved or there are redundant and conflicting constraints. 如果草圖中的求解器無法解出或存在冗餘、衝突的約束,則不能再添加定位約束。 - + Select one edge from the sketch. 從草圖中選取一邊線 - + Select only edges from the sketch. 僅有邊線能從草圖中被選取 - + Number of selected objects is not 3 選取之物件數量非為3 - + Error 錯誤 - + Unexpected error. More information may be available in the Report View. Unexpected error. More information may be available in the Report View. - + Endpoint to endpoint tangency was applied instead. 已被取代為終點對終點相切 - + Select two or more points from the sketch. 從草圖中選取二個或更多點 - + Select two or more vertices from the sketch. 從草圖中選取兩個或更多頂點。 - + Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two or more vertices from the sketch for a coincident constraint, or two or more circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint. - + Select exactly one line or one point and one line or two points from the sketch. 由草圖中選取一條線或一個點,以及一條線或兩個點。 - + Cannot add a length constraint on an axis! 無法於軸上增加長度拘束! - - + + Select exactly one line or one point and one line or two points or two circles from the sketch. Select exactly one line or one point and one line or two points or two circles from the sketch. - + This constraint does not make sense for non-linear curves. 此拘束條件在非線性曲線上並不合理. - + Endpoint to edge tangency was applied instead. 改為應用端點到邊相切。 - - - - - - - + + + + + + + Select the right things from the sketch. 從草圖中選取正確的圖元 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Select an edge that is not a B-spline weight. 選擇不是 B 雲形線權重的邊 - + None of the selected points were constrained onto the respective curves, because they are parts of the same element, because they are both external geometry, or because the edge is not eligible. 沒有任何被選擇點被拘束在其個別的曲線上,因為它們是同一個元件的一部份,因為它們都是外部幾何,或是因為其邊不符合條件。 - + None of the selected points were constrained onto the respective curves, either because they are parts of the same element, or because they are both external geometry. 沒有任何被選擇點被拘束在其個別的曲線上,要麼因為它們都是同一元件的一部份,或是因為他們都是外部幾何。 - - - - + + + + Select exactly one line or up to two points from the sketch. 於草圖中選取一條線或最多兩個點。 - + Cannot add a horizontal length constraint on an axis! 無法於軸上增加水平長度拘束! - + Cannot add a fixed x-coordinate constraint on the origin point! 在原點上無法加入固定X軸拘束! - - + + This constraint only makes sense on a line segment or a pair of points. 此拘束只針對線段或是一對點有意義。 - + Cannot add a vertical length constraint on an axis! 無法於軸上增加垂直長度拘束! - + Cannot add a fixed y-coordinate constraint on the origin point! 在原點上無法加入固定Y軸拘束! - + Select two or more lines from the sketch. 由草圖中選取兩條或以上線條。 - - + + Select at least two lines from the sketch. 由草圖中選取至少兩條線。 - + Select a valid line. 選擇一條有效的線。 - - + + The selected edge is not a valid line. 所選之邊非為有效線段. - + There is a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2907,42 +2900,42 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 此拘束尚有許多方式可以使用,可用的組合有:兩條曲線、兩個端點、兩條曲線及一個點。 - + Select some geometry from the sketch. perpendicular constraint 從草圖中選取一些幾何。 - - + + Cannot add a perpendicularity constraint at an unconnected point! 無法於未連接點上建立垂直拘束! - - - + + + Perpendicular to B-spline edge currently unsupported. B雲形線的邊線目前並不支援垂直拘束 - - + + One of the selected edges should be a line. 所選之邊中需有一條線。 - + Endpoint to endpoint tangency was applied. The coincident constraint was deleted. 已套用點對點相切拘束,共點拘束已被刪除 - + Endpoint to edge tangency was applied. The point on object constraint was deleted. 終點到邊已套用相切(拘束)。因此點到物件之拘束被刪除。 - + There are a number of ways this constraint can be applied. Accepted combinations: two curves; an endpoint and a curve; two endpoints; two curves and a point. @@ -2952,182 +2945,182 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 可接受的組合:二條曲線; 一個終止點及一條曲線;二個終主點;二條曲線及一點。 - + Select some geometry from the sketch. tangent constraint 從草圖中選取一些幾何。 - - - + + + Cannot add a tangency constraint at an unconnected point! 無法於未連接點上建立相切拘束! - - + + Tangent constraint at B-spline knot is only supported with lines! Tangent constraint at B-spline knot is only supported with lines! - + B-spline knot to endpoint tangency was applied instead. B-spline knot to endpoint tangency was applied instead. - + Select either one point and several curves, or one curve and several points. Select either one point and several curves, or one curve and several points. - - + + Wrong number of selected objects! 選取之物件數量有誤! - - + + With 3 objects, there must be 2 curves and 1 point. 三個物件時至少需有2條曲線及1個點。 - - - + + + Tangency to B-spline edge currently unsupported. 切線到 B 雲形線之邊緣目前並不支援 - - - - - - + + + + + + Select one or more arcs or circles from the sketch. 從草圖中選取一個或多個弧或圓。 - - + + Select either only one or more B-Spline poles or only one or more arcs or circles from the sketch, but not mixed. 從草圖中僅選擇一個或多個 B 雲形線極點或僅選擇一個或多個圓弧或圓,但不要混合。 - - - + + + Constraint only applies to arcs or circles. 拘束僅能用在圓弧或圓上 - - + + Select one or two lines from the sketch. Or select two edges and a point. 從草圖中選取一或兩條線條,或選取兩個邊及一個點。 - - + + Parallel lines 平行線 - - + + An angle constraint cannot be set for two parallel lines. 無法於兩條平行線間建立角度拘束。 - + Cannot add an angle constraint on an axis! 無法於軸上建立角度拘束! - + Select two edges from the sketch. 由草圖中選取兩個邊。 - + Select two or more compatible edges. 選擇兩個或更多相容之邊. - + Sketch axes cannot be used in equality constraints. 草圖軸不能用在同等拘束。 - + Equality for B-spline edge currently unsupported. 不支援B雲形線的等長拘束。 - - - - + + + + Select two or more edges of similar type. 選取兩個或更多相似類型之邊. - - - - - + + + + + Select two points and a symmetry line, two points and a symmetry point or a line and a symmetry point from the sketch. 請從草圖中選取兩個點及對稱線,兩個點及對稱點或一條線擊對稱點。 - - + + Cannot add a symmetry constraint between a line and its end points. 無法在一條線及其端點間添加對稱拘束。 - - - - + + + + Cannot add a symmetry constraint between a line and its end points! 無法於線及其終點建立對稱拘束! - + Select two endpoints of lines to act as rays, and an edge representing a boundary. The first selected point corresponds to index n1, second to n2, and datum value sets the ratio n2/n1. Constraint_SnellsLaw 選取線段之兩個端點做為光線,以及一個邊緣做為邊界,先選的點會編號為n1,後選的點則編號為n2,基準值設定為n2/n1。 - + Selected objects are not just geometry from one sketch. 選取之物件並非來自於草圖之幾何。 - + Cannot create constraint with external geometry only. 僅用外部幾何無法建立拘束. - + Incompatible geometry is selected. 選取了不相容的幾何. - + SnellsLaw on B-spline edge is currently unsupported. B雲形線邊緣上的司乃耳定律目前不支援。 - - - - - + + + + + Select constraints from the sketch. 從草圖中選取拘束 @@ -3626,12 +3619,12 @@ Accepted combinations: two curves; an endpoint and a curve; two endpoints; two c 長度: - + Refractive index ratio 折射率比例 - + Ratio n2/n1: 比例 n2/n1: @@ -5215,119 +5208,119 @@ This is done by analyzing the sketch geometries and constraints. SketcherGui::ViewProviderSketch - + Edit sketch 編輯草圖 - + A dialog is already open in the task panel 於工作面板已開啟對話窗 - + Do you want to close this dialog? 您確定要關閉此對話窗嗎? - + Invalid sketch 錯誤之草圖 - + Do you want to open the sketch validation tool? 您要開啟草圖驗證工具嗎? - + The sketch is invalid and cannot be edited. 此為無效且不能編輯之草圖 - + Please remove the following constraint: 請移除下列拘束: - + Please remove at least one of the following constraints: 請移除下列至少一個拘束: - + Please remove the following redundant constraint: 請移除下列多餘拘束: - + Please remove the following redundant constraints: 請移除下列多餘拘束: - + The following constraint is partially redundant: 以下拘束為部份冗餘: - + The following constraints are partially redundant: 以下拘束為部份冗餘: - + Please remove the following malformed constraint: 請移除下列格式錯誤拘束: - + Please remove the following malformed constraints: 請移除下列格式錯誤拘束: - + Empty sketch 空白草圖 - + Over-constrained: 過度拘束: - + Malformed constraints: 格式錯誤的拘束: - + Redundant constraints: 冗餘拘束: - + Partially redundant: 部份冗餘: - + Solver failed to converge 求解器無法收斂 - + Under constrained: 在拘束下: - + %n DoF(s) %n 自由度 - + Fully constrained 完全拘束 @@ -5425,8 +5418,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainDiameter - - + + Fix the diameter of a circle or an arc 固定一個圓或弧的直徑 @@ -5434,7 +5427,8 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadiam - + + Fix the radius/diameter of a circle or an arc 固定一個圓或弧的半徑/直徑 @@ -5442,20 +5436,12 @@ This is done by analyzing the sketch geometries and constraints. Sketcher_ConstrainRadius - - + + Fix the radius of a circle or an arc 固定圓或弧之半徑 - - Sketcher_ConstraintRadiam - - - Fix the radius/diameter of a circle or an arc - 固定一個圓或弧的半徑/直徑 - - Sketcher_Copy @@ -6069,7 +6055,7 @@ Eigen Sparse QR 算法針對稀疏矩陣進行了優化;通常更快 ViewProviderSketch - + and %1 more 還有 %1 個 @@ -6292,7 +6278,7 @@ The grid spacing change if it becomes smaller than this number of pixel.The Sketch has partially redundant constraints! - + Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! Parabolas were migrated. Migrated files won't open in previous versions of FreeCAD!! @@ -6303,7 +6289,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6328,7 +6314,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + @@ -6351,13 +6337,13 @@ The grid spacing change if it becomes smaller than this number of pixel.The constraint has invalid index information and is malformed. - - - - - - - + + + + + + + @@ -6368,7 +6354,7 @@ The grid spacing change if it becomes smaller than this number of pixel. - + Failed to add arc Failed to add arc @@ -6482,7 +6468,7 @@ The grid spacing change if it becomes smaller than this number of pixel.Failed to add box - + Failed to add rounded rectangle Failed to add rounded rectangle @@ -6664,17 +6650,17 @@ Points must be set closer than a fifth of the grid spacing to a grid line to sna CmdSketcherDimension - + Dimension 標註 - + Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. Constrain contextually based on your selection. -Depending on your selection you might have several constraints available. You can cycle through them using SHIFT key. +Depending on your selection you might have several constraints available. You can cycle through them using M key. Left clicking on empty space will validate the current constraint. Right clicking or pressing Esc will cancel. @@ -6694,14 +6680,27 @@ Left clicking on empty space will validate the current constraint. Right clickin CmdSketcherCompDimensionTools - + Dimension 標註 - + Dimension tools. Dimension tools. + + CmdSketcherConstrainRadius + + + Constrain radius + 半徑拘束 + + + + Fix the radius of a circle or an arc + 固定圓或弧之半徑 + + diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 7352cd8407..120e1e5afa 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -1583,13 +1583,13 @@ void ViewProviderSketch::moveConstraint(int constNum, const Base::Vector2d& toPo if (!isInEditMode()) return; - const std::vector& constrlist = - getSketchObject()->Constraints.getValues(); + Sketcher::SketchObject* obj = getSketchObject(); + const std::vector& constrlist = obj->Constraints.getValues(); Constraint* Constr = constrlist[constNum]; #ifdef FC_DEBUG - int intGeoCount = getSketchObject()->getHighestCurveIndex() + 1; - int extGeoCount = getSketchObject()->getExternalGeometryCount(); + int intGeoCount = obj->getHighestCurveIndex() + 1; + int extGeoCount = obj->getExternalGeometryCount(); #endif // with memory allocation @@ -1753,93 +1753,123 @@ void ViewProviderSketch::moveConstraint(int constNum, const Base::Vector2d& toPo } } else if (Constr->Type == Angle) { - - Base::Vector3d p0(0., 0., 0.); - double factor = 0.5; - if (Constr->Second != GeoEnum::GeoUndef) {// line to line angle - Base::Vector3d dir1, dir2; - - if (Constr->Third == GeoEnum::GeoUndef) {// angle between two lines - const Part::Geometry* geo1 = GeoList::getGeometryFromGeoId(geomlist, Constr->First); - const Part::Geometry* geo2 = - GeoList::getGeometryFromGeoId(geomlist, Constr->Second); - - if (geo1->getTypeId() != Part::GeomLineSegment::getClassTypeId() - || geo2->getTypeId() != Part::GeomLineSegment::getClassTypeId()) - return; - const Part::GeomLineSegment* lineSeg1 = - static_cast(geo1); - const Part::GeomLineSegment* lineSeg2 = - static_cast(geo2); - - bool flip1 = (Constr->FirstPos == Sketcher::PointPos::end); - bool flip2 = (Constr->SecondPos == Sketcher::PointPos::end); - - dir1 = (flip1 ? -1. : 1.) * (lineSeg1->getEndPoint() - lineSeg1->getStartPoint()); - dir2 = (flip2 ? -1. : 1.) * (lineSeg2->getEndPoint() - lineSeg2->getStartPoint()); - Base::Vector3d pnt1 = flip1 ? lineSeg1->getEndPoint() : lineSeg1->getStartPoint(); - Base::Vector3d pnt2 = flip2 ? lineSeg2->getEndPoint() : lineSeg2->getStartPoint(); - - // line-line intersection - { - double det = dir1.x * dir2.y - dir1.y * dir2.x; - if ((det > 0 ? det : -det) < 1e-10) - return;// lines are parallel - constraint unmoveable (DeepSOIC: why?..) - double c1 = dir1.y * pnt1.x - dir1.x * pnt1.y; - double c2 = dir2.y * pnt2.x - dir2.x * pnt2.y; - double x = (dir1.x * c2 - dir2.x * c1) / det; - double y = (dir1.y * c2 - dir2.y * c1) / det; - // intersection point - p0 = Base::Vector3d(x, y, 0); - - Base::Vector3d vec = Base::Vector3d(toPos.x, toPos.y, 0) - p0; - factor = factor * Base::sgn((dir1 + dir2) * vec); - } - } - else {// angle-via-point - Base::Vector3d p = getSolvedSketch().getPoint(Constr->Third, Constr->ThirdPos); - p0 = Base::Vector3d(p.x, p.y, 0); - dir1 = getSolvedSketch().calculateNormalAtPoint(Constr->First, p.x, p.y); - dir1.RotateZ(-M_PI / 2);// convert to vector of tangency by rotating - dir2 = getSolvedSketch().calculateNormalAtPoint(Constr->Second, p.x, p.y); - dir2.RotateZ(-M_PI / 2); - - Base::Vector3d vec = Base::Vector3d(toPos.x, toPos.y, 0) - p0; - factor = factor * Base::sgn((dir1 + dir2) * vec); - } - } - else if (Constr->First != GeoEnum::GeoUndef) {// line/arc angle - const Part::Geometry* geo = GeoList::getGeometryFromGeoId(geomlist, Constr->First); - - if (geo->getTypeId() == Part::GeomLineSegment::getClassTypeId()) { - const Part::GeomLineSegment* lineSeg = - static_cast(geo); - p0 = (lineSeg->getEndPoint() + lineSeg->getStartPoint()) / 2; - } - else if (geo->getTypeId() == Part::GeomArcOfCircle::getClassTypeId()) { - const Part::GeomArcOfCircle* arc = static_cast(geo); - p0 = arc->getCenter(); - } - else { - return; - } - } - else - return; - - Base::Vector3d vec = Base::Vector3d(toPos.x, toPos.y, 0) - p0; - Constr->LabelDistance = factor * vec.Length(); + moveAngleConstraint(constNum, toPos); } // delete the cloned objects - for (std::vector::const_iterator it = geomlist.begin(); it != geomlist.end(); - ++it) - if (*it) - delete *it; + for (Part::Geometry* geomPtr : geomlist) { + if (geomPtr) { + delete geomPtr; + } + } draw(true, false); } +void ViewProviderSketch::moveAngleConstraint(int constNum, const Base::Vector2d& toPos) +{ + Sketcher::SketchObject* obj = getSketchObject(); + const std::vector& constrlist = obj->Constraints.getValues(); + Constraint* constr = constrlist[constNum]; + + Base::Vector3d p0(0., 0., 0.); + double factor = 0.5; + if (constr->Second != GeoEnum::GeoUndef) {// line to line angle + if (constr->Third == GeoEnum::GeoUndef) {// angle between two lines + const Part::Geometry* geo1 = obj->getGeometry(constr->First); + const Part::Geometry* geo2 = obj->getGeometry(constr->Second); + + if (!isLineSegment(*geo1) || !isLineSegment(*geo2)) { + return; + } + const auto* lineSeg1 = static_cast(geo1); + const auto* lineSeg2 = static_cast(geo2); + + Base::Vector2d l1[2], l2[2]; + l1[0] = Base::Vector2d(lineSeg1->getStartPoint().x, lineSeg1->getStartPoint().y); + l1[1] = Base::Vector2d(lineSeg1->getEndPoint().x, lineSeg1->getEndPoint().y); + l2[0] = Base::Vector2d(lineSeg2->getStartPoint().x, lineSeg2->getStartPoint().y); + l2[1] = Base::Vector2d(lineSeg2->getEndPoint().x, lineSeg2->getEndPoint().y); + + // First we will check if the angle needs to be reversed to its supplementary + bool flip1 = (constr->FirstPos == Sketcher::PointPos::end); + bool flip2 = (constr->SecondPos == Sketcher::PointPos::end); + Base::Vector2d p11 = flip1 ? l1[1] : l1[0]; + Base::Vector2d p12 = flip1 ? l1[0] : l1[1]; + Base::Vector2d p21 = flip2 ? l2[1] : l2[0]; + Base::Vector2d p22 = flip2 ? l2[0] : l2[1]; + + // Get the intersection point in 2d of the two lines if possible + Base::Line2d line1(p11, p12); + Base::Line2d line2(p21, p22); + Base::Vector2d intersection = Base::Vector2d(0., 0.); + if (!line1.Intersect(line2, intersection)) { + return; + } + + Base::Vector2d dir1 = p12 - p11; + Base::Vector2d dir2 = p22 - p21; + + Base::Vector2d ap3 = intersection + dir1 + dir2; + + auto isLeftOfLine = [](Base::Vector2d a, Base::Vector2d b, Base::Vector2d c) { + return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x) > 0; + }; + + bool sign1 = isLeftOfLine(p11, p12, ap3); + bool sign2 = isLeftOfLine(p21, p22, ap3); + + bool sign3 = isLeftOfLine(p11, p12, toPos); + bool sign4 = isLeftOfLine(p21, p22, toPos); + + bool reverse = !(sign1 == sign3 && sign2 == sign4) && !(sign1 != sign3 && sign2 != sign4); + + if (reverse) { + obj->reverseAngleConstraintToSupplementary(constr, constNum); + + ap3 = intersection + dir1 - dir2; //- dir2 instead fo std::swap(dir1, dir2) and dir1 = -dir1 + sign1 = isLeftOfLine(p11, p12, ap3); + sign2 = isLeftOfLine(p21, p22, ap3); + } + + p0 = Base::Vector3d(intersection.x, intersection.y, 0.); + factor *= (sign1 == sign3 && sign2 == sign4) ? 1. : -1.; + } + else {// angle-via-point + Base::Vector3d p = getSolvedSketch().getPoint(constr->Third, constr->ThirdPos); + p0 = Base::Vector3d(p.x, p.y, 0); + Base::Vector3d dir1 = getSolvedSketch().calculateNormalAtPoint(constr->First, p.x, p.y); + dir1.RotateZ(-M_PI / 2);// convert to vector of tangency by rotating + Base::Vector3d dir2 = getSolvedSketch().calculateNormalAtPoint(constr->Second, p.x, p.y); + dir2.RotateZ(-M_PI / 2); + + Base::Vector3d vec = Base::Vector3d(toPos.x, toPos.y, 0) - p0; + factor = factor * Base::sgn((dir1 + dir2) * vec); + } + } + else if (constr->First != GeoEnum::GeoUndef) {// line/arc angle + const Part::Geometry* geo = obj->getGeometry(constr->First); + + if (isLineSegment(*geo)) { + const auto* lineSeg = static_cast(geo); + p0 = (lineSeg->getEndPoint() + lineSeg->getStartPoint()) / 2; + } + else if (isArcOfCircle(*geo)) { + const auto* arc = static_cast(geo); + p0 = arc->getCenter(); + } + else { + return; + } + } + else { + return; + } + + Base::Vector3d vec = Base::Vector3d(toPos.x, toPos.y, 0) - p0; + constr->LabelDistance = factor * vec.Length(); +} + bool ViewProviderSketch::isSelectable() const { if (isEditing()) diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.h b/src/Mod/Sketcher/Gui/ViewProviderSketch.h index b5ce402cb8..820078bac0 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.h +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.h @@ -757,6 +757,7 @@ private: //@{ /// moves a selected constraint void moveConstraint(int constNum, const Base::Vector2d& toPos); + void moveAngleConstraint(int constNum, const Base::Vector2d& toPos); /// returns whether the sketch is in edit mode. bool isInEditMode() const; diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts index 5d1d2368d1..dfaf5fcd26 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet - + Create spreadsheet - + Create a new spreadsheet @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet - + Align bottom - + Bottom-align contents of selected cells @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet - + Align center - + Center-align contents of selected cells @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet - + Align left - + Left-align contents of selected cells @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet - + Align right - + Right-align contents of selected cells @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet - + Align top - + Top-align contents of selected cells @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet - + Vertically center-align - + Vertically center-align contents of selected cells @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet - + Export spreadsheet - + Export spreadsheet to CSV file @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet - + Import spreadsheet - + Import CSV file into spreadsheet @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet - + Set alias - + Set alias for selected cell @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet - + Split cell - + Split previously merged cells @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet - + Bold text - + Set text in selected cells bold @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet - + Italic text - + Set text in selected cells italic @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet - + Underline text - + Underline text in selected cells @@ -282,106 +282,106 @@ Command - + Merge cells - + Split cell - + Left-align cell - + Center cell - + Right-align cell - + Top-align cell - + Bottom-align cell - + Vertically center cells - + Set bold text - + Set italic text - + Set underline text - + Create Spreadsheet - + Set cell properties - + Edit cell - - + + Insert rows - - + + Remove rows - - + + Insert columns - - + + Clear cell(s) - + Set foreground color - + Set background color @@ -657,66 +657,66 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) - + Import file - + Export file - + Show spreadsheet - - + + Set cell(s) foreground color - + Sets the Spreadsheet cell(s) foreground color - - + + Set cell(s) background color - + Sets the Spreadsheet cell(s) background color - + Copy & Paste failed - + Alias contains invalid characters! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 - + Spreadsheet @@ -854,30 +854,30 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? - + Bind Spreadsheet Cells - + Error: - + Unbind cells @@ -957,12 +957,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table - + Unsetup configuration table @@ -970,118 +970,118 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above - + Insert %n row(s) below - + Insert %n non-contiguous rows - + Remove row(s) - + Insert %n column(s) left - + Insert %n column(s) right - + Insert %n non-contiguous columns - + Remove column(s) - - + + Properties... - - + + Recompute - - + + Bind... - - + + Configuration table... - - + + Merge cells - - + + Split cells - - + + Cut - - + + Copy - - + + Paste - - + + Delete @@ -1089,12 +1089,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF - + PDF file @@ -1125,7 +1125,7 @@ Defaults to: %V = %A Py - + Unnamed diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts index 6712ee1a45..d7e43b34e5 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_be.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Аркуш - + Create spreadsheet Стварыць зводную табліцу - + Create a new spreadsheet Стварыць новы аркуш @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Аркуш - + Align bottom Выраўнаваць па ніжняй мяжы - + Bottom-align contents of selected cells Выраўнаваць змесціва абраных клетак па ніжняй мяжы @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Аркуш - + Align center Выраўнаваць па цэнтры - + Center-align contents of selected cells Выраўнаваць змесціва абраных клетак па цэнтры @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Аркуш - + Align left Выраўнаваць па левай мяжы - + Left-align contents of selected cells Выраўнаваць змесціва абраных клетак па левай мяжы @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Аркуш - + Align right Выраўнаваць па правай мяжы - + Right-align contents of selected cells Выраўнаваць змесціва абраных клетак па правай мяжы @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Аркуш - + Align top Выраўнаваць па верхняй мяжы - + Top-align contents of selected cells Выраўнаваць змесціва абраных клетак па верхняй мяжы @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Аркуш - + Vertically center-align Выраўнаваць вертыкальна па цэнтры - + Vertically center-align contents of selected cells Выраўнаваць змесціва абраных клетак вертыкальна па цэнтры @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Аркуш - + Export spreadsheet Экспартаваць аркуш - + Export spreadsheet to CSV file Экспартаваць аркуш у файл CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Аркуш - + Import spreadsheet Імпартаваць аркуш - + Import CSV file into spreadsheet Імпартаваць файл CSV у аркуш @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Аркуш - + Set alias Задаць псеўданім - + Set alias for selected cell Задаць псеўданім да абранай клеткі @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Аркуш - + Split cell Падзяліць клетку - + Split previously merged cells Падзяліць раней аб'яднаныя клеткі @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Аркуш - + Bold text Тлусты тэкст - + Set text in selected cells bold Зрабіць тлусты тэкст у абраных клетках @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Аркуш - + Italic text Курсіўны тэкст - + Set text in selected cells italic Зрабіць курсіўны тэкст у абраных клетках @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Аркуш - + Underline text Падкрэсліць тэкст - + Underline text in selected cells Падкрэсліць тэкст у абраных клетках @@ -282,106 +282,106 @@ Command - + Merge cells Аб'яднаць клеткі - + Split cell Падзяліць клетку - + Left-align cell Клетка па левай мяжы - + Center cell Клетка па цэнтры - + Right-align cell Клетка па правай мяжы - + Top-align cell Клетка па верхняй мяжы - + Bottom-align cell Клетка па ніжняй мяжы - + Vertically center cells Клетка вертыкальна па цэнтры - + Set bold text Зрабіць тлусты тэкст - + Set italic text Зрабіць курсіўны тэкст - + Set underline text Задаць падкрэслены тэкст - + Create Spreadsheet Стварыць аркуш - + Set cell properties Задаць уласцівасці клеткі - + Edit cell Змяніць клетку - - + + Insert rows Уставіць радкі - - + + Remove rows Выдаліць радкі - - + + Insert columns Уставіць слупкі - - + + Clear cell(s) Ачысціць клеткі - + Set foreground color Задаць колер зместа - + Set background color Задаць колер фону @@ -675,67 +675,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Усе (*) - + Import file Імпартаваць файл - + Export file Экспартаваць файл - + Show spreadsheet Паказаць аркуш - - + + Set cell(s) foreground color Задаць колер зместу клетак - + Sets the Spreadsheet cell(s) foreground color Задаць колер зместу клетак аркуша - - + + Set cell(s) background color Задаць колер фону клетак - + Sets the Spreadsheet cell(s) background color Задаць колер фону клетак аркуша - + Copy & Paste failed Не атрымалася скапіраваць і ўставіць - + Alias contains invalid characters! Псеўданім змяшчае хібныя знакі! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Звярніцеся да клеткі па псеўданіму, напрыклад Аркуш.імя_псеўданіма замест Аркуш.В1 - + Spreadsheet Аркуш @@ -874,12 +874,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Прывязаць клеткі - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -888,19 +888,19 @@ Do you want to continue? Вы жадаеце працягнуць? - + Bind Spreadsheet Cells Прывязаць клеткі аркуша - + Error: - Памылка: + Error: - + Unbind cells Адвязаць клеткі @@ -984,12 +984,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Табліца наладаў устаноўкі - + Unsetup configuration table Табліца выдалення наладаў устаноўкі @@ -997,7 +997,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Уставіць %n радок вышэй @@ -1007,7 +1007,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Уставіць %n радок ніжэй @@ -1017,7 +1017,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Уставіць %n несумежны радок @@ -1027,7 +1027,7 @@ Defaults to: %V = %A - + Remove row(s) Выдаліць радок @@ -1037,7 +1037,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Уставіць %n слупок злева @@ -1047,7 +1047,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Уставіць %n слупок справа @@ -1057,7 +1057,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Уставіць %n несумежны слупок @@ -1067,7 +1067,7 @@ Defaults to: %V = %A - + Remove column(s) Выдаліць слупок @@ -1077,62 +1077,62 @@ Defaults to: %V = %A - - + + Properties... Уласцівасці... - - + + Recompute Пералічыць - - + + Bind... Прывязаць... - - + + Configuration table... Табліца наладаў... - - + + Merge cells Аб'яднаць клеткі - - + + Split cells Падзяліць клеткі - - + + Cut Выразаць - - + + Copy Скапіраваць - - + + Paste Уставіць - - + + Delete Выдаліць @@ -1140,12 +1140,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Экспартаваць у PDF - + PDF file Файл PDF @@ -1176,7 +1176,7 @@ Defaults to: %V = %A Py - + Unnamed Без назвы diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts index d3b7f2590b..b3eebd9de5 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ca.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Full de càlcul - + Create spreadsheet Crear el full de càlcul - + Create a new spreadsheet Crear un nou full de càlcul @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Full de càlcul - + Align bottom Alineació inferior - + Bottom-align contents of selected cells Alineat inferior el contingut de les cel·les seleccionades @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Full de càlcul - + Align center Alineació al centre - + Center-align contents of selected cells Alineat centrat del contingut de les cel. les seleccionades @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Full de càlcul - + Align left Alineat esquerra - + Left-align contents of selected cells Esquerra Alinea el contingut de les cel·les seleccionades @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Full de càlcul - + Align right Alinea a la dreta - + Right-align contents of selected cells Dreta Alinea el contingut de les cel·les seleccionades @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Full de càlcul - + Align top Alineació superior - + Top-align contents of selected cells Alineació a la part superior del contingut de les cel·les seleccionades @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Full de càlcul - + Vertically center-align Centrar verticalment - + Vertically center-align contents of selected cells Alineació vertical i centrada dels continguts de les cel·les seleccionades @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Full de càlcul - + Export spreadsheet Exportar full de càlcul - + Export spreadsheet to CSV file Exportar full de càlcul a CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Full de càlcul - + Import spreadsheet Importar full de càlcul - + Import CSV file into spreadsheet Importar CSV a un full de càlcul @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Full de càlcul - + Set alias Estableix l'àlies - + Set alias for selected cell Estableix l'àlies per a les cel·les seleccionades @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Full de càlcul - + Split cell Divideix la cel·la - + Split previously merged cells Divideix les cel·les prèviament fusionades @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Full de càlcul - + Bold text Text en negreta - + Set text in selected cells bold Estableix el text en negreta en les cel·les seleccionades @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Full de càlcul - + Italic text Text en cursiva - + Set text in selected cells italic Estableix el text en cursiva en les cel·les seleccionades @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Full de càlcul - + Underline text Text subratllat - + Underline text in selected cells Subratlla el text en les cel·les seleccionades @@ -282,106 +282,106 @@ Command - + Merge cells Fusiona les cel·les - + Split cell Divideix la cel·la - + Left-align cell Alineat a l’esquerra - + Center cell Alineat al centre - + Right-align cell Alineat a la dreta - + Top-align cell Alineat a dalt - + Bottom-align cell Alineat abaix - + Vertically center cells Centrar verticalment - + Set bold text Text en negreta - + Set italic text Text en cursiva - + Set underline text Text subratllat - + Create Spreadsheet Crear full de càlcul - + Set cell properties Propietats de la cel·la - + Edit cell Edita la cel·la - - + + Insert rows Insereix files - - + + Remove rows Suprimeix files - - + + Insert columns Insereix columnes - - + + Clear cell(s) Neteja les cel·la(s) - + Set foreground color Color de la clel·la - + Set background color Color de fons @@ -679,67 +679,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Tot (*) - + Import file Importa el fitxer - + Export file Exporta el fitxer - + Show spreadsheet Mostra el full de càlcul - - + + Set cell(s) foreground color Estableix el color de primer pla de les cel·la(es) - + Sets the Spreadsheet cell(s) foreground color Estableix el color de primer pla de la(es) cel·la(es) del full de càlcul - - + + Set cell(s) background color Estableix el color de fons de la(es) cel·la(es) - + Sets the Spreadsheet cell(s) background color Estableix el color de fons de la(es) cel·la(es) del full de càlcul - + Copy & Paste failed S'ha produït un error en copiar i enganxar - + Alias contains invalid characters! El sobrenom conté caràcters no vàlids! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Consulteu la cel·la per sobrenom, per exemple Spreadsheet.my_alias_name enlloc de Spreadsheet.B1 - + Spreadsheet Full de càlcul @@ -878,12 +878,12 @@ Spreadsheet.my_alias_name enlloc de Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Vincula cel·les - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -891,19 +891,19 @@ Do you want to continue? Vols continuar? - + Bind Spreadsheet Cells Enllaça cel·les del full de càlcul - + Error: - Error: + Error: - + Unbind cells Desvincula cel·les @@ -987,12 +987,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Configura la taula de configuració - + Unsetup configuration table Unsetup configuration table @@ -1000,7 +1000,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insereix %n fila/es a sobre @@ -1008,7 +1008,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Insereix %n fila/es a sota @@ -1016,7 +1016,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Insereix %n fila no contingua @@ -1024,7 +1024,7 @@ Defaults to: %V = %A - + Remove row(s) Elimina fila/es @@ -1032,7 +1032,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Insereix %n columna/es a l'esquerra @@ -1040,7 +1040,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Insereix %n columna/es a la dreta @@ -1048,7 +1048,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Insereix %n columnes no contingues @@ -1056,7 +1056,7 @@ Defaults to: %V = %A - + Remove column(s) Elimina columna/es @@ -1064,62 +1064,62 @@ Defaults to: %V = %A - - + + Properties... Propietats... - - + + Recompute Recalcula - - + + Bind... Vincula... - - + + Configuration table... Taula de configuració... - - + + Merge cells Fusiona les cel·les - - + + Split cells Separa cel·les - - + + Cut Talla - - + + Copy Copia - - + + Paste Enganxa - - + + Delete Elimina @@ -1127,12 +1127,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Exporta a PDF - + PDF file Arxiu PDF @@ -1163,7 +1163,7 @@ Defaults to: %V = %A Py - + Unnamed Sense nom diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts index 471e9a7014..59416973b4 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_cs.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Tabulka - + Create spreadsheet Vytvoř tabulku - + Create a new spreadsheet Vytvoř novou tabulku @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Tabulka - + Align bottom Zarovnat dolů - + Bottom-align contents of selected cells Obsah vybraných buněk Zarovnat dolů @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Tabulka - + Align center Zarovnat na střed - + Center-align contents of selected cells Zarovnat na střed obsah vybraných buněk @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Tabulka - + Align left Zarovnat vlevo - + Left-align contents of selected cells Doleva zarovnat obsah vybraných buněk @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Tabulka - + Align right Zarovnat vpravo - + Right-align contents of selected cells Zarovnat doprava obsah vybraných buněk @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Tabulka - + Align top Zarovnat nahoru - + Top-align contents of selected cells Obsah vybraných buněk Zarovnat nahoru @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Tabulka - + Vertically center-align Zarovnat na střed - + Vertically center-align contents of selected cells Vertikálně vystředit obsah vybraných buněk @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Tabulka - + Export spreadsheet Exportovat tabulku - + Export spreadsheet to CSV file Tabulku exportovat do souboru CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Tabulka - + Import spreadsheet Importovat tabulku - + Import CSV file into spreadsheet Import souboru CSV do tabulky @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Tabulka - + Set alias Nastavit alias - + Set alias for selected cell Nastavit alias vybrané buňky @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Tabulka - + Split cell Rozdělit buňku - + Split previously merged cells Rozdělit dříve sloučené buňky @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Tabulka - + Bold text Tučný text - + Set text in selected cells bold Nastavit tučný text ve vybraných buňkách @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Tabulka - + Italic text Kurzíva - + Set text in selected cells italic Zapnout kurzívu ve vybraných buňkách @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Tabulka - + Underline text Podtržení textu - + Underline text in selected cells Podtrhnout text ve vybraných buňkách @@ -282,106 +282,106 @@ Command - + Merge cells Sloučit buňky - + Split cell Rozdělit buňku - + Left-align cell Zarovnat buňku vlevo - + Center cell Zarovnat buňku na střed - + Right-align cell Zarovnat buňku vpravo - + Top-align cell Zarovnat buňku nahoru - + Bottom-align cell Zarovnat buňku dolů - + Vertically center cells Svisle na střed buněk - + Set bold text Tučně - + Set italic text Kurzíva - + Set underline text Podtrženo - + Create Spreadsheet Vytvořit tebulku - + Set cell properties Nastavení buněk - + Edit cell Editovat - - + + Insert rows Vložit řádky - - + + Remove rows Odstranit řádky - - + + Insert columns Vložit sloupce - - + + Clear cell(s) Vymazat buňku(y) - + Set foreground color Barva popředí - + Set background color Barva pozadí @@ -680,67 +680,67 @@ změnit konfiguraci návrhu. Pokud vlastnost neexistuje, bude vytvořena. QObject - - + + All (*) Vše (*) - + Import file Importovat soubor - + Export file Exportovat soubor - + Show spreadsheet Zobrazit tabulku - - + + Set cell(s) foreground color Nastavit barvu popředí buňky - + Sets the Spreadsheet cell(s) foreground color Nastaví barvu popředí buněk v tabulce - - + + Set cell(s) background color Nastavit barvu pozadí buňky - + Sets the Spreadsheet cell(s) background color Nastaví barvu pozadí buněk v tabulce - + Copy & Paste failed Kopírování a vložení se nezdařilo - + Alias contains invalid characters! Alias obsahuje neplatné znaky! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Odkaz na buňku aliasem, například Spreadsheet.alias_nazev místo Spreadsheet.B1 - + Spreadsheet Tabulka @@ -879,12 +879,12 @@ Spreadsheet.alias_nazev místo Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Vázané buňky - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Chcete pokračovat? - + Bind Spreadsheet Cells Sloučit tabulkové buňky - + Error: - Chyba: + Error: - + Unbind cells Zrušte vazbu buněk @@ -989,12 +989,12 @@ Výchozí hodnota: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Nastavení konfigurace tabulky - + Unsetup configuration table Zrušení nastavení konfigurační tabulky @@ -1002,7 +1002,7 @@ Výchozí hodnota: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Vložit %n řádek(řádků) nad @@ -1012,7 +1012,7 @@ Výchozí hodnota: %V = %A - + Insert %n row(s) below Vložit %n řádek(řádků) pod @@ -1022,7 +1022,7 @@ Výchozí hodnota: %V = %A - + Insert %n non-contiguous rows Vložit %n nesouvislých řádků @@ -1032,7 +1032,7 @@ Výchozí hodnota: %V = %A - + Remove row(s) Odstranit řádek(řádky) @@ -1042,7 +1042,7 @@ Výchozí hodnota: %V = %A - + Insert %n column(s) left Vložit %n sloupec(sloupců) vlevo @@ -1052,7 +1052,7 @@ Výchozí hodnota: %V = %A - + Insert %n column(s) right Vložit %n sloupec(sloupců) vpravo @@ -1062,7 +1062,7 @@ Výchozí hodnota: %V = %A - + Insert %n non-contiguous columns Vložit %n nesouvislých sloupců @@ -1072,7 +1072,7 @@ Výchozí hodnota: %V = %A - + Remove column(s) Odstranit sloupec(ce) @@ -1082,62 +1082,62 @@ Výchozí hodnota: %V = %A - - + + Properties... Vlastnosti... - - + + Recompute Přepočítat - - + + Bind... Svázat... - - + + Configuration table... Nastavení konfigurace tabulky... - - + + Merge cells Sloučit buňky - - + + Split cells Rozdělit buňku - - + + Cut Řezat - - + + Copy Kopírovat - - + + Paste Vložit - - + + Delete Odstranit @@ -1145,12 +1145,12 @@ Výchozí hodnota: %V = %A SpreadsheetGui::SheetView - + Export PDF Export PDF - + PDF file PDF soubor @@ -1181,7 +1181,7 @@ Výchozí hodnota: %V = %A Py - + Unnamed Nepojmenovaný diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts index efc4b09ee8..5fbe638bfd 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_de.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Kalkulationstabelle - + Create spreadsheet Kalkulationstabelle erstellen - + Create a new spreadsheet Eine neue Kalkulationstabelle erstellen @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Kalkulationstabelle - + Align bottom Nach unten ausrichten - + Bottom-align contents of selected cells Richtet den Inhalt der ausgewählten Zelle nach unten aus @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Kalkulationstabelle - + Align center Zentrieren - + Center-align contents of selected cells Inhalt der gewählten Zellen zentrieren @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Kalkulationstabelle - + Align left Linksbündig - + Left-align contents of selected cells Richtet den Inhalt der gewählten Zellen am linken Rand aus @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Kalkulationstabelle - + Align right Rechtsbündig - + Right-align contents of selected cells Richtet den Inhalt der gewählten Zellen am rechten Rand aus @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Kalkulationstabelle - + Align top Nach oben ausrichten - + Top-align contents of selected cells Richtet den Inhalt der gewählten Zellen an der oberen Kante aus @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Kalkulationstabelle - + Vertically center-align Vertikal zentrieren - + Vertically center-align contents of selected cells Inhalt der gewählten Zellen vertikal zentrieren @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Kalkulationstabelle - + Export spreadsheet Kalkulationstabelle exportieren - + Export spreadsheet to CSV file Kalkulationstabelle in CSV-Datei exportieren @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Kalkulationstabelle - + Import spreadsheet Kalkulationstabelle importieren - + Import CSV file into spreadsheet CSV-Datei in Kalkulationstabelle importieren @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Kalkulationstabelle - + Set alias Alias-Namen festlegen - + Set alias for selected cell Alias-Namen für ausgewählte Zelle festlegen @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Kalkulationstabelle - + Split cell Zelle teilen - + Split previously merged cells Verbundene Zellen auftrennen @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Kalkulationstabelle - + Bold text Text in Fettschrift - + Set text in selected cells bold Text in den ausgewählten Zellen fett setzen @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Kalkulationstabelle - + Italic text Text in Kursivschrift - + Set text in selected cells italic Text in den ausgewählten Zellen kursiv setzen @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Kalkulationstabelle - + Underline text Text unterstreichen - + Underline text in selected cells Text in den markierten Zellen unterstreichen @@ -282,106 +282,106 @@ Command - + Merge cells Zellen verbinden - + Split cell Zelle teilen - + Left-align cell Zelle links ausrichten - + Center cell Zelle zentrieren - + Right-align cell Zelle rechts ausrichten - + Top-align cell Zelle oben ausrichten - + Bottom-align cell Zelle unten ausrichten - + Vertically center cells Zellen vertikal zentrieren - + Set bold text Text in Fettschrift setzen - + Set italic text Text in Kursivschrift setzen - + Set underline text Text unterstreichen - + Create Spreadsheet Kalkulationstabelle erstellen - + Set cell properties Zelleneigenschaften festlegen - + Edit cell Zelle bearbeiten - - + + Insert rows Zeilen einfügen - - + + Remove rows Zeilen entfernen - - + + Insert columns Spalten einfügen - - + + Clear cell(s) Zelle(n) löschen - + Set foreground color Vordergrundfarbe festlegen - + Set background color Hintergrundfarbe festlegen @@ -677,67 +677,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Alle (*) - + Import file Datei importieren - + Export file Datei exportieren - + Show spreadsheet Kalkulationstabelle anzeigen - - + + Set cell(s) foreground color Stellt die Vordergrundfarbe der Zelle(n) ein - + Sets the Spreadsheet cell(s) foreground color Vordergrundfarbe der Tabellen-Zelle(n) einstellen - - + + Set cell(s) background color Stellt die Hintergrundfarbe der Zelle(n) ein - + Sets the Spreadsheet cell(s) background color Hintergrundfarbe der Tabellen-Zelle(n) einstellen - + Copy & Paste failed Kopieren & Einfügen fehlgeschlagen - + Alias contains invalid characters! Alias enthält ungültige Zeichen! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Zellbezug mit Alias, zum Beispiel Tabelle.my_Alias_name anstelle von Tabelle.B1 - + Spreadsheet Tabelle @@ -876,12 +876,12 @@ Tabelle.my_Alias_name anstelle von Tabelle.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Binde Zellen - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -890,19 +890,19 @@ Do you want to continue? Möchten Sie fortfahren? - + Bind Spreadsheet Cells Tabellenzellen binden - + Error: - Fehler: + Error: - + Unbind cells Zellverbindungen lösen @@ -986,12 +986,12 @@ Standard: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Konfigurationstabelle einrichten - + Unsetup configuration table Konfigurationstabelle aufheben @@ -999,7 +999,7 @@ Standard: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above %n Zeile darüber einfügen @@ -1007,7 +1007,7 @@ Standard: %V = %A - + Insert %n row(s) below %n Zeile darunter einfügen @@ -1015,7 +1015,7 @@ Standard: %V = %A - + Insert %n non-contiguous rows %n nicht verbundene Zeile einfügen @@ -1023,7 +1023,7 @@ Standard: %V = %A - + Remove row(s) Zeile entfernen @@ -1031,7 +1031,7 @@ Standard: %V = %A - + Insert %n column(s) left %n Spalte links einfügen @@ -1039,7 +1039,7 @@ Standard: %V = %A - + Insert %n column(s) right %n Spalte rechts einfügen @@ -1047,7 +1047,7 @@ Standard: %V = %A - + Insert %n non-contiguous columns %n nicht verbundene Spalte einfügen @@ -1055,7 +1055,7 @@ Standard: %V = %A - + Remove column(s) Spalte entfernen @@ -1063,62 +1063,62 @@ Standard: %V = %A - - + + Properties... Eigenschaften... - - + + Recompute Neuberechnung - - + + Bind... Binden... - - + + Configuration table... Konfigurationstabelle... - - + + Merge cells Zellen verbinden - - + + Split cells Zellen teilen - - + + Cut Ausschneiden - - + + Copy Kopieren - - + + Paste Einfügen - - + + Delete Löschen @@ -1126,12 +1126,12 @@ Standard: %V = %A SpreadsheetGui::SheetView - + Export PDF PDF exportieren - + PDF file PDF-Datei @@ -1162,7 +1162,7 @@ Standard: %V = %A Py - + Unnamed Unbenannt diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts index 3a531e699f..64e369af2f 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_el.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Υπολογιστικό Φύλλο - + Create spreadsheet Δημιουργία υπολογιστικού φύλλου - + Create a new spreadsheet Δημιουργία ενός νέου υπολογιστικού φύλλου @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Υπολογιστικό Φύλλο - + Align bottom Στοίχιση κάτω - + Bottom-align contents of selected cells Στοίχιση των περιεχομένων των επιλεγμένων κελιών στο κάτω άκρο @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Υπολογιστικό Φύλλο - + Align center Στοίχιση στο κέντρο - + Center-align contents of selected cells Στοίχιση των περιεχομένων των επιλεγμένων κελιών στο κέντρο @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Υπολογιστικό Φύλλο - + Align left Στοίχιση Αριστερά - + Left-align contents of selected cells Στοίχιση των περιεχομένων των επιλεγμένων κελιών στα αριστερά @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Υπολογιστικό Φύλλο - + Align right Στοίχιση Δεξιά - + Right-align contents of selected cells Στοίχιση των περιεχομένων των επιλεγμένων κελιών στα δεξιά @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Υπολογιστικό Φύλλο - + Align top Στοίχιση πάνω - + Top-align contents of selected cells Στοίχιση των περιεχομένων των επιλεγμένων κελιών στο πάνω άκρο @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Υπολογιστικό Φύλλο - + Vertically center-align Κατακόρυφη στοίχιση στο κέντρο - + Vertically center-align contents of selected cells Κατακόρυφη στοίχιση των περιεχομένων στο κέντρο των επιλεγμένων κελιών @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Υπολογιστικό Φύλλο - + Export spreadsheet Εξαγωγή υπολογιστικού φύλλου - + Export spreadsheet to CSV file Εξαγωγή υπολογιστικού φύλλου σε αρχείο CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Υπολογιστικό Φύλλο - + Import spreadsheet Εισαγωγή υπολογιστικού φύλλου - + Import CSV file into spreadsheet Εισαγωγή αρχείου CSV στο υπολογιστικό φύλλο @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Υπολογιστικό Φύλλο - + Set alias Ορισμός ψευδωνύμου - + Set alias for selected cell Ορισμός ψευδωνύμου για το επιλεγμένο κελί @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Υπολογιστικό Φύλλο - + Split cell Διαχωρισμός κελιού - + Split previously merged cells Διαίρεση προηγούμενων συγχωνευμένων κελιών @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Υπολογιστικό Φύλλο - + Bold text Έντονη γραφή - + Set text in selected cells bold Ορισμός κειμένου σε επιλεγμένα κελιά με έντονη γραφή @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Υπολογιστικό Φύλλο - + Italic text Πλάγια γραφή - + Set text in selected cells italic Ορισμός κειμένου σε επιλεγμένα κελιά πλάγια γραφή @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Υπολογιστικό Φύλλο - + Underline text Υπογράμμιση κειμένου - + Underline text in selected cells Υπογράμμιση κειμένου σε επιλεγμένα κελιά @@ -282,106 +282,106 @@ Command - + Merge cells Συγχώνευση κελιών - + Split cell Διαχωρισμός κελιού - + Left-align cell Αριστερή στοίχιση - + Center cell Στοίχιση στο κέντρο - + Right-align cell Δεξιά στοίχιση - + Top-align cell Στοίχιση προς τα πάνω - + Bottom-align cell Στοίχιση προς τα κάτω - + Vertically center cells Κατακόρυφη στοίχιση - + Set bold text Ορισμός έντονου κειμένου - + Set italic text Ορισμός πλάγιου κειμένου - + Set underline text Ορισμός υπογράμμισης κειμένου - + Create Spreadsheet Δημιουργία υπολογιστικού φύλλου - + Set cell properties Ορισμός ιδιοτήτων κελιού - + Edit cell Επεξεργασία κελιού - - + + Insert rows Εισαγωγή σειρών - - + + Remove rows Αφαίρεση σειρών - - + + Insert columns Εισαγωγή στηλών - - + + Clear cell(s) Καθαρισμός κελιού(ων) - + Set foreground color Ορισμός χρώματος προσκηνίου - + Set background color Ορισμός χρώματος φόντου @@ -669,67 +669,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Όλα (*) - + Import file Εισαγωγή αρχείου - + Export file Εξαγωγή αρχείου - + Show spreadsheet Εμφάνιση υπολογιστικού φύλλου - - + + Set cell(s) foreground color Ορισμός χρώματος προσκηνίου κελιών - + Sets the Spreadsheet cell(s) foreground color Ορίζει το χρώμα προσκηνίου κελιών του Υπολογιστικού Φύλλου - - + + Set cell(s) background color Ορισμός χρώματος υποβάθρου κελιών - + Sets the Spreadsheet cell(s) background color Ορίζει το χρώμα υποβάθρου κελιών του Υπολογιστικού Φύλλου - + Copy & Paste failed Η αντιγραφή & επικόλληση απέτυχε - + Alias contains invalid characters! Το ψευδώνυμο περιέχει μη έγκυρους χαρακτήρες! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Ανατρέξτε στο κελί με το ψευδώνυμο, για παράδειγμα Spreadsheet.my_alias_name αντί του Spreadsheet.B1 - + Spreadsheet Υπολογιστικό Φύλλο @@ -868,12 +868,12 @@ Spreadsheet.my_alias_name αντί του Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Δέσμευση κελιών - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -882,19 +882,19 @@ Do you want to continue? Θέλετε να συνεχίσετε; - + Bind Spreadsheet Cells Δέσμευση Κελιών Φύλλων - + Error: - Σφάλμα: + Error: - + Unbind cells Αποσύνδεση κελιών @@ -978,12 +978,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Ρύθμιση πίνακα ρυθμίσεων - + Unsetup configuration table Κατάργηση ρυθμίσεων παραμέτρων πίνακα @@ -991,7 +991,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Εισαγωγή %n γραμμής(ών) παραπάνω @@ -999,7 +999,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Εισάγετε %n γραμμή(ές) παρακάτω @@ -1007,7 +1007,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Εισαγάγετε %n μη συνεχόμενες στήλες @@ -1015,7 +1015,7 @@ Defaults to: %V = %A - + Remove row(s) Αφαίρεση σειράς(ών) @@ -1023,7 +1023,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Εισαγωγή στήλης %n αριστερά @@ -1031,7 +1031,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Εισαγωγή %n στήλης δεξιά @@ -1039,7 +1039,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Εισαγάγετε %n μη συνεχόμενες στήλες @@ -1047,7 +1047,7 @@ Defaults to: %V = %A - + Remove column(s) Αφαίρεση στηλών(η) @@ -1055,62 +1055,62 @@ Defaults to: %V = %A - - + + Properties... Ιδιότητες... - - + + Recompute Υπολογίστε ξανά - - + + Bind... Δεσμεύω... - - + + Configuration table... Πίνακας διαμόρφωσης... - - + + Merge cells Συγχώνευση κελιών - - + + Split cells Διαίρεση κελιών - - + + Cut Περικοπή - - + + Copy Αντιγραφή - - + + Paste Επικόλληση - - + + Delete Διαγραφή @@ -1118,12 +1118,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Εξαγωγή σε PDF - + PDF file Αρχείο PDF @@ -1154,7 +1154,7 @@ Defaults to: %V = %A Py - + Unnamed Ανώνυμο diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts index c9012dd110..96f6de54f3 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-AR.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Hoja de cálculo - + Create spreadsheet Crear hoja de cálculo - + Create a new spreadsheet Crea una nueva hoja de cálculo @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Hoja de cálculo - + Align bottom Alineación inferior - + Bottom-align contents of selected cells Alineado inferior del contenido de las celdas seleccionadas @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Hoja de cálculo - + Align center Alineado centrado - + Center-align contents of selected cells Alineado centrado del contenido de las celdas seleccionadas @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Hoja de cálculo - + Align left Alineado izquierdo - + Left-align contents of selected cells Alineado izquierdo del contenido de las celdas seleccionadas @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Hoja de cálculo - + Align right Alineado derecho - + Right-align contents of selected cells Alineado derecho del contenido de las celdas seleccionadas @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Hoja de cálculo - + Align top Alineado superior - + Top-align contents of selected cells Alineado superior del contenido de las celdas seleccionadas @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Hoja de cálculo - + Vertically center-align Centrar verticalmente - + Vertically center-align contents of selected cells Alineado verticalmente centrado del contenido de las celdas seleccionadas @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Hoja de cálculo - + Export spreadsheet Exportar hoja de cálculo - + Export spreadsheet to CSV file Exporta la hoja de cálculo como archivo CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Hoja de cálculo - + Import spreadsheet Importar hoja de cálculo - + Import CSV file into spreadsheet Importa un archivo CSV en la hoja de cálculo @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Hoja de cálculo - + Set alias Establecer alias - + Set alias for selected cell Establece un alias para la celda seleccionada @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Hoja de cálculo - + Split cell Dividir celda - + Split previously merged cells Divide las celdas previamente combinadas @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Hoja de cálculo - + Bold text Texto negrita - + Set text in selected cells bold Establece texto en negrita en las celdas seleccionadas @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Hoja de cálculo - + Italic text Texto cursiva - + Set text in selected cells italic Establece texto en cursiva en las celdas seleccionadas @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Hoja de cálculo - + Underline text Subrayado - + Underline text in selected cells Subraya el texto en las celdas seleccionadas @@ -282,106 +282,106 @@ Command - + Merge cells Combinar celdas - + Split cell Dividir celda - + Left-align cell Celda alineada a la izquierda - + Center cell Celda centrada - + Right-align cell Celda alineada a la derecha - + Top-align cell Alineación superior de celda - + Bottom-align cell Alineación inferior de celda - + Vertically center cells Celdas verticalmente centradas - + Set bold text Definir texto en negrita - + Set italic text Definir texto cursivo - + Set underline text Definir texto subrayado - + Create Spreadsheet Crear hoja de cálculo - + Set cell properties Definir propiedades de celda - + Edit cell Editar celda - - + + Insert rows Insertar filas - - + + Remove rows Eliminar filas - - + + Insert columns Insertar columnas - - + + Clear cell(s) Limpiar celda(s) - + Set foreground color Establecer color de primer plano - + Set background color Establecer color de fondo @@ -680,60 +680,60 @@ la configuración de diseño. La propiedad se creará si no existe. QObject - - + + All (*) Todos (*) - + Import file Importar archivo - + Export file Exportar archivo - + Show spreadsheet Mostrar hoja de cálculo - - + + Set cell(s) foreground color Color de celda(s) primer plano - + Sets the Spreadsheet cell(s) foreground color Establece el color de frente de las celda(s) de la hoja de cálculo - - + + Set cell(s) background color Establecer color de fondo de celda(s) - + Sets the Spreadsheet cell(s) background color Establece el color de fondo de celda(s) de la hoja de cálculo - + Copy & Paste failed Copiar & Pegar ha fallado - + Alias contains invalid characters! ¡El alias contiene caracteres no válidos! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Consulte la celda por alias, por ejemplo @@ -741,7 +741,7 @@ Spreadsheet.mi_nombre_de_alias en lugar de Spreadsheet.B1 - + Spreadsheet Hoja de cálculo @@ -881,12 +881,12 @@ Spreadsheet.mi_nombre_de_alias en lugar de Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Vincular celdas - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -895,19 +895,19 @@ Do you want to continue? ¿Desea continuar? - + Bind Spreadsheet Cells Vincular celdas de hoja de cálculo - + Error: - Error: + Error: - + Unbind cells Desvincular celdas @@ -991,12 +991,12 @@ Por defecto a: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Configurar tabla de configuración - + Unsetup configuration table Desconfigurar tabla de configuración @@ -1004,7 +1004,7 @@ Por defecto a: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insertar %n fila arriba @@ -1012,7 +1012,7 @@ Por defecto a: %V = %A - + Insert %n row(s) below Insertar %n fila debajo @@ -1020,7 +1020,7 @@ Por defecto a: %V = %A - + Insert %n non-contiguous rows Insertar %n fila no contigua @@ -1028,7 +1028,7 @@ Por defecto a: %V = %A - + Remove row(s) Eliminar fila @@ -1036,7 +1036,7 @@ Por defecto a: %V = %A - + Insert %n column(s) left Insertar %n columna(s) a la izquierda @@ -1044,7 +1044,7 @@ Por defecto a: %V = %A - + Insert %n column(s) right Insertar %n columna a la derecha @@ -1052,7 +1052,7 @@ Por defecto a: %V = %A - + Insert %n non-contiguous columns Insertar %n columna no contigua @@ -1060,7 +1060,7 @@ Por defecto a: %V = %A - + Remove column(s) Quitar columna @@ -1068,62 +1068,62 @@ Por defecto a: %V = %A - - + + Properties... Propiedades... - - + + Recompute Recalcular - - + + Bind... Vincular... - - + + Configuration table... Tabla de configuración... - - + + Merge cells Combinar celdas - - + + Split cells Dividir celdas - - + + Cut Cortar - - + + Copy Copiar - - + + Paste Pegar - - + + Delete Eliminar @@ -1131,12 +1131,12 @@ Por defecto a: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportar a PDF - + PDF file Archivo PDF @@ -1167,7 +1167,7 @@ Por defecto a: %V = %A Py - + Unnamed Sin nombre diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts index acb34e028c..c96d365dde 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_es-ES.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Hoja de cálculo - + Create spreadsheet Crear hoja de cálculo - + Create a new spreadsheet Crear hoja de cálculo nueva @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Hoja de cálculo - + Align bottom Alinear inferior - + Bottom-align contents of selected cells Alinear inferior celdas seleccionadas @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Hoja de cálculo - + Align center Alinear centro - + Center-align contents of selected cells Alinear al centro celdas seleccionadas @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Hoja de cálculo - + Align left Alinear izquierda - + Left-align contents of selected cells Alinear izquierda celdas seleccionadas @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Hoja de cálculo - + Align right Alinear derecha - + Right-align contents of selected cells Alinear derecha celdas seleccionadas @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Hoja de cálculo - + Align top Alineado superior - + Top-align contents of selected cells Alineado superior en celdas seleccionadas @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Hoja de cálculo - + Vertically center-align Centrar verticalmente - + Vertically center-align contents of selected cells Contenido alineado verticalmente centrado en celdas seleccionadas @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Hoja de cálculo - + Export spreadsheet Exportar hoja de cálculo - + Export spreadsheet to CSV file Exportar hoja de cálculo como archivo CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Hoja de cálculo - + Import spreadsheet Importar hoja de cálculo - + Import CSV file into spreadsheet Inportar archivo CSV en la hoja de cálculo @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Hoja de cálculo - + Set alias Establecer alias - + Set alias for selected cell Establecer alias para celda seleccionada @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Hoja de cálculo - + Split cell Dividir celda - + Split previously merged cells Dividir celdas combinadas previamente @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Hoja de cálculo - + Bold text Negrita - + Set text in selected cells bold Establecer texto en negrita en celdas seleccionadas @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Hoja de cálculo - + Italic text Texto en cursiva - + Set text in selected cells italic Establecer texto en las celdas seleccionadas en cursiva @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Hoja de cálculo - + Underline text Subrayado - + Underline text in selected cells Texto subrayado en las celdas seleccionadas @@ -282,106 +282,106 @@ Command - + Merge cells Combinar celdas - + Split cell Dividir celda - + Left-align cell Izquierda - + Center cell Centro - + Right-align cell Derecha - + Top-align cell Superior - + Bottom-align cell Inferior - + Vertically center cells Vertical - + Set bold text Negrita - + Set italic text Cursiva - + Set underline text Subrayado - + Create Spreadsheet Crear hoja de cálculo - + Set cell properties Propiedades - + Edit cell Editar celda - - + + Insert rows Insertar filas - - + + Remove rows Eliminar filas - - + + Insert columns Insertar columnas - - + + Clear cell(s) Limpiar celda(s) - + Set foreground color Color de celda - + Set background color Color de fondo @@ -680,67 +680,67 @@ la configuración de diseño. La propiedad se creará si no existe. QObject - - + + All (*) Todos (*) - + Import file Importar archivo - + Export file Exportar archivo - + Show spreadsheet Mostrar la hoja de cálculo - - + + Set cell(s) foreground color Ajustar color de primer plano para la(s) celda(s) - + Sets the Spreadsheet cell(s) foreground color Ajuste del color de primer plano de la hoja de cálculo - - + + Set cell(s) background color Ajuste de primer plano del color de celda(s) - + Sets the Spreadsheet cell(s) background color Ajuste de color de fondo de celda(s) de la hoja de cálculo - + Copy & Paste failed Copiar & Pegar ha fallado - + Alias contains invalid characters! ¡El alias contiene caracteres no válidos! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Consulte la celda por alias, por ejemplo Spreadsheet.my_alias_name en lugar de Spreadsheet.B1 - + Spreadsheet Hoja de cálculo @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name en lugar de Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Enlazar celdas - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? ¿Desea continuar? - + Bind Spreadsheet Cells Enlazar celdas de hoja de cálculo - + Error: - Error: + Error: - + Unbind cells Desenlazar celdas @@ -989,12 +989,12 @@ Por defecto: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Configurar tabla de configuración - + Unsetup configuration table Desconfigurar tabla de configuración @@ -1002,7 +1002,7 @@ Por defecto: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insertar %n fila(s) arriba @@ -1010,7 +1010,7 @@ Por defecto: %V = %A - + Insert %n row(s) below Insertar %n fila(s) debajo @@ -1018,7 +1018,7 @@ Por defecto: %V = %A - + Insert %n non-contiguous rows Insertar %n filas no contiguas @@ -1026,7 +1026,7 @@ Por defecto: %V = %A - + Remove row(s) Remover fila(s) @@ -1034,7 +1034,7 @@ Por defecto: %V = %A - + Insert %n column(s) left Insertar %n columna a la izquierda @@ -1042,7 +1042,7 @@ Por defecto: %V = %A - + Insert %n column(s) right Insertar %n columna a la derecha @@ -1050,7 +1050,7 @@ Por defecto: %V = %A - + Insert %n non-contiguous columns Insertar %n columnas no contiguas @@ -1058,7 +1058,7 @@ Por defecto: %V = %A - + Remove column(s) Remover columna(s) @@ -1066,62 +1066,62 @@ Por defecto: %V = %A - - + + Properties... Propiedades... - - + + Recompute Recalcular - - + + Bind... Enlazar... - - + + Configuration table... Tabla de configuración... - - + + Merge cells Combinar celdas - - + + Split cells Dividir celdas - - + + Cut Cortar - - + + Copy Copiar - - + + Paste Pegar - - + + Delete Borrar @@ -1129,12 +1129,12 @@ Por defecto: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportar en PDF - + PDF file Archivo PDF @@ -1165,7 +1165,7 @@ Por defecto: %V = %A Py - + Unnamed Sin nombre diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts index 33b96030bb..bbf43f8850 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_eu.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Kalkulu-orria - + Create spreadsheet Sortu kalkulu-orria - + Create a new spreadsheet Sortu kalkulu-orri berria @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Kalkulu-orria - + Align bottom Lerrokatu behean - + Bottom-align contents of selected cells Lerrokatu behean hautatutako gelaxken edukiak @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Kalkulu-orria - + Align center Lerrokatu erdian - + Center-align contents of selected cells Lerrokatu erdian hautatutako gelaxken edukiak @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Kalkulu-orria - + Align left Lerrokatu ezkerrean - + Left-align contents of selected cells Lerrokatu ezkerrean hautatutako gelaxken edukiak @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Kalkulu-orria - + Align right Lerrokatu eskuinean - + Right-align contents of selected cells Lerrokatu eskuinean hautatutako gelaxken edukiak @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Kalkulu-orria - + Align top Lerrokatu goian - + Top-align contents of selected cells Lerrokatu goian hautatutako gelaxken edukiak @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Kalkulu-orria - + Vertically center-align Lerrokatu erdian bertikalean - + Vertically center-align contents of selected cells Lerrokatu erdian eta bertikalean hautatutako gelaxken edukiak @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Kalkulu-orria - + Export spreadsheet Esportatu kalkulu-orria - + Export spreadsheet to CSV file Esportatu kalkulu-orria CSV fitxategira @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Kalkulu-orria - + Import spreadsheet Inportatu kalkulu-orria - + Import CSV file into spreadsheet Inportatu CSV fitxategia kalkulu-orrira @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Kalkulu-orria - + Set alias Ezarri aliasa - + Set alias for selected cell Ezarri aliasa hautatutako gelaxkarako @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Kalkulu-orria - + Split cell Zatitu gelaxka - + Split previously merged cells Zatitu lehenago fusionatutako gelaxkak @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Kalkulu-orria - + Bold text Testu lodia - + Set text in selected cells bold Ezarri letra lodia hautatutako gelaxken testuan @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Kalkulu-orria - + Italic text Testu etzana - + Set text in selected cells italic Ezarri letra etzana hautatutako gelaxken testuan @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Kalkulu-orria - + Underline text Testu azpimarratua - + Underline text in selected cells Azpimarratu testua hautatutako gelaxketan @@ -282,106 +282,106 @@ Command - + Merge cells Fusionatu gelaxkak - + Split cell Zatitu gelaxka - + Left-align cell Lerrokatu gelaxka ezkerrean - + Center cell Zentratu gelaxka - + Right-align cell Lerrokatu gelaxka eskuinean - + Top-align cell Lerrokatu gelaxka goian - + Bottom-align cell Lerrokatu gelaxka behean - + Vertically center cells Zentratu gelaxkak bertikalean - + Set bold text Ezarri testu lodia - + Set italic text Ezarri testu etzana - + Set underline text Ezarri testu azpimarratua - + Create Spreadsheet Sortu kalkulu-orria - + Set cell properties Ezarri gelaxka-propietateak - + Edit cell Editatu gelaxka - - + + Insert rows Txertatu errenkadak - - + + Remove rows Kendu errenkadak - - + + Insert columns Txertatu zutabeak - - + + Clear cell(s) Garbitu gelaxka(k) - + Set foreground color Ezarri aurreko planoaren kolorea - + Set background color Ezarri atzeko planoaren kolorea @@ -680,67 +680,67 @@ eta propietate-izena zehazteko. Propietatea sortu egingo da lehendik ez badago.< QObject - - + + All (*) Dena (*) - + Import file Inportatu fitxategia - + Export file Esportatu fitxategia - + Show spreadsheet Erakutsi kalkulu-orria - - + + Set cell(s) foreground color Ezarri gelaxk(ar)en aurreko planoaren kolorea - + Sets the Spreadsheet cell(s) foreground color Kalkulu-orriko gelaxk(ar)en aurreko planoaren kolorea ezartzen du - - + + Set cell(s) background color Ezarri gelaxk(ar)en atzeko planoaren kolorea - + Sets the Spreadsheet cell(s) background color Kalkulu-orriko gelaxk(ar)en atzeko planoaren kolorea ezartzen du - + Copy & Paste failed Kopiatu eta itsasteak huts egin du - + Alias contains invalid characters! Aliasak karaktere baliogabeak ditu! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Egin erreferentzia gelaxkei aliasa erabilita, adibidez 'KalkuluOrria.nire_aliasa' erabili 'KalkuluOrria.B1' erabili ordez - + Spreadsheet Kalkulu-orria @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Lotu gelaxkak - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Jarraitu? - + Bind Spreadsheet Cells Lotu kalkulu-orriaren gelaxkak - + Error: - Errorea: + Error: - + Unbind cells Deslotu gelaxkak @@ -989,12 +989,12 @@ Lehenespenak: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Konfiguratu konfigurazio-taula - + Unsetup configuration table Deskonfiguratu konfigurazio-taula @@ -1002,7 +1002,7 @@ Lehenespenak: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Txertatu errenkada %n goian @@ -1010,7 +1010,7 @@ Lehenespenak: %V = %A - + Insert %n row(s) below Txertatu errenkada %n behean @@ -1018,7 +1018,7 @@ Lehenespenak: %V = %A - + Insert %n non-contiguous rows Txertatu elkarren ondoan ez dagoen errenkada %n @@ -1026,7 +1026,7 @@ Lehenespenak: %V = %A - + Remove row(s) Kendu errenkada @@ -1034,7 +1034,7 @@ Lehenespenak: %V = %A - + Insert %n column(s) left Txertatu zutabe %n ezkerrean @@ -1042,7 +1042,7 @@ Lehenespenak: %V = %A - + Insert %n column(s) right Txertatu zutabe %n eskuinean @@ -1050,7 +1050,7 @@ Lehenespenak: %V = %A - + Insert %n non-contiguous columns Txertatu elkarren ondoan ez dauden %n zutabe @@ -1058,7 +1058,7 @@ Lehenespenak: %V = %A - + Remove column(s) Kendu zutabea(k) @@ -1066,62 +1066,62 @@ Lehenespenak: %V = %A - - + + Properties... Propietateak... - - + + Recompute Birkalkulatu - - + + Bind... Lotu... - - + + Configuration table... Konfigurazio-taula... - - + + Merge cells Fusionatu gelaxkak - - + + Split cells Zatitu gelaxkak - - + + Cut Moztu - - + + Copy Kopiatu - - + + Paste Itsatsi - - + + Delete Ezabatu @@ -1129,12 +1129,12 @@ Lehenespenak: %V = %A SpreadsheetGui::SheetView - + Export PDF Esportatu PDFa - + PDF file PDF fitxategia @@ -1165,7 +1165,7 @@ Lehenespenak: %V = %A Py - + Unnamed Izenik gabea diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts index 6101a3326a..4bbc56dae8 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fi.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Laskentataulukko - + Create spreadsheet Luo laskentataulukko - + Create a new spreadsheet Luo uusi laskentataulukko @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Laskentataulukko - + Align bottom Tasaa alareunaan - + Bottom-align contents of selected cells Tasaa alareunaan valittujen solujen sisältö @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Laskentataulukko - + Align center Tasaa keskelle - + Center-align contents of selected cells Tasaa keskelle valittujen solujen sisältö @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Laskentataulukko - + Align left Tasaa vasemmalle - + Left-align contents of selected cells Tasaa vasemmalle valittujen solujen sisältö @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Laskentataulukko - + Align right Tasaa oikealle - + Right-align contents of selected cells Tasaa oikealle valittujen solujen sisältö @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Laskentataulukko - + Align top Tasaa yläreunaan - + Top-align contents of selected cells Tasaa yläreunaan valittujen solujen sisältö @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Laskentataulukko - + Vertically center-align Pystysuoraan tasaus keskelle - + Vertically center-align contents of selected cells Tasaa keskelle valittujen solujen sisältö @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Laskentataulukko - + Export spreadsheet Vie laskentataulukko - + Export spreadsheet to CSV file Vie laskentataulukko CSV-tiedostoon @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Laskentataulukko - + Import spreadsheet Tuo laskentataulukko - + Import CSV file into spreadsheet Tuo CSV tiedosto laskentataulukkoon @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Laskentataulukko - + Set alias Aseta vaihtoehtoinen nimi /alias - + Set alias for selected cell Aseta vaihtoehtoinen nimi (alias) valitulle solulle @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Laskentataulukko - + Split cell Jaa solu - + Split previously merged cells Jaa aiemmin yhdistetyt solut @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Laskentataulukko - + Bold text Lihavoitu teksti - + Set text in selected cells bold Lihavoi valittujen solujen teksti @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Laskentataulukko - + Italic text Kursivoitu teksti - + Set text in selected cells italic Muuta valittujen solujen teksti kursiiviksi @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Laskentataulukko - + Underline text Alleviivattu teksti - + Underline text in selected cells Alleviivaa teksti valituissa soluissa @@ -282,106 +282,106 @@ Command - + Merge cells Yhdistä solut - + Split cell Jaa solu - + Left-align cell Vasemman tasauksen solu - + Center cell Keskitetyn tasauksen solu - + Right-align cell Oikean tasauksen solu - + Top-align cell Yläreunaan tasattu solu - + Bottom-align cell Alareunaan tasattu solu - + Vertically center cells Pystysuoraan keskelle tasatut solut - + Set bold text Aseta lihavoitu teksti - + Set italic text Aseta kursivoitu teksti - + Set underline text Aseta alleviivattu teksti - + Create Spreadsheet Luo laskentataulukko - + Set cell properties Aseta solun ominaisuudet - + Edit cell Muokkaa solua - - + + Insert rows Lisää rivejä - - + + Remove rows Poista rivejä - - + + Insert columns Lisää sarakkeita - - + + Clear cell(s) Tyhjennä solu(t) - + Set foreground color Aseta edustaväri - + Set background color Aseta taustaväri @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Kaikki (*) - + Import file Tuo tiedosto - + Export file Vie tiedosto - + Show spreadsheet Näytä laskentataulukko - - + + Set cell(s) foreground color Aseta solun(solujen) edustan väri - + Sets the Spreadsheet cell(s) foreground color Asettaa tulostaulun solun(solujen) edustan värin - - + + Set cell(s) background color Aseta solun(solujen) taustan väri - + Sets the Spreadsheet cell(s) background color Asettaa laskentataulun(-taulujen) taustavärin - + Copy & Paste failed Kopioi ja liitä epäonnistui - + Alias contains invalid characters! Vaihtoehtoinen nimi (alias) sisältää virheellisiä merkkejä! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Viittaa soluihin vaihtoehtoisella nimellä (alias), esimerkiksi Spreadsheet.my_alias_name sijasta Spreadsheet.B1 - + Spreadsheet Laskentataulukko @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name sijasta Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,18 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: - Virhe: + Error: + - + Unbind cells Unbind cells @@ -988,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1001,7 +1002,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insert %n row(s) above @@ -1009,7 +1010,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Insert %n row(s) below @@ -1017,7 +1018,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Insert %n non-contiguous rows @@ -1025,7 +1026,7 @@ Defaults to: %V = %A - + Remove row(s) Remove row(s) @@ -1033,7 +1034,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Insert %n column(s) left @@ -1041,7 +1042,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Insert %n column(s) right @@ -1049,7 +1050,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Insert %n non-contiguous columns @@ -1057,7 +1058,7 @@ Defaults to: %V = %A - + Remove column(s) Remove column(s) @@ -1065,62 +1066,62 @@ Defaults to: %V = %A - - + + Properties... Ominaisuudet... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells Yhdistä solut - - + + Split cells Split cells - - + + Cut Leikkaa - - + + Copy Kopio - - + + Paste Liitä - - + + Delete Poista @@ -1128,12 +1129,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Vie PDF - + PDF file PDF-tiedosto @@ -1164,7 +1165,7 @@ Defaults to: %V = %A Py - + Unnamed Nimetön diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts index 536e9ffbbe..b9dab2cd12 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_fr.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Spreadsheet - + Create spreadsheet Créer une feuille de calcul - + Create a new spreadsheet Créer une nouvelle feuille de calcul @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Feuille de calcul - + Align bottom Aligner en bas - + Bottom-align contents of selected cells Aligner en bas le contenu des cellules sélectionnées @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Feuille de calcul - + Align center Aligner au centre - + Center-align contents of selected cells Aligner au centre le contenu des cellules sélectionnées @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Feuille de calcul - + Align left Aligner à gauche - + Left-align contents of selected cells Aligner à gauche le contenu des cellules sélectionnées @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Feuille de calcul - + Align right Aligner à droite - + Right-align contents of selected cells Aligner à droite le contenu des cellules sélectionnées @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Feuille de calcul - + Align top Aligner en haut - + Top-align contents of selected cells Aligner en haut le contenu des cellules sélectionnées @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Feuille de calcul - + Vertically center-align Aligner au centre verticalement - + Vertically center-align contents of selected cells Aligner au centre verticalement le contenu des cellules sélectionnées @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Feuille de calcul - + Export spreadsheet Exporter la feuille de calcul - + Export spreadsheet to CSV file Exporter la feuille de calcul vers un fichier CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Feuille de calcul - + Import spreadsheet Importer une feuille de calcul - + Import CSV file into spreadsheet Importer un fichier CSV dans une feuille de calcul @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Feuille de calcul - + Set alias Définir un alias - + Set alias for selected cell Définir un alias de la cellule sélectionnée @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Feuille de calcul - + Split cell Diviser la cellule - + Split previously merged cells Diviser les cellules précédemment fusionnées @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Feuille de calcul - + Bold text Texte en gras - + Set text in selected cells bold Rendre gras le texte des cellules sélectionnées @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Feuille de calcul - + Italic text Texte en italique - + Set text in selected cells italic Rendre italique le texte des cellules sélectionnées @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Feuille de calcul - + Underline text Texte souligné - + Underline text in selected cells Souligner le texte des cellules sélectionnées @@ -282,106 +282,106 @@ Command - + Merge cells Fusionner des cellules - + Split cell Diviser la cellule - + Left-align cell Aligner à gauche de la cellule - + Center cell Aligner au centre de la cellule - + Right-align cell Aligner à droite de la cellule - + Top-align cell Aligner en haut de la cellule - + Bottom-align cell Aligner en bas de la cellule - + Vertically center cells Aligner au centre de la cellule verticalement - + Set bold text Mettre le texte en gras - + Set italic text Mettre le texte en italique - + Set underline text Souligner le texte - + Create Spreadsheet Créer une feuille de calcul - + Set cell properties Modifier les propriétés des cellules - + Edit cell Modifier la cellule - - + + Insert rows Insérer des lignes - - + + Remove rows Supprimer des lignes - - + + Insert columns Insérer des colonnes - - + + Clear cell(s) Effacer la/les cellule(s) - + Set foreground color Définir la couleur du premier-plan - + Set background color Définir la couleur de l'arrière-plan @@ -679,66 +679,66 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Tous (*) - + Import file Importer un fichier - + Export file Exporter le fichier - + Show spreadsheet Montrer la feuille de calcul - - + + Set cell(s) foreground color Définir la couleur de premier plan de la ou des cellules - + Sets the Spreadsheet cell(s) foreground color Définit la couleur de premier plan de la ou des cellules de la feuille de calcul - - + + Set cell(s) background color Définir la couleur d'arrière-plan de la ou des cellules - + Sets the Spreadsheet cell(s) background color Définit la couleur d'arrière-plan de la ou des cellules de la feuille de calcul - + Copy & Paste failed Le copier-coller a échoué - + Alias contains invalid characters! L'alias contient des caractères invalides! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Reportez-vous à la cellule par l'alias, par exemple Spreadsheet.my_alias_name au lieu de Spreadsheet.B1 - + Spreadsheet Feuille de calcul @@ -876,12 +876,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Lier les cellules - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -890,19 +890,19 @@ Do you want to continue? Voulez-vous continuer ? - + Bind Spreadsheet Cells Lier des cellules de la feuille de calcul - + Error: - Erreur : + Error: - + Unbind cells Délier les cellules @@ -986,12 +986,12 @@ Par défaut : %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Paramétrer la table de configuration - + Unsetup configuration table Réinitialiser la table de configuration @@ -999,7 +999,7 @@ Par défaut : %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insérer %n ligne(s) au-dessus @@ -1007,7 +1007,7 @@ Par défaut : %V = %A - + Insert %n row(s) below Insérer %n ligne(s) en-dessous @@ -1015,7 +1015,7 @@ Par défaut : %V = %A - + Insert %n non-contiguous rows Insérer %n lignes non contiguës @@ -1023,7 +1023,7 @@ Par défaut : %V = %A - + Remove row(s) Supprimer le(s) ligne(s) @@ -1031,7 +1031,7 @@ Par défaut : %V = %A - + Insert %n column(s) left Insérer %n colonne(s) à gauche @@ -1039,7 +1039,7 @@ Par défaut : %V = %A - + Insert %n column(s) right Insérer %n colonne(s) à droite @@ -1047,7 +1047,7 @@ Par défaut : %V = %A - + Insert %n non-contiguous columns Insérer %n colonnes non contiguës @@ -1055,7 +1055,7 @@ Par défaut : %V = %A - + Remove column(s) Supprimer une ou plusieurs colonnes @@ -1063,62 +1063,62 @@ Par défaut : %V = %A - - + + Properties... Propriétés... - - + + Recompute Recalculer - - + + Bind... Lier... - - + + Configuration table... Table de configuration... - - + + Merge cells Fusionner des cellules - - + + Split cells Diviser les cellules - - + + Cut Couper - - + + Copy Copier - - + + Paste Coller - - + + Delete Supprimer @@ -1126,12 +1126,12 @@ Par défaut : %V = %A SpreadsheetGui::SheetView - + Export PDF Exporter en PDF - + PDF file Fichier PDF @@ -1162,7 +1162,7 @@ Par défaut : %V = %A Py - + Unnamed Sans nom diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts index a4e615b08e..7f8af516f7 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_gl.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Folla de cálculo - + Create spreadsheet Crear folla de cálculo - + Create a new spreadsheet Crear una folla de cálculo nova @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Folla de cálculo - + Align bottom Aliñación inferior - + Bottom-align contents of selected cells Aliñado inferior do contido das celas escolmadas @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Folla de cálculo - + Align center Aliñación centrada - + Center-align contents of selected cells Aliñado ó centro do contido das celas escolmadas @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Folla de cálculo - + Align left Aliñación esquerda - + Left-align contents of selected cells Aliñado á esquerda do contido das celas escolmadas @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Folla de cálculo - + Align right Aliñación dereita - + Right-align contents of selected cells Aliñado á dereita do contido das celas escolmadas @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Folla de cálculo - + Align top Aliñación superior - + Top-align contents of selected cells Aliñado á cima do contido das celas escolmadas @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Folla de cálculo - + Vertically center-align Aliñación verticalmente centrada - + Vertically center-align contents of selected cells Aliñado verticalmente ó centro do contido das celas escolmadas @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Folla de cálculo - + Export spreadsheet Exportar folla de cálculo - + Export spreadsheet to CSV file Exporta folla de cálculo como ficheiro CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Folla de cálculo - + Import spreadsheet Importar folla de cálculo - + Import CSV file into spreadsheet Importa folla de cálculo como ficheiro CSV @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Folla de cálculo - + Set alias Definir alcume - + Set alias for selected cell Define un alcume para as celas escolmadas @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Folla de cálculo - + Split cell Dividir cela - + Split previously merged cells Dividir celas previamente mesturadas @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Folla de cálculo - + Bold text Texto en grosa - + Set text in selected cells bold Conxunto de texto en celas escolmadas en negro @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Folla de cálculo - + Italic text Texto en cursiva - + Set text in selected cells italic Conxunto de texto en celas escolmadas en itálica @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Folla de cálculo - + Underline text Texto subliñado - + Underline text in selected cells Suliñar texto en celas escolmadas @@ -282,106 +282,106 @@ Command - + Merge cells Combinar celas - + Split cell Dividir cela - + Left-align cell Left-align cell - + Center cell Center cell - + Right-align cell Right-align cell - + Top-align cell Top-align cell - + Bottom-align cell Bottom-align cell - + Vertically center cells Centra as celas verticalmente - + Set bold text Engadir texto en grosa - + Set italic text Engadir texto en cursiva - + Set underline text Texto subliñado - + Create Spreadsheet Crear folla de cálculo - + Set cell properties Establecer as propiedades da cela - + Edit cell Editar cela - - + + Insert rows Inserir ringleiras - - + + Remove rows Desbotar ringleiras - - + + Insert columns Inserir columnas - - + + Clear cell(s) Borrar cela(s) - + Set foreground color Establecer a cor de primeiro plano - + Set background color Estabelecer a cor do fondo @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Todos (*) - + Import file Importar ficheiro - + Export file Exportar ficheiro - + Show spreadsheet Amosar a folla de cálculo - - + + Set cell(s) foreground color Definir cor de primeiro plano da(s) célula(s) - + Sets the Spreadsheet cell(s) foreground color Definir cor de primeiro plano da(s) célula(s) da folla de cálculo - - + + Set cell(s) background color Definir cor do plano de fondo da(s) célula(s) - + Sets the Spreadsheet cell(s) background color Definir a cor do plano de fondo da(s) célula(s) da folla de cálculo - + Copy & Paste failed Produciuse un erro ao copiar e pegar - + Alias contains invalid characters! O alias contén caracteres non válidos! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 - + Spreadsheet Folla de cálculo @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,7 +1002,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insert %n row(s) above @@ -1010,7 +1010,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Insert %n row(s) below @@ -1018,7 +1018,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Insert %n non-contiguous rows @@ -1026,7 +1026,7 @@ Defaults to: %V = %A - + Remove row(s) Eliminar ringleira(s) @@ -1034,7 +1034,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Insert %n column(s) left @@ -1042,7 +1042,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Insert %n column(s) right @@ -1050,7 +1050,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Insert %n non-contiguous columns @@ -1058,7 +1058,7 @@ Defaults to: %V = %A - + Remove column(s) Eliminar piar(es) @@ -1066,62 +1066,62 @@ Defaults to: %V = %A - - + + Properties... Propiedades... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells Combinar celas - - + + Split cells Split cells - - + + Cut Tallar - - + + Copy Copiar - - + + Paste Pegar - - + + Delete Desbotar @@ -1129,12 +1129,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportar en PDF - + PDF file Ficheiro PDF @@ -1165,7 +1165,7 @@ Defaults to: %V = %A Py - + Unnamed Sen nome diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts index 1452c5896e..0d607f29e9 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hr.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Proračunska tablica - + Create spreadsheet Stvori proračunsku tablicu - + Create a new spreadsheet Stvori novu proračunsku tablicu @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Proračunska tablica - + Align bottom Poravnaj dolje - + Bottom-align contents of selected cells Poravnavanje sadržaja odabranih ćelija na donjoj granici @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Proračunska tablica - + Align center Poravnaj po sredini - + Center-align contents of selected cells Poravnavanje sadržaja odabranih ćelija u sredinu @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Proračunska tablica - + Align left Poravnaj lijevo - + Left-align contents of selected cells Poravnavanje sadržaja odabranih ćelija na lijevoj granici @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Proračunska tablica - + Align right Poravnaj desno - + Right-align contents of selected cells Poravnavanje sadržaja odabranih ćelija na desnoj granici @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Proračunska tablica - + Align top Poravnaj gore - + Top-align contents of selected cells Poravnavanje sadržaja odabranih ćelija na gornjoj granici @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Proračunska tablica - + Vertically center-align Okomito poravnaj - + Vertically center-align contents of selected cells Poravnavanje sadržaja odabranih ćelija u sredinu @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Proračunska tablica - + Export spreadsheet Izvezi Proračunsku Tablicu - + Export spreadsheet to CSV file Izvoz proračunske tablice u CSV datoteku @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Proračunska tablica - + Import spreadsheet Uvezi Proračunsku Tablicu - + Import CSV file into spreadsheet Uvoz CSV datoteke u proračunsku tablicu @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Proračunska tablica - + Set alias Postavite pseudonim - + Set alias for selected cell Postavite pseudonim za odabrane ćelije @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Proračunska tablica - + Split cell Podijeli ćeliju - + Split previously merged cells Razdjeli prije spojene ćelije @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Proračunska tablica - + Bold text Podebljani tekst - + Set text in selected cells bold Postavi tekst u odabranim ćelijama podebljano @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Proračunska tablica - + Italic text Ukošeni tekst - + Set text in selected cells italic Postavi tekst u odabranim ćelijama ukošeno @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Proračunska tablica - + Underline text Podcrtavanje teksta - + Underline text in selected cells Podcrtavanje teksta u odabranim ćelijama @@ -282,106 +282,106 @@ Command - + Merge cells Spajanje ćelija - + Split cell Podijeli ćeliju - + Left-align cell Ćeliju poravnaj lijevo - + Center cell centriraj ćeliju - + Right-align cell Ćeliju poravnaj desno - + Top-align cell Ćeliju poravnaj na gore - + Bottom-align cell Ćeliju poravnaj na dolje - + Vertically center cells Ćeliju centriraj uspravno - + Set bold text Postavi podebljani tekst - + Set italic text Postavi ukošeni tekst - + Set underline text Postavi podcrtani tekst - + Create Spreadsheet Stvori proračunsku tablicu - + Set cell properties Postavi svojstava ćelija - + Edit cell Uredi ćeliju - - + + Insert rows Umetni redove - - + + Remove rows Ukloni redove - - + + Insert columns Umetni stupce - - + + Clear cell(s) Obriši ćeliju(e) - + Set foreground color Postavi boju prednjeg plana - + Set background color Postavi boju pozadine @@ -682,62 +682,62 @@ promijeniti konfiguraciju dizajna. Objekt će se stvoriti ako ne postoji. QObject - - + + All (*) Sve (*) - + Import file Uvoz datoteke - + Export file Izvoz datoteke - + Show spreadsheet Pokaži Proračunsku Tablicu - - + + Set cell(s) foreground color Postavljanje boje prednjeg plana ćelije - + Sets the Spreadsheet cell(s) foreground color Postavlja boju prednjeg plana ćelije proračunske tablice - - + + Set cell(s) background color Postavi boju pozadine ćelije - + Sets the Spreadsheet cell(s) background color Postavlja boju pozadine ćelije proračunske tablice - + Copy & Paste failed Copy & Paste nije uspjelo - + Alias contains invalid characters! Pseudonim sadrži nevažeće znakove! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Referenca na ćeliju sa pseudonimom, na primjer @@ -746,7 +746,7 @@ Spreadsheet.my_alias_name umjesto Spreadsheet.B1 - + Spreadsheet Proračunska tablica @@ -887,12 +887,12 @@ Spreadsheet.my_alias_name umjesto Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Poveži ćelije - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -901,18 +901,19 @@ Do you want to continue? Želite li nastaviti? - + Bind Spreadsheet Cells Poveži ćelije proračunske tablice - + Error: - Greška: + Error: + - + Unbind cells Poništite povezivanje ćelija @@ -996,12 +997,12 @@ Zadano: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Postavke Konfiguracijske tablice - + Unsetup configuration table Poništite postavke Konfiguracijske tablice @@ -1009,7 +1010,7 @@ Zadano: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Umetni %n red(ova) iznad @@ -1018,7 +1019,7 @@ Zadano: %V = %A - + Insert %n row(s) below Umetni %n red(ova) ispod @@ -1027,7 +1028,7 @@ Zadano: %V = %A - + Insert %n non-contiguous rows Umetnite %n red koji nije u nizu @@ -1036,7 +1037,7 @@ Zadano: %V = %A - + Remove row(s) Ukloni red(ove) @@ -1045,7 +1046,7 @@ Zadano: %V = %A - + Insert %n column(s) left Umetni %n kolonu(e) lijevo @@ -1054,7 +1055,7 @@ Zadano: %V = %A - + Insert %n column(s) right Umetni %n kolonu(e) desno @@ -1063,7 +1064,7 @@ Zadano: %V = %A - + Insert %n non-contiguous columns Umetnite %n red koji nije u nizu @@ -1072,7 +1073,7 @@ Zadano: %V = %A - + Remove column(s) Ukloni kolonu(e) @@ -1081,62 +1082,62 @@ Zadano: %V = %A - - + + Properties... Svojstva... - - + + Recompute Preračunaj - - + + Bind... Poveži... - - + + Configuration table... Konfiguracijska tablica... - - + + Merge cells Spajanje ćelija - - + + Split cells Razdvoji ćelije - - + + Cut Isječak - - + + Copy Kopiraj - - + + Paste Umetni - - + + Delete Izbriši @@ -1144,12 +1145,12 @@ Zadano: %V = %A SpreadsheetGui::SheetView - + Export PDF Izvoz PDF - + PDF file PDF Datoteka @@ -1180,7 +1181,7 @@ Zadano: %V = %A Py - + Unnamed Neimenovano diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts index a4fd157f87..e70898f88a 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_hu.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Számolótábla - + Create spreadsheet Számolótábla létrehozása - + Create a new spreadsheet Új számolótábla létrehozása @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Számolótábla - + Align bottom Lefelé igazítás - + Bottom-align contents of selected cells A kijelölt cellák tartalmának lefelé igazítása @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Számolótábla - + Align center Középre igazítás - + Center-align contents of selected cells A kijelölt cellák tartalmának középre igazítása @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Számolótábla - + Align left Balra igazítás - + Left-align contents of selected cells A kijelölt cellák tartalmának balra igazítása @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Számolótábla - + Align right Jobbra igazítás - + Right-align contents of selected cells A kijelölt cellák tartalmának jobbra igazítása @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Számolótábla - + Align top Felfelé igazítás - + Top-align contents of selected cells A kijelölt cellák tartalmának felfelé igazítása @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Számolótábla - + Vertically center-align Függőlegesen középre igazítás - + Vertically center-align contents of selected cells A kijelölt cellák tartalmának függőleges középre igazítása @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Számolótábla - + Export spreadsheet Számolótábla exportálás - + Export spreadsheet to CSV file Számolótábla exportálása CSV-fájlba @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Számolótábla - + Import spreadsheet Számolótábla importálása - + Import CSV file into spreadsheet CSV-fájl importálása táblázatba @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Számolótábla - + Set alias Álnév beállítása - + Set alias for selected cell A kijelölt cellákra álnév beállítása @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Számolótábla - + Split cell Cellák szétválasztása - + Split previously merged cells Előzőleg összefűzött cellák felosztása @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Számolótábla - + Bold text Félkövér szöveg - + Set text in selected cells bold Félkövér szöveg beállítása a kijelölt cellákban @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Számolótábla - + Italic text Dőlt szöveg - + Set text in selected cells italic Dőlt szöveg beállítása a kijelölt cellákban @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Számolótábla - + Underline text Aláhúzott szöveg - + Underline text in selected cells Aláhúzott szöveg a kijelölt cellákban @@ -282,106 +282,106 @@ Command - + Merge cells Cellák egyesítése - + Split cell Cellák szétválasztása - + Left-align cell Balra igazított cella - + Center cell Központi cella - + Right-align cell Jobbra igazított cella - + Top-align cell Felülre igazított cella - + Bottom-align cell Alulra igazított cella - + Vertically center cells Függőlegesen középre igazított cellák - + Set bold text Félkövér szöveg beállítása - + Set italic text Dőlt szöveg beállítása - + Set underline text Aláhúzott szöveg beállítása - + Create Spreadsheet Táblázat létrehozása - + Set cell properties Cellatulajdonságok beállítása - + Edit cell Cella szerkesztése - - + + Insert rows Sorok beszúrása - - + + Remove rows Sorok eltávolítása - - + + Insert columns Oszlopok beszúrása - - + + Clear cell(s) Cella(k) törlése - + Set foreground color Előtér színének beállítása - + Set background color Háttér színének beállítása @@ -680,67 +680,67 @@ változtassa a tervezési konfigurációt. A tulajdonság létrejön, ha nem lé QObject - - + + All (*) Összes (*) - + Import file Fájl importálása - + Export file Fájl exportálása - + Show spreadsheet Számolótábla mutatása - - + + Set cell(s) foreground color Cella(k) előtér színének beállítása - + Sets the Spreadsheet cell(s) foreground color Beállítja a számolótábla cella(k) előtér színét - - + + Set cell(s) background color Cella(k) háttér színének beállítása - + Sets the Spreadsheet cell(s) background color Beállítja a számolótábla cella(k) háttér színét - + Copy & Paste failed Másolás & beillesztés sikertelen - + Alias contains invalid characters! Álnév érvénytelen karaktereket tartalmaz! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Cella hivatkozás álnévvel, például Spreadsheet.my_alias_name helyett Spreadsheet.B1 - + Spreadsheet Számolótábla @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name helyett Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Cellák összekötése - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Szeretné folytatni? - + Bind Spreadsheet Cells Táblázat celláinak kötése - + Error: - Hiba: + Error: - + Unbind cells Cellák szétválasztása @@ -989,12 +989,12 @@ Alapértelmezett értéke: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Konfigurációs táblázat beállításai - + Unsetup configuration table A beállítások konfigurációs táblázatának törlése @@ -1002,7 +1002,7 @@ Alapértelmezett értéke: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above %n sor beszúrása alá @@ -1010,7 +1010,7 @@ Alapértelmezett értéke: %V = %A - + Insert %n row(s) below %n sor beszúrása alá @@ -1018,7 +1018,7 @@ Alapértelmezett értéke: %V = %A - + Insert %n non-contiguous rows %n nem összefüggő sorok beszúrása @@ -1026,7 +1026,7 @@ Alapértelmezett értéke: %V = %A - + Remove row(s) Sor(ok) eltávolítása @@ -1034,7 +1034,7 @@ Alapértelmezett értéke: %V = %A - + Insert %n column(s) left %n oszlop beszúrása balra @@ -1042,7 +1042,7 @@ Alapértelmezett értéke: %V = %A - + Insert %n column(s) right %n oszlop beszúrása jobbra @@ -1050,7 +1050,7 @@ Alapértelmezett értéke: %V = %A - + Insert %n non-contiguous columns %n nem összefüggő oszlopok beszúrása @@ -1058,7 +1058,7 @@ Alapértelmezett értéke: %V = %A - + Remove column(s) Oszlop(ok) eltávolítása @@ -1066,62 +1066,62 @@ Alapértelmezett értéke: %V = %A - - + + Properties... Tulajdonságok... - - + + Recompute Újraszámolás - - + + Bind... Összeköt... - - + + Configuration table... Konfigurációs táblázat... - - + + Merge cells Cellák egyesítése - - + + Split cells Cellák felosztása - - + + Cut Kivágás - - + + Copy Másolás - - + + Paste Beillesztés - - + + Delete Törlés @@ -1129,12 +1129,12 @@ Alapértelmezett értéke: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportálás PDF-be - + PDF file PDF-fájl @@ -1165,7 +1165,7 @@ Alapértelmezett értéke: %V = %A Py - + Unnamed Névtelen diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts index 8396cd4d45..99ccdc6192 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_id.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Indonesia - + Create spreadsheet Create spreadsheet - + Create a new spreadsheet Membuat spreadsheet yang baru @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Indonesia - + Align bottom Menyelaraskan bawah - + Bottom-align contents of selected cells Bagian bawah menyelaraskan isi sel yang dipilih @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Indonesia - + Align center Pusat sejajar - + Center-align contents of selected cells Bagian tengah menyelaraskan isi sel yang dipilih @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Indonesia - + Align left Rata Kiri - + Left-align contents of selected cells Rata kiri isi sel yang dipilih @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Indonesia - + Align right Rata kanan - + Right-align contents of selected cells Right-align isi sel yang dipilih @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Indonesia - + Align top Sejajarkan bagian atas - + Top-align contents of selected cells Isi top-align dari sel yang dipilih @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Indonesia - + Vertically center-align Vertikal center-align - + Vertically center-align contents of selected cells Vertically center-align contents of selected cells @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Indonesia - + Export spreadsheet Ekspor spreadsheet - + Export spreadsheet to CSV file Ekspor spreadsheet ke file CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Indonesia - + Import spreadsheet Impor spreadsheet - + Import CSV file into spreadsheet Impor file CSV ke dalam spreadsheet @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Indonesia - + Set alias Setel alias - + Set alias for selected cell Set alias untuk sel yang dipilih @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Indonesia - + Split cell Sel split - + Split previously merged cells Split previously merged cells @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Indonesia - + Bold text Teks tebal - + Set text in selected cells bold Set text in selected cells bold @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Indonesia - + Italic text Teks miring - + Set text in selected cells italic Set text in selected cells italic @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Indonesia - + Underline text Garis bawahi teks - + Underline text in selected cells Underline text in selected cells @@ -282,106 +282,106 @@ Command - + Merge cells Gabungkan sel - + Split cell Sel split - + Left-align cell Left-align cell - + Center cell Center cell - + Right-align cell Right-align cell - + Top-align cell Top-align cell - + Bottom-align cell Bottom-align cell - + Vertically center cells Vertically center cells - + Set bold text Set bold text - + Set italic text Set italic text - + Set underline text Set underline text - + Create Spreadsheet Create Spreadsheet - + Set cell properties Set cell properties - + Edit cell Edit cell - - + + Insert rows Sisipkan baris - - + + Remove rows Hapus baris - - + + Insert columns Sisipkan kolom - - + + Clear cell(s) Clear cell(s) - + Set foreground color Set foreground color - + Set background color Set background color @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Semua (*) - + Import file Impor file - + Export file Ekspor file - + Show spreadsheet Tampilkan spreadsheet - - + + Set cell(s) foreground color Set cell(s) foreground color - + Sets the Spreadsheet cell(s) foreground color Sets the Spreadsheet cell(s) foreground color - - + + Set cell(s) background color Set cell(s) background color - + Sets the Spreadsheet cell(s) background color Sets the Spreadsheet cell(s) background color - + Copy & Paste failed Copy & Paste failed - + Alias contains invalid characters! Alias contains invalid characters! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 - + Spreadsheet Indonesia @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,118 +1002,118 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insert %n row(s) above - + Insert %n row(s) below Insert %n row(s) below - + Insert %n non-contiguous rows Insert %n non-contiguous rows - + Remove row(s) Remove row(s) - + Insert %n column(s) left Insert %n column(s) left - + Insert %n column(s) right Insert %n column(s) right - + Insert %n non-contiguous columns Insert %n non-contiguous columns - + Remove column(s) Remove column(s) - - + + Properties... Properti ... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells Gabungkan sel - - + + Split cells Split cells - - + + Cut Memotong - - + + Copy Salinan - - + + Paste Tempel - - + + Delete Menghapus @@ -1121,12 +1121,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Ekspor PDF - + PDF file File PDF @@ -1157,7 +1157,7 @@ Defaults to: %V = %A Py - + Unnamed Tanpa nama diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts index 5d9e90c327..ef78f60065 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_it.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Foglio di calcolo - + Create spreadsheet Crea un foglio di calcolo - + Create a new spreadsheet Crea un nuovo foglio di calcolo @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Foglio di calcolo - + Align bottom Allinea in basso - + Bottom-align contents of selected cells Allinea in basso il contenuto delle celle selezionate @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Foglio di calcolo - + Align center Allinea al centro - + Center-align contents of selected cells Allinea al centro il contenuto delle celle selezionate @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Foglio di calcolo - + Align left Allinea a sinistra - + Left-align contents of selected cells Allinea a sinistra il contenuto delle celle selezionate @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Foglio di calcolo - + Align right Allinea a destra - + Right-align contents of selected cells Allinea a destra il contenuto delle celle selezionate @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Foglio di calcolo - + Align top Allinea in alto - + Top-align contents of selected cells Allinea in alto il contenuto delle celle selezionate @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Foglio di calcolo - + Vertically center-align Allinea verticalmente al centro - + Vertically center-align contents of selected cells Centra in verticale il contenuto delle celle selezionate @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Foglio di calcolo - + Export spreadsheet Esporta il foglio di calcolo - + Export spreadsheet to CSV file Esporta il foglio di calcolo in un file CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Foglio di calcolo - + Import spreadsheet Importa un foglio di calcolo - + Import CSV file into spreadsheet File CSV da importare nel foglio di calcolo @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Foglio di calcolo - + Set alias Alias - + Set alias for selected cell Imposta Alias per la cella selezionata @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Foglio di calcolo - + Split cell Dividi cella - + Split previously merged cells Dividi le celle precedentemente unite @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Foglio di calcolo - + Bold text Grassetto - + Set text in selected cells bold Imposta testo in grassetto nelle celle selezionate @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Foglio di calcolo - + Italic text Corsivo - + Set text in selected cells italic Imposta testo in corsivo nelle celle selezionate @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Foglio di calcolo - + Underline text Sottolineato - + Underline text in selected cells Sottolinea il testo nelle celle selezionate @@ -282,106 +282,106 @@ Command - + Merge cells Unisci le celle - + Split cell Dividi cella - + Left-align cell Cella allineata a sinistra - + Center cell Cella centrata - + Right-align cell Cella allineata a destra - + Top-align cell Cella allineata in alto - + Bottom-align cell Cella allineata in basso - + Vertically center cells Celle centrate verticalmente - + Set bold text Imposta testo in grassetto - + Set italic text Imposta il testo in corsivo - + Set underline text Imposta il testo sottolineato - + Create Spreadsheet Crea folgio di calcolo - + Set cell properties Imposta proprieta cella - + Edit cell Modifica cella - - + + Insert rows Inserisci righe - - + + Remove rows Rimuovi righe - - + + Insert columns Inserisci colonne - - + + Clear cell(s) Svuota cella(e) - + Set foreground color Imposta colore di primo piano - + Set background color Impostya colore di sfondo @@ -678,67 +678,67 @@ cambiare dinamicamente la configurazione del progetto. La proprietà verrà crea QObject - - + + All (*) Tutto (*) - + Import file Importa file - + Export file Esporta file - + Show spreadsheet Visualizza il foglio di calcolo - - + + Set cell(s) foreground color Imposta il colore di primo piano delle celle - + Sets the Spreadsheet cell(s) foreground color Imposta il colore del primo piano delle celle del foglio di calcolo - - + + Set cell(s) background color Imposta il colore di sfondo delle celle - + Sets the Spreadsheet cell(s) background color Imposta il colore di sfondo delle celle del foglio di calcolo - + Copy & Paste failed Copia & Incolla fallita - + Alias contains invalid characters! L'alias contiene dei caratteri non validi! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Fa riferimento alla cella tramite alias, ad esempio Spreadsheet.my_alias_name invece di Spreadsheet.B1 - + Spreadsheet Foglio di calcolo @@ -877,12 +877,12 @@ Spreadsheet.my_alias_name invece di Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Collega celle - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -891,19 +891,19 @@ Do you want to continue? Vuoi continuare? - + Bind Spreadsheet Cells Associa Celle Foglio di Calcolo - + Error: - Errore: + Error: - + Unbind cells Scollega le celle @@ -987,12 +987,12 @@ Predefinito a: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Imposta tabella di configurazione - + Unsetup configuration table Disimposta tabella di configurazione @@ -1000,7 +1000,7 @@ Predefinito a: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Inserisci %n righe sopra @@ -1008,7 +1008,7 @@ Predefinito a: %V = %A - + Insert %n row(s) below Inserisci %n righe sotto @@ -1016,7 +1016,7 @@ Predefinito a: %V = %A - + Insert %n non-contiguous rows Inserisci %n righe non consecutive @@ -1024,7 +1024,7 @@ Predefinito a: %V = %A - + Remove row(s) Rimuovi righe @@ -1032,7 +1032,7 @@ Predefinito a: %V = %A - + Insert %n column(s) left Inserisci %n colonne a sinistra @@ -1040,7 +1040,7 @@ Predefinito a: %V = %A - + Insert %n column(s) right Inserisci %n colonne a destra @@ -1048,7 +1048,7 @@ Predefinito a: %V = %A - + Insert %n non-contiguous columns Inserisci %n colonna non consecutiva @@ -1056,7 +1056,7 @@ Predefinito a: %V = %A - + Remove column(s) Rimuovi colonne @@ -1064,62 +1064,62 @@ Predefinito a: %V = %A - - + + Properties... Proprietà... - - + + Recompute Ricalcola - - + + Bind... Collega... - - + + Configuration table... Tabella di configurazione... - - + + Merge cells Unisci le celle - - + + Split cells Dividi celle - - + + Cut Taglio - - + + Copy Copia - - + + Paste Incolla - - + + Delete Elimina @@ -1127,12 +1127,12 @@ Predefinito a: %V = %A SpreadsheetGui::SheetView - + Export PDF Esporta in formato PDF - + PDF file File PDF @@ -1163,7 +1163,7 @@ Predefinito a: %V = %A Py - + Unnamed Senza nome diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts index a455a38b6f..09f095cef7 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ja.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet スプレッドシート - + Create spreadsheet スプレッドシートを作成 - + Create a new spreadsheet 新規スプレッドシートを作成 @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet スプレッドシート - + Align bottom 下揃え - + Bottom-align contents of selected cells 選択したセルの内容を下揃えにする @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet スプレッドシート - + Align center 中央揃え - + Center-align contents of selected cells 選択したセルの内容を中央揃えにする @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet スプレッドシート - + Align left 左揃え - + Left-align contents of selected cells 選択したセルの内容を左揃えにする @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet スプレッドシート - + Align right 右揃え - + Right-align contents of selected cells 選択したセルの内容を右揃えにする @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet スプレッドシート - + Align top 上揃え - + Top-align contents of selected cells 選択したセルの内容を上揃えにする @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet スプレッドシート - + Vertically center-align 上下中央揃え - + Vertically center-align contents of selected cells 選択したセルの内容を縦方向中央揃えにする @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet スプレッドシート - + Export spreadsheet スプレッドシートをエクスポート - + Export spreadsheet to CSV file スプレッドシートを CSV ファイル形式でエクスポートします @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet スプレッドシート - + Import spreadsheet スプレッドシートをインポート - + Import CSV file into spreadsheet CSV ファイルからスプレッドシートにインポート @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet スプレッドシート - + Set alias エイリアスを設定 - + Set alias for selected cell 選択したセルのエイリアスを設定 @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet スプレッドシート - + Split cell セルの分割 - + Split previously merged cells 結合されているセルを分割 @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet スプレッドシート - + Bold text 太字 - + Set text in selected cells bold 選択したセルのテキストに太字を設定 @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet スプレッドシート - + Italic text 斜体 - + Set text in selected cells italic 選択したセルのテキストに斜体を設定 @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet スプレッドシート - + Underline text 下線 - + Underline text in selected cells 選択したセルに下線を設定 @@ -282,106 +282,106 @@ Command - + Merge cells セルの結合 - + Split cell セルの分割 - + Left-align cell セルを左揃え - + Center cell セルを中央揃え - + Right-align cell セルを右揃え - + Top-align cell セルを上揃え - + Bottom-align cell セルを下揃え - + Vertically center cells セルを上下中央揃え - + Set bold text 太字にする - + Set italic text 斜体にする - + Set underline text 下線 - + Create Spreadsheet スプレッドシートを作成 - + Set cell properties セルのプロパティ - + Edit cell セルを編集 - - + + Insert rows 行を挿入 - - + + Remove rows 行を削除 - - + + Insert columns 列を挿入 - - + + Clear cell(s) セルをクリア - + Set foreground color 文字色を設定 - + Set background color 背景色を設定 @@ -673,67 +673,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) すべてのファイル (*.*) - + Import file ファイルをインポート - + Export file ファイルのエクスポート - + Show spreadsheet スプレッドシートを表示 - - + + Set cell(s) foreground color セルの前景色を設定 - + Sets the Spreadsheet cell(s) foreground color スプレッドシートのセルの前景色を設定 - - + + Set cell(s) background color セルの背景色を設定 - + Sets the Spreadsheet cell(s) background color スプレッドシートのセルの背景色を設定 - + Copy & Paste failed コピー&ペーストに失敗しました - + Alias contains invalid characters! エイリアスに無効な文字が含まれています! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Spreadsheet.B1 の代わりに Spreadsheet.my_alias_name のように、エイリアスでセルを参照してください。 - + Spreadsheet スプレッドシート @@ -872,12 +872,12 @@ Spreadsheet.my_alias_name のように、エイリアスでセルを参照して SpreadsheetGui::DlgBindSheet - + Bind cells セルのバインド - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -886,19 +886,19 @@ Do you want to continue? 続行しますか? - + Bind Spreadsheet Cells スプレッドシートのセルのバインド - + Error: - エラー: + Error: - + Unbind cells セルの結合解除 @@ -982,12 +982,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table 構成表の設定 - + Unsetup configuration table 構成表の設定解除 @@ -995,118 +995,118 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above 上に%n行挿入 - + Insert %n row(s) below 下に%n行挿入 - + Insert %n non-contiguous rows %n の不連続行を挿入 - + Remove row(s) 行を削除 - + Insert %n column(s) left 左に%n列挿入 - + Insert %n column(s) right 右に%n列挿入 - + Insert %n non-contiguous columns %n の不連続列を挿入 - + Remove column(s) 列を削除 - - + + Properties... プロパティ(&P)... - - + + Recompute 再計算 - - + + Bind... バインド... - - + + Configuration table... 構成表... - - + + Merge cells セルの結合 - - + + Split cells セルの分割 - - + + Cut 切り取り - - + + Copy コピー - - + + Paste 貼り付け - - + + Delete 削除 @@ -1114,12 +1114,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF PDFファイル形式でエクスポート - + PDF file PDFファイル @@ -1150,7 +1150,7 @@ Defaults to: %V = %A Py - + Unnamed Unnamed diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts index 8f673e4e84..21619aa298 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ka.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet ცხრილი - + Create spreadsheet ცხრილის შექმნა - + Create a new spreadsheet ახალი ცხრილის სექმნა @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet ელცხრილი - + Align bottom ძირზე სწორება - + Bottom-align contents of selected cells მონიშნული უჯრედების ძირზე დალაგება @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet ელცხრილი - + Align center ცენტრზე სწორება - + Center-align contents of selected cells მონიშნული უჯრედების ცენტრზე დალაგება @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet ელცხრილი - + Align left მარცხნივ სწორება - + Left-align contents of selected cells მონიშნული უჯრედების მარცხნივ დალაგება @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet ელცხრილი - + Align right მარჯვნივ სწორება - + Right-align contents of selected cells მონიშნული უჯრედების მარჯვნივ დალაგება @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet ელცხრილი - + Align top ზემოთ სწორება - + Top-align contents of selected cells მონიშნული უჯრედების ზემოთ დალაგება @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet ელცხრილი - + Vertically center-align ვერტიკალურად ცენტრზე სწორება - + Vertically center-align contents of selected cells მონიშნული უჯრედების ვერტიკალურად ცენტრზე დალაგება @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet ელცხრილი - + Export spreadsheet ცხრილის გატანა - + Export spreadsheet to CSV file ცხრილის CSV ფაილში გატანა @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet ელცხრილი - + Import spreadsheet ცხრილის შემოტანა - + Import CSV file into spreadsheet ცხრილში CSV ფაილის შემოტანა @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet ელცხრილი - + Set alias ფსევდონიმის დამატება - + Set alias for selected cell მონიშნულ უჯრედებზე ფსევდონიმის მინიჭება @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet ელცხრილი - + Split cell უჯრედის გაყოფა - + Split previously merged cells შერწყმული უჯრედების გაყოფა @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet ელცხრილი - + Bold text მსხვილი ტექსტი - + Set text in selected cells bold მონიშნულ უჯრედებში არსებული ტექსტის გასქელება @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet ელცხრილი - + Italic text კურსივი - + Set text in selected cells italic მონიშნულ უჯრედებში არსებული ტექსტის კურსივი @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet ელცხრილი - + Underline text ტექსტის ხაზგასმა - + Underline text in selected cells მონიშნულ უჯრედებში არსებული ტექსტის ხაზგასმა @@ -282,106 +282,106 @@ Command - + Merge cells უჯრედების შერწყმა - + Split cell უჯრედის გაყოფა - + Left-align cell უჯრედის მარცხნივ სწორება - + Center cell უჯრედის ცენტრზე სწორება - + Right-align cell უჯრედის მარჯვნივ სწორება - + Top-align cell უჯრედის ზემოთ სწორება - + Bottom-align cell უჯრედის ქვემოთ სწორება - + Vertically center cells უჯრედების ვერტიკალურად სწორება - + Set bold text ტექსტის გასქელება - + Set italic text ტექსტის კურსივი - + Set underline text ტექსტის ხაზგასმა - + Create Spreadsheet ცხრილის შექმნა - + Set cell properties უჯრედის თვისებების დაყენება - + Edit cell უჯრედის ჩასწორება - - + + Insert rows სვეტების ჩასმა - - + + Remove rows სვეტების მოცილება - - + + Insert columns სვეტების ჩასმა - - + + Clear cell(s) უჯრედ(ებ)ის გასუფთავება - + Set foreground color წინა პლანის ფერის დაყენება - + Set background color ფონის ფერის დაყენება @@ -671,67 +671,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) ყველა (*) - + Import file ფაილის შემოტანა - + Export file ფაილის გატანა - + Show spreadsheet ცხრილის ჩვენება - - + + Set cell(s) foreground color უჯრედ(ებ)-ის წინა პლანის ფერის დაყენება - + Sets the Spreadsheet cell(s) foreground color უჯრედ(ებ)-ის წინა პლანის ფერის დაყენება - - + + Set cell(s) background color უჯრედ(ებ)-ის წინა ფონის ფერის დაყენება - + Sets the Spreadsheet cell(s) background color უჯრედ(ებ)-ის წინა ფონის ფერის დაყენება - + Copy & Paste failed კოპირებისა და ჩასმის შეცდომა - + Alias contains invalid characters! ფსევდონიმი დაუშვებელ სიმბოლოებს შეიცავს! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 მაგალითად, მიუთითეთ უჯრედი მეტსახელით Spreadsheet.my_alias_name ნაცვლად Spreadsheet.B1 - + Spreadsheet ელცხრილი @@ -870,12 +870,12 @@ Spreadsheet.my_alias_name ნაცვლად Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells უჯრედების მიმაგრება - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -884,19 +884,19 @@ Do you want to continue? გნებავთ, გააგრძელოთ? - + Bind Spreadsheet Cells ელცხრილის უჯრედების გადაბმა - + Error: - შეცდომა: + Error: - + Unbind cells უჯრედების მიმაგრების მოხსნა @@ -981,12 +981,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table კონფიგურაციის ცხრილის მორგება - + Unsetup configuration table კონფიგურაციის ცხრილის მორგების გაუქმება @@ -994,7 +994,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above ზემოთ %n მწკრივის დამატება @@ -1002,7 +1002,7 @@ Defaults to: %V = %A - + Insert %n row(s) below ქვემოთ %n მწკრივის დამატება @@ -1010,7 +1010,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows %n არამომიჯნავე მწკრივის დამატება @@ -1018,7 +1018,7 @@ Defaults to: %V = %A - + Remove row(s) სვეტის მოცილება @@ -1026,7 +1026,7 @@ Defaults to: %V = %A - + Insert %n column(s) left მარცხნივ %n სვეტის დამატება @@ -1034,7 +1034,7 @@ Defaults to: %V = %A - + Insert %n column(s) right მარჯვნივ %n სვეტის დამატება @@ -1042,7 +1042,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns %n არამომიჯნავე სვეტის დამატება @@ -1050,7 +1050,7 @@ Defaults to: %V = %A - + Remove column(s) სვეტის მოცილება @@ -1058,62 +1058,62 @@ Defaults to: %V = %A - - + + Properties... თვისებები... - - + + Recompute გადათვლა - - + + Bind... მიმაგრება... - - + + Configuration table... კონფიგურაციის ცხრილი... - - + + Merge cells უჯრედების შერწყმა - - + + Split cells უჯრედის გაყოფა - - + + Cut ამოჭრა - - + + Copy კოპირება - - + + Paste ჩასმა - - + + Delete წაშლა @@ -1121,12 +1121,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF PDF-ად გატანა - + PDF file PDF ფაილი @@ -1157,7 +1157,7 @@ Defaults to: %V = %A Py - + Unnamed უსახელო diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts index e8ecacfb86..23ecd6090b 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ko.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet 스프레드시트 - + Create spreadsheet 스프레드시트 만들기 - + Create a new spreadsheet 새로운 스프레드시트 만들기 @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet 스프레드시트 - + Align bottom 하단 정렬 - + Bottom-align contents of selected cells 선택한 셀의 내용을 하단 정렬 @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet 스프레드시트 - + Align center 중앙 정렬 - + Center-align contents of selected cells 선택한 셀의 내용을 중앙 정렬 @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet 스프레드시트 - + Align left 왼쪽 정렬 - + Left-align contents of selected cells 선택한 셀의 내용을 왼쪽 정렬 @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet 스프레드시트 - + Align right 오른쪽 정렬 - + Right-align contents of selected cells 선택한 셀의 내용을 오른쪽 정렬 @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet 스프레드시트 - + Align top 상단 정렬 - + Top-align contents of selected cells 선택한 셀의 내용을 상단 정렬 @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet 스프레드시트 - + Vertically center-align 수직 중앙 정렬 - + Vertically center-align contents of selected cells 선택한 셀의 내용을 중앙 정렬 @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet 스프레드시트 - + Export spreadsheet 스프레드시트 내보내기 - + Export spreadsheet to CSV file CSV 파일로 스프레드시트 내보내기 @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet 스프레드시트 - + Import spreadsheet 스프레드시트 가져오기 - + Import CSV file into spreadsheet CSV 파일에서 스프레드시트로 가져오기 @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet 스프레드시트 - + Set alias 별칭 설정하기 - + Set alias for selected cell 선택한 셀의 별칭 설정 @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet 스프레드시트 - + Split cell 셀 나누기 - + Split previously merged cells 이전에 병합된 셀 분할 @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet 스프레드시트 - + Bold text 굵은 텍스트 - + Set text in selected cells bold 선택한 셀의 텍스트를 굵게 설정 @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet 스프레드시트 - + Italic text 기울임꼴 텍스트 - + Set text in selected cells italic 선택한 셀의 텍스트를 기울임 꼴로 설정 @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet 스프레드시트 - + Underline text 밑줄 글자 - + Underline text in selected cells 선택한 셀의 텍스트에 밑줄 적용 @@ -282,106 +282,106 @@ Command - + Merge cells 셀 합치기 - + Split cell 셀 나누기 - + Left-align cell Left-align cell - + Center cell Center cell - + Right-align cell Right-align cell - + Top-align cell Top-align cell - + Bottom-align cell Bottom-align cell - + Vertically center cells Vertically center cells - + Set bold text Set bold text - + Set italic text 기울임꼴 텍스트 설정하기 - + Set underline text 밑줄 텍스트 설정하기 - + Create Spreadsheet 스프레드시트 만들기 - + Set cell properties 셀 속성 설정하기 - + Edit cell 셀 편집하기 - - + + Insert rows 행 삽입 - - + + Remove rows 행 삭제 - - + + Insert columns 열 삽입 - - + + Clear cell(s) 셀 비우기 - + Set foreground color 전경색 설정하기 - + Set background color 배경색 설정하기 @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) 전체 (*) - + Import file 가져오기 - + Export file 파일로 내보내기 - + Show spreadsheet 스프레드시트 표시 - - + + Set cell(s) foreground color 셀 전경색 설정 - + Sets the Spreadsheet cell(s) foreground color 스프레드 시트의 셀 전경색 설정 - - + + Set cell(s) background color 셀 배경색 설정 - + Sets the Spreadsheet cell(s) background color 스프레드 시트의 셀 배경색 설정 - + Copy & Paste failed 복사 및 붙여넣기 실패함 - + Alias contains invalid characters! Alias contains invalid characters! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 - + Spreadsheet 스프레드시트 @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: - 오류: + Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,118 +1002,118 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insert %n row(s) above - + Insert %n row(s) below Insert %n row(s) below - + Insert %n non-contiguous rows Insert %n non-contiguous rows - + Remove row(s) Remove row(s) - + Insert %n column(s) left Insert %n column(s) left - + Insert %n column(s) right Insert %n column(s) right - + Insert %n non-contiguous columns Insert %n non-contiguous columns - + Remove column(s) Remove column(s) - - + + Properties... 속성... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells 셀 합치기 - - + + Split cells Split cells - - + + Cut 자르기 - - + + Copy 복사하기 - - + + Paste Paste - - + + Delete 삭제 @@ -1121,12 +1121,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF PDF로 내보내기 - + PDF file PDF 파일 @@ -1157,7 +1157,7 @@ Defaults to: %V = %A Py - + Unnamed 이름없음 diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts index f8b190c017..3abbf269a5 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_nl.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Rekenblad - + Create spreadsheet Rekenblad aanmaken - + Create a new spreadsheet Een nieuw rekenblad aanmaken @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Rekenblad - + Align bottom Onderzijde uitlijnen - + Bottom-align contents of selected cells Eigenschappen 'onderzijde uitlijnen' van geselecteerde cellen @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Rekenblad - + Align center Midden uitlijnen - + Center-align contents of selected cells Eigenschappen 'midden uitlijnen' van geselecteerde cellen @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Rekenblad - + Align left Links uitlijnen - + Left-align contents of selected cells Eigenschappen 'links uitlijnen' van geselecteerde cellen @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Rekenblad - + Align right Rechts uitlijnen - + Right-align contents of selected cells Eigenschappen 'rechts uitlijnen' van geselecteerde cellen @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Rekenblad - + Align top Bovenaan uitlijnen - + Top-align contents of selected cells Eigenschappen 'bovenzijde uitlijnen' van geselecteerde cellen @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Rekenblad - + Vertically center-align Verticaal centreren - + Vertically center-align contents of selected cells Eigenschappen 'vertikaal uitlijnen' van geselecteerde cellen @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Rekenblad - + Export spreadsheet Rekenblad exporteren - + Export spreadsheet to CSV file Het rekenblad naar CSV-bestand exporteren @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Rekenblad - + Import spreadsheet Rekenblad importeren - + Import CSV file into spreadsheet Een CSV-bestand als rekenblad importeren @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Rekenblad - + Set alias Alias instellen - + Set alias for selected cell Een alias instellen voor de geselecteerde cel @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Rekenblad - + Split cell Cel splitsen - + Split previously merged cells Eerder samengevoegde cellen splitsen @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Rekenblad - + Bold text Vette tekst - + Set text in selected cells bold Tekst in geselecteerde cellen vet instellen @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Rekenblad - + Italic text Cursieve tekst - + Set text in selected cells italic Tekst in geselecteerde cellen cursief instellen @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Rekenblad - + Underline text Tekst onderlijnen - + Underline text in selected cells Tekst met onderstreping in geselecteerde cellen instellen @@ -282,106 +282,106 @@ Command - + Merge cells Cellen samenvoegen - + Split cell Cel splitsen - + Left-align cell Links uitlijnen cel - + Center cell Centreer cel - + Right-align cell Rechts uitlijnen cel - + Top-align cell Boven uitlijnen cel - + Bottom-align cell Onder uitlijnen cel - + Vertically center cells Cellen verticaal centreren - + Set bold text Tekst vet - + Set italic text Cursieve tekst instellen - + Set underline text Tekst onderstrepen - + Create Spreadsheet Rekenblad aanmaken - + Set cell properties Celeigenschappen instellen - + Edit cell Cel bewerken - - + + Insert rows Rijen invoegen - - + + Remove rows Rijen verwijderen - - + + Insert columns Kolommen invoegen - - + + Clear cell(s) Wis cel(len) - + Set foreground color Voorgrondkleur instellen - + Set background color Achtergrondkleur instellen @@ -669,67 +669,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Alle (*) - + Import file Bestand importeren - + Export file Bestand exporteren - + Show spreadsheet Rekenblad tonen - - + + Set cell(s) foreground color Zet de voorgrondkleur van de cel(len) op - + Sets the Spreadsheet cell(s) foreground color Stelt de voorgrondkleur van de Spreadsheet-cel(len) op - - + + Set cell(s) background color Zet de achtergrondkleur van de cel(len) op - + Sets the Spreadsheet cell(s) background color Stelt de achtergrondkleur van de Spreadsheet-cel(len) op - + Copy & Paste failed Kopiëren en plakken mislukt - + Alias contains invalid characters! Alias bevat ongeldige tekens! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Verwijs naar cel met een alias, bijvoorbeeld Spreadsheet.mijn_alias_naam in plaats van Spreadsheet.B1 - + Spreadsheet Rekenblad @@ -868,12 +868,12 @@ Spreadsheet.mijn_alias_naam in plaats van Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Verbind cellen - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -882,19 +882,19 @@ Do you want to continue? Wilt u doorgaan? - + Bind Spreadsheet Cells Verbind spreadsheet cellen - + Error: - Fout: + Error: - + Unbind cells Verbinding verwijderen @@ -978,12 +978,12 @@ waarbij: SpreadsheetGui::DlgSheetConf - + Setup configuration table Opzet van de configuratie tabel - + Unsetup configuration table Configuratie tabel verwijderen @@ -991,7 +991,7 @@ waarbij: SpreadsheetGui::SheetTableView - + Insert %n row(s) above Voeg %n rij(en) hierboven in @@ -999,7 +999,7 @@ waarbij: - + Insert %n row(s) below Voeg %n rij(en) hieronder in @@ -1007,7 +1007,7 @@ waarbij: - + Insert %n non-contiguous rows Voeg %n afzonderlijke kolommen in @@ -1015,7 +1015,7 @@ waarbij: - + Remove row(s) Rij(en) verwijderen @@ -1023,7 +1023,7 @@ waarbij: - + Insert %n column(s) left %n kolom(men) links invoegen @@ -1031,7 +1031,7 @@ waarbij: - + Insert %n column(s) right Rechts %n kolom(men) invoegen @@ -1039,7 +1039,7 @@ waarbij: - + Insert %n non-contiguous columns Voeg %n afzonderlijke kolommen in @@ -1047,7 +1047,7 @@ waarbij: - + Remove column(s) Kolom verwijderen @@ -1055,62 +1055,62 @@ waarbij: - - + + Properties... Eigenschappen... - - + + Recompute Herberekenen - - + + Bind... Bind... - - + + Configuration table... Configuratie tabel... - - + + Merge cells Cellen samenvoegen - - + + Split cells Splits cellen - - + + Cut Knippen - - + + Copy Kopie - - + + Paste Plakken - - + + Delete Verwijderen @@ -1118,12 +1118,12 @@ waarbij: SpreadsheetGui::SheetView - + Export PDF Exporteren als PDF - + PDF file PDF-bestand @@ -1154,7 +1154,7 @@ waarbij: Py - + Unnamed Naamloos diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts index e10916d766..90c1360922 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pl.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Arkusz kalkulacyjny - + Create spreadsheet Utwórz arkusz - + Create a new spreadsheet Utwórz nowy arkusz @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Arkusz kalkulacyjny - + Align bottom Wyrównaj w dół - + Bottom-align contents of selected cells Wyrównaj do dołu zawartość wybranych komórek @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Arkusz kalkulacyjny - + Align center Wyśrodkuj w poziomie - + Center-align contents of selected cells Wyśrodkuj zawartość wybranych komórek @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Arkusz kalkulacyjny - + Align left Wyrównaj do lewej - + Left-align contents of selected cells Wyrównaj do lewej zawartość wybranych komórek @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Arkusz kalkulacyjny - + Align right Wyrównaj do prawej - + Right-align contents of selected cells Wyrównaj do prawej zawartość wybranych komórek @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Arkusz kalkulacyjny - + Align top Wyrównaj w górę - + Top-align contents of selected cells Wyrównaj w górę zawartość wybranych komórek @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Arkusz kalkulacyjny - + Vertically center-align Wyśrodkuj w pionie - + Vertically center-align contents of selected cells Wyśrodkuj w pionie zawartość wybranych komórek @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Arkusz kalkulacyjny - + Export spreadsheet Eksportuj arkusz - + Export spreadsheet to CSV file Eksportuj arkusz do pliku CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Arkusz kalkulacyjny - + Import spreadsheet Importuj arkusz - + Import CSV file into spreadsheet Importuj zawartość pliku CSV do arkusza @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Arkusz kalkulacyjny - + Set alias Definiuj alias - + Set alias for selected cell Definiuj alias dla wybranej komórki @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Arkusz kalkulacyjny - + Split cell Podziel komórkę - + Split previously merged cells Rozdziel uprzednio scalone komórki @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Arkusz kalkulacyjny - + Bold text Pogrubienie - + Set text in selected cells bold Umieść tekst w zaznaczonych komórkach pogrubioną czcionką @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Arkusz kalkulacyjny - + Italic text Kursywa - + Set text in selected cells italic Umieść tekst w zaznaczonych komórkach pochyłą czcionką @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Arkusz kalkulacyjny - + Underline text Podkreślenie - + Underline text in selected cells Podkreśl tekst w zaznaczonych komórkach @@ -282,106 +282,106 @@ Command - + Merge cells Połącz komórki - + Split cell Podziel komórkę - + Left-align cell Wyrównaj komórkę do lewej - + Center cell Wyśrodkuj komórkę - + Right-align cell Wyrównaj komórkę do prawej - + Top-align cell Wyrównaj komórkę do góry - + Bottom-align cell Wyrównaj komórkę do dołu - + Vertically center cells Wyśrodkuj komórkę w pionie - + Set bold text Ustaw pogrubiony tekst - + Set italic text Ustaw pochylony tekst - + Set underline text Ustaw podkreślony tekst - + Create Spreadsheet Utwórz Arkusz kalkulacyjny - + Set cell properties Ustaw właściwości komórki - + Edit cell Edytuj komórkę - - + + Insert rows Wstaw wiersze - - + + Remove rows Usuń wiersze - - + + Insert columns Wstaw kolumny - - + + Clear cell(s) Wyczyść komórkę(i) - + Set foreground color Ustawia kolor pierwszoplanowy - + Set background color Ustaw kolor tła @@ -679,67 +679,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Wszystkie (*) - + Import file Importuj plik - + Export file Eksportuj plik - + Show spreadsheet Pokaż arkusz - - + + Set cell(s) foreground color Ustaw kolor komórki - + Sets the Spreadsheet cell(s) foreground color Ustawia kolor tła komórki(ek) Arkusza kalkulacyjnego - - + + Set cell(s) background color Ustaw kolor tła komórki(ek) - + Sets the Spreadsheet cell(s) background color Ustawia kolor tła komórki(ek) Arkusza kalkulacyjnego - + Copy & Paste failed Kopiowanie i wklejanie nie powiodło się - + Alias contains invalid characters! Określenie nazwy zawiera nieprawidłowe znaki! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Odniesienie do komórki według oznaczenia nazwy (alias), np. Arkusz.mój_alias zamiast Arkusz.B1 - + Spreadsheet Arkusz kalkulacyjny @@ -878,12 +878,12 @@ Arkusz.mój_alias zamiast Arkusz.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Powiąż komórki - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -892,19 +892,19 @@ Do you want to continue? Czy chcesz kontynuować? - + Bind Spreadsheet Cells Powiąż komórki arkusza kalkulacyjnego - + Error: - Błąd: + Error: - + Unbind cells Usuń powiązanie komórek @@ -988,12 +988,12 @@ Domyślnie %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Ustawienia tabeli konfiguracji - + Unsetup configuration table Usuń tabelę konfiguracji ustawień @@ -1001,7 +1001,7 @@ Domyślnie %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Wstaw %n wiersz powyżej @@ -1011,7 +1011,7 @@ Domyślnie %V = %A - + Insert %n row(s) below Wstaw %n wiersz poniżej @@ -1021,7 +1021,7 @@ Domyślnie %V = %A - + Insert %n non-contiguous rows Wstaw %n wiersz, który nie jest sąsiadujący @@ -1031,7 +1031,7 @@ Domyślnie %V = %A - + Remove row(s) Usuń wiersz @@ -1041,7 +1041,7 @@ Domyślnie %V = %A - + Insert %n column(s) left Wstaw %n kolumnę z lewej strony @@ -1051,7 +1051,7 @@ Domyślnie %V = %A - + Insert %n column(s) right Wstaw %n kolumnę z prawej strony @@ -1061,7 +1061,7 @@ Domyślnie %V = %A - + Insert %n non-contiguous columns Wstaw %n kolumnę, która nie jest sąsiadująca @@ -1071,7 +1071,7 @@ Domyślnie %V = %A - + Remove column(s) Usuń kolumnę @@ -1081,62 +1081,62 @@ Domyślnie %V = %A - - + + Properties... Właściwości ... - - + + Recompute Przelicz ponownie - - + + Bind... Powiąż ... - - + + Configuration table... Tabela konfiguracji ... - - + + Merge cells Scal komórki - - + + Split cells Podziel komórkę - - + + Cut Wytnij - - + + Copy Kopiuj - - + + Paste Wklej - - + + Delete Usuń @@ -1144,12 +1144,12 @@ Domyślnie %V = %A SpreadsheetGui::SheetView - + Export PDF Eksportuj do formatu PDF - + PDF file Plik PDF @@ -1180,7 +1180,7 @@ Domyślnie %V = %A Py - + Unnamed Nienazwany diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts index c905e0b0ff..16ea7d5984 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-BR.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Planilha - + Create spreadsheet Criar planilha - + Create a new spreadsheet Cria uma nova planilha @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Planilha - + Align bottom Alinhar abaixo - + Bottom-align contents of selected cells Alinha o conteúdo das células selecionadas abaixo @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Planilha - + Align center Alinhar ao centro - + Center-align contents of selected cells Alinha o conteúdo das células selecionadas no centro @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Planilha - + Align left Alinhar à esquerda - + Left-align contents of selected cells Alinha o conteúdo das células selecionadas a esquerda @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Planilha - + Align right Alinhar à direita - + Right-align contents of selected cells Alinha o conteúdo das células selecionadas à direita @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Planilha - + Align top Alinhar acima - + Top-align contents of selected cells Alinha o conteúdo das células selecionadas acima @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Planilha - + Vertically center-align Alinhar no centro verticalmente - + Vertically center-align contents of selected cells Alinha verticalmente o conteúdo das células selecionadas no centro @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Planilha - + Export spreadsheet Exportar planilha - + Export spreadsheet to CSV file Exporta uma planilha para um arquivo CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Planilha - + Import spreadsheet Importar planilha - + Import CSV file into spreadsheet Importa um arquivo CSV em uma planilha @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Planilha - + Set alias Configurar nome alternativo - + Set alias for selected cell Configurar nome alternativo para a célula selecionada @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Planilha - + Split cell Dividir célula - + Split previously merged cells Dividir células previamente mescladas @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Planilha - + Bold text Negrito - + Set text in selected cells bold Definir texto em células selecionadas para Negrito @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Planilha - + Italic text Itálico - + Set text in selected cells italic Definir texto em células selecionadas para Itálico @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Planilha - + Underline text Sublinhado - + Underline text in selected cells Sublinhar o texto nas células selecionadas @@ -282,106 +282,106 @@ Command - + Merge cells Mesclar células - + Split cell Dividir célula - + Left-align cell Alinhar a célula à esquerda - + Center cell Centralizar célula - + Right-align cell Alinhar a célula à direita - + Top-align cell Alinhar a célula no topo - + Bottom-align cell Alinhar a célula em baixo - + Vertically center cells Centralizar as células verticalmente - + Set bold text Definir texto em negrito - + Set italic text Definir texto em itálico - + Set underline text Definir texto sublinhado - + Create Spreadsheet Criar planilha - + Set cell properties Definir propriedades da célula - + Edit cell Editar célula - - + + Insert rows Inserir linhas - - + + Remove rows Remover linhas - - + + Insert columns Inserir colunas - - + + Clear cell(s) Limpar célula(s) - + Set foreground color Definir cor do primeiro plano - + Set background color Definir cor de fundo @@ -679,67 +679,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Todos (*) - + Import file Importar um arquivo - + Export file Exportar um arquivo - + Show spreadsheet Mostrar planilha - - + + Set cell(s) foreground color Definir cor de primeiro plano da(s) célula(s) - + Sets the Spreadsheet cell(s) foreground color Definir a cor de primeiro plano da(s) célula(s) da planilha - - + + Set cell(s) background color Definir cor do plano de fundo da(s) célula(s) - + Sets the Spreadsheet cell(s) background color Definir a cor de plano de fundo da(s) célula(s) da planilha - + Copy & Paste failed Falha ao copiar e colar - + Alias contains invalid characters! O nome contém caracteres inválidos! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Busque a célula pelo nome, por exemplo Planilha.meu_nome em vez de Planilha.B1 - + Spreadsheet Planilha @@ -878,12 +878,12 @@ Planilha.meu_nome em vez de Planilha.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -892,19 +892,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: - Erro: + Error: - + Unbind cells Unbind cells @@ -988,12 +988,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1001,7 +1001,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Inserir %n linha(s) acima @@ -1009,7 +1009,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Inserir %n linha(s) abaixo @@ -1017,7 +1017,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Inserir %n linhas não contíguas @@ -1025,7 +1025,7 @@ Defaults to: %V = %A - + Remove row(s) Remover linha(s) @@ -1033,7 +1033,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Inserir %n coluna(s) à esquerda @@ -1041,7 +1041,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Inserir %n coluna(s) à direita @@ -1049,7 +1049,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Inserir %n colunas não contíguas @@ -1057,7 +1057,7 @@ Defaults to: %V = %A - + Remove column(s) Remover coluna(s) @@ -1065,62 +1065,62 @@ Defaults to: %V = %A - - + + Properties... Propriedades... - - + + Recompute Recalcular - - + + Bind... Bind... - - + + Configuration table... Tabela de configuração... - - + + Merge cells Mesclar células - - + + Split cells Dividir células - - + + Cut Recortar - - + + Copy Copiar - - + + Paste Colar - - + + Delete Excluir @@ -1128,12 +1128,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportar PDF - + PDF file Arquivo PDF @@ -1164,7 +1164,7 @@ Defaults to: %V = %A Py - + Unnamed Sem nome diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts index f9d6eceec1..1e8bd0a4af 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_pt-PT.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Folha de cálculo - + Create spreadsheet Criar folha de cálculo - + Create a new spreadsheet Criar uma nova folha de cálculo @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Folha de cálculo - + Align bottom Alinhamento inferior - + Bottom-align contents of selected cells Alinha o conteúdo das células selecionadas pelo fundo @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Folha de cálculo - + Align center Alinhar ao Centro - + Center-align contents of selected cells Alinhar ao centro o conteúdo das células selecionadas @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Folha de cálculo - + Align left Alinhar à esquerda - + Left-align contents of selected cells Alinhar à esquerda o conteúdo das células selecionadas @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Folha de cálculo - + Align right Alinhar à direita - + Right-align contents of selected cells Alinhar à direita o conteúdo das células selecionadas @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Folha de cálculo - + Align top Alinhamento superior - + Top-align contents of selected cells Alinhamento superior do conteúdo das células selecionadas @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Folha de cálculo - + Vertically center-align Alinhar verticalmente ao centro - + Vertically center-align contents of selected cells Alinhar ao centro o conteúdo das células selecionadas @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Folha de cálculo - + Export spreadsheet Exportar folha de cálculo - + Export spreadsheet to CSV file Exportar folha de cálculo para ficheiro CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Folha de cálculo - + Import spreadsheet Importar Folha de Cálculo - + Import CSV file into spreadsheet Importar ficheiro CSV para a folha de cálculo @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Folha de cálculo - + Set alias Definir nome alternativo - + Set alias for selected cell Definir nome alternativo para a célula selecionada @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Folha de cálculo - + Split cell Dividir célula - + Split previously merged cells Dividir células anteriormente unidas @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Folha de cálculo - + Bold text Texto em negrito - + Set text in selected cells bold Definir texto em células selecionadas para negrito @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Folha de cálculo - + Italic text Texto em itálico - + Set text in selected cells italic Definir texto em células selecionadas para itálico @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Folha de cálculo - + Underline text Sublinhar texto - + Underline text in selected cells Sublinhar o texto nas células selecionadas @@ -282,106 +282,106 @@ Command - + Merge cells Unir células - + Split cell Dividir célula - + Left-align cell Alinhamento à esquerda da célula - + Center cell Centrar célula - + Right-align cell Alinhamento à direita da célula - + Top-align cell Alinhamento superior da célula - + Bottom-align cell Alinhamento inferior da célula - + Vertically center cells Centrar verticalmente as células - + Set bold text Aplicar texto em negrito - + Set italic text Aplicar texto em itálico - + Set underline text Aplicar texto sublinhado - + Create Spreadsheet Criar folha de cálculo - + Set cell properties Definir propriedades da célula - + Edit cell Editar célula - - + + Insert rows Inserir linhas - - + + Remove rows Remover linhas - - + + Insert columns Inserir colunas - - + + Clear cell(s) Limpar célula(s) - + Set foreground color Definir cor do primeiro plano - + Set background color Definir cor de fundo @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Todos (*) - + Import file Importar ficheiro - + Export file Exportar ficheiro - + Show spreadsheet Mostrar folha de cálculo - - + + Set cell(s) foreground color Definir cor de primeiro plano da célula (s) - + Sets the Spreadsheet cell(s) foreground color Definir a cor de primeiro plano das células da Tabela (folha de cálculo) - - + + Set cell(s) background color Definir cor do plano de fundo da célula (s) - + Sets the Spreadsheet cell(s) background color Definir a cor de plano de fundo das células da Tabela (folha de cálculo) - + Copy & Paste failed Falha ao copiar e colar - + Alias contains invalid characters! O Alias contém caracteres inválidos! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Consulte a célula por alias, por exemplo Spreadsheet.my_alias_name em vez de Spreadsheet.B1 - + Spreadsheet Folha de cálculo @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name em vez de Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,7 +1002,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Inserir %n linha(s) acima @@ -1010,7 +1010,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Inserir %n linha(s) abaixo @@ -1018,7 +1018,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Inserir %n linhas não contíguas @@ -1026,7 +1026,7 @@ Defaults to: %V = %A - + Remove row(s) Remover linha(s) @@ -1034,7 +1034,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Inserir %n coluna(s) à esquerda @@ -1042,7 +1042,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Inserir %n coluna(s) à direita @@ -1050,7 +1050,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Inserir %n colunas não contíguas @@ -1058,7 +1058,7 @@ Defaults to: %V = %A - + Remove column(s) Remover coluna(s) @@ -1066,62 +1066,62 @@ Defaults to: %V = %A - - + + Properties... Propriedades... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells Unir células - - + + Split cells Split cells - - + + Cut Cortar - - + + Copy Copiar - - + + Paste Colar - - + + Delete Apagar @@ -1129,12 +1129,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportar PDF - + PDF file Ficheiro PDF @@ -1165,7 +1165,7 @@ Defaults to: %V = %A Py - + Unnamed Sem nome diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts index 852cf5550d..4ab9c7d9e2 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ro.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Foaie de calcul - + Create spreadsheet Creare foaie de calcul - + Create a new spreadsheet Creaţi o nouă foaie de calcul @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Foaie de calcul - + Align bottom Aliniaţi partea de jos - + Bottom-align contents of selected cells Aliniere în jos a conţinutului celulelor selectate @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Foaie de calcul - + Align center Aliniere în centru - + Center-align contents of selected cells Aliniere în centru a conținutului celulelor selectate @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Foaie de calcul - + Align left Aliniere la stânga - + Left-align contents of selected cells Aliniere la stânga a conținutului celulelor selectate @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Foaie de calcul - + Align right Aliniere la dreapta - + Right-align contents of selected cells Aliniere la dreapta a conținutului celulelor selectate @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Foaie de calcul - + Align top Aliniere sus - + Top-align contents of selected cells Aliniere în sus a conţinutului celulelor selectate @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Foaie de calcul - + Vertically center-align Aliniere verticală centrată - + Vertically center-align contents of selected cells Aliniere verticală centrată a conținutului celulelor selectate @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Foaie de calcul - + Export spreadsheet Exportă foaie de calcul - + Export spreadsheet to CSV file Exportă foaie de calcul ca fișier CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Foaie de calcul - + Import spreadsheet Importă foaie de calcul - + Import CSV file into spreadsheet Importă fișier CSV în foaia de calcul @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Foaie de calcul - + Set alias Definiți alias - + Set alias for selected cell Definiți alias pentru celula selectată @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Foaie de calcul - + Split cell Scindare celule - + Split previously merged cells Împarte celulele îmbinate anterior @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Foaie de calcul - + Bold text Text aldin - + Set text in selected cells bold Setează textul în celulele selectate îngroșat @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Foaie de calcul - + Italic text Text cursiv - + Set text in selected cells italic Setează textul în celulele selectate cursiv @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Foaie de calcul - + Underline text Sublinierea textului - + Underline text in selected cells Subliniază textul în celulele selectate @@ -282,106 +282,106 @@ Command - + Merge cells Îmbinare celule - + Split cell Scindare celule - + Left-align cell Aliniere la stanga - + Center cell Celulă centrală - + Right-align cell Aliniere la dreapta - + Top-align cell Aliniere sus - + Bottom-align cell Aliniere jos - + Vertically center cells Aliniere verticală centrată - + Set bold text Setează text îngroșat - + Set italic text Setare text italic - + Set underline text Setare text subliniere - + Create Spreadsheet Creare foaie de calcul - + Set cell properties Setați proprietățile celulei - + Edit cell Editare celulă - - + + Insert rows Inserare rânduri - - + + Remove rows Elimina rânduri - - + + Insert columns Inserare coloane - - + + Clear cell(s) Golește celula(ele) - + Set foreground color Setare culoare prim-plan - + Set background color Setează culoarea de fundal @@ -678,67 +678,67 @@ schimba configurația proiectului. Proprietatea va fi creată dacă nu există.< QObject - - + + All (*) Tot (*) - + Import file Importă fişier - + Export file Exportă fişier - + Show spreadsheet Arată foaie de calcul - - + + Set cell(s) foreground color Definiți culoarea de prim planul celulei(lor) - + Sets the Spreadsheet cell(s) foreground color Definiți culoarea prim planului celulelor foii de calcul - - + + Set cell(s) background color Setează culoarea de fundal a celulei(lor) - + Sets the Spreadsheet cell(s) background color Définiți culoarea de fundal a celulei(lor) foii de calcul - + Copy & Paste failed Copiere & Lipire eșuată - + Alias contains invalid characters! Aliasul conține caractere invalide! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Consultați celula prin alias, de exemplu Spreadsheet.my_alias_name în loc de Spreadsheet.B1 - + Spreadsheet Foaie de calcul @@ -877,12 +877,12 @@ Spreadsheet.my_alias_name în loc de Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Legă celulele - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -891,19 +891,19 @@ Do you want to continue? Doriţi să continuaţi? - + Bind Spreadsheet Cells Legare celule de foaie - + Error: - Eroare: + Error: - + Unbind cells Desprinde celulele @@ -987,12 +987,12 @@ Implicit la: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Tabel de configurare - + Unsetup configuration table Dezinstalează tabelul de configurare @@ -1000,7 +1000,7 @@ Implicit la: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Introduceți %n rânduri mai sus @@ -1009,7 +1009,7 @@ Implicit la: %V = %A - + Insert %n row(s) below Introduceți rânduri mai jos @@ -1018,7 +1018,7 @@ Implicit la: %V = %A - + Insert %n non-contiguous rows Insert %n non-contiguous rows @@ -1027,7 +1027,7 @@ Implicit la: %V = %A - + Remove row(s) Eliminați rândul(s) @@ -1036,7 +1036,7 @@ Implicit la: %V = %A - + Insert %n column(s) left Inserare coloană la stânga @@ -1045,7 +1045,7 @@ Implicit la: %V = %A - + Insert %n column(s) right Inserare coloană la dreapta @@ -1054,7 +1054,7 @@ Implicit la: %V = %A - + Insert %n non-contiguous columns Insert %n non-contiguous columns @@ -1063,7 +1063,7 @@ Implicit la: %V = %A - + Remove column(s) Elimină coloanele @@ -1072,62 +1072,62 @@ Implicit la: %V = %A - - + + Properties... Proprietăți... - - + + Recompute Recomandare - - + + Bind... Bind... - - + + Configuration table... Tabel de configurare... - - + + Merge cells Îmbinare celule - - + + Split cells Divizarea celulelor - - + + Cut Scădere - - + + Copy Copiere - - + + Paste Lipește - - + + Delete Ştergeţi @@ -1135,12 +1135,12 @@ Implicit la: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportă PDF - + PDF file Fişier PDF @@ -1171,7 +1171,7 @@ Implicit la: %V = %A Py - + Unnamed Nedenumit diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts index d23e010c19..05c70e8a9d 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_ru.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Электронная таблица - + Create spreadsheet Создать электронную таблицу - + Create a new spreadsheet Создать новую электронную таблицу @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Электронная таблица - + Align bottom Выровнять по нижнему краю - + Bottom-align contents of selected cells Выравнять содержимое выделенных ячеек по нижнему краю @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Электронная таблица - + Align center Выровнять по центру - + Center-align contents of selected cells Выровнять содержимое выделенных ячеек по центру @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Электронная таблица - + Align left Выровнять по левому краю - + Left-align contents of selected cells Выровнять содержимое выделенных ячеек по левому краю @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Электронная таблица - + Align right Выровнять по правому краю - + Right-align contents of selected cells Выровнять содержимое выделенных ячеек по правому краю @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Электронная таблица - + Align top Выровнять по верхнему краю - + Top-align contents of selected cells Выровнять содержимое выделенных ячеек по верхнему краю @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Электронная таблица - + Vertically center-align Выровнять вертикально по центру - + Vertically center-align contents of selected cells Вертикально выровнять содержимое выделенных ячеек по центру @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Электронная таблица - + Export spreadsheet Экспорт электронной таблицы - + Export spreadsheet to CSV file Экспорт электронной таблицы в CSV-файл @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Электронная таблица - + Import spreadsheet Импорт электронной таблицы - + Import CSV file into spreadsheet Импорт CSV-файла в таблицу @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Электронная таблица - + Set alias Задать псевдоним - + Set alias for selected cell Задать псевдоним для выбранной ячейки @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Электронная таблица - + Split cell Разделить ячейку - + Split previously merged cells Разделить ранее объединенные ячейки @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Электронная таблица - + Bold text Полужирный текст - + Set text in selected cells bold Сделать текст в выбранных ячейках жирным шрифтом @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Электронная таблица - + Italic text Курсивный текст - + Set text in selected cells italic Сделать текст в выбранных ячейках курсивом @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Электронная таблица - + Underline text Подчеркивание текста - + Underline text in selected cells Подчеркивание текста в выбранных ячейках @@ -282,106 +282,106 @@ Command - + Merge cells Объединить ячейки - + Split cell Разделить ячейку - + Left-align cell Выравнивание по левому краю - + Center cell Выравнивание по центру - + Right-align cell Выравнивание по правому краю - + Top-align cell Выравнивание по верхнему краю - + Bottom-align cell Выравнивание по нижнему краю - + Vertically center cells Выравнивание вертикально по центру - + Set bold text Выделение текста полужирным стилем - + Set italic text Выделение текста курсивом - + Set underline text Выделение текста подчеркиванием - + Create Spreadsheet Создание электронной таблицы - + Set cell properties Изменения свойств ячеек - + Edit cell Правка ячейки - - + + Insert rows Вставка строк - - + + Remove rows Удаление строк - - + + Insert columns Вставка столбцов - - + + Clear cell(s) Очистка ячейки(ек) - + Set foreground color Установка цвета содержимого ячеек - + Set background color Установка цвета фона ячеек @@ -677,67 +677,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Всё (*) - + Import file Импорт файла - + Export file Экспорт файла - + Show spreadsheet Показать таблицу - - + + Set cell(s) foreground color Установить цвет переднего плана ячеек - + Sets the Spreadsheet cell(s) foreground color Задает цвет переднего плана ячеек таблицы - - + + Set cell(s) background color Установить цвет фона ячеек - + Sets the Spreadsheet cell(s) background color Задает цвет фона ячеек таблицы - + Copy & Paste failed Скопировать и вставить не удалось - + Alias contains invalid characters! Псевдоним содержит недопустимые символы! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Обратитесь к ячейке по псевдониму, например Spreadsheet.my_alias_name вместо Spreadsheet.B1 - + Spreadsheet Электронная таблица @@ -876,12 +876,12 @@ Spreadsheet.my_alias_name вместо Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Связать ячейки - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -890,18 +890,19 @@ Do you want to continue? Продолжить? - + Bind Spreadsheet Cells Привязка к ячейкам таблиц - + Error: - Ошибка: + Error: + - + Unbind cells Отвязать ячейки @@ -985,12 +986,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Настроить таблицу конфигурации - + Unsetup configuration table Удалить таблицу конфигурации @@ -998,7 +999,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Вставить %n строку выше @@ -1008,7 +1009,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Вставить %n строку ниже @@ -1018,7 +1019,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Вставить %n строку с пропуском строк @@ -1028,7 +1029,7 @@ Defaults to: %V = %A - + Remove row(s) Удалить строку @@ -1038,7 +1039,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Вставить %n столбец слева @@ -1048,7 +1049,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Вставить %n столбец справа @@ -1058,7 +1059,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Вставить %n столбец с пропуском столбцов @@ -1068,7 +1069,7 @@ Defaults to: %V = %A - + Remove column(s) Удалить столбец @@ -1078,62 +1079,62 @@ Defaults to: %V = %A - - + + Properties... Свойства... - - + + Recompute Пересчитать - - + + Bind... Связать... - - + + Configuration table... Таблица конфигурации... - - + + Merge cells Объединить ячейки - - + + Split cells Разделить ячейки - - + + Cut Обрезать - - + + Copy Скопировать - - + + Paste Вставить - - + + Delete Удалить @@ -1141,12 +1142,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Экспорт в PDF - + PDF file Файл PDF @@ -1177,7 +1178,7 @@ Defaults to: %V = %A Py - + Unnamed Безымянный diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts index ce8145b973..d249e8e47f 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sl.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Preglednica - + Create spreadsheet Ustvari preglednico - + Create a new spreadsheet Ustvari novo preglednico @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Preglednica - + Align bottom Poravnaj na dno - + Bottom-align contents of selected cells Poravnaj vsebino izbranih polj na dno @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Preglednica - + Align center Poravnaj na sredino - + Center-align contents of selected cells Poravnaj vsebino izbranih polj na sredino @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Preglednica - + Align left Poravnaj levo - + Left-align contents of selected cells Poravnaj vsebino izbranih polj levo @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Preglednica - + Align right Poravnaj desno - + Right-align contents of selected cells Poravnaj vsebino izbranih polj desno @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Preglednica - + Align top Poravnaj na vrh - + Top-align contents of selected cells Poravnaj vsebino izbranih polj na vrh @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Preglednica - + Vertically center-align Sredinso poravnaj po navpičnici - + Vertically center-align contents of selected cells Poravnaj po navpičnici vsebino izbranih polj na sredino @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Preglednica - + Export spreadsheet Izvozi preglednico - + Export spreadsheet to CSV file Izvozi preglednico v datoteko CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Preglednica - + Import spreadsheet Uvozi preglednico - + Import CSV file into spreadsheet Uvozi datoteko CSV v preglednico @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Preglednica - + Set alias Nastavi vzdevek - + Set alias for selected cell Nastavi izbranemu polju vzdevek @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Preglednica - + Split cell Razcepi polja - + Split previously merged cells Razcepi predhodno združena polja @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Preglednica - + Bold text Krepko besedilo - + Set text in selected cells bold Nastavi besedilo v izbranih poljih na krepko @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Preglednica - + Italic text Ležeče besedilo - + Set text in selected cells italic Nastavi besedilo v izbranih poljih na ležeče @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Preglednica - + Underline text Podčrtaj besedilo - + Underline text in selected cells Podčrtano besedilo v izbranih poljih @@ -282,106 +282,106 @@ Command - + Merge cells Združi polja - + Split cell Razcepi polja - + Left-align cell Levo poravnavanje polja - + Center cell Sredinjenje polja - + Right-align cell Desno poravnavanje polja - + Top-align cell Gornje poravnavanje polja - + Bottom-align cell Spodnje poravnavanje polja - + Vertically center cells Sredinjenje polj po navpičnici - + Set bold text Nastavi na krepko besedilo - + Set italic text Nastavi na ležeče besedilo - + Set underline text Nastavi na podčrtano besedilo - + Create Spreadsheet Ustvari preglednico - + Set cell properties Nastavi lastnosti polja - + Edit cell Uredi polje - - + + Insert rows Vstavi vrstice - - + + Remove rows Odstrani vrstice - - + + Insert columns Vstavi stolpce - - + + Clear cell(s) Počisti polje (i, a) - + Set foreground color Nastavi barvo ospredja - + Set background color Nastavi barvo ozadja @@ -678,67 +678,67 @@ nastavitve oblikovanja. Če še ne obstaja, bo lastnost ustvarjena. QObject - - + + All (*) Vse (*) - + Import file Uvozi datoteko - + Export file Izvozi datoteko - + Show spreadsheet Prikaži preglednico - - + + Set cell(s) foreground color Nastavi barvo pisave polij - + Sets the Spreadsheet cell(s) foreground color Nastavi barvo pisave v poljih preglednice - - + + Set cell(s) background color Nastavi barvo ozadja polij - + Sets the Spreadsheet cell(s) background color Nastavi barvo ozadja polij v preglednici - + Copy & Paste failed Kopiranje in Lepljenje spodletelo - + Alias contains invalid characters! Vzdevek vsebuje neveljavne znake! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Na polje se sklicuj z vzdevkom, npr. Preglednica.ime_ki_sem_ga_določil namesto Preglednica.B1 - + Spreadsheet Preglednica @@ -877,12 +877,12 @@ Preglednica.ime_ki_sem_ga_določil namesto Preglednica.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Poveži polja - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -891,19 +891,19 @@ Do you want to continue? Ali želite nadaljevati? - + Bind Spreadsheet Cells Veži polja preglednice - + Error: - Napaka: + Error: - + Unbind cells Razveži polja @@ -987,12 +987,12 @@ Privzeto: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Nastavi nastavitveno preglednico - + Unsetup configuration table Razveljavi nastavitveno preglednico @@ -1000,7 +1000,7 @@ Privzeto: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Vstavi zgoraj %n vrsto @@ -1010,7 +1010,7 @@ Privzeto: %V = %A - + Insert %n row(s) below Vstavi spodaj %n vrsto @@ -1020,7 +1020,7 @@ Privzeto: %V = %A - + Insert %n non-contiguous rows Vstavi %n nezvezno vrstico @@ -1030,7 +1030,7 @@ Privzeto: %V = %A - + Remove row(s) Odstrani vrstico @@ -1040,7 +1040,7 @@ Privzeto: %V = %A - + Insert %n column(s) left Vstavi %n stolpec levo @@ -1050,7 +1050,7 @@ Privzeto: %V = %A - + Insert %n column(s) right Vstavi %n stolpec desno @@ -1060,7 +1060,7 @@ Privzeto: %V = %A - + Insert %n non-contiguous columns Vstavi %n nezvezen stolpec @@ -1070,7 +1070,7 @@ Privzeto: %V = %A - + Remove column(s) Odstrani stolpec @@ -1080,62 +1080,62 @@ Privzeto: %V = %A - - + + Properties... Lastnosti … - - + + Recompute Preračunaj - - + + Bind... Poveži ... - - + + Configuration table... Nastavitvena preglednica ... - - + + Merge cells Združi polja - - + + Split cells Razdeli polja - - + + Cut Izreži - - + + Copy Kopiraj - - + + Paste Prilepi - - + + Delete Izbriši @@ -1143,12 +1143,12 @@ Privzeto: %V = %A SpreadsheetGui::SheetView - + Export PDF Izvozi v PDF - + PDF file PDF datoteka @@ -1179,7 +1179,7 @@ Privzeto: %V = %A Py - + Unnamed Neimenovan diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts index f66fb9a32c..f0061fa1ac 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr-CS.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Tabela - + Create spreadsheet Napravi tabelu - + Create a new spreadsheet Napravi novu tabelu @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Tabela - + Align bottom Poravnaj dole - + Bottom-align contents of selected cells Poravnaj na dole sadržaj odabranih ćelija @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Tabela - + Align center Poravnaj po sredini - + Center-align contents of selected cells Poravnaj po sredini sadržaj odabranih ćelija @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Tabela - + Align left Poravnaj levo - + Left-align contents of selected cells Poravnaj na levo sadržaj odabranih ćelija @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Tabela - + Align right Poravnaj deсno - + Right-align contents of selected cells Poravnaj na desno sadržaj odabranih ćelija @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Tabela - + Align top Poravnaj gore - + Top-align contents of selected cells Poravnaj na gore sadržaj odabranih ćelija @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Tabela - + Vertically center-align Vertikalno poravnaj po sredini - + Vertically center-align contents of selected cells Poravnaj vertikalno po sredini sadržaj odabranih ćelija @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Tabela - + Export spreadsheet Izvezi tabelu - + Export spreadsheet to CSV file Izvezi tabelu u CSV datoteku @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Tabela - + Import spreadsheet Uvezi tabelu - + Import CSV file into spreadsheet Uvezi CSV datoteku u tabelu @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Tabela - + Set alias Zadaj alternativno ime - + Set alias for selected cell Podesi alternativno ime za izabrane ćelije @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Tabela - + Split cell Podeli ćeliju - + Split previously merged cells Podelite prethodno objedinjene ćelije @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Tabela - + Bold text Podebljan tekst - + Set text in selected cells bold Postavite podebljani tekst u izabranim ćelijama @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Tabela - + Italic text Iskošeni tekst - + Set text in selected cells italic Postavite iskošeni tekst u izabranim ćelijama @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Tabela - + Underline text Podvučeni tekst - + Underline text in selected cells Podvucite tekst u izabranim ćelijama @@ -282,106 +282,106 @@ Command - + Merge cells Objedini ćelije - + Split cell Podeli ćeliju - + Left-align cell Poravnaj ćeliju nalevo - + Center cell Centriraj ćeliju - + Right-align cell Poravnaj ćeliju nadesno - + Top-align cell Poravnaj ćeliju nagore - + Bottom-align cell Poravnaj ćeliju nadole - + Vertically center cells Vertikalno centriraj ćelije - + Set bold text Podesi podebljan tekst - + Set italic text Podesi iskošeni tekst - + Set underline text Podesi podvučeni tekct - + Create Spreadsheet Napravi tabelu - + Set cell properties Podesi osobine ćelije - + Edit cell Uredi ćeliju - - + + Insert rows Umetni redove - - + + Remove rows Ukloni redove - - + + Insert columns Umetni kolonu - - + + Clear cell(s) Očisti ćeliju(e) - + Set foreground color Podesi boju prvog plana - + Set background color Podesi boju pozadine @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Sve (*) - + Import file Uvezi datoteku - + Export file Izvezi datoteku - + Show spreadsheet Prikaži tabelu - - + + Set cell(s) foreground color Podesi boju prvog plana ćelije - + Sets the Spreadsheet cell(s) foreground color Podesi boju prvog plana ćelije tabele - - + + Set cell(s) background color Podesi boju pozadine ćelije - + Sets the Spreadsheet cell(s) background color Podesi boju pozadine ćelije tabele - + Copy & Paste failed Kopiranje i nalepljivanje nije uspelo - + Alias contains invalid characters! Alternativno ime sadrži neispravne znake! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Na primer, pozivaj se na ćeliju po alternativnom imenu Spreadsheet.moje_alternativno_ime umesto Spreadsheet.B1 - + Spreadsheet Tabela @@ -879,12 +879,12 @@ Spreadsheet.moje_alternativno_ime umesto Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Poveži ćelije - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Da li želiš da nastaviš? - + Bind Spreadsheet Cells Poveži ćelije tabele - + Error: - Greška: + Error: - + Unbind cells Odveži ćelije @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Postavka konfiguracione tabele - + Unsetup configuration table Poništi postavku konfiguracione tabele @@ -1002,7 +1002,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Umetni %n red(ova) iznad @@ -1011,7 +1011,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Umetni %n red(ova) ispod @@ -1020,7 +1020,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Umetni %n nesusednih redova @@ -1029,7 +1029,7 @@ Defaults to: %V = %A - + Remove row(s) Ukloni red(ove) @@ -1038,7 +1038,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Umetni %n kolonu(a) levo @@ -1047,7 +1047,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Umetni %n kolonu(a) desno @@ -1056,7 +1056,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Umetni %n nesusednih kolona @@ -1065,7 +1065,7 @@ Defaults to: %V = %A - + Remove column(s) Ukloni kolonu(e) @@ -1074,62 +1074,62 @@ Defaults to: %V = %A - - + + Properties... Osobine... - - + + Recompute Ponovo izračunaj - - + + Bind... Poveži... - - + + Configuration table... Konfiguraciona tabela... - - + + Merge cells Objedini ćelije - - + + Split cells Podeli ćelije - - + + Cut Isecanje - - + + Copy Kopiraj - - + + Paste Nalepi - - + + Delete Obriši @@ -1137,12 +1137,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Izvezi PDF - + PDF file PDF datoteka @@ -1173,7 +1173,7 @@ Defaults to: %V = %A Py - + Unnamed Bez imena diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts index 59b8aa2675..fe9d517976 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sr.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Табела - + Create spreadsheet Направи табелу - + Create a new spreadsheet Направи нову табелу @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Табела - + Align bottom Поравнај доле - + Bottom-align contents of selected cells Поравнај на доле cадржај одабраних ћелија @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Табела - + Align center Поравнај по средини - + Center-align contents of selected cells Поравнај по средини cадржај одабраних ћелија @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Табела - + Align left Поравнај лево - + Left-align contents of selected cells Поравнај на лево cадржај одабраних ћелија @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Табела - + Align right Поравнај деcно - + Right-align contents of selected cells Поравнај на десно cадржај одабраних ћелија @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Табела - + Align top Поравнај горе - + Top-align contents of selected cells Поравнај на горе cадржај одабраних ћелија @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Табела - + Vertically center-align Вертикално поравнај по средини - + Vertically center-align contents of selected cells Поравнај вертикално по средини cадржај одабраних ћелија @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Табела - + Export spreadsheet Извези табелу - + Export spreadsheet to CSV file Извези табелу у CSV датотеку @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Табела - + Import spreadsheet Увези табелу - + Import CSV file into spreadsheet Увези CSV датотеку у табелу @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Табела - + Set alias Подеси алтернативно име - + Set alias for selected cell Подеси алтернативно име за изабране ћелије @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Табела - + Split cell Подели ћелију - + Split previously merged cells Подели претходно обједињене ћелије @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Табела - + Bold text Подебљан текст - + Set text in selected cells bold Задај подебљани текст у изабраним ћелијама @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Табела - + Italic text Искошени текст - + Set text in selected cells italic Задај искошени текст у изабраним ћелијама @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Табела - + Underline text Подвучени текcт - + Underline text in selected cells Подвуците текст у изабраним ћелијама @@ -282,106 +282,106 @@ Command - + Merge cells Обједини ћелије - + Split cell Подели ћелију - + Left-align cell Поравнај ћелију налево - + Center cell Центрирај ћелију - + Right-align cell Поравнај ћелију надесно - + Top-align cell Поравнај ћелију нагоре - + Bottom-align cell Поравнај ћелију надоле - + Vertically center cells Вертикално центрирај ћелије - + Set bold text Подеси подебљан текст - + Set italic text Подеси искошени текст - + Set underline text Подеси подвучени текcт - + Create Spreadsheet Направи табелу - + Set cell properties Подеси особине ћелије - + Edit cell Уреди ћелију - - + + Insert rows Уметни редове - - + + Remove rows Уклони редове - - + + Insert columns Уметни колону - - + + Clear cell(s) Очисти ћелију(е) - + Set foreground color Подеси боју првог плана - + Set background color Подеси боју позадине @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Све (*) - + Import file Увези датотеку - + Export file Извези датотеку - + Show spreadsheet Прикажи табелу - - + + Set cell(s) foreground color Подеси боју првог плана ћелије - + Sets the Spreadsheet cell(s) foreground color Подеси боју првог плана ћелије табеле - - + + Set cell(s) background color Подеси боју позадине ћелије - + Sets the Spreadsheet cell(s) background color Подеси боју позадине ћелије табеле - + Copy & Paste failed Копирање и налепљивање није успело - + Alias contains invalid characters! Алтернативно име садржи неисправне знаке! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 На пример, позивај се на ћелију по алтернативном имену Spreadsheet.моје_алтернативно_име уместо Spreadsheet.B1 - + Spreadsheet Табела @@ -879,12 +879,12 @@ Spreadsheet.моје_алтернативно_име уместо Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Повежи ћелије - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Да ли желиш да наставиш? - + Bind Spreadsheet Cells Повежи ћелије табеле - + Error: - Грешка: + Error: - + Unbind cells Одвежи ћелије @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Поставка конфигурационе табеле - + Unsetup configuration table Поништи поставку конфигурационе табеле @@ -1002,7 +1002,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Уметни %n ред(ова) изнад @@ -1011,7 +1011,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Уметни %n ред(ова) испод @@ -1020,7 +1020,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Уметни %n несуседних редова @@ -1029,7 +1029,7 @@ Defaults to: %V = %A - + Remove row(s) Уклони ред(ове) @@ -1038,7 +1038,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Уметни %n колону(а) лево @@ -1047,7 +1047,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Уметни %n колону(а) десно @@ -1056,7 +1056,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Уметни %n несуседних колона @@ -1065,7 +1065,7 @@ Defaults to: %V = %A - + Remove column(s) Уклони колону(е) @@ -1074,62 +1074,62 @@ Defaults to: %V = %A - - + + Properties... Оcобине... - - + + Recompute Поново израчунај - - + + Bind... Повежи... - - + + Configuration table... Конфигурациона табела... - - + + Merge cells Обједини ћелије - - + + Split cells Подели ћелије - - + + Cut Исецање - - + + Copy Копирај - - + + Paste Налепи - - + + Delete Обриши @@ -1137,12 +1137,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Извези PDF - + PDF file PDF датотека @@ -1173,7 +1173,7 @@ Defaults to: %V = %A Py - + Unnamed Без имена diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts index 6838d8c497..91e77d865d 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_sv-SE.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Kalkylark - + Create spreadsheet Skapa kalkylark - + Create a new spreadsheet Skapa ett nytt kalkylark @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Kalkylark - + Align bottom Bottenjustera - + Bottom-align contents of selected cells Bottenjustera innehållet i markerade celler @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Kalkylark - + Align center Centrera - + Center-align contents of selected cells Centrera innehållet i markerade celler @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Kalkylark - + Align left Vänsterjustera - + Left-align contents of selected cells Vänsterjustera innehållet i markerade celler @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Kalkylark - + Align right Högerjustera - + Right-align contents of selected cells Högerjustera innehållet i markerade celler @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Kalkylark - + Align top Toppjustera - + Top-align contents of selected cells Toppjustera innehållet i markerade celler @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Kalkylark - + Vertically center-align Centrera vertikalt - + Vertically center-align contents of selected cells Centrera innehållet i markerade celler vertikalt @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Kalkylark - + Export spreadsheet Exportera kalkylark - + Export spreadsheet to CSV file Exportera kalkylark till CSV-fil @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Kalkylark - + Import spreadsheet Importera kalkylark - + Import CSV file into spreadsheet Importera CSV-fil till kalkylark @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Kalkylark - + Set alias Ange alias - + Set alias for selected cell Ange alias för markerad cell @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Kalkylark - + Split cell Dela cell - + Split previously merged cells Dela sammanslagna celler @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Kalkylark - + Bold text Fet text - + Set text in selected cells bold Gör texten i markerade celler fet @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Kalkylark - + Italic text Kursiv text - + Set text in selected cells italic Gör texten i markerade celler kursiv @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Kalkylark - + Underline text Understruken text - + Underline text in selected cells Gör texten i markerade celler understruken @@ -282,106 +282,106 @@ Command - + Merge cells Sammanfoga celler - + Split cell Dela cell - + Left-align cell Vänsterjustera cell - + Center cell Centrera cell - + Right-align cell Högerjustera cell - + Top-align cell Toppjustera cell - + Bottom-align cell Bottenjustera cell - + Vertically center cells Centrera celler vertikalt - + Set bold text Ställ in fet stil - + Set italic text Ställ in kursiv text - + Set underline text Ställ in understruken text - + Create Spreadsheet Skapa kalkylark - + Set cell properties Ange cellegenskaper - + Edit cell Redigera cell - - + + Insert rows Infoga rader - - + + Remove rows Ta bort rader - - + + Insert columns Infoga kolumner - - + + Clear cell(s) Rensa cell(er) - + Set foreground color Ställ in förgrundsfärg - + Set background color Ställ in bakgrundsfärg @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Alla (*) - + Import file importera fil - + Export file Exportera fil - + Show spreadsheet Visa kalkylark - - + + Set cell(s) foreground color Ange förgrundsfärg för cell(er) - + Sets the Spreadsheet cell(s) foreground color Anger förgrundsfärgen för cellen/cellerna - - + + Set cell(s) background color Ange bakgrundsfärg för cell(er) - + Sets the Spreadsheet cell(s) background color Anger bakgrundsfärgen för cellen/cellerna - + Copy & Paste failed Kopiera och klistra in misslyckades - + Alias contains invalid characters! Alias innehåller ogiltiga tecken! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Referera till cellen via alias, till exempel Spreadsheet.my_alias_name, istället för Spreadsheet.B1 - + Spreadsheet Kalkylark @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name, istället för Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,7 +1002,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insert %n row(s) above @@ -1010,7 +1010,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Insert %n row(s) below @@ -1018,7 +1018,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Insert %n non-contiguous rows @@ -1026,7 +1026,7 @@ Defaults to: %V = %A - + Remove row(s) Remove row(s) @@ -1034,7 +1034,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Insert %n column(s) left @@ -1042,7 +1042,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Infoga %n kolumn(er) till höger @@ -1050,7 +1050,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Infoga %n icke angränsande kolumner @@ -1058,7 +1058,7 @@ Defaults to: %V = %A - + Remove column(s) Ta bort kolumn @@ -1066,62 +1066,62 @@ Defaults to: %V = %A - - + + Properties... Egenskaper... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells Sammanfoga celler - - + + Split cells Split cells - - + + Cut Klipp - - + + Copy Kopiera - - + + Paste Klistra in - - + + Delete Radera @@ -1129,12 +1129,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Exportera PDF - + PDF file PDF-fil @@ -1165,7 +1165,7 @@ Defaults to: %V = %A Py - + Unnamed Namnlös diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts index ec453552da..ec3d43dd0a 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_tr.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Hesap Tablosu - + Create spreadsheet Yeni hesap tablosu oluştur - + Create a new spreadsheet Yeni bir hesap tablosu oluştur @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Hesap Tablosu - + Align bottom Alta hizala - + Bottom-align contents of selected cells Seçilen hücrelerin içeriğini aşağıdan hizala @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Hesap Tablosu - + Align center Ortaya hizala - + Center-align contents of selected cells Seçilen hücrelerin içeriğini ortadan hizala @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Hesap Tablosu - + Align left Sola hizala - + Left-align contents of selected cells Seçilen hücrelerin içeriğini soldan hizala @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Hesap Tablosu - + Align right Sağa hizala - + Right-align contents of selected cells Seçilen hücrelerin içeriğini sağdan hizala @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Hesap Tablosu - + Align top Üste hizala - + Top-align contents of selected cells Seçilen hücrelerin içeriğini üstten hizala @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Hesap Tablosu - + Vertically center-align Dikeyde ortala - + Vertically center-align contents of selected cells Seçilen hücrelerin içeriğini dikey olarak merkeze hizalayın @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Hesap Tablosu - + Export spreadsheet Hesap tablosunu dışa aktar - + Export spreadsheet to CSV file Hesap tablosunu CSV dosyasına aktar @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Hesap Tablosu - + Import spreadsheet Hesap tablosunu içe aktar - + Import CSV file into spreadsheet CSV dosyasını hesap tablosuna (içe) aktar @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Hesap Tablosu - + Set alias Takma ad ayarla - + Set alias for selected cell Seçilen hücreler için takma ad ayarla @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Hesap Tablosu - + Split cell Hücreyi Böl - + Split previously merged cells Daha önce birleştirilmiş hücreleri Böl @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Hesap Tablosu - + Bold text Kalın metin - + Set text in selected cells bold Seçili hücrelerdeki metni kalın olarak ayarla @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Hesap Tablosu - + Italic text İtalik metin - + Set text in selected cells italic Seçili hücrelerdeki metni italik olarak ayarla @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Hesap Tablosu - + Underline text Altı çizili metin - + Underline text in selected cells Seçili hücrelerde metnin altını çiz @@ -282,106 +282,106 @@ Command - + Merge cells Hücreleri birleştir - + Split cell Hücreyi Böl - + Left-align cell Sola hizalı hücre - + Center cell Ortala - + Right-align cell Sağa hizalı hücre - + Top-align cell Yukarı hizalı hücre - + Bottom-align cell Aşağı hizalı hücre - + Vertically center cells Hücreleri dikey olarak ortala - + Set bold text Metni kalınlaştır - + Set italic text Metni eğimle - + Set underline text Metnin altını çiz - + Create Spreadsheet Elektronik Tablo Oluştur - + Set cell properties Hücre özelliklerini ayarla - + Edit cell Hücreyi düzenle - - + + Insert rows Satır ekle - - + + Remove rows Satır sil - - + + Insert columns Sütun ekle - - + + Clear cell(s) Hücreyi(leri) temizle - + Set foreground color Ön plan rengini ayarla - + Set background color Arka plan rengini ayarla @@ -680,66 +680,66 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Tümü (*) - + Import file Dosyayı içe aktar - + Export file Dosyayı Dışarı Aktar - + Show spreadsheet Hesap tablosunu göster - - + + Set cell(s) foreground color Hücre (ler) ön plan rengini ayarla - + Sets the Spreadsheet cell(s) foreground color Hesap tablo hücre(ler) inin ön plan rengini ayarlar - - + + Set cell(s) background color Hücre (ler) arka plan rengini ayarla - + Sets the Spreadsheet cell(s) background color Hesap tablosu hücre(ler) inin arka plan rengini ayarlar - + Copy & Paste failed Kopyala Yapıştır başarısız oldu - + Alias contains invalid characters! Alias geçersiz karakterler içeriyor! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Hücreye alias'lı bir isim atayın, örneğin Spreadsheet.B1 yerine Spreadsheet.my_alias_name - + Spreadsheet Hesap Tablosu @@ -877,12 +877,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Hücreleri bağla - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -891,19 +891,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells E -tablo hücrelerini bağlayın - + Error: - Hata: + Error: - + Unbind cells Hücrelerin bağlantısını kaldır @@ -987,12 +987,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Kurulum yapılandırma tablosu - + Unsetup configuration table Kurulum kaldırma yapılandırma tablosu @@ -1000,7 +1000,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Üste %n satır ekle @@ -1008,7 +1008,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Alta %n satır ekle @@ -1016,7 +1016,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Bitişik olmayan %n satır ekle @@ -1024,7 +1024,7 @@ Defaults to: %V = %A - + Remove row(s) Satır(lar) ı sil @@ -1032,7 +1032,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Sola %n sütun(lar) ekle @@ -1040,7 +1040,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Sağa %n sütun(lar) ekle @@ -1048,7 +1048,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Bitişik olmayan %n sütun ekle @@ -1056,7 +1056,7 @@ Defaults to: %V = %A - + Remove column(s) Sütun(lar) kaldır @@ -1064,62 +1064,62 @@ Defaults to: %V = %A - - + + Properties... Özellikler... - - + + Recompute Yeniden hesapla - - + + Bind... Bağla... - - + + Configuration table... Yapılandırma tablosu... - - + + Merge cells Hücreleri birleştir - - + + Split cells Bölünmüş hücreler - - + + Cut Kes - - + + Copy Kopyala - - + + Paste Yapıştır - - + + Delete Sil @@ -1127,12 +1127,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF PDF olarak dışa aktar - + PDF file PDF dosyası @@ -1163,7 +1163,7 @@ Defaults to: %V = %A Py - + Unnamed Adsız diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts index 2a287e97d5..387df89243 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_uk.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Таблиця - + Create spreadsheet Створити таблицю - + Create a new spreadsheet Створює нову таблицю @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Таблиця - + Align bottom Вирівняти знизу - + Bottom-align contents of selected cells Вирівнює вміст виділених комірок знизу @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Таблиця - + Align center Вирівняти у центрі - + Center-align contents of selected cells Вирівнює вміст виділених комірок у центрі @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Таблиця - + Align left Вирівняти ліворуч - + Left-align contents of selected cells Вирівнює ліворуч вміст виділених комірок @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Таблиця - + Align right Вирівняти праворуч - + Right-align contents of selected cells Вирівнює праворуч вміст виділених комірок @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Таблиця - + Align top Вирівняти вгорі - + Top-align contents of selected cells Вирівнює вміст виділених комірок вгорі @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Таблиця - + Vertically center-align Вертикальне вирівнювання по центру - + Vertically center-align contents of selected cells Вирівнює вміст виділених комірок вертикально у центрі @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Таблиця - + Export spreadsheet Експортувати таблицю - + Export spreadsheet to CSV file Експортує таблицю у CSV-файл @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Таблиця - + Import spreadsheet Імпортувати таблицю - + Import CSV file into spreadsheet Імпортує CSV-файл у таблицю @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Таблиця - + Set alias Встановити псевдонім - + Set alias for selected cell Встановлює псевдонім для виділеної комірки @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Таблиця - + Split cell Роз'єднати комірку - + Split previously merged cells Роз'єднує раніше обʼєднані комірки @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Таблиця - + Bold text Зробити текст жирним - + Set text in selected cells bold Робить текст у виділених комірках жирним шрифтом @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Таблиця - + Italic text Зробити текст курсивом - + Set text in selected cells italic Робить текст у виділених комірках курсивом @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Таблиця - + Underline text Зробити текст підкресленим - + Underline text in selected cells Робить текст у виділених комірках підкресленим @@ -282,106 +282,106 @@ Command - + Merge cells Об'єднати комірки - + Split cell Роз'єднати комірку - + Left-align cell Вирівнювання ліворуч - + Center cell Вирівнювання по центру - + Right-align cell Вирівнювання праворуч - + Top-align cell Вирівнювання по верхньому краю - + Bottom-align cell Вирівнювання по нижньому краю - + Vertically center cells Вирівнювання вертикально по центру - + Set bold text Зробити текст напівжирним - + Set italic text Зробити текст курсивом - + Set underline text Підкреслити текст - + Create Spreadsheet Створити таблицю - + Set cell properties Зміна властивостей комірок - + Edit cell Редагування комірки - - + + Insert rows Вставити рядки - - + + Remove rows Видалити рядки - - + + Insert columns Вставити стовпці - - + + Clear cell(s) Очистити комірку(и) - + Set foreground color Вибір кольору переднього плану - + Set background color Вибір кольору фону @@ -679,67 +679,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Всі (*) - + Import file Імпорт файлу - + Export file Експорт файлу - + Show spreadsheet Показати таблицю - - + + Set cell(s) foreground color Встановити колір переднього плану комірки(ок) - + Sets the Spreadsheet cell(s) foreground color Встановлює колір переднього плану комірки(ок) таблиці - - + + Set cell(s) background color Встановити фоновий колір комірки(ок) - + Sets the Spreadsheet cell(s) background color Встановити фоновий колір комірки(ок) таблиці - + Copy & Paste failed Копіювання і вставка завершилась невдачею - + Alias contains invalid characters! Псевдонім містить некоректні символи! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Зверніться до комірки за псевдонімом, наприклад Spreadsheet.my_alias_name замість Spreadsheet.B1 - + Spreadsheet Таблиця @@ -878,12 +878,12 @@ Spreadsheet.my_alias_name замість Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Звʼязати комірки - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -892,19 +892,19 @@ Do you want to continue? Бажаєте продовжити? - + Bind Spreadsheet Cells Звʼязування комірок таблиці - + Error: - Помилка: + Error: - + Unbind cells Відвʼязати комірки @@ -988,12 +988,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Створити Таблицю Конфігурацій - + Unsetup configuration table Видалити таблицю конфігурацій @@ -1001,7 +1001,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Вставити %n рядок(ів) вище @@ -1011,7 +1011,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Вставити %n рядок нижче @@ -1021,7 +1021,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Вставити %n несуміжний рядок @@ -1031,7 +1031,7 @@ Defaults to: %V = %A - + Remove row(s) Видалити рядок @@ -1041,7 +1041,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Вставити %n стовпець ліворуч @@ -1051,7 +1051,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Вставити %n стовпець праворуч @@ -1061,7 +1061,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Вставити %n несуміжний стовпець @@ -1071,7 +1071,7 @@ Defaults to: %V = %A - + Remove column(s) Видалити стовпець @@ -1081,62 +1081,62 @@ Defaults to: %V = %A - - + + Properties... Властивості... - - + + Recompute Переобчислити - - + + Bind... Привʼязати... - - + + Configuration table... Таблиця Конфігурації... - - + + Merge cells Об'єднати комірки - - + + Split cells Розʼєднати комірки - - + + Cut Вирізати - - + + Copy Копіювати - - + + Paste Вставити - - + + Delete Видалити @@ -1144,12 +1144,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Експорт в PDF - + PDF file PDF-файл @@ -1180,7 +1180,7 @@ Defaults to: %V = %A Py - + Unnamed Без назви diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts index eb8554b4e3..c4dc0d7119 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_val-ES.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet Full de càlcul - + Create spreadsheet Crea un full de càlcul - + Create a new spreadsheet Crea un full de càlcul nouj @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet Full de càlcul - + Align bottom Alinea a la part inferior - + Bottom-align contents of selected cells Alineació a la part inferior del contingut de les cel·les seleccionades @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet Full de càlcul - + Align center Alinea al centre - + Center-align contents of selected cells Alineació al centre del contingut de les cel·les seleccionades @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet Full de càlcul - + Align left Alinea a l'esquerra - + Left-align contents of selected cells Alineació a l'equerra del contingut de les cel·les seleccionades @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet Full de càlcul - + Align right Alinea a la dreta - + Right-align contents of selected cells Alineació a la dreta del contingut de les cel·les seleccionades @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet Full de càlcul - + Align top Alinea a la part superior - + Top-align contents of selected cells Alineació a la part superior del contingut de les cel·les seleccionades @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet Full de càlcul - + Vertically center-align Alinea al centre verticalment - + Vertically center-align contents of selected cells Alineació vertical i centrada dels continguts de les cel·les seleccionades @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet Full de càlcul - + Export spreadsheet Exporta el full de càlcul - + Export spreadsheet to CSV file Exporta el full de càlcul a CSV @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet Full de càlcul - + Import spreadsheet Importa el full de càlcul - + Import CSV file into spreadsheet Importa el fitxer CSV a un full de càlcul @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet Full de càlcul - + Set alias Estableix l'àlies - + Set alias for selected cell Estableix l'àlies per a les cel·les seleccionades @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet Full de càlcul - + Split cell Divideix la cel·la - + Split previously merged cells Divideix les cel·les prèviament fusionades @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet Full de càlcul - + Bold text Text en negreta - + Set text in selected cells bold Estableix el text en negreta en les cel·les seleccionades @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet Full de càlcul - + Italic text Text en cursiva - + Set text in selected cells italic Estableix el text en cursiva en les cel·les seleccionades @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet Full de càlcul - + Underline text Text subratllat - + Underline text in selected cells Subratlla el text en les cel·les seleccionades @@ -282,106 +282,106 @@ Command - + Merge cells Fusiona les cel·les - + Split cell Divideix la cel·la - + Left-align cell Left-align cell - + Center cell Center cell - + Right-align cell Right-align cell - + Top-align cell Top-align cell - + Bottom-align cell Bottom-align cell - + Vertically center cells Vertically center cells - + Set bold text Set bold text - + Set italic text Set italic text - + Set underline text Set underline text - + Create Spreadsheet Create Spreadsheet - + Set cell properties Set cell properties - + Edit cell Edit cell - - + + Insert rows Insereix files - - + + Remove rows Suprimeix files - - + + Insert columns Insereix columnes - - + + Clear cell(s) Clear cell(s) - + Set foreground color Set foreground color - + Set background color Set background color @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) Tot (*) - + Import file Importa el fitxer - + Export file Exporta el fitxer - + Show spreadsheet Mostra el full de càlcul - - + + Set cell(s) foreground color Estableix el color de primer pla de la cel·la(es) - + Sets the Spreadsheet cell(s) foreground color Estableix el color de primer pla de la cel·la(es) del full de càlcul - - + + Set cell(s) background color Estableix el color de fons de la cel·la(es) - + Sets the Spreadsheet cell(s) background color Estableix el color de fons de la cel·la(es) del full de càlcul - + Copy & Paste failed S'ha produït un error en copiar i apegar - + Alias contains invalid characters! Alias contains invalid characters! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 - + Spreadsheet Full de càlcul @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name instead of Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,7 +1002,7 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insert %n row(s) above @@ -1010,7 +1010,7 @@ Defaults to: %V = %A - + Insert %n row(s) below Insert %n row(s) below @@ -1018,7 +1018,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous rows Insert %n non-contiguous rows @@ -1026,7 +1026,7 @@ Defaults to: %V = %A - + Remove row(s) Remove row(s) @@ -1034,7 +1034,7 @@ Defaults to: %V = %A - + Insert %n column(s) left Insert %n column(s) left @@ -1042,7 +1042,7 @@ Defaults to: %V = %A - + Insert %n column(s) right Insert %n column(s) right @@ -1050,7 +1050,7 @@ Defaults to: %V = %A - + Insert %n non-contiguous columns Insert %n non-contiguous columns @@ -1058,7 +1058,7 @@ Defaults to: %V = %A - + Remove column(s) Remove column(s) @@ -1066,62 +1066,62 @@ Defaults to: %V = %A - - + + Properties... Propietats... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells Fusiona les cel·les - - + + Split cells Split cells - - + + Cut Retalla - - + + Copy Copia - - + + Paste Apega - - + + Delete Elimina @@ -1129,12 +1129,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF Exporta a PDF - + PDF file Fitxer PDF @@ -1165,7 +1165,7 @@ Defaults to: %V = %A Py - + Unnamed Sense nom diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts index 1be5a0a8da..bd281e3c7c 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-CN.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet 电子表格 - + Create spreadsheet 创建电子表格 - + Create a new spreadsheet 创建一个新的电子表格 @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet 电子表格 - + Align bottom 底端对齐 - + Bottom-align contents of selected cells 底端对齐所选单元格的内容 @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet 电子表格 - + Align center 居中对齐 - + Center-align contents of selected cells 居中对齐所选单元格的内容 @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet 电子表格 - + Align left 左对齐 - + Left-align contents of selected cells 左对齐选定的单元格的内容 @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet 电子表格 - + Align right 右对齐 - + Right-align contents of selected cells 右对齐所选单元格内容的 @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet 电子表格 - + Align top 顶部对齐 - + Top-align contents of selected cells 顶部对齐所选单元格的内容 @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet 电子表格 - + Vertically center-align 垂直居中对齐 - + Vertically center-align contents of selected cells 竖直居中对齐所选单元格的内容 @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet 电子表格 - + Export spreadsheet 导出的电子表格 - + Export spreadsheet to CSV file 将电子表格导出到 CSV 文件 @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet 电子表格 - + Import spreadsheet 导入电子表格 - + Import CSV file into spreadsheet CSV 文件导入到电子表格 @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet 电子表格 - + Set alias 设置的别名 - + Set alias for selected cell 所选单元格的设置的别名 @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet 电子表格 - + Split cell 拆分单元格 - + Split previously merged cells 分割以前合并的单元格 @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet 电子表格 - + Bold text 粗体文本 - + Set text in selected cells bold 加粗所选单元格内的文本 @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet 电子表格 - + Italic text 斜体文本 - + Set text in selected cells italic 设置所选单元格内的文本为斜体 @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet 电子表格 - + Underline text 给文本加下划线 - + Underline text in selected cells 所选单元格内的文本设置下划线 @@ -282,106 +282,106 @@ Command - + Merge cells 合并单元格 - + Split cell 拆分单元格 - + Left-align cell 左对齐单元格 - + Center cell 居中单元格 - + Right-align cell 右对齐单元格 - + Top-align cell 顶对齐单元格 - + Bottom-align cell 底对齐单元格 - + Vertically center cells 垂直居中对齐单元格 - + Set bold text 设置粗体文本 - + Set italic text 设置斜体文本 - + Set underline text 设置下划线文本 - + Create Spreadsheet 创建工作表 - + Set cell properties 设置单元格属性 - + Edit cell 编辑单元格 - - + + Insert rows 插入行 - - + + Remove rows 删除行 - - + + Insert columns 插入列 - - + + Clear cell(s) 清除单元格 - + Set foreground color 设置前景色 - + Set background color 设置背景颜色 @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) 所有的 (*) - + Import file 导入文件 - + Export file 导出文件 - + Show spreadsheet 显示电子表格 - - + + Set cell(s) foreground color 设置单元格前景色 - + Sets the Spreadsheet cell(s) foreground color 设置电子表格单元格前景色 - - + + Set cell(s) background color 设置单元格的背景色 - + Sets the Spreadsheet cell(s) background color 设置电子表格单元背景色 - + Copy & Paste failed 复制粘贴失败 - + Alias contains invalid characters! 别名包含无效字符! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 通过别名引用单元格,例如用 Spreadsheet.my_alias_name代替Spreadsheet.B1 - + Spreadsheet 电子表格 @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name代替Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells 绑定工作表单元格 - + Error: Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,118 +1002,118 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above 在上方插入 %n 行 - + Insert %n row(s) below 下方插入 %n 行 - + Insert %n non-contiguous rows 插入 %n 行非连续行 - + Remove row(s) 删除行 - + Insert %n column(s) left 在左侧插入 N 列 - + Insert %n column(s) right 在右侧插入 N 列 - + Insert %n non-contiguous columns 插入 %n 列非连续列 - + Remove column(s) 删除列 - - + + Properties... 属性... - - + + Recompute 重新计算 - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells 合并单元格 - - + + Split cells 拆分单元格 - - + + Cut 剪切 - - + + Copy 复制 - - + + Paste 粘贴 - - + + Delete 删除 @@ -1121,12 +1121,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF 导出PDF - + PDF file PDF 文件 @@ -1157,7 +1157,7 @@ Defaults to: %V = %A Py - + Unnamed 未命名 diff --git a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts index c3bc7b43bc..7494f1f846 100644 --- a/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts +++ b/src/Mod/Spreadsheet/Gui/Resources/translations/Spreadsheet_zh-TW.ts @@ -4,17 +4,17 @@ CmdCreateSpreadsheet - + Spreadsheet 試算表 - + Create spreadsheet 建立試算表 - + Create a new spreadsheet 建立一個新的試算表 @@ -22,17 +22,17 @@ CmdSpreadsheetAlignBottom - + Spreadsheet 試算表 - + Align bottom 向下對齊 - + Bottom-align contents of selected cells 所選儲存格之內容向下對齊 @@ -40,17 +40,17 @@ CmdSpreadsheetAlignCenter - + Spreadsheet 試算表 - + Align center 水平中央對齊 - + Center-align contents of selected cells 所選單元之儲存格水平中央對齊 @@ -58,17 +58,17 @@ CmdSpreadsheetAlignLeft - + Spreadsheet 試算表 - + Align left 向左對齊 - + Left-align contents of selected cells 所選儲存格之內容向左對齊 @@ -76,17 +76,17 @@ CmdSpreadsheetAlignRight - + Spreadsheet 試算表 - + Align right 向右對齊 - + Right-align contents of selected cells 所選儲存格之內容以向右對齊 @@ -94,17 +94,17 @@ CmdSpreadsheetAlignTop - + Spreadsheet 試算表 - + Align top 向上對齊 - + Top-align contents of selected cells 所選儲存格之內容向上對齊 @@ -112,17 +112,17 @@ CmdSpreadsheetAlignVCenter - + Spreadsheet 試算表 - + Vertically center-align 垂直中央對齊 - + Vertically center-align contents of selected cells 所選儲存格之內容垂直置中對齊 @@ -130,17 +130,17 @@ CmdSpreadsheetExport - + Spreadsheet 試算表 - + Export spreadsheet 匯出試算表 - + Export spreadsheet to CSV file 匯出試算表為CSV格式 @@ -148,17 +148,17 @@ CmdSpreadsheetImport - + Spreadsheet 試算表 - + Import spreadsheet 匯入試算表 - + Import CSV file into spreadsheet 將CSV檔匯入至試算表 @@ -184,17 +184,17 @@ CmdSpreadsheetSetAlias - + Spreadsheet 試算表 - + Set alias 設定名稱 - + Set alias for selected cell 對所選之儲存格設定名稱 @@ -202,17 +202,17 @@ CmdSpreadsheetSplitCell - + Spreadsheet 試算表 - + Split cell 分割儲存格 - + Split previously merged cells 分割前面合併的儲存格 @@ -220,17 +220,17 @@ CmdSpreadsheetStyleBold - + Spreadsheet 試算表 - + Bold text 粗體 - + Set text in selected cells bold 設定選取的儲存格為粗體字 @@ -238,17 +238,17 @@ CmdSpreadsheetStyleItalic - + Spreadsheet 試算表 - + Italic text 斜體 - + Set text in selected cells italic 設定選取的儲存格為斜體字 @@ -256,17 +256,17 @@ CmdSpreadsheetStyleUnderline - + Spreadsheet 試算表 - + Underline text 文字加上底線 - + Underline text in selected cells 設定選取的儲存格中文字下底線 @@ -282,106 +282,106 @@ Command - + Merge cells 合併儲存格 - + Split cell 分割儲存格 - + Left-align cell 儲存格左邊對齊 - + Center cell 儲存格置中 - + Right-align cell 儲存格右邊對齊 - + Top-align cell 儲存格向上對齊 - + Bottom-align cell 儲存格向下對齊 - + Vertically center cells 儲存格垂直對齊 - + Set bold text 設定粗體樣式 - + Set italic text 設定斜體字 - + Set underline text 設定文字下底線 - + Create Spreadsheet 建立試算表 - + Set cell properties 設定儲存格屬性 - + Edit cell 編輯儲存格 - - + + Insert rows 插入列 - - + + Remove rows 刪除列 - - + + Insert columns 插入欄 - - + + Clear cell(s) 清除儲存格 - + Set foreground color 設定前景顏色 - + Set background color 設定背景顏色 @@ -680,67 +680,67 @@ switch the design configuration. The property will be created if not exist. QObject - - + + All (*) 全部(*) - + Import file 匯入檔案 - + Export file 匯出檔案 - + Show spreadsheet 顯示試算表 - - + + Set cell(s) foreground color 設定儲存格的前景顏色 - + Sets the Spreadsheet cell(s) foreground color 設定試算表儲存格的前景顏色 - - + + Set cell(s) background color 設定儲存格的背景顏色 - + Sets the Spreadsheet cell(s) background color 設定試算表儲存格的背景顏色 - + Copy & Paste failed 複製及貼上失敗 - + Alias contains invalid characters! 別名包含無效字元! - + Refer to cell by alias, for example Spreadsheet.my_alias_name instead of Spreadsheet.B1 參照儲存格使用別名,例如 Spreadsheet.my_alias_name取代Spreadsheet.B1 - + Spreadsheet 試算表 @@ -879,12 +879,12 @@ Spreadsheet.my_alias_name取代Spreadsheet.B1 SpreadsheetGui::DlgBindSheet - + Bind cells Bind cells - + Source and target cell count mismatch. Partial binding may still work. Do you want to continue? @@ -893,19 +893,19 @@ Do you want to continue? Do you want to continue? - + Bind Spreadsheet Cells Bind Spreadsheet Cells - + Error: Error: - + Unbind cells Unbind cells @@ -989,12 +989,12 @@ Defaults to: %V = %A SpreadsheetGui::DlgSheetConf - + Setup configuration table Setup configuration table - + Unsetup configuration table Unsetup configuration table @@ -1002,118 +1002,118 @@ Defaults to: %V = %A SpreadsheetGui::SheetTableView - + Insert %n row(s) above Insert %n row(s) above - + Insert %n row(s) below Insert %n row(s) below - + Insert %n non-contiguous rows Insert %n non-contiguous rows - + Remove row(s) Remove row(s) - + Insert %n column(s) left Insert %n column(s) left - + Insert %n column(s) right Insert %n column(s) right - + Insert %n non-contiguous columns Insert %n non-contiguous columns - + Remove column(s) Remove column(s) - - + + Properties... 屬性... - - + + Recompute Recompute - - + + Bind... Bind... - - + + Configuration table... Configuration table... - - + + Merge cells 合併儲存格 - - + + Split cells Split cells - - + + Cut 切割 - - + + Copy 複製 - - + + Paste 貼上 - - + + Delete 刪除 @@ -1121,12 +1121,12 @@ Defaults to: %V = %A SpreadsheetGui::SheetView - + Export PDF 匯出 PDF - + PDF file PDF 檔 @@ -1157,7 +1157,7 @@ Defaults to: %V = %A Py - + Unnamed 未命名 diff --git a/src/Mod/Start/Gui/DlgStartPreferences.ui b/src/Mod/Start/Gui/DlgStartPreferences.ui index 8b15978a4b..fbbe67a47e 100644 --- a/src/Mod/Start/Gui/DlgStartPreferences.ui +++ b/src/Mod/Start/Gui/DlgStartPreferences.ui @@ -300,6 +300,9 @@ + + Gui::FileChooser::Directory + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage.ts b/src/Mod/Start/Gui/Resources/translations/StartPage.ts index 5e4e4dd6d9..723ad06be7 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage.ts @@ -287,7 +287,7 @@ Workbench - + Start page diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_be.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_be.ts index e4dab3fbfa..2b287ed8ee 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_be.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_be.ts @@ -1,6 +1,304 @@ + + StartPage + + + Start + Пачаць + + + + Welcome to FreeCAD + Вітаем у FreeCAD + + + + Documents + Дакументы + + + + Help + Даведка + + + + Activity + Актыўнасць + + + + Blog + Блог + + + + Link to the FreeCAD blog + Сувязь з блогам FreeCAD + + + + New file + Новы файл + + + + Empty File + Пусты файл + + + + Create an empty FreeCAD file + Стварыць пусты файл FreeCAD + + + + Open File + Адчыніць файл + + + + Open an existing CAD file or 3D model + Адчыніць файл CAD, які існуе, ці трохмерную мадэль + + + + Standard Part + Стандартная дэталь + + + + Create a part with the Part Design workbench + Стварыць дэталь з дапамогай варштату Праектавання дэталі + + + + 2D Draft + Двухмерны чарнавік + + + + Create a 2D draft with the Draft workbench + Стварыць двухмерны чарнавік з дапамогай варштату Чарнавік + + + + BIM/Architecture + BIM/Архітэктура + + + + Create an architecture project + Стварыць архітэктурны праект + + + + Recent files + Апошнія файлы + + + + Tip + Парада + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Адрэгуляваць колькасць апошніх файлаў, якія будуць паказаныя тут, у меню Праўка -> Перавагі -> Агульныя -> Памер спісу апошніх файлаў + + + + Examples + Прыклады + + + + General documentation + Агульная дакументацыя + + + + User hub + Карыстальніцкі цэнтр + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Гэты падзел змяшчае дакументацыю, якая карысная для карыстальнікаў FreeCAD ў цэлым: спіс усіх варштатаў, падрабязныя інструкцыі па ўстаноўкі і ўжыванні праграмы FreeCAD, навучальныя дапаможнікі і ўсё, што вам трэба, для пачатку працы. + + + + Power users hub + Цэнтр дасведчанага карыстальніка + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Гэты падзел змяшчае сабраную дакументацыю для прасунутых карыстальнікаў і людзей, якія зацікаўленыя ў напісанні сцэнараў python. +Вы таксама знойдзеце сховішча макрасаў, інструкцыі па ўстаноўкі і ўжыванні, а таксама дадатковую інфармацыю аб наладцы FreeCAD у адпаведнасці з вашымі канкрэтнымі патрэбамі. + + + + Developers hub + Цэнтр распрацоўшчыкаў + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Гэты падзел змяшчае матэрыялы для распрацоўшчыкаў: як самастойна скампіляваць FreeCAD, як структураваны зыходны код FreeCAD + як у ім арыентавацца, як распрацаваць новыя варштаты і/ці ўбудаваць FreeCAD у вашую ўласную праграму. + + + + Manual + Інструкцыя + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Інструкцыя па FreeCAD - гэта іншы, больш паслядоўны спосаб прадстаўлення інфармацыі, якая змяшчаецца ў гэтай Вікі. Яна створаная для чытання як кніга, і паступова пазнаёміць вас з многімі іншымі старонкамі з папярэдніх падзелаў. + + + + Workbenches documentation + Дакументацыя варштатаў + + + + These are the help pages of all the workbenches currently installed on this computer. + Гэта старонкі даведкі ўсіх варштатаў, якія ўсталяваныя ў бягучы час на гэтым кампутары. + + + + Getting help from the community + Атрымаць дапамогу ад суполкі + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">Форум FreeCAD</a> - выдатнае месца, дзе можна атрымаць дапамогу ад іншых карыстальнікаў і распрацоўшчыкаў FreeCAD. +На форуме ёсць мноства падзелаў для розных тыпаў пытанняў і тэм для абмеркавання. +Калі вы сумняваецеся, напішыце ў больш агульным падзеле <a href="https://forum.freecad.org/viewforum.php?f=3">Дапамога па ўжыванню FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Калі вы ўпершыню публікуеце паведамленне на форуме, спачатку абавязкова <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">прачытайце кіраўніцтва</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD таксама падтрымлівае агульнадаступны <a href="https://www.freecad.org/tracker">Баг-трэкер</a>, дзе кожды жадаючы можа адпраўляць паведамленні пра памылкі і прапанаваць новыя функцыі. +Каб пазбегнуць дадатковай працы і даць найлепшыя шанцы ўбачыць, што ваша памылка вырашаная, пераканайцеся, што вы прачыталі <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">кіраўніцтва па выпраўленні памылак</a> перад публікацыяй. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Ніжэй прыведзены апошнія змены, якія даданы ў <a href="http://github.com/FreeCAD/FreeCAD/">зыходны код FreeCAD</a>. +Гэтыя змены могуць яшчэ не адбіцца ў версіі FreeCAD, якую вы ўжываеце ў бягучы час. +Праверце <a href="https://www.freecad.org/wiki/Downloads">даступныя налады</a>, калі вы жадаеце атрымаць апошнюю версію для распрацоўшчыкаў. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Апошняе паведамленне на <a href="https://forum.freecad.org">форуме FreeCAD</a>: + + + + Available addons + Даступныя дадаткі + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Ніжэй прыведзены спіс даступных дадатковых варштатаў, якія могуць быць даданы да вашага ўсталяванага FreeCAD. Праглядзіце і ўсталюеце іх у меню Сэрвіс -> Кіраванне дадаткамі. Вы можаце даведацца больш падрабязна пра кожны з іх, калі перайсці па спасылках ніжэй. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Калі ён не ўваходзіць у камплект пастаўкі вашай версіі FreeCAD, усталюйце пакет дакументацыі FreeCAD, каб атрымаць цэнтр дакументацыі, даведку варштата і дакументацыю па асобным камандам без злучэння да Інтэрнэту. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Не атрымалася выняць інфармацыю з GitHub. <a href="EnableDownload.py">Аўтарызуйце FreeCAD для доступу ў Інтэрнэт</a> і перазагрузіце Пачатковую старонка. + + + + Recent commits + Нядаўнія коміты + + + + See all commits on github + Глядзець усе коміты на github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Вы можаце наладзіць карыстальніцкі каталог для адлюстравання тут у меню Праўка -> Перавагі -> Пуск -> Адлюстраваць дадатковы каталог + + + + version + версія + + + + build + зборка + + + + Create new... + Стварыць новы... + + + + Unknown + Невядомы + + + + Forum + Форум + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Каб адчыніць любую з прыведзеных вышэй спасылак у вашым Інтэрнэт-аглядальніку, пстрыкніце <правай кнопкай мышы> -> Адчыніць у вонкавым аглядальніку + + + + Creation date + Дата стварэння + + + + Last modification + Апошняя змена + + + + Notes + Заўвага + + + + Open start page preferences + Адчыніць перавагі пачатковай старонкі + + + + Workbench + + + + Start page + Пачатковая старонка + + CmdStartPage @@ -22,495 +320,287 @@ DlgStartPreferences - - Start page options - Налады пачатковай старонкі - - - - Start page template - Шаблон пачатковай старонкі - - - - An optional HTML template that will be used instead of the default start page. - Неабавязковы шаблон HTML, які будзе ўжывацца замест першапачатковай старонкі. - - - + Contents Змест - - Show notepad - Паказаць нататнік + + Show forum + Паказаць форум - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Паказвае нататнік побач з файламі мініяцюры, дзе вы можаце захоўваць нататкі паміж сеансамі - - - + Show examples folder contents Паказаць змест каталогу з прыкладамі - - If you want the examples to show on the first page - Калі вы жадаеце, каб прыклады былі паказаныя на першай старонцы - - - + Show additional folder Паказаць дадатковы каталог - + + If you want the examples to show on the first page + Калі вы жадаеце, каб прыклады былі паказаныя на першай старонцы + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Калі птушка, апошнія паведамленні з форума FreeCAD будуць адлюстраваныя на ўкладцы Актыўнасць + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Неабавязковы карыстальніцкі каталог, які будзе адлюстраваны ў ніжняй частцы першай старонкі. Калі ўжыць ";;" для падзелу шляхоў, вы можаце дадаць сюды некалькі каталогаў - - Show forum - Паказаць форум + + Show notepad + Паказаць нататнік - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Калі птушка, апошнія паведамленні з форума FreeCAD будуць адлюстраваныя на ўкладцы Актыўнасць + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Паказвае нататнік побач з файламі мініяцюры, дзе вы можаце захоўваць нататкі паміж сеансамі - + Show tips Паказаць парады - + + General + Асноўныя + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Варштат, на які можна пераключыцца пасля загрузкі файла з Пачатковай старонкі, ужываецца толькі ў тым выпадку, калі Пачатак - гэта пачатковы варштат + + + + The size of file thumbnail icons in recent files and examples sections + Памер гузікаў файлаў мініяцюры ў падзелах Апошнія файлы і Прыклады + + + Displays help tips in the Start workbench Documents tab Адлюстраваць падказкі на варштаце Пуск на ўкладцы Дакументы - - Show scrollbars - Паказваць паласы пракруткі + + File thumbnail size + Памер мініяцюры файла - + + Show file thumbnails + Паказаць файлы мініяцюры + + + Fonts and colors Шрыфты і колеры - - Use FreeCAD style sheet - Ужываць табліцу стыляў FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Калі птушка, і ў агульных перавагах паказана табліца стыляў, яна будзе ўжыта і колеры будуць пераназначаныя, названыя ніжэй - - - - Background color - Колер фону - - - - The background color behind the panels - Колер фону ззаду панэляў - - - - Background color down gradient - Колер ніжняга градыента фону - - - - The down gradient for the background color (currently unsupported) - Ніжні градыент колеру фону (у бягучым часе не падтрымліваецца) - - - - Background image - Фонавая выява - - - - An optional image to display as background - Неабавязковая выява для адлюстравання ў якасці фону - - - - Background text color - Колер фону тэксту - - - - The color of the version text - Колер тэксту версіі - - - - Page background color - Колер фону старонкі - - - + The background of the main start page area Фон вобласці галоўнай пачатковай старонцы - - Page text color - Колер тэксту на старонцы + + Background color + Колер фону - - The color of the text on the main pages - Колер тэксту на галоўных старонках - - - - Box background color - Колер фону поля - - - - The background color of the boxes inside the pages - Колер фону палёў унутры старонак - - - - Link color - Колер спасылкі - - - - The color of the links - Колер спасылак - - - - Font family - Сямейства шрыфтоў - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Сямейства шрыфтоў, якія ўжываюцца на пачатковай старонцы. Можа быць іменем шрыфту, альбо серыяй рэзервовых шрыфтоў, якія падзеленыя коскамі - - - - Arial,Helvetica,sans - Arial, Helvetica, Sans - - - - The base font size to use for all texts of the Start page - Асноўны памер шрыфту, які будзе ўжыты для ўсіх тэкстаў пачатковай старонкі - - - - px - px - - - - Open links - Адчыніць спасылкі - - - + in FreeCAD у FreeCAD - + In external browser У вонкавым аглядальніку - - Use gradient for New File icon - Ужываць градыент для Новага гузіка файла + + Background color down gradient + Колер ніжняга градыента фону - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Калі птушка, на гузіку 'Новы файл' будзе паказаны гузік градыенту замест звычайнага гузіка + + The color of the version text + Колер тэксту версіі - + + Link color + Колер спасылкі + + + + An optional image to display as background + Неабавязковая выява для адлюстравання ў якасці фону + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Калі птушка, і ў агульных перавагах паказана табліца стыляў, яна будзе ўжыта і колеры будуць пераназначаныя, названыя ніжэй + + + + Page background color + Колер фону старонкі + + + + The color of the text on the main pages + Колер тэксту на галоўных старонках + + + + Background image + Фонавая выява + + + + Page text color + Колер тэксту на старонцы + + + + The color of the links + Колер спасылак + + + + The background color of the boxes inside the pages + Колер фону палёў унутры старонак + + + + Box background color + Колер фону поля + + + + The background color behind the panels + Колер фону ззаду панэляў + + + + The down gradient for the background color (currently unsupported) + Ніжні градыент колеру фону (у бягучым часе не падтрымліваецца) + + + + Open links + Адчыніць спасылкі + + + + Background text color + Колер фону тэксту + + + + Use FreeCAD style sheet + Ужываць табліцу стыляў FreeCAD + + + + Font family + Сямейства шрыфтоў + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Сямейства шрыфтоў, якія ўжываюцца на пачатковай старонцы. Можа быць іменем шрыфту, альбо серыяй рэзервовых шрыфтоў, якія падзеленыя коскамі + + + + Arial,Helvetica,sans + Arial, Helvetica, Sans + + + + The base font size to use for all texts of the Start page + Асноўны памер шрыфту, які будзе ўжыты для ўсіх тэкстаў пачатковай старонкі + + + + + px + px + + + Options Налады - - Switch workbench after loading - Пераключыць варштат пасля загрузкі - - - - Choose which workbench to switch to after the program launches - Абраць, на які варштат пераключацца пасля запуску праграмы - - - - Close start page after loading - Зачыніць пачатковую старонку пасля загрузкі - - - + If checked, will automatically close the Start page when FreeCAD launches Калі птушка, пачатковая старонка будзе аўтаматычна зачынена пры запуску FreeCAD - + + Switch workbench after loading + Пераключыць варштат пасля загрузкі + + + + Close start page after loading + Зачыніць пачатковую старонку пасля загрузкі + + + Close and switch on opening file Зачыніць і пераключыць, калі файл адчыняецца - + If application is started by opening a file, apply the two settings above Калі праграма запускаецца шляхам адкрыцця файла, ужыць дзве налады, якія паказаны вышэй - Workbench + DlgStartPreferencesAdvanced - - - Start page - Пачатковая старонка - - - - StartPage - - - Start - Пачаць + + Advanced + Дадаткова - - Documents - Дакументы + + Custom HTML Template + Карыстальніцкі шаблон HTML - - Help - Даведка + + An optional HTML template that will be used instead of the default start page. + Неабавязковы шаблон HTML, які будзе ўжывацца замест першапачатковай старонкі. - - Activity - Актыўнасць + + Custom CSS + Карыстальніцкі CSS - - Recent files - Апошнія файлы - - - - Tip - Парада - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Адрэгуляваць колькасць апошніх файлаў, якія будуць паказаныя тут, у меню Праўка -> Перавагі -> Агульныя -> Памер спісу апошніх файлаў - - - - Examples - Прыклады - - - - General documentation - Агульная дакументацыя - - - - User hub - Карыстальніцкі цэнтр - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Гэты падзел змяшчае дакументацыю, якая карысная для карыстальнікаў FreeCAD ў цэлым: спіс усіх варштатаў, падрабязныя інструкцыі па ўстаноўкі і ўжыванні праграмы FreeCAD, навучальныя дапаможнікі і ўсё, што вам трэба, для пачатку працы. - - - - Power users hub - Цэнтр дасведчанага карыстальніка - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Гэты падзел змяшчае сабраную дакументацыю для прасунутых карыстальнікаў і людзей, якія зацікаўленыя ў напісанні сцэнараў python. -Вы таксама знойдзеце сховішча макрасаў, інструкцыі па ўстаноўкі і ўжыванні, а таксама дадатковую інфармацыю аб наладцы FreeCAD у адпаведнасці з вашымі канкрэтнымі патрэбамі. - - - - Developers hub - Цэнтр распрацоўшчыкаў - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Гэты падзел змяшчае матэрыялы для распрацоўшчыкаў: як самастойна скампіляваць FreeCAD, як структураваны зыходны код FreeCAD + як у ім арыентавацца, як распрацаваць новыя варштаты і/ці ўбудаваць FreeCAD у вашую ўласную праграму. - - - - Manual - Інструкцыя - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Інструкцыя па FreeCAD - гэта іншы, больш паслядоўны спосаб прадстаўлення інфармацыі, якая змяшчаецца ў гэтай Вікі. Яна створаная для чытання як кніга, і паступова пазнаёміць вас з многімі іншымі старонкамі з папярэдніх падзелаў. - - - - Workbenches documentation - Дакументацыя варштатаў - - - - These are the help pages of all the workbenches currently installed on this computer. - Гэта старонкі даведкі ўсіх варштатаў, якія ўсталяваныя ў бягучы час на гэтым кампутары. - - - - Getting help from the community - Атрымаць дапамогу ад суполкі - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">Форум FreeCAD</a> - выдатнае месца, дзе можна атрымаць дапамогу ад іншых карыстальнікаў і распрацоўшчыкаў FreeCAD. -На форуме ёсць мноства падзелаў для розных тыпаў пытанняў і тэм для абмеркавання. -Калі вы сумняваецеся, напішыце ў больш агульным падзеле <a href="https://forum.freecad.org/viewforum.php?f=3">Дапамога па ўжыванню FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Калі вы ўпершыню публікуеце паведамленне на форуме, спачатку абавязкова <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">прачытайце кіраўніцтва</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD таксама падтрымлівае агульнадаступны <a href="https://www.freecad.org/tracker">Баг-трэкер</a>, дзе кожды жадаючы можа адпраўляць паведамленні пра памылкі і прапанаваць новыя функцыі. -Каб пазбегнуць дадатковай працы і даць найлепшыя шанцы ўбачыць, што ваша памылка вырашаная, пераканайцеся, што вы прачыталі <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">кіраўніцтва па выпраўленні памылак</a> перад публікацыяй. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Ніжэй прыведзены апошнія змены, якія даданы ў <a href="http://github.com/FreeCAD/FreeCAD/">зыходны код FreeCAD</a>. -Гэтыя змены могуць яшчэ не адбіцца ў версіі FreeCAD, якую вы ўжываеце ў бягучы час. -Праверце <a href="https://www.freecad.org/wiki/Downloads">даступныя налады</a>, калі вы жадаеце атрымаць апошнюю версію для распрацоўшчыкаў. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Апошняе паведамленне на <a href="https://forum.freecad.org">форуме FreeCAD</a>: - - - - Available addons - Даступныя дадаткі - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Ніжэй прыведзены спіс даступных дадатковых варштатаў, якія могуць быць даданы да вашага ўсталяванага FreeCAD. Праглядзіце і ўсталюеце іх у меню Сэрвіс -> Кіраванне дадаткамі. Вы можаце даведацца больш падрабязна пра кожны з іх, калі перайсці па спасылках ніжэй. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Калі ён не ўваходзіць у камплект пастаўкі вашай версіі FreeCAD, усталюйце пакет дакументацыі FreeCAD, каб атрымаць цэнтр дакументацыі, даведку варштата і дакументацыю па асобным камандам без злучэння да Інтэрнэту. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Не атрымалася выняць інфармацыю з GitHub. <a href="EnableDownload.py">Аўтарызуйце FreeCAD для доступу ў Інтэрнэт</a> і перазагрузіце Пачатковую старонка. - - - - Recent commits - Нядаўнія коміты - - - - See all commits on github - Глядзець усе коміты на github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Вы можаце наладзіць карыстальніцкі каталог для адлюстравання тут у меню Праўка -> Перавагі -> Пуск -> Адлюстраваць дадатковы каталог - - - - version - версія - - - - build - зборка - - - - Create new... - Стварыць новы... - - - - Unknown - Невядомы - - - - Forum - Форум - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Каб адчыніць любую з прыведзеных вышэй спасылак у вашым Інтэрнэт-аглядальніку, пстрыкніце <правай кнопкай мышы> -> Адчыніць у вонкавым аглядальніку - - - - Creation date - Дата стварэння - - - - Last modification - Апошняя змена - - - - Notes - Заўвага - - - - Open start page preferences - Адчыніць перавагі пачатковай старонкі + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Вы можаце ўставіць сюды свой карыстальніцкі CSS, і Пачатковая старонка прыменіць яго за вас. Каб даведацца больш пра тое, як вы можаце аформіць Пачатковая старонка, азнаёмцеся з зыходнымі тэкстамі HTML і CSS:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Пачаць diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ca.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ca.ts index 362642b2e5..ea35d81f31 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ca.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ca.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Inicia + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Documents + + + + Help + Ajuda + + + + Activity + Activitat + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Consell + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Ajusta el nombre de fitxers recents que es mostraran aqui, al menú Edita -> Preferències -> General -> Mida de la llista de fitxers recents + + + + Examples + Exemples + + + + General documentation + Documentació general + + + + User hub + Centre d'usuaris + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Aquesta secció conté documentació útil per a usuaris FreeCAD en general: una llista de tots els bancs de treball, instruccions detallades sobre com instal·lar i utilitzar l'aplicació FreeCAD, tutorials i tot el necessari per començar. + + + + Power users hub + Centre d'usuaris avançats + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Aquesta secció recull documentació per a usuaris avançats i persones interessades a escriure scripts en python. També hi trobarà un repositori de macros, instruccions sobre com instal·lar i utilitzar-les i més informació sobre la personalització FreeCAD a les seves necessitats específiques. + + + + Developers hub + Centre de desenvolupadors + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Aquesta secció conté materials per a desenvolupadors: com compilar FreeCAD, com està estructurat el codi font de FreeCAD + com navegar per ell, i com desenvolupar nous bancs de treball, i/o incrustar FreeCAD en la vostra pròpia aplicació. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + El manual de FreeCAD és una altra forma més lineal de presentar la informació continguda en aquest wiki. Està fet per a ser llegit com un llibre i us introduirà gradualment en moltes altres pàgines dels centres d'activitat anteriors. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versions de llibres anteriors</a> també estan disponibles. + + + + Workbenches documentation + Documentació dels bancs de treballs + + + + These are the help pages of all the workbenches currently installed on this computer. + Aquestes són les pàgines d'ajuda de tots els bancs de treball instal·lats actualment en aquest ordinador. + + + + Getting help from the community + Obtenir ajuda de la comunitat + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + El <a href="http://forum.freecad.org">fòrum de FreeCAD</a> és un lloc fantàstic per obtenir ajuda d'altres usuaris i desenvolupadors de FreeCAD. El fòrum té moltes seccions per a diferents tipus de qüestions i temes de discussió. En cas de dubte, publica a la secció més general <a href="https://forum.freecad.org/viewforum.php?f=3">Ajuda per utilitzar FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Si és la primera vegada que publiques al fòrum, assegura't de llegir primer <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">les instruccions i normes</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD també manté un <a href="https://www.freecad.org/tracker">seguidor d'errors</a> públic on qualsevol persona pot enviar errors i proposar noves funcions. Per evitar que es produeixi treball addicional i donar les millors oportunitats de veure el vostre error resolt, assegura'ts de llegir la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guia d'enviament d'errors </a> abans de publicar. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + A continuació es mostren els darrers canvis afegits al <a href="http://github.com/FreeCAD/FreeCAD/">codi font de FreeCAD</a>. És possible que aquests canvis encara no es reflecteixin a la versió de FreeCAD que estàs executant actualment. Comprova les <a href="https://www.freecad.org/wiki/Downloads">opcions disponibles</a> si vols obtenir una versió en desenvolupament. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Els articles més recents al <a href="https://forum.freecad.org">fòrum FreeCAD</a>: + + + + Available addons + Afegits disponibles + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + A continuació es mostren una llista de bancs de treballs addicionals disponibles que es poden afegir a la vostra instal·lació de FreeCAD. Examineu-los i instal·leu-los des del menú Eines-> Administrador de complements. Pot obtenir més informació sobre qualsevol d'ells fent clic en els enllaços següents. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Si no està inclòs en la seva versió de FreeCAD, instal·li el paquet de documentació de FreeCAD per a obtenir els centres de documentació, l'ajuda del banc de treball i la documentació d'ordres individuals sense connexió a Internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + No es pot obtenir informació de GitHub. <a href="EnableDownload.py">Autoritzi FreeCAD a accedir a Internet</a> i torni a carregar la pàgina d'inici. + + + + Recent commits + Últimes confirmacions + + + + See all commits on github + Mostra tots els canvis de github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Podeu configurar una carpeta personalitzada per a mostrar aquí al menú Edita-> Preferències-> Inici-> Mostra carpeta addicional + + + + version + versió + + + + build + compilació + + + + Create new... + Crea nou... + + + + Unknown + Desconegut + + + + Forum + Fòrums + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Per a obrir qualsevol dels enllaços anteriors en el seu navegador d'escriptori, feu clic amb el botó dret del ratolí -> Obri en el navegador extern + + + + Creation date + Data de creació + + + + Last modification + Darrera modificació + + + + Notes + Notes + + + + Open start page preferences + Obrir les preferències de la pàgina d'inici + + + + Workbench + + + + Start page + Pàgina d'inici + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opcions de la pàgina d'inici - - - - Start page template - Plantilla de la pàgina d'inici - - - - An optional HTML template that will be used instead of the default start page. - Una plantilla HTML opcional que s'utilitzarà en lloc de la pàgina d'inici predeterminada. - - - + Contents Contingut - - Show notepad - Mostra la llibreta + + Show forum + Mostra el fòrum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - + Show examples folder contents Mostra el contingut de la carpeta d'exemples - - If you want the examples to show on the first page - Si desitgeu que es mostrin els exemples en la primera pàgina - - - + Show additional folder Mostra la carpeta addicional - + + If you want the examples to show on the first page + Si desitgeu que es mostrin els exemples en la primera pàgina + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Si està marcat, es mostraran les últimes entrades del fòrum FreeCAD en la pestanya Activitat + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - - Show forum - Mostra el fòrum + + Show notepad + Mostra la llibreta - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Si està marcat, es mostraran les últimes entrades del fòrum FreeCAD en la pestanya Activitat + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips Mostra els consells - + + General + General + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Mostra consells d'ajuda a la pestanya Documents del banc de treball Start - - Show scrollbars - Mostra les barres de desplaçament + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Tipus de lletra i colors - - Use FreeCAD style sheet - Utilitza el full d'estil de FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - Background color - Color de fons - - - - The background color behind the panels - El color de fons darrere dels panells - - - - Background color down gradient - Background color down gradient - - - - The down gradient for the background color (currently unsupported) - El degradat del color del fons (actualment incompatible) - - - - Background image - Imatge de fons - - - - An optional image to display as background - Una imatge opcional per a mostrar com a fons - - - - Background text color - Color de fons del text - - - - The color of the version text - El color del text de la versió - - - - Page background color - Color de fons de la pàgina - - - + The background of the main start page area El fons de l'àrea principal de la pàgina pàgina d'inici - - Page text color - Color del text de la pàgina + + Background color + Color de fons - - The color of the text on the main pages - El color del text a les pàgines principals - - - - Box background color - Color de fons dels quadres - - - - The background color of the boxes inside the pages - El color de fons dels quadres a les pàgines - - - - Link color - Color de l’enllaç - - - - The color of the links - El color dels enllaços - - - - Font family - Tipus de Font - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - La família de tipus de lletra de la pàgina d'inici. Pot ser el nom d'un tipus de lletra o una sèrie de tipus de lletra alternatives separades per comes - - - - Arial,Helvetica,sans - Arial,Helvetica,Sans - - - - The base font size to use for all texts of the Start page - La mida del tipus de lletra base per a tots els textos de la pàgina d'inici - - - - px - px - - - - Open links - Enllaços oberts - - - + in FreeCAD al FreeCAD - + In external browser A un navegador extern - - Use gradient for New File icon - Utilitza un degradat per a la icona de Fitxer nou + + Background color down gradient + Background color down gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + The color of the version text + El color del text de la versió - + + Link color + Color de l’enllaç + + + + An optional image to display as background + Una imatge opcional per a mostrar com a fons + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + + + + Page background color + Color de fons de la pàgina + + + + The color of the text on the main pages + El color del text a les pàgines principals + + + + Background image + Imatge de fons + + + + Page text color + Color del text de la pàgina + + + + The color of the links + El color dels enllaços + + + + The background color of the boxes inside the pages + El color de fons dels quadres a les pàgines + + + + Box background color + Color de fons dels quadres + + + + The background color behind the panels + El color de fons darrere dels panells + + + + The down gradient for the background color (currently unsupported) + El degradat del color del fons (actualment incompatible) + + + + Open links + Enllaços oberts + + + + Background text color + Color de fons del text + + + + Use FreeCAD style sheet + Utilitza el full d'estil de FreeCAD + + + + Font family + Tipus de Font + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + La família de tipus de lletra de la pàgina d'inici. Pot ser el nom d'un tipus de lletra o una sèrie de tipus de lletra alternatives separades per comes + + + + Arial,Helvetica,sans + Arial,Helvetica,Sans + + + + The base font size to use for all texts of the Start page + La mida del tipus de lletra base per a tots els textos de la pàgina d'inici + + + + + px + px + + + Options Opcions - - Switch workbench after loading - Canvia el banc de treball a l'iniciar - - - - Choose which workbench to switch to after the program launches - Tria quin és el banc de treball per defecte en iniciar el programa - - - - Close start page after loading - Tanca la pàgina d'inici després de carregar - - - + If checked, will automatically close the Start page when FreeCAD launches Si està marcat, tancarà automàticament la pàgina d'inici quan s'iniciï FreeCAD - + + Switch workbench after loading + Canvia el banc de treball a l'iniciar + + + + Close start page after loading + Tanca la pàgina d'inici després de carregar + + + Close and switch on opening file Close and switch on opening file - + If application is started by opening a file, apply the two settings above If application is started by opening a file, apply the two settings above - Workbench + DlgStartPreferencesAdvanced - - - Start page - Pàgina d'inici - - - - StartPage - - - Start - Inicia + + Advanced + Avançat - - Documents - Documents + + Custom HTML Template + Custom HTML Template - - Help - Ajuda + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Activitat + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Consell - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Ajusta el nombre de fitxers recents que es mostraran aqui, al menú Edita -> Preferències -> General -> Mida de la llista de fitxers recents - - - - Examples - Exemples - - - - General documentation - Documentació general - - - - User hub - Centre d'usuaris - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Aquesta secció conté documentació útil per a usuaris FreeCAD en general: una llista de tots els bancs de treball, instruccions detallades sobre com instal·lar i utilitzar l'aplicació FreeCAD, tutorials i tot el necessari per començar. - - - - Power users hub - Centre d'usuaris avançats - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Aquesta secció recull documentació per a usuaris avançats i persones interessades a escriure scripts en python. També hi trobarà un repositori de macros, instruccions sobre com instal·lar i utilitzar-les i més informació sobre la personalització FreeCAD a les seves necessitats específiques. - - - - Developers hub - Centre de desenvolupadors - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Aquesta secció conté materials per a desenvolupadors: com compilar FreeCAD, com està estructurat el codi font de FreeCAD + com navegar per ell, i com desenvolupar nous bancs de treball, i/o incrustar FreeCAD en la vostra pròpia aplicació. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - El manual de FreeCAD és una altra forma més lineal de presentar la informació continguda en aquest wiki. Està fet per a ser llegit com un llibre i us introduirà gradualment en moltes altres pàgines dels centres d'activitat anteriors. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versions de llibres anteriors</a> també estan disponibles. - - - - Workbenches documentation - Documentació dels bancs de treballs - - - - These are the help pages of all the workbenches currently installed on this computer. - Aquestes són les pàgines d'ajuda de tots els bancs de treball instal·lats actualment en aquest ordinador. - - - - Getting help from the community - Obtenir ajuda de la comunitat - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - El <a href="http://forum.freecad.org">fòrum de FreeCAD</a> és un lloc fantàstic per obtenir ajuda d'altres usuaris i desenvolupadors de FreeCAD. El fòrum té moltes seccions per a diferents tipus de qüestions i temes de discussió. En cas de dubte, publica a la secció més general <a href="https://forum.freecad.org/viewforum.php?f=3">Ajuda per utilitzar FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Si és la primera vegada que publiques al fòrum, assegura't de llegir primer <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">les instruccions i normes</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD també manté un <a href="https://www.freecad.org/tracker">seguidor d'errors</a> públic on qualsevol persona pot enviar errors i proposar noves funcions. Per evitar que es produeixi treball addicional i donar les millors oportunitats de veure el vostre error resolt, assegura'ts de llegir la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guia d'enviament d'errors </a> abans de publicar. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - A continuació es mostren els darrers canvis afegits al <a href="http://github.com/FreeCAD/FreeCAD/">codi font de FreeCAD</a>. És possible que aquests canvis encara no es reflecteixin a la versió de FreeCAD que estàs executant actualment. Comprova les <a href="https://www.freecad.org/wiki/Downloads">opcions disponibles</a> si vols obtenir una versió en desenvolupament. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Els articles més recents al <a href="https://forum.freecad.org">fòrum FreeCAD</a>: - - - - Available addons - Afegits disponibles - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - A continuació es mostren una llista de bancs de treballs addicionals disponibles que es poden afegir a la vostra instal·lació de FreeCAD. Examineu-los i instal·leu-los des del menú Eines-> Administrador de complements. Pot obtenir més informació sobre qualsevol d'ells fent clic en els enllaços següents. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Si no està inclòs en la seva versió de FreeCAD, instal·li el paquet de documentació de FreeCAD per a obtenir els centres de documentació, l'ajuda del banc de treball i la documentació d'ordres individuals sense connexió a Internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - No es pot obtenir informació de GitHub. <a href="EnableDownload.py">Autoritzi FreeCAD a accedir a Internet</a> i torni a carregar la pàgina d'inici. - - - - Recent commits - Últimes confirmacions - - - - See all commits on github - Mostra tots els canvis de github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Podeu configurar una carpeta personalitzada per a mostrar aquí al menú Edita-> Preferències-> Inici-> Mostra carpeta addicional - - - - version - versió - - - - build - compilació - - - - Create new... - Crea nou... - - - - Unknown - Desconegut - - - - Forum - Fòrums - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Per a obrir qualsevol dels enllaços anteriors en el seu navegador d'escriptori, feu clic amb el botó dret del ratolí -> Obri en el navegador extern - - - - Creation date - Data de creació - - - - Last modification - Darrera modificació - - - - Notes - Notes - - - - Open start page preferences - Obrir les preferències de la pàgina d'inici + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Inicia diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_cs.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_cs.ts index 9e28dc3df4..92caa7fed2 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_cs.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_cs.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Vítejte ve FreeCADu + + + + Documents + Dokument + + + + Help + Nápověda + + + + Activity + Aktivita + + + + Blog + Blog + + + + Link to the FreeCAD blog + Odkaz na blog FreeCADu + + + + New file + Nový soubor + + + + Empty File + Prázdný soubor + + + + Create an empty FreeCAD file + Vytvořit prázdný soubor FreeCADu + + + + Open File + Otevřít soubor + + + + Open an existing CAD file or 3D model + Otevřít existující CAD soubor nebo 3D model + + + + Standard Part + Standardní díl + + + + Create a part with the Part Design workbench + Vytvoří díl s pracovním plostředím pro návrh dílu + + + + 2D Draft + 2D návrh + + + + Create a 2D draft with the Draft workbench + Vytvořit 2D návrh s pracovním prostředím návrhu + + + + BIM/Architecture + BIM/Architektura + + + + Create an architecture project + Vytvořit projekt architektury + + + + Recent files + Nedávné soubory + + + + Tip + Tip + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Upravte zobrazovaný počet naposledy použitých souborů v menu Upravit -> Nastavení -> Obecné -> velikost seznamu posledních souborů + + + + Examples + Příklady + + + + General documentation + Obecná dokumentace + + + + User hub + Uživatelské centrum + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Tato část obsahuje obecně použitelnou dokumentaci pro uživatele, FreeCADu: seznam všech pracovních ploch, podrobné pokyny k instalaci a používání aplikace FreeCAD, návody a vše, co potřebujete pro zahájení práce. + + + + Power users hub + Centrum pro pokročilé uživatele + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Tato sekce shromažďuje dokumentaci pro pokročilé uživatele a zájemce o psaní python skriptů. Najdete zde také úložiště maker, pokyny k jejich instalaci a používání a další informace o přizpůsobení FreeCADu vašim konkrétním potřebám. + + + + Developers hub + Centrum pro vývojáře + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Tato část obsahuje dokumentaci pro vývojáře: jak zkompilovat FreeCAD, jak je strukturován zdrojový kód FreeCADu + jak se v něm orientovat, jak vyvíjet nová pracovní prostředí a/nebo zakomponovat FreeCAD do vlastní aplikace. + + + + Manual + Příručka + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Příručka FreeCAD je další forma prezentace informací z této wiki. Je vytvořena jako kniha a pozvolným a přirozeným způsobem představuje informace obsažené v uživatelských centrech uvedených výše. Je dostupná jako <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-kniha</a> ke stažení. + + + + Workbenches documentation + Dokumentace pracovních ploch + + + + These are the help pages of all the workbenches currently installed on this computer. + Toto jsou stránky nápovědy všech pracovních prostředí, které jsou nainstalované v počítači. + + + + Getting help from the community + Získat pomoc komunity + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">FreeCAD fórum</a> je skvělým místem pro získání pomoci od dalších uživatelů a vývojářů FreeCADu. Fórum má řadu sekcí pro různé druhy problémů a diskuzních témat. V případě pochybností použijte obecnou sekci <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Pokud píšete na fórum poprvé, určitě si nejprve <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">přečtěte pokyny</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD provozuje veřejný <a href="https://www.freecad.org/tracker">sledovač chyb</a>, kde může kdokoliv popsat chybu nebo navrhnout nový prvek. Aby se zabránilo práci navíc a maximalizovala šance na vyřešení vaší chyby, určitě si před odesláním přečtěte <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">průvodce popisu chyb</a>. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Níže jsou poslední změny <a href="http://github.com/FreeCAD/FreeCAD/">zdrojového kódu FreeCADu</a>. Tyto změny se ještě nemusely projevit ve verzi FreeCADu, kterou používáte. Zkontrolujte <a href="https://www.freecad.org/wiki/Downloads">dostupné možnosti</a>, pokud chcete získat vývojovou verzi. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Nejnovější příspěvky na <a href="https://forum.freecad.org">FreeCAD fóru</a>: + + + + Available addons + Dostupné doplňky + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Dole je seznam dostupných doplňkových pracovních prostředí, které mohou být přidány k instalaci FreeCADu. Pro jejich procházeí a instalaci použijte menu Nástroje -> Manažer doplňků. Více o každém z nich se dozvíte kliknutím na odkaz dole. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Pokud nebyl balíček dokumentace FreeCADu dodán s vaší verzí, pak pro přístup do centra dokumentace, nápovědy pracovních prostředí a jednotlivých příkazů bez internetového připojení nainstalujte nápovědu FreeCADu. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Nelze získat informace z GitHubu. <a href="EnableDownload.py">Autorizujte FreeCAD pro přístup k internetu</a> a aktualizujte Úvodní stránku. + + + + Recent commits + Nedávné commity + + + + See all commits on github + Zobrazit všechny commity na GitHubu + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Můžete nastavit vlastní složku, která se zobrazí zde v menu Upravit -> Nastavení -> Start -> Zobrazit další složku + + + + version + verze + + + + build + sestavení + + + + Create new... + Vytvořit nový... + + + + Unknown + Neznámý + + + + Forum + Přejít do fóra + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Pro otevření některého odkazu výše ve vašem prohlížeči, klikněte pravým tlačítkem -> Otevřít v externím prohlížeči + + + + Creation date + Datum vytvoření + + + + Last modification + Poslední úprava + + + + Notes + Poznámky + + + + Open start page preferences + Otevřít předvolby úvodní stránky + + + + Workbench + + + + Start page + Úvodní stránka + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Monžosti úvodní stránky - - - - Start page template - Šablona úvodní stránky - - - - An optional HTML template that will be used instead of the default start page. - Volitelná HTML šablona, která bude použita místo výchozí úvodní stránky. - - - + Contents Obsah - - Show notepad - Zobrazit poznámkový blok + + Show forum + Zobrazit fórum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Vedle náhledů se zobrazí poznámkový blok, kde se zachovají poznámky napříč relacemi - - - + Show examples folder contents Zobrazit obsah složky s příklady - - If you want the examples to show on the first page - Chcete-li zobrazit příklady na první stránkce - - - + Show additional folder Zobrazit další složku - + + If you want the examples to show on the first page + Chcete-li zobrazit příklady na první stránkce + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Je-li zaškrtnuto, poslední příspěvky z FreeCAD fóra se zobrazí v záložce Aktivita + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Volitelná vlastní složka, která se zobrazí v dolní části první stránky. Pomocí ";;" pro oddělení cest, zde můžete přidat více složek - - Show forum - Zobrazit fórum + + Show notepad + Zobrazit poznámkový blok - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Je-li zaškrtnuto, poslední příspěvky z FreeCAD fóra se zobrazí v záložce Aktivita + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Vedle náhledů se zobrazí poznámkový blok, kde se zachovají poznámky napříč relacemi - + Show tips Zobrazit tipy - + + General + Obecné + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Pracovní prostředí, na které se má přepnout po otevření souboru z úvodní stránky, používá se pouze v případě, že je Start pracovním prostředím při spuštění + + + + The size of file thumbnail icons in recent files and examples sections + Velikost náhledových ikon souborů v nedávných souborech a sekcích s příklady + + + Displays help tips in the Start workbench Documents tab Zobrazit tipy nápovědy v kartě dokumentů pracovního prostředí Start - - Show scrollbars - Zobrazit posuvníky + + File thumbnail size + Velikost náhledu souboru - + + Show file thumbnails + Zobrazit náhledy souborů + + + Fonts and colors Písma a barvy - - Use FreeCAD style sheet - Použít styl FreeCADu - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Je-li zaškrtnuto a styl FreeCADu je specifikovaný v Obecném nastavení, pak bude použit namísto barev níže - - - - Background color - Barva pozadí - - - - The background color behind the panels - Barva pozadí za panely - - - - Background color down gradient - Spodní gradient barvy pozadí - - - - The down gradient for the background color (currently unsupported) - Spodní gradient pro barvu pozadí (momentálně není podporováno) - - - - Background image - Obrázek na pozadí - - - - An optional image to display as background - Volitelný obrázek pro zobrazení na pozadí - - - - Background text color - Barva textu na pozadí - - - - The color of the version text - Barva textu verze - - - - Page background color - Barva pozadí stránky - - - + The background of the main start page area Pozadí plochy hlavní úvodní stránky - - Page text color - Barva textu na stránce + + Background color + Barva pozadí - - The color of the text on the main pages - Barva textu na hlavních stránkách - - - - Box background color - Barva pozadí sekce - - - - The background color of the boxes inside the pages - Barva pozadí sekcí na stránce - - - - Link color - Barva odkazu - - - - The color of the links - Barva odkazů - - - - Font family - Rodina fontů - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Rodina písma použitá na úvodní stránce. To může být název písma nebo čárkami oddělená řada náhradních písem - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Základní velikost písma pro všechen text na Úvodní stránce - - - - px - px - - - - Open links - Otevřít odkazy - - - + in FreeCAD ve FreeCADu - + In external browser V externím prohlížeči - - Use gradient for New File icon - Použít gradient pro ikonu nového souboru + + Background color down gradient + Spodní gradient barvy pozadí - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Je-li vybráno, ikona 'Nový soubor' zobrazí ikonu gradientu namísto normální ikony + + The color of the version text + Barva textu verze - + + Link color + Barva odkazu + + + + An optional image to display as background + Volitelný obrázek pro zobrazení na pozadí + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Je-li zaškrtnuto a styl FreeCADu je specifikovaný v Obecném nastavení, pak bude použit namísto barev níže + + + + Page background color + Barva pozadí stránky + + + + The color of the text on the main pages + Barva textu na hlavních stránkách + + + + Background image + Obrázek na pozadí + + + + Page text color + Barva textu na stránce + + + + The color of the links + Barva odkazů + + + + The background color of the boxes inside the pages + Barva pozadí sekcí na stránce + + + + Box background color + Barva pozadí sekce + + + + The background color behind the panels + Barva pozadí za panely + + + + The down gradient for the background color (currently unsupported) + Spodní gradient pro barvu pozadí (momentálně není podporováno) + + + + Open links + Otevřít odkazy + + + + Background text color + Barva textu na pozadí + + + + Use FreeCAD style sheet + Použít styl FreeCADu + + + + Font family + Rodina fontů + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Rodina písma použitá na úvodní stránce. To může být název písma nebo čárkami oddělená řada náhradních písem + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Základní velikost písma pro všechen text na Úvodní stránce + + + + + px + px + + + Options Možnosti - - Switch workbench after loading - Po otevření přepnout pracovní prostředí - - - - Choose which workbench to switch to after the program launches - Vyberte výchozí pracovní prostředí po spuštění programu - - - - Close start page after loading - Po otevření zavřít úvodní stránku - - - + If checked, will automatically close the Start page when FreeCAD launches Je-li zaškrtnuto, úvodní stránka se při spuštění FreeCADu automaticky zavře - + + Switch workbench after loading + Po otevření přepnout pracovní prostředí + + + + Close start page after loading + Po otevření zavřít úvodní stránku + + + Close and switch on opening file Zavřít a přepnout při otevírání souboru - + If application is started by opening a file, apply the two settings above Pokud se aplikace zapne prostřednictvím otevření souboru, použít tato dvě nastavení výše - Workbench + DlgStartPreferencesAdvanced - - - Start page - Úvodní stránka - - - - StartPage - - - Start - Start + + Advanced + Pokročilé - - Documents - Dokument + + Custom HTML Template + Vlastní HTML šablona - - Help - Nápověda + + An optional HTML template that will be used instead of the default start page. + Volitelná HTML šablona, která bude použita namísto výchozí úvodní stránky. - - Activity - Aktivita + + Custom CSS + Vlastní CSS - - Recent files - Nedávné soubory - - - - Tip - Tip - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Upravte zobrazovaný počet naposledy použitých souborů v menu Upravit -> Nastavení -> Obecné -> velikost seznamu posledních souborů - - - - Examples - Příklady - - - - General documentation - Obecná dokumentace - - - - User hub - Uživatelské centrum - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Tato část obsahuje obecně použitelnou dokumentaci pro uživatele, FreeCADu: seznam všech pracovních ploch, podrobné pokyny k instalaci a používání aplikace FreeCAD, návody a vše, co potřebujete pro zahájení práce. - - - - Power users hub - Centrum pro pokročilé uživatele - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Tato sekce shromažďuje dokumentaci pro pokročilé uživatele a zájemce o psaní python skriptů. Najdete zde také úložiště maker, pokyny k jejich instalaci a používání a další informace o přizpůsobení FreeCADu vašim konkrétním potřebám. - - - - Developers hub - Centrum pro vývojáře - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Tato část obsahuje dokumentaci pro vývojáře: jak zkompilovat FreeCAD, jak je strukturován zdrojový kód FreeCADu + jak se v něm orientovat, jak vyvíjet nová pracovní prostředí a/nebo zakomponovat FreeCAD do vlastní aplikace. - - - - Manual - Příručka - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Příručka FreeCAD je další forma prezentace informací z této wiki. Je vytvořena jako kniha a pozvolným a přirozeným způsobem představuje informace obsažené v uživatelských centrech uvedených výše. Je dostupná jako <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-kniha</a> ke stažení. - - - - Workbenches documentation - Dokumentace pracovních ploch - - - - These are the help pages of all the workbenches currently installed on this computer. - Toto jsou stránky nápovědy všech pracovních prostředí, které jsou nainstalované v počítači. - - - - Getting help from the community - Získat pomoc komunity - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">FreeCAD fórum</a> je skvělým místem pro získání pomoci od dalších uživatelů a vývojářů FreeCADu. Fórum má řadu sekcí pro různé druhy problémů a diskuzních témat. V případě pochybností použijte obecnou sekci <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Pokud píšete na fórum poprvé, určitě si nejprve <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">přečtěte pokyny</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD provozuje veřejný <a href="https://www.freecad.org/tracker">sledovač chyb</a>, kde může kdokoliv popsat chybu nebo navrhnout nový prvek. Aby se zabránilo práci navíc a maximalizovala šance na vyřešení vaší chyby, určitě si před odesláním přečtěte <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">průvodce popisu chyb</a>. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Níže jsou poslední změny <a href="http://github.com/FreeCAD/FreeCAD/">zdrojového kódu FreeCADu</a>. Tyto změny se ještě nemusely projevit ve verzi FreeCADu, kterou používáte. Zkontrolujte <a href="https://www.freecad.org/wiki/Downloads">dostupné možnosti</a>, pokud chcete získat vývojovou verzi. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Nejnovější příspěvky na <a href="https://forum.freecad.org">FreeCAD fóru</a>: - - - - Available addons - Dostupné doplňky - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Dole je seznam dostupných doplňkových pracovních prostředí, které mohou být přidány k instalaci FreeCADu. Pro jejich procházeí a instalaci použijte menu Nástroje -> Manažer doplňků. Více o každém z nich se dozvíte kliknutím na odkaz dole. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Pokud nebyl balíček dokumentace FreeCADu dodán s vaší verzí, pak pro přístup do centra dokumentace, nápovědy pracovních prostředí a jednotlivých příkazů bez internetového připojení nainstalujte nápovědu FreeCADu. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Nelze získat informace z GitHubu. <a href="EnableDownload.py">Autorizujte FreeCAD pro přístup k internetu</a> a aktualizujte Úvodní stránku. - - - - Recent commits - Nedávné commity - - - - See all commits on github - Zobrazit všechny commity na GitHubu - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Můžete nastavit vlastní složku, která se zobrazí zde v menu Upravit -> Nastavení -> Start -> Zobrazit další složku - - - - version - verze - - - - build - sestavení - - - - Create new... - Vytvořit nový... - - - - Unknown - Neznámý - - - - Forum - Přejít do fóra - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Pro otevření některého odkazu výše ve vašem prohlížeči, klikněte pravým tlačítkem -> Otevřít v externím prohlížeči - - - - Creation date - Datum vytvoření - - - - Last modification - Poslední úprava - - - - Notes - Poznámky - - - - Open start page preferences - Otevřít předvolby úvodní stránky + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Zde můžete vložit vlastní CSS styly a úvodní stránka je automaticky aplikuje. Chcete-li se dozvědět více o tom, jak upravit styl úvodní stránky, podívejte se na zdroj výchozího HTML a CSS:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Start diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_de.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_de.ts index 9fe1dbcfe4..386cd65f90 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_de.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_de.ts @@ -1,6 +1,299 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Willkommen bei FreeCAD + + + + Documents + Dokumente + + + + Help + Hilfe + + + + Activity + Aktivität + + + + Blog + Blog + + + + Link to the FreeCAD blog + Verknüpfung zum FreeCAD-Blog + + + + New file + Neue Datei + + + + Empty File + Leere Datei + + + + Create an empty FreeCAD file + Erstelle eine leere FreeCAD-Datei + + + + Open File + Datei öffnen + + + + Open an existing CAD file or 3D model + Öffne eine vorhandene CAD-Datei oder ein 3D-Modell + + + + Standard Part + Standardbauteil + + + + Create a part with the Part Design workbench + Erstelle ein Bauteil mit der Part-Design-Workbench + + + + 2D Draft + 2D-Zeichnung + + + + Create a 2D draft with the Draft workbench + Erstelle eine 2D-Zeichnung mit der Draft-Workbench + + + + BIM/Architecture + BIM/Architektur + + + + Create an architecture project + Erstelle ein Architekturprojekt + + + + Recent files + Zuletzt geöffnete Dateien + + + + Tip + Tipp + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Die Anzahl der hier angezeigten zuletzt benutzten Dateien kann im Menü Bearbeiten -> Einstellungen -> Allgemein -> Anzahl der zuletzt benutzten Dateien angepasst werden + + + + Examples + Beispiele + + + + General documentation + Allgemeine Dokumentation + + + + User hub + Anwenderzentrum + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Dieser Abschnitt enthält die Dokumentation, die für Benutzer von FreeCAD im Allgemeinen nützlich sind. Eine Liste aller Arbeitsbereiche, detaillierte Anweisungen zur Installation und Verwendung der FreeCAD-Anwendung, Tutorials und alles, was Sie zum Einstieg benötigen. + + + + Power users hub + Übersicht für Erfahrene Anwender + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Dieser Abschnitt bündelt die Dokumentation für fortgeschrittene Anwender und Personen, die sich für das Schreiben von Python-Skripten interessieren. Dort findet sich auch ein Ablageordner mit Makros, Anweisungen zu deren Installation und Verwendung sowie weitere Informationen zum Anpassen von FreeCAD an die spezifischen Bedürfnisse des Benutzers. + + + + Developers hub + Übersicht für Entwickler + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + In diesem Abschnitt finden Sie Informationen für Entwickler: +Wie Sie FreeCAD selbst kompilieren können, der FreeCAD-Quellcode strukturiert ist und wie darin navigiert wird. Es wird beschrieben wie Sie neue Arbeitsbereiche entwickeln oder FreeCAD in Ihre eigene Anwendung einbetten. + + + + Manual + Handbuch + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Das FreeCAD-Handbuch ist eine weitere, lineare Art, die Informationen aus diesem Wiki zu präsentieren. Es ist wie ein Buch zu lesen und wird Sie mit vielen anderen Seiten der oben genannten Bereiche vertraut machen. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">E-Book-Versionen</a> sind ebenfalls verfügbar. + + + + Workbenches documentation + Dokumentation der Arbeitsbereiche + + + + These are the help pages of all the workbenches currently installed on this computer. + Dies sind die Hilfeseiten aller derzeit auf diesem Computer installierten Arbeitsbereiche. + + + + Getting help from the community + Hilfe von der Community + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + Das <a href="http://forum.freecad.org">FreeCAD-Forum</a> ist ein großartiger Ort, um Hilfe von anderen FreeCAD-Benutzern und -Entwicklern zu erhalten. Das Forum enthält viele Bereiche für verschiedene Arten von Problemen und Diskussionsthemen. Wenn Sie sich nicht sicher sind, posten Sie im allgemeinen Abschnitt <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Falls Sie zum ersten Mal im Forum schreiben, sollten Sie zuerst die <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">Richtlinien lesen</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD unterhält außerdem einen öffentlichen <a href="https://www.freecad.org/tracker">Bugtracker</a>, in dem jeder Fehler melden und neue Funktionen vorschlagen kann. Lesen Sie bitte vor dem Schreiben die <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">Anleitung zum Einreichen von Fehlern</a>, um zusätzliche Arbeit zu vermeiden und die Wahrscheinlichkeit, dass der Fehler behoben wird, zu steigern. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Nachfolgend sind die neuesten Änderungen im <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD-Quellcode</a> aufgeführt. Diese Änderungen beziehen sich möglicherweise nicht auf Ihre aktuell ausgeführte FreeCAD-Version. Überprüfen Sie die <a href="https://www.freecad.org/wiki/Downloads">verfügbaren Optionen</a>, um eine Entwicklungsversion zu erhalten. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Die neuesten Beiträge im <a href="https://forum.freecad.org">FreeCAD-Forum</a>: + + + + Available addons + Verfügbare Addons + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Im Folgenden finden Sie eine Liste der zusätzlichen Arbeitsbereiche, die Ihrer FreeCAD-Installation hinzugefügt werden können. Durchsuchen und installieren Sie sie über das Menü Werkzeuge-> Addon-Manager. Sie können mehr über diese erfahren, indem Sie auf die untenstehenden Links klicken. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Falls nicht im Lieferumfang Ihrer FreeCAD-Version enthalten, installieren Sie das FreeCAD-Dokumentationspaket, um die Dokumentation Bereiche, Arbeitsbereichs-Hilfe und individuelle Befehlsdokumentation ohne Internetverbindung zu erhalten. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Informationen können nicht von GitHub abgerufen werden. <a href="EnableDownload.py">Authorisieren Sie FreeCAD für den Zugriff auf das Internet</a> und laden Sie die Startseite neu. + + + + Recent commits + Neueste Commits + + + + See all commits on github + Sehen Sie alle Commits auf Github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Sie können einen benutzerdefinierten Ordner zur Anzeige konfigurieren. Menü Bearbeiten -> Einstellungen -> Start -> Zusätzlichen Ordner anzeigen + + + + version + Version + + + + build + Build + + + + Create new... + Neu... + + + + Unknown + Unbekannt + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Um einen der oben genannten Links in Ihrem Desktop-Browser zu öffnen, klicken Sie mit der rechten Maustaste -> In externem Browser öffnen + + + + Creation date + Erstellungsdatum + + + + Last modification + Letzte Änderung + + + + Notes + Notizen + + + + Open start page preferences + Einstellungen der Startseite öffnen + + + + Workbench + + + + Start page + Startseite + + CmdStartPage @@ -22,490 +315,287 @@ DlgStartPreferences - - Start page options - Startseiteneinstellungen - - - - Start page template - Startseitenvorlage - - - - An optional HTML template that will be used instead of the default start page. - Eine optionale HTML-Vorlage, die anstelle der Standard-Startseite verwendet werden wird. - - - + Contents Inhalte - - Show notepad - Notizblock anzeigen + + Show forum + Forum anzeigen - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Zeigt einen Notizblock neben den Datei-Vorschaubildern an, der Notizen zwischen einzelnen Sitzungen aufbewahren kann - - - + Show examples folder contents Inhalt des Beispiel-Ordners "examples" anzeigen - - If you want the examples to show on the first page - Wenn die Beispiele auf der ersten Seite angezeigt werden sollen - - - + Show additional folder Zusätzlichen Ordner anzeigen - + + If you want the examples to show on the first page + Wenn die Beispiele auf der ersten Seite angezeigt werden sollen + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Wenn diese Option aktiviert ist, erscheinen die neuesten Beiträge aus dem FreeCAD-Forum auf der Registerkarte "Aktivitäten" + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Ein optionaler benutzerdefinierter Ordner, der unten auf der ersten Seite angezeigt wird. Wird ";;" verwendet, um Pfade zu trennen, können hier mehrere Ordner hinzugefügt werden - - Show forum - Forum anzeigen + + Show notepad + Notizblock anzeigen - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Wenn diese Option aktiviert ist, erscheinen die neuesten Beiträge aus dem FreeCAD-Forum auf der Registerkarte "Aktivitäten" + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Zeigt einen Notizblock neben den Datei-Vorschaubildern an, der Notizen zwischen einzelnen Sitzungen aufbewahren kann - + Show tips Tipps anzeigen - + + General + Allgemein + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench zu der gewechselt wird, nachdem eine Datei aus der Startseite geladen wurde; wird nur verwendet, wenn Start die Start-Workbench ist + + + + The size of file thumbnail icons in recent files and examples sections + Die Größe der Datei-Vorschaubilder in den Bereichen Aktuelle Dateien und Beispiele + + + Displays help tips in the Start workbench Documents tab Zeigt Hilfe-Tipps auf der Registerkarte Dokumente des Arbeitsbereichs Start - - Show scrollbars - Scrollbar anzeigen + + File thumbnail size + Größe der Datei-Vorschaubilder - + + Show file thumbnails + Datei-Vorschaubilder anzeigen + + + Fonts and colors Schriftarten und Farben - - Use FreeCAD style sheet - FreeCAD-Stylesheet verwenden - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Wenn diese Option aktiviert und in den allgemeinen Einstellungen ein Stylesheet angegeben ist, werden die Farben durch die hier angegebenen überschrieben - - - - Background color - Hintergrundfarbe - - - - The background color behind the panels - Die Hintergrundfarbe hinter den Paneelen - - - - Background color down gradient - Hintergrundfarbverlauf unten - - - - The down gradient for the background color (currently unsupported) - Der Farbverlauf (abwärts) der Hintergrundfarbe (zur Zeit nicht unterstützt) - - - - Background image - Hintergrundbild - - - - An optional image to display as background - Ein optionales Hintergrundbild - - - - Background text color - Hintergrundfarbe des Textes - - - - The color of the version text - Die Farbe des Versionstextes - - - - Page background color - Hintergrundfarbe der Seite - - - + The background of the main start page area Hintergrund des Startseiten-Hauptbereichs - - Page text color - Textfarbe auf Seiten + + Background color + Hintergrundfarbe - - The color of the text on the main pages - Die Textfarbe auf den Hauptseiten - - - - Box background color - Hintergrundfarbe der Kästen - - - - The background color of the boxes inside the pages - Die Hintergrundfarbe der Kästen auf den Seiten - - - - Link color - Link-Farbe - - - - The color of the links - Die Farbe der Links - - - - Font family - Schriftart - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Die auf der Startseite verwendete Schriftfamilie. Kann eine Schriftart oder eine durch Kommata getrennte Liste von Ausweichschriftarten sein - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - Die Basis-Schriftgröße für Text auf der Startseite - - - - px - px - - - - Open links - Links öffnen - - - + in FreeCAD in FreeCAD - + In external browser In externem Browser öffnen - - Use gradient for New File icon - Farbverlauf für neues Datei-Icon verwenden + + Background color down gradient + Hintergrundfarbverlauf unten - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Wenn diese Option ausgewählt ist, zeigt das 'Neue Datei' Symbol ein Verlaufssymbol anstelle des normalen Symbols + + The color of the version text + Die Farbe des Versionstextes - + + Link color + Link-Farbe + + + + An optional image to display as background + Ein optionales Hintergrundbild + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Wenn diese Option aktiviert und in den allgemeinen Einstellungen ein Stylesheet angegeben ist, werden die Farben durch die hier angegebenen überschrieben + + + + Page background color + Hintergrundfarbe der Seite + + + + The color of the text on the main pages + Die Textfarbe auf den Hauptseiten + + + + Background image + Hintergrundbild + + + + Page text color + Textfarbe auf Seiten + + + + The color of the links + Die Farbe der Links + + + + The background color of the boxes inside the pages + Die Hintergrundfarbe der Kästen auf den Seiten + + + + Box background color + Hintergrundfarbe der Kästen + + + + The background color behind the panels + Die Hintergrundfarbe hinter den Paneelen + + + + The down gradient for the background color (currently unsupported) + Der Farbverlauf (abwärts) der Hintergrundfarbe (zur Zeit nicht unterstützt) + + + + Open links + Links öffnen + + + + Background text color + Hintergrundfarbe des Textes + + + + Use FreeCAD style sheet + FreeCAD-Stylesheet verwenden + + + + Font family + Schriftart + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Die auf der Startseite verwendete Schriftfamilie. Kann eine Schriftart oder eine durch Kommata getrennte Liste von Ausweichschriftarten sein + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + Die Basis-Schriftgröße für Text auf der Startseite + + + + + px + px + + + Options Optionen - - Switch workbench after loading - Nach dem Laden Arbeitsbereich wechseln - - - - Choose which workbench to switch to after the program launches - Wählen Sie aus, welcher Arbeitsbereich nach dem Programmstart aktiv ist - - - - Close start page after loading - Nach dem Laden Startseite schließen - - - + If checked, will automatically close the Start page when FreeCAD launches Wenn aktiviert, wird die Startseite beim Start von FreeCAD automatisch geschlossen - + + Switch workbench after loading + Nach dem Laden Arbeitsbereich wechseln + + + + Close start page after loading + Nach dem Laden Startseite schließen + + + Close and switch on opening file Datei öffnen bewirkt Schließen und Wechseln - + If application is started by opening a file, apply the two settings above Wenn die Anwendung durch Öffnen einer Datei gestartet wird, gelten die beiden obigen Einstellungen - Workbench + DlgStartPreferencesAdvanced - - - Start page - Startseite - - - - StartPage - - - Start - Start + + Advanced + Erweitert - - Documents - Dokumente + + Custom HTML Template + Benutzerdefinierte HTML-Vorlage - - Help - Hilfe + + An optional HTML template that will be used instead of the default start page. + Eine optionale HTML-Vorlage, die anstelle der Standard-Startseite verwendet wird. - - Activity - Aktivität + + Custom CSS + Benutzerdefiniertes CSS - - Recent files - Zuletzt geöffnete Dateien - - - - Tip - Tipp - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Die Anzahl der hier angezeigten zuletzt benutzten Dateien kann im Menü Bearbeiten -> Einstellungen -> Allgemein -> Anzahl der zuletzt benutzten Dateien angepasst werden - - - - Examples - Beispiele - - - - General documentation - Allgemeine Dokumentation - - - - User hub - Anwenderzentrum - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Dieser Abschnitt enthält die Dokumentation, die für Benutzer von FreeCAD im Allgemeinen nützlich sind. Eine Liste aller Arbeitsbereiche, detaillierte Anweisungen zur Installation und Verwendung der FreeCAD-Anwendung, Tutorials und alles, was Sie zum Einstieg benötigen. - - - - Power users hub - Übersicht für Erfahrene Anwender - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Dieser Abschnitt bündelt die Dokumentation für fortgeschrittene Anwender und Personen, die sich für das Schreiben von Python-Skripten interessieren. Dort findet sich auch ein Ablageordner mit Makros, Anweisungen zu deren Installation und Verwendung sowie weitere Informationen zum Anpassen von FreeCAD an die spezifischen Bedürfnisse des Benutzers. - - - - Developers hub - Übersicht für Entwickler - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - In diesem Abschnitt finden Sie Informationen für Entwickler: -Wie Sie FreeCAD selbst kompilieren können, der FreeCAD-Quellcode strukturiert ist und wie darin navigiert wird. Es wird beschrieben wie Sie neue Arbeitsbereiche entwickeln oder FreeCAD in Ihre eigene Anwendung einbetten. - - - - Manual - Handbuch - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Das FreeCAD-Handbuch ist eine weitere, lineare Art, die Informationen aus diesem Wiki zu präsentieren. Es ist wie ein Buch zu lesen und wird Sie mit vielen anderen Seiten der oben genannten Bereiche vertraut machen. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">E-Book-Versionen</a> sind ebenfalls verfügbar. - - - - Workbenches documentation - Dokumentation der Arbeitsbereiche - - - - These are the help pages of all the workbenches currently installed on this computer. - Dies sind die Hilfeseiten aller derzeit auf diesem Computer installierten Arbeitsbereiche. - - - - Getting help from the community - Hilfe von der Community - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - Das <a href="http://forum.freecad.org">FreeCAD-Forum</a> ist ein großartiger Ort, um Hilfe von anderen FreeCAD-Benutzern und -Entwicklern zu erhalten. Das Forum enthält viele Bereiche für verschiedene Arten von Problemen und Diskussionsthemen. Wenn Sie sich nicht sicher sind, posten Sie im allgemeinen Abschnitt <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Falls Sie zum ersten Mal im Forum schreiben, sollten Sie zuerst die <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">Richtlinien lesen</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD unterhält außerdem einen öffentlichen <a href="https://www.freecad.org/tracker">Bugtracker</a>, in dem jeder Fehler melden und neue Funktionen vorschlagen kann. Lesen Sie bitte vor dem Schreiben die <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">Anleitung zum Einreichen von Fehlern</a>, um zusätzliche Arbeit zu vermeiden und die Wahrscheinlichkeit, dass der Fehler behoben wird, zu steigern. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Nachfolgend sind die neuesten Änderungen im <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD-Quellcode</a> aufgeführt. Diese Änderungen beziehen sich möglicherweise nicht auf Ihre aktuell ausgeführte FreeCAD-Version. Überprüfen Sie die <a href="https://www.freecad.org/wiki/Downloads">verfügbaren Optionen</a>, um eine Entwicklungsversion zu erhalten. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Die neuesten Beiträge im <a href="https://forum.freecad.org">FreeCAD-Forum</a>: - - - - Available addons - Verfügbare Addons - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Im Folgenden finden Sie eine Liste der zusätzlichen Arbeitsbereiche, die Ihrer FreeCAD-Installation hinzugefügt werden können. Durchsuchen und installieren Sie sie über das Menü Werkzeuge-> Addon-Manager. Sie können mehr über diese erfahren, indem Sie auf die untenstehenden Links klicken. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Falls nicht im Lieferumfang Ihrer FreeCAD-Version enthalten, installieren Sie das FreeCAD-Dokumentationspaket, um die Dokumentation Bereiche, Arbeitsbereichs-Hilfe und individuelle Befehlsdokumentation ohne Internetverbindung zu erhalten. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Informationen können nicht von GitHub abgerufen werden. <a href="EnableDownload.py">Authorisieren Sie FreeCAD für den Zugriff auf das Internet</a> und laden Sie die Startseite neu. - - - - Recent commits - Neueste Commits - - - - See all commits on github - Sehen Sie alle Commits auf Github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Sie können einen benutzerdefinierten Ordner zur Anzeige konfigurieren. Menü Bearbeiten -> Einstellungen -> Start -> Zusätzlichen Ordner anzeigen - - - - version - Version - - - - build - Build - - - - Create new... - Neu... - - - - Unknown - Unbekannt - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Um einen der oben genannten Links in Ihrem Desktop-Browser zu öffnen, klicken Sie mit der rechten Maustaste -> In externem Browser öffnen - - - - Creation date - Erstellungsdatum - - - - Last modification - Letzte Änderung - - - - Notes - Notizen - - - - Open start page preferences - Einstellungen der Startseite öffnen + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Hier kann ein eigenes CSS eingefügt werden, das auf die Startseite angewendet wird. Um mehr darüber zu erfahren, wie die Startseite gestaltet werden kann, siehe die HTML- und CSS-Quellen:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Start diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts index c5515d2382..970e1218e3 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_el.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Εκκίνηση + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Έγγραφα + + + + Help + Βοήθεια + + + + Activity + Δραστηριότητα + + + + Blog + Ιστολόγιο + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Πρόσφατα αρχεία + + + + Tip + Συμβουλή + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Προσαρμόστε τον αριθμό των προσφάτων αρχείων που εμφανίζονται εδώ, από το μενού Επεξεργασία->Προτιμήσεις->Γενικά->Μέγεθος λίστας προσφάτων αρχείων + + + + Examples + Παραδείγματα + + + + General documentation + Γενικές Οδηγίες + + + + User hub + Ενότητα Χρηστών + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Αυτή η ενότητα περιλαμβάνει οδηγίες χρήσης για τους χρήστες του FreeCAD: μια λίστα με όλα τα προγράμματα της εργαλειοθήκης, αναλυτικές οδηγίες για την εγκατάσταση και χρήση του FreeCAD, γρήγορα μαθήματα, και όλα όσα χρειάζεστε για να ξεκινήσετε. + + + + Power users hub + Ενότητα Προχωρημένων Χρηστών + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Η ενότητα αυτή περιλαμβάνει οδηγίες για προχωρημένους χρήστες και άτομα που ενδιαφέρονται για την σύνταξη python scripts. Επίσης, θα βρείτε μια συλλογή μακροεντολών, καθώς και οδηγίες πώς να τις εγκαταστήσετε και περισσότερες πληροφορίες για να προσαρμόσετε το FreeCAD στις δικές σας ανάγκες. + + + + Developers hub + Ενότητα Προγραμματιστών + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Αυτή η ενότητα περιέχει πληροφορίες για προγραμματιστές: Πώς να μεταγλωττίσετε μόνοι σας το FreeCAD, πώς είναι δομημένος ο πηγαίος κώδικας του FreeCAD + πώς να περιηγηθείτε σε αυτόν, πώς να αναπτύξετε νέους πάγκους εργασίας και/ή να ενσωματώσετε το FreeCAD στη δική σας εφαρμογή. + + + + Manual + Εγχειρίδιο Χρήσης + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Το εγχειρίδιο του FreeCAD είναι ένας άλλος τρόπος παρουσίασης των πληροφοριών που περιέχονται στο wiki. Είναι κατασκευασμένο για να διαβαστεί σαν ένα βιβλίο, και εμφανίζονται σε πολλές σελίδες στους παραπάνω συνδέσμους. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">εκδόσεις ηλεκτρονικού βιβλίου</a> είναι επίσης διαθέσιμες. + + + + Workbenches documentation + Οδηγίες χρήσης προγραμμάτων Εργαλειοθήκης + + + + These are the help pages of all the workbenches currently installed on this computer. + Αυτές είναι οι σελίδες βοήθειας όλων των πάγκων εργασίας που είναι εγκατεστημένοι σε αυτόν τον υπολογιστή. + + + + Getting help from the community + Λήψη βοήθειας από την κοινότητα + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + Το φόρουμ <a href="http://forum.freecad.org">FreeCAD</a> είναι ένα εξαιρετικό μέρος για να λάβετε βοήθεια από άλλους χρήστες και προγραμματιστές του FreeCAD. Το φόρουμ έχει πολλές ενότητες για διαφορετικούς τύπους θεμάτων και θεμάτων συζήτησης. Αν έχετε αμφιβολίες, δημοσιεύστε τη βοήθεια <a href="https://forum.freecad.org/viewforum.php?f=3">στην ενότητα FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Αν είναι η πρώτη φορά που δημοσιεύετε στο φόρουμ, να είστε βέβαιος να <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">διαβάσετε τις κατευθυντήριες γραμμές</a> πρώτα! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + Το FreeCAD διατηρεί επίσης ένα δημόσιο <a href="https://www.freecad.org/tracker">bug tracker</a> όπου ο καθένας μπορεί να υποβάλει σφάλματα και να προτείνει νέα χαρακτηριστικά. Για να αποφύγετε την πρόκληση επιπλέον εργασίας και να δώσετε τις καλύτερες πιθανότητες να δείτε το σφάλμα σας να λυθεί, Σιγουρευτείτε ότι διαβάσατε τον οδηγό υποβολής σφαλμάτων <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"></a> πριν δημοσιεύσετε. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Παρακάτω είναι οι τελευταίες αλλαγές που προστίθενται στον πηγαίο κώδικα <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD</a>. Αυτές οι αλλαγές ενδέχεται να μην αντικατοπτρίζουν ακόμα την έκδοση του FreeCAD που εκτελείτε αυτή τη στιγμή. Ελέγξτε τις <a href="https://www.freecad.org/wiki/Downloads">διαθέσιμες επιλογές</a> αν θέλετε να αποκτήσετε μια έκδοση για ανάπτυξη. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Οι τελευταίες δημοσιεύσεις στο φόρουμ <a href="https://forum.freecad.org">FreeCAD</a>: + + + + Available addons + Διαθέσιμα πρόσθετα + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Παρακάτω υπάρχει μια λίστα με τους επιπλέον διαθέσιμους πάγκους εργασίας που μπορούν να προστεθούν στην εγκατάσταση του FreeCAD. Περιηγηθείτε και εγκαταστήστε τα από το μενού Εργαλεία -> Διαχειριστής Πρόσθετων. Μπορείτε να μάθετε περισσότερα για οποιοδήποτε από αυτούς κάνοντας κλικ στους παρακάτω συνδέσμους. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Εάν δε συνοδεύεται από την έκδοση του FreeCAD, εγκαταστήστε το πακέτο οδηγιών FreeCAD για να λάβετε βοήθεια στον πάγκο εργασίας και οδηγίες εντολών χωρίς σύνδεση στο Διαδίκτυο. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Αν δεν είναι δυνατή η ανάκτηση πληροφοριών από το GitHub. <a href="EnableDownload.py">Εξουσιοδοτήστε το FreeCAD για πρόσβαση στο διαδίκτυο</a> και φορτώστε ξανά την Αρχική σελίδα. + + + + Recent commits + Πρόσφατες προσθήκες + + + + See all commits on github + Δείτε όλες τις προσθήκες στο github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Μπορείτε να ρυθμίσετε έναν δικό σας φάκελο να προβάλλεται σε αυτό το σημείο, στο μενού Επεξεργασία->Προτιμήσεις->Αρχική->Προσαρμοσμένος φάκελος + + + + version + έκδοση + + + + build + κατασκευή + + + + Create new... + Δημιουργία νέου... + + + + Unknown + Άγνωστο + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Για να ανοίξετε οποιονδήποτε από τους παραπάνω συνδέσμους στο πρόγραμμα περιήγησης του υπολογιστή σας, κάντε δεξί κλικ -> Άνοιγμα σε εξωτερικό πρόγραμμα περιήγησης + + + + Creation date + Ημερομηνία δημιουργίας + + + + Last modification + Τελευταία τροποποίηση + + + + Notes + Σημειώσεις + + + + Open start page preferences + Προτιμήσεις σελίδας έναρξης + + + + Workbench + + + + Start page + Αρχική σελίδα + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Επιλογές Αρχικής σελίδας - - - - Start page template - Πρότυπο Αρχικής σελίδας - - - - An optional HTML template that will be used instead of the default start page. - Ένα προαιρετικό πρότυπο HTML που θα χρησιμοποιηθεί αντί για την προεπιλεγμένη Αρχική σελίδα. - - - + Contents Περιεχόμενα - - Show notepad - Εμφάνιση σημειωματάριου + + Show forum + Εμφάνιση φόρουμ - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Εμφανίζει ένα σημειωματάριο δίπλα στις μικρογραφίες των αρχείων, όπου μπορείτε να κρατάτε σημειώσεις - - - + Show examples folder contents Εμφάνιση περιεχομένων φακέλων με παραδείγματα - - If you want the examples to show on the first page - Αν θέλετε τα παραδείγματα να εμφανίζονται στην πρώτη σελίδα - - - + Show additional folder Εμφάνιση πρόσθετου φακέλου - + + If you want the examples to show on the first page + Αν θέλετε τα παραδείγματα να εμφανίζονται στην πρώτη σελίδα + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Εάν αυτό είναι επιλεγμένο, οι τελευταίες δημοσιεύσεις από το φόρουμ του FreeCAD θα εμφανιστούν στην καρτέλα Δραστηριότητα + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Ένας προσαρμοσμένος φάκελος θα εμφανίζεται στο κάτω μέρος της πρώτης σελίδας. Χρησιμοποιώντας ";;" για να διαχωρίσετε διαδρομές, μπορείτε να προσθέσετε αρκετούς φακέλους εδώ - - Show forum - Εμφάνιση φόρουμ + + Show notepad + Εμφάνιση σημειωματάριου - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Εάν αυτό είναι επιλεγμένο, οι τελευταίες δημοσιεύσεις από το φόρουμ του FreeCAD θα εμφανιστούν στην καρτέλα Δραστηριότητα + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Εμφανίζει ένα σημειωματάριο δίπλα στις μικρογραφίες των αρχείων, όπου μπορείτε να κρατάτε σημειώσεις - + Show tips Εμφάνιση Συμβουλών - + + General + Γενικές + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Εμφανίζει συμβουλές βοήθειας στην καρτέλα Έναρξη εγγράφων πάγκου εργασίας - - Show scrollbars - Εμφάνιση γραμμών κύλισης + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Γραμματοσειρές και χρώματα - - Use FreeCAD style sheet - Χρήση φύλλου στυλ FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Εάν αυτό είναι επιλεγμένο στις Γενικές προτιμήσεις, θα χρησιμοποιηθεί και θα αντικαταστήσει τα παρακάτω χρώματα - - - - Background color - Χρώμα υποβάθρου - - - - The background color behind the panels - Το χρώμα φόντου πίσω από τους πίνακες - - - - Background color down gradient - Χρώμα φόντου προς τα κάτω - - - - The down gradient for the background color (currently unsupported) - Η κάτω βαθμίδα για το χρώμα φόντου (αυτή τη στιγμή δεν υποστηρίζεται) - - - - Background image - Εικόνα φόντου - - - - An optional image to display as background - Προαιρετική εικόνα για προβολή ως φόντο - - - - Background text color - Χρώμα κειμένου φόντου - - - - The color of the version text - Το χρώμα κειμένου έκδοσης - - - - Page background color - Χρώμα Φόντου Σελίδας - - - + The background of the main start page area Το φόντο της περιοχής της Αρχικής Σελίδας - - Page text color - Χρώμα κειμένου σελίδας + + Background color + Χρώμα υποβάθρου - - The color of the text on the main pages - Το χρώμα του κειμένου στις κύριες σελίδες - - - - Box background color - Χρώμα φόντου πλαισίου - - - - The background color of the boxes inside the pages - Το χρώμα φόντου των πλαισίων μέσα στις σελίδες - - - - Link color - Χρώμα συνδέσμου - - - - The color of the links - Το χρώμα των συνδέσμων - - - - Font family - Οικογένεια γραμματοσειράς - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Η γραμματοσειρά που θα χρησιμοποιηθεί στην αρχική σελίδα. Μπορεί να είναι ένα όνομα γραμματοσειράς ή μια σειρά γραμματοσειρών με εφεδρικές γραμματοσειρές - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - Το μέγεθος γραμματοσειράς που θα χρησιμοποιηθεί για όλα τα κείμενα της σελίδας Έναρξη - - - - px - px - - - - Open links - Άνοιγμα συνδέσμων - - - + in FreeCAD στο FreeCAD - + In external browser Σε εξωτερικό πρόγραμμα περιήγησης - - Use gradient for New File icon - Χρήση διαβάθμισης για νέο εικονίδιο αρχείου + + Background color down gradient + Χρώμα φόντου προς τα κάτω - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Αν επιλεχθεί, το εικονίδιο 'Νέο Αρχείο' εμφανίζει ένα εικονίδιο διαβάθμισης αντί για το κανονικό εικονίδιο + + The color of the version text + Το χρώμα κειμένου έκδοσης - + + Link color + Χρώμα συνδέσμου + + + + An optional image to display as background + Προαιρετική εικόνα για προβολή ως φόντο + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Εάν αυτό είναι επιλεγμένο στις Γενικές προτιμήσεις, θα χρησιμοποιηθεί και θα αντικαταστήσει τα παρακάτω χρώματα + + + + Page background color + Χρώμα Φόντου Σελίδας + + + + The color of the text on the main pages + Το χρώμα του κειμένου στις κύριες σελίδες + + + + Background image + Εικόνα φόντου + + + + Page text color + Χρώμα κειμένου σελίδας + + + + The color of the links + Το χρώμα των συνδέσμων + + + + The background color of the boxes inside the pages + Το χρώμα φόντου των πλαισίων μέσα στις σελίδες + + + + Box background color + Χρώμα φόντου πλαισίου + + + + The background color behind the panels + Το χρώμα φόντου πίσω από τους πίνακες + + + + The down gradient for the background color (currently unsupported) + Η κάτω βαθμίδα για το χρώμα φόντου (αυτή τη στιγμή δεν υποστηρίζεται) + + + + Open links + Άνοιγμα συνδέσμων + + + + Background text color + Χρώμα κειμένου φόντου + + + + Use FreeCAD style sheet + Χρήση φύλλου στυλ FreeCAD + + + + Font family + Οικογένεια γραμματοσειράς + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Η γραμματοσειρά που θα χρησιμοποιηθεί στην αρχική σελίδα. Μπορεί να είναι ένα όνομα γραμματοσειράς ή μια σειρά γραμματοσειρών με εφεδρικές γραμματοσειρές + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + Το μέγεθος γραμματοσειράς που θα χρησιμοποιηθεί για όλα τα κείμενα της σελίδας Έναρξη + + + + + px + px + + + Options Επιλογές - - Switch workbench after loading - Εναλλαγή πάγκου εργασίας μετά τη φόρτωση - - - - Choose which workbench to switch to after the program launches - Επιλέξτε τον πάγκο εργασίας στον οποίο θα μεταβείτε μετά την έναρξη του προγράμματος - - - - Close start page after loading - Κλείσιμο αρχικής σελίδας μετά τη φόρτωση - - - + If checked, will automatically close the Start page when FreeCAD launches Αν ενεργοποιηθεί, θα κλείσει αυτόματα η σελίδα Έναρξης όταν ξεκινήσει το FreeCAD - + + Switch workbench after loading + Εναλλαγή πάγκου εργασίας μετά τη φόρτωση + + + + Close start page after loading + Κλείσιμο αρχικής σελίδας μετά τη φόρτωση + + + Close and switch on opening file Κλείσιμο και εναλλαγή στο αρχείο ανοίγματος - + If application is started by opening a file, apply the two settings above Αν η εφαρμογή ξεκινά ανοίγοντας ένα αρχείο, εφαρμόστε τις δύο παραπάνω ρυθμίσεις - Workbench + DlgStartPreferencesAdvanced - - - Start page - Αρχική σελίδα - - - - StartPage - - - Start - Εκκίνηση + + Advanced + Advanced - - Documents - Έγγραφα + + Custom HTML Template + Custom HTML Template - - Help - Βοήθεια + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Δραστηριότητα + + Custom CSS + Custom CSS - - Recent files - Πρόσφατα αρχεία - - - - Tip - Συμβουλή - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Προσαρμόστε τον αριθμό των προσφάτων αρχείων που εμφανίζονται εδώ, από το μενού Επεξεργασία->Προτιμήσεις->Γενικά->Μέγεθος λίστας προσφάτων αρχείων - - - - Examples - Παραδείγματα - - - - General documentation - Γενικές Οδηγίες - - - - User hub - Ενότητα Χρηστών - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Αυτή η ενότητα περιλαμβάνει οδηγίες χρήσης για τους χρήστες του FreeCAD: μια λίστα με όλα τα προγράμματα της εργαλειοθήκης, αναλυτικές οδηγίες για την εγκατάσταση και χρήση του FreeCAD, γρήγορα μαθήματα, και όλα όσα χρειάζεστε για να ξεκινήσετε. - - - - Power users hub - Ενότητα Προχωρημένων Χρηστών - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Η ενότητα αυτή περιλαμβάνει οδηγίες για προχωρημένους χρήστες και άτομα που ενδιαφέρονται για την σύνταξη python scripts. Επίσης, θα βρείτε μια συλλογή μακροεντολών, καθώς και οδηγίες πώς να τις εγκαταστήσετε και περισσότερες πληροφορίες για να προσαρμόσετε το FreeCAD στις δικές σας ανάγκες. - - - - Developers hub - Ενότητα Προγραμματιστών - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Αυτή η ενότητα περιέχει πληροφορίες για προγραμματιστές: Πώς να μεταγλωττίσετε μόνοι σας το FreeCAD, πώς είναι δομημένος ο πηγαίος κώδικας του FreeCAD + πώς να περιηγηθείτε σε αυτόν, πώς να αναπτύξετε νέους πάγκους εργασίας και/ή να ενσωματώσετε το FreeCAD στη δική σας εφαρμογή. - - - - Manual - Εγχειρίδιο Χρήσης - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Το εγχειρίδιο του FreeCAD είναι ένας άλλος τρόπος παρουσίασης των πληροφοριών που περιέχονται στο wiki. Είναι κατασκευασμένο για να διαβαστεί σαν ένα βιβλίο, και εμφανίζονται σε πολλές σελίδες στους παραπάνω συνδέσμους. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">εκδόσεις ηλεκτρονικού βιβλίου</a> είναι επίσης διαθέσιμες. - - - - Workbenches documentation - Οδηγίες χρήσης προγραμμάτων Εργαλειοθήκης - - - - These are the help pages of all the workbenches currently installed on this computer. - Αυτές είναι οι σελίδες βοήθειας όλων των πάγκων εργασίας που είναι εγκατεστημένοι σε αυτόν τον υπολογιστή. - - - - Getting help from the community - Λήψη βοήθειας από την κοινότητα - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - Το φόρουμ <a href="http://forum.freecad.org">FreeCAD</a> είναι ένα εξαιρετικό μέρος για να λάβετε βοήθεια από άλλους χρήστες και προγραμματιστές του FreeCAD. Το φόρουμ έχει πολλές ενότητες για διαφορετικούς τύπους θεμάτων και θεμάτων συζήτησης. Αν έχετε αμφιβολίες, δημοσιεύστε τη βοήθεια <a href="https://forum.freecad.org/viewforum.php?f=3">στην ενότητα FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Αν είναι η πρώτη φορά που δημοσιεύετε στο φόρουμ, να είστε βέβαιος να <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">διαβάσετε τις κατευθυντήριες γραμμές</a> πρώτα! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - Το FreeCAD διατηρεί επίσης ένα δημόσιο <a href="https://www.freecad.org/tracker">bug tracker</a> όπου ο καθένας μπορεί να υποβάλει σφάλματα και να προτείνει νέα χαρακτηριστικά. Για να αποφύγετε την πρόκληση επιπλέον εργασίας και να δώσετε τις καλύτερες πιθανότητες να δείτε το σφάλμα σας να λυθεί, Σιγουρευτείτε ότι διαβάσατε τον οδηγό υποβολής σφαλμάτων <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"></a> πριν δημοσιεύσετε. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Παρακάτω είναι οι τελευταίες αλλαγές που προστίθενται στον πηγαίο κώδικα <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD</a>. Αυτές οι αλλαγές ενδέχεται να μην αντικατοπτρίζουν ακόμα την έκδοση του FreeCAD που εκτελείτε αυτή τη στιγμή. Ελέγξτε τις <a href="https://www.freecad.org/wiki/Downloads">διαθέσιμες επιλογές</a> αν θέλετε να αποκτήσετε μια έκδοση για ανάπτυξη. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Οι τελευταίες δημοσιεύσεις στο φόρουμ <a href="https://forum.freecad.org">FreeCAD</a>: - - - - Available addons - Διαθέσιμα πρόσθετα - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Παρακάτω υπάρχει μια λίστα με τους επιπλέον διαθέσιμους πάγκους εργασίας που μπορούν να προστεθούν στην εγκατάσταση του FreeCAD. Περιηγηθείτε και εγκαταστήστε τα από το μενού Εργαλεία -> Διαχειριστής Πρόσθετων. Μπορείτε να μάθετε περισσότερα για οποιοδήποτε από αυτούς κάνοντας κλικ στους παρακάτω συνδέσμους. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Εάν δε συνοδεύεται από την έκδοση του FreeCAD, εγκαταστήστε το πακέτο οδηγιών FreeCAD για να λάβετε βοήθεια στον πάγκο εργασίας και οδηγίες εντολών χωρίς σύνδεση στο Διαδίκτυο. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Αν δεν είναι δυνατή η ανάκτηση πληροφοριών από το GitHub. <a href="EnableDownload.py">Εξουσιοδοτήστε το FreeCAD για πρόσβαση στο διαδίκτυο</a> και φορτώστε ξανά την Αρχική σελίδα. - - - - Recent commits - Πρόσφατες προσθήκες - - - - See all commits on github - Δείτε όλες τις προσθήκες στο github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Μπορείτε να ρυθμίσετε έναν δικό σας φάκελο να προβάλλεται σε αυτό το σημείο, στο μενού Επεξεργασία->Προτιμήσεις->Αρχική->Προσαρμοσμένος φάκελος - - - - version - έκδοση - - - - build - κατασκευή - - - - Create new... - Δημιουργία νέου... - - - - Unknown - Άγνωστο - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Για να ανοίξετε οποιονδήποτε από τους παραπάνω συνδέσμους στο πρόγραμμα περιήγησης του υπολογιστή σας, κάντε δεξί κλικ -> Άνοιγμα σε εξωτερικό πρόγραμμα περιήγησης - - - - Creation date - Ημερομηνία δημιουργίας - - - - Last modification - Τελευταία τροποποίηση - - - - Notes - Σημειώσεις - - - - Open start page preferences - Προτιμήσεις σελίδας έναρξης + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Εκκίνηση diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_es-AR.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_es-AR.ts index 1d84e4715a..915b9b2a93 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_es-AR.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_es-AR.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Inicio + + + + Welcome to FreeCAD + Le damos la bienvenida a FreeCAD + + + + Documents + Documentos + + + + Help + Ayuda + + + + Activity + Actividad + + + + Blog + Blog + + + + Link to the FreeCAD blog + Enlace al blog de FreeCAD + + + + New file + Archivo nuevo + + + + Empty File + Archivo vacío + + + + Create an empty FreeCAD file + Crear un archivo de FreeCAD vacío + + + + Open File + Abrir archivo + + + + Open an existing CAD file or 3D model + Abrir un archivo CAD existente o un modelo 3D + + + + Standard Part + Parte estándar + + + + Create a part with the Part Design workbench + Crea una pieza con el entorno de trabajo Part Design + + + + 2D Draft + Dibujo 2D + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Arquitectura + + + + Create an architecture project + Crear un proyecto de arquitectura + + + + Recent files + Archivos recientes + + + + Tip + Sugerencia + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Configurá el número de archivos recientes que se muestran en la lista, en el menú Editar -> Preferencias -> General -> Tamaño de la lista de archivos recientes + + + + Examples + Ejemplos + + + + General documentation + Documentación general + + + + User hub + Usuarios en general + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Esta sección contiene documentación útil para los usuarios de FreeCAD en general: una lista de todos los bancos de trabajo, instrucciones detalladas sobre cómo instalar y usar FreeCAD, tutoriales y todo lo que necesitás para empezar. + + + + Power users hub + Usuarios avanzados + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Esta sección recopila documentación para usuarios experimentados y personas interesadas en escribir scripts de Python. También encontrarás un repositorio de macros, instrucciones sobre cómo instalarlas y usarlas, y más información sobre cómo personalizar FreeCAD para tus necesidades específicas. + + + + Developers hub + Desarrolladores + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Esta sección contiene material para desarrolladores: cómo compilar FreeCAD vos mismo, cómo está estructurado el código fuente de FreeCAD y cómo navegar en él, cómo desarrollar nuevos entornos de trabajo, y/o integrar FreeCAD en tu propia aplicación. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + El manual de FreeCAD es una forma más lineal de presentar la información contenida en este wiki. Está hecho para ser leído como un libro y te introducirá fácilmente en muchas otras páginas de las secciones anteriores. También están disponibles versiones en formato de <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">libros electrónicos</a>. + + + + Workbenches documentation + Documentación de bancos de trabajo + + + + These are the help pages of all the workbenches currently installed on this computer. + Estas son las páginas de ayuda de todos los entornos de trabajo instalados actualmente en esta computadora. + + + + Getting help from the community + Obteniendo ayuda de la comunidad + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + El foro <a href="http://forum.freecad.org">FreeCAD</a> es un buen lugar para obtener ayuda de otros usuarios y desarrolladores de FreeCAD. El foro tiene muchas secciones para diferentes tipos de temas y temas de discusión. En caso de duda, publique en la sección <a href="https://forum.freecad.org/viewforum.php?f=3">Ayuda general sobre el uso de FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Si es la primera vez que publicas en el foro, ¡asegúrate de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">leer las pautas</a> primero! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD también mantiene un <a href="https://www.freecad.org/tracker">rastreador de errores público</a> donde cualquiera puede enviar errores y proponer nuevas características. Para evitar causar trabajo adicional y dar las mejores posibilidades de ver tu error resuelto, asegúrate de leer la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guía de envío de errores</a> antes de publicar. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + A continuación se muestran los últimos cambios añadidos al <a href="http://github.com/FreeCAD/FreeCAD/">código fuente de FreeCAD</a>. Estos cambios pueden no reflejar aún en la versión de FreeCAD que está ejecutando actualmente. Revisa las <a href="https://www.freecad.org/wiki/Downloads">opciones disponibles</a> si deseas obtener una versión de desarrollo. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Las últimas publicaciones en el foro <a href="https://forum.freecad.org">de FreeCAD</a>: + + + + Available addons + Complementos disponibles + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + A continuación se muestra una lista de los entornos de trabajo adicionales disponibles que se pueden agregar a tu instalación de FreeCAD. Examinalos e instalalos desde el menú Herramientas -> Gestor de complementos. Podés obtener más información sobre cualquiera de ellos haciendo clic en los enlaces a continuación. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Si no está incluido con tu versión de FreeCAD, instalá el paquete de documentación de FreeCAD para obtener los centros de documentación, la ayuda del banco de trabajo y la documentación de comandos individuales sin conexión a Internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + No se puede obtener información de GitHub. <a href="EnableDownload.py"> Autorizá a FreeCAD a acceder a Internet </a> y volvé a cargar la página de inicio. + + + + Recent commits + Últimos cambios confirmados + + + + See all commits on github + Ver todos los cambios confirmados en GitHub + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Podés configurar una carpeta personalizada para mostrar acá en el menú Editar -> Preferencias -> Inicio -> Mostrar carpeta adicional + + + + version + versión + + + + build + Compilación + + + + Create new... + Crear nuevo... + + + + Unknown + Desconocido + + + + Forum + Foro + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Para abrir cualquiera de los enlaces anteriores en tu navegador de escritorio, hacé clic con el botón derecho del mouse -> Abrir en navegador externo + + + + Creation date + Fecha de creación + + + + Last modification + Última modificación + + + + Notes + Notas + + + + Open start page preferences + Abrir preferencias de página de inicio + + + + Workbench + + + + Start page + Página de inicio + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opciones de página de inicio - - - - Start page template - Plantilla de página de inicio - - - - An optional HTML template that will be used instead of the default start page. - Una plantilla HTML opcional que será utilizada en lugar de la página de inicio predeterminada. - - - + Contents Contenido - - Show notepad - Mostrar panel de notas + + Show forum + Mostrar foro - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Muestra un bloc de notas junto a las miniaturas del archivo, donde podés mantener notas entre sesiones - - - + Show examples folder contents Mostrar el contenido de la carpeta de ejemplos - - If you want the examples to show on the first page - Si querés que se muestren los ejemplos en la página de inicio - - - + Show additional folder Mostrar carpeta de usuario - + + If you want the examples to show on the first page + Si querés que se muestren los ejemplos en la página de inicio + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Si esta opción esta seleccionada, las últimas publicaciones del foro de FreeCAD se mostrarán en la pestaña de Actividad + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Una carpeta personalizada opcional que se mostrará en la parte inferior de la primera página. Al usar ";;" para separar las rutas, puede añadir varias carpetas aquí - - Show forum - Mostrar foro + + Show notepad + Mostrar panel de notas - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Si esta opción esta seleccionada, las últimas publicaciones del foro de FreeCAD se mostrarán en la pestaña de Actividad + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Muestra un bloc de notas junto a las miniaturas del archivo, donde podés mantener notas entre sesiones - + Show tips Mostrar consejos - + + General + General + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Muestra sugerencias en la pestaña Documentos de la Pagina de Inicio - - Show scrollbars - Mostrar barras de desplazamiento + + File thumbnail size + Tamaño de la miniatura del archivo - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Fuentes y colores - - Use FreeCAD style sheet - Usar una hoja de estilo personalizada - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Si se selecciona, y se especifica una hoja de estilo en las preferencias generales, se utilizará y anulará los colores a continuación - - - - Background color - Color de fondo - - - - The background color behind the panels - El color de fondo detrás de los paneles - - - - Background color down gradient - Color de fondo en degradé - - - - The down gradient for the background color (currently unsupported) - El degradado para el color de fondo (actualmente no soportado) - - - - Background image - Imagen de fondo - - - - An optional image to display as background - Una imagen opcional para mostrar como fondo - - - - Background text color - Color de fondo del texto - - - - The color of the version text - El color del texto de la versión - - - - Page background color - Color de fondo de página - - - + The background of the main start page area El fondo del área principal de la página de inicio - - Page text color - Color del texto de la página + + Background color + Color de fondo - - The color of the text on the main pages - El color del texto en las páginas principales - - - - Box background color - Color de fondo de la caja - - - - The background color of the boxes inside the pages - El color de fondo de las cajas dentro de las páginas - - - - Link color - Color de enlace - - - - The color of the links - El color de los enlaces - - - - Font family - Tipo de fuente - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - La familia de fuentes para usar en la página de inicio. Puede ser un nombre de fuente o una serie de fuentes alternativas separadas por comas - - - - Arial,Helvetica,sans - Arial, Courier New, Tahoma, Osifont - - - - The base font size to use for all texts of the Start page - El tamaño de fuente base para ser utilizado en todos los textos de la Página de inicio - - - - px - px - - - - Open links - Enlaces abiertos - - - + in FreeCAD en FreeCAD - + In external browser En navegador externo - - Use gradient for New File icon - Usar degradado para el icono de Archivo Nuevo + + Background color down gradient + Color de fondo en degradé - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Si se selecciona esta opción, el icono 'Nuevo archivo' mostrará un icono en degradé en lugar del icono normal + + The color of the version text + El color del texto de la versión - + + Link color + Color de enlace + + + + An optional image to display as background + Una imagen opcional para mostrar como fondo + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Si se selecciona, y se especifica una hoja de estilo en las preferencias generales, se utilizará y anulará los colores a continuación + + + + Page background color + Color de fondo de página + + + + The color of the text on the main pages + El color del texto en las páginas principales + + + + Background image + Imagen de fondo + + + + Page text color + Color del texto de la página + + + + The color of the links + El color de los enlaces + + + + The background color of the boxes inside the pages + El color de fondo de las cajas dentro de las páginas + + + + Box background color + Color de fondo de la caja + + + + The background color behind the panels + El color de fondo detrás de los paneles + + + + The down gradient for the background color (currently unsupported) + El degradado para el color de fondo (actualmente no soportado) + + + + Open links + Enlaces abiertos + + + + Background text color + Color de fondo del texto + + + + Use FreeCAD style sheet + Usar una hoja de estilo personalizada + + + + Font family + Tipo de fuente + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + La familia de fuentes para usar en la página de inicio. Puede ser un nombre de fuente o una serie de fuentes alternativas separadas por comas + + + + Arial,Helvetica,sans + Arial, Courier New, Tahoma, Osifont + + + + The base font size to use for all texts of the Start page + El tamaño de fuente base para ser utilizado en todos los textos de la Página de inicio + + + + + px + px + + + Options Opciones - - Switch workbench after loading - Cambiar el banco de trabajo después de cargar - - - - Choose which workbench to switch to after the program launches - Elige el banco de trabajo al que cambiar después del lanzamiento del programa - - - - Close start page after loading - Cerrar página de inicio después de cargar - - - + If checked, will automatically close the Start page when FreeCAD launches Si está marcado, cerrará automáticamente la página de inicio cuando FreeCAD comience - + + Switch workbench after loading + Cambiar el banco de trabajo después de cargar + + + + Close start page after loading + Cerrar página de inicio después de cargar + + + Close and switch on opening file Cerrar y cambiar al abrir el archivo - + If application is started by opening a file, apply the two settings above Si FreeCAD se inicia abriendo un archivo, se aplican los dos ajustes anteriores - Workbench + DlgStartPreferencesAdvanced - - - Start page - Página de inicio - - - - StartPage - - - Start - Inicio + + Advanced + Avanzado - - Documents - Documentos + + Custom HTML Template + Plantilla HTML personalizada - - Help - Ayuda + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Actividad + + Custom CSS + CSS personalizado - - Recent files - Archivos recientes - - - - Tip - Sugerencia - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Configurá el número de archivos recientes que se muestran en la lista, en el menú Editar -> Preferencias -> General -> Tamaño de la lista de archivos recientes - - - - Examples - Ejemplos - - - - General documentation - Documentación general - - - - User hub - Usuarios en general - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Esta sección contiene documentación útil para los usuarios de FreeCAD en general: una lista de todos los bancos de trabajo, instrucciones detalladas sobre cómo instalar y usar FreeCAD, tutoriales y todo lo que necesitás para empezar. - - - - Power users hub - Usuarios avanzados - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Esta sección recopila documentación para usuarios experimentados y personas interesadas en escribir scripts de Python. También encontrarás un repositorio de macros, instrucciones sobre cómo instalarlas y usarlas, y más información sobre cómo personalizar FreeCAD para tus necesidades específicas. - - - - Developers hub - Desarrolladores - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Esta sección contiene material para desarrolladores: cómo compilar FreeCAD vos mismo, cómo está estructurado el código fuente de FreeCAD y cómo navegar en él, cómo desarrollar nuevos entornos de trabajo, y/o integrar FreeCAD en tu propia aplicación. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - El manual de FreeCAD es una forma más lineal de presentar la información contenida en este wiki. Está hecho para ser leído como un libro y te introducirá fácilmente en muchas otras páginas de las secciones anteriores. También están disponibles versiones en formato de <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">libros electrónicos</a>. - - - - Workbenches documentation - Documentación de bancos de trabajo - - - - These are the help pages of all the workbenches currently installed on this computer. - Estas son las páginas de ayuda de todos los entornos de trabajo instalados actualmente en esta computadora. - - - - Getting help from the community - Obteniendo ayuda de la comunidad - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - El foro <a href="http://forum.freecad.org">FreeCAD</a> es un buen lugar para obtener ayuda de otros usuarios y desarrolladores de FreeCAD. El foro tiene muchas secciones para diferentes tipos de temas y temas de discusión. En caso de duda, publique en la sección <a href="https://forum.freecad.org/viewforum.php?f=3">Ayuda general sobre el uso de FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Si es la primera vez que publicas en el foro, ¡asegúrate de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">leer las pautas</a> primero! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD también mantiene un <a href="https://www.freecad.org/tracker">rastreador de errores público</a> donde cualquiera puede enviar errores y proponer nuevas características. Para evitar causar trabajo adicional y dar las mejores posibilidades de ver tu error resuelto, asegúrate de leer la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guía de envío de errores</a> antes de publicar. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - A continuación se muestran los últimos cambios añadidos al <a href="http://github.com/FreeCAD/FreeCAD/">código fuente de FreeCAD</a>. Estos cambios pueden no reflejar aún en la versión de FreeCAD que está ejecutando actualmente. Revisa las <a href="https://www.freecad.org/wiki/Downloads">opciones disponibles</a> si deseas obtener una versión de desarrollo. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Las últimas publicaciones en el foro <a href="https://forum.freecad.org">de FreeCAD</a>: - - - - Available addons - Complementos disponibles - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - A continuación se muestra una lista de los entornos de trabajo adicionales disponibles que se pueden agregar a tu instalación de FreeCAD. Examinalos e instalalos desde el menú Herramientas -> Gestor de complementos. Podés obtener más información sobre cualquiera de ellos haciendo clic en los enlaces a continuación. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Si no está incluido con tu versión de FreeCAD, instalá el paquete de documentación de FreeCAD para obtener los centros de documentación, la ayuda del banco de trabajo y la documentación de comandos individuales sin conexión a Internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - No se puede obtener información de GitHub. <a href="EnableDownload.py"> Autorizá a FreeCAD a acceder a Internet </a> y volvé a cargar la página de inicio. - - - - Recent commits - Últimos cambios confirmados - - - - See all commits on github - Ver todos los cambios confirmados en GitHub - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Podés configurar una carpeta personalizada para mostrar acá en el menú Editar -> Preferencias -> Inicio -> Mostrar carpeta adicional - - - - version - versión - - - - build - Compilación - - - - Create new... - Crear nuevo... - - - - Unknown - Desconocido - - - - Forum - Foro - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Para abrir cualquiera de los enlaces anteriores en tu navegador de escritorio, hacé clic con el botón derecho del mouse -> Abrir en navegador externo - - - - Creation date - Fecha de creación - - - - Last modification - Última modificación - - - - Notes - Notas - - - - Open start page preferences - Abrir preferencias de página de inicio + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Inicio diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_es-ES.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_es-ES.ts index 865ae80025..babcc87499 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_es-ES.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_es-ES.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Inicio + + + + Welcome to FreeCAD + Le damos la bienvenida a FreeCAD + + + + Documents + Documentos + + + + Help + Ayuda + + + + Activity + Actividad + + + + Blog + Blog + + + + Link to the FreeCAD blog + Enlace al blog de FreeCAD + + + + New file + Archivo nuevo + + + + Empty File + Archivo vacío + + + + Create an empty FreeCAD file + Crear un archivo de FreeCAD vacío + + + + Open File + Abrir archivo + + + + Open an existing CAD file or 3D model + Abrir un archivo CAD existente o un modelo 3D + + + + Standard Part + Parte estándar + + + + Create a part with the Part Design workbench + Crea una pieza con el entorno de trabajo Part Design + + + + 2D Draft + Dibujo 2D + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Arquitectura + + + + Create an architecture project + Crear un proyecto de arquitectura + + + + Recent files + Recent files + + + + Tip + Sugerencia + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Ajuste la cantidad de archivos recientes que se muestran aquí en el menú Editar -> Preferencias -> General -> Tamaño de la lista de archivos recientes + + + + Examples + Ejemplos + + + + General documentation + Documentación General + + + + User hub + Centro de actividad de usuario + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Esta sección contiene documentación útil para los usuarios de FreeCAD en general: una lista de todos los entornos de trabajo, instrucciones detalladas sobre cómo instalar y usar la aplicación FreeCAD, tutoriales y todo lo que necesita para comenzar. + + + + Power users hub + Centro de actividad de usuarios avanzados + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Esta sección recopila documentación para usuarios avanzados y personas interesadas en escribir scripts de Python. También encontrará un repositorio de macros, instrucciones sobre cómo instalarlas y usarlas, y más información sobre cómo personalizar FreeCAD para sus necesidades específicas. + + + + Developers hub + Centro de actividad de desarrolladores + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Esta sección contiene material para desarrolladores: cómo compilar FreeCAD usted mismo, cómo está estructurado el código fuente de FreeCAD y cómo navegar en él, cómo desarrollar nuevos entornos de trabajo, y/o integrar FreeCAD en su propia aplicación. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + El manual de FreeCAD es otra forma más lineal de presentar la información contenida en este wiki. Está hecho para ser leído como un libro y le presentará gentilmente muchas otras páginas de los centros anteriores. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> versiones de libros electrónicos </a> también están disponibles. + + + + Workbenches documentation + Documentación de entornos de trabajo + + + + These are the help pages of all the workbenches currently installed on this computer. + Estas son las páginas de ayuda de todos los entornos de trabajo instalados actualmente en esta computadora. + + + + Getting help from the community + Obteniendo ayuda de la comunidad + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + El <a href="http://forum.freecad.org"> foro de FreeCAD </a> es un excelente lugar para obtener ayuda de otros usuarios y desarrolladores de FreeCAD. El foro tiene muchas secciones para diferentes tipos de problemas y temas de discusión. En caso de duda, publique en la sección <a href="https://forum.freecad.org/viewforum.php?f=3"> Ayuda sobre el uso de FreeCAD </a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Si es la primera vez que publicas en el foro, ¡asegúrate de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">leer las pautas</a> primero! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD también mantiene un <a href="https://www.freecad.org/tracker"> rastreador de errores </a> público donde cualquier persona puede reportar errores y proponer nuevas funcionalidades. Para evitar causar trabajo extra y tener la mejor oportunidad para resolver su error, asegúrese de leer la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> guía de envío de errores </a> antes de publicar. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + A continuación se muestran los últimos cambios agregados al <a href="http://github.com/FreeCAD/FreeCAD/"> código fuente de FreeCAD </a>. Es posible que estos cambios aún no se reflejen en la versión de FreeCAD que está ejecutando actualmente. Marque las <a href="https://www.freecad.org/wiki/Downloads"> opciones disponibles </a> si desea obtener una versión de desarrollo. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Las últimas publicaciones en el <a href="https://forum.freecad.org"> foro de FreeCAD</a>: + + + + Available addons + Complementos disponibles + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + A continuación se muestra una lista de los entornos de trabajo adicionales disponibles que se pueden agregar a su instalación de FreeCAD. Examínelos e instálelos desde el menú Herramientas -> Administrador de complementos. Puede obtener más información sobre cualquiera de ellos haciendo clic en los enlaces a continuación. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Si no está incluido con su versión de FreeCAD, instale el paquete de documentación de FreeCAD para obtener los centros de documentación, la ayuda de entorno de trabajo y la documentación de comandos individuales sin conexión a Internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + No se puede obtener información de GitHub. <a href="EnableDownload.py"> Autorice a FreeCAD a acceder a Internet </a> y vuelva a cargar la página de inicio. + + + + Recent commits + Últimos cambios + + + + See all commits on github + Ver todos los cambios confirmados en GitHub + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Puede configurar una carpeta personalizada para mostrar aquí en el menú Editar -> Preferencias -> Inicio -> Mostrar carpeta adicional + + + + version + versión + + + + build + compilación + + + + Create new... + Crear nuevo... + + + + Unknown + Desconocido + + + + Forum + Foro + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Para abrir cualquiera de los enlaces anteriores en su navegador de escritorio, haga clic con el botón derecho del mouse -> Abrir en navegador externo + + + + Creation date + Fecha de creación + + + + Last modification + Última modificación + + + + Notes + Notas + + + + Open start page preferences + Abrir preferencias de página de inicio + + + + Workbench + + + + Start page + Página de inicio + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opciones de página de inicio - - - - Start page template - Plantilla de página de inicio - - - - An optional HTML template that will be used instead of the default start page. - Una plantilla HTML opcional que será utilizada en lugar de la página de inicio predeterminada. - - - + Contents Contenido - - Show notepad - Mostrar Bloc de notas + + Show forum + Mostrar foro - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Muestra un bloc de notas junto a las miniaturas del archivo, donde puedes mantener notas entre sesiones - - - + Show examples folder contents Mostrar el contenido de la carpeta de ejemplos - - If you want the examples to show on the first page - Si quieres los ejemplos mostrándose en la primera página - - - + Show additional folder Mostrar carpeta de usuario - + + If you want the examples to show on the first page + Si quieres los ejemplos mostrándose en la primera página + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Si esta opción esta seleccionada, las últimas publicaciones del foro de FreeCAD se mostrarán en la pestaña de Actividad + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Una carpeta personalizada opcional que se mostrará en la parte inferior de la primera página. Mediante el uso de ";;" para separar rutas, puede agregar varias carpetas aquí - - Show forum - Mostrar foro + + Show notepad + Mostrar Bloc de notas - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Si esta opción esta seleccionada, las últimas publicaciones del foro de FreeCAD se mostrarán en la pestaña de Actividad + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Muestra un bloc de notas junto a las miniaturas del archivo, donde puedes mantener notas entre sesiones - + Show tips Mostrar consejos - + + General + General + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Muestra consejos de ayuda en la pestaña Iniciar área de trabajo de Documentos - - Show scrollbars - Mostrar barras de desplazamiento + + File thumbnail size + Tamaño de la miniatura del archivo - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Fuentes y colores - - Use FreeCAD style sheet - Utilice la hoja de estilo FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Si se selecciona, y se especifica una hoja de estilo en las preferencias generales, se utilizará y anulará los colores a continuación - - - - Background color - Color de fondo - - - - The background color behind the panels - El color de fondo detrás de los paneles - - - - Background color down gradient - Color del gradiente de fondo - - - - The down gradient for the background color (currently unsupported) - El degradado para el color de fondo (actualmente no soportado) - - - - Background image - Imagen de fondo - - - - An optional image to display as background - Una imagen opcional para que aparezca como fondo - - - - Background text color - Color de fondo del texto - - - - The color of the version text - El color del texto de la versión - - - - Page background color - Color de fondo de página - - - + The background of the main start page area El fondo del área principal de la página de inicio - - Page text color - Color del texto de la página + + Background color + Color de fondo - - The color of the text on the main pages - El color del texto en las páginas principales - - - - Box background color - Color de fondo de la caja - - - - The background color of the boxes inside the pages - El color de fondo de las cajas dentro de las páginas - - - - Link color - Color del enlace - - - - The color of the links - El color de los enlaces - - - - Font family - Tipo de fuente - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - La familia de fuentes para usar en la página de inicio. Puede ser un nombre de fuente o una serie de fuentes alternativas separadas por comas - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - El tamaño de fuente base para ser utilizado en todos los textos de la Página de inicio - - - - px - px - - - - Open links - Enlaces abiertos - - - + in FreeCAD en FreeCAD - + In external browser En navegador externo - - Use gradient for New File icon - Usar degradado para el icono de Archivo Nuevo + + Background color down gradient + Color del gradiente de fondo - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Si se selecciona esta opción, el icono 'Nuevo archivo' muestra un icono de degradado en lugar del icono normal + + The color of the version text + El color del texto de la versión - + + Link color + Color del enlace + + + + An optional image to display as background + Una imagen opcional para que aparezca como fondo + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Si se selecciona, y se especifica una hoja de estilo en las preferencias generales, se utilizará y anulará los colores a continuación + + + + Page background color + Color de fondo de página + + + + The color of the text on the main pages + El color del texto en las páginas principales + + + + Background image + Imagen de fondo + + + + Page text color + Color del texto de la página + + + + The color of the links + El color de los enlaces + + + + The background color of the boxes inside the pages + El color de fondo de las cajas dentro de las páginas + + + + Box background color + Color de fondo de la caja + + + + The background color behind the panels + El color de fondo detrás de los paneles + + + + The down gradient for the background color (currently unsupported) + El degradado para el color de fondo (actualmente no soportado) + + + + Open links + Enlaces abiertos + + + + Background text color + Color de fondo del texto + + + + Use FreeCAD style sheet + Utilice la hoja de estilo FreeCAD + + + + Font family + Tipo de fuente + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + La familia de fuentes para usar en la página de inicio. Puede ser un nombre de fuente o una serie de fuentes alternativas separadas por comas + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + El tamaño de fuente base para ser utilizado en todos los textos de la Página de inicio + + + + + px + px + + + Options Opciones - - Switch workbench after loading - Cambiar el entorno de trabajo después de la carga - - - - Choose which workbench to switch to after the program launches - Elija el banco de trabajo al que cambiar después del lanzamiento del programa - - - - Close start page after loading - Cerrar página de inicio después de cargar - - - + If checked, will automatically close the Start page when FreeCAD launches Si está marcado, cerrará automáticamente la página de inicio cuando FreeCAD comience - + + Switch workbench after loading + Cambiar el entorno de trabajo después de la carga + + + + Close start page after loading + Cerrar página de inicio después de cargar + + + Close and switch on opening file Cerrar y cambiar al abrir el archivo - + If application is started by opening a file, apply the two settings above Si FreeCAD se inicia abriendo un archivo, se aplican los dos ajustes anteriores - Workbench + DlgStartPreferencesAdvanced - - - Start page - Página de inicio - - - - StartPage - - - Start - Inicio + + Advanced + Avanzado - - Documents - Documentos + + Custom HTML Template + Plantilla HTML personalizada - - Help - Ayuda + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Actividad + + Custom CSS + CSS personalizado - - Recent files - Recent files - - - - Tip - Sugerencia - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Ajuste la cantidad de archivos recientes que se muestran aquí en el menú Editar -> Preferencias -> General -> Tamaño de la lista de archivos recientes - - - - Examples - Ejemplos - - - - General documentation - Documentación General - - - - User hub - Centro de actividad de usuario - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Esta sección contiene documentación útil para los usuarios de FreeCAD en general: una lista de todos los entornos de trabajo, instrucciones detalladas sobre cómo instalar y usar la aplicación FreeCAD, tutoriales y todo lo que necesita para comenzar. - - - - Power users hub - Centro de actividad de usuarios avanzados - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Esta sección recopila documentación para usuarios avanzados y personas interesadas en escribir scripts de Python. También encontrará un repositorio de macros, instrucciones sobre cómo instalarlas y usarlas, y más información sobre cómo personalizar FreeCAD para sus necesidades específicas. - - - - Developers hub - Centro de actividad de desarrolladores - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Esta sección contiene material para desarrolladores: cómo compilar FreeCAD usted mismo, cómo está estructurado el código fuente de FreeCAD y cómo navegar en él, cómo desarrollar nuevos entornos de trabajo, y/o integrar FreeCAD en su propia aplicación. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - El manual de FreeCAD es otra forma más lineal de presentar la información contenida en este wiki. Está hecho para ser leído como un libro y le presentará gentilmente muchas otras páginas de los centros anteriores. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> versiones de libros electrónicos </a> también están disponibles. - - - - Workbenches documentation - Documentación de entornos de trabajo - - - - These are the help pages of all the workbenches currently installed on this computer. - Estas son las páginas de ayuda de todos los entornos de trabajo instalados actualmente en esta computadora. - - - - Getting help from the community - Obteniendo ayuda de la comunidad - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - El <a href="http://forum.freecad.org"> foro de FreeCAD </a> es un excelente lugar para obtener ayuda de otros usuarios y desarrolladores de FreeCAD. El foro tiene muchas secciones para diferentes tipos de problemas y temas de discusión. En caso de duda, publique en la sección <a href="https://forum.freecad.org/viewforum.php?f=3"> Ayuda sobre el uso de FreeCAD </a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Si es la primera vez que publicas en el foro, ¡asegúrate de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">leer las pautas</a> primero! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD también mantiene un <a href="https://www.freecad.org/tracker"> rastreador de errores </a> público donde cualquier persona puede reportar errores y proponer nuevas funcionalidades. Para evitar causar trabajo extra y tener la mejor oportunidad para resolver su error, asegúrese de leer la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> guía de envío de errores </a> antes de publicar. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - A continuación se muestran los últimos cambios agregados al <a href="http://github.com/FreeCAD/FreeCAD/"> código fuente de FreeCAD </a>. Es posible que estos cambios aún no se reflejen en la versión de FreeCAD que está ejecutando actualmente. Marque las <a href="https://www.freecad.org/wiki/Downloads"> opciones disponibles </a> si desea obtener una versión de desarrollo. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Las últimas publicaciones en el <a href="https://forum.freecad.org"> foro de FreeCAD</a>: - - - - Available addons - Complementos disponibles - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - A continuación se muestra una lista de los entornos de trabajo adicionales disponibles que se pueden agregar a su instalación de FreeCAD. Examínelos e instálelos desde el menú Herramientas -> Administrador de complementos. Puede obtener más información sobre cualquiera de ellos haciendo clic en los enlaces a continuación. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Si no está incluido con su versión de FreeCAD, instale el paquete de documentación de FreeCAD para obtener los centros de documentación, la ayuda de entorno de trabajo y la documentación de comandos individuales sin conexión a Internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - No se puede obtener información de GitHub. <a href="EnableDownload.py"> Autorice a FreeCAD a acceder a Internet </a> y vuelva a cargar la página de inicio. - - - - Recent commits - Últimos cambios - - - - See all commits on github - Ver todos los cambios confirmados en GitHub - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Puede configurar una carpeta personalizada para mostrar aquí en el menú Editar -> Preferencias -> Inicio -> Mostrar carpeta adicional - - - - version - versión - - - - build - compilación - - - - Create new... - Crear nuevo... - - - - Unknown - Desconocido - - - - Forum - Foro - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Para abrir cualquiera de los enlaces anteriores en su navegador de escritorio, haga clic con el botón derecho del mouse -> Abrir en navegador externo - - - - Creation date - Fecha de creación - - - - Last modification - Última modificación - - - - Notes - Notas - - - - Open start page preferences - Abrir preferencias de página de inicio + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Inicio diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts index 3232e22935..d7a053395f 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_eu.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Hasi + + + + Welcome to FreeCAD + Ongi etorri FreeCAD aplikaziora + + + + Documents + Dokumentuak + + + + Help + Laguntza + + + + Activity + Jarduera + + + + Blog + Bloga + + + + Link to the FreeCAD blog + FreeCADen blogerako esteka + + + + New file + Fitxategi berria + + + + Empty File + Fitxategi hutsa + + + + Create an empty FreeCAD file + Sortu hutsik dagoen FreeCAD fitxategi bat + + + + Open File + Ireki fitxategia + + + + Open an existing CAD file or 3D model + Ireki lehendik dagoen CAD fitxategi bat edo 3D eredu bat + + + + Standard Part + Pieza estandarra + + + + Create a part with the Part Design workbench + Sortu pieza bat piezen diseinurako lan-mahaiarekin + + + + 2D Draft + 2D zirriborroa + + + + Create a 2D draft with the Draft workbench + Sortu 2D zirriborroa zirriborroen lan-mahaiarekin + + + + BIM/Architecture + BIM/Arkitektura + + + + Create an architecture project + Sortu arkitektura-proiektu bat + + + + Recent files + Azken fitxategiak + + + + Tip + Aholkua + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Hemen erakutsiko diren azken fitxategiak antolatzeko, joan 'Editatu -> Hobespenak -> Orokorra -> Azken fitxategien zerrendaren luzera' menura + + + + Examples + Adibideak + + + + General documentation + Dokumentazio orokorra + + + + User hub + Erabiltzaileen gunea + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Atal honek FreeCAD erabiltzaile orokorrentzako dokumentazio erabilgarria du: lan-mahai guztien zerrenda bat, FreeCAD aplikazioa instalatu eta erabiltzeko argibide xeheak, tutorialak, eta lanean hasteko behar duzun guztia. + + + + Power users hub + Erabiltzaile aurreratuen gunea + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Atal honek erabiltzaile aurreratuentzako eta Python scriptak idazteko interesa duten pertsonentzako dokumentazioa biltzen du. Horrez gain, makroen biltegi bat, haiek instalatu eta erabiltzeko argibideak eta FreeCADek zure beharrak bete ditzan pertsonalizatzeko informazio gehiago duzu. + + + + Developers hub + Garatzaileen gunea + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Atal honek garatzaileentzako materiala du: Nola konpilatu FreeCAD, nola dagoen FreeCAD iturburu-kodea egituratuta eta nola arakatu kode hori, nola garatu lan-mahai berriak eta nola kapsulatu FreeCAD zuk garatutako beste aplikazioren batean. + + + + Manual + Eskuliburua + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCADen eskuliburua wiki honetan dagoen informazio aurkezteko beste modu bat da. Liburu bat bailitzan irakurtzeko moduan prestatuta dago, eta goiko guneetako beste orri batzuetarako sarrera emango dizu. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">Bertsio elektronikoak</a> ere eskuragarri daude. + + + + Workbenches documentation + Lan-mahaien dokumentazioa + + + + These are the help pages of all the workbenches currently installed on this computer. + Ordenagailu honetan instalatutako lan-mahai guztien laguntza-orriak dira hauek. + + + + Getting help from the community + Eskuratu komunitatearen laguntza + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">FreeCAD foroa</a> leku ona da FreeCADen beste erabiltzaile batzuen eta garatzaileen laguntza jasotzeko. Foroak atal desberdinak ditu arazo eta eztabaida mota askotarikoak bideratzeko. Zalantzarik baduzu, argitaratu zure mezuak <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> atal orokorrean. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Foroan zerbait idazten duzun lehen aldia da, ziurtatu <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">gidalerroak irakurri dituzula</a>. + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCADek <a href="https://www.freecad.org/tracker">akatsen zerrenda</a> publiko bat dauka. Edozeinek bidali ditzake akatsak eta eginbide berriak proposatu. Gehiegizko lana sortzea saihesteko eta zure akatsa konpondua izan dadin aukera gehiago izateko, mesedez irakurri <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">akatsak bidaltzeko gida</a> ezer bidali baino lehen. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Behean <a href="http://github.com/FreeCAD/FreeCAD/">FreeCADen iturburu-kodeari</a> gehitutako azken aldaketak ikus daitezke. Aldaketa horiek ez dute zertan adierazi beharrik zein FreeCAD bertsioa ari zaren erabiltzen. Begiratu <a href="https://www.freecad.org/wiki/Downloads">erabilgarri dauden aukerak</a> garapen-bertsio bat eskuratzeko. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + <a href="https://forum.freecad.org">FreeCAD foroko</a> azken bidalketak: + + + + Available addons + Gehigarri erabilgarriak + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Behean zure FreeCAD instalazioari gehitu ahal zaizkion beste lan-mahai batzuk zerrendatu dira. Arakatu eta instalatu lan-mahai horiek 'Tresnak -> Gehigarrien kudeatzailea' erabilita. Haiei buruzko informazio gehiago eskura dezakezu beheko esteketan klik eginda. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Zure FreeCAD bertsioarekin paketatuta ez badator, instalatu FreeCADen dokumentazio-paketea Interneterako konexiorik ez duzunean dokumentazio-guneak, lan-mahaien laguntza eta banakako komandoen dokumentazioa kontsultatu ahal izateko. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Ezin izan da informazioa atzitu GitHub gunetik. <a href="EnableDownload.py">Baimendu FreeCADi Internetera sartzen</a> eta birkargatu hasierako orria. + + + + Recent commits + Azken aldaketak + + + + See all commits on github + Ikusi aldaketa guztiak GitHub biltegian + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Hemen karpeta pertsonalizatu bat erakutsi daiteke. Hori konfiguratzeko: 'Editatu -> Hobespenak -> Hasiera -> Erakutsi karpeta gehigarria' + + + + version + bertsioa + + + + build + paketea + + + + Create new... + Sortu berria... + + + + Unknown + Ezezaguna + + + + Forum + Foroa + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Goiko estekak zure mahaigaineko nabigatzailearekin irekitzeko, egin eskuineko klik eta hautatu 'Ireki kanpoko nabigatzailean' + + + + Creation date + Sortze-data + + + + Last modification + Azken aldaketa + + + + Notes + Oharrak + + + + Open start page preferences + Ireki hasiera-orriaren hobespenak + + + + Workbench + + + + Start page + Hasierako orria + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Hasierako orriaren aukerak - - - - Start page template - Hasierako orriaren txantiloia - - - - An optional HTML template that will be used instead of the default start page. - Aukerako HTML txantiloi bat, hasierako orri lehenetsiaren ordez erakutsiko dena. - - - + Contents Edukiak - - Show notepad - Erakutsi ohar-bloka + + Show forum + Erakutsi foroa - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Ohar-blok bat erakusten du fitxategi-miniaturen alboan, saioen artean oharrak hartu ahal ditzazun - - - + Show examples folder contents Erakutsi adibideen karpetako edukiak - - If you want the examples to show on the first page - Adibideak lehen orrian erakutsi nahi badituzu - - - + Show additional folder Erakutsi karpeta gehigarria - + + If you want the examples to show on the first page + Adibideak lehen orrian erakutsi nahi badituzu + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Hau markatuta badago, FreeCAD foroko azken bidalketak bistaratuko dira 'Jarduera' fitxan + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Lehen orriaren beheko aldean bistaratuko den karpeta pertsonalizatua, aukerakoa. Bide-izenak bereizteko ";;" erabiliz, karpeta bat baino gehiago gehitu daiteke hemen - - Show forum - Erakutsi foroa + + Show notepad + Erakutsi ohar-bloka - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Hau markatuta badago, FreeCAD foroko azken bidalketak bistaratuko dira 'Jarduera' fitxan + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Ohar-blok bat erakusten du fitxategi-miniaturen alboan, saioen artean oharrak hartu ahal ditzazun - + Show tips Erakutsi argibideak - + + General + Orokorra + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Fitxategi bat hasierako orritik kargatu ondoren aktibatuko den lan-mahaia, 'Hasiera' lan-mahaia hasierakoa bada soilik erabiliko da + + + + The size of file thumbnail icons in recent files and examples sections + Azken aldiko fitxategien eta adibideen atalen fitxategi-miniaturen tamaina + + + Displays help tips in the Start workbench Documents tab Laguntza-oharrak erakusten ditu hasierako lan-mahaiaren dokumentuen fitxan - - Show scrollbars - Erakutsi korritze-barrak + + File thumbnail size + Fitxategi-miniaturen tamaina - + + Show file thumbnails + Erakutsi fitxategi-miniaturak + + + Fonts and colors Letra-tipoak eta koloreak - - Use FreeCAD style sheet - Erabili FreeCADen estilo-orria - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Hau markatuta badago eta estilo-orri bat adierazi bada hobespen orokorretan, hura erabiliko da eta hemengo koloreak gainidatziko dira - - - - Background color - Atzeko planoaren kolorea - - - - The background color behind the panels - Panelen atzeko planoaren kolorea - - - - Background color down gradient - Atzeko planoko kolorearen beherako gradientea - - - - The down gradient for the background color (currently unsupported) - Atzeko planoaren kolorearen beheranzko gradientea (momentuz ez da onartzen) - - - - Background image - Atzeko planoko irudia - - - - An optional image to display as background - Atzeko planoan erakutsiko den aukerako irudi bat - - - - Background text color - Atzeko planoko testuaren kolorea - - - - The color of the version text - Bertsio-testuaren kolorea - - - - Page background color - Orriaren atzeko planoaren kolorea - - - + The background of the main start page area Hasierako orriaren area nagusiaren atzeko planoa - - Page text color - Orriko testuaren kolorea + + Background color + Atzeko planoaren kolorea - - The color of the text on the main pages - Orri nagusien testuaren kolorea - - - - Box background color - Kutxen atzeko planoaren kolorea - - - - The background color of the boxes inside the pages - Orri barruko kutxen atzeko planoaren kolorea - - - - Link color - Estekatu kolorea - - - - The color of the links - Esteken kolorea - - - - Font family - Letra-tipoa - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Hasierako orrian erabiliko den letra-tipoa. Letra-tipo baten izena izan daiteke, edo komaz banandutako ordezko letra-tipoen izenak - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Hasierako orriko testu guztiek erabiliko duten oinarrizko letra-tamaina - - - - px - px - - - - Open links - Ireki estekak - - - + in FreeCAD FreeCADen - + In external browser Kanpoko nabigatzailean - - Use gradient for New File icon - Erabili gradientea 'Fitxategi berria' ikonorako + + Background color down gradient + Atzeko planoko kolorearen beherako gradientea - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Hau hautatuta badago, 'Fitxategi berria' ikonoak gradiente-ikono bat erakutsiko du ikono normalaren ordez + + The color of the version text + Bertsio-testuaren kolorea - + + Link color + Estekatu kolorea + + + + An optional image to display as background + Atzeko planoan erakutsiko den aukerako irudi bat + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Hau markatuta badago eta estilo-orri bat adierazi bada hobespen orokorretan, hura erabiliko da eta hemengo koloreak gainidatziko dira + + + + Page background color + Orriaren atzeko planoaren kolorea + + + + The color of the text on the main pages + Orri nagusien testuaren kolorea + + + + Background image + Atzeko planoko irudia + + + + Page text color + Orriko testuaren kolorea + + + + The color of the links + Esteken kolorea + + + + The background color of the boxes inside the pages + Orri barruko kutxen atzeko planoaren kolorea + + + + Box background color + Kutxen atzeko planoaren kolorea + + + + The background color behind the panels + Panelen atzeko planoaren kolorea + + + + The down gradient for the background color (currently unsupported) + Atzeko planoaren kolorearen beheranzko gradientea (momentuz ez da onartzen) + + + + Open links + Ireki estekak + + + + Background text color + Atzeko planoko testuaren kolorea + + + + Use FreeCAD style sheet + Erabili FreeCADen estilo-orria + + + + Font family + Letra-tipoa + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Hasierako orrian erabiliko den letra-tipoa. Letra-tipo baten izena izan daiteke, edo komaz banandutako ordezko letra-tipoen izenak + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Hasierako orriko testu guztiek erabiliko duten oinarrizko letra-tamaina + + + + + px + px + + + Options Aukerak - - Switch workbench after loading - Txandakatu lan-mahaia kargaren ondoren - - - - Choose which workbench to switch to after the program launches - Aukeratu zein lan-mahai irekiko den programa abiarazi ondoren - - - - Close start page after loading - Itxi hasierako orria kargaren ondoren - - - + If checked, will automatically close the Start page when FreeCAD launches Markatuta badago, hasiera-orria automatikoki itxiko da FreeCAD abiarazten denean - + + Switch workbench after loading + Txandakatu lan-mahaia kargaren ondoren + + + + Close start page after loading + Itxi hasierako orria kargaren ondoren + + + Close and switch on opening file Itxi eta aldatu fitxategia irekitzean - + If application is started by opening a file, apply the two settings above Aplikazioa fitxategi bat irekita hasten bada, aplikatu goiko bi ezarpenak - Workbench + DlgStartPreferencesAdvanced - - - Start page - Hasierako orria - - - - StartPage - - - Start - Hasi + + Advanced + Aurreratua - - Documents - Dokumentuak + + Custom HTML Template + HTML txantiloi pertsonalizatua - - Help - Laguntza + + An optional HTML template that will be used instead of the default start page. + Aukerako HTML txantiloi bat, hasierako orri lehenetsiaren ordez erakutsiko dena. - - Activity - Jarduera + + Custom CSS + CSS pertsonalizatua - - Recent files - Azken fitxategiak - - - - Tip - Aholkua - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Hemen erakutsiko diren azken fitxategiak antolatzeko, joan 'Editatu -> Hobespenak -> Orokorra -> Azken fitxategien zerrendaren luzera' menura - - - - Examples - Adibideak - - - - General documentation - Dokumentazio orokorra - - - - User hub - Erabiltzaileen gunea - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Atal honek FreeCAD erabiltzaile orokorrentzako dokumentazio erabilgarria du: lan-mahai guztien zerrenda bat, FreeCAD aplikazioa instalatu eta erabiltzeko argibide xeheak, tutorialak, eta lanean hasteko behar duzun guztia. - - - - Power users hub - Erabiltzaile aurreratuen gunea - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Atal honek erabiltzaile aurreratuentzako eta Python scriptak idazteko interesa duten pertsonentzako dokumentazioa biltzen du. Horrez gain, makroen biltegi bat, haiek instalatu eta erabiltzeko argibideak eta FreeCADek zure beharrak bete ditzan pertsonalizatzeko informazio gehiago duzu. - - - - Developers hub - Garatzaileen gunea - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Atal honek garatzaileentzako materiala du: Nola konpilatu FreeCAD, nola dagoen FreeCAD iturburu-kodea egituratuta eta nola arakatu kode hori, nola garatu lan-mahai berriak eta nola kapsulatu FreeCAD zuk garatutako beste aplikazioren batean. - - - - Manual - Eskuliburua - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCADen eskuliburua wiki honetan dagoen informazio aurkezteko beste modu bat da. Liburu bat bailitzan irakurtzeko moduan prestatuta dago, eta goiko guneetako beste orri batzuetarako sarrera emango dizu. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">Bertsio elektronikoak</a> ere eskuragarri daude. - - - - Workbenches documentation - Lan-mahaien dokumentazioa - - - - These are the help pages of all the workbenches currently installed on this computer. - Ordenagailu honetan instalatutako lan-mahai guztien laguntza-orriak dira hauek. - - - - Getting help from the community - Eskuratu komunitatearen laguntza - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">FreeCAD foroa</a> leku ona da FreeCADen beste erabiltzaile batzuen eta garatzaileen laguntza jasotzeko. Foroak atal desberdinak ditu arazo eta eztabaida mota askotarikoak bideratzeko. Zalantzarik baduzu, argitaratu zure mezuak <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> atal orokorrean. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Foroan zerbait idazten duzun lehen aldia da, ziurtatu <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">gidalerroak irakurri dituzula</a>. - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCADek <a href="https://www.freecad.org/tracker">akatsen zerrenda</a> publiko bat dauka. Edozeinek bidali ditzake akatsak eta eginbide berriak proposatu. Gehiegizko lana sortzea saihesteko eta zure akatsa konpondua izan dadin aukera gehiago izateko, mesedez irakurri <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">akatsak bidaltzeko gida</a> ezer bidali baino lehen. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Behean <a href="http://github.com/FreeCAD/FreeCAD/">FreeCADen iturburu-kodeari</a> gehitutako azken aldaketak ikus daitezke. Aldaketa horiek ez dute zertan adierazi beharrik zein FreeCAD bertsioa ari zaren erabiltzen. Begiratu <a href="https://www.freecad.org/wiki/Downloads">erabilgarri dauden aukerak</a> garapen-bertsio bat eskuratzeko. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - <a href="https://forum.freecad.org">FreeCAD foroko</a> azken bidalketak: - - - - Available addons - Gehigarri erabilgarriak - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Behean zure FreeCAD instalazioari gehitu ahal zaizkion beste lan-mahai batzuk zerrendatu dira. Arakatu eta instalatu lan-mahai horiek 'Tresnak -> Gehigarrien kudeatzailea' erabilita. Haiei buruzko informazio gehiago eskura dezakezu beheko esteketan klik eginda. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Zure FreeCAD bertsioarekin paketatuta ez badator, instalatu FreeCADen dokumentazio-paketea Interneterako konexiorik ez duzunean dokumentazio-guneak, lan-mahaien laguntza eta banakako komandoen dokumentazioa kontsultatu ahal izateko. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Ezin izan da informazioa atzitu GitHub gunetik. <a href="EnableDownload.py">Baimendu FreeCADi Internetera sartzen</a> eta birkargatu hasierako orria. - - - - Recent commits - Azken aldaketak - - - - See all commits on github - Ikusi aldaketa guztiak GitHub biltegian - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Hemen karpeta pertsonalizatu bat erakutsi daiteke. Hori konfiguratzeko: 'Editatu -> Hobespenak -> Hasiera -> Erakutsi karpeta gehigarria' - - - - version - bertsioa - - - - build - paketea - - - - Create new... - Sortu berria... - - - - Unknown - Ezezaguna - - - - Forum - Foroa - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Goiko estekak zure mahaigaineko nabigatzailearekin irekitzeko, egin eskuineko klik eta hautatu 'Ireki kanpoko nabigatzailean' - - - - Creation date - Sortze-data - - - - Last modification - Azken aldaketa - - - - Notes - Oharrak - - - - Open start page preferences - Ireki hasiera-orriaren hobespenak + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Hemen CSS pertsonalizatua itsatsi daiteke, hasierako orrian aplikatu dadin. Hasierako orriaren estiloa moldatzen ikasteko, begiratu HTML eta CSS iturburuak:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Hasi diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_fi.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_fi.ts index a50b8ba491..6be6978c4a 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_fi.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_fi.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Aloita + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Asiakirjat + + + + Help + Ohje + + + + Activity + Toiminta + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Vinkki + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Säädä näytettävien viimeaikaisten tiedostojen kappalemäärä valikossa: Muokkaa -> Asetukset -> Yleinen -> Viimeisimpien tiedostojen kappalemäärä + + + + Examples + Esimerkit + + + + General documentation + Yleinen dokumentaatio + + + + User hub + Uuden käyttäjän sivu + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Tässä osassa on FreeCADin käyttäjille yleihyödyllistä dokumentaatiota: luettelo kaikista työpenkeistä, yksityiskohtaiset ohjeet FreeCAD-sovelluksen asentamisesta ja käytöstä, ja kaikki mitä tarvitset päästäksesi alkuun. + + + + Power users hub + Edistyneen käyttäjän sivu + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Tämä osa kerää dokumentaatiota edistyneille käyttäjille ja henkilöille, jotka ovat kiinnostuneita kirjoittamaan python skriptejä. Löydät sieltä myös makrojen varaston, ohjeet miten asentaa ja käyttää niitä, sekä lisää tietoa FreeCADin muokkaamisesta sinun erityistarpeisiisi. + + + + Developers hub + Kehittäjien sivu + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Tässä osiossa on kehittäjille tarkoitettua materiaalia: Miten koota FreeCAD itse, miten FreeCAD lähdekoodi on strukturoitu + miten navigoida siinä, miten kehittää uusia työpenkkejä ja/tai upottaa FreeCAD omaan sovellukseen. + + + + Manual + Käsikirja + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD ohjeisto on toinen, linjakkaampi tapa esitellä tämän wikin sisältämät tiedot. Se on tehty luettavaksi kirjan tapaan, ja hellävaroen se esittelee sinulle monia muita sivuja, katso edeltä. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-kirjan versiot</a> ovat myös saatavilla. + + + + Workbenches documentation + Työpöytien dokumentaatio + + + + These are the help pages of all the workbenches currently installed on this computer. + Nämä ovat ohjesivut kaikkii niihin työpenkkeihin, mitkä ovat nyt asennettuna tähän tietokoneeseen. + + + + Getting help from the community + Tuki yhteisöltä + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + Saatavilla olevat lisäosat + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Alla on luettelo käytettävissä olevista ylimääräisistä työpöydistä, jotka voidaan lisätä FreeCAD-asennukseen. Selaa ja asenna niitä valikosta Työkalut -> Lisäosien hallinta. Voit lukea lisää niistä napsauttamalla alla olevia linkkejä. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Jos se ei ole mukana FreeCAD-versiosi paketissa, asenna FreeCAD-dokumentaatiopaketti hakeaksesi dokumentaation sivuja, työpöydän ohjetta ja yksittäisten komentojen ohjetta ilman internet yhteyttä. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Tietoja ei voi noutaa GitHubista. <a href="EnableDownload.py">Anna FreeCAD:lle yhteys internetiin</a> ja lataa aloitussivu uudelleen. + + + + Recent commits + Viimeisimmät kommitit + + + + See all commits on github + Näytä kaikki GitHubissa olevat kommitit + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Voit määrittää mukautetun kansion tässä valikossa Muokkaa -> Asetukset -> Käynnistä -> Näytä ylimääräinen kansio + + + + version + Versio + + + + build + koonti + + + + Create new... + Luo uusi... + + + + Unknown + Tuntematon + + + + Forum + Keskustelupalsta + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Avataksesi minkä tahansa yllä olevan linkin työpöytäselaimessasi, napsauta hiiren kakkospainikkeella -> Avaa ulkoisessa selaimessa + + + + Creation date + Luontipäivä + + + + Last modification + Viimeksi muokattu + + + + Notes + Muistiinpanot + + + + Open start page preferences + Avaa aloitussivun asetukset + + + + Workbench + + + + Start page + Aloitussivu + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Aloitussivun asetukset - - - - Start page template - Aloitussivun malli - - - - An optional HTML template that will be used instead of the default start page. - Valinnainen HTML-malli, jota käytetään oletuksena olevan aloitussivun sijaan. - - - + Contents Sisältö - - Show notepad - Näytä muistio + + Show forum + Näytä keskustelupalsta - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - + Show examples folder contents Näytä esimerkkien kansion sisältö - - If you want the examples to show on the first page - Jos haluat, että esimerkit näytetään ensimmäisellä sivulla - - - + Show additional folder Näytä ylimääräinen kansio - + + If you want the examples to show on the first page + Jos haluat, että esimerkit näytetään ensimmäisellä sivulla + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Jos tämä on valittuna, viimeisimmät viestit FreeCAD-keskustelupalstalta näytetään aktiivisuusvälilehdessä + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - - Show forum - Näytä keskustelupalsta + + Show notepad + Näytä muistio - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Jos tämä on valittuna, viimeisimmät viestit FreeCAD-keskustelupalstalta näytetään aktiivisuusvälilehdessä + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips Näytä vihjeet - + + General + Yleiset + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Displays help tips in the Start workbench Documents tab - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Fontit ja värit - - Use FreeCAD style sheet - Käytä FreeCAD-tyylisivua - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - Background color - Taustaväri - - - - The background color behind the panels - Paneelien takana oleva taustaväri - - - - Background color down gradient - Background color down gradient - - - - The down gradient for the background color (currently unsupported) - Värisävyn alennus taustavärille (ei tällä hetkellä tuettu) - - - - Background image - Taustakuva - - - - An optional image to display as background - Valinnainen kuva näytetään taustakuvana - - - - Background text color - Taustan tekstin väri - - - - The color of the version text - Versiotekstin väri - - - - Page background color - Sivun taustaväri - - - + The background of the main start page area Aloituspääsivun tausta - - Page text color - Sivun tekstin väri + + Background color + Taustaväri - - The color of the text on the main pages - Pääsivuilla olevan tekstin väri - - - - Box background color - Laatikon taustaväri - - - - The background color of the boxes inside the pages - Sivujen sisällä olevien laatikoiden taustaväri - - - - Link color - Linkkien väri - - - - The color of the links - Linkkien väri - - - - Font family - Fonttiperhe - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Aloitussivulla käytettävä fonttiperhe. Se voi olla fontin nimi tai pilkulla erotettu sarja varafontteja - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Perusfontin koko, jota käytetään kaikkiin aloitussivun teksteihin - - - - px - px - - - - Open links - Avaa linkit - - - + in FreeCAD FreeCAD:issa - + In external browser Ulkoisessa selaimessa - - Use gradient for New File icon - Käytä kaltevuutta (gradient) uuteen tiedostokuvakkeeseen + + Background color down gradient + Background color down gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + The color of the version text + Versiotekstin väri - + + Link color + Linkkien väri + + + + An optional image to display as background + Valinnainen kuva näytetään taustakuvana + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + + + + Page background color + Sivun taustaväri + + + + The color of the text on the main pages + Pääsivuilla olevan tekstin väri + + + + Background image + Taustakuva + + + + Page text color + Sivun tekstin väri + + + + The color of the links + Linkkien väri + + + + The background color of the boxes inside the pages + Sivujen sisällä olevien laatikoiden taustaväri + + + + Box background color + Laatikon taustaväri + + + + The background color behind the panels + Paneelien takana oleva taustaväri + + + + The down gradient for the background color (currently unsupported) + Värisävyn alennus taustavärille (ei tällä hetkellä tuettu) + + + + Open links + Avaa linkit + + + + Background text color + Taustan tekstin väri + + + + Use FreeCAD style sheet + Käytä FreeCAD-tyylisivua + + + + Font family + Fonttiperhe + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Aloitussivulla käytettävä fonttiperhe. Se voi olla fontin nimi tai pilkulla erotettu sarja varafontteja + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Perusfontin koko, jota käytetään kaikkiin aloitussivun teksteihin + + + + + px + px + + + Options Asetukset - - Switch workbench after loading - Vaihda työpöytä latauksen jälkeen - - - - Choose which workbench to switch to after the program launches - Choose which workbench to switch to after the program launches - - - - Close start page after loading - Sulje aloitussivu latauksen jälkeen - - - + If checked, will automatically close the Start page when FreeCAD launches If checked, will automatically close the Start page when FreeCAD launches - + + Switch workbench after loading + Vaihda työpöytä latauksen jälkeen + + + + Close start page after loading + Sulje aloitussivu latauksen jälkeen + + + Close and switch on opening file Close and switch on opening file - + If application is started by opening a file, apply the two settings above If application is started by opening a file, apply the two settings above - Workbench + DlgStartPreferencesAdvanced - - - Start page - Aloitussivu - - - - StartPage - - - Start - Aloita + + Advanced + Lisäasetukset - - Documents - Asiakirjat + + Custom HTML Template + Custom HTML Template - - Help - Ohje + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Toiminta + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Vinkki - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Säädä näytettävien viimeaikaisten tiedostojen kappalemäärä valikossa: Muokkaa -> Asetukset -> Yleinen -> Viimeisimpien tiedostojen kappalemäärä - - - - Examples - Esimerkit - - - - General documentation - Yleinen dokumentaatio - - - - User hub - Uuden käyttäjän sivu - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Tässä osassa on FreeCADin käyttäjille yleihyödyllistä dokumentaatiota: luettelo kaikista työpenkeistä, yksityiskohtaiset ohjeet FreeCAD-sovelluksen asentamisesta ja käytöstä, ja kaikki mitä tarvitset päästäksesi alkuun. - - - - Power users hub - Edistyneen käyttäjän sivu - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Tämä osa kerää dokumentaatiota edistyneille käyttäjille ja henkilöille, jotka ovat kiinnostuneita kirjoittamaan python skriptejä. Löydät sieltä myös makrojen varaston, ohjeet miten asentaa ja käyttää niitä, sekä lisää tietoa FreeCADin muokkaamisesta sinun erityistarpeisiisi. - - - - Developers hub - Kehittäjien sivu - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Tässä osiossa on kehittäjille tarkoitettua materiaalia: Miten koota FreeCAD itse, miten FreeCAD lähdekoodi on strukturoitu + miten navigoida siinä, miten kehittää uusia työpenkkejä ja/tai upottaa FreeCAD omaan sovellukseen. - - - - Manual - Käsikirja - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD ohjeisto on toinen, linjakkaampi tapa esitellä tämän wikin sisältämät tiedot. Se on tehty luettavaksi kirjan tapaan, ja hellävaroen se esittelee sinulle monia muita sivuja, katso edeltä. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-kirjan versiot</a> ovat myös saatavilla. - - - - Workbenches documentation - Työpöytien dokumentaatio - - - - These are the help pages of all the workbenches currently installed on this computer. - Nämä ovat ohjesivut kaikkii niihin työpenkkeihin, mitkä ovat nyt asennettuna tähän tietokoneeseen. - - - - Getting help from the community - Tuki yhteisöltä - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - Saatavilla olevat lisäosat - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Alla on luettelo käytettävissä olevista ylimääräisistä työpöydistä, jotka voidaan lisätä FreeCAD-asennukseen. Selaa ja asenna niitä valikosta Työkalut -> Lisäosien hallinta. Voit lukea lisää niistä napsauttamalla alla olevia linkkejä. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Jos se ei ole mukana FreeCAD-versiosi paketissa, asenna FreeCAD-dokumentaatiopaketti hakeaksesi dokumentaation sivuja, työpöydän ohjetta ja yksittäisten komentojen ohjetta ilman internet yhteyttä. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Tietoja ei voi noutaa GitHubista. <a href="EnableDownload.py">Anna FreeCAD:lle yhteys internetiin</a> ja lataa aloitussivu uudelleen. - - - - Recent commits - Viimeisimmät kommitit - - - - See all commits on github - Näytä kaikki GitHubissa olevat kommitit - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Voit määrittää mukautetun kansion tässä valikossa Muokkaa -> Asetukset -> Käynnistä -> Näytä ylimääräinen kansio - - - - version - Versio - - - - build - koonti - - - - Create new... - Luo uusi... - - - - Unknown - Tuntematon - - - - Forum - Keskustelupalsta - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Avataksesi minkä tahansa yllä olevan linkin työpöytäselaimessasi, napsauta hiiren kakkospainikkeella -> Avaa ulkoisessa selaimessa - - - - Creation date - Luontipäivä - - - - Last modification - Viimeksi muokattu - - - - Notes - Muistiinpanot - - - - Open start page preferences - Avaa aloitussivun asetukset + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Aloita diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_fr.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_fr.ts index 12545928d0..6afe6d5856 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_fr.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_fr.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Bienvenue sur FreeCAD + + + + Documents + Documents + + + + Help + Aide + + + + Activity + Activité + + + + Blog + Blog + + + + Link to the FreeCAD blog + Lien vers le blog de FreeCAD + + + + New file + Nouveau fichier + + + + Empty File + Fichier vide + + + + Create an empty FreeCAD file + Créer un fichier FreeCAD vide + + + + Open File + Ouvrir un fichier + + + + Open an existing CAD file or 3D model + Ouvrir un fichier CAO existant ou un modèle 3D + + + + Standard Part + Pièce standard + + + + Create a part with the Part Design workbench + Créer une pièce avec l'atelier Part Design + + + + 2D Draft + Dessin 2D + + + + Create a 2D draft with the Draft workbench + Créer un dessin 2D avec l'atelier Draft + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Créer un projet d'architecture + + + + Recent files + Fichiers récents + + + + Tip + Astuce + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + définissez le nombre de fichiers récemment ouverts à montrer ici à partir du menu Édition → Préférences → Général → Taille de la liste des fichiers récents. + + + + Examples + Exemples + + + + General documentation + Documentation générale + + + + User hub + Documentation pour utilisateurs + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Cette section contient la documentation adressée aux utilisateurs de FreeCAD en général : une liste de tous les ateliers, des instructions détaillées sur la façon d’installer et d’utiliser l’application FreeCAD, des tutoriels et tout ce que vous avez besoin pour démarrer. + + + + Power users hub + Documentation pour utilisateurs avancés + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Cette section regroupe la documentation pour les utilisateurs avancés et les gens intéressés par l’écriture de scripts python. Vous trouverez également un dépôt de macros, des instructions pour leur installation et leur utilisation, ainsi que plus d’informations sur la personnalisation de FreeCAD à vos besoins spécifiques. + + + + Developers hub + Documentation pour développeurs + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Cette section contient la documentation pour les développeurs : comment compiler FreeCAD vous-même, comment le code source de FreeCAD est structuré + comment naviguer dedans, également comment développer de nouveaux ateliers et/ou incorporer FreeCAD dans votre propre application. + + + + Manual + Manuel + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Le manuel FreeCAD est une autre manière, plus linéaire de présenter les informations contenues dans ce wiki. Il est fait pour être lu comme un livre et vous fera doucement découvrir de nombreuses autres pages des documentations ci-dessus. Des <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versions e-book</a> sont également disponibles. + + + + Workbenches documentation + Documentation des ateliers + + + + These are the help pages of all the workbenches currently installed on this computer. + Ce sont les pages d’aide de tous les ateliers actuellement installés sur cet ordinateur. + + + + Getting help from the community + Obtenir de l'aide de la communauté + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + Le <a href="http://forum.freecad.org">forum FreeCAD</a> est un bon endroit pour obtenir de l’aide d’autres utilisateurs et de développeurs de FreeCAD. Le forum propose de nombreuses sections pour différents types de questions et de sujets de discussion. En cas de doute, postez dans la section générale <a href="https://forum.freecad.org/viewforum.php?f=3">Aide sur l'utilisation de FreeCAD</a> (en anglais). + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Si c’est la première fois que vous postez sur le forum, lisez d’abord <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">les règles du forum</a> ! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD maintient également un <a href="https://www.freecad.org/tracker">système de suivi de problèmes</a> où n’importe qui peut soumettre des bogues et proposer de nouvelles fonctionnalités. Pour éviter de causer un surcroît de travail et donner les meilleures chances de voir votre bogue résolu, assurez-vous de lire le <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guide de soumission de bogue</a> avant de poster. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Voici les derniers changements ajoutés au <a href="http://github.com/FreeCAD/FreeCAD/">code source FreeCAD</a>. Ces changements ne se reflèteront peut-être pas encore dans la version de FreeCAD que vous utilisez actuellement. Vérifiez les <a href="https://www.freecad.org/wiki/Downloads">versions disponibles</a> si vous souhaitez obtenir une version de développement. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Les derniers messages sur le <a href="https://forum.freecad.org">forum FreeCAD</a> : + + + + Available addons + Extensions disponibles + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Ci-dessous une liste des ateliers supplémentaires disponibles qui peuvent être ajoutés à votre installation de FreeCAD. Parcourez et installez-les à partir du menu Outils → Gestionnaire des extensions. Vous pouvez en savoir plus sur chacun d'entre eux en cliquant sur les liens ci-dessous. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Si elle n'est pas fournie avec votre version de FreeCAD, installez la documentation hors-ligne de FreeCAD pour obtenir les différentes documentations, l'aide des ateliers et la documentation des commandes individuelles sans connexion internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Impossible d'extraire les informations de GitHub. <a href="EnableDownload.py">Autoriser FreeCAD à accéder à internet</a> et recharger la page de démarrage. + + + + Recent commits + Derniers commits + + + + See all commits on github + Voir tous les commits sur GitHub + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Vous pouvez configurer un dossier personnalisé à afficher ici à partir du menu Édition → Préférences → Start → Afficher un dossier supplémentaire + + + + version + version + + + + build + build + + + + Create new... + Créer nouveau... + + + + Unknown + Inconnu + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Pour ouvrir un des liens ci-dessus dans votre navigateur, faites un clic droit -> Ouvrir dans un navigateur externe + + + + Creation date + Date de création + + + + Last modification + Dernière modification + + + + Notes + Bloc-notes + + + + Open start page preferences + Ouvrir les préférences de la page d'accueil + + + + Workbench + + + + Start page + Page de démarrage + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Options de la page de démarrage - - - - Start page template - Modèle de la page de démarrage - - - - An optional HTML template that will be used instead of the default start page. - Un modèle HTML facultatif qui sera utilisé au lieu de la page de démarrage par défaut. - - - + Contents Contenu - - Show notepad - Afficher le bloc-notes + + Show forum + Afficher le forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Affiche un bloc-notes à côté des vignettes de fichiers, où vous pouvez garder des notes à travers les sessions - - - + Show examples folder contents Afficher le contenu du dossier d'exemples - - If you want the examples to show on the first page - Si vous souhaitez que les exemples soient affichés sur la page de démarrage - - - + Show additional folder Afficher un dossier supplémentaire - + + If you want the examples to show on the first page + Si vous souhaitez que les exemples soient affichés sur la page de démarrage + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Si cette case est cochée, les derniers messages du forum FreeCAD s'afficheront dans l’onglet Activité + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Un dossier personnalisé optionnel à afficher en bas de la première page. En utilisant ";;" pour séparer les chemins, vous pouvez ajouter plusieurs dossiers ici - - Show forum - Afficher le forum + + Show notepad + Afficher le bloc-notes - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Si cette case est cochée, les derniers messages du forum FreeCAD s'afficheront dans l’onglet Activité + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Affiche un bloc-notes à côté des vignettes de fichiers, où vous pouvez garder des notes à travers les sessions - + Show tips Afficher les astuces - + + General + Général + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Atelier vers lequel basculer après le chargement d'un fichier à partir de la page de démarrage, utilisé uniquement si Start est l'atelier de démarrage + + + + The size of file thumbnail icons in recent files and examples sections + La dimension des miniatures des fichiers dans les sections fichiers récents et exemples + + + Displays help tips in the Start workbench Documents tab Affiche les astuces dans l'onglet Documents de l'atelier Démarrage - - Show scrollbars - Afficher les barres de défilement + + File thumbnail size + Dimension des miniatures de fichier - + + Show file thumbnails + Afficher les miniatures de fichiers + + + Fonts and colors Polices et couleurs - - Use FreeCAD style sheet - Utiliser une feuille de style FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Si cette case est cochée, et si une feuille de style est spécifiée dans les préférences générales, celle-ci sera utilisée et remplacera les couleurs ci-dessous - - - - Background color - Couleur d'arrière-plan - - - - The background color behind the panels - La couleur d’arrière-plan derrière les onglets - - - - Background color down gradient - Couleur de fond en dégradé - - - - The down gradient for the background color (currently unsupported) - Le dégradé pour la couleur d’arrière-plan (actuellement non pris en charge) - - - - Background image - Image d'arrière-plan - - - - An optional image to display as background - Une image facultative à afficher comme arrière-plan - - - - Background text color - Couleur d'arrière-plan du texte - - - - The color of the version text - La couleur du texte de version - - - - Page background color - Couleur d'arrière-plan de la page - - - + The background of the main start page area L’arrière-plan de la zone principale de la page de démarrage - - Page text color - Couleur du texte + + Background color + Couleur d'arrière-plan - - The color of the text on the main pages - La couleur du texte sur les pages principales - - - - Box background color - Couleur d'arrière-plan des encadrés - - - - The background color of the boxes inside the pages - La couleur d'arrière-plan des encadrés dans les pages - - - - Link color - Couleur des liens - - - - The color of the links - La couleur des liens - - - - Font family - Famille de polices - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - La famille de polices à utiliser sur la page de démarrage. Peut être un nom de police ou une série de polices alternatives séparée par des virgules - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - La taille de police de base à utiliser pour tous les textes de la page de démarrage - - - - px - px - - - - Open links - Ouvrir les liens - - - + in FreeCAD dans FreeCAD - + In external browser Dans un navigateur externe - - Use gradient for New File icon - Utiliser un dégradé pour l'icône de nouveau fichier + + Background color down gradient + Couleur de fond en dégradé - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Si cette option est sélectionnée, l'icône 'Nouveau fichier' affiche une icône de dégradé à la place de l'icône normale + + The color of the version text + La couleur du texte de version - + + Link color + Couleur des liens + + + + An optional image to display as background + Une image facultative à afficher comme arrière-plan + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Si cette case est cochée, et si une feuille de style est spécifiée dans les préférences générales, celle-ci sera utilisée et remplacera les couleurs ci-dessous + + + + Page background color + Couleur d'arrière-plan de la page + + + + The color of the text on the main pages + La couleur du texte sur les pages principales + + + + Background image + Image d'arrière-plan + + + + Page text color + Couleur du texte + + + + The color of the links + La couleur des liens + + + + The background color of the boxes inside the pages + La couleur d'arrière-plan des encadrés dans les pages + + + + Box background color + Couleur d'arrière-plan des encadrés + + + + The background color behind the panels + La couleur d’arrière-plan derrière les onglets + + + + The down gradient for the background color (currently unsupported) + Le dégradé pour la couleur d’arrière-plan (actuellement non pris en charge) + + + + Open links + Ouvrir les liens + + + + Background text color + Couleur d'arrière-plan du texte + + + + Use FreeCAD style sheet + Utiliser une feuille de style FreeCAD + + + + Font family + Famille de polices + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + La famille de polices à utiliser sur la page de démarrage. Peut être un nom de police ou une série de polices alternatives séparée par des virgules + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + La taille de police de base à utiliser pour tous les textes de la page de démarrage + + + + + px + px + + + Options Options - - Switch workbench after loading - Basculer vers l'atelier après le chargement - - - - Choose which workbench to switch to after the program launches - Choisir l'atelier sur lequel basculer après le lancement du programme - - - - Close start page after loading - Fermer la page de démarrage après le chargement - - - + If checked, will automatically close the Start page when FreeCAD launches Si coché, fermera automatiquement la page de démarrage au lancement de FreeCAD - + + Switch workbench after loading + Basculer vers l'atelier après le chargement + + + + Close start page after loading + Fermer la page de démarrage après le chargement + + + Close and switch on opening file Fermer et basculer à l'ouverture du fichier - + If application is started by opening a file, apply the two settings above Si l'application est lancée par l'ouverture d'un fichier, appliquez les deux paramètres ci-dessus - Workbench + DlgStartPreferencesAdvanced - - - Start page - Page de démarrage - - - - StartPage - - - Start - Start + + Advanced + Avancé - - Documents - Documents + + Custom HTML Template + Modèle HTML personnalisé - - Help - Aide + + An optional HTML template that will be used instead of the default start page. + Un modèle HTML facultatif qui sera utilisé au lieu de la page de démarrage par défaut. - - Activity - Activité + + Custom CSS + CSS personnalisé - - Recent files - Fichiers récents - - - - Tip - Astuce - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - définissez le nombre de fichiers récemment ouverts à montrer ici à partir du menu Édition → Préférences → Général → Taille de la liste des fichiers récents. - - - - Examples - Exemples - - - - General documentation - Documentation générale - - - - User hub - Documentation pour utilisateurs - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Cette section contient la documentation adressée aux utilisateurs de FreeCAD en général : une liste de tous les ateliers, des instructions détaillées sur la façon d’installer et d’utiliser l’application FreeCAD, des tutoriels et tout ce que vous avez besoin pour démarrer. - - - - Power users hub - Documentation pour utilisateurs avancés - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Cette section regroupe la documentation pour les utilisateurs avancés et les gens intéressés par l’écriture de scripts python. Vous trouverez également un dépôt de macros, des instructions pour leur installation et leur utilisation, ainsi que plus d’informations sur la personnalisation de FreeCAD à vos besoins spécifiques. - - - - Developers hub - Documentation pour développeurs - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Cette section contient la documentation pour les développeurs : comment compiler FreeCAD vous-même, comment le code source de FreeCAD est structuré + comment naviguer dedans, également comment développer de nouveaux ateliers et/ou incorporer FreeCAD dans votre propre application. - - - - Manual - Manuel - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Le manuel FreeCAD est une autre manière, plus linéaire de présenter les informations contenues dans ce wiki. Il est fait pour être lu comme un livre et vous fera doucement découvrir de nombreuses autres pages des documentations ci-dessus. Des <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versions e-book</a> sont également disponibles. - - - - Workbenches documentation - Documentation des ateliers - - - - These are the help pages of all the workbenches currently installed on this computer. - Ce sont les pages d’aide de tous les ateliers actuellement installés sur cet ordinateur. - - - - Getting help from the community - Obtenir de l'aide de la communauté - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - Le <a href="http://forum.freecad.org">forum FreeCAD</a> est un bon endroit pour obtenir de l’aide d’autres utilisateurs et de développeurs de FreeCAD. Le forum propose de nombreuses sections pour différents types de questions et de sujets de discussion. En cas de doute, postez dans la section générale <a href="https://forum.freecad.org/viewforum.php?f=3">Aide sur l'utilisation de FreeCAD</a> (en anglais). - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Si c’est la première fois que vous postez sur le forum, lisez d’abord <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">les règles du forum</a> ! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD maintient également un <a href="https://www.freecad.org/tracker">système de suivi de problèmes</a> où n’importe qui peut soumettre des bogues et proposer de nouvelles fonctionnalités. Pour éviter de causer un surcroît de travail et donner les meilleures chances de voir votre bogue résolu, assurez-vous de lire le <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guide de soumission de bogue</a> avant de poster. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Voici les derniers changements ajoutés au <a href="http://github.com/FreeCAD/FreeCAD/">code source FreeCAD</a>. Ces changements ne se reflèteront peut-être pas encore dans la version de FreeCAD que vous utilisez actuellement. Vérifiez les <a href="https://www.freecad.org/wiki/Downloads">versions disponibles</a> si vous souhaitez obtenir une version de développement. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Les derniers messages sur le <a href="https://forum.freecad.org">forum FreeCAD</a> : - - - - Available addons - Extensions disponibles - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Ci-dessous une liste des ateliers supplémentaires disponibles qui peuvent être ajoutés à votre installation de FreeCAD. Parcourez et installez-les à partir du menu Outils → Gestionnaire des extensions. Vous pouvez en savoir plus sur chacun d'entre eux en cliquant sur les liens ci-dessous. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Si elle n'est pas fournie avec votre version de FreeCAD, installez la documentation hors-ligne de FreeCAD pour obtenir les différentes documentations, l'aide des ateliers et la documentation des commandes individuelles sans connexion internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Impossible d'extraire les informations de GitHub. <a href="EnableDownload.py">Autoriser FreeCAD à accéder à internet</a> et recharger la page de démarrage. - - - - Recent commits - Derniers commits - - - - See all commits on github - Voir tous les commits sur GitHub - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Vous pouvez configurer un dossier personnalisé à afficher ici à partir du menu Édition → Préférences → Start → Afficher un dossier supplémentaire - - - - version - version - - - - build - build - - - - Create new... - Créer nouveau... - - - - Unknown - Inconnu - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Pour ouvrir un des liens ci-dessus dans votre navigateur, faites un clic droit -> Ouvrir dans un navigateur externe - - - - Creation date - Date de création - - - - Last modification - Dernière modification - - - - Notes - Bloc-notes - - - - Open start page preferences - Ouvrir les préférences de la page d'accueil + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Vous pouvez coller votre CSS personnalisé ici et la page de démarrage l'appliquera pour vous. Pour en savoir plus sur la façon de personnaliser la page d'accueil, voir les sources HTML et CSS :</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github. om/FreeCAD/FreeCAD/blob/master/src/Mod/StartPage/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Start diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_gl.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_gl.ts index d4a717339d..9c3dee7b26 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_gl.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_gl.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Inicio + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Documentos + + + + Help + Axuda + + + + Activity + Actividade + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Pista + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Axusta o número de ficheiros recentes a ser amosados aquí no menú Editar -> Preferencias -> Xeral -> Tamaño da lista de ficheiros recentes + + + + Examples + Exemplos + + + + General documentation + Documentación xeral + + + + User hub + Hub do usuario + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Esta sección contén documentación útil para usuarios de FreeCAD en xeral: unha lista de tódolos bancos de traballo, instruccións polo miúdo sobre como instalar e usar a aplicación FreeCAD, titoriais, e todo o que ti podes para inciciarte. + + + + Power users hub + Hub de usuarios + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Esta sección recopila documentación para usuarios avanzados e persoas interesadas en escribir scripts python. Tamén podes atopar o repositorio de macros, instrucións sobre como instalar e usala, e máis información sobre persoalizar FreeCAD e necesidades específicas. + + + + Developers hub + Hub de desenvolvedores + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Esta sección contén materiais para desenvolvedores: como compilar FreeCAD ti mesmo, como está estruturadoo código fonte e como navegar nel, e como desenvolver novos bancos de traballo, e/ou incrustar FreeCAD na túa propia aplicación. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + O manual de FreeCAD é outra forma de presentar a información contida nesta wiki. Esto se fai como a lectura dun libro, e amosará xentilmente introducións a algunhas outras páxinas dende o hub seguinte. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versión e-book</a> tamén está dispoñible. + + + + Workbenches documentation + Documentación dos bancos de traballo + + + + These are the help pages of all the workbenches currently installed on this computer. + Hai páxinas de axuda de tódolos bancos de traballo actuais instalados na computadora. + + + + Getting help from the community + Obteña axuda da comunidade + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + Addons dispoñibles + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + De seguido está a lista de bancos de traballo extra que podes engadir á túa instalación de FreeCAD. Procure e instale dende o menú Ferramentas -> Addons xestión. Podes aprender máis sobre calquera deles clicando na ligazón de embaixo. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Se non está incluído ca versión do teu FreeCAD, instala o paquete da documentación FreeCAD para obter os centros de documentación, axuda de bancos de traballo e documentación de comandos individuais sen conexión a internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Non se pode obter información dende GitHub. <a href="EnableDownload.py">Autorice a FreeCAD para acceder a internet</a> e volva cargar a páxina de inicio. + + + + Recent commits + Achegas recentes + + + + See all commits on github + Ver tódolos commits no github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Podes configurar un cartafol persoal amosado aquí en menú Editar -> Preferencias -> Inicio -> Amosar cartafol adicional + + + + version + versión + + + + build + construir + + + + Create new... + Crear novo... + + + + Unknown + Descoñecido + + + + Forum + Foro + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Para abrir calquera das ligazóns no teu navegador de escritorio, fai click co botón dereito -> Abrir en navegador externo + + + + Creation date + Data de creación + + + + Last modification + Última modificación + + + + Notes + Notas + + + + Open start page preferences + Abrir as preferencias da páxina de inicio + + + + Workbench + + + + Start page + Páxina inicial + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opcións da páxina de inicio - - - - Start page template - Plantilla de páxina de inicio - - - - An optional HTML template that will be used instead of the default start page. - Unha plantilla opcional HTML que se usará en paga da páxina de inicio predeterminada. - - - + Contents Contido - - Show notepad - Amosar blog de notas + + Show forum + Amosar forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - + Show examples folder contents Amosa exemplos contidos en carpetas - - If you want the examples to show on the first page - Se queres exemplos amosados na primeira páxina - - - + Show additional folder Amosar cartafol adicional - + + If you want the examples to show on the first page + Se queres exemplos amosados na primeira páxina + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Se isto está activado, os últimos post dende o foro de FreeCAD amosaranse na lapela de actividade + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - - Show forum - Amosar forum + + Show notepad + Amosar blog de notas - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Se isto está activado, os últimos post dende o foro de FreeCAD amosaranse na lapela de actividade + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips Amosar consellos - + + General + Xeral + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Displays help tips in the Start workbench Documents tab - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Fontes e cores - - Use FreeCAD style sheet - Usar follas de estilo de FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - Background color - Cor de fondo - - - - The background color behind the panels - Cor de fondo detrás dos paneis - - - - Background color down gradient - Background color down gradient - - - - The down gradient for the background color (currently unsupported) - Cor debaixo do gradiente para o fondo (agora non soportado) - - - - Background image - Imaxe do fondo - - - - An optional image to display as background - Imaxe opcional amosada de fondo - - - - Background text color - Cor do texto de fondo - - - - The color of the version text - A cor do texto da versión - - - - Page background color - Cor de fondo da páxina - - - + The background of the main start page area Fondo da zona de traballo principal da páxina de inicio - - Page text color - Cor do texto da páxina + + Background color + Cor de fondo - - The color of the text on the main pages - Cor do texto nas páxinas principais - - - - Box background color - Cor do fondo da caixa - - - - The background color of the boxes inside the pages - Cor de fondo das caixas dentro das páxinas - - - - Link color - Cor da ligazón - - - - The color of the links - A cor das ligazóns - - - - Font family - Familia de fontes - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - A familia de fontes usadas na páxina de inicio. Pode ser nomes das fontes ou unha serie de fontes separadas por comas - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - Tamaño da fonte base usado para tódolos textos da páxina de inicio - - - - px - px - - - - Open links - Abrir ligazóns - - - + in FreeCAD en FreeCAD - + In external browser En navegador externo - - Use gradient for New File icon - Use gradiente para a icona de Ficheiro Novo + + Background color down gradient + Background color down gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + The color of the version text + A cor do texto da versión - + + Link color + Cor da ligazón + + + + An optional image to display as background + Imaxe opcional amosada de fondo + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + + + + Page background color + Cor de fondo da páxina + + + + The color of the text on the main pages + Cor do texto nas páxinas principais + + + + Background image + Imaxe do fondo + + + + Page text color + Cor do texto da páxina + + + + The color of the links + A cor das ligazóns + + + + The background color of the boxes inside the pages + Cor de fondo das caixas dentro das páxinas + + + + Box background color + Cor do fondo da caixa + + + + The background color behind the panels + Cor de fondo detrás dos paneis + + + + The down gradient for the background color (currently unsupported) + Cor debaixo do gradiente para o fondo (agora non soportado) + + + + Open links + Abrir ligazóns + + + + Background text color + Cor do texto de fondo + + + + Use FreeCAD style sheet + Usar follas de estilo de FreeCAD + + + + Font family + Familia de fontes + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + A familia de fontes usadas na páxina de inicio. Pode ser nomes das fontes ou unha serie de fontes separadas por comas + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + Tamaño da fonte base usado para tódolos textos da páxina de inicio + + + + + px + px + + + Options Opcións - - Switch workbench after loading - Trocar banco de traballo despois da carga - - - - Choose which workbench to switch to after the program launches - Choose which workbench to switch to after the program launches - - - - Close start page after loading - Inicio do peche da páxina despois da carga - - - + If checked, will automatically close the Start page when FreeCAD launches If checked, will automatically close the Start page when FreeCAD launches - + + Switch workbench after loading + Trocar banco de traballo despois da carga + + + + Close start page after loading + Inicio do peche da páxina despois da carga + + + Close and switch on opening file Close and switch on opening file - + If application is started by opening a file, apply the two settings above If application is started by opening a file, apply the two settings above - Workbench + DlgStartPreferencesAdvanced - - - Start page - Páxina inicial - - - - StartPage - - - Start - Inicio + + Advanced + Avanzado - - Documents - Documentos + + Custom HTML Template + Custom HTML Template - - Help - Axuda + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Actividade + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Pista - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Axusta o número de ficheiros recentes a ser amosados aquí no menú Editar -> Preferencias -> Xeral -> Tamaño da lista de ficheiros recentes - - - - Examples - Exemplos - - - - General documentation - Documentación xeral - - - - User hub - Hub do usuario - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Esta sección contén documentación útil para usuarios de FreeCAD en xeral: unha lista de tódolos bancos de traballo, instruccións polo miúdo sobre como instalar e usar a aplicación FreeCAD, titoriais, e todo o que ti podes para inciciarte. - - - - Power users hub - Hub de usuarios - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Esta sección recopila documentación para usuarios avanzados e persoas interesadas en escribir scripts python. Tamén podes atopar o repositorio de macros, instrucións sobre como instalar e usala, e máis información sobre persoalizar FreeCAD e necesidades específicas. - - - - Developers hub - Hub de desenvolvedores - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Esta sección contén materiais para desenvolvedores: como compilar FreeCAD ti mesmo, como está estruturadoo código fonte e como navegar nel, e como desenvolver novos bancos de traballo, e/ou incrustar FreeCAD na túa propia aplicación. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - O manual de FreeCAD é outra forma de presentar a información contida nesta wiki. Esto se fai como a lectura dun libro, e amosará xentilmente introducións a algunhas outras páxinas dende o hub seguinte. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versión e-book</a> tamén está dispoñible. - - - - Workbenches documentation - Documentación dos bancos de traballo - - - - These are the help pages of all the workbenches currently installed on this computer. - Hai páxinas de axuda de tódolos bancos de traballo actuais instalados na computadora. - - - - Getting help from the community - Obteña axuda da comunidade - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - Addons dispoñibles - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - De seguido está a lista de bancos de traballo extra que podes engadir á túa instalación de FreeCAD. Procure e instale dende o menú Ferramentas -> Addons xestión. Podes aprender máis sobre calquera deles clicando na ligazón de embaixo. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Se non está incluído ca versión do teu FreeCAD, instala o paquete da documentación FreeCAD para obter os centros de documentación, axuda de bancos de traballo e documentación de comandos individuais sen conexión a internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Non se pode obter información dende GitHub. <a href="EnableDownload.py">Autorice a FreeCAD para acceder a internet</a> e volva cargar a páxina de inicio. - - - - Recent commits - Achegas recentes - - - - See all commits on github - Ver tódolos commits no github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Podes configurar un cartafol persoal amosado aquí en menú Editar -> Preferencias -> Inicio -> Amosar cartafol adicional - - - - version - versión - - - - build - construir - - - - Create new... - Crear novo... - - - - Unknown - Descoñecido - - - - Forum - Foro - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Para abrir calquera das ligazóns no teu navegador de escritorio, fai click co botón dereito -> Abrir en navegador externo - - - - Creation date - Data de creación - - - - Last modification - Última modificación - - - - Notes - Notas - - - - Open start page preferences - Abrir as preferencias da páxina de inicio + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Inicio diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_hr.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_hr.ts index 4c22122a2e..71ba76b4ab 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_hr.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_hr.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Počni + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Dokumenti + + + + Help + Pomoć + + + + Activity + Aktivnost + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Nedavno korištene datoteke + + + + Tip + Savjet + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Prilagoditi broj ostvarenih datoteka koje će biti prikazane ovdje u izborniku Uredi-> Postavke-> Općenito-> Veličina popisa nedavno korištenih datoteka + + + + Examples + Primjeri + + + + General documentation + Opća dokumentacija + + + + User hub + Korisničko okruženje + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Ovo poglavlje sadrži dokumentaciju korisnu za FreeCAD korisnike, općenito: popis svih radnih površina, detaljne upute kako instalirati i koristiti FreeCAD program, tutorijali i sve što je potrebno za početak. + + + + Power users hub + Napredno korisničko okruženje + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Ovo poglavlje sadrži dokumentaciju za napredne korisnike i osobe zainteresirane za pisanje Python skripte. Tamo ćete također naći spremište makronaredbi, upute o tome kako instalirati i koristiti ih, dodatne informacije o prilagodbi FreeCAD-a vašim specifičnim potrebama. + + + + Developers hub + Programersko okruženje + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Ovo poglavlje sadrži dokumentaciju za programere: kako sastaviti ( kompilirati) FreeCAD, o strukturi FreeCAD-a, izvornom kodu i kako se kretati u njemu i kako razvijati nove radne površine, ili integrirati FreeCAD u vlastite aplikacije. + + + + Manual + Priručnik + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD priručnik je jedan više linearni način prezentacije informacija ove "wiki" stranice. Čini vam se kao da čitate knjigu i nježno vas upoznaje sa više drugih stranica iz korisničkih sučelja gore. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-knjiga verzije</a> su također dostupne. + + + + Workbenches documentation + Radne Površine Dokumentacija + + + + These are the help pages of all the workbenches currently installed on this computer. + Ovo su stranice pomoći Radnih Površina trenutno instaliranih na ovom računalu. + + + + Getting help from the community + Dobivanje pomoći od zajednice + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">Forum FreeCAD-a</a> je sjajno mjesto za dobijanje pomoći od drugih korisnika i programera FreeCAD-a. Forum ima puno odjeljaka za različite vrste problema i teme diskusije. Ako imaš nedoumice, objavi u glavnom odeljku <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoć pri korištenju FreeCAD-a</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Ako prvi put postavljate na forumu, budite sigurni da <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">Prvo pročitati upute!</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD održava javno <a href="https://www.freecad.org/tracker">traženje grešaka</a> gdje svatko može slati greške i predložiti nove značajke programa. Da izbjegnete dodatni rad i dobijete najbolju šansu da vaša pronađena greška bude riješena, obavezno pročitajte <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">vodič prijave greške</a> prije "postanja". + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Ovdje su najnovije dodane promjene <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD izvorni kod</a>. Ove promjene možda još ne možete koristiti u FreeCAD verziji koju trenutno koristite. Provjerite dostupne opcije <a href="https://www.freecad.org/wiki/Downloads"></a> ako želite da koristite verziju u razvoju. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Najnoviji postovi na <a href="https://forum.freecad.org">FreeCAD forumu</a>: + + + + Available addons + Dostupni dodatci + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Ispod je popis dostupnih dodataka za Radne Površine koji se mogu dodati kod FreeCAD instalacije. Možete ih pregledavati i instalirati iz izbornika Alati-> Addons manager. Možete naučiti više o njima tako da kliknete na linkove ispod. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Ako nije u paketu sa FreeCAD verzijom, instalirajte FreeCAD dokumentaciju (paket dokumentacije za sučelja), Radni Stol "Pomoć" i pojedinačnu dokumentaciju naredbi bez internetske vez. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Ne možete dohvatiti podatke iz GitHub. <a href="EnableDownload.py">autorizirajte FreeCAD pristup internetu</a> i ponovno učitajte početnu stranicu. + + + + Recent commits + Nedavno poslano + + + + See all commits on github + Pogledajte sve objave na "github" + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Možete konfigurirati prilagođenu mapu za prikaz u izborniku Uredi-> Postavke-> Start-> Pokaži dodatne mape + + + + version + verzija + + + + build + izgradnja + + + + Create new... + Stvaranje nove... + + + + Unknown + Nepoznato + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Otvorite bilo koji od linkova gore u tvom pregledniku radne površine, kliknite desnom tipkom miša-> otvori u vanjskom pregledniku + + + + Creation date + Datum stvaranja + + + + Last modification + Posljednja izmjena + + + + Notes + Bilješke + + + + Open start page preferences + Otvori postavke Početne stranice + + + + Workbench + + + + Start page + Početna stranica + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opcije početne stranice - - - - Start page template - Predložak početne stranice - - - - An optional HTML template that will be used instead of the default start page. - Opcionalni HTML predložak koji će se koristiti umjesto zadane početne stranice. - - - + Contents Sadržaj - - Show notepad - Pokaži zabilješke + + Show forum + Prikaz foruma - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Pokazuje zabilješke pored datoteke sličice, gdje možete napraviti zabilješke od FreeCAD sesija - - - + Show examples folder contents Prikaži sadržaj mape primjera - - If you want the examples to show on the first page - Ako želite da se primjeri za prikažu na prvoj stranici - - - + Show additional folder Pokaži dodatne mape - + + If you want the examples to show on the first page + Ako želite da se primjeri za prikažu na prvoj stranici + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Ako je to označeno, najnoviji postovi iz foruma FreeCAD prikazat će se na kartici aktivnosti + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Izborna prilagođena mapa koja će se prikazati na dnu prve stranice. Koristite ";;" da biste odvojili putove, ovdje možete dodati nekoliko mapa - - Show forum - Prikaz foruma + + Show notepad + Pokaži zabilješke - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Ako je to označeno, najnoviji postovi iz foruma FreeCAD prikazat će se na kartici aktivnosti + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Pokazuje zabilješke pored datoteke sličice, gdje možete napraviti zabilješke od FreeCAD sesija - + Show tips Prikaži savjete - + + General + Općenito + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Prikaži savjete pomoći u kartici Dokumenti početne radne površine - - Show scrollbars - Prikaži trake za pomeranje + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Pisma i boje - - Use FreeCAD style sheet - Korištenje FreeCAD liste stila - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Ako je to označeno, i ako su stilski predlošci naznačeni u općim postavkama, to će se koristiti i nadjačati boju ispod - - - - Background color - Boja pozadine - - - - The background color behind the panels - Boja pozadine iza panela - - - - Background color down gradient - Boja pozadine Nijansa boje dolje - - - - The down gradient for the background color (currently unsupported) - Prijelaz na dolje za boju pozadine (trenutno se ne podržava) - - - - Background image - Pozadinska slika - - - - An optional image to display as background - Opcionalna slika koja se prikazuje kao pozadina - - - - Background text color - Boja teksta pozadine - - - - The color of the version text - Boja teksta verzije - - - - Page background color - Boja pozadine stranice - - - + The background of the main start page area Pozadina od područja glavne početne stranice - - Page text color - Boja teksta stranice + + Background color + Boja pozadine - - The color of the text on the main pages - Boja teksta na glavnoj stranici - - - - Box background color - Boja pozadine okvira - - - - The background color of the boxes inside the pages - Boja okvira pozadine unutar stranice - - - - Link color - Boja poveznice - - - - The color of the links - Boja poveznica (linkova) - - - - Font family - Obitelj Fontova - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Obitelj pisma (fonta) na početnoj stranici. Može biti naziv pisma ili niz pričuvni pisama odvojenih zarezom - - - - Arial,Helvetica,sans - Arial, Helvetica, Sans - - - - The base font size to use for all texts of the Start page - Veličina osnovnog pisma za sve tekstove na početnoj stranici - - - - px - px - - - - Open links - Otvori poveznice - - - + in FreeCAD u FreeCAD - + In external browser U vanjskom pregledniku - - Use gradient for New File icon - Koristiti gradijent za ikonu Nova Datoteka + + Background color down gradient + Boja pozadine Nijansa boje dolje - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Ako je ovo odabrano, ikona 'Nova datoteka' prikazuje ikonu gradijenta umjesto normalne ikone + + The color of the version text + Boja teksta verzije - + + Link color + Boja poveznice + + + + An optional image to display as background + Opcionalna slika koja se prikazuje kao pozadina + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Ako je to označeno, i ako su stilski predlošci naznačeni u općim postavkama, to će se koristiti i nadjačati boju ispod + + + + Page background color + Boja pozadine stranice + + + + The color of the text on the main pages + Boja teksta na glavnoj stranici + + + + Background image + Pozadinska slika + + + + Page text color + Boja teksta stranice + + + + The color of the links + Boja poveznica (linkova) + + + + The background color of the boxes inside the pages + Boja okvira pozadine unutar stranice + + + + Box background color + Boja pozadine okvira + + + + The background color behind the panels + Boja pozadine iza panela + + + + The down gradient for the background color (currently unsupported) + Prijelaz na dolje za boju pozadine (trenutno se ne podržava) + + + + Open links + Otvori poveznice + + + + Background text color + Boja teksta pozadine + + + + Use FreeCAD style sheet + Korištenje FreeCAD liste stila + + + + Font family + Obitelj Fontova + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Obitelj pisma (fonta) na početnoj stranici. Može biti naziv pisma ili niz pričuvni pisama odvojenih zarezom + + + + Arial,Helvetica,sans + Arial, Helvetica, Sans + + + + The base font size to use for all texts of the Start page + Veličina osnovnog pisma za sve tekstove na početnoj stranici + + + + + px + px + + + Options Mogućnosti - - Switch workbench after loading - Promijeni radni stol nakon učitavanja - - - - Choose which workbench to switch to after the program launches - Odaberite na koji radni stol se želite prebaciti nakon pokretanja programa - - - - Close start page after loading - Zatvori početnu stranicu nakon učitavanja - - - + If checked, will automatically close the Start page when FreeCAD launches Ako je označeno, automatski će zatvoriti početnu stranicu kada se FreeCAD pokrene - + + Switch workbench after loading + Promijeni radni stol nakon učitavanja + + + + Close start page after loading + Zatvori početnu stranicu nakon učitavanja + + + Close and switch on opening file Zatvorite i uključite otvaranje datoteke - + If application is started by opening a file, apply the two settings above Ako se aplikacija pokrene otvaranjem datoteke, primijenite dvije gore navedene postavke - Workbench + DlgStartPreferencesAdvanced - - - Start page - Početna stranica - - - - StartPage - - - Start - Počni + + Advanced + Napredno - - Documents - Dokumenti + + Custom HTML Template + Custom HTML Template - - Help - Pomoć + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Aktivnost + + Custom CSS + Custom CSS - - Recent files - Nedavno korištene datoteke - - - - Tip - Savjet - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Prilagoditi broj ostvarenih datoteka koje će biti prikazane ovdje u izborniku Uredi-> Postavke-> Općenito-> Veličina popisa nedavno korištenih datoteka - - - - Examples - Primjeri - - - - General documentation - Opća dokumentacija - - - - User hub - Korisničko okruženje - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Ovo poglavlje sadrži dokumentaciju korisnu za FreeCAD korisnike, općenito: popis svih radnih površina, detaljne upute kako instalirati i koristiti FreeCAD program, tutorijali i sve što je potrebno za početak. - - - - Power users hub - Napredno korisničko okruženje - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Ovo poglavlje sadrži dokumentaciju za napredne korisnike i osobe zainteresirane za pisanje Python skripte. Tamo ćete također naći spremište makronaredbi, upute o tome kako instalirati i koristiti ih, dodatne informacije o prilagodbi FreeCAD-a vašim specifičnim potrebama. - - - - Developers hub - Programersko okruženje - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Ovo poglavlje sadrži dokumentaciju za programere: kako sastaviti ( kompilirati) FreeCAD, o strukturi FreeCAD-a, izvornom kodu i kako se kretati u njemu i kako razvijati nove radne površine, ili integrirati FreeCAD u vlastite aplikacije. - - - - Manual - Priručnik - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD priručnik je jedan više linearni način prezentacije informacija ove "wiki" stranice. Čini vam se kao da čitate knjigu i nježno vas upoznaje sa više drugih stranica iz korisničkih sučelja gore. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-knjiga verzije</a> su također dostupne. - - - - Workbenches documentation - Radne Površine Dokumentacija - - - - These are the help pages of all the workbenches currently installed on this computer. - Ovo su stranice pomoći Radnih Površina trenutno instaliranih na ovom računalu. - - - - Getting help from the community - Dobivanje pomoći od zajednice - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">Forum FreeCAD-a</a> je sjajno mjesto za dobijanje pomoći od drugih korisnika i programera FreeCAD-a. Forum ima puno odjeljaka za različite vrste problema i teme diskusije. Ako imaš nedoumice, objavi u glavnom odeljku <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoć pri korištenju FreeCAD-a</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Ako prvi put postavljate na forumu, budite sigurni da <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">Prvo pročitati upute!</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD održava javno <a href="https://www.freecad.org/tracker">traženje grešaka</a> gdje svatko može slati greške i predložiti nove značajke programa. Da izbjegnete dodatni rad i dobijete najbolju šansu da vaša pronađena greška bude riješena, obavezno pročitajte <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">vodič prijave greške</a> prije "postanja". - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Ovdje su najnovije dodane promjene <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD izvorni kod</a>. Ove promjene možda još ne možete koristiti u FreeCAD verziji koju trenutno koristite. Provjerite dostupne opcije <a href="https://www.freecad.org/wiki/Downloads"></a> ako želite da koristite verziju u razvoju. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Najnoviji postovi na <a href="https://forum.freecad.org">FreeCAD forumu</a>: - - - - Available addons - Dostupni dodatci - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Ispod je popis dostupnih dodataka za Radne Površine koji se mogu dodati kod FreeCAD instalacije. Možete ih pregledavati i instalirati iz izbornika Alati-> Addons manager. Možete naučiti više o njima tako da kliknete na linkove ispod. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Ako nije u paketu sa FreeCAD verzijom, instalirajte FreeCAD dokumentaciju (paket dokumentacije za sučelja), Radni Stol "Pomoć" i pojedinačnu dokumentaciju naredbi bez internetske vez. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Ne možete dohvatiti podatke iz GitHub. <a href="EnableDownload.py">autorizirajte FreeCAD pristup internetu</a> i ponovno učitajte početnu stranicu. - - - - Recent commits - Nedavno poslano - - - - See all commits on github - Pogledajte sve objave na "github" - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Možete konfigurirati prilagođenu mapu za prikaz u izborniku Uredi-> Postavke-> Start-> Pokaži dodatne mape - - - - version - verzija - - - - build - izgradnja - - - - Create new... - Stvaranje nove... - - - - Unknown - Nepoznato - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Otvorite bilo koji od linkova gore u tvom pregledniku radne površine, kliknite desnom tipkom miša-> otvori u vanjskom pregledniku - - - - Creation date - Datum stvaranja - - - - Last modification - Posljednja izmjena - - - - Notes - Bilješke - - - - Open start page preferences - Otvori postavke Početne stranice + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Počni diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_hu.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_hu.ts index 7f7c0658ad..0dcf4f2fec 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_hu.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_hu.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Kezdő időpont + + + + Welcome to FreeCAD + FreeCAD üdvözli + + + + Documents + Dokumentumok + + + + Help + Súgó + + + + Activity + Tevékenység + + + + Blog + Blog + + + + Link to the FreeCAD blog + FreeCAD bloghivatkozás + + + + New file + Új fájl + + + + Empty File + Üres fájl + + + + Create an empty FreeCAD file + Egy üres FreeCAD fájl létrehozás + + + + Open File + Fájl megnyitása + + + + Open an existing CAD file or 3D model + Meglévő CAD fájl vagy 3D modell megnyitása + + + + Standard Part + Általános alkatrész + + + + Create a part with the Part Design workbench + Alkatrész létrehozása a Alkatrész tervezés munkafelülettel + + + + 2D Draft + 2D tervrajz + + + + Create a 2D draft with the Draft workbench + 2D-s vázlat létrehozása a Vázlat munkafelülettel + + + + BIM/Architecture + BIM / Építészet + + + + Create an architecture project + Építészeti terv létrehozása + + + + Recent files + Legutóbbi fájlok + + + + Tip + Tipp + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + A legutóbbi fájlok száma beállítható a Szerkesztés -> Beállítások -> Általános -> Legutóbbi fájlok listájának mérete menüpontban + + + + Examples + Példák + + + + General documentation + Általános dokumentáció + + + + User hub + Felhasználói csomópont + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Ez a szakasz hasznos dokumentációkat tartalmaz a FreeCAD felhasználóknak: egy listát az összes munkafelületről, részletes utasításokat a telepítésről és a FreeCAD használatáról, útmutatók és minden ami a kezdéshez szükséges lehet. + + + + Power users hub + Haladó felhasználói csomópont + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Ez a szakasz a haladó felhasználóknak és a python szkriptek írásával kapcsolatban érdeklődőknek szóló dokumentációt tartalmazza. Ugyancsak itt található a makrók gyűjteménye, a hozzájuk kapcsolódó telepítési és használati útmutatók, illetve további információk a FreeCAD egyedi igényeknek megfelelő személyre szabásáról. + + + + Developers hub + Fejlesztői csomópont + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Az a rész a fejlesztők számára tartalmaz anyagot: Hogyan kell összeállítani a FreeCAD-t, hogyan kell felépíteni a FreeCAD forráskódját + hogyan kell navigálni, új munkaállományokat fejleszteni és/vagy a FreeCAD-ot beépíteni a saját alkalmazásába. + + + + Manual + Kézikönyv + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + A FreeCAD kézikönyv egy másik, lineárisabb módja annak, hogy bemutassa a wikiban található információkat. Úgy készül, hogy olvasható, mint egy könyv, és finoman bemutatja Önnek sok más oldalon keresztül a fenti csomópontokat. A <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> e-könyvverziók </a> is elérhetők. + + + + Workbenches documentation + Munkafelületek dokumentációja + + + + These are the help pages of all the workbenches currently installed on this computer. + A jelenleg telepített összes munkafelület súgói. + + + + Getting help from the community + Segítségkérés a közösségtől + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + A <a href="http://forum.freecad.org">FreeCAD fórum</a> egy nagyszerű hely, ahol segítséget kérhetsz FreeCAD felhasználóktól és fejlesztőktől. A fórumnak külön szakaszai foglalkoznak különböző fajta problémákkal és témákkal. Ha kétségeid vannak, hogy melyik szakaszba írj, akkor használd az általános <a href="https://forum.freecad.org/viewforum.php?f=3">Súgó a FreeCAD használatában</a> szakaszt. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Ha ez az első alkalom, hogy a fórumba írsz, akkor mindenképp olvasd el előtte az <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">Útmutatót!</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + A FreeCAD fenntartja a nyilvános <a href="https://www.freecad.org/tracker"> hibakeresőt </a>, ahol bárki bejegyezhet hibákat és új szolgáltatásokat javasolhat. Annak elkerülése érdekében, hogy többlet munkát ne okozz, és a lehető legjobb eséllyel meglegyen a hiba megoldása, olvassa el a <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> hibakeresési útmutatót </a> kiküldetés előtt. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Az alábbiakban láthatók a <a href="http://github.com/FreeCAD/FreeCAD/"> FreeCAD forráskódjának </a> legfrissebb módosításai. Ezek a változások még nem tükrözik a jelenleg futó FreeCAD verziót. Ellenőrizze a <a href="https://www.freecad.org/wiki/Downloads"> elérhető lehetőségeket </a>, ha fejlesztési verzióhoz szeretne hozzáférni. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Legújabb hozzászólások a <a href="https://forum.freecad.org">FreeCAD fórumon</a>: + + + + Available addons + Elérhető bővítmények + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Alább látható az elérhető munkafelületek listája, amiket hozzáadhatsz a FreeCAD-hez. A menüben az Eszközök -> Bővítmények kezelése menüpontban böngészhetsz köztük és telepítheted őket. Bármelyikről többet tudhatsz meg, ha az alábbi linkekre kattintasz. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Ha a te FreeCAD verziód nem tartalmazta, akkor telepítsd a FreeCAD dokumentáció csomagot, amivel internet nélkül is elérheted a dokumentációs csomópontokat, a munkafelületek súgóit illetve az egyes parancsokhoz tartozó dokumentációt. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Nem kérhető le információ a GitHub-ról. <a href="EnableDownload.py">Engedélyezd, hogy a FreeCAD hozzáférjen az internethez,</a> majd töltsd újra a Kezdőlapot. + + + + Recent commits + Legutóbbi bejegyzések + + + + See all commits on github + Tekintse meg az összes github közzétételt + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Az ebben a menüben megjelenítendő egyéni mappát beállíthatod a Szerkesztés -> Beállítások -> Start -> További mappa menüpontban + + + + version + verzió + + + + build + kiadás + + + + Create new... + Új létrehozása... + + + + Unknown + Ismeretlen + + + + Forum + Fórum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + A fenti hivatkozások egyikének az asztali böngészőben megnyitásához kattintson a jobb gombbal a -> Nyissa meg a külső böngészőben + + + + Creation date + Létrehozás dátuma + + + + Last modification + Utolsó módosítás + + + + Notes + Megjegyzések + + + + Open start page preferences + Kezdőlap beállításainak megnyitása + + + + Workbench + + + + Start page + Kezdőlap + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Kezdő oldal lehetőségek - - - - Start page template - Kezdő oldal sablon - - - - An optional HTML template that will be used instead of the default start page. - Egy HTML sablon lehetőség, meylet az alapértelmezett kezdő oldal helyett fogja használni. - - - + Contents Tartalom - - Show notepad - Jegyzettömb megjelenítése + + Show forum + Fórum mutatása - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Jegyzettömb jelenik meg a fájlbélyegképek mellett, ahol a jegyzeteket a munkamenetek között tárolhatja - - - + Show examples folder contents Mutassa a példák mappa tartalmát - - If you want the examples to show on the first page - Ha szeretné a példákat az első oldalon megmutatni - - - + Show additional folder Mutassa a kiegészítő mappákat - + + If you want the examples to show on the first page + Ha szeretné a példákat az első oldalon megmutatni + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Ha bejelölt, a legutóbbi FreeCAD fórum bejegyzéseket kijelzi a Tevékenység táblázatban + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Az első oldal alján megjelenő opcionális mappa. A ";;" útvonalak külön-külön történő használatával több mappát is hozzáadhat itt - - Show forum - Fórum mutatása + + Show notepad + Jegyzettömb megjelenítése - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Ha bejelölt, a legutóbbi FreeCAD fórum bejegyzéseket kijelzi a Tevékenység táblázatban + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Jegyzettömb jelenik meg a fájlbélyegképek mellett, ahol a jegyzeteket a munkamenetek között tárolhatja - + Show tips Tippek megjelenítése - + + General + Általános + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + A kezdő oldalról egy fájl betöltése után átváltani kívánt munkafelület, csak akkor használatos, ha a kezdő oldal az indító munkafelület + + + + The size of file thumbnail icons in recent files and examples sections + A fájlok miniatűr ikonjainak mérete a legutóbbi fájlok és a példák szakaszokban + + + Displays help tips in the Start workbench Documents tab Súgótippek megjelenítése a Start munkafelület Dokumentumok lapján - - Show scrollbars - Görgetősávok megjelenítése + + File thumbnail size + A fájlikonok mérete - + + Show file thumbnails + Miniatűr fájl megjelenítése + + + Fonts and colors Betűtípusok és színek - - Use FreeCAD style sheet - FreeCAD stíluslap használata - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Ha bejelölt, ha az általános testreszabásokban egy stílus lapot meghatározott, ennek használatával felülírja az alul található színeket - - - - Background color - Háttér szín - - - - The background color behind the panels - Panelek mögötti háttérszín - - - - Background color down gradient - Háttérszín a színátmenet alján - - - - The down gradient for the background color (currently unsupported) - A háttérszín halványítása (jelenleg nem támogatott) - - - - Background image - Háttérkép - - - - An optional image to display as background - Egy lehetséges ábra a háttérképnek - - - - Background text color - Háttér szöveg színe - - - - The color of the version text - A verzió szövegének színe - - - - Page background color - Oldal háttérszíne - - - + The background of the main start page area A fő kezdő oldal területének a háttere - - Page text color - Oldal szöveg színe + + Background color + Háttér szín - - The color of the text on the main pages - A fő oldalak szöveg színe - - - - Box background color - Téglatest háttérszíne - - - - The background color of the boxes inside the pages - Az oldalon levő téglatestek háttér színe - - - - Link color - Kapcsolat színe - - - - The color of the links - A hivatkozások színe - - - - Font family - Betűkészlet - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - A kezdő oldalon használni kívánt betűcsalád. Állhat egy betűtípus nevéből vagy vesszővel elválasztott visszatérő betűtípus sorozatából - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - Alap betűméretet a kezdő oldal összes szövegének használatához - - - - px - px - - - - Open links - Nyitott kapcsolatok - - - + in FreeCAD FreeCAD-ban - + In external browser Külső böngészőben - - Use gradient for New File icon - Színátmenet használata új fájl ikonjára + + Background color down gradient + Háttérszín a színátmenet alján - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Ha ez a beállítás ki van jelölve, az 'Új fájl' ikon egy színátmenetes ikont mutat az alapértelmezett helyett + + The color of the version text + A verzió szövegének színe - + + Link color + Kapcsolat színe + + + + An optional image to display as background + Egy lehetséges ábra a háttérképnek + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Ha bejelölt, ha az általános testreszabásokban egy stílus lapot meghatározott, ennek használatával felülírja az alul található színeket + + + + Page background color + Oldal háttérszíne + + + + The color of the text on the main pages + A fő oldalak szöveg színe + + + + Background image + Háttérkép + + + + Page text color + Oldal szöveg színe + + + + The color of the links + A hivatkozások színe + + + + The background color of the boxes inside the pages + Az oldalon levő téglatestek háttér színe + + + + Box background color + Téglatest háttérszíne + + + + The background color behind the panels + Panelek mögötti háttérszín + + + + The down gradient for the background color (currently unsupported) + A háttérszín halványítása (jelenleg nem támogatott) + + + + Open links + Nyitott kapcsolatok + + + + Background text color + Háttér szöveg színe + + + + Use FreeCAD style sheet + FreeCAD stíluslap használata + + + + Font family + Betűkészlet + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + A kezdő oldalon használni kívánt betűcsalád. Állhat egy betűtípus nevéből vagy vesszővel elválasztott visszatérő betűtípus sorozatából + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + Alap betűméretet a kezdő oldal összes szövegének használatához + + + + + px + px + + + Options Beállítások - - Switch workbench after loading - Munkafelületre váltás a betöltés után - - - - Choose which workbench to switch to after the program launches - Válassza ki, hogy melyik állomásra váltson, amikor elkezdi - - - - Close start page after loading - Kezdő oldal bezárása a betöltés után - - - + If checked, will automatically close the Start page when FreeCAD launches Ha bejelöli, a FreeCAD indításakor a kezdőoldal automatikusan bezárul - + + Switch workbench after loading + Munkafelületre váltás a betöltés után + + + + Close start page after loading + Kezdő oldal bezárása a betöltés után + + + Close and switch on opening file Fájl bezárása és módosítása - + If application is started by opening a file, apply the two settings above Ha a FreeCAD alkalmazás a fájl megnyitásával kezdődik, alkalmazza a fenti két beállítást - Workbench + DlgStartPreferencesAdvanced - - - Start page - Kezdőlap - - - - StartPage - - - Start - Kezdő időpont + + Advanced + Haladó - - Documents - Dokumentumok + + Custom HTML Template + Egyéni HTML sablon - - Help - Súgó + + An optional HTML template that will be used instead of the default start page. + Egy HTML sablon lehetőség, melyet az alapértelmezett kezdő oldal helyett fogja használni. - - Activity - Tevékenység + + Custom CSS + Egyéni CSS - - Recent files - Legutóbbi fájlok - - - - Tip - Tipp - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - A legutóbbi fájlok száma beállítható a Szerkesztés -> Beállítások -> Általános -> Legutóbbi fájlok listájának mérete menüpontban - - - - Examples - Példák - - - - General documentation - Általános dokumentáció - - - - User hub - Felhasználói csomópont - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Ez a szakasz hasznos dokumentációkat tartalmaz a FreeCAD felhasználóknak: egy listát az összes munkafelületről, részletes utasításokat a telepítésről és a FreeCAD használatáról, útmutatók és minden ami a kezdéshez szükséges lehet. - - - - Power users hub - Haladó felhasználói csomópont - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Ez a szakasz a haladó felhasználóknak és a python szkriptek írásával kapcsolatban érdeklődőknek szóló dokumentációt tartalmazza. Ugyancsak itt található a makrók gyűjteménye, a hozzájuk kapcsolódó telepítési és használati útmutatók, illetve további információk a FreeCAD egyedi igényeknek megfelelő személyre szabásáról. - - - - Developers hub - Fejlesztői csomópont - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Az a rész a fejlesztők számára tartalmaz anyagot: Hogyan kell összeállítani a FreeCAD-t, hogyan kell felépíteni a FreeCAD forráskódját + hogyan kell navigálni, új munkaállományokat fejleszteni és/vagy a FreeCAD-ot beépíteni a saját alkalmazásába. - - - - Manual - Kézikönyv - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - A FreeCAD kézikönyv egy másik, lineárisabb módja annak, hogy bemutassa a wikiban található információkat. Úgy készül, hogy olvasható, mint egy könyv, és finoman bemutatja Önnek sok más oldalon keresztül a fenti csomópontokat. A <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> e-könyvverziók </a> is elérhetők. - - - - Workbenches documentation - Munkafelületek dokumentációja - - - - These are the help pages of all the workbenches currently installed on this computer. - A jelenleg telepített összes munkafelület súgói. - - - - Getting help from the community - Segítségkérés a közösségtől - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - A <a href="http://forum.freecad.org">FreeCAD fórum</a> egy nagyszerű hely, ahol segítséget kérhetsz FreeCAD felhasználóktól és fejlesztőktől. A fórumnak külön szakaszai foglalkoznak különböző fajta problémákkal és témákkal. Ha kétségeid vannak, hogy melyik szakaszba írj, akkor használd az általános <a href="https://forum.freecad.org/viewforum.php?f=3">Súgó a FreeCAD használatában</a> szakaszt. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Ha ez az első alkalom, hogy a fórumba írsz, akkor mindenképp olvasd el előtte az <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">Útmutatót!</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - A FreeCAD fenntartja a nyilvános <a href="https://www.freecad.org/tracker"> hibakeresőt </a>, ahol bárki bejegyezhet hibákat és új szolgáltatásokat javasolhat. Annak elkerülése érdekében, hogy többlet munkát ne okozz, és a lehető legjobb eséllyel meglegyen a hiba megoldása, olvassa el a <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> hibakeresési útmutatót </a> kiküldetés előtt. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Az alábbiakban láthatók a <a href="http://github.com/FreeCAD/FreeCAD/"> FreeCAD forráskódjának </a> legfrissebb módosításai. Ezek a változások még nem tükrözik a jelenleg futó FreeCAD verziót. Ellenőrizze a <a href="https://www.freecad.org/wiki/Downloads"> elérhető lehetőségeket </a>, ha fejlesztési verzióhoz szeretne hozzáférni. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Legújabb hozzászólások a <a href="https://forum.freecad.org">FreeCAD fórumon</a>: - - - - Available addons - Elérhető bővítmények - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Alább látható az elérhető munkafelületek listája, amiket hozzáadhatsz a FreeCAD-hez. A menüben az Eszközök -> Bővítmények kezelése menüpontban böngészhetsz köztük és telepítheted őket. Bármelyikről többet tudhatsz meg, ha az alábbi linkekre kattintasz. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Ha a te FreeCAD verziód nem tartalmazta, akkor telepítsd a FreeCAD dokumentáció csomagot, amivel internet nélkül is elérheted a dokumentációs csomópontokat, a munkafelületek súgóit illetve az egyes parancsokhoz tartozó dokumentációt. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Nem kérhető le információ a GitHub-ról. <a href="EnableDownload.py">Engedélyezd, hogy a FreeCAD hozzáférjen az internethez,</a> majd töltsd újra a Kezdőlapot. - - - - Recent commits - Legutóbbi bejegyzések - - - - See all commits on github - Tekintse meg az összes github közzétételt - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Az ebben a menüben megjelenítendő egyéni mappát beállíthatod a Szerkesztés -> Beállítások -> Start -> További mappa menüpontban - - - - version - verzió - - - - build - kiadás - - - - Create new... - Új létrehozása... - - - - Unknown - Ismeretlen - - - - Forum - Fórum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - A fenti hivatkozások egyikének az asztali böngészőben megnyitásához kattintson a jobb gombbal a -> Nyissa meg a külső böngészőben - - - - Creation date - Létrehozás dátuma - - - - Last modification - Utolsó módosítás - - - - Notes - Megjegyzések - - - - Open start page preferences - Kezdőlap beállításainak megnyitása + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Ide beilleszthet egyéni CSS-t, és a Kezdőoldal alkalmazni fogja helyetted. Ha többet szeretne megtudni arról, hogyan lehet a Kezdőlapot stílusosítani, nézze meg a HTML- és CSS-forrásokat:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Kezdő időpont diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_id.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_id.ts index 244e713e9d..0fb93378d5 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_id.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_id.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Mulai + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Dokumen + + + + Help + Bantuan + + + + Activity + Aktifitas + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Petunjuk + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Sesuaikan jumlah file terbaru yang akan ditampilkan di sini di menu Edit -> Preferensi -> Umum -> Ukuran daftar file terbaru + + + + Examples + Contoh + + + + General documentation + Dokumentasi umum + + + + User hub + User hub + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Bagian ini berisi dokumentasi yang berguna untuk pengguna FreeCAD secara umum: daftar semua meja kerja, petunjuk terperinci tentang cara menginstal dan menggunakan aplikasi FreeCAD, tutorial, dan semua yang dibutuhkan untuk menggunakannya. + + + + Power users hub + Power users hub + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Bagian ini mengumpulkan dokumentasi untuk pengguna tingkat lanjutan dan mereka yang tertarik untuk membuat tulisan python. Anda juga akan menemukan ruang penyimpanan yang besar, instruksi tentang cara menginstal dan menggunakannya, dan informasi lebih lanjut tentang cara menyesuaikan FreeCAD dengan kebutuhan khusus Anda. + + + + Developers hub + Developers hub + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + + + + Workbenches documentation + Workbenches documentation + + + + These are the help pages of all the workbenches currently installed on this computer. + These are the help pages of all the workbenches currently installed on this computer. + + + + Getting help from the community + Dapatkan bantuan dari komunitas + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Postingan terakhir di <a href="https://forum.freecad.org">forum FreeCAD</a>: + + + + Available addons + Available addons + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + + + + Recent commits + Recent commits + + + + See all commits on github + See all commits on github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + + + + version + versi + + + + build + build + + + + Create new... + Buat baru... + + + + Unknown + Unknown + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + To open any of the links above in your desktop browser, Right-click -> Open in external browser + + + + Creation date + Tanggal diciptakan + + + + Last modification + Terakhir dimodifikasi + + + + Notes + Catatan + + + + Open start page preferences + Open start page preferences + + + + Workbench + + + + Start page + Start page + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Start page options - - - - Start page template - Start page template - - - - An optional HTML template that will be used instead of the default start page. - An optional HTML template that will be used instead of the default start page. - - - + Contents Contents - - Show notepad - Show notepad + + Show forum + Tampilkan forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - + Show examples folder contents Show examples folder contents - - If you want the examples to show on the first page - If you want the examples to show on the first page - - - + Show additional folder Show additional folder - + + If you want the examples to show on the first page + If you want the examples to show on the first page + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - - Show forum - Tampilkan forum + + Show notepad + Show notepad - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips Show tips - + + General + Umum + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Displays help tips in the Start workbench Documents tab - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Font dan warna - - Use FreeCAD style sheet - Use FreeCAD style sheet - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - Background color - Warna latar belakang - - - - The background color behind the panels - The background color behind the panels - - - - Background color down gradient - Background color down gradient - - - - The down gradient for the background color (currently unsupported) - The down gradient for the background color (currently unsupported) - - - - Background image - Gambar background - - - - An optional image to display as background - An optional image to display as background - - - - Background text color - Background text color - - - - The color of the version text - The color of the version text - - - - Page background color - Page background color - - - + The background of the main start page area The background of the main start page area - - Page text color - Page text color + + Background color + Warna latar belakang - - The color of the text on the main pages - The color of the text on the main pages - - - - Box background color - Box background color - - - - The background color of the boxes inside the pages - The background color of the boxes inside the pages - - - - Link color - Link color - - - - The color of the links - The color of the links - - - - Font family - Keluarga font - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - The base font size to use for all texts of the Start page - - - - px - px - - - - Open links - Open links - - - + in FreeCAD in FreeCAD - + In external browser In external browser - - Use gradient for New File icon - Use gradient for New File icon + + Background color down gradient + Background color down gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + The color of the version text + The color of the version text - + + Link color + Link color + + + + An optional image to display as background + An optional image to display as background + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + + + + Page background color + Page background color + + + + The color of the text on the main pages + The color of the text on the main pages + + + + Background image + Gambar background + + + + Page text color + Page text color + + + + The color of the links + The color of the links + + + + The background color of the boxes inside the pages + The background color of the boxes inside the pages + + + + Box background color + Box background color + + + + The background color behind the panels + The background color behind the panels + + + + The down gradient for the background color (currently unsupported) + The down gradient for the background color (currently unsupported) + + + + Open links + Open links + + + + Background text color + Background text color + + + + Use FreeCAD style sheet + Use FreeCAD style sheet + + + + Font family + Keluarga font + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + The base font size to use for all texts of the Start page + + + + + px + px + + + Options Pilihan - - Switch workbench after loading - Switch workbench after loading - - - - Choose which workbench to switch to after the program launches - Choose which workbench to switch to after the program launches - - - - Close start page after loading - Close start page after loading - - - + If checked, will automatically close the Start page when FreeCAD launches If checked, will automatically close the Start page when FreeCAD launches - + + Switch workbench after loading + Switch workbench after loading + + + + Close start page after loading + Close start page after loading + + + Close and switch on opening file Close and switch on opening file - + If application is started by opening a file, apply the two settings above If application is started by opening a file, apply the two settings above - Workbench + DlgStartPreferencesAdvanced - - - Start page - Start page - - - - StartPage - - - Start - Mulai + + Advanced + Advanced - - Documents - Dokumen + + Custom HTML Template + Custom HTML Template - - Help - Bantuan + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Aktifitas + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Petunjuk - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Sesuaikan jumlah file terbaru yang akan ditampilkan di sini di menu Edit -> Preferensi -> Umum -> Ukuran daftar file terbaru - - - - Examples - Contoh - - - - General documentation - Dokumentasi umum - - - - User hub - User hub - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Bagian ini berisi dokumentasi yang berguna untuk pengguna FreeCAD secara umum: daftar semua meja kerja, petunjuk terperinci tentang cara menginstal dan menggunakan aplikasi FreeCAD, tutorial, dan semua yang dibutuhkan untuk menggunakannya. - - - - Power users hub - Power users hub - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Bagian ini mengumpulkan dokumentasi untuk pengguna tingkat lanjutan dan mereka yang tertarik untuk membuat tulisan python. Anda juga akan menemukan ruang penyimpanan yang besar, instruksi tentang cara menginstal dan menggunakannya, dan informasi lebih lanjut tentang cara menyesuaikan FreeCAD dengan kebutuhan khusus Anda. - - - - Developers hub - Developers hub - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - - - - Workbenches documentation - Workbenches documentation - - - - These are the help pages of all the workbenches currently installed on this computer. - These are the help pages of all the workbenches currently installed on this computer. - - - - Getting help from the community - Dapatkan bantuan dari komunitas - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Postingan terakhir di <a href="https://forum.freecad.org">forum FreeCAD</a>: - - - - Available addons - Available addons - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - - - - Recent commits - Recent commits - - - - See all commits on github - See all commits on github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - - - - version - versi - - - - build - build - - - - Create new... - Buat baru... - - - - Unknown - Unknown - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - To open any of the links above in your desktop browser, Right-click -> Open in external browser - - - - Creation date - Tanggal diciptakan - - - - Last modification - Terakhir dimodifikasi - - - - Notes - Catatan - - - - Open start page preferences - Open start page preferences + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Mulai diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_it.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_it.ts index b2b6ddd9e8..038e9adc19 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_it.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_it.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Inizio + + + + Welcome to FreeCAD + Benvenuto in FreeCAD + + + + Documents + Documenti + + + + Help + Aiuto + + + + Activity + Attività + + + + Blog + Blog + + + + Link to the FreeCAD blog + Collegamento al blog di FreeCAD + + + + New file + Nuovo file + + + + Empty File + File vuoto + + + + Create an empty FreeCAD file + Crea un file FreeCAD vuoto + + + + Open File + Apri File + + + + Open an existing CAD file or 3D model + Apri un file CAD esistente o un modello 3D + + + + Standard Part + Parte Standard + + + + Create a part with the Part Design workbench + Crea una parte con l'ambiente di lavoro Part Design + + + + 2D Draft + Disegno 2D + + + + Create a 2D draft with the Draft workbench + Crea una disegno 2D con l'ambiente di lavoro Draft + + + + BIM/Architecture + BIM/Architettura + + + + Create an architecture project + Crea un progetto di architettura + + + + Recent files + Recent files + + + + Tip + Suggerimento + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Regolare il numero di file recenti da mostrare qui nel menu Modifica-> Preferenze-> Generale-> Dimensione della lista dei file recenti + + + + Examples + Esempi + + + + General documentation + Documentazione generale + + + + User hub + Hub utente + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Questa sezione contiene la documentazione utile per gli utenti di FreeCAD in generale: un elenco di tutti gli ambienti di lavoro, istruzioni dettagliate su come installare e utilizzare l'applicazione FreeCAD, esercitazioni e tutto il necessario per iniziare. + + + + Power users hub + Hub degli utenti esperti + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Questa sezione raccoglie la documentazione per gli utenti avanzati e per le persone interessate alla stesura di script Python. Si trovano anche un repository di macro, le istruzioni su come installarle e usarle, e ulteriori informazioni sulla personalizzazione di FreeCAD per le proprie esigenze specifiche. + + + + Developers hub + Hub degli sviluppatori + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Questa sezione contiene materiale per gli sviluppatori: come compilare FreeCAD autonomamente, come è strutturato il codice sorgente di FreeCAD e come spostarsi all'interno di esso, e come sviluppare nuovi workbench o incorporare FreeCAD nella propria applicazione. + + + + Manual + Manuale + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Il manuale di FreeCAD è un altro modo più lineare per presentare le informazioni contenute in questo wiki. È fatto per essere letto come un libro e introduce gradualmente a molte altre pagine degli hub di cui sopra. Sono anche disponibili le <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versioni e-book</a>. + + + + Workbenches documentation + Documentazione degli ambienti di lavoro + + + + These are the help pages of all the workbenches currently installed on this computer. + Queste sono le pagine di aiuto di tutti gli ambienti di lavoro attualmente installati nel computer. + + + + Getting help from the community + Ottenere aiuto dalla comunità + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + Il <a href="http://forum.freecad.org">forum di FreeCAD</a> è un ottimo posto per ottenere aiuto dagli altri utenti di FreeCAD e dagli sviluppatori. Il forum è suddiviso in sezioni per i diversi tipi di problemi e temi di discussione. In caso di dubbio, postare nella sezione più generale <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Se è la prima volta che state postando sul forum, assicuratevi di <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264"> leggere le linee guida</a> prima di postare! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD mantiene anche un <a href="https://www.freecad.org/tracker">bug tracker</a> pubblico dove chiunque può inviare bug e proporre nuove funzionalità. Per evitare di causare lavoro extra e avere le migliori possibilità di vedere il vostro bug risolto, assicuratevi di leggere la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> Guida alla presentazione dei bug</a> prima di postare. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Di seguito sono elencate le ultime modifiche aggiunte al <a href="http://github.com/FreeCAD/FreeCAD/">codice sorgente di FreeCAD</a>. Questi cambiamenti potrebbero non essere ancora presenti nella versione di FreeCAD attualmente in esecuzione. Se si desidera ottenere una versione di sviluppo controllare le <a href="https://www.freecad.org/wiki/Downloads">opzioni disponibili</a>. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Gli ultimi post sul forum <a href="https://forum.freecad.org">FreeCAD</a>: + + + + Available addons + Addons disponibili + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Sotto è riportato un elenco dei workbench addizionali disponibili che possono essere aggiunti all'installazione di FreeCAD. Scorrere l'elenco e installarli dal menu Strumenti -> Addon manager. Per saperne di più su ognuno di essi fare clic sui link sottostanti. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Se non è incluso nella versione di FreeCAD, installare il pacchetto di documentazione di FreeCAD per ottenere la documentazione degli hub, gli aiuti degli ambienti e la documentazione dei singoli comandi senza una connessione Internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Impossibile recuperare le informazioni da GitHub. <a href="EnableDownload.py">Autorizzare l'accesso di FreeCAD a internet</a> e ricaricare la pagina iniziale. + + + + Recent commits + Ultimi commit + + + + See all commits on github + Vedere tutti i commit su github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + È possibile configurare una cartella personalizzata da visualizzare qui nel menu Modifica-> Preferenze-> Start-> Mostra la cartella aggiuntiva + + + + version + versione + + + + build + compilazione + + + + Create new... + Crea nuovo... + + + + Unknown + Sconosciuto + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Per aprire uno qualsiasi dei link sopra nel browser del desktop, fare clic con il tasto destro del mouse -> Apri nel browser esterno + + + + Creation date + Data di creazione + + + + Last modification + Ultima modifica + + + + Notes + Note + + + + Open start page preferences + Apri le preferenze della pagina iniziale + + + + Workbench + + + + Start page + Pagina iniziale + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opzioni della pagina iniziale - - - - Start page template - Modello della pagina iniziale - - - - An optional HTML template that will be used instead of the default start page. - Un modello HTML opzionale da utilizzare al posto della pagina iniziale predefinita. - - - + Contents Contenuti - - Show notepad - Visualizza Blocco note + + Show forum + Visualizza il forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Mostra un blocco note accanto alle miniature dei file, dove è possibile mantenere le note tra le sessioni di FreeCAD - - - + Show examples folder contents Mostra il contenuto della cartella degli esempi - - If you want the examples to show on the first page - Se si desidera che gli esempi vengano visualizzati nella prima pagina - - - + Show additional folder Mostra la cartella aggiuntiva - + + If you want the examples to show on the first page + Se si desidera che gli esempi vengano visualizzati nella prima pagina + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Selezionando questa opzione, gli ultimi post dal forum di FreeCAD sono visualizzati nella scheda Attività + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Una cartella personalizzata opzionale da visualizzare in fondo alla prima pagina. Usando ";;" per separare i percorsi, puoi aggiungere diverse cartelle qui - - Show forum - Visualizza il forum + + Show notepad + Visualizza Blocco note - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Selezionando questa opzione, gli ultimi post dal forum di FreeCAD sono visualizzati nella scheda Attività + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Mostra un blocco note accanto alle miniature dei file, dove è possibile mantenere le note tra le sessioni di FreeCAD - + Show tips Mostra suggerimenti - + + General + Generale + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Ambiente a cui passare a dopo il caricamento di un file dalla pagina Inizio, utilizzato solo se Inizio (Start) è l'ambiente di avvio + + + + The size of file thumbnail icons in recent files and examples sections + La dimensione delle icone delle miniature dei file nei file recenti e nelle sezioni di esempi + + + Displays help tips in the Start workbench Documents tab Visualizza suggerimenti nell'ambiente di lavoro Start, scheda Documenti - - Show scrollbars - Mostra barre di scorrimento + + File thumbnail size + Dimensione miniatura file - + + Show file thumbnails + Mostra miniature file + + + Fonts and colors Font e colori - - Use FreeCAD style sheet - Usa il foglio di stile di FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Se questa opzione è selezionata e un foglio di stile è specificato nelle preferenze generali, verrà usato e sovrascriverà i colori sottostanti - - - - Background color - Colore dello sfondo - - - - The background color behind the panels - Il colore di sfondo dietro i pannelli - - - - Background color down gradient - Colore di sfondo a gradiente verso il basso - - - - The down gradient for the background color (currently unsupported) - La sfumatura verso il basso del colore di sfondo (attualmente non supportato) - - - - Background image - Immagine di sfondo - - - - An optional image to display as background - Un'immagine facoltativa da visualizzare come sfondo - - - - Background text color - Colore di sfondo del testo - - - - The color of the version text - Il colore del testo della versione - - - - Page background color - Colore di sfondo della pagina - - - + The background of the main start page area Lo sfondo dell'area principale della pagina iniziale - - Page text color - Colore del testo della pagina + + Background color + Colore dello sfondo - - The color of the text on the main pages - Il colore del testo nelle pagine principali - - - - Box background color - Colore di sfondo dei riquadri - - - - The background color of the boxes inside the pages - Il colore di sfondo dei riquadri all'interno delle pagine - - - - Link color - Colore del link - - - - The color of the links - Il colore dei link - - - - Font family - Tipo di carattere - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - La famiglia di caratteri da utilizzare nella pagina iniziale. Può essere un nome di carattere o una serie separata da virgole di caratteri di ripiego - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - La dimensione del carattere di base da utilizzare per tutti i testi della pagina iniziale - - - - px - px - - - - Open links - Apri il link - - - + in FreeCAD in FreeCAD - + In external browser Nel browser esterno - - Use gradient for New File icon - Usa il gradiente per l'icona Nuovo file + + Background color down gradient + Colore di sfondo a gradiente verso il basso - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Se selezionato, l'icona 'Nuovo File' mostra un'icona a gradiente invece dell'icona normale + + The color of the version text + Il colore del testo della versione - + + Link color + Colore del link + + + + An optional image to display as background + Un'immagine facoltativa da visualizzare come sfondo + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Se questa opzione è selezionata e un foglio di stile è specificato nelle preferenze generali, verrà usato e sovrascriverà i colori sottostanti + + + + Page background color + Colore di sfondo della pagina + + + + The color of the text on the main pages + Il colore del testo nelle pagine principali + + + + Background image + Immagine di sfondo + + + + Page text color + Colore del testo della pagina + + + + The color of the links + Il colore dei link + + + + The background color of the boxes inside the pages + Il colore di sfondo dei riquadri all'interno delle pagine + + + + Box background color + Colore di sfondo dei riquadri + + + + The background color behind the panels + Il colore di sfondo dietro i pannelli + + + + The down gradient for the background color (currently unsupported) + La sfumatura verso il basso del colore di sfondo (attualmente non supportato) + + + + Open links + Apri il link + + + + Background text color + Colore di sfondo del testo + + + + Use FreeCAD style sheet + Usa il foglio di stile di FreeCAD + + + + Font family + Tipo di carattere + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + La famiglia di caratteri da utilizzare nella pagina iniziale. Può essere un nome di carattere o una serie separata da virgole di caratteri di ripiego + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + La dimensione del carattere di base da utilizzare per tutti i testi della pagina iniziale + + + + + px + px + + + Options Opzioni - - Switch workbench after loading - Cambia ambiente di lavoro dopo il caricamento - - - - Choose which workbench to switch to after the program launches - Scegli a quale ambiente di lavoro passare dopo il lancio del programma - - - - Close start page after loading - Chiudi la pagina iniziale dopo il caricamento - - - + If checked, will automatically close the Start page when FreeCAD launches Se selezionato, chiuderà automaticamente la pagina Start all'avvio di FreeCAD - + + Switch workbench after loading + Cambia ambiente di lavoro dopo il caricamento + + + + Close start page after loading + Chiudi la pagina iniziale dopo il caricamento + + + Close and switch on opening file Chiudi e passa al file in apertura - + If application is started by opening a file, apply the two settings above Se FreeCAD viene avviato aprendo un file, applica le due impostazioni sopra - Workbench + DlgStartPreferencesAdvanced - - - Start page - Pagina iniziale - - - - StartPage - - - Start - Inizio + + Advanced + Avanzato - - Documents - Documenti + + Custom HTML Template + Modello HTML personalizzato - - Help - Aiuto + + An optional HTML template that will be used instead of the default start page. + Un modello HTML opzionale da utilizzare al posto della pagina iniziale predefinita. - - Activity - Attività + + Custom CSS + CSS personalizzato - - Recent files - Recent files - - - - Tip - Suggerimento - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Regolare il numero di file recenti da mostrare qui nel menu Modifica-> Preferenze-> Generale-> Dimensione della lista dei file recenti - - - - Examples - Esempi - - - - General documentation - Documentazione generale - - - - User hub - Hub utente - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Questa sezione contiene la documentazione utile per gli utenti di FreeCAD in generale: un elenco di tutti gli ambienti di lavoro, istruzioni dettagliate su come installare e utilizzare l'applicazione FreeCAD, esercitazioni e tutto il necessario per iniziare. - - - - Power users hub - Hub degli utenti esperti - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Questa sezione raccoglie la documentazione per gli utenti avanzati e per le persone interessate alla stesura di script Python. Si trovano anche un repository di macro, le istruzioni su come installarle e usarle, e ulteriori informazioni sulla personalizzazione di FreeCAD per le proprie esigenze specifiche. - - - - Developers hub - Hub degli sviluppatori - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Questa sezione contiene materiale per gli sviluppatori: come compilare FreeCAD autonomamente, come è strutturato il codice sorgente di FreeCAD e come spostarsi all'interno di esso, e come sviluppare nuovi workbench o incorporare FreeCAD nella propria applicazione. - - - - Manual - Manuale - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Il manuale di FreeCAD è un altro modo più lineare per presentare le informazioni contenute in questo wiki. È fatto per essere letto come un libro e introduce gradualmente a molte altre pagine degli hub di cui sopra. Sono anche disponibili le <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versioni e-book</a>. - - - - Workbenches documentation - Documentazione degli ambienti di lavoro - - - - These are the help pages of all the workbenches currently installed on this computer. - Queste sono le pagine di aiuto di tutti gli ambienti di lavoro attualmente installati nel computer. - - - - Getting help from the community - Ottenere aiuto dalla comunità - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - Il <a href="http://forum.freecad.org">forum di FreeCAD</a> è un ottimo posto per ottenere aiuto dagli altri utenti di FreeCAD e dagli sviluppatori. Il forum è suddiviso in sezioni per i diversi tipi di problemi e temi di discussione. In caso di dubbio, postare nella sezione più generale <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Se è la prima volta che state postando sul forum, assicuratevi di <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264"> leggere le linee guida</a> prima di postare! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD mantiene anche un <a href="https://www.freecad.org/tracker">bug tracker</a> pubblico dove chiunque può inviare bug e proporre nuove funzionalità. Per evitare di causare lavoro extra e avere le migliori possibilità di vedere il vostro bug risolto, assicuratevi di leggere la <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> Guida alla presentazione dei bug</a> prima di postare. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Di seguito sono elencate le ultime modifiche aggiunte al <a href="http://github.com/FreeCAD/FreeCAD/">codice sorgente di FreeCAD</a>. Questi cambiamenti potrebbero non essere ancora presenti nella versione di FreeCAD attualmente in esecuzione. Se si desidera ottenere una versione di sviluppo controllare le <a href="https://www.freecad.org/wiki/Downloads">opzioni disponibili</a>. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Gli ultimi post sul forum <a href="https://forum.freecad.org">FreeCAD</a>: - - - - Available addons - Addons disponibili - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Sotto è riportato un elenco dei workbench addizionali disponibili che possono essere aggiunti all'installazione di FreeCAD. Scorrere l'elenco e installarli dal menu Strumenti -> Addon manager. Per saperne di più su ognuno di essi fare clic sui link sottostanti. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Se non è incluso nella versione di FreeCAD, installare il pacchetto di documentazione di FreeCAD per ottenere la documentazione degli hub, gli aiuti degli ambienti e la documentazione dei singoli comandi senza una connessione Internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Impossibile recuperare le informazioni da GitHub. <a href="EnableDownload.py">Autorizzare l'accesso di FreeCAD a internet</a> e ricaricare la pagina iniziale. - - - - Recent commits - Ultimi commit - - - - See all commits on github - Vedere tutti i commit su github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - È possibile configurare una cartella personalizzata da visualizzare qui nel menu Modifica-> Preferenze-> Start-> Mostra la cartella aggiuntiva - - - - version - versione - - - - build - compilazione - - - - Create new... - Crea nuovo... - - - - Unknown - Sconosciuto - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Per aprire uno qualsiasi dei link sopra nel browser del desktop, fare clic con il tasto destro del mouse -> Apri nel browser esterno - - - - Creation date - Data di creazione - - - - Last modification - Ultima modifica - - - - Notes - Note - - - - Open start page preferences - Apri le preferenze della pagina iniziale + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Qui puoi incollare il tuo CSS personalizzato e la pagina iniziale la applicherà per te. Per saperne di più su come è possibile disegnare la pagina iniziale, dai un'occhiata alle fonti HTML e CSS:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github. om/FreeCAD/FreeCAD/blob/master/src/Mod/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Inizio diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts index aaa61bdeb6..6f40af861c 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ja.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + 開始 + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + ドキュメント + + + + Help + ヘルプ + + + + Activity + アクティビティ + + + + Blog + ブログ + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + 最近使用したファイル + + + + Tip + ヒント + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + メニューの「編集→設定→標準→最近使用したファイル一覧のサイズ」でここに表示される最近使用したファイルの数を調整できます。 + + + + Examples + サンプル + + + + General documentation + 一般ドキュメント + + + + User hub + ユーザーハブ + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + このセクションには一般的な FreeCAD ユーザーにとって役に立つドキュメントがあります。全てのワークベンチのリスト、FreeCAD アプリケーションのインストールと使い方の詳しいやり方、チュートリアルなど始めるのに必要な全てがあります。 + + + + Power users hub + パワーユーザーハブ + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + このセクションには上級者ユーザーや Python スクリプトを書くことに興味がある人たちのためのドキュメントが集められています。またマクロのレポジトリーやそれらをどのようにインストールし使うかについてのやり方、そして必要に合わせた FreeCAD のカスタマイズについての詳しい情報もあります。 + + + + Developers hub + 開発者ハブ + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + このセクションには開発者のための情報があります。自分で FreeCAD をコンパイルする方法、FreeCAD のソースコードがどのように構成されていてそれをどのように読み進めるのか、また新しいワークベンチの開発方法や自分のアプリケーションに FreeCAD を埋め込む方法についてなどがあります。 + + + + Manual + マニュアル + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD マニュアルはこのウィキの情報をもっと直線的に見るもう1つの方法です。本のように読めるよう作られていて、上記のハブのたくさんのページを少しずつ読んでいくことができるでしょう。<a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">電子書籍バージョン</a>も利用可能です。 + + + + Workbenches documentation + ワークベンチのドキュメント + + + + These are the help pages of all the workbenches currently installed on this computer. + このコンピューターに現在インストールされている全てのワークベンチのヘルプページがあります。 + + + + Getting help from the community + コミュニティから助けを得る + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">FreeCAD フォーラム</a> は他の FreeCAD ユーザーや開発者から手助けを得られるすばらしい場所です。フォーラムはさまざまな種類の問題や議題を扱うたくさんのセクションがあります。もしどこに投稿すればいいかわからなければ一般的な話題を扱う <a href="https://forum.freecad.org/viewforum.php?f=3">FreeCAD 使用時のヘルプ</a> に投稿してください。 + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + 初めてフォーラムに投稿する場合は最初に<a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">ガイドラインを読んで</a>確認してください! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD には公開<a href="https://www.freecad.org/tracker">バグトラッカー</a>も用意されていて、誰でもバグや新しい機能の提案を投稿することができます。余分な作業を発生させず、見つけたバグを解決できる可能性を上げるために、投稿する前には必ず<a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">バグ報告ガイドライン</a>を読んでください。 + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + 以下は最新の変更が加えられた<a href="http://github.com/FreeCAD/FreeCAD/">FreeCADのソースコード</a>です。これらの変更は、あなたが現在実行しているバージョンのFreeCADにはまだ反映されていない可能性があります。 開発版を手に入れたい場合は <a href="https://www.freecad.org/wiki/Downloads">利用可能なオプション</a>を確認して下さい。 + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + <a href="https://forum.freecad.org">FreeCAD フォーラム</a>の最新の投稿: + + + + Available addons + 利用可能なアドオン + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + 以下はインストールしたFreeCADに追加して利用できる追加ワークベンチのリストです。メニューの [ツール] - [Addon manager] で表示とインストールを行なってください。以下のリンクをクリックするとそれぞれのワークベンチについてさらに詳しく知ることができます。 + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + もしドキュメントのバンドルされていないFreeCADバージョンであるならば、FreeCADドキュメントパッケージをドキュメンテーション・ハブよりインストールすることで、ワークベンチのヘルプや各コマンドのドキュメントをインターネット接続なしでも利用できます。 + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + GitHubから情報をフェッチできませんでした。 <a href="EnableDownload.py">FreeCADに、インターネットへアクセスできる権限を与える</a> そして開始ページを再読み込みをして下さい。 + + + + Recent commits + 最近のコミット + + + + See all commits on github + GitHubのコメントを全て参照 + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + メニューの「編集→設定→Start→追加フォルダを表示」でここに表示するカスタムフォルダを設定できます。 + + + + version + バージョン + + + + build + ビルド + + + + Create new... + 新規作成... + + + + Unknown + 不明 + + + + Forum + フォーラム + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + 上記のリンクをデスクトップのブラウザーで開きたい場合は、「右クリック->外部ブラウザーで開く」の手順で開けます + + + + Creation date + 作成日時 + + + + Last modification + 最終変更 + + + + Notes + ノート + + + + Open start page preferences + スタートページの設定を開く + + + + Workbench + + + + Start page + スタートページ + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - スタートページのオプション - - - - Start page template - スタートページのテンプレート - - - - An optional HTML template that will be used instead of the default start page. - オプションのHTMLテンプレートを、既定の開始ページの代替えとして用います。 - - - + Contents コンテンツ - - Show notepad - メモ帳を表示 + + Show forum + フォーラムを表示 - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - ファイルのサムネイルの隣にメモ帳を表示させて、セッション中にメモを保存できるようにします。 - - - + Show examples folder contents サンプルフォルダの内容を表示 - - If you want the examples to show on the first page - 最初のページにて、作例を表示させたい - - - + Show additional folder 追加フォルダを表示 - + + If you want the examples to show on the first page + 最初のページにて、作例を表示させたい + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + ここにチェックを入れると、FreeCADフォーラムからの最新の投稿が現在のタブに表示されます + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here 最初のページの下部に表示される追加のカスタムフォルダ。 ";;"を使用してパスを別々にすると複数のフォルダを追加できます。 - - Show forum - フォーラムを表示 + + Show notepad + メモ帳を表示 - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - ここにチェックを入れると、FreeCADフォーラムからの最新の投稿が現在のタブに表示されます + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + ファイルのサムネイルの隣にメモ帳を表示させて、セッション中にメモを保存できるようにします。 - + Show tips ヒントを表示 - + + General + 標準 + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Start ワークベンチのドキュメントタブにヘルプのヒントを表示 - - Show scrollbars - スクロールバーを表示 + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors フォント及び色 - - Use FreeCAD style sheet - FreeCAD スタイルシートを使用 - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - チェックして一般ユーザー設定でスタイルシートを指定している場合、それを使用して以下の色を上書き - - - - Background color - 背景色 - - - - The background color behind the panels - パネルの背景色 - - - - Background color down gradient - グラデーション背景色 - - - - The down gradient for the background color (currently unsupported) - 背景色用の下向きグラデーション (現在はサポートされていません) - - - - Background image - 背景画像 - - - - An optional image to display as background - 背景として表示するオプション画像 - - - - Background text color - テキスト背景色 - - - - The color of the version text - バージョンの文字色 - - - - Page background color - ページ背景色 - - - + The background of the main start page area メインスタートページ領域の背景 - - Page text color - ページ文字色 + + Background color + 背景色 - - The color of the text on the main pages - メインページの文字色 - - - - Box background color - ボックスの背景色 - - - - The background color of the boxes inside the pages - ページ内におけるボックスの背景色 - - - - Link color - リンクの色 - - - - The color of the links - リンクの色 - - - - Font family - フォントの種類 - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - スタートページに用いるフォントファミリー。フォント名またはコンマで区切られた一連の代替えフォントにします - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - 開始ページのテキスト全てに使用する基本フォントサイズ - - - - px - px - - - - Open links - リンクを開く - - - + in FreeCAD FreeCAD - + In external browser 外部ブラウザー - - Use gradient for New File icon - 新規フォイルのアイコンにグラデーションを用いる + + Background color down gradient + グラデーション背景色 - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - 選択されている場合、「新規ファイル」アイコンに通常のアイコンの代わりにグラデーションアイコンを表示 + + The color of the version text + バージョンの文字色 - + + Link color + リンクの色 + + + + An optional image to display as background + 背景として表示するオプション画像 + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + チェックして一般ユーザー設定でスタイルシートを指定している場合、それを使用して以下の色を上書き + + + + Page background color + ページ背景色 + + + + The color of the text on the main pages + メインページの文字色 + + + + Background image + 背景画像 + + + + Page text color + ページ文字色 + + + + The color of the links + リンクの色 + + + + The background color of the boxes inside the pages + ページ内におけるボックスの背景色 + + + + Box background color + ボックスの背景色 + + + + The background color behind the panels + パネルの背景色 + + + + The down gradient for the background color (currently unsupported) + 背景色用の下向きグラデーション (現在はサポートされていません) + + + + Open links + リンクを開く + + + + Background text color + テキスト背景色 + + + + Use FreeCAD style sheet + FreeCAD スタイルシートを使用 + + + + Font family + フォントの種類 + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + スタートページに用いるフォントファミリー。フォント名またはコンマで区切られた一連の代替えフォントにします + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + 開始ページのテキスト全てに使用する基本フォントサイズ + + + + + px + px + + + Options オプション - - Switch workbench after loading - 読み込みの後でワークベンチを切り替え - - - - Choose which workbench to switch to after the program launches - プログラム起動後に切り替えるワークベンチを選択 - - - - Close start page after loading - 読み込みの後でスタートページを閉じる - - - + If checked, will automatically close the Start page when FreeCAD launches チェックされている場合、FreeCAD起動時に自動的にスタートページを閉じます - + + Switch workbench after loading + 読み込みの後でワークベンチを切り替え + + + + Close start page after loading + 読み込みの後でスタートページを閉じる + + + Close and switch on opening file 閉じてファイルを開く - + If application is started by opening a file, apply the two settings above ファイルオープンでアプリケーションを開始する場合、上の2つの設定を適用 - Workbench + DlgStartPreferencesAdvanced - - - Start page - スタートページ - - - - StartPage - - - Start - 開始 + + Advanced + 高度な設定 - - Documents - ドキュメント + + Custom HTML Template + Custom HTML Template - - Help - ヘルプ + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - アクティビティ + + Custom CSS + Custom CSS - - Recent files - 最近使用したファイル - - - - Tip - ヒント - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - メニューの「編集→設定→標準→最近使用したファイル一覧のサイズ」でここに表示される最近使用したファイルの数を調整できます。 - - - - Examples - サンプル - - - - General documentation - 一般ドキュメント - - - - User hub - ユーザーハブ - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - このセクションには一般的な FreeCAD ユーザーにとって役に立つドキュメントがあります。全てのワークベンチのリスト、FreeCAD アプリケーションのインストールと使い方の詳しいやり方、チュートリアルなど始めるのに必要な全てがあります。 - - - - Power users hub - パワーユーザーハブ - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - このセクションには上級者ユーザーや Python スクリプトを書くことに興味がある人たちのためのドキュメントが集められています。またマクロのレポジトリーやそれらをどのようにインストールし使うかについてのやり方、そして必要に合わせた FreeCAD のカスタマイズについての詳しい情報もあります。 - - - - Developers hub - 開発者ハブ - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - このセクションには開発者のための情報があります。自分で FreeCAD をコンパイルする方法、FreeCAD のソースコードがどのように構成されていてそれをどのように読み進めるのか、また新しいワークベンチの開発方法や自分のアプリケーションに FreeCAD を埋め込む方法についてなどがあります。 - - - - Manual - マニュアル - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD マニュアルはこのウィキの情報をもっと直線的に見るもう1つの方法です。本のように読めるよう作られていて、上記のハブのたくさんのページを少しずつ読んでいくことができるでしょう。<a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">電子書籍バージョン</a>も利用可能です。 - - - - Workbenches documentation - ワークベンチのドキュメント - - - - These are the help pages of all the workbenches currently installed on this computer. - このコンピューターに現在インストールされている全てのワークベンチのヘルプページがあります。 - - - - Getting help from the community - コミュニティから助けを得る - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">FreeCAD フォーラム</a> は他の FreeCAD ユーザーや開発者から手助けを得られるすばらしい場所です。フォーラムはさまざまな種類の問題や議題を扱うたくさんのセクションがあります。もしどこに投稿すればいいかわからなければ一般的な話題を扱う <a href="https://forum.freecad.org/viewforum.php?f=3">FreeCAD 使用時のヘルプ</a> に投稿してください。 - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - 初めてフォーラムに投稿する場合は最初に<a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">ガイドラインを読んで</a>確認してください! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD には公開<a href="https://www.freecad.org/tracker">バグトラッカー</a>も用意されていて、誰でもバグや新しい機能の提案を投稿することができます。余分な作業を発生させず、見つけたバグを解決できる可能性を上げるために、投稿する前には必ず<a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">バグ報告ガイドライン</a>を読んでください。 - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - 以下は最新の変更が加えられた<a href="http://github.com/FreeCAD/FreeCAD/">FreeCADのソースコード</a>です。これらの変更は、あなたが現在実行しているバージョンのFreeCADにはまだ反映されていない可能性があります。 開発版を手に入れたい場合は <a href="https://www.freecad.org/wiki/Downloads">利用可能なオプション</a>を確認して下さい。 - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - <a href="https://forum.freecad.org">FreeCAD フォーラム</a>の最新の投稿: - - - - Available addons - 利用可能なアドオン - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - 以下はインストールしたFreeCADに追加して利用できる追加ワークベンチのリストです。メニューの [ツール] - [Addon manager] で表示とインストールを行なってください。以下のリンクをクリックするとそれぞれのワークベンチについてさらに詳しく知ることができます。 - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - もしドキュメントのバンドルされていないFreeCADバージョンであるならば、FreeCADドキュメントパッケージをドキュメンテーション・ハブよりインストールすることで、ワークベンチのヘルプや各コマンドのドキュメントをインターネット接続なしでも利用できます。 - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - GitHubから情報をフェッチできませんでした。 <a href="EnableDownload.py">FreeCADに、インターネットへアクセスできる権限を与える</a> そして開始ページを再読み込みをして下さい。 - - - - Recent commits - 最近のコミット - - - - See all commits on github - GitHubのコメントを全て参照 - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - メニューの「編集→設定→Start→追加フォルダを表示」でここに表示するカスタムフォルダを設定できます。 - - - - version - バージョン - - - - build - ビルド - - - - Create new... - 新規作成... - - - - Unknown - 不明 - - - - Forum - フォーラム - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - 上記のリンクをデスクトップのブラウザーで開きたい場合は、「右クリック->外部ブラウザーで開く」の手順で開けます - - - - Creation date - 作成日時 - - - - Last modification - 最終変更 - - - - Notes - ノート - - - - Open start page preferences - スタートページの設定を開く + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start 開始 diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ka.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ka.ts index e17ed0fef1..42f79fd393 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ka.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ka.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + დაწყება + + + + Welcome to FreeCAD + მოგესალმებათ FreeCAD + + + + Documents + დოკუმენტები + + + + Help + დახმარება + + + + Activity + აქტივობა + + + + Blog + ბლოგი + + + + Link to the FreeCAD blog + FreeCAD-ის ბლოგის ბმული + + + + New file + ახალი ფაილი + + + + Empty File + ცარიელი ფაილი + + + + Create an empty FreeCAD file + ცარიელი FreeCAD-ის ფაილის შექმნა + + + + Open File + ფაილის გახსნა + + + + Open an existing CAD file or 3D model + არსებული CAD ფაილის ან 3D მოდელის გახსნა + + + + Standard Part + სტანდარტული პორტი + + + + Create a part with the Part Design workbench + ნაწილის შექმნა ნაწილის დიზაინის სამუშაო მაგიდით + + + + 2D Draft + 2D ნახაზი + + + + Create a 2D draft with the Draft workbench + 2D ნახაზის შექმნა Draft სამუშაო მაგიდით + + + + BIM/Architecture + BIM/არქიტექტურა + + + + Create an architecture project + არქიტექტურული პროექტის შექმნა + + + + Recent files + უკანასკნელი ფაილები + + + + Tip + მინიშნება + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + დაარეგულირეთ ბოლო ფაილების რაოდენობა, რომლებიც აქ გამოჩნდება. მენიუ ჩასწორება -> მორგება -> ზოგადი -> ბოლო ფაილების სიის ზომა + + + + Examples + მაგალითები + + + + General documentation + მომხმარებლის დოკუმენტაცია + + + + User hub + მომხმარებლების ცენტრალური ქსელი + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + ეს განყოფილება შეიცავს ზოგადად FreeCAD-ის მომხმარებლებისთვის სასარგებლო დოკუმენტაციას: ყველა სამუშაო მაგიდის სიას, დეტალურ ინსტრუქციებს FreeCAD აპლიკაციის დაყენებისა და გამოყენების შესახებ, გაკვეთილებს და ყველაფერს, რაც გჭირდებათ დასაწყებად. + + + + Power users hub + გამოცდილი მომხმარებლების საერთო ქსელი + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + ეს განყოფილება აგროვებს დოკუმენტაციას მოწინავე მომხმარებლებისთვის და პითონის სკრიპტების დაწერით დაინტერესებული პირებისთვის. თქვენ ასევე ნახავთ მაკროების საცავს, ინსტრუქციებს მათი დაყენებისა და გამოყენების შესახებ და მეტი ინფორმაცია FreeCAD-ის თქვენს კონკრეტულ საჭიროებებზე მორგების შესახებ. + + + + Developers hub + დეველოპერების საერთო ქსელი + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + ეს განყოფილება შეიცავს მასალას დეველოპერებისთვის: როგორ დააკომპილიროთ FreeCAD თავად, როგორ არის სტრუქტურირებული FreeCAD-ის კოდი + როგორ იქონიოთ ნავიგაცია, როგორ შექმნათ ახალი სამუშაო მაგიდა და/ან ჩააშენოთ FreeCAD თქვენს აპლიკაციაში. + + + + Manual + სახელმძღვანელო + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD სახელმძღვანელო არის კიდევ ერთი, უფრო წრფივი გზა ამ ვიკიში მოცემული ინფორმაციის წარმოსაჩენად. ის შექმნილია წიგნის წასაკითხად და ნაზად გაგაცნობთ ბევრ სხვა გვერდს ზემოთ მოყვანილი ჰაბებიდან. ასევე ხელმისაწვდომია <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">ელექტრონული წიგნების ვერსიები</a>. + + + + Workbenches documentation + სამუშაო მაგიდების დოკუმენტაცია + + + + These are the help pages of all the workbenches currently installed on this computer. + ამ კომპიუტერში დაყენებულია ყველა სამუშაო მაგიდის დახმარების გვერდები. + + + + Getting help from the community + დახმარების საზოგადოებისგან მიღება + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + FreeCAD-ის<a href="http://forum.freecad.org"> ფორუმი</a> შესანიშნავი ადგილია FreeCAD-ის სხვა მომხმარებლებისა და დეველოპერებისგან დახმარების მისაღებად. ფორუმს აქვს მრავალი სექცია სხვადასხვა ტიპის საკითხებისა და სადისკუსიო თემებისთვის. თუ ეჭვი გეპარებათ, გამოაქვეყნეთ უფრო ზოგადი<a href="https://forum.freecad.org/viewforum.php?f=3"> დახმარება FreeCAD</a> განყოფილების გამოყენების შესახებ. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + თუ ფორუმზე პოსტ სპირველად აქვეყნებთ, აუცილებლად <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">წაიკითხეთ სახელმძღვანელო </a>მითითებები! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD ასევე ინახავს შეცდომების საჯარო<a href="https://www.freecad.org/tracker"> ტრეკერს</a>, სადაც ნებისმიერს შეუძლია წარადგინოს შეცდომები და შესთავაზოს ახალი ფუნქციები. იმისათვის, რომ თავიდან აიცილოთ ზედმეტი სამუშაოს გამოწვევა და საუკეთესო შანსები მისცეთ, რომ ნახოთ თქვენი ხარვეზი მოგვარებული, დარწმუნდით, რომ წაიკითხეთ<a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> შეცდომების წარდგენის სახელმძღვანელო</a> გამოქვეყნებამდე. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + ქვემოთ მოცემულია უახლესი ცვლილებები, რომლებიც დამატებულია <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD-ის კოდში</a>. ეს ცვლილებები შესაძლოა ჯერ არ აისახოს FreeCAD-ის ვერსიაში, რომელსაც ამჟამად გაქვთ გაშვებული. შეამოწმეთ <a href="https://www.freecad.org/wiki/Downloads">ხელმისაწვდომი ვარიანტები</a> თუ გსურთ მიიღოთ უახლესი ბეტა ვერსია. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + ბოლო პოსტები <a href="https://forum.freecad.org">FreeCAD-ის ფორუმზე</a>: + + + + Available addons + ხელმისაწვდომი დამატებები + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + ქვემოთ მოცემულია ხელმისაწვდომი დამატებითი სამუშაო მაგიდების სია, რომლებიც შეიძლება დაემატოს თქვენს FreeCAD-ს. დაათვალიერეთ და დააყენეთ ისინი მენიუდან ხელსაწყო -> დამატებების მმართველი. თქვენ შეგიძლიათ გაიგოთ მეტი რომელიმე მათგანის შესახებ ქვემოთ მოცემულ ბმულებზე დაწკაპუნებით. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + თუ არ მიიღეთ თქვენს FreeCAD ვერსიასთან ერთად, დააინსტალირეთ FreeCAD დოკუმენტაციის პაკეტი, რათა მიიღოთ დოკუმენტაციის ჰაბები, სამუშაო მაგიდაზე დახმარება და ინდივიდუალური ბრძანების დოკუმენტაცია ინტერნეტის გარეშე. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + GitHub-იდან ინფორმაციის გამოთხოვნის შეცდომა.<a href="EnableDownload.py">მიეცით FreeCAD-ს ინტერნეტთან წვდომა</a> და თავიდან ჩატვირთეთ საწყისი გვერდი. + + + + Recent commits + ბოლოდროინდელი კომიტები + + + + See all commits on github + ყველა კომიტის GitHub-ზე ნახვა + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + აქ საჩვენებლად საქაღალდე შეგიძლიათ ხელით მიუთითოთ. ამისათვის გადადით ჩასწორება ->მორგება -> საწყისი -> დამატებითი საქაღალდის ჩვენება + + + + version + ვერსია + + + + build + build + + + + Create new... + ახლის შექმნა... + + + + Unknown + უცნობი + + + + Forum + ფორუმი + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + ზემოთ მოცემული რომელიმე ბმულის თქვენი დესკტოპის ბრაუზერში გასახსნელად დააწკაპუნეთ მაუსის მარჯვენა ღილაკით -> გახსენით გარე ბრაუზერში + + + + Creation date + შექმნის თარიღი + + + + Last modification + ბოლო ცვლილების თარიღი + + + + Notes + შენიშვნები + + + + Open start page preferences + საწყისი გვერდის მორგება + + + + Workbench + + + + Start page + საწყისი გვერდი + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - საწყისი გვერდის ჩასწორება - - - - Start page template - საწყისი გვერდის ნიმუში - - - - An optional HTML template that will be used instead of the default start page. - არასავალდებულო HTML შაბლონი, რომელიც გაშვების ნაგულისხმევი გვერდის მაგიერ იქნება ნაჩვენები. - - - + Contents შემცველობა - - Show notepad - ბლოკნოტის ჩვენება + + Show forum + ფორუმის ჩვენება - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - ფაილის მინიატურების გასწვრივ წიგნაკის, სადაც თქვენი შენიშვნების შენახვა შეგიძლიათ სესიებს შუა, ჩვენება - - - + Show examples folder contents მაგალითების საქაღალდის შემცველობის ჩვენება - - If you want the examples to show on the first page - გნებავთ პირველ გვერდზე მაგალითების ჩვენება - - - + Show additional folder დამატებითი საქაღალდის ჩვენება - + + If you want the examples to show on the first page + გნებავთ პირველ გვერდზე მაგალითების ჩვენება + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + თუ ჩართლია, აქტივობის ჩანართზე FreeCAD-ის ფორუმიდან უახლესი პოსტები გამოჩნდება + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here არასავალდებულო ხელით მითითებული საქაღალდე პირველი გვერდის ქვედა ნაწილში საჩვენებლად. ბილიკების ";;"-ით დაყოფით შეგიძლიათ რამდენიმე საქაღალდე მიუთითოთ - - Show forum - ფორუმის ჩვენება + + Show notepad + ბლოკნოტის ჩვენება - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - თუ ჩართლია, აქტივობის ჩანართზე FreeCAD-ის ფორუმიდან უახლესი პოსტები გამოჩნდება + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + ფაილის მინიატურების გასწვრივ წიგნაკის, სადაც თქვენი შენიშვნების შენახვა შეგიძლიათ სესიებს შუა, ჩვენება - + Show tips მინიშნებების ჩვენება - + + General + ზოგადი + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + სამუშაო მაგიდა, რომელზეც მოხდება გადართვა საწყისი გვერდიდან ფაილის ჩატვირთვის შემდეგ. გამოიყენება მხოლოდ მაშინ, თუ გაშვებისას სამუშაო მაგიდად 'გაშვებაა' დაყენებული + + + + The size of file thumbnail icons in recent files and examples sections + ბოლო ფაილებში და მაგალითის სექციებში ფაილის მინიატურის ხატულების ზომა + + + Displays help tips in the Start workbench Documents tab "Start" სამუშაო მაგიდის დოკუმენტების ჩანართში დახმარების ჩვენება - - Show scrollbars - ჩოჩიის პანელის ჩვენება + + File thumbnail size + ფაილის მინიატურის ზომა - + + Show file thumbnails + ფაილის მინიატურების ჩვენება + + + Fonts and colors ფონტები და ფერები - - Use FreeCAD style sheet - FreeCAD-ის სტილების გამოყენება - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - თუ ეს ჩართულია და საერთო მორგების ფანჯარაში მითითებულია გვერდის სტილი, ის გამოყენებული იქნება ქვემო ფერების გადასაღებად - - - - Background color - ფონის ფერი - - - - The background color behind the panels - პანელების მიღმა ფერი - - - - Background color down gradient - ფონის ფენის გრადიენტი ქვემოთ - - - - The down gradient for the background color (currently unsupported) - ქვედა გრადიენტი ფონის ფერისთვის (ჯერ მხარდაუჭერელია) - - - - Background image - ფონის გამოსახულება - - - - An optional image to display as background - არასავალდებულო სურათი ფონზე საჩვენებლად - - - - Background text color - ფონის ტექსტის ფერი - - - - The color of the version text - ვერსიის ტექსტის ფერი - - - - Page background color - გვერდის ფონის ფერი - - - + The background of the main start page area მთავარი საწყისი გვერდის ფონი - - Page text color - გვერდის ტექსტის ფერი + + Background color + ფონის ფერი - - The color of the text on the main pages - მთავარი გვერდების ტექსტის ფერი - - - - Box background color - ველის ფონის ფერი - - - - The background color of the boxes inside the pages - გვერდების შიგნით ყუთების ფონის ფერი - - - - Link color - ბმულების ფერი - - - - The color of the links - ბმულების ფერი - - - - Font family - ფონტის ოჯახი - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - საწყის გვერდზე გამოსაყენებელი ფონტის ოჯახი. შეიძლება იყოს ფონტის სახელი ან მძიმით გამოყოფილი სარეზერვო ფონტის სია - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - საწყის გვერდის ყველა ტექსტის ბაზისური ფონტის ზომა - - - - px - პქს - - - - Open links - ბმულების გახსნა - - - + in FreeCAD freeCAD-ში - + In external browser გარე ბრაუზერში - - Use gradient for New File icon - ახალი ხატულის ფაილისთვის გრადიენტის გამოყენება + + Background color down gradient + ფონის ფენის გრადიენტი ქვემოთ - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - თუ ჩართულია, 'ახალი ფაილი'-ის ხატულა ნორმალურის მაგიერ გრადიენტულ ხატულის ჩვენება + + The color of the version text + ვერსიის ტექსტის ფერი - + + Link color + ბმულების ფერი + + + + An optional image to display as background + არასავალდებულო სურათი ფონზე საჩვენებლად + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + თუ ეს ჩართულია და საერთო მორგების ფანჯარაში მითითებულია გვერდის სტილი, ის გამოყენებული იქნება ქვემო ფერების გადასაღებად + + + + Page background color + გვერდის ფონის ფერი + + + + The color of the text on the main pages + მთავარი გვერდების ტექსტის ფერი + + + + Background image + ფონის გამოსახულება + + + + Page text color + გვერდის ტექსტის ფერი + + + + The color of the links + ბმულების ფერი + + + + The background color of the boxes inside the pages + გვერდების შიგნით ყუთების ფონის ფერი + + + + Box background color + ველის ფონის ფერი + + + + The background color behind the panels + პანელების მიღმა ფერი + + + + The down gradient for the background color (currently unsupported) + ქვედა გრადიენტი ფონის ფერისთვის (ჯერ მხარდაუჭერელია) + + + + Open links + ბმულების გახსნა + + + + Background text color + ფონის ტექსტის ფერი + + + + Use FreeCAD style sheet + FreeCAD-ის სტილების გამოყენება + + + + Font family + ფონტის ოჯახი + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + საწყის გვერდზე გამოსაყენებელი ფონტის ოჯახი. შეიძლება იყოს ფონტის სახელი ან მძიმით გამოყოფილი სარეზერვო ფონტის სია + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + საწყის გვერდის ყველა ტექსტის ბაზისური ფონტის ზომა + + + + + px + პქს + + + Options მორგება - - Switch workbench after loading - ჩატვირთვის შემდეგ სამუშაო მაგიდის გადართვა - - - - Choose which workbench to switch to after the program launches - აირჩიეთ, რომელ სამუშაო მაგიდაზე გადახვიდეთ პროგრამის გაშვების შემდეგ - - - - Close start page after loading - საწყისი გვერდის დახურვა ჩატვირთვის შემდეგ - - - + If checked, will automatically close the Start page when FreeCAD launches თუ ჩართულია, საწყისი გვერდი FreeCAD-ის გაშვებისას ავტომატურად დაიხურება - + + Switch workbench after loading + ჩატვირთვის შემდეგ სამუშაო მაგიდის გადართვა + + + + Close start page after loading + საწყისი გვერდის დახურვა ჩატვირთვის შემდეგ + + + Close and switch on opening file დახურვა და ფაილის გახსნაზე გადართვა - + If application is started by opening a file, apply the two settings above თუ აპლიკაცია გაშვებულია ფაილის გახსნით, ქვემორე ორი პარამეტრის გადატარება - Workbench + DlgStartPreferencesAdvanced - - - Start page - საწყისი გვერდი - - - - StartPage - - - Start - დაწყება + + Advanced + დამატებით - - Documents - დოკუმენტები + + Custom HTML Template + მომხმარებლის HTML შაბლონი - - Help - დახმარება + + An optional HTML template that will be used instead of the default start page. + არასავალდებულო HTML შაბლონი, რომელიც გაშვების ნაგულისხმევი გვერდის მაგიერ იქნება ნაჩვენები. - - Activity - აქტივობა + + Custom CSS + მომხმარებლის CSS - - Recent files - უკანასკნელი ფაილები - - - - Tip - მინიშნება - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - დაარეგულირეთ ბოლო ფაილების რაოდენობა, რომლებიც აქ გამოჩნდება. მენიუ ჩასწორება -> მორგება -> ზოგადი -> ბოლო ფაილების სიის ზომა - - - - Examples - მაგალითები - - - - General documentation - მომხმარებლის დოკუმენტაცია - - - - User hub - მომხმარებლების ცენტრალური ქსელი - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - ეს განყოფილება შეიცავს ზოგადად FreeCAD-ის მომხმარებლებისთვის სასარგებლო დოკუმენტაციას: ყველა სამუშაო მაგიდის სიას, დეტალურ ინსტრუქციებს FreeCAD აპლიკაციის დაყენებისა და გამოყენების შესახებ, გაკვეთილებს და ყველაფერს, რაც გჭირდებათ დასაწყებად. - - - - Power users hub - გამოცდილი მომხმარებლების საერთო ქსელი - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - ეს განყოფილება აგროვებს დოკუმენტაციას მოწინავე მომხმარებლებისთვის და პითონის სკრიპტების დაწერით დაინტერესებული პირებისთვის. თქვენ ასევე ნახავთ მაკროების საცავს, ინსტრუქციებს მათი დაყენებისა და გამოყენების შესახებ და მეტი ინფორმაცია FreeCAD-ის თქვენს კონკრეტულ საჭიროებებზე მორგების შესახებ. - - - - Developers hub - დეველოპერების საერთო ქსელი - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - ეს განყოფილება შეიცავს მასალას დეველოპერებისთვის: როგორ დააკომპილიროთ FreeCAD თავად, როგორ არის სტრუქტურირებული FreeCAD-ის კოდი + როგორ იქონიოთ ნავიგაცია, როგორ შექმნათ ახალი სამუშაო მაგიდა და/ან ჩააშენოთ FreeCAD თქვენს აპლიკაციაში. - - - - Manual - სახელმძღვანელო - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD სახელმძღვანელო არის კიდევ ერთი, უფრო წრფივი გზა ამ ვიკიში მოცემული ინფორმაციის წარმოსაჩენად. ის შექმნილია წიგნის წასაკითხად და ნაზად გაგაცნობთ ბევრ სხვა გვერდს ზემოთ მოყვანილი ჰაბებიდან. ასევე ხელმისაწვდომია <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">ელექტრონული წიგნების ვერსიები</a>. - - - - Workbenches documentation - სამუშაო მაგიდების დოკუმენტაცია - - - - These are the help pages of all the workbenches currently installed on this computer. - ამ კომპიუტერში დაყენებულია ყველა სამუშაო მაგიდის დახმარების გვერდები. - - - - Getting help from the community - დახმარების საზოგადოებისგან მიღება - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - FreeCAD-ის<a href="http://forum.freecad.org"> ფორუმი</a> შესანიშნავი ადგილია FreeCAD-ის სხვა მომხმარებლებისა და დეველოპერებისგან დახმარების მისაღებად. ფორუმს აქვს მრავალი სექცია სხვადასხვა ტიპის საკითხებისა და სადისკუსიო თემებისთვის. თუ ეჭვი გეპარებათ, გამოაქვეყნეთ უფრო ზოგადი<a href="https://forum.freecad.org/viewforum.php?f=3"> დახმარება FreeCAD</a> განყოფილების გამოყენების შესახებ. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - თუ ფორუმზე პოსტ სპირველად აქვეყნებთ, აუცილებლად <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">წაიკითხეთ სახელმძღვანელო </a>მითითებები! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD ასევე ინახავს შეცდომების საჯარო<a href="https://www.freecad.org/tracker"> ტრეკერს</a>, სადაც ნებისმიერს შეუძლია წარადგინოს შეცდომები და შესთავაზოს ახალი ფუნქციები. იმისათვის, რომ თავიდან აიცილოთ ზედმეტი სამუშაოს გამოწვევა და საუკეთესო შანსები მისცეთ, რომ ნახოთ თქვენი ხარვეზი მოგვარებული, დარწმუნდით, რომ წაიკითხეთ<a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236"> შეცდომების წარდგენის სახელმძღვანელო</a> გამოქვეყნებამდე. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - ქვემოთ მოცემულია უახლესი ცვლილებები, რომლებიც დამატებულია <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD-ის კოდში</a>. ეს ცვლილებები შესაძლოა ჯერ არ აისახოს FreeCAD-ის ვერსიაში, რომელსაც ამჟამად გაქვთ გაშვებული. შეამოწმეთ <a href="https://www.freecad.org/wiki/Downloads">ხელმისაწვდომი ვარიანტები</a> თუ გსურთ მიიღოთ უახლესი ბეტა ვერსია. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - ბოლო პოსტები <a href="https://forum.freecad.org">FreeCAD-ის ფორუმზე</a>: - - - - Available addons - ხელმისაწვდომი დამატებები - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - ქვემოთ მოცემულია ხელმისაწვდომი დამატებითი სამუშაო მაგიდების სია, რომლებიც შეიძლება დაემატოს თქვენს FreeCAD-ს. დაათვალიერეთ და დააყენეთ ისინი მენიუდან ხელსაწყო -> დამატებების მმართველი. თქვენ შეგიძლიათ გაიგოთ მეტი რომელიმე მათგანის შესახებ ქვემოთ მოცემულ ბმულებზე დაწკაპუნებით. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - თუ არ მიიღეთ თქვენს FreeCAD ვერსიასთან ერთად, დააინსტალირეთ FreeCAD დოკუმენტაციის პაკეტი, რათა მიიღოთ დოკუმენტაციის ჰაბები, სამუშაო მაგიდაზე დახმარება და ინდივიდუალური ბრძანების დოკუმენტაცია ინტერნეტის გარეშე. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - GitHub-იდან ინფორმაციის გამოთხოვნის შეცდომა.<a href="EnableDownload.py">მიეცით FreeCAD-ს ინტერნეტთან წვდომა</a> და თავიდან ჩატვირთეთ საწყისი გვერდი. - - - - Recent commits - ბოლოდროინდელი კომიტები - - - - See all commits on github - ყველა კომიტის GitHub-ზე ნახვა - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - აქ საჩვენებლად საქაღალდე შეგიძლიათ ხელით მიუთითოთ. ამისათვის გადადით ჩასწორება ->მორგება -> საწყისი -> დამატებითი საქაღალდის ჩვენება - - - - version - ვერსია - - - - build - build - - - - Create new... - ახლის შექმნა... - - - - Unknown - უცნობი - - - - Forum - ფორუმი - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - ზემოთ მოცემული რომელიმე ბმულის თქვენი დესკტოპის ბრაუზერში გასახსნელად დააწკაპუნეთ მაუსის მარჯვენა ღილაკით -> გახსენით გარე ბრაუზერში - - - - Creation date - შექმნის თარიღი - - - - Last modification - ბოლო ცვლილების თარიღი - - - - Notes - შენიშვნები - - - - Open start page preferences - საწყისი გვერდის მორგება + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>აქ შეგიძლიათ თქვენი CSS კოდი ჩასვათ და ის საწყის გვერდზე იქნება გამოყენებული. იმისთვის, რომ გაიგოთ მეტი იმის შესახებ, როგორ მოირგოთ საწყისი გვერდი, გადახედეთ HTML და CSS წყაროებს:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start დაწყება diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts index febf81245b..3cbdde5ffa 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ko.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + 시작 + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + 문서 + + + + Help + 도움말 + + + + Activity + 활동 + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + 최근 파일들 + + + + Tip + + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + 편집 -> 환경 설정 -> 일반 -> 최근 파일 목록의 크기 메뉴에서 표시 할 최근 파일 수를 조정하십시오 + + + + Examples + 예시 + + + + General documentation + 일반 문서 + + + + User hub + 사용자 허브 + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + 이 섹션에는 FreeCAD 사용자에게 유용한 문서가 포함되어 있습니다: 모든 워크 벤치 목록, FreeCAD 응용 프로그램 설치 및 사용법, 자습서 및 시작하기에 필요한 모든 지침. + + + + Power users hub + 고급 사용자 허브 + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + 이 섹션에서는 고급 사용자와 Python 스크립트 작성에 관심이 있는 사람들을 위한 문서를 수집합니다. 또한 매크로 저장소, 매크로 설치 및 사용 방법에 대한 지침, FreeCAD를 특정 요구 사항에 맞게 사용자 지정하는 방법에 대한 추가 정보를 찾을 수 있습니다. + + + + Developers hub + 개발자 허브 + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + 이 섹션에는 개발자를 위한 자료가 포함되어 있습니다: FreeCAD를 직접 컴파일하는 방법, FreeCAD 소스 코드의 구조화 방법 + 탐색 방법, 새로운 워크벤치 개발 방법 및/또는 자체 응용 프로그램에 FreeCAD를 내장하는 방법을 알아봅니다. + + + + Manual + 설명서 + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD 설명서은 이 위키에 포함된 정보를 표현하는 또 다른 방법입니다. 그것은 책처럼 읽도록 만들어졌으며 위의 센터에서 다른 많은 페이지로 부드럽게 소개 할 것입니다. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> 전자 도서 버전 </a>도 제공됩니다. + + + + Workbenches documentation + 워크 벤치 문서 + + + + These are the help pages of all the workbenches currently installed on this computer. + 이 컴퓨터에 설치된 모든 워크 벤치의 도움말 페이지입니다. + + + + Getting help from the community + 커뮤니티에서 도움 받기 + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org"> FreeCAD 포럼 </a>은 다른 FreeCAD 사용자 및 개발자의 도움을 받을 수 있는 좋은 곳입니다. 이 포럼에는 다양한 유형의 쟁점과 토론 주제에 대한 섹션이 많이 있습니다. 질문이 있는 경우 <a href="https://forum.freecad.org/viewforum.php?f=3"> FreeCAD 사용에 대한 도움말 </a> 섹션에 게시하십시오. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + 포럼에 게시물을 올리는 것이 처음 이라면, 그 전에 우선 <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264"> 지침을 읽으십시오</a>. + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + 사용 가능한 애드온 + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + 다음은 FreeCAD 설치에 추가할 수 있는 사용 가능한 추가 워크벤치 목록입니다. 메뉴 도구 -> 애드온 관리자에서 찾아보고 설치합니다. 아래 링크를 클릭하면 이들 중 하나에 대해 자세히 알아볼 수 있습니다. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + FreeCAD 설명서 패키지가 귀하의 버전과 함께 제공되지 않은 경우 FreeCAD 도움말을 설치하여 인터넷 연결없이 문서 센터, 워크 벤치 도움말 및 명령 문서에 액세스하십시오. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + GitHub에서 정보를 검색할 수 없습니다. <a href="EnableDownload.py"> FreeCAD가 인터넷에 액세스하도록 허용</a>하고 시작 페이지를 새로 고침 하십시오. + + + + Recent commits + 최근 변경 사항 + + + + See all commits on github + Github의 모든 변경 사항보기 + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + 메뉴 편집 -> 환경 설정 -> 시작 -> 추가 폴더 표시에서 사용자 정의 폴더를 구성 할 수 있습니다 + + + + version + 버전 + + + + build + 빌드 + + + + Create new... + 새로 만들기... + + + + Unknown + 알 수 없음 + + + + Forum + 포럼 + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + 위의 링크를 데스크탑 브라우저에서 열려면 마우스 오른쪽 버튼 클릭 -> 외부 브라우저에서 열기를 선택하십시오. + + + + Creation date + 생성 날짜 + + + + Last modification + 마지막으로 변경함 + + + + Notes + 메모 + + + + Open start page preferences + 시작 페이지 환경 설정 열기 + + + + Workbench + + + + Start page + 시작 페이지 + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - 시작 페이지 옵션 - - - - Start page template - 시작 페이지 템플릿 - - - - An optional HTML template that will be used instead of the default start page. - 기본 시작 페이지 대신 사용할 선택적 HTML 템플릿. - - - + Contents 내용 - - Show notepad - 메모 표시 + + Show forum + 포럼 표시 - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - 파일 축소판 옆에 메모장을 표시하여 세션 간에 메모를 보관할 수 있습니다. - - - + Show examples folder contents 예제 폴더 내용보기 - - If you want the examples to show on the first page - 예제를 첫 페이지에 표시하려면 - - - + Show additional folder 추가 폴더 표시 - + + If you want the examples to show on the first page + 예제를 첫 페이지에 표시하려면 + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + 이 항목을 선택하면 FreeCAD 포럼의 최신 게시물이 활동 탭에 표시됩니다. + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here 첫 페이지 하단에 표시할 선택적 사용자 지정 폴더입니다. 사용하여 ";;" 경로를 분리하려면 여기에 여러 폴더를 추가할 수 있습니다. - - Show forum - 포럼 표시 + + Show notepad + 메모 표시 - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - 이 항목을 선택하면 FreeCAD 포럼의 최신 게시물이 활동 탭에 표시됩니다. + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + 파일 축소판 옆에 메모장을 표시하여 세션 간에 메모를 보관할 수 있습니다. - + Show tips 팁 표시 - + + General + 일반 + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab 워크벤치 시작 문서 탭에 도움말 팁을 표시합니다. - - Show scrollbars - 스크롤바 보이게 함 + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors 글꼴 및 색상 - - Use FreeCAD style sheet - FreeCAD 스타일 시트 사용 - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - 이 항목이 선택되어 있고 일반 기본 설정에서 스타일 시트가 지정되어 있으면 이 스타일 시트가 사용되어 아래 색상을 무시합니다. - - - - Background color - 배경색 - - - - The background color behind the panels - 패널 뒤의 배경색 - - - - Background color down gradient - 배경색 다운 그라디언트 - - - - The down gradient for the background color (currently unsupported) - 배경색의 아래쪽 그라디언트 (현재 지원되지 않음) - - - - Background image - 배경 이미지 - - - - An optional image to display as background - 배경으로 표시할 선택적 이미지 - - - - Background text color - 배경 텍스트 색상 - - - - The color of the version text - 버전 텍스트의 색상 - - - - Page background color - 페이지 배경색 - - - + The background of the main start page area 기본 시작 페이지 영역의 배경 - - Page text color - 페이지 텍스트 색상 + + Background color + 배경색 - - The color of the text on the main pages - 기본 페이지의 텍스트 색상 - - - - Box background color - 패널 배경색 - - - - The background color of the boxes inside the pages - 페이지 내부 상자의 배경색 - - - - Link color - 링크 색상 - - - - The color of the links - 링크 색상 - - - - Font family - 글꼴 가족 - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - 시작 페이지에서 사용할 글꼴 모음. 글꼴 이름 또는 쉼표로 구분된 일련의 대체 글꼴일 수 있습니다. - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - 시작 페이지의 모든 텍스트에 사용할 기본 글꼴 크기 - - - - px - px - - - - Open links - 링크 열기 - - - + in FreeCAD FreeCAD에서 - + In external browser 외부 브라우저에서 - - Use gradient for New File icon - 새 파일 아이콘에 그라디언트 사용 + + Background color down gradient + 배경색 다운 그라디언트 - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - 이 옵션을 선택하면 '새 파일' 아이콘에 일반 아이콘 대신 그라데이션 아이콘이 표시됩니다. + + The color of the version text + 버전 텍스트의 색상 - + + Link color + 링크 색상 + + + + An optional image to display as background + 배경으로 표시할 선택적 이미지 + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + 이 항목이 선택되어 있고 일반 기본 설정에서 스타일 시트가 지정되어 있으면 이 스타일 시트가 사용되어 아래 색상을 무시합니다. + + + + Page background color + 페이지 배경색 + + + + The color of the text on the main pages + 기본 페이지의 텍스트 색상 + + + + Background image + 배경 이미지 + + + + Page text color + 페이지 텍스트 색상 + + + + The color of the links + 링크 색상 + + + + The background color of the boxes inside the pages + 페이지 내부 상자의 배경색 + + + + Box background color + 패널 배경색 + + + + The background color behind the panels + 패널 뒤의 배경색 + + + + The down gradient for the background color (currently unsupported) + 배경색의 아래쪽 그라디언트 (현재 지원되지 않음) + + + + Open links + 링크 열기 + + + + Background text color + 배경 텍스트 색상 + + + + Use FreeCAD style sheet + FreeCAD 스타일 시트 사용 + + + + Font family + 글꼴 가족 + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + 시작 페이지에서 사용할 글꼴 모음. 글꼴 이름 또는 쉼표로 구분된 일련의 대체 글꼴일 수 있습니다. + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + 시작 페이지의 모든 텍스트에 사용할 기본 글꼴 크기 + + + + + px + px + + + Options 옵션 - - Switch workbench after loading - 로드 후 Workbench 전환 - - - - Choose which workbench to switch to after the program launches - 프로그램 실행 후 전환할 워크벤치 선택 - - - - Close start page after loading - 로드 후 시작 페이지 닫기 - - - + If checked, will automatically close the Start page when FreeCAD launches 선택하면 FreeCAD가 시작될 때 시작 페이지가 자동으로 닫힙니다. - + + Switch workbench after loading + 로드 후 Workbench 전환 + + + + Close start page after loading + 로드 후 시작 페이지 닫기 + + + Close and switch on opening file 파일을 닫고 켜기 - + If application is started by opening a file, apply the two settings above 파일을 열어 응용 프로그램을 시작한 경우 위의 두 가지 설정을 적용하십시오. - Workbench + DlgStartPreferencesAdvanced - - - Start page - 시작 페이지 - - - - StartPage - - - Start - 시작 + + Advanced + Advanced - - Documents - 문서 + + Custom HTML Template + Custom HTML Template - - Help - 도움말 + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - 활동 + + Custom CSS + Custom CSS - - Recent files - 최근 파일들 - - - - Tip - - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - 편집 -> 환경 설정 -> 일반 -> 최근 파일 목록의 크기 메뉴에서 표시 할 최근 파일 수를 조정하십시오 - - - - Examples - 예시 - - - - General documentation - 일반 문서 - - - - User hub - 사용자 허브 - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - 이 섹션에는 FreeCAD 사용자에게 유용한 문서가 포함되어 있습니다: 모든 워크 벤치 목록, FreeCAD 응용 프로그램 설치 및 사용법, 자습서 및 시작하기에 필요한 모든 지침. - - - - Power users hub - 고급 사용자 허브 - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - 이 섹션에서는 고급 사용자와 Python 스크립트 작성에 관심이 있는 사람들을 위한 문서를 수집합니다. 또한 매크로 저장소, 매크로 설치 및 사용 방법에 대한 지침, FreeCAD를 특정 요구 사항에 맞게 사용자 지정하는 방법에 대한 추가 정보를 찾을 수 있습니다. - - - - Developers hub - 개발자 허브 - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - 이 섹션에는 개발자를 위한 자료가 포함되어 있습니다: FreeCAD를 직접 컴파일하는 방법, FreeCAD 소스 코드의 구조화 방법 + 탐색 방법, 새로운 워크벤치 개발 방법 및/또는 자체 응용 프로그램에 FreeCAD를 내장하는 방법을 알아봅니다. - - - - Manual - 설명서 - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD 설명서은 이 위키에 포함된 정보를 표현하는 또 다른 방법입니다. 그것은 책처럼 읽도록 만들어졌으며 위의 센터에서 다른 많은 페이지로 부드럽게 소개 할 것입니다. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> 전자 도서 버전 </a>도 제공됩니다. - - - - Workbenches documentation - 워크 벤치 문서 - - - - These are the help pages of all the workbenches currently installed on this computer. - 이 컴퓨터에 설치된 모든 워크 벤치의 도움말 페이지입니다. - - - - Getting help from the community - 커뮤니티에서 도움 받기 - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org"> FreeCAD 포럼 </a>은 다른 FreeCAD 사용자 및 개발자의 도움을 받을 수 있는 좋은 곳입니다. 이 포럼에는 다양한 유형의 쟁점과 토론 주제에 대한 섹션이 많이 있습니다. 질문이 있는 경우 <a href="https://forum.freecad.org/viewforum.php?f=3"> FreeCAD 사용에 대한 도움말 </a> 섹션에 게시하십시오. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - 포럼에 게시물을 올리는 것이 처음 이라면, 그 전에 우선 <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264"> 지침을 읽으십시오</a>. - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - 사용 가능한 애드온 - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - 다음은 FreeCAD 설치에 추가할 수 있는 사용 가능한 추가 워크벤치 목록입니다. 메뉴 도구 -> 애드온 관리자에서 찾아보고 설치합니다. 아래 링크를 클릭하면 이들 중 하나에 대해 자세히 알아볼 수 있습니다. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - FreeCAD 설명서 패키지가 귀하의 버전과 함께 제공되지 않은 경우 FreeCAD 도움말을 설치하여 인터넷 연결없이 문서 센터, 워크 벤치 도움말 및 명령 문서에 액세스하십시오. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - GitHub에서 정보를 검색할 수 없습니다. <a href="EnableDownload.py"> FreeCAD가 인터넷에 액세스하도록 허용</a>하고 시작 페이지를 새로 고침 하십시오. - - - - Recent commits - 최근 변경 사항 - - - - See all commits on github - Github의 모든 변경 사항보기 - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - 메뉴 편집 -> 환경 설정 -> 시작 -> 추가 폴더 표시에서 사용자 정의 폴더를 구성 할 수 있습니다 - - - - version - 버전 - - - - build - 빌드 - - - - Create new... - 새로 만들기... - - - - Unknown - 알 수 없음 - - - - Forum - 포럼 - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - 위의 링크를 데스크탑 브라우저에서 열려면 마우스 오른쪽 버튼 클릭 -> 외부 브라우저에서 열기를 선택하십시오. - - - - Creation date - 생성 날짜 - - - - Last modification - 마지막으로 변경함 - - - - Notes - 메모 - - - - Open start page preferences - 시작 페이지 환경 설정 열기 + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start 시작 diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_nl.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_nl.ts index 5184c5da64..af745c138c 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_nl.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_nl.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Welkom bij FreeCAD + + + + Documents + Documenten + + + + Help + Help + + + + Activity + Activiteit + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link naar het FreeCAD blog + + + + New file + Nieuw bestand + + + + Empty File + Leeg bestand + + + + Create an empty FreeCAD file + Maak een leeg FreeCAD-bestand + + + + Open File + Open bestand + + + + Open an existing CAD file or 3D model + Open een bestaand CAD-bestand of 3D-model + + + + Standard Part + Standaard onderdeel + + + + Create a part with the Part Design workbench + Maak een onderdeel aan met de Part Design werkbank + + + + 2D Draft + 2D schets + + + + Create a 2D draft with the Draft workbench + Maak een 2D schets met de Draft werkbank + + + + BIM/Architecture + BIM/Architectuur + + + + Create an architecture project + Maak een architectuurproject + + + + Recent files + Recente bestanden + + + + Tip + Tip + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Pas het aantal recente bestanden dat hier getoond wordt aan in het menu Bewerken> Opties> Algemeen> Tabblad Algemeen> Grootte van de recente-bestanden lijst + + + + Examples + Voorbeelden + + + + General documentation + Gebruikersdocumentatie + + + + User hub + Gebruikers hub + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Deze sectie bevat nuttige algemene documentatie voor FreeCAD-gebruikers: een lijst van alle werkbanken, gedetailleerde instructies over het installeren en gebruiken van FreeCAD, tutorials, en alles wat je nodig hebt om te beginnen. + + + + Power users hub + Hub voor gevorderde gebruikers + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Deze sectie verzamelt documentatie voor ervaren gebruikers en mensen die geïnteresseerd zijn in het schrijven van Python scripts. U vindt hier ook een bibliotheek van macro's, instructies over hoe deze te installeren en gebruiken, en meer informatie over het aanpassen van FreeCAD aan uw specifieke behoeften. + + + + Developers hub + Ontwikkelaars hub + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Deze sectie bevat materiaal voor ontwikkelaars: Hoe zelf FreeCAD te compileren, hoe de broncode van FreeCAD gestructureerd is en hoe erin te navigeren, hoe nieuwe werkbanken te ontwikkelen en/of FreeCAD in uw eigen toepassing in te voegen. + + + + Manual + Handleiding + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + De FreeCAD handleiding is een andere, meer lineaire manier om de informatie uit deze wiki te presenteren. Het is gemaakt om als een boek te worden gelezen en zal u rustig kennis laten maken met de vele andere pagina's van de bovenstaande hubs. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">E-boek versies</a> zijn ook beschikbaar. + + + + Workbenches documentation + Documentatie van de werkbanken + + + + These are the help pages of all the workbenches currently installed on this computer. + Dit zijn hulp pagina's van alle op dit moment op Uw computer geïnstalleerde wekbanken. + + + + Getting help from the community + Krijg hulp van de Community + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + Het <a href="http://forum.freecad.org">FreeCAD forum</a> is een geweldige plek om hulp te krijgen van andere FreeCAD gebruikers en ontwikkelaars. Het forum heeft vele afdelingen voor verschillende soorten onderwerpen en discussieonderwerpen. Post in geval van twijfel in de meer algemene <a href="https://forum.freecad.org/viewforum.php?f=3">Help over het gebruik van FreeCAD</a> sectie. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Als het de eerste keer is dat je iets op het forum plaatst, zorg er dan voor dat je <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">de richtlijnen</a> eerst leest! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD onderhoudt ook een openbare <a href="https://www.freecad.org/tracker">bug tracker</a> waar iedereen bugs kan indienen en nieuwe functies kan voorstellen. Om extra werk te voorkomen, en voor de beste kansen om je bug opgelost te krijgen, zorg ervoor dat je de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug indiening gids</a> leest, voordat je iets post. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + In de lijst hieronder staan de laatste toegevoegde wijzigingen aan de <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD broncode</a>. Deze wijzigingen zijn mogelijk nog niet doorgevoerd in je huidige versie van FreeCAD. Kijk bij de <a href="https://www.freecad.org/wiki/Downloads">beschikbare opties</a> in het geval je met een (andere) ontwikkelversie wil werken. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + De nieuwste berichten op het <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + Beschikbare uitbreidingen + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Hieronder staat een lijst van extra beschikbare werkbanken die kunnen worden toegevoegd aan Uw FreeCAD instalatie. Doorzoek en installleer ze via het menu Tools -> Addons manager. U kunt meer over ze te weten komen door op onderstaande links te klikken. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Wanneer niet gebundeld met uw FreeCAD-versie, installeert U dan het FreeCAD documentatie pakket om documentatie hubs, werkbank hulp en documentatie over de individuele commando's te krijgen zonder een internetverbinding. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Kan de informatie van GitHub niet binnenhalen. <a href="EnableDownload.py">Geef FreeCAD toegang tot het internet</a> and herlaad the Start pagina. + + + + Recent commits + Recente bijdragen + + + + See all commits on github + Zie alle bijdragen op github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Om een op maat gemaakte map hier weer te laten geven kunt u dat in het volgende menu instellen: Bewerken-> Voorkeuren-> Start-> Custom map configureren + + + + version + versie + + + + build + bouw + + + + Create new... + Nieuw Document... + + + + Unknown + Onbekend + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Om een van de bovenstaande links in uw desktop browser te openen, klik met de rechtermuisknop-> Open in externe browser + + + + Creation date + Aanmaakdatum + + + + Last modification + Laatst wijziging + + + + Notes + Aantekeningen + + + + Open start page preferences + Open start pagina voorkeuren + + + + Workbench + + + + Start page + Startpagina + + CmdStartPage @@ -22,489 +314,289 @@ DlgStartPreferences - - Start page options - Startpagina opties - - - - Start page template - Startpagina template - - - - An optional HTML template that will be used instead of the default start page. - Een optioneel HTML-sjabloon die wordt gebruikt in plaats van de standaard startpagina. - - - + Contents Inhoud - - Show notepad - Kladblok weergeven + + Show forum + Toon forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Toont een kladblok naast de bestandsminiaturen, om aantekeningen te bewaren tussen sessies - - - + Show examples folder contents Toon de inhoud van de map voorbeelden - - If you want the examples to show on the first page - Als u wilt dat de voorbeelden op de eerste pagina worden weergegeven - - - + Show additional folder Toon een extra map - + + If you want the examples to show on the first page + Als u wilt dat de voorbeelden op de eerste pagina worden weergegeven + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Als dit aangevinkt is, worden de laatste berichten van het FreeCAD-forum weergegeven op het tabblad Activiteit + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Een optionele aangepaste map, die onderaan de eerste pagina wordt weergegeven. Door ";" te gebruiken kan je ook meerdere mappen toevoegen - - Show forum - Toon forum + + Show notepad + Kladblok weergeven - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Als dit aangevinkt is, worden de laatste berichten van het FreeCAD-forum weergegeven op het tabblad Activiteit + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Toont een kladblok naast de bestandsminiaturen, om aantekeningen te bewaren tussen sessies - + Show tips Toon tips - + + General + Algemeen + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Werkbank waarnaar moet worden overgeschakeld na het laden van een bestand vanaf de startpagina, wordt alleen gebruikt als werkbank Start de werkbank bij opstarten is + + + + The size of file thumbnail icons in recent files and examples sections + De grootte van de bestandiconen in het -recente bestanden en voorbeelden- scherm + + + Displays help tips in the Start workbench Documents tab Toon help tips op het tabblad Documenten in de Start werkbank - - Show scrollbars - Schuifbalken tonen + + File thumbnail size + Bestandsicoon grootte - + + Show file thumbnails + Toon bestand miniaturen + + + Fonts and colors Lettertypen en kleuren - - Use FreeCAD style sheet - Gebruik het FreeCAD-stijlblad - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Als dit aangevinkt is, en een stijlblad is gespecificeerd in de Algemene Voorkeuren, zal het stijlblad gebruikt worden in plaats van de onderstaande kleuren - - - - Background color - Achtergrond - - - - The background color behind the panels - De achtergrondkleur achter de panelen - - - - Background color down gradient - Achtergrond kleur gradient - - - - The down gradient for the background color (currently unsupported) - Het verloop naar beneden van de achtergrondkleur (momenteel niet ondersteund) - - - - Background image - Achtergrondafbeelding - - - - An optional image to display as background - Een optionele afbeelding die als achtergrond wordt weergegeven - - - - Background text color - Achtergrondtekstkleur - - - - The color of the version text - De kleur van de versietekst - - - - Page background color - Pagina-achtergrondkleur - - - + The background of the main start page area De achtergrond van het hoofdgedeelte van de startpagina - - Page text color - Paginatekstkleur + + Background color + Achtergrond - - The color of the text on the main pages - De kleur van de tekst op de hoofdpagina's - - - - Box background color - Achtergrondkleur van de kaders - - - - The background color of the boxes inside the pages - De achtergrondkleur van de kaders binnen de pagina's - - - - Link color - Linkkleur - - - - The color of the links - De kleur van de links - - - - Font family - Lettertypefamilie - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - De lettertypefamilie die gebruikt moet worden op de startpagina. Kan een lettertypenaam zijn of een door komma's gescheiden reeks reservelettertypen - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - De basistekstgrootte die gebruikt moet worden voor alle teksten op de startpagina - - - - px - px - - - - Open links - Koppelingen openen - - - + in FreeCAD in FreeCAD - + In external browser In externe browser - - Use gradient for New File icon - Gebruik een kleurgradiënt in het 'Nieuw bestand' pictogram + + Background color down gradient + Achtergrond kleur gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Als dit is geselecteerd, toont het 'Nieuw bestand' pictogram een gradiënt icoon in plaats van het normale icoon + + The color of the version text + De kleur van de versietekst - + + Link color + Linkkleur + + + + An optional image to display as background + Een optionele afbeelding die als achtergrond wordt weergegeven + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Als dit aangevinkt is, en een stijlblad is gespecificeerd in de Algemene Voorkeuren, zal het stijlblad gebruikt worden in plaats van de onderstaande kleuren + + + + Page background color + Pagina-achtergrondkleur + + + + The color of the text on the main pages + De kleur van de tekst op de hoofdpagina's + + + + Background image + Achtergrondafbeelding + + + + Page text color + Paginatekstkleur + + + + The color of the links + De kleur van de links + + + + The background color of the boxes inside the pages + De achtergrondkleur van de kaders binnen de pagina's + + + + Box background color + Achtergrondkleur van de kaders + + + + The background color behind the panels + De achtergrondkleur achter de panelen + + + + The down gradient for the background color (currently unsupported) + Het verloop naar beneden van de achtergrondkleur (momenteel niet ondersteund) + + + + Open links + Koppelingen openen + + + + Background text color + Achtergrondtekstkleur + + + + Use FreeCAD style sheet + Gebruik het FreeCAD-stijlblad + + + + Font family + Lettertypefamilie + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + De lettertypefamilie die gebruikt moet worden op de startpagina. Kan een lettertypenaam zijn of een door komma's gescheiden reeks reservelettertypen + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + De basistekstgrootte die gebruikt moet worden voor alle teksten op de startpagina + + + + + px + px + + + Options Opties - - Switch workbench after loading - Na opstarten naar deze Werkbank overschakelen - - - - Choose which workbench to switch to after the program launches - Kies naar welke werkbank moet worden overgeschakeld nadat het programma is gestart - - - - Close start page after loading - Sluit de startpagina na het laden - - - + If checked, will automatically close the Start page when FreeCAD launches Indien aangevinkt, wordt de startpagina automatisch gesloten als FreeCAD start - + + Switch workbench after loading + Na opstarten naar deze Werkbank overschakelen + + + + Close start page after loading + Sluit de startpagina na het laden + + + Close and switch on opening file Sluit en wissel bij het openen van bestand - + If application is started by opening a file, apply the two settings above Als de toepassing wordt gestart door een bestand te openen, pas de twee bovenstaande instellingen toe - Workbench + DlgStartPreferencesAdvanced - - - Start page - Startpagina - - - - StartPage - - - Start - Start + + Advanced + Geavanceerd - - Documents - Documenten + + Custom HTML Template + Aangepaste HTML-sjabloon - - Help - Help + + An optional HTML template that will be used instead of the default start page. + Een optioneel HTML-sjabloon dat wordt gebruikt in plaats van de standaard startpagina. - - Activity - Activiteit + + Custom CSS + Aangepaste CSS - - Recent files - Recente bestanden - - - - Tip - Tip - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Pas het aantal recente bestanden dat hier getoond wordt aan in het menu Bewerken> Opties> Algemeen> Tabblad Algemeen> Grootte van de recente-bestanden lijst - - - - Examples - Voorbeelden - - - - General documentation - Gebruikersdocumentatie - - - - User hub - Gebruikers hub - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Deze sectie bevat nuttige algemene documentatie voor FreeCAD-gebruikers: een lijst van alle werkbanken, gedetailleerde instructies over het installeren en gebruiken van FreeCAD, tutorials, en alles wat je nodig hebt om te beginnen. - - - - Power users hub - Hub voor gevorderde gebruikers - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Deze sectie verzamelt documentatie voor ervaren gebruikers en mensen die geïnteresseerd zijn in het schrijven van Python scripts. U vindt hier ook een bibliotheek van macro's, instructies over hoe deze te installeren en gebruiken, en meer informatie over het aanpassen van FreeCAD aan uw specifieke behoeften. - - - - Developers hub - Ontwikkelaars hub - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Deze sectie bevat materiaal voor ontwikkelaars: Hoe zelf FreeCAD te compileren, hoe de broncode van FreeCAD gestructureerd is en hoe erin te navigeren, hoe nieuwe werkbanken te ontwikkelen en/of FreeCAD in uw eigen toepassing in te voegen. - - - - Manual - Handleiding - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - De FreeCAD handleiding is een andere, meer lineaire manier om de informatie uit deze wiki te presenteren. Het is gemaakt om als een boek te worden gelezen en zal u rustig kennis laten maken met de vele andere pagina's van de bovenstaande hubs. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">E-boek versies</a> zijn ook beschikbaar. - - - - Workbenches documentation - Documentatie van de werkbanken - - - - These are the help pages of all the workbenches currently installed on this computer. - Dit zijn hulp pagina's van alle op dit moment op Uw computer geïnstalleerde wekbanken. - - - - Getting help from the community - Krijg hulp van de Community - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - Het <a href="http://forum.freecad.org">FreeCAD forum</a> is een geweldige plek om hulp te krijgen van andere FreeCAD gebruikers en ontwikkelaars. Het forum heeft vele afdelingen voor verschillende soorten onderwerpen en discussieonderwerpen. Post in geval van twijfel in de meer algemene <a href="https://forum.freecad.org/viewforum.php?f=3">Help over het gebruik van FreeCAD</a> sectie. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Als het de eerste keer is dat je iets op het forum plaatst, zorg er dan voor dat je <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">de richtlijnen</a> eerst leest! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD onderhoudt ook een openbare <a href="https://www.freecad.org/tracker">bug tracker</a> waar iedereen bugs kan indienen en nieuwe functies kan voorstellen. Om extra werk te voorkomen, en voor de beste kansen om je bug opgelost te krijgen, zorg ervoor dat je de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug indiening gids</a> leest, voordat je iets post. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - In de lijst hieronder staan de laatste toegevoegde wijzigingen aan de <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD broncode</a>. Deze wijzigingen zijn mogelijk nog niet doorgevoerd in je huidige versie van FreeCAD. Kijk bij de <a href="https://www.freecad.org/wiki/Downloads">beschikbare opties</a> in het geval je met een (andere) ontwikkelversie wil werken. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - De nieuwste berichten op het <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - Beschikbare uitbreidingen - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Hieronder staat een lijst van extra beschikbare werkbanken die kunnen worden toegevoegd aan Uw FreeCAD instalatie. Doorzoek en installleer ze via het menu Tools -> Addons manager. U kunt meer over ze te weten komen door op onderstaande links te klikken. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Wanneer niet gebundeld met uw FreeCAD-versie, installeert U dan het FreeCAD documentatie pakket om documentatie hubs, werkbank hulp en documentatie over de individuele commando's te krijgen zonder een internetverbinding. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Kan de informatie van GitHub niet binnenhalen. <a href="EnableDownload.py">Geef FreeCAD toegang tot het internet</a> and herlaad the Start pagina. - - - - Recent commits - Recente bijdragen - - - - See all commits on github - Zie alle bijdragen op github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Om een op maat gemaakte map hier weer te laten geven kunt u dat in het volgende menu instellen: Bewerken-> Voorkeuren-> Start-> Custom map configureren - - - - version - versie - - - - build - bouw - - - - Create new... - Nieuw Document... - - - - Unknown - Onbekend - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Om een van de bovenstaande links in uw desktop browser te openen, klik met de rechtermuisknop-> Open in externe browser - - - - Creation date - Aanmaakdatum - - - - Last modification - Laatst wijziging - - - - Notes - Aantekeningen - - - - Open start page preferences - Open start pagina voorkeuren + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + Je kunt hier jouw aangepaste CSS plakken en de startpagina past hem toe. Om meer te weten te komen over hoe je de startpagina kunt stylen, kijk eens bij de HTML en CSS broncodes: +<a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</a> +<a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</a> QObject - + + Start Start diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts index c37e2df2ac..09e68f1f4a 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_pl.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Witaj w FreeCAD + + + + Documents + Dokumenty + + + + Help + Pomoc + + + + Activity + Aktywność + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link do bloga FreeCAD + + + + New file + Utwórz nowy plik + + + + Empty File + Pusty plik + + + + Create an empty FreeCAD file + Utwórz pusty plik FreeCAD + + + + Open File + Otwórz plik + + + + Open an existing CAD file or 3D model + Otwórz plik CAD lub model 3D + + + + Standard Part + Standardowy element części + + + + Create a part with the Part Design workbench + Utwórz część za pomocą środowiska pracy Część + + + + 2D Draft + Rysunek roboczy 2D + + + + Create a 2D draft with the Draft workbench + Utwórz rysunek 2D za pomocą środowiska Rysunek Roboczy + + + + BIM/Architecture + BIM / Architektura + + + + Create an architecture project + Utwórz projekt architektury + + + + Recent files + Ostatnio używane pliki + + + + Tip + Podpowiedź + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Dostosuj liczbę wyświetlanych nazw plików w menu Edycja → Preferencje → Ogólne → Rozmiar listy ostatnio otwartych plików + + + + Examples + Przykłady + + + + General documentation + Dokumentacja podstawowa + + + + User hub + Centrum użytkownika + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Ta sekcja zawiera dokumentację ogólną przydatną dla użytkowników programu FreeCAD. Listę wszystkich Środowisk pracy, szczegółowe instrukcje dotyczące instalacji i użytkowania aplikacji FreeCAD, poradniki i wszystko, co jest potrzebne do rozpoczęcia pracy. + + + + Power users hub + Centrum Power użytkowników + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Ta sekcja gromadzi dokumentację dla zaawansowanych użytkowników i osób zainteresowanych pisaniem skryptów w środowisku Python. Znajdziesz tam również repozytorium makrodefinicji, instrukcje instalacji i używania oraz dodatkowe informacje o dostosowywaniu programu FreeCAD do swoich potrzeb. + + + + Developers hub + Centrum programistów + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Ta sekcja zawiera materiał dla programistów: jak samemu skompilować FreeCAD, jak zbudowany jest kod źródłowy FreeCAD i jak po nim się poruszać, jak tworzyć nowe środowiska lub osadzać FreeCAD we własnej aplikacji. + + + + Manual + Instrukcja + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Podręcznik FreeCAD jest kolejnym, bardziej zwięzłym sposobem na zaprezentowanie informacji zawartych w tej stronie Wiki. Jest stworzony tak by można go było czytać jak książkę i delikatnie wprowadzi Cię na wiele innych stron z podanych poniżej centrów. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">Dostępna jest równiez</a> wersja w postaci e-book. + + + + Workbenches documentation + Dokumentacja Środowisk pracy + + + + These are the help pages of all the workbenches currently installed on this computer. + Są to strony pomocy dla wszystkich Środowisk pracy aktualnie zainstalowanych na tym komputerze. + + + + Getting help from the community + Uzyskaj pomoc społeczności + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org"> Forum FreeCAD </a> to świetne miejsce, aby uzyskać pomoc od innych użytkowników i programistów. Posiada ono wiele sekcji dla różnych typów zagadnień i tematów dyskusji. W razie wątpliwości opublikuj wiadomość w sekcji ogólnej <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoc w użytkowaniu FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Jeśli piszesz na forum po raz pierwszy, pamiętaj, aby najpierw <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">przeczytać wytyczne</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD utrzymuje również publiczne <a href="https://www.freecad.org/tracker">narzędzie do śledzenia błędów</a>, gdzie każdy może zgłaszać błędy i proponować nowe funkcje. Aby zwiększyć szanse na naprawienie błędu i uniknąć powtarzanie już istniejących zgłoszeń, przed zamieszczeniem zgłoszenia przeczytaj <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">poradnik zgłaszania błędów </a>. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Poniżej znajduje się lista najnowszych zmian wprowadzonych do <a href="http://github.com/FreeCAD/FreeCAD/">kodu źródłowego FreeCAD</a>. Zmiany mogą nie być widoczne w wersji z której teraz korzystasz. Sprawdź <a href="https://www.freecad.org/wiki/Downloads">dostępne opcje</a> jeśli chcesz uzyskać wersję dla programistów. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Najnowsze tematy na <a href="https://forum.freecad.org">forum FreeCAD</a>: + + + + Available addons + Dostępne dodatki + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Poniżej znajduje się lista dodatkowych środowisk pracy, które mogą być dodane do Twojej instalacji programu FreeCAD. Przeglądaj i instaluj je z menu Narzędzia-> Menedżer dodatków. Dowiesz się więcej o każdym z nich, klikając na linki poniżej. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Jeśli nie dołączono do Twojej wersji programu, zainstaluj pakiet dokumentacji FreeCAD, aby uzyskać centra dokumentacji, pomoc dla środowiska pracy i indywidualną dokumentację poleceń, bez dostępu do Internetu. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Nie mogę odebrać informacji z GitHuba. <a href="EnableDownload.py" >Zezwól programowi FreeCAD na dostęp do Internetu</a> i ponownie załaduj stronę startową. + + + + Recent commits + Najnowsze zobowiązania + + + + See all commits on github + Zobacz wszystkie zobowiązania na Github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Możesz skonfigurować niestandardowy folder do wyświetlenia w menu Edycja -> Preferencje -> Start -> Pokaż dodatkowy folder + + + + version + wersja + + + + build + numer rewizji + + + + Create new... + Utwórz nowy ... + + + + Unknown + Nieznany + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Aby otworzyć link w przeglądarce, kliknij prawym przyciskiem myszki -> Otwórz w zewnętrznej przeglądarce + + + + Creation date + Data utworzenia + + + + Last modification + Ostatnia modyfikacja + + + + Notes + Uwagi + + + + Open start page preferences + Otwórz ustawienia strony startowej + + + + Workbench + + + + Start page + Strona startowa + + CmdStartPage @@ -22,489 +314,295 @@ DlgStartPreferences - - Start page options - Opcje dla strony startowej - - - - Start page template - Szablon dla strony startowej - - - - An optional HTML template that will be used instead of the default start page. - Opcjonalny szablon HTML, który zostanie użyty do wyświetlenia, w zamian domyślnej strony startowej. - - - + Contents Zawartość - - Show notepad - Pokaż notatnik + + Show forum + Pokaż forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Wyświetla notatnik obok miniaturek plików, w którym można przechowywać notatki pomiędzy sesjami - - - + Show examples folder contents Pokaż zawartość folderu z przykładami - - If you want the examples to show on the first page - Jeśli chcesz, aby przykłady pokazywały się na pierwszej stronie - - - + Show additional folder Pokaż dodatkowy folder - + + If you want the examples to show on the first page + Jeśli chcesz, aby przykłady pokazywały się na pierwszej stronie + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Jeśli ta opcja jest zaznaczona, +najnowsze posty z forum FreeCAD będą wyświetlane na karcie Aktywność + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Opcjonalny folder wyświetlany u dołu pierwszej strony. Używając ";;" do rozdzielenia ścieżek, możesz dodać tutaj kilka folderów - - Show forum - Pokaż forum + + Show notepad + Pokaż notatnik - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Jeśli to pole jest zaznaczone, najnowsze posty z forum FreeCAD będą wyświetlane na karcie Aktywność + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Wyświetla notatnik obok miniaturek plików, +w którym można przechowywać notatki pomiędzy sesjami - + Show tips Wyświetl wskazówki - + + General + Ogólne + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Środowisko pracy, wywoływane po załadowaniu pliku ze strony Start, +opcja używana tylko wtedy, gdy Start jest startowym środowiskiem pracy + + + + The size of file thumbnail icons in recent files and examples sections + Rozmiar miniaturek ikon plików w sekcji ostatnich plików oraz przykładów + + + Displays help tips in the Start workbench Documents tab Wyświetla wskazówki pomocy w zakładce Dokumenty w środowisku pracy Start - - Show scrollbars - Pokaż paski przewijania + + File thumbnail size + Rozmiar miniaturki dla ikonki pliku - + + Show file thumbnails + Pokaż miniatury plików + + + Fonts and colors Czcionki i kolory - - Use FreeCAD style sheet - Użyj arkusza stylów FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Jeśli ta opcja jest zaznaczona i arkusz stylów jest określony w Preferencjach ogólnych, zostanie on użyty i zastąpi poniższe kolory - - - - Background color - Kolor tła - - - - The background color behind the panels - Kolor tła pod panelami - - - - Background color down gradient - Kolor tła u dołu gradientu - - - - The down gradient for the background color (currently unsupported) - Kolor gradientu tła u dołu (obecnie nieobsługiwany) - - - - Background image - Obraz w tle - - - - An optional image to display as background - Obraz opcjonalny do wyświetlania jako tlo - - - - Background text color - Kolor tekstu w tle - - - - The color of the version text - Kolor tekstu dla wersji - - - - Page background color - Kolor tła dla strony - - - + The background of the main start page area Tło obszaru głównej strony startowej - - Page text color - Kolor tekstu na stronie + + Background color + Kolor tła - - The color of the text on the main pages - Kolor tekstu na głównych stronach - - - - Box background color - Kolor tła dla okienek - - - - The background color of the boxes inside the pages - Kolor tła pola zaznaczenia na stronach - - - - Link color - Kolor odnośnika - - - - The color of the links - Kolor odnośników - - - - Font family - Krój pisma - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Krój pisma którego należy użyć na stronie startowej. Może to być nazwa czcionki lub seria nazw czcionek zapasowych oddzielonych przecinkami - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Rozmiar czcionki podstawowej dla wszystkich tekstów na stronie startowej - - - - px - px - - - - Open links - Otwórz odnośniki - - - + in FreeCAD w FreeCAD - + In external browser W przeglądarce zewnętrznej - - Use gradient for New File icon - Użyj gradientu dla okienka Utwórz nowy ... + + Background color down gradient + Kolor tła u dołu gradientu - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Jeśli ta opcja jest zaznaczona, ikona "Nowy plik" pokazuje ikonę gradientu zamiast zwykłej ikony + + The color of the version text + Kolor tekstu dla wersji - + + Link color + Kolor odnośnika + + + + An optional image to display as background + Obraz opcjonalny do wyświetlania jako tlo + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Jeśli ta opcja jest zaznaczona i arkusz stylów jest określony w Preferencjach ogólnych, +zostanie on użyty i zastąpi poniższe kolory + + + + Page background color + Kolor tła dla strony + + + + The color of the text on the main pages + Kolor tekstu na głównych stronach + + + + Background image + Obraz w tle + + + + Page text color + Kolor tekstu na stronie + + + + The color of the links + Kolor odnośników + + + + The background color of the boxes inside the pages + Kolor tła pola zaznaczenia na stronach + + + + Box background color + Kolor tła dla okienek + + + + The background color behind the panels + Kolor tła pod panelami + + + + The down gradient for the background color (currently unsupported) + Kolor gradientu tła u dołu (obecnie nieobsługiwany) + + + + Open links + Otwórz odnośniki + + + + Background text color + Kolor tekstu w tle + + + + Use FreeCAD style sheet + Użyj arkusza stylów FreeCAD + + + + Font family + Krój pisma + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Krój pisma, którego należy użyć na stronie startowej. +Może to być nazwa czcionki lub seria nazw czcionek zapasowych oddzielonych przecinkami + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Rozmiar czcionki podstawowej dla wszystkich tekstów na stronie Startowej + + + + + px + px + + + Options Opcje - + + If checked, will automatically close the Start page when FreeCAD launches + Jeśli ta opcja jest zaznaczona, +strona Startowa zostanie automatycznie zamknięta po uruchomieniu programu FreeCAD + + + Switch workbench after loading Po uruchomieniu uaktywnij środowisko pracy - - Choose which workbench to switch to after the program launches - Wybierz, na które stanowisko pracy ma się przełączyć po uruchomieniu - - - + Close start page after loading Zamknij stronę startową po załadowaniu - - If checked, will automatically close the Start page when FreeCAD launches - Jeśli opcja jest zaznaczona, strona startowa zostanie automatycznie zamknięta po uruchomieniu programu FreeCAD - - - + Close and switch on opening file Zamknij i uaktywnij przy otwieraniu pliku - + If application is started by opening a file, apply the two settings above - Jeśli aplikacja FreeCAD jest uruchamiana poprzez otwarcie pliku, zastosuj dwa powyższe ustawienia + Jeśli aplikacja FreeCAD jest uruchamiana poprzez otwarcie pliku, +zastosuj dwa powyższe ustawienia - Workbench + DlgStartPreferencesAdvanced - - - Start page - Strona startowa - - - - StartPage - - - Start - Start + + Advanced + Zaawansowane - - Documents - Dokumenty + + Custom HTML Template + Niestandardowy szablon HTML - - Help - Pomoc + + An optional HTML template that will be used instead of the default start page. + Opcjonalny szablon HTML, +który będzie używany zamiast domyślnej strony startowej. - - Activity - Aktywność + + Custom CSS + Niestandardowy szablon CSS - - Recent files - Ostatnio używane pliki - - - - Tip - Podpowiedź - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Dostosuj liczbę wyświetlanych nazw plików w menu Edycja → Preferencje → Ogólne → Rozmiar listy ostatnio otwartych plików - - - - Examples - Przykłady - - - - General documentation - Dokumentacja podstawowa - - - - User hub - Centrum użytkownika - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Ta sekcja zawiera dokumentację ogólną przydatną dla użytkowników programu FreeCAD. Listę wszystkich Środowisk pracy, szczegółowe instrukcje dotyczące instalacji i użytkowania aplikacji FreeCAD, poradniki i wszystko, co jest potrzebne do rozpoczęcia pracy. - - - - Power users hub - Centrum Power użytkowników - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Ta sekcja gromadzi dokumentację dla zaawansowanych użytkowników i osób zainteresowanych pisaniem skryptów w środowisku Python. Znajdziesz tam również repozytorium makrodefinicji, instrukcje instalacji i używania oraz dodatkowe informacje o dostosowywaniu programu FreeCAD do swoich potrzeb. - - - - Developers hub - Centrum programistów - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Ta sekcja zawiera materiał dla programistów: jak samemu skompilować FreeCAD, jak zbudowany jest kod źródłowy FreeCAD i jak po nim się poruszać, jak tworzyć nowe środowiska lub osadzać FreeCAD we własnej aplikacji. - - - - Manual - Instrukcja - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Podręcznik FreeCAD jest kolejnym, bardziej zwięzłym sposobem na zaprezentowanie informacji zawartych w tej stronie Wiki. Jest stworzony tak by można go było czytać jak książkę i delikatnie wprowadzi Cię na wiele innych stron z podanych poniżej centrów. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">Dostępna jest równiez</a> wersja w postaci e-book. - - - - Workbenches documentation - Dokumentacja Środowisk pracy - - - - These are the help pages of all the workbenches currently installed on this computer. - Są to strony pomocy dla wszystkich Środowisk pracy aktualnie zainstalowanych na tym komputerze. - - - - Getting help from the community - Uzyskaj pomoc społeczności - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org"> Forum FreeCAD </a> to świetne miejsce, aby uzyskać pomoc od innych użytkowników i programistów. Posiada ono wiele sekcji dla różnych typów zagadnień i tematów dyskusji. W razie wątpliwości opublikuj wiadomość w sekcji ogólnej <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoc w użytkowaniu FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Jeśli piszesz na forum po raz pierwszy, pamiętaj, aby najpierw <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">przeczytać wytyczne</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD utrzymuje również publiczne <a href="https://www.freecad.org/tracker">narzędzie do śledzenia błędów</a>, gdzie każdy może zgłaszać błędy i proponować nowe funkcje. Aby zwiększyć szanse na naprawienie błędu i uniknąć powtarzanie już istniejących zgłoszeń, przed zamieszczeniem zgłoszenia przeczytaj <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">poradnik zgłaszania błędów </a>. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Poniżej znajduje się lista najnowszych zmian wprowadzonych do <a href="http://github.com/FreeCAD/FreeCAD/">kodu źródłowego FreeCAD</a>. Zmiany mogą nie być widoczne w wersji z której teraz korzystasz. Sprawdź <a href="https://www.freecad.org/wiki/Downloads">dostępne opcje</a> jeśli chcesz uzyskać wersję dla programistów. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Najnowsze tematy na <a href="https://forum.freecad.org">forum FreeCAD</a>: - - - - Available addons - Dostępne dodatki - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Poniżej znajduje się lista dodatkowych środowisk pracy, które mogą być dodane do Twojej instalacji programu FreeCAD. Przeglądaj i instaluj je z menu Narzędzia-> Menedżer dodatków. Dowiesz się więcej o każdym z nich, klikając na linki poniżej. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Jeśli nie dołączono do Twojej wersji programu, zainstaluj pakiet dokumentacji FreeCAD, aby uzyskać centra dokumentacji, pomoc dla środowiska pracy i indywidualną dokumentację poleceń, bez dostępu do Internetu. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Nie mogę odebrać informacji z GitHuba. <a href="EnableDownload.py" >Zezwól programowi FreeCAD na dostęp do Internetu</a> i ponownie załaduj stronę startową. - - - - Recent commits - Najnowsze zobowiązania - - - - See all commits on github - Zobacz wszystkie zobowiązania na Github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Możesz skonfigurować niestandardowy folder do wyświetlenia w menu Edycja -> Preferencje -> Start -> Pokaż dodatkowy folder - - - - version - wersja - - - - build - numer rewizji - - - - Create new... - Utwórz nowy ... - - - - Unknown - Nieznany - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Aby otworzyć link w przeglądarce, kliknij prawym przyciskiem myszki -> Otwórz w zewnętrznej przeglądarce - - - - Creation date - Data utworzenia - - - - Last modification - Ostatnia modyfikacja - - - - Notes - Uwagi - - - - Open start page preferences - Otwórz ustawienia strony startowej + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Możesz wkleić tutaj swój kod CSS, a strona Startowa zastosuje go dla Ciebie. Aby dowiedzieć się więcej o tym, jak stylizować stronę startową, zapoznaj się ze źródłami HTML i CSS:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Start diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_pt-BR.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_pt-BR.ts index 01408e440a..6ba3977d01 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_pt-BR.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_pt-BR.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Começar + + + + Welcome to FreeCAD + Bem-vindo ao FreeCAD + + + + Documents + Documentos + + + + Help + Ajuda + + + + Activity + Atividade + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link para o blog do FreeCAD + + + + New file + Novo arquivo + + + + Empty File + Arquivo Vazio + + + + Create an empty FreeCAD file + Criar um arquivo FreeCAD vazio + + + + Open File + Abrir arquivo + + + + Open an existing CAD file or 3D model + Abrir um arquivo CAD existente ou modelo 3D + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + Rascunho 2D + + + + Create a 2D draft with the Draft workbench + Crie um rascunho 2D com a bancada de trabalho de Rascunhos + + + + BIM/Architecture + BIM/Arquitetura + + + + Create an architecture project + Criar um projeto de arquitetura + + + + Recent files + Recent files + + + + Tip + Dica + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Ajuste o número de arquivos recentes a serem mostrados aqui no menu Editar -> Preferências -> Geral -> Tamanho da lista de arquivos recentes + + + + Examples + Exemplos + + + + General documentation + Documentação Geral + + + + User hub + Hub do usuário + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Esta seção contém documentação útil para os usuários do FreeCAD em geral: uma lista de todos os menus, instruções detalhadas sobre como instalar e usar o aplicativo FreeCAD, tutoriais e tudo o que você precisa para começar. + + + + Power users hub + Hub de usuário avançados + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Esta seção reúne documentação para usuários avançados e pessoas interessadas em escrever scripts python. Você também encontrará um repositório de macros, instruções sobre como instalá-las e usá-las, além de mais informações sobre como personalizar o FreeCAD para suas necessidades específicas. + + + + Developers hub + Hub de desenvolvedores + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Esta seção contém material para desenvolvedores: como compilar o FreeCAD você mesmo, como está estruturado o código-fonte FreeCAD + como navegar nele, como desenvolver novas bancadas e/ou incorporar FreeCAD no seu próprio aplicativo. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + O manual do FreeCAD é outra maneira mais linear de apresentar as informações contidas neste wiki. Ele é feito para ser lido como um livro e gentilmente o apresentará a muitas outras páginas dos hubs acima. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> Versões de livros eletrônicos </a> também estão disponíveis. + + + + Workbenches documentation + Documentação de bancadas de trabalho + + + + These are the help pages of all the workbenches currently installed on this computer. + Estas são as páginas de ajuda de todas as bancadas atualmente instalados neste computador. + + + + Getting help from the community + Obter ajuda da comunidade + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + Addons disponíveis + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Abaixo está uma lista de bancadas extras disponíveis que podem ser adicionados à sua instalação do FreeCAD. Procure e instale-os no menu Ferramentas -> Gerenciador de Complementos. Você pode aprender mais sobre qualquer um deles clicando nos links abaixo. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Se não estiver incluído na sua versão do FreeCAD, instale o pacote de documentação do FreeCAD para obter os hubs de documentação, a ajuda de bancada e a documentação de comando individual sem uma conexão com a Internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Não é possível buscar informações do GitHub. <a href="EnableDownload.py"> Autorize o FreeCAD a acessar a internet </a> e recarregue a página inicial. + + + + Recent commits + Commits recentes + + + + See all commits on github + Ver todos os commits no github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Você pode configurar uma pasta personalizada para exibir aqui no menu Editar -> Preferências -> Iniciar -> Mostrar pasta adicional + + + + version + versão + + + + build + build + + + + Create new... + Criar novo... + + + + Unknown + Desconhecido + + + + Forum + Fórum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Para abrir qualquer um dos links acima no navegador da área de trabalho, clique com o botão direito -> Abrir no navegador externo + + + + Creation date + Data de criação + + + + Last modification + Última modificação + + + + Notes + Notas + + + + Open start page preferences + Abra as preferências da página inicial + + + + Workbench + + + + Start page + Página inicial + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opções da página Inicial - - - - Start page template - Modelo da página Inicial - - - - An optional HTML template that will be used instead of the default start page. - Um modelo HTML opcional que será usado em vez da página inicial padrão. - - - + Contents Conteúdo - - Show notepad - Mostrar o bloco de notas + + Show forum + Mostrar o forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Mostra um bloco de notas ao lado das miniaturas de arquivos, onde você pode manter notas entre as sessões - - - + Show examples folder contents Mostrar o conteúdo da pasta de exemplos - - If you want the examples to show on the first page - Se quiser que os exemplos sejam mostrados na primeira página - - - + Show additional folder Mostrar uma pasta adicional - + + If you want the examples to show on the first page + Se quiser que os exemplos sejam mostrados na primeira página + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Se esta opção for ativada, as últimas mensagens do fórum do FreeCAD serão mostradas no separador Atividade + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Uma pasta personalizada opcional a ser exibida na parte inferior da primeira página. Usando ";;" para separar caminhos, você pode adicionar várias pastas aqui - - Show forum - Mostrar o forum + + Show notepad + Mostrar o bloco de notas - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Se esta opção for ativada, as últimas mensagens do fórum do FreeCAD serão mostradas no separador Atividade + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Mostra um bloco de notas ao lado das miniaturas de arquivos, onde você pode manter notas entre as sessões - + Show tips Mostrar dicas - + + General + Geral + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + O tamanho dos ícones das miniaturas do arquivo nos arquivos recentes e nas seções de exemplos + + + Displays help tips in the Start workbench Documents tab Exibe dicas de ajuda na aba Documentos da bancada Start - - Show scrollbars - Show scrollbars + + File thumbnail size + Tamanho da miniatura do arquivo - + + Show file thumbnails + Mostrar miniaturas de arquivos + + + Fonts and colors Fontes e cores - - Use FreeCAD style sheet - Usar a folha de estilos do FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Se esta opção for ativada e uma folha de estilo for especificada nas preferências gerais, ela será usada e substituirá as cores abaixo - - - - Background color - Cor de fundo - - - - The background color behind the panels - A cor de fundo atrás dos painéis - - - - Background color down gradient - Gradiente de fundo para baixo - - - - The down gradient for the background color (currently unsupported) - A cor de baixo do gradiente de fundo (atualmente não suportado) - - - - Background image - Imagem de fundo - - - - An optional image to display as background - Uma imagem opcional a ser mostrada como plano de fundo - - - - Background text color - Cor dos textos de fundo - - - - The color of the version text - A cor do texto da versão - - - - Page background color - Cor de fundo da página - - - + The background of the main start page area O fundo da área principal - - Page text color - Cor do texto da página + + Background color + Cor de fundo - - The color of the text on the main pages - A cor do texto nas páginas principais - - - - Box background color - Cor de fundo das caixas - - - - The background color of the boxes inside the pages - A cor de fundo das caixas dentro das páginas - - - - Link color - Cor dos links - - - - The color of the links - A cor dos links - - - - Font family - Família de fonte - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - A família de fontes a ser usada na página inicial. Pode ser um nome de fonte ou uma série de fontes separada por vírgulas - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - O tamanho de base da fonte a ser usada em todos os textos da página inicial - - - - px - px - - - - Open links - Abrir links - - - + in FreeCAD no FreeCAD - + In external browser No navegador externo - - Use gradient for New File icon - Usar gradiente para o ícone de arquivo novo + + Background color down gradient + Gradiente de fundo para baixo - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Se for selecionado, o ícone 'Novo Arquivo' mostra um ícone gradiente em vez do ícone normal + + The color of the version text + A cor do texto da versão - + + Link color + Cor dos links + + + + An optional image to display as background + Uma imagem opcional a ser mostrada como plano de fundo + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Se esta opção for ativada e uma folha de estilo for especificada nas preferências gerais, ela será usada e substituirá as cores abaixo + + + + Page background color + Cor de fundo da página + + + + The color of the text on the main pages + A cor do texto nas páginas principais + + + + Background image + Imagem de fundo + + + + Page text color + Cor do texto da página + + + + The color of the links + A cor dos links + + + + The background color of the boxes inside the pages + A cor de fundo das caixas dentro das páginas + + + + Box background color + Cor de fundo das caixas + + + + The background color behind the panels + A cor de fundo atrás dos painéis + + + + The down gradient for the background color (currently unsupported) + A cor de baixo do gradiente de fundo (atualmente não suportado) + + + + Open links + Abrir links + + + + Background text color + Cor dos textos de fundo + + + + Use FreeCAD style sheet + Usar a folha de estilos do FreeCAD + + + + Font family + Família de fonte + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + A família de fontes a ser usada na página inicial. Pode ser um nome de fonte ou uma série de fontes separada por vírgulas + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + O tamanho de base da fonte a ser usada em todos os textos da página inicial + + + + + px + px + + + Options Opções - - Switch workbench after loading - Mudar de bancada após o carregamento - - - - Choose which workbench to switch to after the program launches - Escolher para qual bancada alternar depois do programa abrir - - - - Close start page after loading - Fechar a página inicial após o carregamento - - - + If checked, will automatically close the Start page when FreeCAD launches Se marcado, fechará automaticamente a página inicial quando o FreeCAD iniciar - + + Switch workbench after loading + Mudar de bancada após o carregamento + + + + Close start page after loading + Fechar a página inicial após o carregamento + + + Close and switch on opening file Fechar e alternar ao abrir o arquivo - + If application is started by opening a file, apply the two settings above Se a aplicação for iniciada com a abertura de um arquivo, aplique as duas configurações acima - Workbench + DlgStartPreferencesAdvanced - - - Start page - Página inicial - - - - StartPage - - - Start - Começar + + Advanced + Avançado - - Documents - Documentos + + Custom HTML Template + Modelo HTML personalizado - - Help - Ajuda + + An optional HTML template that will be used instead of the default start page. + Um modelo HTML opcional que será usado em vez da página inicial padrão. - - Activity - Atividade + + Custom CSS + CSS Personalizado - - Recent files - Recent files - - - - Tip - Dica - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Ajuste o número de arquivos recentes a serem mostrados aqui no menu Editar -> Preferências -> Geral -> Tamanho da lista de arquivos recentes - - - - Examples - Exemplos - - - - General documentation - Documentação Geral - - - - User hub - Hub do usuário - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Esta seção contém documentação útil para os usuários do FreeCAD em geral: uma lista de todos os menus, instruções detalhadas sobre como instalar e usar o aplicativo FreeCAD, tutoriais e tudo o que você precisa para começar. - - - - Power users hub - Hub de usuário avançados - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Esta seção reúne documentação para usuários avançados e pessoas interessadas em escrever scripts python. Você também encontrará um repositório de macros, instruções sobre como instalá-las e usá-las, além de mais informações sobre como personalizar o FreeCAD para suas necessidades específicas. - - - - Developers hub - Hub de desenvolvedores - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Esta seção contém material para desenvolvedores: como compilar o FreeCAD você mesmo, como está estruturado o código-fonte FreeCAD + como navegar nele, como desenvolver novas bancadas e/ou incorporar FreeCAD no seu próprio aplicativo. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - O manual do FreeCAD é outra maneira mais linear de apresentar as informações contidas neste wiki. Ele é feito para ser lido como um livro e gentilmente o apresentará a muitas outras páginas dos hubs acima. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> Versões de livros eletrônicos </a> também estão disponíveis. - - - - Workbenches documentation - Documentação de bancadas de trabalho - - - - These are the help pages of all the workbenches currently installed on this computer. - Estas são as páginas de ajuda de todas as bancadas atualmente instalados neste computador. - - - - Getting help from the community - Obter ajuda da comunidade - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - Addons disponíveis - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Abaixo está uma lista de bancadas extras disponíveis que podem ser adicionados à sua instalação do FreeCAD. Procure e instale-os no menu Ferramentas -> Gerenciador de Complementos. Você pode aprender mais sobre qualquer um deles clicando nos links abaixo. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Se não estiver incluído na sua versão do FreeCAD, instale o pacote de documentação do FreeCAD para obter os hubs de documentação, a ajuda de bancada e a documentação de comando individual sem uma conexão com a Internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Não é possível buscar informações do GitHub. <a href="EnableDownload.py"> Autorize o FreeCAD a acessar a internet </a> e recarregue a página inicial. - - - - Recent commits - Commits recentes - - - - See all commits on github - Ver todos os commits no github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Você pode configurar uma pasta personalizada para exibir aqui no menu Editar -> Preferências -> Iniciar -> Mostrar pasta adicional - - - - version - versão - - - - build - build - - - - Create new... - Criar novo... - - - - Unknown - Desconhecido - - - - Forum - Fórum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Para abrir qualquer um dos links acima no navegador da área de trabalho, clique com o botão direito -> Abrir no navegador externo - - - - Creation date - Data de criação - - - - Last modification - Última modificação - - - - Notes - Notas - - - - Open start page preferences - Abra as preferências da página inicial + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Começar diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_pt-PT.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_pt-PT.ts index f925d0fcdf..7bcdcc2451 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_pt-PT.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_pt-PT.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Começar + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Documentos + + + + Help + Ajuda + + + + Activity + Actividade + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Dica + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Ajustar o número de ficheiros recentes a ser mostrado aqui no menu Edit-> preferências-> geral-> tamanho da lista de ficheiros recentes + + + + Examples + Exemplos + + + + General documentation + Documentação geral + + + + User hub + Centro do Utilizador + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Esta secção contém documentação útil para utilizadores do FreeCAD em geral: uma lista de todas as bancadas de trabalho, instruções detalhadas sobre como instalar e usar o FreeCAD, tutoriais e tudo que precisa para começar. + + + + Power users hub + Centro do Utilizador avançado + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Esta secção reúne documentação para utilizadores avançados e pessoas interessadas em escrever scripts em python. Também irá lá encontrar um repositório de macros, instruções sobre como os instalar e usá-los e obter mais informações sobre como personalizar o FreeCAD às suas necessidades específicas. + + + + Developers hub + Centro de desenvolvedores + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Esta seção contém material para desenvolvedores: como compilar o FreeCAD você mesmo, como está estruturado o código-fonte FreeCAD + como navegar-lo, como desenvolver novas bancadas e/ou incorporar FreeCAD no seu próprio aplicativo. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Manual do FreeCAD é uma outra forma, mais uma forma linear, de apresentar as informações contidas nesta wiki. É feito para ser lido como um livro e irá apresentá-lo a muitas outras páginas dos hubs acima. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-livro versões</a> também estão disponíveis. + + + + Workbenches documentation + Documentação das bancadas de trabalho + + + + These are the help pages of all the workbenches currently installed on this computer. + Estas são as páginas de ajuda de todas as bancadas atualmente instaladas neste computador. + + + + Getting help from the community + Obter ajuda da Comunidade + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + O <a href="http://forum.freecad.org">fórum FreeCAD</a> é um ótimo lugar para obter ajuda de outros usuários e programadores do FreeCAD. O fórum tem muitas secções para diferentes tipos de questões e temas de discussão. Em caso de dúvida, poste no mais geral <a href="https://forum.freecad.org/viewforum.php?f=3">Ajude a usar a secção do FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Se é a primeira vez que você está postando no fórum, certifique-se de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">ler as diretrizes</a> primeiro! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + O FreeCAD também mantém um <a href="https://www.freecad.org/tracker">rastreador de bugs</a> público onde qualquer um pode enviar bugs e propor novos recursos. Para evitar causar trabalho extra e dar as melhores chances de ver seu bug resolvido, certifique-se de ler o <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guia de submissão de bugs</a> antes de postar. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Abaixo estão as últimas alterações adicionadas ao <a href="http://github.com/FreeCAD/FreeCAD/">código fonte do FreeCAD</a>. Estas alterações podem não refletir na versão do FreeCAD que você está atualmente em execução. Marque as <a href="https://www.freecad.org/wiki/Downloads">opções disponíveis</a> se você deseja obter uma versão de desenvolvimento. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + As últimas postagens no <a href="https://forum.freecad.org">fórum do FreeCAD</a>: + + + + Available addons + Extras disponíveis + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Abaixo está uma lista de bancadas extras disponíveis que podem ser adicionados à instalação do FreeCAD. Navegue e instale-as do menu ferramentas-> Gerenciador de extras. Você pode aprender mais sobre qualquer um deles clicando nos links abaixo. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Caso não tenha sido instalado com sua versão de FreeCAD, instale o pacote de documentação do FreeCAD para obter documentação de ajuda dos centros, das bancada de trabalho e documentação dos comando individuais sem estar ligado à internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Não é possível carregar informações do GitHub. <a href="EnableDownload.py">autorize o FreeCAD a aceder à internet</a> e recarregue a página inicial. + + + + Recent commits + Submissões recentes + + + + See all commits on github + Ver todos os commits no github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Podes configurar uma pasta costumizada para mostrar aqui no menu Edita r-> Preferências -> Começar-> Mostrar pasta adicional + + + + version + versão + + + + build + compilar + + + + Create new... + Criar novo... + + + + Unknown + Desconhecido + + + + Forum + Fórum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Para abrir qualquer um dos links acima no seu navegador, botão direito do mouse-> abrir no navegador externo + + + + Creation date + Data de criação + + + + Last modification + Última Modificação + + + + Notes + Notas + + + + Open start page preferences + Abrir preferências da página inicial + + + + Workbench + + + + Start page + Página inicial + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opções da Página Inicial - - - - Start page template - Modelo da Página Inicial - - - - An optional HTML template that will be used instead of the default start page. - Um modelo HTML opcional que será usado em vez da página inicial predefinida. - - - + Contents Conteúdos - - Show notepad - Mostrar o bloco de notas + + Show forum + Mostrar forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Mostra um bloco de notas junto às miniaturas de ficheiro, onde pode manter notas entre sessões - - - + Show examples folder contents Mostrar conteúdo da pasta de exemplos - - If you want the examples to show on the first page - Se quiser que os exemplos sejam mostrados na primeira página - - - + Show additional folder Mostrar pasta adicional - + + If you want the examples to show on the first page + Se quiser que os exemplos sejam mostrados na primeira página + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Se marcado, as últimas mensagens do fórum FreeCAD serão mostradas no separador Atividade + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Uma pasta personalizada opcional a ser exibida na parte inferior da primeira página. Usando ";;" para separar caminhos, podem ser adicionadas várias pastas aqui - - Show forum - Mostrar forum + + Show notepad + Mostrar o bloco de notas - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Se marcado, as últimas mensagens do fórum FreeCAD serão mostradas no separador Atividade + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Mostra um bloco de notas junto às miniaturas de ficheiro, onde pode manter notas entre sessões - + Show tips Mostrar dicas - + + General + Geral + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Exibe dicas de ajuda no separador Documentos da bancada Iniciar - - Show scrollbars - Mostrar barras de deslizamento + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Fontes e cores - - Use FreeCAD style sheet - Usar Folha de estilos do FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Se marcado e se uma folha de estilo for especificada nas preferências gerais, esta será usada e substituirá as cores abaixo - - - - Background color - Cor de Fundo - - - - The background color behind the panels - A cor de fundo atrás dos painéis - - - - Background color down gradient - Cor da base do gradiente do fundo - - - - The down gradient for the background color (currently unsupported) - O gradiente para baixo para a cor de fundo (atualmente sem suporte) - - - - Background image - Imagem de fundo - - - - An optional image to display as background - Uma imagem opcional a ser mostrada como plano de fundo - - - - Background text color - Cor do texto do fundo - - - - The color of the version text - A cor do texto da versão - - - - Page background color - Cor de fundo da página - - - + The background of the main start page area O fundo da página inicial principal - - Page text color - Cor do texto da página + + Background color + Cor de Fundo - - The color of the text on the main pages - A cor do texto nas páginas principais - - - - Box background color - Cor de fundo da caixa - - - - The background color of the boxes inside the pages - A cor de fundo das caixas dentro das páginas - - - - Link color - Cor do link - - - - The color of the links - A cor dos links - - - - Font family - Família de fonte - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - A família de fontes para usar na página inicial. Pode ser um nome de fonte ou uma série de fontes separada por vírgulas - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - O tamanho da fonte base para usar de todos os textos da página inicial - - - - px - px - - - - Open links - Abrir ligação - - - + in FreeCAD no FreeCAD - + In external browser No navegador externo - - Use gradient for New File icon - Usar gradiente para o ícone novo Ficheiro + + Background color down gradient + Cor da base do gradiente do fundo - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Se selecionado, o ícone 'Novo Ficheiro' mostra um ícone com gradiente em vez do ícone normal + + The color of the version text + A cor do texto da versão - + + Link color + Cor do link + + + + An optional image to display as background + Uma imagem opcional a ser mostrada como plano de fundo + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Se marcado e se uma folha de estilo for especificada nas preferências gerais, esta será usada e substituirá as cores abaixo + + + + Page background color + Cor de fundo da página + + + + The color of the text on the main pages + A cor do texto nas páginas principais + + + + Background image + Imagem de fundo + + + + Page text color + Cor do texto da página + + + + The color of the links + A cor dos links + + + + The background color of the boxes inside the pages + A cor de fundo das caixas dentro das páginas + + + + Box background color + Cor de fundo da caixa + + + + The background color behind the panels + A cor de fundo atrás dos painéis + + + + The down gradient for the background color (currently unsupported) + O gradiente para baixo para a cor de fundo (atualmente sem suporte) + + + + Open links + Abrir ligação + + + + Background text color + Cor do texto do fundo + + + + Use FreeCAD style sheet + Usar Folha de estilos do FreeCAD + + + + Font family + Família de fonte + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + A família de fontes para usar na página inicial. Pode ser um nome de fonte ou uma série de fontes separada por vírgulas + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + O tamanho da fonte base para usar de todos os textos da página inicial + + + + + px + px + + + Options Opções - - Switch workbench after loading - Mudar de Bancada após o carregamento - - - - Choose which workbench to switch to after the program launches - Escolha qual bancada abrir depois do programa iniciar - - - - Close start page after loading - Fechar página inicial após o carregamento - - - + If checked, will automatically close the Start page when FreeCAD launches Se marcado, fechará automaticamente a página inicial quando o FreeCAD iniciar - + + Switch workbench after loading + Mudar de Bancada após o carregamento + + + + Close start page after loading + Fechar página inicial após o carregamento + + + Close and switch on opening file Fechar e mudar para um ficheiro aberto - + If application is started by opening a file, apply the two settings above Se a aplicação é iniciada abrindo um ficheiro, aplicar as duas configurações acima - Workbench + DlgStartPreferencesAdvanced - - - Start page - Página inicial - - - - StartPage - - - Start - Começar + + Advanced + Avançado - - Documents - Documentos + + Custom HTML Template + Custom HTML Template - - Help - Ajuda + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Actividade + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Dica - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Ajustar o número de ficheiros recentes a ser mostrado aqui no menu Edit-> preferências-> geral-> tamanho da lista de ficheiros recentes - - - - Examples - Exemplos - - - - General documentation - Documentação geral - - - - User hub - Centro do Utilizador - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Esta secção contém documentação útil para utilizadores do FreeCAD em geral: uma lista de todas as bancadas de trabalho, instruções detalhadas sobre como instalar e usar o FreeCAD, tutoriais e tudo que precisa para começar. - - - - Power users hub - Centro do Utilizador avançado - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Esta secção reúne documentação para utilizadores avançados e pessoas interessadas em escrever scripts em python. Também irá lá encontrar um repositório de macros, instruções sobre como os instalar e usá-los e obter mais informações sobre como personalizar o FreeCAD às suas necessidades específicas. - - - - Developers hub - Centro de desenvolvedores - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Esta seção contém material para desenvolvedores: como compilar o FreeCAD você mesmo, como está estruturado o código-fonte FreeCAD + como navegar-lo, como desenvolver novas bancadas e/ou incorporar FreeCAD no seu próprio aplicativo. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Manual do FreeCAD é uma outra forma, mais uma forma linear, de apresentar as informações contidas nesta wiki. É feito para ser lido como um livro e irá apresentá-lo a muitas outras páginas dos hubs acima. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-livro versões</a> também estão disponíveis. - - - - Workbenches documentation - Documentação das bancadas de trabalho - - - - These are the help pages of all the workbenches currently installed on this computer. - Estas são as páginas de ajuda de todas as bancadas atualmente instaladas neste computador. - - - - Getting help from the community - Obter ajuda da Comunidade - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - O <a href="http://forum.freecad.org">fórum FreeCAD</a> é um ótimo lugar para obter ajuda de outros usuários e programadores do FreeCAD. O fórum tem muitas secções para diferentes tipos de questões e temas de discussão. Em caso de dúvida, poste no mais geral <a href="https://forum.freecad.org/viewforum.php?f=3">Ajude a usar a secção do FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Se é a primeira vez que você está postando no fórum, certifique-se de <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">ler as diretrizes</a> primeiro! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - O FreeCAD também mantém um <a href="https://www.freecad.org/tracker">rastreador de bugs</a> público onde qualquer um pode enviar bugs e propor novos recursos. Para evitar causar trabalho extra e dar as melhores chances de ver seu bug resolvido, certifique-se de ler o <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">guia de submissão de bugs</a> antes de postar. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Abaixo estão as últimas alterações adicionadas ao <a href="http://github.com/FreeCAD/FreeCAD/">código fonte do FreeCAD</a>. Estas alterações podem não refletir na versão do FreeCAD que você está atualmente em execução. Marque as <a href="https://www.freecad.org/wiki/Downloads">opções disponíveis</a> se você deseja obter uma versão de desenvolvimento. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - As últimas postagens no <a href="https://forum.freecad.org">fórum do FreeCAD</a>: - - - - Available addons - Extras disponíveis - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Abaixo está uma lista de bancadas extras disponíveis que podem ser adicionados à instalação do FreeCAD. Navegue e instale-as do menu ferramentas-> Gerenciador de extras. Você pode aprender mais sobre qualquer um deles clicando nos links abaixo. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Caso não tenha sido instalado com sua versão de FreeCAD, instale o pacote de documentação do FreeCAD para obter documentação de ajuda dos centros, das bancada de trabalho e documentação dos comando individuais sem estar ligado à internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Não é possível carregar informações do GitHub. <a href="EnableDownload.py">autorize o FreeCAD a aceder à internet</a> e recarregue a página inicial. - - - - Recent commits - Submissões recentes - - - - See all commits on github - Ver todos os commits no github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Podes configurar uma pasta costumizada para mostrar aqui no menu Edita r-> Preferências -> Começar-> Mostrar pasta adicional - - - - version - versão - - - - build - compilar - - - - Create new... - Criar novo... - - - - Unknown - Desconhecido - - - - Forum - Fórum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Para abrir qualquer um dos links acima no seu navegador, botão direito do mouse-> abrir no navegador externo - - - - Creation date - Data de criação - - - - Last modification - Última Modificação - - - - Notes - Notas - - - - Open start page preferences - Abrir preferências da página inicial + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Começar diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ro.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ro.ts index be958459ad..9e84e3746c 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ro.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ro.ts @@ -1,6 +1,299 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Documente + + + + Help + Ajutor + + + + Activity + Activitate + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Sfat + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Ajustaţi numărul de fişiere recente pentru a fi prezentate aici, în meniul Editare-> Preferinţe-> General-> dimensiunea din lista de fişiere recente + + + + Examples + Exemple + + + + General documentation + Documentaţie generală + + + + User hub + Hub-ul de utilizator + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Aceasta sectiune contine documente utile pentru utilizatorii FreeCAD în general: o listă a tuturor bancuri de lucru, instrucţiuni detaliate despre cum să instalaţi şi să utilizaţi aplicaţia FreeCAD, Tutoriale, si tot ce ai nevoie pentru a începe. + + + + Power users hub + Hub de utilizatori cu experiență + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Această secţiune adună documentaţia pentru utilizatorii avansaţi şi persoane interesate în scris python script-uri. Veţi găsi acolo un depozit de macrocomenzi, instrucţiuni despre cum să instalaţi şi să folosiți și mai multe informații despre particularizarea FreeCAD nevoilor dumneavoastră specifice. + + + + Developers hub + Hub Dezvoltatori + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Aceasta sectiune contine material pentru dezvoltatori: cum să compilaţi dvs FreeCAD, cum este structurat codul sursă FreeCAD şi cum să navigaţi în el, şi cum să dezvolte noi ateliere și/sau să încorporați FreeCAD în aplicaţia proprie. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Manualul FreeCAD este un alt, mod liniar mai să prezinte informaţiile conţinute în acest wiki. Acesta este facut pentru a fi citit ca o carte şi uşor vă va prezenta mai multe alte pagini de hub-uri de mai sus. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-carte versiunile</a> sunt de asemenea disponibile. + + + + Workbenches documentation + Documentaţia Atelierelor + + + + These are the help pages of all the workbenches currently installed on this computer. + Acestea sunt paginile de ajutor din toate atelierele instalate în prezent pe acest computer. + + + + Getting help from the community + Obţinerea ajutorului din partea Comunității + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + Adaosuri Disponibile + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Mai jos este o listă de ateliere suplimentare disponibile, care pot fi adăugate la instalarea FreeCAD. Răsfoiţi şi instalaţi-le din meniul Tools-> Addons manager. Puteţi afla mai multe despre oricare dintre ele făcând clic pe linkurile de mai jos. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Dacă nu este furnizat versiunea dvs. de FreeCAD, instalați pachetul de documentație FreeCAD pentru a obține hub-rile +de documentare, help pentru atelier și documentarea comenzilor individuale fără o conexiune la internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Imposibil de recuperat informații de la GitHub. <a href="EnableDownload.py"> permiteți accesului FreeCAD pe internet </a> și reîncărcați pagina de pornire. + + + + Recent commits + Cele mai recente commits + + + + See all commits on github + A se vedea toate commits pe github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Puteți configura afișarea unui dosar personalizat aici pentru afișare în meniul Edit-> Preferences-> Start-> Folder personalizat + + + + version + versiunea + + + + build + compilare + + + + Create new... + Creează nou... + + + + Unknown + Necunoscut + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Pentru a deschide una dintre legăturile de mai sus în browserul dvs., faceți clic dreapta -> deschideți într-un browser extern + + + + Creation date + Creat la data + + + + Last modification + Ultima modificare + + + + Notes + Note + + + + Open start page preferences + Deschide preferințele paginii de start + + + + Workbench + + + + Start page + Pagină principală + + CmdStartPage @@ -22,490 +315,287 @@ DlgStartPreferences - - Start page options - Opţiuni de pagină de start - - - - Start page template - Şablon de pagină Start - - - - An optional HTML template that will be used instead of the default start page. - Un şablon HTML opţional care va fi utilizat în loc de pagina de pornire implicită. - - - + Contents Conţinutul - - Show notepad - Afișează notepad + + Show forum + Afișați forumul - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Prezinta un notepad lângă miniaturile de fişier, în cazul în care puteţi să vă păstraţi notițe în timpul sesiunilor FreeCAD - - - + Show examples folder contents Afișați conținutul folderului cu exemple - - If you want the examples to show on the first page - Daca doriți exemple pentru a arăta pe prima pagină - - - + Show additional folder Afișați folderul suplimentar - + + If you want the examples to show on the first page + Daca doriți exemple pentru a arăta pe prima pagină + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + În cazul în care această casetă este bifată, cele mai recente postări din FreeCAD forum vor fi afişate în fila de activitate + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Un dosar personalizat opțional care va fi afișat în partea de jos a primei pagini. Folosind ";;" pentru a separa căi, poți adăuga mai multe dosare aici - - Show forum - Afișați forumul + + Show notepad + Afișează notepad - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - În cazul în care această casetă este bifată, cele mai recente postări din FreeCAD forum vor fi afişate în fila de activitate + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Prezinta un notepad lângă miniaturile de fişier, în cazul în care puteţi să vă păstraţi notițe în timpul sesiunilor FreeCAD - + Show tips Afișează sfaturi - + + General + General + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Afişează sfaturi de ajutor în fila Documente a Atelierului Start - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Fonturi si culori - - Use FreeCAD style sheet - Utilizați o pagină cu stilul FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - În cazul în care această casetă este bifată, dacă o foaie de stil este specificată în Preferinţe generale, acesta va fi folosită şi va înlocui culorile de mai jos - - - - Background color - Culoarea de fundal - - - - The background color behind the panels - Culoarea de fundal în spatele panourilor - - - - Background color down gradient - Culoare fundal gradient în jos - - - - The down gradient for the background color (currently unsupported) - Gradient/degrade-ul în jos pentru culoarea de fundal (în prezent neacceptată) - - - - Background image - Imagine de fundal - - - - An optional image to display as background - O imagine opţională pentru a fi afişată ca fundal - - - - Background text color - Culoarea de fundal a textului - - - - The color of the version text - Culoarea textului versiunii curente - - - - Page background color - Culoarea de fundal a paginii - - - + The background of the main start page area Fundalul zonei principale a paginii de start - - Page text color - Culoarea textului + + Background color + Culoarea de fundal - - The color of the text on the main pages - Culoarea textului pe paginile principale - - - - Box background color - Culoarea de fundal a casetei - - - - The background color of the boxes inside the pages - Culoarea de fundal a casetelor în interiorul paginilor - - - - Link color - Link-ul de culoare - - - - The color of the links - Culoarea de link-uri - - - - Font family - Familia de fonturi - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Familia de fonturi pe care să o utilizați în pagina de start/principală. Poate fi un nume de font sau o serie de fonturi alternative separate prin virgule - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Dimensiunea fontului de bază pe care să o utilizați pentru toate textele de pe pagina de start/principală - - - - px - px - - - - Open links - A deschide Link-uri - - - + in FreeCAD în FreeCAD - + In external browser În browser-ul extern - - Use gradient for New File icon - Utilizați un degradeu pentru iconița noului fișier + + Background color down gradient + Culoare fundal gradient în jos - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Dacă acest lucru este selectat, pictograma 'Fișier nou' afișează o pictogramă de gradient în loc de pictograma normală + + The color of the version text + Culoarea textului versiunii curente - + + Link color + Link-ul de culoare + + + + An optional image to display as background + O imagine opţională pentru a fi afişată ca fundal + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + În cazul în care această casetă este bifată, dacă o foaie de stil este specificată în Preferinţe generale, acesta va fi folosită şi va înlocui culorile de mai jos + + + + Page background color + Culoarea de fundal a paginii + + + + The color of the text on the main pages + Culoarea textului pe paginile principale + + + + Background image + Imagine de fundal + + + + Page text color + Culoarea textului + + + + The color of the links + Culoarea de link-uri + + + + The background color of the boxes inside the pages + Culoarea de fundal a casetelor în interiorul paginilor + + + + Box background color + Culoarea de fundal a casetei + + + + The background color behind the panels + Culoarea de fundal în spatele panourilor + + + + The down gradient for the background color (currently unsupported) + Gradient/degrade-ul în jos pentru culoarea de fundal (în prezent neacceptată) + + + + Open links + A deschide Link-uri + + + + Background text color + Culoarea de fundal a textului + + + + Use FreeCAD style sheet + Utilizați o pagină cu stilul FreeCAD + + + + Font family + Familia de fonturi + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Familia de fonturi pe care să o utilizați în pagina de start/principală. Poate fi un nume de font sau o serie de fonturi alternative separate prin virgule + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Dimensiunea fontului de bază pe care să o utilizați pentru toate textele de pe pagina de start/principală + + + + + px + px + + + Options Opţiuni - - Switch workbench after loading - Comutați către Atelier după încărcare - - - - Choose which workbench to switch to after the program launches - Alegeți la care bancă de lucru să comutați după lansarea programului - - - - Close start page after loading - Închideți pagina de start după încărcare - - - + If checked, will automatically close the Start page when FreeCAD launches Daca este bifat, va inchide automat pagina de start la lansarea FreeCAD - + + Switch workbench after loading + Comutați către Atelier după încărcare + + + + Close start page after loading + Închideți pagina de start după încărcare + + + Close and switch on opening file Închide și comută la deschiderea fișierului - + If application is started by opening a file, apply the two settings above Dacă FreeCAD este pornit prin deschiderea unui fișier, aplicați cei doi parametri de mai sus - Workbench + DlgStartPreferencesAdvanced - - - Start page - Pagină principală - - - - StartPage - - - Start - Start + + Advanced + Advanced - - Documents - Documente + + Custom HTML Template + Custom HTML Template - - Help - Ajutor + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Activitate + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Sfat - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Ajustaţi numărul de fişiere recente pentru a fi prezentate aici, în meniul Editare-> Preferinţe-> General-> dimensiunea din lista de fişiere recente - - - - Examples - Exemple - - - - General documentation - Documentaţie generală - - - - User hub - Hub-ul de utilizator - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Aceasta sectiune contine documente utile pentru utilizatorii FreeCAD în general: o listă a tuturor bancuri de lucru, instrucţiuni detaliate despre cum să instalaţi şi să utilizaţi aplicaţia FreeCAD, Tutoriale, si tot ce ai nevoie pentru a începe. - - - - Power users hub - Hub de utilizatori cu experiență - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Această secţiune adună documentaţia pentru utilizatorii avansaţi şi persoane interesate în scris python script-uri. Veţi găsi acolo un depozit de macrocomenzi, instrucţiuni despre cum să instalaţi şi să folosiți și mai multe informații despre particularizarea FreeCAD nevoilor dumneavoastră specifice. - - - - Developers hub - Hub Dezvoltatori - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Aceasta sectiune contine material pentru dezvoltatori: cum să compilaţi dvs FreeCAD, cum este structurat codul sursă FreeCAD şi cum să navigaţi în el, şi cum să dezvolte noi ateliere și/sau să încorporați FreeCAD în aplicaţia proprie. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Manualul FreeCAD este un alt, mod liniar mai să prezinte informaţiile conţinute în acest wiki. Acesta este facut pentru a fi citit ca o carte şi uşor vă va prezenta mai multe alte pagini de hub-uri de mai sus. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-carte versiunile</a> sunt de asemenea disponibile. - - - - Workbenches documentation - Documentaţia Atelierelor - - - - These are the help pages of all the workbenches currently installed on this computer. - Acestea sunt paginile de ajutor din toate atelierele instalate în prezent pe acest computer. - - - - Getting help from the community - Obţinerea ajutorului din partea Comunității - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - Adaosuri Disponibile - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Mai jos este o listă de ateliere suplimentare disponibile, care pot fi adăugate la instalarea FreeCAD. Răsfoiţi şi instalaţi-le din meniul Tools-> Addons manager. Puteţi afla mai multe despre oricare dintre ele făcând clic pe linkurile de mai jos. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Dacă nu este furnizat versiunea dvs. de FreeCAD, instalați pachetul de documentație FreeCAD pentru a obține hub-rile -de documentare, help pentru atelier și documentarea comenzilor individuale fără o conexiune la internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Imposibil de recuperat informații de la GitHub. <a href="EnableDownload.py"> permiteți accesului FreeCAD pe internet </a> și reîncărcați pagina de pornire. - - - - Recent commits - Cele mai recente commits - - - - See all commits on github - A se vedea toate commits pe github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Puteți configura afișarea unui dosar personalizat aici pentru afișare în meniul Edit-> Preferences-> Start-> Folder personalizat - - - - version - versiunea - - - - build - compilare - - - - Create new... - Creează nou... - - - - Unknown - Necunoscut - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Pentru a deschide una dintre legăturile de mai sus în browserul dvs., faceți clic dreapta -> deschideți într-un browser extern - - - - Creation date - Creat la data - - - - Last modification - Ultima modificare - - - - Notes - Note - - - - Open start page preferences - Deschide preferințele paginii de start + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Start diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_ru.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_ru.ts index 5fd9679322..6591c23ae2 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_ru.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_ru.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Начало + + + + Welcome to FreeCAD + Добро пожаловать в FreeCAD + + + + Documents + Документы + + + + Help + Помощь + + + + Activity + Активность + + + + Blog + Блог + + + + Link to the FreeCAD blog + Ссылка на блог FreeCAD + + + + New file + Создать файл + + + + Empty File + Пустой файл + + + + Create an empty FreeCAD file + Создать пустой файл FreeCAD + + + + Open File + Открыть файл + + + + Open an existing CAD file or 3D model + Открыть существующий CAD файл или 3D модель + + + + Standard Part + Стандартная деталь + + + + Create a part with the Part Design workbench + Создать деталь на верстаке для проектирования деталей + + + + 2D Draft + 2D эскиз + + + + Create a 2D draft with the Draft workbench + Создать 2D эскиз на верстаке эскизов + + + + BIM/Architecture + BIM/Архитектура + + + + Create an architecture project + Создать архитектурный проект + + + + Recent files + Недавние файлы + + + + Tip + Совет + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Отрегулировать количество последних файлов, отображаемых здесь, можно в меню Правка -> Настройки -> Общие -> Размер списка последних файлов + + + + Examples + Примеры + + + + General documentation + Основная документация + + + + User hub + Пользовательский центр + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Этот раздел содержит полезную для пользователей FreeCAD справочную документацию: список всех верстаков, подробные инструкции о том, как установить и использовать приложение FreeCAD, учебники и всё, что Вам нужно для начала. + + + + Power users hub + Центр опытных пользователей + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + В этом разделе собрана документация для продвинутых пользователей и людей, заинтересованных в написании python скриптов. Вы также найдете тут репозиторий макросов, инструкции о том, как установить и использовать их и дополнительные сведения о настройке FreeCAD для ваших конкретных потребностей. + + + + Developers hub + Центр разработчиков + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Этот раздел содержит материалы для разработчиков: как скомпилировать FreeCAD самому, как структурирован исходный код FreeCAD + как ориентироваться в нём и как разрабатывать новые верстаки, и/или встраивать FreeCAD в собственные приложения. + + + + Manual + Руководство + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Руководство пользователя FreeCAD - это еще один, более последовательный способ представления информации, содержащейся в этой вики. Оно составлено для чтения, как книга, и будет постепенно знакомить вас со многими другими страницами из центров выше. Также доступна <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> электронная версия книги </a>. + + + + Workbenches documentation + Документация верстаков + + + + These are the help pages of all the workbenches currently installed on this computer. + Это страницы справки для всех верстаков, установленных сейчас на этом компьютере. + + + + Getting help from the community + Получение помощи от сообщества + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">Форум FreeCAD</a> - это отличное место для получения помощи от других пользователей и разработчиков FreeCAD. Форум имеет много разделов для различных видов вопросов и обсуждений. Если не нашли необходимую информацию, воспользуйтесь <a href="https://forum.freecad.org/viewforum.php?f=3">Справкой по использованию FreeCAD</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Если это ваша первая публикация на форуме, сначала ознакомьтесь с <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">правилами публикаций!</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD также предоставляет публичный <a href="https://www.freecad.org/tracker">трэкер ошибок</a>, где любой может сообщить об ошибке и предложить новые функции. Для избежания лишней работы и ускорения решения замеченной вами ошибки, перед отаправкой ознакомьтесь с <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">руководством по отправке сообщений об ошибках</a>. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Ниже приведены последние изменения, добавленные в <a href="http://github.com/FreeCAD/FreeCAD/">Исходный код FreeCAD</a>. Они могут быть еще не отражены в версии FreeCAD, которую вы используете в данный момент. Проверьте <a href="https://www.freecad.org/wiki/Downloads">доступные для загрузки варианты</a> если вы хотите получить версию для разработки. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Последние сообщения на <a href="https://forum.freecad.org">форуме FreeCAD </a>: + + + + Available addons + Доступные расширения + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Ниже перечислен список доступных дополнительных верстаков, которые могут быть добавлены в Ваш FreeCAD. Просматривайте и устанавливайте их из меню Инструменты -> Менеджер дополнений. Вы можете узнать больше о любом из них, нажав на ссылки ниже. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Если в комплекте с вашей версией FreeCAD нет документации, установите пакет документации FreeCAD, чтобы получить уголки пользователей, руководства пользователя по верстакам и документацию по отдельным командам без подключения к Интернету. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Не удалось получить информацию из GitHub. <a href="EnableDownload.py">Предоставьте для FreeCAD доступ в Интернет</a> и перезагрузите стартовую страницу. + + + + Recent commits + Последние коммиты + + + + See all commits on github + Просмотреть все коммиты на github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Можно настроить пользовательскую папку для отображения здесь в меню Правка -> Настройки -> Start -> Показать дополнительную папку + + + + version + версия + + + + build + сборка + + + + Create new... + Создать новый... + + + + Unknown + Неизвестно + + + + Forum + Форум + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Чтобы открыть любую из этих ссылок в вашем интернет браузере, щелкните правой кнопкой мыши -> Открыть во внешнем браузере + + + + Creation date + Дата создания + + + + Last modification + Последнее изменение + + + + Notes + Заметки + + + + Open start page preferences + Открыть настройки стартовой страницы + + + + Workbench + + + + Start page + Стартовая страница + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Настройки стартовой страницы - - - - Start page template - Шаблон стартовой страницы - - - - An optional HTML template that will be used instead of the default start page. - Дополнительный HTML-шаблон, который будет использоваться вместо начальной страницы по умолчанию. - - - + Contents Содержание - - Show notepad - Показать блокнот + + Show forum + Показать форум - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Показывает блокнот рядом с эскизами файлов, где Вы можете хранить заметки между сессиями FreeCAD - - - + Show examples folder contents Показать содержимое папки примеров - - If you want the examples to show on the first page - Если вы хотите, чтобы примеры показывались на первой странице - - - + Show additional folder Показать дополнительную папку - + + If you want the examples to show on the first page + Если вы хотите, чтобы примеры показывались на первой странице + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Если этот флажок установлен, последние сообщения с форума FreeCAD будет отображаться на вкладке активности + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Дополнительная папка пользователя для отображения в нижней части первой страницы. Используя ";;" для разделения путей, Вы можете добавить несколько папок здесь - - Show forum - Показать форум + + Show notepad + Показать блокнот - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Если этот флажок установлен, последние сообщения с форума FreeCAD будет отображаться на вкладке активности + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Показывает блокнот рядом с эскизами файлов, где Вы можете хранить заметки между сессиями FreeCAD - + Show tips Показать советы - + + General + Основные + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Верстак для переключения после загрузки файла со стартовой страницы, используется только если старт - верстак запуска + + + + The size of file thumbnail icons in recent files and examples sections + Размер значков файлов в последних файлах и разделах примеров + + + Displays help tips in the Start workbench Documents tab Отображает подсказки на верстаке Пуск вкладки Документов - - Show scrollbars - Показать полосы прокрутки + + File thumbnail size + Размер значка файла - + + Show file thumbnails + Показать значки файлов + + + Fonts and colors Шрифты и цвета - - Use FreeCAD style sheet - Использование стилей FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Если этот флажок установлен и в стиле указаны общие предпочтения, он будет использоваться и переопределит цвета ниже - - - - Background color - Цвет фона - - - - The background color behind the panels - Цвет фона позади панелей - - - - Background color down gradient - Цвет нижнего градиента фона - - - - The down gradient for the background color (currently unsupported) - Нижний градиент цвета фона (в настоящее время не поддерживается) - - - - Background image - Фоновое изображение - - - - An optional image to display as background - Необязательное изображение для отображения в виде фона - - - - Background text color - Фоновый цвет текста - - - - The color of the version text - Цвет текста версии - - - - Page background color - Цвет фона страницы - - - + The background of the main start page area Фон главной стартовой страницы - - Page text color - Цвет текста на странице + + Background color + Цвет фона - - The color of the text on the main pages - Цвет текста на главных страницах - - - - Box background color - Цвет фона поля - - - - The background color of the boxes inside the pages - Цвет фона поля внутри страниц - - - - Link color - Цвет ссылок - - - - The color of the links - Цвет ссылок - - - - Font family - Семейство шрифтов - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Семейство шрифтов, используемых на стартовой странице. Может быть имя шрифта или разделённый запятыми список запасных шрифтов - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Базовый размер шрифта для всего текста стартовой страницы - - - - px - пикс. - - - - Open links - Открыть ссылки - - - + in FreeCAD во FreeCAD - + In external browser Во внешнем браузере - - Use gradient for New File icon - Использовать градиент для нового значка файла + + Background color down gradient + Цвет нижнего градиента фона - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Если данная опция выбрана, окно кнопки 'Создать новый...' будет отображаться градиентом вместо однотонного отображения + + The color of the version text + Цвет текста версии - + + Link color + Цвет ссылок + + + + An optional image to display as background + Необязательное изображение для отображения в виде фона + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Если этот флажок установлен и в стиле указаны общие предпочтения, он будет использоваться и переопределит цвета ниже + + + + Page background color + Цвет фона страницы + + + + The color of the text on the main pages + Цвет текста на главных страницах + + + + Background image + Фоновое изображение + + + + Page text color + Цвет текста на странице + + + + The color of the links + Цвет ссылок + + + + The background color of the boxes inside the pages + Цвет фона поля внутри страниц + + + + Box background color + Цвет фона поля + + + + The background color behind the panels + Цвет фона позади панелей + + + + The down gradient for the background color (currently unsupported) + Нижний градиент цвета фона (в настоящее время не поддерживается) + + + + Open links + Открыть ссылки + + + + Background text color + Фоновый цвет текста + + + + Use FreeCAD style sheet + Использование стилей FreeCAD + + + + Font family + Семейство шрифтов + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Семейство шрифтов, используемых на стартовой странице. Может быть имя шрифта или разделённый запятыми список запасных шрифтов + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Базовый размер шрифта для всего текста стартовой страницы + + + + + px + пикс. + + + Options Параметры - - Switch workbench after loading - Переключить верстак после загрузки - - - - Choose which workbench to switch to after the program launches - Выберите, на какой верстак переключиться после запуска программы - - - - Close start page after loading - Закрыть стартовую страницу после загрузки - - - + If checked, will automatically close the Start page when FreeCAD launches Если этот флажок установлен, стартовая страница будет автоматически закрыта при запуске FreeCAD - + + Switch workbench after loading + Переключить верстак после загрузки + + + + Close start page after loading + Закрыть стартовую страницу после загрузки + + + Close and switch on opening file Закрыть и переключиться на открытие файла - + If application is started by opening a file, apply the two settings above Если приложение запускается с открытым файлом, примените два приведенных выше параметра - Workbench + DlgStartPreferencesAdvanced - - - Start page - Стартовая страница - - - - StartPage - - - Start - Начало + + Advanced + Дополнительно - - Documents - Документы + + Custom HTML Template + Пользовательский HTML шаблон - - Help - Помощь + + An optional HTML template that will be used instead of the default start page. + Дополнительный HTML-шаблон, который будет использоваться вместо начальной страницы по умолчанию. - - Activity - Активность + + Custom CSS + Пользовательские CSS - - Recent files - Недавние файлы - - - - Tip - Совет - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Отрегулировать количество последних файлов, отображаемых здесь, можно в меню Правка -> Настройки -> Общие -> Размер списка последних файлов - - - - Examples - Примеры - - - - General documentation - Основная документация - - - - User hub - Пользовательский центр - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Этот раздел содержит полезную для пользователей FreeCAD справочную документацию: список всех верстаков, подробные инструкции о том, как установить и использовать приложение FreeCAD, учебники и всё, что Вам нужно для начала. - - - - Power users hub - Центр опытных пользователей - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - В этом разделе собрана документация для продвинутых пользователей и людей, заинтересованных в написании python скриптов. Вы также найдете тут репозиторий макросов, инструкции о том, как установить и использовать их и дополнительные сведения о настройке FreeCAD для ваших конкретных потребностей. - - - - Developers hub - Центр разработчиков - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Этот раздел содержит материалы для разработчиков: как скомпилировать FreeCAD самому, как структурирован исходный код FreeCAD + как ориентироваться в нём и как разрабатывать новые верстаки, и/или встраивать FreeCAD в собственные приложения. - - - - Manual - Руководство - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Руководство пользователя FreeCAD - это еще один, более последовательный способ представления информации, содержащейся в этой вики. Оно составлено для чтения, как книга, и будет постепенно знакомить вас со многими другими страницами из центров выше. Также доступна <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> электронная версия книги </a>. - - - - Workbenches documentation - Документация верстаков - - - - These are the help pages of all the workbenches currently installed on this computer. - Это страницы справки для всех верстаков, установленных сейчас на этом компьютере. - - - - Getting help from the community - Получение помощи от сообщества - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">Форум FreeCAD</a> - это отличное место для получения помощи от других пользователей и разработчиков FreeCAD. Форум имеет много разделов для различных видов вопросов и обсуждений. Если не нашли необходимую информацию, воспользуйтесь <a href="https://forum.freecad.org/viewforum.php?f=3">Справкой по использованию FreeCAD</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Если это ваша первая публикация на форуме, сначала ознакомьтесь с <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">правилами публикаций!</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD также предоставляет публичный <a href="https://www.freecad.org/tracker">трэкер ошибок</a>, где любой может сообщить об ошибке и предложить новые функции. Для избежания лишней работы и ускорения решения замеченной вами ошибки, перед отаправкой ознакомьтесь с <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">руководством по отправке сообщений об ошибках</a>. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Ниже приведены последние изменения, добавленные в <a href="http://github.com/FreeCAD/FreeCAD/">Исходный код FreeCAD</a>. Они могут быть еще не отражены в версии FreeCAD, которую вы используете в данный момент. Проверьте <a href="https://www.freecad.org/wiki/Downloads">доступные для загрузки варианты</a> если вы хотите получить версию для разработки. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Последние сообщения на <a href="https://forum.freecad.org">форуме FreeCAD </a>: - - - - Available addons - Доступные расширения - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Ниже перечислен список доступных дополнительных верстаков, которые могут быть добавлены в Ваш FreeCAD. Просматривайте и устанавливайте их из меню Инструменты -> Менеджер дополнений. Вы можете узнать больше о любом из них, нажав на ссылки ниже. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Если в комплекте с вашей версией FreeCAD нет документации, установите пакет документации FreeCAD, чтобы получить уголки пользователей, руководства пользователя по верстакам и документацию по отдельным командам без подключения к Интернету. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Не удалось получить информацию из GitHub. <a href="EnableDownload.py">Предоставьте для FreeCAD доступ в Интернет</a> и перезагрузите стартовую страницу. - - - - Recent commits - Последние коммиты - - - - See all commits on github - Просмотреть все коммиты на github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Можно настроить пользовательскую папку для отображения здесь в меню Правка -> Настройки -> Start -> Показать дополнительную папку - - - - version - версия - - - - build - сборка - - - - Create new... - Создать новый... - - - - Unknown - Неизвестно - - - - Forum - Форум - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Чтобы открыть любую из этих ссылок в вашем интернет браузере, щелкните правой кнопкой мыши -> Открыть во внешнем браузере - - - - Creation date - Дата создания - - - - Last modification - Последнее изменение - - - - Notes - Заметки - - - - Open start page preferences - Открыть настройки стартовой страницы + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Вы можете вставить сюда свой собственный CSS, и стартовая страница применит его за вас. Чтобы узнать больше о том, как оформить стартовую страницу, ознакомьтесь с исходными кодами HTML и CSS:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/ src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: подчеркивание; цвет:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod /Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/ StartPage/StartPage.css"><span style=" text-decoration: подчеркивание; цвет:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Запуск diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_sl.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_sl.ts index cf3268f0f2..fad2e98f8a 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_sl.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_sl.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Začni + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Dokumenti + + + + Help + Pomoč + + + + Activity + Aktivnost + + + + Blog + Spletnik + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Nasvet + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Število tukaj prikazanih nedavnih datotek lahko prilagodite v meniju Uredi -> Prednastavitve -> Splošne nastavitve -> Velikost seznama nedavnih datotek + + + + Examples + Primeri + + + + General documentation + Splošna dokumentacija + + + + User hub + Uporabniško središče + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Ta oddelek vsebuje dokumentacijo, ki je v splošnem koristna za uporabnike programa FreeCAD: seznam vseh delovnih okolij, podrobnejša navodila za namestitev in uporabo programa FreeCAD, učne vaje in vse, kar potrebujete za začetek. + + + + Power users hub + Središče za napredne uporabnike + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Ta oddelek zbira dokumentacijo za napredne uporabnike in tiste, ki se zanimajo za pisanje python skript. Našli boste tudi skladišče makrov, navodila za njihovo namestitev in uporabo ter več informacij o prilagajanju programa FreeCAD vašim specifičnim potrebam. + + + + Developers hub + Središče za razvijalce + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Ta oddelek vsebuje vsebino za razvijalce: Kako sami zgradite FreeCAD, kako je strukturirana FreeCAD izvorna koda + kako krmariti po njej ter kako razviti novo delovno okolje in/, ali vgraditi FreeCAD v vašo aplikacijo. + + + + Manual + Priročnik + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD priročnik je še en, bolj premočrten način predstavitve informacij iz te "wiki" strani. Pripravljen je kot knjiga in vam bo predstavil številne druge strani oddelkov zgoraj. Na voljo so tudi <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-knjiga različice</a>. + + + + Workbenches documentation + Dokumentacija delovnih okolij + + + + These are the help pages of all the workbenches currently installed on this computer. + To so strani za pomoč vseh delovnih okolij, ki so trenutno nameščeni na tem računalniku. + + + + Getting help from the community + Pridobi pomoč od skupnosti + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">FreeCADov forum</a> je odlično mesto, kjer lahko dobite pomoč drugih FreeCADovih uporabnikov in razvijalcev. Forum ima veliko odsekov, namenjenih različnim vrstam težav in temam razprave. Če ste v dvomih, objavite v bolj splošen odsek <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoč pri uporabi FreeCADa</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Če prvič objavljate na forumu, najprej <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">preberite smernice</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD upravlja tudi z javnim <a href="https://www.freecad.org/tracker">sledilnikom hroščev</a>, kjer lahko vsak objavi ugotovljene napake in predlaga nove zmožnosti. V izognitev odvečnemu delu in za povečanje možnosti, da bo napaka odpravljena, pred objavljanjem preberite <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">vodič prijave hrošča</a>. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Spodaj so zadnje spremembe na <a href="http://github.com/FreeCAD/FreeCAD/">FreeCADovi izvorni kodi</a>. Te spremembe lahko še niso vključene v različici FreeCADa, ki jo trenutno uporabljate. Preverite <a href="https://www.freecad.org/wiki/Downloads">razpoložljive možnosti</a>, če želite pridobiti razvojno različico. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Zadnje objave na <a href="https://forum.freecad.org">FreeCADovem forumu</a>: + + + + Available addons + Razpoložljivi dodatki + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Spodaj je seznam razpoložljivih delovnih okolij, ki so lahko dodane FreeCAD namestitvi. Poiščite in namestite jih z menija Orodja -> Upravljalnik dodatkov. Več lahko izveste o katerem koli s klikom na spodnje povezave. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Če ni priložena vaši FreeCAD različici, namestite paket FreeCAD dokumentacije, s katerim dobite zvezdišča dokumentacije, pomoč o delovnih okoljih in dokumentacijo o posameznih ukazih, vse brez spletne povezave. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Prinašanje podatkov s strani GitHub ni mogoče. <a href="EnableDownload.py">Omogoči FreeCAD-u dostop do interneta</a> in znova naloži začetno stran. + + + + Recent commits + Nedavni prispevki + + + + See all commits on github + Poglej vse prispevke na githubu + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Mapo po meri, ki bo prikazana tukaj, lahko nastavite v meniju Uredi -> Prednastavitve -> Začetek -> Prikaži dodatno mapo + + + + version + različica + + + + build + zgradi + + + + Create new... + Ustvari novo... + + + + Unknown + Neznano + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Za odpretje katerekoli od zgornjih povezav v vašem brskalniku, Desni-klik -> Odpri v zunanjem brskalniku + + + + Creation date + Datum nastanka + + + + Last modification + Zadnje spremembe + + + + Notes + Opombe + + + + Open start page preferences + Odpri prednastavitve začetne strani + + + + Workbench + + + + Start page + Začetna stran + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Nastavitve začetne strani - - - - Start page template - Predloga začetne strani - - - - An optional HTML template that will be used instead of the default start page. - Neobvezna HTML predloga, ki bo uporabljena namesto privzete začetne strani. - - - + Contents Vsebina - - Show notepad - Prikaži beležnico + + Show forum + Prikaži forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Prikaže beležko poleg sličic datoteke, kjer lahko med sejo hraniš zapiske - - - + Show examples folder contents Prikaži vsebino mape s primeri - - If you want the examples to show on the first page - Če želiš primere prikazane na prvi strani - - - + Show additional folder Prikaži dodatno mapo - + + If you want the examples to show on the first page + Če želiš primere prikazane na prvi strani + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Če je označno, bodo zadnje objave s FreeCAD foruma prikazane v zavihku dogajanja + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Mapa po meri, ki se lahko prikaže na dnu prve strani. Z ločevanjem poti z znaki ";;", lahko dodate več map - - Show forum - Prikaži forum + + Show notepad + Prikaži beležnico - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Če je označno, bodo zadnje objave s FreeCAD foruma prikazane v zavihku dogajanja + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Prikaže beležko poleg sličic datoteke, kjer lahko med sejo hraniš zapiske - + Show tips Prikaži namige - + + General + Splošne nastavitve + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Prikaže nasvete v zavihku Dokumenti, znotraj Začetnega okna - - Show scrollbars - Prikaži drsnike + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Pisave in barve - - Use FreeCAD style sheet - Uporabi FreeeCAD seznam slogov - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Če je to označeno in je seznam slogov določen v Splošnih prednastavitvah, bo ta uporabljen in bo povozil barve spodaj - - - - Background color - Barva ozadja - - - - The background color behind the panels - Barva ozadja za zavihki - - - - Background color down gradient - Barvni preliv ozadja - - - - The down gradient for the background color (currently unsupported) - Gradient navzdol za barvo ozadja (trenutno nepodprt) - - - - Background image - Slika ozadja - - - - An optional image to display as background - Neobvezna slika za prikaz kot ozadje - - - - Background text color - Barva ozadja besedila - - - - The color of the version text - Barva besedila različice programa - - - - Page background color - Barva ozadja strani - - - + The background of the main start page area Ozadje glavnega področja začetne strani - - Page text color - Barva besedila strani + + Background color + Barva ozadja - - The color of the text on the main pages - Barva besedila prve strani - - - - Box background color - Barva ozadja okvirja - - - - The background color of the boxes inside the pages - Barva ozadja okvirjev znotraj strani - - - - Link color - Barva povezave - - - - The color of the links - Barva povezav - - - - Font family - Družina pisav - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Družina pisave uporabljena na začetni strani. Lahko je ime pisave ali niz z vejico ločenih nadomestnih pisav - - - - Arial,Helvetica,sans - Arial, Helvetica, sans - - - - The base font size to use for all texts of the Start page - Osnovna velikost črk za vsa besedila začetne strani - - - - px - sl. točk - - - - Open links - Odpri povezave - - - + in FreeCAD v FreeCAD-u - + In external browser V zunanjem brskalniku - - Use gradient for New File icon - Uporabi gradient za ikono Nova Datoteka + + Background color down gradient + Barvni preliv ozadja - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Če je to označeno, je namesto običajne ikone "Nova datoteka" prikazana prelivna ikona + + The color of the version text + Barva besedila različice programa - + + Link color + Barva povezave + + + + An optional image to display as background + Neobvezna slika za prikaz kot ozadje + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Če je to označeno in je seznam slogov določen v Splošnih prednastavitvah, bo ta uporabljen in bo povozil barve spodaj + + + + Page background color + Barva ozadja strani + + + + The color of the text on the main pages + Barva besedila prve strani + + + + Background image + Slika ozadja + + + + Page text color + Barva besedila strani + + + + The color of the links + Barva povezav + + + + The background color of the boxes inside the pages + Barva ozadja okvirjev znotraj strani + + + + Box background color + Barva ozadja okvirja + + + + The background color behind the panels + Barva ozadja za zavihki + + + + The down gradient for the background color (currently unsupported) + Gradient navzdol za barvo ozadja (trenutno nepodprt) + + + + Open links + Odpri povezave + + + + Background text color + Barva ozadja besedila + + + + Use FreeCAD style sheet + Uporabi FreeeCAD seznam slogov + + + + Font family + Družina pisav + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Družina pisave uporabljena na začetni strani. Lahko je ime pisave ali niz z vejico ločenih nadomestnih pisav + + + + Arial,Helvetica,sans + Arial, Helvetica, sans + + + + The base font size to use for all texts of the Start page + Osnovna velikost črk za vsa besedila začetne strani + + + + + px + sl. točk + + + Options Možnosti - - Switch workbench after loading - Preklopi delovno okolje po nalaganju - - - - Choose which workbench to switch to after the program launches - Izberite delovno okolje, ki bo nastavljeno ob zagonu programa - - - - Close start page after loading - Zapri začetno stran po nalaganju - - - + If checked, will automatically close the Start page when FreeCAD launches Če je označeno, se bo začetna stran FreeCADa pri zagonu samodejno zaprla - + + Switch workbench after loading + Preklopi delovno okolje po nalaganju + + + + Close start page after loading + Zapri začetno stran po nalaganju + + + Close and switch on opening file Zapri in preklopi pri odprtju datoteke - + If application is started by opening a file, apply the two settings above Če se program zažene z odpiranjem datoteke, uporabi zgornji dve nastavitvi - Workbench + DlgStartPreferencesAdvanced - - - Start page - Začetna stran - - - - StartPage - - - Start - Začni + + Advanced + Napredno - - Documents - Dokumenti + + Custom HTML Template + Custom HTML Template - - Help - Pomoč + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Aktivnost + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Nasvet - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Število tukaj prikazanih nedavnih datotek lahko prilagodite v meniju Uredi -> Prednastavitve -> Splošne nastavitve -> Velikost seznama nedavnih datotek - - - - Examples - Primeri - - - - General documentation - Splošna dokumentacija - - - - User hub - Uporabniško središče - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Ta oddelek vsebuje dokumentacijo, ki je v splošnem koristna za uporabnike programa FreeCAD: seznam vseh delovnih okolij, podrobnejša navodila za namestitev in uporabo programa FreeCAD, učne vaje in vse, kar potrebujete za začetek. - - - - Power users hub - Središče za napredne uporabnike - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Ta oddelek zbira dokumentacijo za napredne uporabnike in tiste, ki se zanimajo za pisanje python skript. Našli boste tudi skladišče makrov, navodila za njihovo namestitev in uporabo ter več informacij o prilagajanju programa FreeCAD vašim specifičnim potrebam. - - - - Developers hub - Središče za razvijalce - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Ta oddelek vsebuje vsebino za razvijalce: Kako sami zgradite FreeCAD, kako je strukturirana FreeCAD izvorna koda + kako krmariti po njej ter kako razviti novo delovno okolje in/, ali vgraditi FreeCAD v vašo aplikacijo. - - - - Manual - Priročnik - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD priročnik je še en, bolj premočrten način predstavitve informacij iz te "wiki" strani. Pripravljen je kot knjiga in vam bo predstavil številne druge strani oddelkov zgoraj. Na voljo so tudi <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-knjiga različice</a>. - - - - Workbenches documentation - Dokumentacija delovnih okolij - - - - These are the help pages of all the workbenches currently installed on this computer. - To so strani za pomoč vseh delovnih okolij, ki so trenutno nameščeni na tem računalniku. - - - - Getting help from the community - Pridobi pomoč od skupnosti - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">FreeCADov forum</a> je odlično mesto, kjer lahko dobite pomoč drugih FreeCADovih uporabnikov in razvijalcev. Forum ima veliko odsekov, namenjenih različnim vrstam težav in temam razprave. Če ste v dvomih, objavite v bolj splošen odsek <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoč pri uporabi FreeCADa</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Če prvič objavljate na forumu, najprej <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">preberite smernice</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD upravlja tudi z javnim <a href="https://www.freecad.org/tracker">sledilnikom hroščev</a>, kjer lahko vsak objavi ugotovljene napake in predlaga nove zmožnosti. V izognitev odvečnemu delu in za povečanje možnosti, da bo napaka odpravljena, pred objavljanjem preberite <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">vodič prijave hrošča</a>. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Spodaj so zadnje spremembe na <a href="http://github.com/FreeCAD/FreeCAD/">FreeCADovi izvorni kodi</a>. Te spremembe lahko še niso vključene v različici FreeCADa, ki jo trenutno uporabljate. Preverite <a href="https://www.freecad.org/wiki/Downloads">razpoložljive možnosti</a>, če želite pridobiti razvojno različico. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Zadnje objave na <a href="https://forum.freecad.org">FreeCADovem forumu</a>: - - - - Available addons - Razpoložljivi dodatki - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Spodaj je seznam razpoložljivih delovnih okolij, ki so lahko dodane FreeCAD namestitvi. Poiščite in namestite jih z menija Orodja -> Upravljalnik dodatkov. Več lahko izveste o katerem koli s klikom na spodnje povezave. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Če ni priložena vaši FreeCAD različici, namestite paket FreeCAD dokumentacije, s katerim dobite zvezdišča dokumentacije, pomoč o delovnih okoljih in dokumentacijo o posameznih ukazih, vse brez spletne povezave. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Prinašanje podatkov s strani GitHub ni mogoče. <a href="EnableDownload.py">Omogoči FreeCAD-u dostop do interneta</a> in znova naloži začetno stran. - - - - Recent commits - Nedavni prispevki - - - - See all commits on github - Poglej vse prispevke na githubu - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Mapo po meri, ki bo prikazana tukaj, lahko nastavite v meniju Uredi -> Prednastavitve -> Začetek -> Prikaži dodatno mapo - - - - version - različica - - - - build - zgradi - - - - Create new... - Ustvari novo... - - - - Unknown - Neznano - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Za odpretje katerekoli od zgornjih povezav v vašem brskalniku, Desni-klik -> Odpri v zunanjem brskalniku - - - - Creation date - Datum nastanka - - - - Last modification - Zadnje spremembe - - - - Notes - Opombe - - - - Open start page preferences - Odpri prednastavitve začetne strani + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Začni diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_sr-CS.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_sr-CS.ts index e4950d3e93..8ed1610910 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_sr-CS.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_sr-CS.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Početak + + + + Welcome to FreeCAD + Dobrodošli u FreeCAD + + + + Documents + Dokumenti + + + + Help + Pomoć + + + + Activity + Aktivnost + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link prema FreeCAD blog-u + + + + New file + Nova datoteka + + + + Empty File + Prazna datoteka + + + + Create an empty FreeCAD file + Napravi praznu FreeCAD datoteku + + + + Open File + Otvori datoteku + + + + Open an existing CAD file or 3D model + Otvori postojeću CAD datoteku ili 3D model + + + + Standard Part + Obični deo + + + + Create a part with the Part Design workbench + Napravi deo u Part Design radnom okruženju + + + + 2D Draft + 2D crtež + + + + Create a 2D draft with the Draft workbench + Napravi 2D crtež u Draft radnom okruženju + + + + BIM/Architecture + BIM/Arhitektura + + + + Create an architecture project + Napravi arhitektonski projekat + + + + Recent files + Recent files + + + + Tip + Savet + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Podesi broj nedavnih datoteka koje će biti prikazane ovde u meniju Uredi -> Podešavanja -> Opšte -> Veličina liste nedavno otvaranih datoteka + + + + Examples + Primeri + + + + General documentation + Opšta dokumentacija + + + + User hub + Čvorište korisnika + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Ovaj odeljak sadrži opštu dokumentaciju korisnu za korisnike FreeCAD-a: listu svih radnih okruženja, detaljna uputstva o tome kako da instaliraš i koristiš FreeCAD program, tutorijale i sve što je potrebno za početak. + + + + Power users hub + Čvorište naprednih korisnika + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Ovaj odeljak prikuplja dokumentaciju za napredne korisnike i ljude zainteresovane za pisanje python skripti. Tamo ćeš takođe pronaći spremište makro-a, uputstva o tome kako da ih instaliraš i koristiš, i više informacija o prilagođavanju FreeCAD-a tvojim specifičnim potrebama. + + + + Developers hub + Čvorište programera + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Ovaj odeljak sadrži materijal za programere: Kako sam kompajlirati FreeCAD, kako je strukturiran izvorni kod FreeCAD-a + kako se kretati po njemu, kako razviti nove radne površine i/ili ugraditi FreeCAD u svoju aplikaciju. + + + + Manual + Uputstvo + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Priručnik za FreeCAD je još jedan, linearniji način za predstavljanje informacija sadržanih u ovoj wiki. Napravljen je da se čita kao knjiga i polako će te upoznati sa mnogim drugim stranicama iz gore navedenih čvorišta. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">verzije e-knjiga</a>su takođe dostupne. + + + + Workbenches documentation + Dokumentacija radnih okruženja + + + + These are the help pages of all the workbenches currently installed on this computer. + Ovo su stranice pomoći za sva radna okruženja koja su trenutno instalirana na ovom računaru. + + + + Getting help from the community + Dobijanje pomoći od FreeCAD zajednice + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">Forum FreeCAD-a</a> je sjajno mesto za dobijanje pomoći od drugih korisnika i programera FreeCAD-a. Forum ima mnogo odeljaka za različite vrste problema i teme diskusije. Ako imaš nedoumice, objavi u opštem odeljku <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoć pri korišćenju FreeCAD-a</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Ako po prvi put objavljuješ na forumu, kao prvo <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">pročitaj smernice</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD takođe održava zajednica <a href="https://www.freecad.org/tracker">pratioci grešaka</a> gde svako može da prijavi greške i predloži nove funkcije. Da izbegneš suvišan posao i da sa najvećom verovatnoćom tvoj problem bude rešen, prvo pročitaj <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">uputstvo o prijavi greške</a> pre objavljivanja. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Ispod se nalaze poslednje izmene dodate <a href="http://github.com/FreeCAD/FreeCAD/">izvornom kodu FreeCAD-a</a>. Ove promene se možda još uvek neće odraziti na verziju FreeCAD-a koju trenutno koristiš. Proveri <a href="https://www.freecad.org/wiki/Downloads">dostupne opcije</a> ako želiš da nabaviš razvojnu verziju. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Najnovije objave na <a href="https://forum.freecad.org">FreeCAD forumu</a>: + + + + Available addons + Dostupni dodatni moduli + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Ispod je spisak dostupnih dodatnih radnih okruženja koja se mogu dodati u tvoju instalaciju FreeCAD-a. Pregledaj ih i instaliraj iz menija „Alati → Menadžer dodataka“. Možeš saznati više o bilo kom od njih klikom na linkove ispod. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Ako nije u paketu sa tvojom verzijom FreeCAD-a, instaliraj paket dokumentacije za FreeCAD da bi dobio čvorišta dokumentacije, pomoć za radno okruženje i dokumentaciju o pojedinačnim komandama bez internet veze. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Ne mogu da dovučem informacije sa GitHaba. <a href="EnableDownload.py">Ovlasti FreeCAD da pristupi internetu</a> i da ponovo učita početnu stranicu. + + + + Recent commits + Nedavno verifikovane promene + + + + See all commits on github + Vidi sve verifikovane promene na github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Možeš da konfigurišeš sopstvenu fasciklu da se prikazuje ovde u meniju Uredi -> Podešavanja -> Start -> Prikaži dodatni folder + + + + version + verzija + + + + build + izgradnja + + + + Create new... + Napravi novi... + + + + Unknown + Nepoznato + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Da bi otvorio bilo koju od gornjih veza u veb-pregledaču, klikni desnim tasterom miša na link -> Otvori u spoljnom veb-pregledaču + + + + Creation date + Datum stvaranja + + + + Last modification + Poslednja izmena + + + + Notes + Napomene + + + + Open start page preferences + Otvori podešavanje početne stranice + + + + Workbench + + + + Start page + Početna stranica + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opcije početne stranice - - - - Start page template - Šablon početne stranice - - - - An optional HTML template that will be used instead of the default start page. - Neobavezni HTML šablon koji će se koristiti umesto unapred definisane početne stranice. - - - + Contents Sadržaj - - Show notepad - Prikaži beležnicu + + Show forum + Prikaži forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Prikazuje beležnicu pored umanjenih slika datoteka, gde možeš da vodiš beleške - - - + Show examples folder contents Prikaži sadržaj fascikle sa primerima - - If you want the examples to show on the first page - Ako želiš da se primeri prikazuju na prvoj stranici - - - + Show additional folder Prikaži dodatnu fasciklu - + + If you want the examples to show on the first page + Ako želiš da se primeri prikazuju na prvoj stranici + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Ako je ovo čekirano, poslednje objave sa FreeCAD foruma biće prikazane u kartici aktivnosti + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Opcija da se sopstvena fascikla prikazuje na dnu prve stranice. Ako koristiš ";;" da bi razdvojio putanje, možeš dodati nekoliko fascikli - - Show forum - Prikaži forum + + Show notepad + Prikaži beležnicu - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Ako je ovo čekirano, poslednje objave sa FreeCAD foruma biće prikazane u kartici aktivnosti + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Prikazuje beležnicu pored umanjenih slika datoteka, gde možeš da vodiš beleške - + Show tips Prikaži savete - + + General + Opšte + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + Veličina ikona sličica datoteka u odeljcima Nedavne datoteke i Primeri + + + Displays help tips in the Start workbench Documents tab Prikazuje savete na kartici Dokumenti radnog okruženja Start - - Show scrollbars - Prikaži trake za pomeranje + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Fontovi i boje - - Use FreeCAD style sheet - Koristi FreeCAD listu stilova - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Ako je ovo čekirano i lista stilova je navedena u opštim podešavanjima, ona će se koristiti i zameniti boje ispod - - - - Background color - Boja pozadine - - - - The background color behind the panels - Boja pozadine iza panela - - - - Background color down gradient - Donja preliv boje pozadine - - - - The down gradient for the background color (currently unsupported) - Donji preliv boje pozadine (trenutno nije podržan) - - - - Background image - Pozadinska slika - - - - An optional image to display as background - Neobavezna slika koja se prikazuje kao pozadina - - - - Background text color - Boja teksta pozadine - - - - The color of the version text - Boja teksta informacionog teksta o verziji - - - - Page background color - Boja pozadine stranice - - - + The background of the main start page area Pozadina glavne oblasti početne stranice - - Page text color - Boja teksta stranice + + Background color + Boja pozadine - - The color of the text on the main pages - Boja teksta na glavnim stranicama - - - - Box background color - Boja pozadine okvira - - - - The background color of the boxes inside the pages - Boja pozadine okvira na stranicama - - - - Link color - Boja veze - - - - The color of the links - Boja veza - - - - Font family - Familija fontova - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Familija fontova koja će se koristiti na početnoj stranici. Može biti naziv fonta ili niz rezervnih fontova odvojenih zarezima - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Osnovna veličina fonta koja će se koristiti za sve tekstove početne stranice - - - - px - px - - - - Open links - Otvori veze - - - + in FreeCAD u FreeCAD-u - + In external browser U spoljašnjem veb-pregledaču - - Use gradient for New File icon - Koristi preliv za ikonicu nove datoteke + + Background color down gradient + Donja preliv boje pozadine - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Ako je ovo izabrano, ikona „Nova datoteka“ prikazuje ikonu preliva umesto normalne ikone + + The color of the version text + Boja teksta informacionog teksta o verziji - + + Link color + Boja veze + + + + An optional image to display as background + Neobavezna slika koja se prikazuje kao pozadina + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Ako je ovo čekirano i lista stilova je navedena u opštim podešavanjima, ona će se koristiti i zameniti boje ispod + + + + Page background color + Boja pozadine stranice + + + + The color of the text on the main pages + Boja teksta na glavnim stranicama + + + + Background image + Pozadinska slika + + + + Page text color + Boja teksta stranice + + + + The color of the links + Boja veza + + + + The background color of the boxes inside the pages + Boja pozadine okvira na stranicama + + + + Box background color + Boja pozadine okvira + + + + The background color behind the panels + Boja pozadine iza panela + + + + The down gradient for the background color (currently unsupported) + Donji preliv boje pozadine (trenutno nije podržan) + + + + Open links + Otvori veze + + + + Background text color + Boja teksta pozadine + + + + Use FreeCAD style sheet + Koristi FreeCAD listu stilova + + + + Font family + Familija fontova + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Familija fontova koja će se koristiti na početnoj stranici. Može biti naziv fonta ili niz rezervnih fontova odvojenih zarezima + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Osnovna veličina fonta koja će se koristiti za sve tekstove početne stranice + + + + + px + px + + + Options Opcije - - Switch workbench after loading - Promeni radno okruženje nakon učitavanja - - - - Choose which workbench to switch to after the program launches - Izaberi na koji radno okruženje želiš da se prebaciš nakon pokretanja programa - - - - Close start page after loading - Zatvori početnu stranicu nakon učitavanja - - - + If checked, will automatically close the Start page when FreeCAD launches Ako je čekirano, automatski će zatvoriti početnu stranicu kada se FreeCAD pokrene - + + Switch workbench after loading + Promeni radno okruženje nakon učitavanja + + + + Close start page after loading + Zatvori početnu stranicu nakon učitavanja + + + Close and switch on opening file Zatvori i promenite prilikom otvaranje datoteke - + If application is started by opening a file, apply the two settings above Ako je aplikacija pokrenuta otvaranjem datoteke, primeni dve gornje postavke - Workbench + DlgStartPreferencesAdvanced - - - Start page - Početna stranica - - - - StartPage - - - Start - Početak + + Advanced + Napredno - - Documents - Dokumenti + + Custom HTML Template + Custom HTML Template - - Help - Pomoć + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Aktivnost + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Savet - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Podesi broj nedavnih datoteka koje će biti prikazane ovde u meniju Uredi -> Podešavanja -> Opšte -> Veličina liste nedavno otvaranih datoteka - - - - Examples - Primeri - - - - General documentation - Opšta dokumentacija - - - - User hub - Čvorište korisnika - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Ovaj odeljak sadrži opštu dokumentaciju korisnu za korisnike FreeCAD-a: listu svih radnih okruženja, detaljna uputstva o tome kako da instaliraš i koristiš FreeCAD program, tutorijale i sve što je potrebno za početak. - - - - Power users hub - Čvorište naprednih korisnika - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Ovaj odeljak prikuplja dokumentaciju za napredne korisnike i ljude zainteresovane za pisanje python skripti. Tamo ćeš takođe pronaći spremište makro-a, uputstva o tome kako da ih instaliraš i koristiš, i više informacija o prilagođavanju FreeCAD-a tvojim specifičnim potrebama. - - - - Developers hub - Čvorište programera - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Ovaj odeljak sadrži materijal za programere: Kako sam kompajlirati FreeCAD, kako je strukturiran izvorni kod FreeCAD-a + kako se kretati po njemu, kako razviti nove radne površine i/ili ugraditi FreeCAD u svoju aplikaciju. - - - - Manual - Uputstvo - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Priručnik za FreeCAD je još jedan, linearniji način za predstavljanje informacija sadržanih u ovoj wiki. Napravljen je da se čita kao knjiga i polako će te upoznati sa mnogim drugim stranicama iz gore navedenih čvorišta. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">verzije e-knjiga</a>su takođe dostupne. - - - - Workbenches documentation - Dokumentacija radnih okruženja - - - - These are the help pages of all the workbenches currently installed on this computer. - Ovo su stranice pomoći za sva radna okruženja koja su trenutno instalirana na ovom računaru. - - - - Getting help from the community - Dobijanje pomoći od FreeCAD zajednice - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">Forum FreeCAD-a</a> je sjajno mesto za dobijanje pomoći od drugih korisnika i programera FreeCAD-a. Forum ima mnogo odeljaka za različite vrste problema i teme diskusije. Ako imaš nedoumice, objavi u opštem odeljku <a href="https://forum.freecad.org/viewforum.php?f=3">Pomoć pri korišćenju FreeCAD-a</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Ako po prvi put objavljuješ na forumu, kao prvo <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">pročitaj smernice</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD takođe održava zajednica <a href="https://www.freecad.org/tracker">pratioci grešaka</a> gde svako može da prijavi greške i predloži nove funkcije. Da izbegneš suvišan posao i da sa najvećom verovatnoćom tvoj problem bude rešen, prvo pročitaj <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">uputstvo o prijavi greške</a> pre objavljivanja. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Ispod se nalaze poslednje izmene dodate <a href="http://github.com/FreeCAD/FreeCAD/">izvornom kodu FreeCAD-a</a>. Ove promene se možda još uvek neće odraziti na verziju FreeCAD-a koju trenutno koristiš. Proveri <a href="https://www.freecad.org/wiki/Downloads">dostupne opcije</a> ako želiš da nabaviš razvojnu verziju. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Najnovije objave na <a href="https://forum.freecad.org">FreeCAD forumu</a>: - - - - Available addons - Dostupni dodatni moduli - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Ispod je spisak dostupnih dodatnih radnih okruženja koja se mogu dodati u tvoju instalaciju FreeCAD-a. Pregledaj ih i instaliraj iz menija „Alati → Menadžer dodataka“. Možeš saznati više o bilo kom od njih klikom na linkove ispod. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Ako nije u paketu sa tvojom verzijom FreeCAD-a, instaliraj paket dokumentacije za FreeCAD da bi dobio čvorišta dokumentacije, pomoć za radno okruženje i dokumentaciju o pojedinačnim komandama bez internet veze. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Ne mogu da dovučem informacije sa GitHaba. <a href="EnableDownload.py">Ovlasti FreeCAD da pristupi internetu</a> i da ponovo učita početnu stranicu. - - - - Recent commits - Nedavno verifikovane promene - - - - See all commits on github - Vidi sve verifikovane promene na github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Možeš da konfigurišeš sopstvenu fasciklu da se prikazuje ovde u meniju Uredi -> Podešavanja -> Start -> Prikaži dodatni folder - - - - version - verzija - - - - build - izgradnja - - - - Create new... - Napravi novi... - - - - Unknown - Nepoznato - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Da bi otvorio bilo koju od gornjih veza u veb-pregledaču, klikni desnim tasterom miša na link -> Otvori u spoljnom veb-pregledaču - - - - Creation date - Datum stvaranja - - - - Last modification - Poslednja izmena - - - - Notes - Napomene - - - - Open start page preferences - Otvori podešavanje početne stranice + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Početak diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_sr.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_sr.ts index 875f1ca339..cbcacf3c38 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_sr.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_sr.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Почетак + + + + Welcome to FreeCAD + Добродошли у FreeCAD + + + + Documents + Документи + + + + Help + Помоћ + + + + Activity + Активност + + + + Blog + Блог + + + + Link to the FreeCAD blog + Линк према FreeCAD блог-у + + + + New file + Нова датотека + + + + Empty File + Празна датотека + + + + Create an empty FreeCAD file + Направи празну FreeCAD датотеку + + + + Open File + Отвори датотеку + + + + Open an existing CAD file or 3D model + Отвори постојећу CAD датотеку или 3D модел + + + + Standard Part + Обични део + + + + Create a part with the Part Design workbench + Направи део у Part Design радном окружењу + + + + 2D Draft + 2D цртеж + + + + Create a 2D draft with the Draft workbench + Направи 2D цртеж у Draft радном окружењу + + + + BIM/Architecture + БИМ/Архитектура + + + + Create an architecture project + Направи архитектонски пројекат + + + + Recent files + Recent files + + + + Tip + Савет + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Подеси број недавних датотека које ће бити приказане овде у менију Уреди -> Подешавања -> Опште -> Величина листе недавнo отвараних датотека + + + + Examples + Примери + + + + General documentation + Општа документација + + + + User hub + Чвориште корисника + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Овај одељак садржи општу документацију корисну за кориснике FreeCAD-а: листу свих радних окружења, детаљна упутства о томе како да инсталираш и користиш FreeCAD програм, туторијале и све што је потребно за почетак. + + + + Power users hub + Чвориште напредних корисника + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Овај одељак прикупља документацију за напредне кориснике и људе заинтересоване за писање python скрипти. Тамо ћеш такође пронаћи спремиште макро-а, упутства о томе како да их инсталираш и користиш, и више информација о прилагођавању FreeCAD-а твојим специфичним потребама. + + + + Developers hub + Чвориште програмера + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Овај одељак садржи материјал за програмере: Како сам компајлирати FreeCAD, како је структуриран изворни код FreeCAD-а + како се кретати по њему, како развити нове радне површине и/или уградити FreeCAD у своју апликацију. + + + + Manual + Упутство + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Приручник за FreeCAD је још један, линеарнији начин за представљање информација садржаних у овој wiki. Направљен је да се чита као књига и полако ће те упознати са многим другим страницама из горе наведених чворишта. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">верзије е-књига</a>су такође доступне. + + + + Workbenches documentation + Документација радних окружења + + + + These are the help pages of all the workbenches currently installed on this computer. + Ово су странице помоћи за сва радна окружења која су тренутно инсталирана на овом рачунару. + + + + Getting help from the community + Добијање помоћи од FreeCAD заједнице + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org">Форум FreeCAD-а</a> је сјајно место за добијање помоћи од других корисника и програмера FreeCAD-а. Форум има много одељака за различите врсте проблема и теме дискусије. Ако имаш недоумице, објави у општем одељку <a href="https://forum.freecad.org/viewforum.php?f=3">Помоћ при коришћењу FreeCAD-а</a>. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Ако по први пут објављујеш на форуму, као прво <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">прочитај смернице</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD такође одржава заједница <a href="https://www.freecad.org/tracker">пратиоци грешака</a> где свако може да пријави грешке и предложи нове функције. Да избегнеш сувишан посао и да са највећом вероватноћом твој проблем буде решен, прво прочитај <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">упутство о пријави грешке</a> пре објављивања. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Испод се налазе последње измене додате <a href="http://github.com/FreeCAD/FreeCAD/">изворном коду FreeCAD-а</a>. Ове промене се можда још увек неће одразити на верзију FreeCAD-а коју тренутно користиш. Провери <a href="https://www.freecad.org/wiki/Downloads">доступне опције</a> ако желиш да набавиш развојну верзију. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Најновије објаве на <a href="https://forum.freecad.org">FreeCAD форуму</a>: + + + + Available addons + Доступни додатни модули + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Испод је списак доступних додатних радних окружења која се могу додати у твоју инсталацију FreeCAD-а. Прегледај их и инсталирај из менија „Алати → Менаџер додатака“. Можеш сазнати више о било ком од њих кликом на линкове испод. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Ако није у пакету са твојом верзијом FreeCAD-а, инсталирај пакет документације за FreeCAD да би добио чворишта документације, помоћ за радно окружење и документацију о појединачним командама без интернет везе. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Не могу да довучем информације са ГитХаба. <a href="EnableDownload.py">Овласти FreeCAD да приступи интернету</a> и да поново учита почетну страницу. + + + + Recent commits + Недавно верификоване промене + + + + See all commits on github + Види све верификоване промене на github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Можеш да конфигуришеш сопствену фасциклу да се приказује овде у менију Уреди -> Подешавања -> Старт -> Прикажи додатни фолдер + + + + version + верзија + + + + build + изградња + + + + Create new... + Направи нови... + + + + Unknown + Непознато + + + + Forum + Форум + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Да би отворио било коју од горњих веза у веб-прегледачу, кликни десним тастером миша на линк -> Отвори у спољном веб-прегледачу + + + + Creation date + Датум стварања + + + + Last modification + Последња измена + + + + Notes + Напомене + + + + Open start page preferences + Отвори подешавање почетне странице + + + + Workbench + + + + Start page + Почетна страница + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Опције почетне странице - - - - Start page template - Шаблон почетне странице - - - - An optional HTML template that will be used instead of the default start page. - Необавезни HTML шаблон који ће се користити уместо унапред дефинисане почетне странице. - - - + Contents Садржај - - Show notepad - Прикажи бележницу + + Show forum + Прикажи форум - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Приказује бележницу поред умањених слика датотека, где можеш да водиш белешке - - - + Show examples folder contents Прикажи садржај фасцикле са примерима - - If you want the examples to show on the first page - Ако желиш да се примери приказују на првој страници - - - + Show additional folder Прикажи додатну фасциклу - + + If you want the examples to show on the first page + Ако желиш да се примери приказују на првој страници + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Ако је ово чекирано, последње објаве са FreeCAD форума биће приказане у картици активности + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Опција да се сопствена фасцикла приказује на дну прве странице. Ако користиш ";;" да би раздвојио путање, можеш додати неколико фасцикли - - Show forum - Прикажи форум + + Show notepad + Прикажи бележницу - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Ако је ово чекирано, последње објаве са FreeCAD форума биће приказане у картици активности + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Приказује бележницу поред умањених слика датотека, где можеш да водиш белешке - + Show tips Прикажи савете - + + General + Опште + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + Величина икона сличица датотека у одељцима Недавне датотеке и Примери + + + Displays help tips in the Start workbench Documents tab Приказује савете на картици Документи радног окружења Start - - Show scrollbars - Прикажи траке за померање + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Фонтови и боје - - Use FreeCAD style sheet - Користи FreeCAD листу стилова - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Ако је ово чекирано и листа стилова је наведена у општим подешавањима, она ће се користити и заменити боје испод - - - - Background color - Боја позадине - - - - The background color behind the panels - Боја позадине иза панела - - - - Background color down gradient - Доња прелив боје позадине - - - - The down gradient for the background color (currently unsupported) - Доњи прелив боје позадине (тренутно није подржан) - - - - Background image - Позадинска слика - - - - An optional image to display as background - Необавезна слика која се приказује као позадина - - - - Background text color - Боја текста позадине - - - - The color of the version text - Боја текста информационог текста о верзији - - - - Page background color - Боја позадине странице - - - + The background of the main start page area Позадина главне области почетне странице - - Page text color - Боја текста странице + + Background color + Боја позадине - - The color of the text on the main pages - Боја текста на главним страницама - - - - Box background color - Боја позадине оквира - - - - The background color of the boxes inside the pages - Боја позадине оквира на страницама - - - - Link color - Боја везе - - - - The color of the links - Боја веза - - - - Font family - Фамилија фонтова - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Фамилија фонтова која ће се користити на почетној страници. Може бити назив фонта или низ резервних фонтова одвојених зарезима - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Основна величина фонта која ће се користити за све текстове почетне странице - - - - px - px - - - - Open links - Отвори везе - - - + in FreeCAD у FreeCAD-у - + In external browser У спољашњем веб-прегледачу - - Use gradient for New File icon - Користи прелив за иконицу нове датотеке + + Background color down gradient + Доња прелив боје позадине - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Ако је ово изабрано, икона „Нова датотека“ приказује икону прелива уместо нормалне иконе + + The color of the version text + Боја текста информационог текста о верзији - + + Link color + Боја везе + + + + An optional image to display as background + Необавезна слика која се приказује као позадина + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Ако је ово чекирано и листа стилова је наведена у општим подешавањима, она ће се користити и заменити боје испод + + + + Page background color + Боја позадине странице + + + + The color of the text on the main pages + Боја текста на главним страницама + + + + Background image + Позадинска слика + + + + Page text color + Боја текста странице + + + + The color of the links + Боја веза + + + + The background color of the boxes inside the pages + Боја позадине оквира на страницама + + + + Box background color + Боја позадине оквира + + + + The background color behind the panels + Боја позадине иза панела + + + + The down gradient for the background color (currently unsupported) + Доњи прелив боје позадине (тренутно није подржан) + + + + Open links + Отвори везе + + + + Background text color + Боја текста позадине + + + + Use FreeCAD style sheet + Користи FreeCAD листу стилова + + + + Font family + Фамилија фонтова + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Фамилија фонтова која ће се користити на почетној страници. Може бити назив фонта или низ резервних фонтова одвојених зарезима + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Основна величина фонта која ће се користити за све текстове почетне странице + + + + + px + px + + + Options Опције - - Switch workbench after loading - Промени радно окружење након учитавања - - - - Choose which workbench to switch to after the program launches - Изабери на који радно окружење желиш да се пребациш након покретања програма - - - - Close start page after loading - Затвори почетну страницу након учитавања - - - + If checked, will automatically close the Start page when FreeCAD launches Ако је чекирано, аутоматски ће затворити почетну страницу када се FreeCAD покрене - + + Switch workbench after loading + Промени радно окружење након учитавања + + + + Close start page after loading + Затвори почетну страницу након учитавања + + + Close and switch on opening file Затвори и промени приликом отварање датотеке - + If application is started by opening a file, apply the two settings above Ако је апликација покренута отварањем датотеке, примени две горње поставке - Workbench + DlgStartPreferencesAdvanced - - - Start page - Почетна страница - - - - StartPage - - - Start - Почетак + + Advanced + Напредно - - Documents - Документи + + Custom HTML Template + Custom HTML Template - - Help - Помоћ + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Активност + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Савет - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Подеси број недавних датотека које ће бити приказане овде у менију Уреди -> Подешавања -> Опште -> Величина листе недавнo отвараних датотека - - - - Examples - Примери - - - - General documentation - Општа документација - - - - User hub - Чвориште корисника - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Овај одељак садржи општу документацију корисну за кориснике FreeCAD-а: листу свих радних окружења, детаљна упутства о томе како да инсталираш и користиш FreeCAD програм, туторијале и све што је потребно за почетак. - - - - Power users hub - Чвориште напредних корисника - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Овај одељак прикупља документацију за напредне кориснике и људе заинтересоване за писање python скрипти. Тамо ћеш такође пронаћи спремиште макро-а, упутства о томе како да их инсталираш и користиш, и више информација о прилагођавању FreeCAD-а твојим специфичним потребама. - - - - Developers hub - Чвориште програмера - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Овај одељак садржи материјал за програмере: Како сам компајлирати FreeCAD, како је структуриран изворни код FreeCAD-а + како се кретати по њему, како развити нове радне површине и/или уградити FreeCAD у своју апликацију. - - - - Manual - Упутство - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Приручник за FreeCAD је још један, линеарнији начин за представљање информација садржаних у овој wiki. Направљен је да се чита као књига и полако ће те упознати са многим другим страницама из горе наведених чворишта. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">верзије е-књига</a>су такође доступне. - - - - Workbenches documentation - Документација радних окружења - - - - These are the help pages of all the workbenches currently installed on this computer. - Ово су странице помоћи за сва радна окружења која су тренутно инсталирана на овом рачунару. - - - - Getting help from the community - Добијање помоћи од FreeCAD заједнице - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org">Форум FreeCAD-а</a> је сјајно место за добијање помоћи од других корисника и програмера FreeCAD-а. Форум има много одељака за различите врсте проблема и теме дискусије. Ако имаш недоумице, објави у општем одељку <a href="https://forum.freecad.org/viewforum.php?f=3">Помоћ при коришћењу FreeCAD-а</a>. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Ако по први пут објављујеш на форуму, као прво <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">прочитај смернице</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD такође одржава заједница <a href="https://www.freecad.org/tracker">пратиоци грешака</a> где свако може да пријави грешке и предложи нове функције. Да избегнеш сувишан посао и да са највећом вероватноћом твој проблем буде решен, прво прочитај <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">упутство о пријави грешке</a> пре објављивања. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Испод се налазе последње измене додате <a href="http://github.com/FreeCAD/FreeCAD/">изворном коду FreeCAD-а</a>. Ове промене се можда још увек неће одразити на верзију FreeCAD-а коју тренутно користиш. Провери <a href="https://www.freecad.org/wiki/Downloads">доступне опције</a> ако желиш да набавиш развојну верзију. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Најновије објаве на <a href="https://forum.freecad.org">FreeCAD форуму</a>: - - - - Available addons - Доступни додатни модули - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Испод је списак доступних додатних радних окружења која се могу додати у твоју инсталацију FreeCAD-а. Прегледај их и инсталирај из менија „Алати → Менаџер додатака“. Можеш сазнати више о било ком од њих кликом на линкове испод. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Ако није у пакету са твојом верзијом FreeCAD-а, инсталирај пакет документације за FreeCAD да би добио чворишта документације, помоћ за радно окружење и документацију о појединачним командама без интернет везе. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Не могу да довучем информације са ГитХаба. <a href="EnableDownload.py">Овласти FreeCAD да приступи интернету</a> и да поново учита почетну страницу. - - - - Recent commits - Недавно верификоване промене - - - - See all commits on github - Види све верификоване промене на github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Можеш да конфигуришеш сопствену фасциклу да се приказује овде у менију Уреди -> Подешавања -> Старт -> Прикажи додатни фолдер - - - - version - верзија - - - - build - изградња - - - - Create new... - Направи нови... - - - - Unknown - Непознато - - - - Forum - Форум - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Да би отворио било коју од горњих веза у веб-прегледачу, кликни десним тастером миша на линк -> Отвори у спољном веб-прегледачу - - - - Creation date - Датум стварања - - - - Last modification - Последња измена - - - - Notes - Напомене - - - - Open start page preferences - Отвори подешавање почетне странице + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Почетак diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_sv-SE.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_sv-SE.ts index 149c55b362..6a5589cd38 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_sv-SE.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_sv-SE.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Dokument + + + + Help + Hjälp + + + + Activity + Aktivitet + + + + Blog + Blogg + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Tips + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Ange antal nyligen öppnade filer som visas genom menyn Redigera -> Alternativ... -> Allmänt -> Storlek på listan för senast öppnade filer + + + + Examples + Exempel + + + + General documentation + Allmän dokumentation + + + + User hub + Användar-nav + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Detta avsnitt innehåller dokumentation användbar för FreeCAD-användare i allmänhet: en lista över alla arbetsytor, detaljerade instruktioner om hur man installerar och använder programmet FreeCAD, självstudier och allt du behöver för att komma igång. + + + + Power users hub + Expert-nav + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Detta avsnitt samlar dokumentation för avancerade användare och personer intresserade av att skriva Python-skript. Du hittar också ett förråd för makron, instruktioner om hur man installerar och använder dem, och mer information om hur du anpassar FreeCAD till dina specifika behov. + + + + Developers hub + Utvecklar-nav + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Detta avsnitt innehåller material för utvecklare: Hur du kompilerar FreeCAD själv, hur FreeCADs källkod är strukturerad + hur man navigerar i den, hur man utvecklar nya arbetsytor och/eller bygger in FreeCAD in ditt egna program. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD-manualen är ett annat, mer linjärt sätt att presentera informationen i denna wiki på. Den är gjord för att läsas som en bok och introducerar dig till många andra sidor från naven ovan. Det finns även <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-bokversioner</a> tillgängliga. + + + + Workbenches documentation + Dokumentation för arbetsytor + + + + These are the help pages of all the workbenches currently installed on this computer. + Detta är hjälpsidor för alla de arbetsytor som är installerade på datorn. + + + + Getting help from the community + Få hjälp från intressegruppen + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + Tillgängliga tillägg + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Nedan är en lista över tillgängliga extra arbetsytor som kan läggas till i din FreeCAD-installation. Bläddra bland och installera dem från menyn Verktyg -> Tilläggshanterare. Du kan lära dig mer om dem genom att klicka på länkarna nedan. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Om det inte kom med din FreeCAD-installation, installera paketet FreeCAD-dokumentation för att kunna använda dokumentations-naven, hjälp för arbetsytor och dokumentation om individuella kommandon utan en internet-uppkoppling. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Kan inte hämta information från GitHub. <a href="EnableDownload.py">Tillåt FreeCAD att kunna nå internet</a> och ladda om startsidan. + + + + Recent commits + Nyligen utförda insättningar (commits) + + + + See all commits on github + Se alla insättningar (commits) på GitHub + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Du kan konfigurera en egen mapp som visas här i menyn Redigera -> Alternativ -> Start -> Visa extra mapp + + + + version + version + + + + build + build + + + + Create new... + Skapa ny... + + + + Unknown + Okänd + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + För att öppna någon av länkarna ovanför i din webbläsare, högerklicka och välj "Öppna i extern webbläsare" + + + + Creation date + Skapandedatum + + + + Last modification + Senaste ändring + + + + Notes + Noteringar + + + + Open start page preferences + Open start page preferences + + + + Workbench + + + + Start page + Startsida + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Alternativ för startsida - - - - Start page template - Mall för startsida - - - - An optional HTML template that will be used instead of the default start page. - En alternativ HTML-mall som kommer användas istället för standard-startsidan. - - - + Contents Innehåll - - Show notepad - Visa anteckningsblock + + Show forum + Visa forum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - + Show examples folder contents Visa innehåll i exempelmapp - - If you want the examples to show on the first page - Om du vill visa exemplen på första sidan - - - + Show additional folder Visa extra mapp - + + If you want the examples to show on the first page + Om du vill visa exemplen på första sidan + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Om detta är ikryssat kommer de senaste inläggen från FreeCADs forum att visas på aktivitetsfliken + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - - Show forum - Visa forum + + Show notepad + Visa anteckningsblock - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Om detta är ikryssat kommer de senaste inläggen från FreeCADs forum att visas på aktivitetsfliken + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips Visa tips - + + General + Allmänt + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Displays help tips in the Start workbench Documents tab - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Teckensnitt och färger - - Use FreeCAD style sheet - Använd FreeCAD-formatmall - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - Background color - Bakgrundsfärg - - - - The background color behind the panels - Bakgrundsfärg bakom paneler - - - - Background color down gradient - Background color down gradient - - - - The down gradient for the background color (currently unsupported) - Nedgradient för bakgrundsfärg (stöds ej än) - - - - Background image - Bakgrundsbild - - - - An optional image to display as background - En alternativ bild att visa som bakgrund - - - - Background text color - Bakgrundsfärg på text - - - - The color of the version text - Färg på versionstext - - - - Page background color - Bakgrundsfärg för sida - - - + The background of the main start page area Bakgrund på startsidans huvuddel - - Page text color - Textfärg på sida + + Background color + Bakgrundsfärg - - The color of the text on the main pages - Textfärg på huvudsidorna - - - - Box background color - Bakgrundsfärg på lådor - - - - The background color of the boxes inside the pages - Bakgrundsfärg på lådor inuti sidor - - - - Link color - Länkfärg - - - - The color of the links - Färg på länkar - - - - Font family - Teckensnitt - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Teckensnitt att använda på startsidan. Kan vara ett namn på ett teckensnitt eller en komma-separerad lista med reservteckensnitt - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Storlek på basteckensnitt för all text på startsidan - - - - px - px - - - - Open links - Öppna länkar - - - + in FreeCAD i FreeCAD - + In external browser I extern webbläsare - - Use gradient for New File icon - Använd gradient på ikon för ny fil + + Background color down gradient + Background color down gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + The color of the version text + Färg på versionstext - + + Link color + Länkfärg + + + + An optional image to display as background + En alternativ bild att visa som bakgrund + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + + + + Page background color + Bakgrundsfärg för sida + + + + The color of the text on the main pages + Textfärg på huvudsidorna + + + + Background image + Bakgrundsbild + + + + Page text color + Textfärg på sida + + + + The color of the links + Färg på länkar + + + + The background color of the boxes inside the pages + Bakgrundsfärg på lådor inuti sidor + + + + Box background color + Bakgrundsfärg på lådor + + + + The background color behind the panels + Bakgrundsfärg bakom paneler + + + + The down gradient for the background color (currently unsupported) + Nedgradient för bakgrundsfärg (stöds ej än) + + + + Open links + Öppna länkar + + + + Background text color + Bakgrundsfärg på text + + + + Use FreeCAD style sheet + Använd FreeCAD-formatmall + + + + Font family + Teckensnitt + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Teckensnitt att använda på startsidan. Kan vara ett namn på ett teckensnitt eller en komma-separerad lista med reservteckensnitt + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Storlek på basteckensnitt för all text på startsidan + + + + + px + px + + + Options Alternativ - - Switch workbench after loading - Byt arbetsyta när laddning är klar - - - - Choose which workbench to switch to after the program launches - Choose which workbench to switch to after the program launches - - - - Close start page after loading - Stäng startsida när laddning är klar - - - + If checked, will automatically close the Start page when FreeCAD launches If checked, will automatically close the Start page when FreeCAD launches - + + Switch workbench after loading + Byt arbetsyta när laddning är klar + + + + Close start page after loading + Stäng startsida när laddning är klar + + + Close and switch on opening file Close and switch on opening file - + If application is started by opening a file, apply the two settings above If application is started by opening a file, apply the two settings above - Workbench + DlgStartPreferencesAdvanced - - - Start page - Startsida - - - - StartPage - - - Start - Start + + Advanced + Avancerat - - Documents - Dokument + + Custom HTML Template + Custom HTML Template - - Help - Hjälp + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Aktivitet + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Tips - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Ange antal nyligen öppnade filer som visas genom menyn Redigera -> Alternativ... -> Allmänt -> Storlek på listan för senast öppnade filer - - - - Examples - Exempel - - - - General documentation - Allmän dokumentation - - - - User hub - Användar-nav - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Detta avsnitt innehåller dokumentation användbar för FreeCAD-användare i allmänhet: en lista över alla arbetsytor, detaljerade instruktioner om hur man installerar och använder programmet FreeCAD, självstudier och allt du behöver för att komma igång. - - - - Power users hub - Expert-nav - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Detta avsnitt samlar dokumentation för avancerade användare och personer intresserade av att skriva Python-skript. Du hittar också ett förråd för makron, instruktioner om hur man installerar och använder dem, och mer information om hur du anpassar FreeCAD till dina specifika behov. - - - - Developers hub - Utvecklar-nav - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Detta avsnitt innehåller material för utvecklare: Hur du kompilerar FreeCAD själv, hur FreeCADs källkod är strukturerad + hur man navigerar i den, hur man utvecklar nya arbetsytor och/eller bygger in FreeCAD in ditt egna program. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD-manualen är ett annat, mer linjärt sätt att presentera informationen i denna wiki på. Den är gjord för att läsas som en bok och introducerar dig till många andra sidor från naven ovan. Det finns även <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-bokversioner</a> tillgängliga. - - - - Workbenches documentation - Dokumentation för arbetsytor - - - - These are the help pages of all the workbenches currently installed on this computer. - Detta är hjälpsidor för alla de arbetsytor som är installerade på datorn. - - - - Getting help from the community - Få hjälp från intressegruppen - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - Tillgängliga tillägg - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Nedan är en lista över tillgängliga extra arbetsytor som kan läggas till i din FreeCAD-installation. Bläddra bland och installera dem från menyn Verktyg -> Tilläggshanterare. Du kan lära dig mer om dem genom att klicka på länkarna nedan. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Om det inte kom med din FreeCAD-installation, installera paketet FreeCAD-dokumentation för att kunna använda dokumentations-naven, hjälp för arbetsytor och dokumentation om individuella kommandon utan en internet-uppkoppling. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Kan inte hämta information från GitHub. <a href="EnableDownload.py">Tillåt FreeCAD att kunna nå internet</a> och ladda om startsidan. - - - - Recent commits - Nyligen utförda insättningar (commits) - - - - See all commits on github - Se alla insättningar (commits) på GitHub - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Du kan konfigurera en egen mapp som visas här i menyn Redigera -> Alternativ -> Start -> Visa extra mapp - - - - version - version - - - - build - build - - - - Create new... - Skapa ny... - - - - Unknown - Okänd - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - För att öppna någon av länkarna ovanför i din webbläsare, högerklicka och välj "Öppna i extern webbläsare" - - - - Creation date - Skapandedatum - - - - Last modification - Senaste ändring - - - - Notes - Noteringar - - - - Open start page preferences - Open start page preferences + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Start diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_tr.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_tr.ts index 0d06e1237c..64edc57f98 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_tr.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_tr.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Başla + + + + Welcome to FreeCAD + FreeCAD Programına Hoş Geldin + + + + Documents + Belgeler + + + + Help + Yardım + + + + Activity + Etkinlik + + + + Blog + Blog + + + + Link to the FreeCAD blog + FreeCAD blog sayfası bağlantısı + + + + New file + Yeni dosya + + + + Empty File + Boş Dosya + + + + Create an empty FreeCAD file + Boş bir FreeCAD dosyası oluştur + + + + Open File + Dosya Aç + + + + Open an existing CAD file or 3D model + Mevcut bir CAD dosyası veya 3D model aç + + + + Standard Part + Standart Parça + + + + Create a part with the Part Design workbench + Parça Tasarımı tezgahı ile parça oluştur + + + + 2D Draft + 2D Taslak + + + + Create a 2D draft with the Draft workbench + Taslak tezgahı ile 2D taslak oluştur + + + + BIM/Architecture + BIM/Mimari + + + + Create an architecture project + Mimari yapı projesi oluştur + + + + Recent files + Son dosyalar + + + + Tip + İpucu + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Menüde gösterilecek son dosyaların sayısını, Düzenle -> Tercihler -> Genel -> son dosya listesi boyutu buradan ayarlayın + + + + Examples + Örnekler + + + + General documentation + Genel belgeler + + + + User hub + Kullanıcı merkezi + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Bu bölüm, genel olarak FreeCAD kullanıcıları için yararlı belgeleri içerir: tüm çalışma tezgahlarının bir listesi, FreeCAD uygulamasını nasıl kuracağınıza ve kullanacağınıza ilişkin ayrıntılı talimatlar, öğretici belgeler ve başlamak için ihtiyacınız olan her şeyi. + + + + Power users hub + Yönetici Merkezi + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Bu bölüm, ileri düzey kullanıcılar ve python komut dosyalarını yazmakla ilgilenen kişiler için belgeleri barındırır. Ayrıca orada bir makro deposu, makroları nasıl kuracağınıza ve kullanacağınıza ilişkin talimatları ve FreeCAD'i özel ihtiyaçlarınıza göre nasıl özelleştirebileceğiniz hakkında daha fazla bilgi bulacaksınız. + + + + Developers hub + Geliştirici Merkezi + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Bu bölüm geliştiriciler için malzeme içerir: FreeCAD'i nasıl derleyeceğinizi, FreeCAD kaynak kodunun nasıl yapılandırıldığını + içinde nasıl gezinileceğini, yeni çalışma tezgahlarının nasıl geliştirileceğini ve / veya FreeCAD'in kendi uygulamasına nasıl yerleştirileceğini. + + + + Manual + Kullanım kılavuzu + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD kılavuzu, wiki sayfasında bulunan bilgileri sunmanın başka, daha doğrusal bir yoludur. Kılavuz, bir kitap gibi okunacak şekilde ve sizi yukarı bölümden diğer birçok sayfaya yönlendirecektir. <a href = "https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> e-kitap sürümleri </a> de mevcuttur. + + + + Workbenches documentation + Çalışma Tezgahları Belgeleri + + + + These are the help pages of all the workbenches currently installed on this computer. + Bunlar şu anda bu bilgisayarda yüklü olan tüm tezgahların yardım sayfalarıdır. + + + + Getting help from the community + Topluluktan yardım al + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Eğer bu, forumda yayınlayacağınız ilk gönderi ise, öncelikle < A href="http://forum.freecadweb.org/viewtopic.php?f=3&t=2264" > yönergeleri okuyun! < / a >! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + <a href="https://forum.freecad.org">FreeCAD forum</a> Sayfasındaki son gönderiler: + + + + Available addons + Mevcut eklentiler + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Aşağıda, FreeCAD kurulumunuza eklenebilecek mevcut ekstra çalışma tezgahlarının bir listesi bulunmaktadır. Araçlar -> Eklenti yöneticisi menüsünden göz atın ve yükleyin. Aşağıdaki bağlantıları tıklayarak bunlardan herhangi biri hakkında daha fazla bilgi edinebilirsiniz. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + FreeCAD sürümünüzle birlikte yüklü gelmediyse, dokümantasyon merkezi, çalışma tezgahı yardımı ve kişisel komut belgelerine sahip olmak ve internet bağlantısı olmadan kullanmak için FreeCAD dokümantasyon paketini kurun. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + GitHub'tan bilgi alınamıyor. <a href="EnableDownload.py"> İnternete erişmek için FreeCAD'i yetkilendirin </a> ve Başlangıç sayfasını yeniden yükleyin. + + + + Recent commits + Son işlemler + + + + See all commits on github + Github'daki tüm işlemleri görün + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Özel bir klasörü burada görüntülemek için menüden Düzenle -> Seçenekler -> Başlat -> ek klasörleri göster'e gitmelisiniz + + + + version + sürüm + + + + build + yapı + + + + Create new... + Yeni oluştur... + + + + Unknown + Bilinmeyen + + + + Forum + Forum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Masaüstü tarayıcınızda yukarıdaki bağlantılardan herhangi birini açmak için, Sağ tıklayın -> Harici tarayıcıda aç seçeneğini seçin + + + + Creation date + Oluşturma tarihi + + + + Last modification + Son düzenleme + + + + Notes + Notlar + + + + Open start page preferences + Başlangıç sayfası tercihlerini aç + + + + Workbench + + + + Start page + Başlangıç sayfası + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Başlangıç sayfası seçenekleri - - - - Start page template - Başlangıç sayfası şablonu - - - - An optional HTML template that will be used instead of the default start page. - Varsayılan başlangıç sayfası yerine kullanılacak isteğe bağlı bir HTML şablonu. - - - + Contents İçerikler - - Show notepad - Not defterini göster + + Show forum + Forumu göster - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Dosya küçük resimlerinin yanında, oturumlar boyunca notlar tutabileceğiniz bir not defteri gösterir - - - + Show examples folder contents Örnekler klasörü içeriğini göster - - If you want the examples to show on the first page - Örneklerin ilk sayfada gösterilmesini istiyorsanız - - - + Show additional folder Ek klasörü görüntüle - + + If you want the examples to show on the first page + Örneklerin ilk sayfada gösterilmesini istiyorsanız + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Bu işaretliyse, FreeCAD forumundan en son gönderiler Etkinlik sekmesinde görüntülenecektir + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here İlk sayfanın altında görüntülenecek isteğe bağlı özel bir dizin. Yolları ayırmak için ";;" (çift noktalı virgül) kullanarak birden fazla dizini buraya ekleyebilirsiniz - - Show forum - Forumu göster + + Show notepad + Not defterini göster - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Bu işaretliyse, FreeCAD forumundan en son gönderiler Etkinlik sekmesinde görüntülenecektir + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Dosya küçük resimlerinin yanında, oturumlar boyunca notlar tutabileceğiniz bir not defteri gösterir - + Show tips İpuçlarını göster - + + General + Genel + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Başlangıç ​​sayfasından bir dosya yükledikten sonra geçiş yapılacak çalışma tezgahı, Başlangıç, başlangıç ​​çalışma tezgahı ise kullanılır. + + + + The size of file thumbnail icons in recent files and examples sections + Son dosyalar ve örnekler bölümlerindeki dosya resimlerinin boyutu + + + Displays help tips in the Start workbench Documents tab Başlangıç tezgahı Belgeler sekmesinde yardım ipuçlarını gösterir - - Show scrollbars - Kaydırma çubuklarını göster + + File thumbnail size + Dosya resimleri boyutu - + + Show file thumbnails + Dosya resimlerini göster + + + Fonts and colors Yazı tipleri ve renkler - - Use FreeCAD style sheet - FreeCAD stili hesap tablosu kullan - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Eğer bu işaretlenirse ve Genel tercihlerde bir biçim sayfası belirtilirse, bu kullanılır ve aşağıdaki renkleri üzerine yazar - - - - Background color - Arka plan rengi - - - - The background color behind the panels - Panellerin gerisindeki arka plan rengi - - - - Background color down gradient - Arkaplan rengi aşağı geçişi - - - - The down gradient for the background color (currently unsupported) - Arka plan renginin aşağı eğimi (şu anda desteklenmiyor) - - - - Background image - Arka plan resmi - - - - An optional image to display as background - İsteğe bağlı bir resmi, arka plan olarak görüntüle - - - - Background text color - Arka plan metninin rengi - - - - The color of the version text - Sürüm metninin rengi - - - - Page background color - Sayfa arka plan rengi - - - + The background of the main start page area Ana Başlangıç sayfa alanının arka planı - - Page text color - Sayfa metninin rengi + + Background color + Arka plan rengi - - The color of the text on the main pages - Ana sayfalardaki metin rengi - - - - Box background color - Kutu arka plan rengi - - - - The background color of the boxes inside the pages - Sayfa içindeki kutuları arka plan rengi - - - - Link color - Bağlantı Rengi - - - - The color of the links - Bağlantıların rengi - - - - Font family - Yazı tipi - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Başlangıç sayfasında kullanılacak yazı tipi ailesi. Yazı tipi adı veya virgülle ayrılmış bir yazı tipi dizisi olabilir - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Başlangıç sayfasının tüm metinleri için kullanılacak temel font boyutu - - - - px - px - - - - Open links - Bağlantıları aç - - - + in FreeCAD FreeCAD’de - + In external browser Harici tarayıcıda - - Use gradient for New File icon - Yeni Dosya simgesi için gradyan kullan + + Background color down gradient + Arkaplan rengi aşağı geçişi - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Bu seçilirse, 'Yeni Dosya' simgesi, sıradan simge yerine geçişli bir simge gösterecek + + The color of the version text + Sürüm metninin rengi - + + Link color + Bağlantı Rengi + + + + An optional image to display as background + İsteğe bağlı bir resmi, arka plan olarak görüntüle + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Eğer bu işaretlenirse ve Genel tercihlerde bir biçim sayfası belirtilirse, bu kullanılır ve aşağıdaki renkleri üzerine yazar + + + + Page background color + Sayfa arka plan rengi + + + + The color of the text on the main pages + Ana sayfalardaki metin rengi + + + + Background image + Arka plan resmi + + + + Page text color + Sayfa metninin rengi + + + + The color of the links + Bağlantıların rengi + + + + The background color of the boxes inside the pages + Sayfa içindeki kutuları arka plan rengi + + + + Box background color + Kutu arka plan rengi + + + + The background color behind the panels + Panellerin gerisindeki arka plan rengi + + + + The down gradient for the background color (currently unsupported) + Arka plan renginin aşağı eğimi (şu anda desteklenmiyor) + + + + Open links + Bağlantıları aç + + + + Background text color + Arka plan metninin rengi + + + + Use FreeCAD style sheet + FreeCAD stili hesap tablosu kullan + + + + Font family + Yazı tipi + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Başlangıç sayfasında kullanılacak yazı tipi ailesi. Yazı tipi adı veya virgülle ayrılmış bir yazı tipi dizisi olabilir + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Başlangıç sayfasının tüm metinleri için kullanılacak temel font boyutu + + + + + px + px + + + Options Seçenekler - - Switch workbench after loading - Yüklemeden sonra çalışma tezgahını değiştir - - - - Choose which workbench to switch to after the program launches - Program çalıştıktan sonra geçilecek tezgahı seçin - - - - Close start page after loading - Yüklemeden sonra başlangıç sayfasını kapat - - - + If checked, will automatically close the Start page when FreeCAD launches İşaretlenirse, FreeCAD çalıştığında Başlangıç sayfası otomatik olarak kapanacak - + + Switch workbench after loading + Yüklemeden sonra çalışma tezgahını değiştir + + + + Close start page after loading + Yüklemeden sonra başlangıç sayfasını kapat + + + Close and switch on opening file Kapat ve açılan dosyaya geç - + If application is started by opening a file, apply the two settings above Eğer uygulama bir dosya açılarak başlatılırsa, üstteki iki ayarı uygula - Workbench + DlgStartPreferencesAdvanced - - - Start page - Başlangıç sayfası - - - - StartPage - - - Start - Başla + + Advanced + Gelişmiş - - Documents - Belgeler + + Custom HTML Template + Özel HTML Şablonu - - Help - Yardım + + An optional HTML template that will be used instead of the default start page. + Varsayılan başlangıç sayfası yerine kullanılacak isteğe bağlı bir HTML şablonu. - - Activity - Etkinlik + + Custom CSS + Özel CSS - - Recent files - Recent files - - - - Tip - İpucu - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Menüde gösterilecek son dosyaların sayısını, Düzenle -> Tercihler -> Genel -> son dosya listesi boyutu buradan ayarlayın - - - - Examples - Örnekler - - - - General documentation - Genel belgeler - - - - User hub - Kullanıcı merkezi - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Bu bölüm, genel olarak FreeCAD kullanıcıları için yararlı belgeleri içerir: tüm çalışma tezgahlarının bir listesi, FreeCAD uygulamasını nasıl kuracağınıza ve kullanacağınıza ilişkin ayrıntılı talimatlar, öğretici belgeler ve başlamak için ihtiyacınız olan her şeyi. - - - - Power users hub - Yönetici Merkezi - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Bu bölüm, ileri düzey kullanıcılar ve python komut dosyalarını yazmakla ilgilenen kişiler için belgeleri barındırır. Ayrıca orada bir makro deposu, makroları nasıl kuracağınıza ve kullanacağınıza ilişkin talimatları ve FreeCAD'i özel ihtiyaçlarınıza göre nasıl özelleştirebileceğiniz hakkında daha fazla bilgi bulacaksınız. - - - - Developers hub - Geliştirici Merkezi - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Bu bölüm geliştiriciler için malzeme içerir: FreeCAD'i nasıl derleyeceğinizi, FreeCAD kaynak kodunun nasıl yapılandırıldığını + içinde nasıl gezinileceğini, yeni çalışma tezgahlarının nasıl geliştirileceğini ve / veya FreeCAD'in kendi uygulamasına nasıl yerleştirileceğini. - - - - Manual - Kullanım kılavuzu - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD kılavuzu, wiki sayfasında bulunan bilgileri sunmanın başka, daha doğrusal bir yoludur. Kılavuz, bir kitap gibi okunacak şekilde ve sizi yukarı bölümden diğer birçok sayfaya yönlendirecektir. <a href = "https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details"> e-kitap sürümleri </a> de mevcuttur. - - - - Workbenches documentation - Çalışma Tezgahları Belgeleri - - - - These are the help pages of all the workbenches currently installed on this computer. - Bunlar şu anda Bu bilgisayarda yüklü olan tüm tezgahların yardım sayfalarıdır. - - - - Getting help from the community - Topluluktan yardım al - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Eğer bu, forumda yayınlayacağınız ilk gönderi ise, öncelikle < A href="http://forum.freecadweb.org/viewtopic.php?f=3&t=2264" > yönergeleri okuyun! < / a >! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - <a href="https://forum.freecad.org">FreeCAD forum</a> Sayfasındaki son gönderiler: - - - - Available addons - Mevcut eklentiler - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Aşağıda, FreeCAD kurulumunuza eklenebilecek mevcut ekstra çalışma tezgahlarının bir listesi bulunmaktadır. Araçlar -> Eklenti yöneticisi menüsünden göz atın ve yükleyin. Aşağıdaki bağlantıları tıklayarak bunlardan herhangi biri hakkında daha fazla bilgi edinebilirsiniz. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - FreeCAD sürümünüzle birlikte yüklü gelmediyse, dokümantasyon merkezi, çalışma tezgahı yardımı ve kişisel komut belgelerine sahip olmak ve internet bağlantısı olmadan kullanmak için FreeCAD dokümantasyon paketini kurun. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - GitHub'tan bilgi alınamıyor. <a href="EnableDownload.py"> İnternete erişmek için FreeCAD'i yetkilendirin </a> ve Başlangıç sayfasını yeniden yükleyin. - - - - Recent commits - Son işlemler - - - - See all commits on github - Github'daki tüm işlemleri görün - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Özel bir klasörü burada görüntülemek için menüden Düzenle -> Seçenekler -> Başlat -> ek klasörleri göster'e gitmelisiniz - - - - version - sürüm - - - - build - yapı - - - - Create new... - Yeni oluştur... - - - - Unknown - Bilinmeyen - - - - Forum - Forum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Masaüstü tarayıcınızda yukarıdaki bağlantılardan herhangi birini açmak için, Sağ tıklayın -> Harici tarayıcıda aç seçeneğini seçin - - - - Creation date - Oluşturma tarihi - - - - Last modification - Son düzenleme - - - - Notes - Notlar - - - - Open start page preferences - Başlangıç sayfası tercihlerini aç + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>Buraya özel CSS kodunu Başlangıç Sayfası'nın uygulaması için yapıştırabilirsin. Başlangıç Sayfası'nın stilini değiştirmek ile ilgili daha fazla bilgi için HTML ve CSS kaynak kodlarına göz at:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Başla diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_uk.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_uk.ts index ff18d6f482..f0a1a8c9a5 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_uk.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_uk.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Початок + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Документи + + + + Help + Довідка + + + + Activity + Активність + + + + Blog + Блог + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Порада + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Налаштувати кількість останніх файлів, які будуть показані тут, можна в меню Правка -> Налаштування -> Загальні -> Розмір списку останніх файлів + + + + Examples + Приклади + + + + General documentation + Загальна документація + + + + User hub + Розділ для користувачів + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Цей розділ містить документацію, корисну для користувачів FreeCAD загалом: перелік усіх робочих середовищ, детальні інструкції для встановлення та використання додатку FreeCAD, навчальні посібники та все, що вам потрібно для початку. + + + + Power users hub + Розділ для досвідчених користувачів + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + У цьому розділі зібрана документація для досвідчених користувачів і людей, зацікавлених в написанні скриптів python. Ви також знайдете там сховище макросів, інструкції щодо їх встановлення, використання та додаткову інформацію про налаштування FreeCAD під ваші конкретні потреби. + + + + Developers hub + Розділ для розробників + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Цей розділ містить матеріали для розробників: Як самостійно встановити FreeCAD, як структурувати початковий код FreeCAD + як орієнтуватися в ньому, як розробляти нові робочі середовища та / або вбудовувати FreeCAD у свій власний додаток. + + + + Manual + Посібник + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + Посібник із FreeCAD - це інший, більш лінійний спосіб представлення інформації з вікі. Він створений для читання як книга, та поступово познайомить вас з багатьма іншими сторінками з вищезгаданих розділів. Також доступний у форматі <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">електронної книги</a>. + + + + Workbenches documentation + Документація робочих середовищ + + + + These are the help pages of all the workbenches currently installed on this computer. + Це сторінки допомоги всіх робочих середовищ, встановлених на цьому комп’ютері. + + + + Getting help from the community + Отримати допомогу від спільноти + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + Якщо це буде ваш перший допис на форумі, спочатку обовʼязково <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">прочитайте рекомендації</a>. + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + Останні дописи на <a href="https://forum.freecad.org">форумі FreeCAD</a>: + + + + Available addons + Доступні доповнення + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Нижче наведено список доступних додаткових робочих середовищ, які можна додати до інсталяції FreeCAD. Перегляньте та встановіть їх з меню Інструменти -> Менеджер додатків. Ви можете дізнатись більше про будь-яке з них, натиснувши посилання нижче. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Встановіть пакет документації FreeCAD (якщо він не входить до комплекту постачання вашої версії FreeCAD), щоб отримати пакети документації, довідку з робочих середовищ та документацію за окремими командами без підключення до Інтернету. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Не вдається отримати інформацію з GitHub. <a href="EnableDownload.py"> Авторизуйте FreeCAD з доступом до Інтернету </a>та перезавантажте стартову сторінку. + + + + Recent commits + Останні комміти + + + + See all commits on github + Переглянути всі комміти на GitHub + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Ви можете налаштувати показ теки користувача в меню Правка -> Налаштування -> Пуск -> Показати додаткову теку + + + + version + версія + + + + build + збірка + + + + Create new... + Створити новий... + + + + Unknown + Невідомо + + + + Forum + Форум + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Щоб відкрити будь-яке з наведених вище посилань у браузері вашого робочого столу, клацніть правою кнопкою миші -> Відкрити у зовнішньому браузері + + + + Creation date + Дата створення + + + + Last modification + Остання зміна + + + + Notes + Нотатки + + + + Open start page preferences + Відкрити налаштування стартової сторінки + + + + Workbench + + + + Start page + Стартова сторінка + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Налаштування початкової сторінки - - - - Start page template - Шаблон початкової сторінки - - - - An optional HTML template that will be used instead of the default start page. - Додатковий HTML-шаблон, який буде використовуватися замість стартової сторінки за замовчуванням. - - - + Contents Вміст - - Show notepad - Показати нотатник + + Show forum + Показати форум - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Показує нотатки біля мініатюр файлів, що дозволяє зберігати нотатки в різних сеансах - - - + Show examples folder contents Показати вміст теки прикладів - - If you want the examples to show on the first page - Якщо ви бажаєте, щоб приклади показувалися на першій сторінці - - - + Show additional folder Показати додаткову теку - + + If you want the examples to show on the first page + Якщо ви бажаєте, щоб приклади показувалися на першій сторінці + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Якщо позначено цей пункт, останні повідомлення з форуму FreeCAD будуть показані на вкладці Активність + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here Необовʼязкова тека користувача, яка буде зображатися внизу першої сторінки. Використовуючи ";;" для розділення шляхів, ви можете додати сюди кілька тек - - Show forum - Показати форум + + Show notepad + Показати нотатник - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Якщо позначено цей пункт, останні повідомлення з форуму FreeCAD будуть показані на вкладці Активність + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Показує нотатки біля мініатюр файлів, що дозволяє зберігати нотатки в різних сеансах - + Show tips Показати Підказки - + + General + Загальні + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Показує підказки на вкладці Документи робочого середовища Start - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Шрифти і кольори - - Use FreeCAD style sheet - Використовувати стилі FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - Якщо цей прапорець встановлений і таблиця стилів вказана у загальних налаштуваннях, вона буде використана та скасує кольори, наведені нижче - - - - Background color - Колір фону - - - - The background color behind the panels - Колір тла позаду панелей - - - - Background color down gradient - Градієнт вниз кольору тла - - - - The down gradient for the background color (currently unsupported) - Встановлює градієнт вниз для кольору тла (нині не підтримується) - - - - Background image - Зображення тла - - - - An optional image to display as background - Необовʼязкове зображення для показу як тло - - - - Background text color - Колір тла тексту - - - - The color of the version text - Колір тексту назви версії - - - - Page background color - Колір тла сторінки - - - + The background of the main start page area Тло головної області стартової сторінки - - Page text color - Колір тексту сторінки + + Background color + Колір фону - - The color of the text on the main pages - Колір тексту на основних сторінках - - - - Box background color - Колір тла блоків - - - - The background color of the boxes inside the pages - Колір тла блоків на сторінках - - - - Link color - Колір посилання - - - - The color of the links - Колір посилання - - - - Font family - Гарнітура - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - Сімейство шрифтів, яке використовується на стартовій сторінці. Може бути імʼям шрифту або переліком запасних шрифтів, розділених комами - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - Базовий розмір шрифту для всіх текстів Стартової сторінки - - - - px - пікс. - - - - Open links - Відкрити посилання - - - + in FreeCAD у FreeCAD - + In external browser У зовнішньому браузері - - Use gradient for New File icon - Використовувати градієнт для значка нового файлу + + Background color down gradient + Градієнт вниз кольору тла - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - Якщо ця опція вибрана, значок 'Новий Файл' показує градієнтну іконку замість звичайної + + The color of the version text + Колір тексту назви версії - + + Link color + Колір посилання + + + + An optional image to display as background + Необовʼязкове зображення для показу як тло + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + Якщо цей прапорець встановлений і таблиця стилів вказана у загальних налаштуваннях, вона буде використана та скасує кольори, наведені нижче + + + + Page background color + Колір тла сторінки + + + + The color of the text on the main pages + Колір тексту на основних сторінках + + + + Background image + Зображення тла + + + + Page text color + Колір тексту сторінки + + + + The color of the links + Колір посилання + + + + The background color of the boxes inside the pages + Колір тла блоків на сторінках + + + + Box background color + Колір тла блоків + + + + The background color behind the panels + Колір тла позаду панелей + + + + The down gradient for the background color (currently unsupported) + Встановлює градієнт вниз для кольору тла (нині не підтримується) + + + + Open links + Відкрити посилання + + + + Background text color + Колір тла тексту + + + + Use FreeCAD style sheet + Використовувати стилі FreeCAD + + + + Font family + Гарнітура + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + Сімейство шрифтів, яке використовується на стартовій сторінці. Може бути імʼям шрифту або переліком запасних шрифтів, розділених комами + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + Базовий розмір шрифту для всіх текстів Стартової сторінки + + + + + px + пікс. + + + Options Параметри - - Switch workbench after loading - Запустити робоче середовище після завантаження - - - - Choose which workbench to switch to after the program launches - Дозволяє обрати робоче середовище, яке буде активоване після запуску програми - - - - Close start page after loading - Закрити стартову сторінку після завантаження - - - + If checked, will automatically close the Start page when FreeCAD launches Якщо прапорець встановлений, при запуску FreeCAD автоматично закриє Стартову сторінку - + + Switch workbench after loading + Запустити робоче середовище після завантаження + + + + Close start page after loading + Закрити стартову сторінку після завантаження + + + Close and switch on opening file Закрити та перейти до відкриття файлу - + If application is started by opening a file, apply the two settings above Якщо програма запускається відкриттям файлу, застосуйте два налаштування вище - Workbench + DlgStartPreferencesAdvanced - - - Start page - Стартова сторінка - - - - StartPage - - - Start - Початок + + Advanced + Advanced - - Documents - Документи + + Custom HTML Template + Custom HTML Template - - Help - Довідка + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Активність + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Порада - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Налаштувати кількість останніх файлів, які будуть показані тут, можна в меню Правка -> Налаштування -> Загальні -> Розмір списку останніх файлів - - - - Examples - Приклади - - - - General documentation - Загальна документація - - - - User hub - Розділ для користувачів - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Цей розділ містить документацію, корисну для користувачів FreeCAD загалом: перелік усіх робочих середовищ, детальні інструкції для встановлення та використання додатку FreeCAD, навчальні посібники та все, що вам потрібно для початку. - - - - Power users hub - Розділ для досвідчених користувачів - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - У цьому розділі зібрана документація для досвідчених користувачів і людей, зацікавлених в написанні скриптів python. Ви також знайдете там сховище макросів, інструкції щодо їх встановлення, використання та додаткову інформацію про налаштування FreeCAD під ваші конкретні потреби. - - - - Developers hub - Розділ для розробників - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Цей розділ містить матеріали для розробників: Як самостійно встановити FreeCAD, як структурувати початковий код FreeCAD + як орієнтуватися в ньому, як розробляти нові робочі середовища та / або вбудовувати FreeCAD у свій власний додаток. - - - - Manual - Посібник - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - Посібник із FreeCAD - це інший, більш лінійний спосіб представлення інформації з вікі. Він створений для читання як книга, та поступово познайомить вас з багатьма іншими сторінками з вищезгаданих розділів. Також доступний у форматі <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">електронної книги</a>. - - - - Workbenches documentation - Документація робочих середовищ - - - - These are the help pages of all the workbenches currently installed on this computer. - Це сторінки допомоги всіх робочих середовищ, встановлених на цьому комп’ютері. - - - - Getting help from the community - Отримати допомогу від спільноти - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - Якщо це буде ваш перший допис на форумі, спочатку обовʼязково <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">прочитайте рекомендації</a>. - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - Останні дописи на <a href="https://forum.freecad.org">форумі FreeCAD</a>: - - - - Available addons - Доступні доповнення - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Нижче наведено список доступних додаткових робочих середовищ, які можна додати до інсталяції FreeCAD. Перегляньте та встановіть їх з меню Інструменти -> Менеджер додатків. Ви можете дізнатись більше про будь-яке з них, натиснувши посилання нижче. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Встановіть пакет документації FreeCAD (якщо він не входить до комплекту постачання вашої версії FreeCAD), щоб отримати пакети документації, довідку з робочих середовищ та документацію за окремими командами без підключення до Інтернету. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Не вдається отримати інформацію з GitHub. <a href="EnableDownload.py"> Авторизуйте FreeCAD з доступом до Інтернету </a>та перезавантажте стартову сторінку. - - - - Recent commits - Останні комміти - - - - See all commits on github - Переглянути всі комміти на GitHub - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Ви можете налаштувати показ теки користувача в меню Правка -> Налаштування -> Пуск -> Показати додаткову теку - - - - version - версія - - - - build - збірка - - - - Create new... - Створити новий... - - - - Unknown - Невідомо - - - - Forum - Форум - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Щоб відкрити будь-яке з наведених вище посилань у браузері вашого робочого столу, клацніть правою кнопкою миші -> Відкрити у зовнішньому браузері - - - - Creation date - Дата створення - - - - Last modification - Остання зміна - - - - Notes - Нотатки - - - - Open start page preferences - Відкрити налаштування стартової сторінки + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Початок diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_val-ES.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_val-ES.ts index f53a689721..7a78d3a082 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_val-ES.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_val-ES.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Inicia + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + Documents + + + + Help + Ajuda + + + + Activity + Activitat + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + Consell + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + Ajusteu el nombre de fitxers recents que es mostren ací en el menú Edita->Preferències->General->Mida de la llista de fitxers recents + + + + Examples + Exemples + + + + General documentation + Documentació general + + + + User hub + Centre d'activitat de l'usuari + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + Aquesta secció conté documentació útil per als usuaris de FreeCAD en general: una llista de tots els bancs de treball, instruccions detallades sobre com instal·lar i utilitzar l'aplicació FreeCAd, tutorials i tot allò que es necessita per a començar. + + + + Power users hub + Centre d'activitat dels usuaris experimentats + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + Aquesta secció recopila documentació per a usuaris avançats i persones interessades en crear scripts de Python. També trobarà un repositori de macros, instruccions sobre com instal·lar-les i utilitzar-les, i més informació sobre com personalitzar FreeCAD per a les seues necessitats específiques. + + + + Developers hub + Centre d'activitat de desenvolupadors + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + Aquesta secció conté materials per a desenvolupadors: com compilar FreeCAD, com està estructurat el codi font de FreeCAD + com navegar per ell, i com desenvolupar nous bancs de treball, i/o incrustar FreeCAD en la vostra pròpia aplicació. + + + + Manual + Manual + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + El manual de FreeCAD és una altra forma més lineal de presentar la informació continguda en aquest wiki. Està fet per a ser llegit com un llibre i us introduirà gradualment en moltes altres pàgines dels centres d'activitat anteriors. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versions de llibres anteriors</a> també estan disponibles. + + + + Workbenches documentation + Documentació dels bancs de treballs + + + + These are the help pages of all the workbenches currently installed on this computer. + Aquestes són les pàgines d'ajuda de tots els bancs de treball instal·lats actualment en aquest ordinador. + + + + Getting help from the community + Obtín d'ajuda de la comunitat + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + Complements disponibles + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + A continuació es mostren una llista de bancs de treballs addicionals disponibles que es poden afegir a la vostra instal·lació de FreeCAD. Examineu-los i instal·leu-los des del menú Eines-> Administrador de complements. Pot obtenir més informació sobre qualsevol d'ells fent clic en els enllaços següents. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + Si no està inclòs en la seua versió de FreeCAD, instal·le el paquet de documentació de FreeCAD per a obtenir els centres de documentació, l'ajuda del banc de treball i la documentació d'ordres individuals sense connexió a Internet. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + No es pot obtindre informació de GitHub. <a href="EnableDownload.py">Autoritze FreeCAD a accedir a Internet</a> i torne a carregar la pàgina d'inici. + + + + Recent commits + Últimes confirmacions + + + + See all commits on github + Mostra tots els canvis de github + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + Podeu configurar una carpeta personalitzada per a mostrar ací en el menú Edita-> Preferències-> Inici-> Mostra carpeta addicional + + + + version + versió + + + + build + construeix + + + + Create new... + Crea... + + + + Unknown + Desconegut + + + + Forum + Fòrum + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + Per a obrir qualsevol dels enllaços anteriors en el seu navegador d'escriptori, feu clic amb el botó dret del ratolí -> Obri en el navegador extern + + + + Creation date + Data de creació + + + + Last modification + Última modificació + + + + Notes + Notes + + + + Open start page preferences + Open start page preferences + + + + Workbench + + + + Start page + Pàgina d'inici + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - Opcions de la pàgina d'inici - - - - Start page template - Plantilla de la pàgina d'inici - - - - An optional HTML template that will be used instead of the default start page. - Una plantilla HTML opcional que s'utilitzarà en lloc de la pàgina d'inici predeterminada. - - - + Contents Contingut - - Show notepad - Mostra el bloc de notes + + Show forum + Mostra el fòrum - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - + Show examples folder contents Mostra el contingut de la carpeta d'exemples - - If you want the examples to show on the first page - Si desitgeu que es mostren els exemples en la primera pàgina - - - + Show additional folder Mostra una carpeta addicional - + + If you want the examples to show on the first page + Si desitgeu que es mostren els exemples en la primera pàgina + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + Si està marcat, es mostraran les últimes entrades del fòrum FreeCAD en la pestanya Activitat + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - - Show forum - Mostra el fòrum + + Show notepad + Mostra el bloc de notes - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - Si està marcat, es mostraran les últimes entrades del fòrum FreeCAD en la pestanya Activitat + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips Show tips - + + General + General + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Displays help tips in the Start workbench Documents tab - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors Tipus de lletra i colors - - Use FreeCAD style sheet - Utilitza el full d'estil de FreeCAD - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - Background color - Color de fons - - - - The background color behind the panels - El color de fons darrere dels panells - - - - Background color down gradient - Background color down gradient - - - - The down gradient for the background color (currently unsupported) - El degradat del color del fons (actualment incompatible) - - - - Background image - Imatge de fons - - - - An optional image to display as background - Una imatge opcional per a mostrar com a fons - - - - Background text color - Color de fons del text - - - - The color of the version text - El color del text de la versió - - - - Page background color - Color de fons de la pàgina - - - + The background of the main start page area El fons de l'àrea principal de la pàgina pàgina d'inici - - Page text color - Color del text de la pàgina + + Background color + Color de fons - - The color of the text on the main pages - El color del text de les pàgines principals - - - - Box background color - Color de fons de la caixa - - - - The background color of the boxes inside the pages - El color de fons de les caixes dins de les pàgines - - - - Link color - Color de l'enllaç - - - - The color of the links - El color dels enllaços - - - - Font family - Tipus lletra - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - La família de tipus de lletra de la pàgina d'inici. Pot ser el nom d'un tipus de lletra o una sèrie de tipus de lletra alternatives separades per comes - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - La mida del tipus de lletra base per a tots els textos de la pàgina d'inici - - - - px - px - - - - Open links - Obri els enllaços - - - + in FreeCAD en FreeCAD - + In external browser En un navegador extern - - Use gradient for New File icon - Utilitza un degradat per a la icona de Fitxer nou + + Background color down gradient + Background color down gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + The color of the version text + El color del text de la versió - + + Link color + Color de l'enllaç + + + + An optional image to display as background + Una imatge opcional per a mostrar com a fons + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + + + + Page background color + Color de fons de la pàgina + + + + The color of the text on the main pages + El color del text de les pàgines principals + + + + Background image + Imatge de fons + + + + Page text color + Color del text de la pàgina + + + + The color of the links + El color dels enllaços + + + + The background color of the boxes inside the pages + El color de fons de les caixes dins de les pàgines + + + + Box background color + Color de fons de la caixa + + + + The background color behind the panels + El color de fons darrere dels panells + + + + The down gradient for the background color (currently unsupported) + El degradat del color del fons (actualment incompatible) + + + + Open links + Obri els enllaços + + + + Background text color + Color de fons del text + + + + Use FreeCAD style sheet + Utilitza el full d'estil de FreeCAD + + + + Font family + Tipus lletra + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + La família de tipus de lletra de la pàgina d'inici. Pot ser el nom d'un tipus de lletra o una sèrie de tipus de lletra alternatives separades per comes + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + La mida del tipus de lletra base per a tots els textos de la pàgina d'inici + + + + + px + px + + + Options Opcions - - Switch workbench after loading - Canvia el banc de treball després de la càrrega - - - - Choose which workbench to switch to after the program launches - Choose which workbench to switch to after the program launches - - - - Close start page after loading - Tanca la pàgina d'inici després de la càrrega - - - + If checked, will automatically close the Start page when FreeCAD launches If checked, will automatically close the Start page when FreeCAD launches - + + Switch workbench after loading + Canvia el banc de treball després de la càrrega + + + + Close start page after loading + Tanca la pàgina d'inici després de la càrrega + + + Close and switch on opening file Close and switch on opening file - + If application is started by opening a file, apply the two settings above If application is started by opening a file, apply the two settings above - Workbench + DlgStartPreferencesAdvanced - - - Start page - Pàgina d'inici - - - - StartPage - - - Start - Inicia + + Advanced + Avançat - - Documents - Documents + + Custom HTML Template + Custom HTML Template - - Help - Ajuda + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - Activitat + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - Consell - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - Ajusteu el nombre de fitxers recents que es mostren ací en el menú Edita->Preferències->General->Mida de la llista de fitxers recents - - - - Examples - Exemples - - - - General documentation - Documentació general - - - - User hub - Centre d'activitat de l'usuari - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - Aquesta secció conté documentació útil per als usuaris de FreeCAD en general: una llista de tots els bancs de treball, instruccions detallades sobre com instal·lar i utilitzar l'aplicació FreeCAd, tutorials i tot allò que es necessita per a començar. - - - - Power users hub - Centre d'activitat dels usuaris experimentats - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - Aquesta secció recopila documentació per a usuaris avançats i persones interessades en crear scripts de Python. També trobarà un repositori de macros, instruccions sobre com instal·lar-les i utilitzar-les, i més informació sobre com personalitzar FreeCAD per a les seues necessitats específiques. - - - - Developers hub - Centre d'activitat de desenvolupadors - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - Aquesta secció conté materials per a desenvolupadors: com compilar FreeCAD, com està estructurat el codi font de FreeCAD + com navegar per ell, i com desenvolupar nous bancs de treball, i/o incrustar FreeCAD en la vostra pròpia aplicació. - - - - Manual - Manual - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - El manual de FreeCAD és una altra forma més lineal de presentar la informació continguda en aquest wiki. Està fet per a ser llegit com un llibre i us introduirà gradualment en moltes altres pàgines dels centres d'activitat anteriors. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">versions de llibres anteriors</a> també estan disponibles. - - - - Workbenches documentation - Documentació dels bancs de treballs - - - - These are the help pages of all the workbenches currently installed on this computer. - Aquestes són les pàgines d'ajuda de tots els bancs de treball instal·lats actualment en aquest ordinador. - - - - Getting help from the community - Obtín d'ajuda de la comunitat - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - Complements disponibles - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - A continuació es mostren una llista de bancs de treballs addicionals disponibles que es poden afegir a la vostra instal·lació de FreeCAD. Examineu-los i instal·leu-los des del menú Eines-> Administrador de complements. Pot obtenir més informació sobre qualsevol d'ells fent clic en els enllaços següents. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - Si no està inclòs en la seua versió de FreeCAD, instal·le el paquet de documentació de FreeCAD per a obtenir els centres de documentació, l'ajuda del banc de treball i la documentació d'ordres individuals sense connexió a Internet. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - No es pot obtindre informació de GitHub. <a href="EnableDownload.py">Autoritze FreeCAD a accedir a Internet</a> i torne a carregar la pàgina d'inici. - - - - Recent commits - Últimes confirmacions - - - - See all commits on github - Mostra tots els canvis de github - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - Podeu configurar una carpeta personalitzada per a mostrar ací en el menú Edita-> Preferències-> Inici-> Mostra carpeta addicional - - - - version - versió - - - - build - construeix - - - - Create new... - Crea... - - - - Unknown - Desconegut - - - - Forum - Fòrum - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - Per a obrir qualsevol dels enllaços anteriors en el seu navegador d'escriptori, feu clic amb el botó dret del ratolí -> Obri en el navegador extern - - - - Creation date - Data de creació - - - - Last modification - Última modificació - - - - Notes - Notes - - - - Open start page preferences - Open start page preferences + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Inicia diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_zh-CN.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_zh-CN.ts index 3d3af03b5b..0d4ac80ea9 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_zh-CN.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_zh-CN.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + 开始 + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + 文档 + + + + Help + 帮助 + + + + Activity + 活动 + + + + Blog + 博客 + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + 最近打开的文件 + + + + Tip + 提示 + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + 调整要在菜单 "编辑" 中显示的最近文件的数量-> 首选项-> "常规" > "最近文件列表的大小" + + + + Examples + 例子 + + + + General documentation + 一般文件 + + + + User hub + 用户中心 + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + 本节包含对 FreeCAD 用户普遍有用的文档: 所有工作台的列表、有关如何安装和使用 FreeCAD 应用程序、教程的详细说明以及入门所需的所有内容。 + + + + Power users hub + 高级用户中心 + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + 本节收集高级用户和对编写 python 脚本感兴趣的人员的文档。您还可以在那里找到宏的存储库、有关如何安装和使用它们的说明, 以及有关根据您的特定需求自定义 FreeCAD 的详细信息。 + + + + Developers hub + 开发人员中心 + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + 本节包含供开发人员使用的材料: 如何自己编译 FreeCAD, FreeCAD 源代码的结构, 以及如何浏览代码, 如何开发新的工作台以及/或在您自己的应用程序中嵌入 FreeCAD。 + + + + Manual + 手册 + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + FreeCAD 手册是以另一种更直接方式来呈现包含在此维基中的信息。它是为了能像一本书一样阅读而制作的, 并将温和地从上面的各个中心向您介绍许多其他页面。 <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">电子书版本</a> 也可使用。 + + + + Workbenches documentation + 工作台文档 + + + + These are the help pages of all the workbenches currently installed on this computer. + 这些是当前安装在此计算机上的所有工作台的帮助页。 + + + + Getting help from the community + 从社区获得帮助 + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + <a href="http://forum.freecad.org"> FreeCAD 论坛</a>是从其他 FreeCAD 用户和开发人员那里获得帮助的好地方。 该论坛有许多部分,讨论不同类型的问题和讨论主题。 如有疑问,请在<a href="https://forum.freecad.org/viewforum.php?f=3">使用 FreeCAD 的帮助</a> 部分中发布。 + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + 如果这是您第一次在论坛上发布,请务必先阅读 <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">指南</a>! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + <a href="https://forum.freecad.org">FreeCAD 论坛</a> 上的最新帖子: + + + + Available addons + 可用的插件 + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + 下面是其他可用的工作台列表,可以添加到您的 FreeCAD 安装中。从菜单工具 -> 插件管理器浏览并安装它们。您可以通过点击下面的链接更多的了解这些工具。 + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + 如果未与您的 FreeCAD 版本捆绑在一起,请安装 FreeCAD 文档包以获取文档中心,工作台帮助和单独的命令文档,而无需连接因特网。 + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + 无法从 GitHub 获取信息。 <a href="EnableDownload.py">授权 FreeCAD 访问互联网</a> 并重新加载开始页面。 + + + + Recent commits + 最近提交 + + + + See all commits on github + 查看 github 上的所有提交 + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + 您可以在菜单编辑 -> 首选项 -> 开始 -> 显示额外文件夹中配置自定义文件夹 + + + + version + 版本 + + + + build + 构建 + + + + Create new... + 新建... + + + + Unknown + 未知的 + + + + Forum + 论坛 + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + 要在桌面浏览器中打开上面的任何链接, 请右键单击-> 在外部浏览器中打开 + + + + Creation date + 创建日期 + + + + Last modification + 最后修改 + + + + Notes + 备注 + + + + Open start page preferences + 打开起始页首选项 + + + + Workbench + + + + Start page + 起始页 + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - 开始页面选项 - - - - Start page template - 开始页面模板 - - - - An optional HTML template that will be used instead of the default start page. - 一个可选的 HTML 模板,将代替默认的起始页面使用。 - - - + Contents 内容 - - Show notepad - 显示记事本 + + Show forum + 显示论坛 - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - 在文件缩略图旁边显示一个记事本,你可以在不同的会话中保留笔记。 - - - + Show examples folder contents 显示示例文件夹内容 - - If you want the examples to show on the first page - 如果您希望示例显示在第一页上 - - - + Show additional folder 显示其他文件夹 - + + If you want the examples to show on the first page + 如果您希望示例显示在第一页上 + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + 如果选中此项,FreeCAD 论坛的最新帖子将会在活动选项卡上显示 + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here 一个可选的自定义文件夹,将显示在第一页的底部。 通过使用";; "来分隔路径,你可以在这里添加几个文件夹 - - Show forum - 显示论坛 + + Show notepad + 显示记事本 - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - 如果选中此项,FreeCAD 论坛的最新帖子将会在活动选项卡上显示 + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + 在文件缩略图旁边显示一个记事本,你可以在不同的会话中保留笔记。 - + Show tips 显示提示 - + + General + 常规 + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab 在 "开始工作台 "的 "文件 "选项卡中显示帮助提示 - - Show scrollbars - 显示滚动条 + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors 字体和颜色 - - Use FreeCAD style sheet - 使用 FreeCAD 样式表 - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - 如果选中此项并且在常规首选项中指定了样式表,它将被使用并覆盖下面的颜色 - - - - Background color - 背景颜色 - - - - The background color behind the panels - 面板背后的背景颜色 - - - - Background color down gradient - 背景颜色向下渐变 - - - - The down gradient for the background color (currently unsupported) - 背景颜色的向下渐变(目前不支持) - - - - Background image - 背景图片 - - - - An optional image to display as background - 可选的图像作为背景显示 - - - - Background text color - 背景文字颜色 - - - - The color of the version text - 版本文本的颜色 - - - - Page background color - 页面背景颜色 - - - + The background of the main start page area 开始页页面主背景 - - Page text color - 页面文本颜色 + + Background color + 背景颜色 - - The color of the text on the main pages - 主页文字的颜色 - - - - Box background color - 框背景颜色 - - - - The background color of the boxes inside the pages - 页面内框的背景颜色 - - - - Link color - 链接颜色 - - - - The color of the links - 链接的颜色 - - - - Font family - 字体系列 - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - 在起始页上使用的字体系列。 可以是字体名称或逗号分隔的后备字体系列 - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - 用于开始页面所有文本的基本字体大小 - - - - px - px - - - - Open links - 打开链接 - - - + in FreeCAD 在 FreeCAD 中 - + In external browser 在外部浏览器中 - - Use gradient for New File icon - 为新文件图标使用渐变 + + Background color down gradient + 背景颜色向下渐变 - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - 如果选中此项,则“新文件”图标显示渐变图标而非普通图标 + + The color of the version text + 版本文本的颜色 - + + Link color + 链接颜色 + + + + An optional image to display as background + 可选的图像作为背景显示 + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + 如果选中此项并且在常规首选项中指定了样式表,它将被使用并覆盖下面的颜色 + + + + Page background color + 页面背景颜色 + + + + The color of the text on the main pages + 主页文字的颜色 + + + + Background image + 背景图片 + + + + Page text color + 页面文本颜色 + + + + The color of the links + 链接的颜色 + + + + The background color of the boxes inside the pages + 页面内框的背景颜色 + + + + Box background color + 框背景颜色 + + + + The background color behind the panels + 面板背后的背景颜色 + + + + The down gradient for the background color (currently unsupported) + 背景颜色的向下渐变(目前不支持) + + + + Open links + 打开链接 + + + + Background text color + 背景文字颜色 + + + + Use FreeCAD style sheet + 使用 FreeCAD 样式表 + + + + Font family + 字体系列 + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + 在起始页上使用的字体系列。 可以是字体名称或逗号分隔的后备字体系列 + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + 用于开始页面所有文本的基本字体大小 + + + + + px + px + + + Options 选项 - - Switch workbench after loading - 加载后切换工作台 - - - - Choose which workbench to switch to after the program launches - 选择程序启动后切换到哪个工作台 - - - - Close start page after loading - 加载后关闭开始页面 - - - + If checked, will automatically close the Start page when FreeCAD launches 如果选中,FreeCAD 启动时将自动关闭起始页 - + + Switch workbench after loading + 加载后切换工作台 + + + + Close start page after loading + 加载后关闭开始页面 + + + Close and switch on opening file 关闭并切换到打开的文件 - + If application is started by opening a file, apply the two settings above 如果应用程序是通过打开文件启动的,则应用上面的两个设置 - Workbench + DlgStartPreferencesAdvanced - - - Start page - 起始页 - - - - StartPage - - - Start - 开始 + + Advanced + 高级 - - Documents - 文档 + + Custom HTML Template + Custom HTML Template - - Help - 帮助 + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - 活动 + + Custom CSS + Custom CSS - - Recent files - 最近打开的文件 - - - - Tip - 提示 - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - 调整要在菜单 "编辑" 中显示的最近文件的数量-> 首选项-> "常规" > "最近文件列表的大小" - - - - Examples - 例子 - - - - General documentation - 一般文件 - - - - User hub - 用户中心 - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - 本节包含对 FreeCAD 用户普遍有用的文档: 所有工作台的列表、有关如何安装和使用 FreeCAD 应用程序、教程的详细说明以及入门所需的所有内容。 - - - - Power users hub - 高级用户中心 - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - 本节收集高级用户和对编写 python 脚本感兴趣的人员的文档。您还可以在那里找到宏的存储库、有关如何安装和使用它们的说明, 以及有关根据您的特定需求自定义 FreeCAD 的详细信息。 - - - - Developers hub - 开发人员中心 - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - 本节包含供开发人员使用的材料: 如何自己编译 FreeCAD, FreeCAD 源代码的结构, 以及如何浏览代码, 如何开发新的工作台以及/或在您自己的应用程序中嵌入 FreeCAD。 - - - - Manual - 手册 - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - FreeCAD 手册是以另一种更直接方式来呈现包含在此维基中的信息。它是为了能像一本书一样阅读而制作的, 并将温和地从上面的各个中心向您介绍许多其他页面。 <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">电子书版本</a> 也可使用。 - - - - Workbenches documentation - 工作台文档 - - - - These are the help pages of all the workbenches currently installed on this computer. - 这些是当前安装在此计算机上的所有工作台的帮助页。 - - - - Getting help from the community - 从社区获得帮助 - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - <a href="http://forum.freecad.org"> FreeCAD 论坛</a>是从其他 FreeCAD 用户和开发人员那里获得帮助的好地方。 该论坛有许多部分,讨论不同类型的问题和讨论主题。 如有疑问,请在<a href="https://forum.freecad.org/viewforum.php?f=3">使用 FreeCAD 的帮助</a> 部分中发布。 - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - 如果这是您第一次在论坛上发布,请务必先阅读 <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">指南</a>! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - <a href="https://forum.freecad.org">FreeCAD 论坛</a> 上的最新帖子: - - - - Available addons - 可用的插件 - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - 下面是其他可用的工作台列表,可以添加到您的 FreeCAD 安装中。从菜单工具 -> 插件管理器浏览并安装它们。您可以通过点击下面的链接更多的了解这些工具。 - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - 如果未与您的 FreeCAD 版本捆绑在一起,请安装 FreeCAD 文档包以获取文档中心,工作台帮助和单独的命令文档,而无需连接因特网。 - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - 无法从 GitHub 获取信息。 <a href="EnableDownload.py">授权 FreeCAD 访问互联网</a> 并重新加载开始页面。 - - - - Recent commits - 最近提交 - - - - See all commits on github - 查看 github 上的所有提交 - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - 您可以在菜单编辑 -> 首选项 -> 开始 -> 显示额外文件夹中配置自定义文件夹 - - - - version - 版本 - - - - build - 构建 - - - - Create new... - 新建... - - - - Unknown - 未知的 - - - - Forum - 论坛 - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - 要在桌面浏览器中打开上面的任何链接, 请右键单击-> 在外部浏览器中打开 - - - - Creation date - 创建日期 - - - - Last modification - 最后修改 - - - - Notes - 备注 - - - - Open start page preferences - 打开起始页首选项 + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start 开始 diff --git a/src/Mod/Start/Gui/Resources/translations/StartPage_zh-TW.ts b/src/Mod/Start/Gui/Resources/translations/StartPage_zh-TW.ts index af289f1e15..8e3dc1dc9b 100644 --- a/src/Mod/Start/Gui/Resources/translations/StartPage_zh-TW.ts +++ b/src/Mod/Start/Gui/Resources/translations/StartPage_zh-TW.ts @@ -1,6 +1,298 @@ + + StartPage + + + Start + Start + + + + Welcome to FreeCAD + Welcome to FreeCAD + + + + Documents + 文件 + + + + Help + 説明 + + + + Activity + 啟用 + + + + Blog + Blog + + + + Link to the FreeCAD blog + Link to the FreeCAD blog + + + + New file + New file + + + + Empty File + Empty File + + + + Create an empty FreeCAD file + Create an empty FreeCAD file + + + + Open File + Open File + + + + Open an existing CAD file or 3D model + Open an existing CAD file or 3D model + + + + Standard Part + Standard Part + + + + Create a part with the Part Design workbench + Create a part with the Part Design workbench + + + + 2D Draft + 2D Draft + + + + Create a 2D draft with the Draft workbench + Create a 2D draft with the Draft workbench + + + + BIM/Architecture + BIM/Architecture + + + + Create an architecture project + Create an architecture project + + + + Recent files + Recent files + + + + Tip + 提示 + + + + Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list + 調整最近開啟的檔案數量,以在選單“編輯”->“偏好”->“一般”->“最近檔案清單的數量”中顯示在此處 + + + + Examples + 範例 + + + + General documentation + 使用者文件 + + + + User hub + 使用者中心 + + + + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. + + + + Power users hub + 超級使用者中心 + + + + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. + + + + Developers hub + 開發人員中心 + + + + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. + + + + Manual + 使用說明 + + + + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. + + + + Workbenches documentation + 工作台文件 + + + + These are the help pages of all the workbenches currently installed on this computer. + These are the help pages of all the workbenches currently installed on this computer. + + + + Getting help from the community + 從社群取得協助 + + + + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. + + + + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! + + + + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. + + + + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. + + + + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: + + + + Available addons + 可以使用的附加元件 + + + + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. + + + + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. + + + + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. + + + + Recent commits + 最近的提交 + + + + See all commits on github + 查看 Github 上的所有提交 + + + + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder + + + + version + 版本 + + + + build + 建立 + + + + Create new... + 建立新的... + + + + Unknown + 未知 + + + + Forum + 討論區 + + + + To open any of the links above in your desktop browser, Right-click -> Open in external browser + To open any of the links above in your desktop browser, Right-click -> Open in external browser + + + + Creation date + 建立的日期 + + + + Last modification + 最後修改 + + + + Notes + 備註 + + + + Open start page preferences + 開啟開始頁的偏好設定 + + + + Workbench + + + + Start page + 開始頁面 + + CmdStartPage @@ -22,489 +314,287 @@ DlgStartPreferences - - Start page options - 開始頁選項 - - - - Start page template - 開始頁樣版 - - - - An optional HTML template that will be used instead of the default start page. - An optional HTML template that will be used instead of the default start page. - - - + Contents 內容 - - Show notepad - 顯示記事本 + + Show forum + 顯示論壇 - - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - Shows a notepad next to the file thumbnails, where you can keep notes across sessions - - - + Show examples folder contents 顯示範例的資料夾內容 - - If you want the examples to show on the first page - 如果你要範例顯示在第一頁 - - - + Show additional folder 顯示額外的資料夾 - + + If you want the examples to show on the first page + 如果你要範例顯示在第一頁 + + + + If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab + 如果這個被點取, 最後面貼在FreeCAD論壇討論, 將會顯示在活動的分頁 + + + An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here An optional custom folder to be displayed at the bottom of the first page. By using ";;" to separate paths, you can add several folders here - - Show forum - 顯示論壇 + + Show notepad + 顯示記事本 - - If this is checked, the latest posts from the FreeCAD forum will be displayed on the Activity tab - 如果這個被點取, 最後面貼在FreeCAD論壇討論, 將會顯示在活動的分頁 + + Shows a notepad next to the file thumbnails, where you can keep notes across sessions + Shows a notepad next to the file thumbnails, where you can keep notes across sessions - + Show tips Show tips - + + General + 一般 + + + + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + Workbench to switch to after loading a file from the Start page, only used if Start is the start up workbench + + + + The size of file thumbnail icons in recent files and examples sections + The size of file thumbnail icons in recent files and examples sections + + + Displays help tips in the Start workbench Documents tab Displays help tips in the Start workbench Documents tab - - Show scrollbars - Show scrollbars + + File thumbnail size + File thumbnail size - + + Show file thumbnails + Show file thumbnails + + + Fonts and colors 字型與顏色 - - Use FreeCAD style sheet - 使用FreeCAD樣式表 - - - - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below - - - - Background color - 背景顏色 - - - - The background color behind the panels - 面板後面的背景色 - - - - Background color down gradient - Background color down gradient - - - - The down gradient for the background color (currently unsupported) - The down gradient for the background color (currently unsupported) - - - - Background image - 背景圖片 - - - - An optional image to display as background - An optional image to display as background - - - - Background text color - 背景文字顏色 - - - - The color of the version text - 版本文字的顏色 - - - - Page background color - 頁面背景顏色 - - - + The background of the main start page area The background of the main start page area - - Page text color - 頁面文字顏色 + + Background color + 背景顏色 - - The color of the text on the main pages - 主頁上文字的顏色 - - - - Box background color - 框背景色 - - - - The background color of the boxes inside the pages - 頁面內部框的背景色 - - - - Link color - 連結顏色 - - - - The color of the links - 鏈結的顏色 - - - - Font family - 字型家族 - - - - The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts - 在開始頁上使用的字體系列, 可以是字體名稱或逗號分隔的備用字型 - - - - Arial,Helvetica,sans - Arial,Helvetica,sans - - - - The base font size to use for all texts of the Start page - 開始頁的所有文字要使用的基本字體大小 - - - - px - px - - - - Open links - 開啟鏈結 - - - + in FreeCAD 在FreeCAD中 - + In external browser 在外部瀏覽器 - - Use gradient for New File icon - 新的檔案圖示使用漸層 + + Background color down gradient + Background color down gradient - - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon - If this is selected, the 'New File' icon shows a gradient icon instead of the normal icon + + The color of the version text + 版本文字的顏色 - + + Link color + 連結顏色 + + + + An optional image to display as background + An optional image to display as background + + + + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + If this is checked and a style sheet is specified in General preferences, it will be used and override the colors below + + + + Page background color + 頁面背景顏色 + + + + The color of the text on the main pages + 主頁上文字的顏色 + + + + Background image + 背景圖片 + + + + Page text color + 頁面文字顏色 + + + + The color of the links + 鏈結的顏色 + + + + The background color of the boxes inside the pages + 頁面內部框的背景色 + + + + Box background color + 框背景色 + + + + The background color behind the panels + 面板後面的背景色 + + + + The down gradient for the background color (currently unsupported) + The down gradient for the background color (currently unsupported) + + + + Open links + 開啟鏈結 + + + + Background text color + 背景文字顏色 + + + + Use FreeCAD style sheet + 使用FreeCAD樣式表 + + + + Font family + 字型家族 + + + + The font family to use on the start page. Can be a font name or a comma-separated series of fallback fonts + 在開始頁上使用的字體系列, 可以是字體名稱或逗號分隔的備用字型 + + + + Arial,Helvetica,sans + Arial,Helvetica,sans + + + + The base font size to use for all texts of the Start page + 開始頁的所有文字要使用的基本字體大小 + + + + + px + px + + + Options 選項 - - Switch workbench after loading - 切換工作台在載入後 - - - - Choose which workbench to switch to after the program launches - Choose which workbench to switch to after the program launches - - - - Close start page after loading - 關閉開始頁在載入後 - - - + If checked, will automatically close the Start page when FreeCAD launches If checked, will automatically close the Start page when FreeCAD launches - + + Switch workbench after loading + 切換工作台在載入後 + + + + Close start page after loading + 關閉開始頁在載入後 + + + Close and switch on opening file Close and switch on opening file - + If application is started by opening a file, apply the two settings above If application is started by opening a file, apply the two settings above - Workbench + DlgStartPreferencesAdvanced - - - Start page - 開始頁面 - - - - StartPage - - - Start - Start + + Advanced + 進階選項 - - Documents - 文件 + + Custom HTML Template + Custom HTML Template - - Help - 説明 + + An optional HTML template that will be used instead of the default start page. + An optional HTML template that will be used instead of the default start page. - - Activity - 啟用 + + Custom CSS + Custom CSS - - Recent files - Recent files - - - - Tip - 提示 - - - - Adjust the number of recent files to be shown here in menu Edit -> Preferences -> General -> Size of recent file list - 調整最近開啟的檔案數量,以在選單“編輯”->“偏好”->“一般”->“最近檔案清單的數量”中顯示在此處 - - - - Examples - 範例 - - - - General documentation - 使用者文件 - - - - User hub - 使用者中心 - - - - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - This section contains documentation useful for FreeCAD users in general: a list of all the workbenches, detailed instructions on how to install and use the FreeCAD application, tutorials, and all you need to get started. - - - - Power users hub - 超級使用者中心 - - - - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - This section gathers documentation for advanced users and people interested in writing python scripts. You will also find there a repository of macros, instructions on how to install and use them, and more information about customizing FreeCAD to your specific needs. - - - - Developers hub - 開發人員中心 - - - - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - This section contains material for developers: How to compile FreeCAD yourself, how the FreeCAD source code is structured + how to navigate in it, how to develop new workbenches and/or embed FreeCAD in your own application. - - - - Manual - 使用說明 - - - - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - The FreeCAD manual is another, more linear way to present the information contained in this wiki. It is made to be read like a book, and will gently introduce you to many other pages from the hubs above. <a href="https://www.gitbook.com/book/yorikvanhavre/a-freecad-manual/details">e-book versions</a> are also available. - - - - Workbenches documentation - 工作台文件 - - - - These are the help pages of all the workbenches currently installed on this computer. - These are the help pages of all the workbenches currently installed on this computer. - - - - Getting help from the community - 從社群取得協助 - - - - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - The <a href="http://forum.freecad.org">FreeCAD forum</a> is a great place to get help from other FreeCAD users and developers. The forum has many sections for different types of issues and discussion subjects. If in doubt, post in the more general <a href="https://forum.freecad.org/viewforum.php?f=3">Help on using FreeCAD</a> section. - - - - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - If it is the first time you are posting on the forum, be sure to <a href="https://forum.freecad.org/viewtopic.php?f=3&t=2264">read the guidelines</a> first! - - - - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - FreeCAD also maintains a public <a href="https://www.freecad.org/tracker">bug tracker</a> where anybody can submit bugs and propose new features. To avoid causing extra work and give the best chances to see your bug solved, make sure you read the <a href="https://forum.freecad.org/viewtopic.php?f=3&t=5236">bug submission guide</a> before posting. - - - - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - Below are the latest changes added to the <a href="http://github.com/FreeCAD/FreeCAD/">FreeCAD source code</a>. These changes might not reflect yet in the FreeCAD version that you are currently running. Check the <a href="https://www.freecad.org/wiki/Downloads">available options</a> if you wish to obtain a development version. - - - - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - The latest posts on the <a href="https://forum.freecad.org">FreeCAD forum</a>: - - - - Available addons - 可以使用的附加元件 - - - - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - Below is a list of available extra workbenches that can be added to your FreeCAD installation. Browse and install them from menu Tools -> Addons manager. You can learn more about any of them by clicking the links below. - - - - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - If not bundled with your FreeCAD version, install the FreeCAD documentation package to get documentation hubs, workbench help and individual command documentation without an internet connection. - - - - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - Cannot fetch information from GitHub. <a href="EnableDownload.py">Authorize FreeCAD to access the internet</a> and reload the Start page. - - - - Recent commits - 最近的提交 - - - - See all commits on github - 查看 Github 上的所有提交 - - - - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - You can configure a custom folder to display here in menu Edit -> Preferences -> Start -> Show additional folder - - - - version - 版本 - - - - build - 建立 - - - - Create new... - 建立新的... - - - - Unknown - 未知 - - - - Forum - 討論區 - - - - To open any of the links above in your desktop browser, Right-click -> Open in external browser - To open any of the links above in your desktop browser, Right-click -> Open in external browser - - - - Creation date - 建立的日期 - - - - Last modification - 最後修改 - - - - Notes - 備註 - - - - Open start page preferences - 開啟開始頁的偏好設定 + + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> + <html><head/><body><p>You can paste your custom CSS here and the Start Page will apply it for you. To learn more about how you can style the Start Page, take a look at the HTML and CSS sources:</p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.html</span></a></p><p><a href="https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css"><span style=" text-decoration: underline; color:#1d99f3;">https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Start/StartPage/StartPage.css</span></a></p></body></html> QObject - + + Start Start diff --git a/src/Mod/TechDraw/App/AppTechDrawPy.cpp b/src/Mod/TechDraw/App/AppTechDrawPy.cpp index 9fb36bb843..f24f71a5d3 100644 --- a/src/Mod/TechDraw/App/AppTechDrawPy.cpp +++ b/src/Mod/TechDraw/App/AppTechDrawPy.cpp @@ -180,6 +180,13 @@ public: "string = removeSvgTags(string) -- Removes the opening and closing svg tags\n" "and other metatags from a svg code, making it embeddable" ); + add_varargs_method("exportSVGEdges", &Module::exportSVGEdges, + "string = exportSVGEdges(TopoShape) -- export an SVG string of the shape\n" + ); + add_varargs_method("build3dCurves", &Module::build3dCurves, + "TopoShape = build3dCurves(TopoShape) -- convert the edges to a 3D curve\n" + "which is useful for shapes obtained Part.HLRBRep.Algo" + ); initialize("This is a module for making drawings"); // register with Python } ~Module() override {} @@ -1224,6 +1231,35 @@ private: return result; } + Py::Object exportSVGEdges(const Py::Tuple& args) + { + PyObject *pcObjShape(nullptr); + + if (!PyArg_ParseTuple(args.ptr(), "O!", + &(TopoShapePy::Type), &pcObjShape)) + throw Py::Exception(); + + TopoShapePy* pShape = static_cast(pcObjShape); + SVGOutput output; + Py::String result(output.exportEdges(pShape->getTopoShapePtr()->getShape())); + + return result; + } + + Py::Object build3dCurves(const Py::Tuple& args) + { + PyObject *pcObjShape(nullptr); + + if (!PyArg_ParseTuple(args.ptr(), "O!", + &(TopoShapePy::Type), &pcObjShape)) + throw Py::Exception(); + + TopoShapePy* pShape = static_cast(pcObjShape); + const TopoShape& nShape = + TechDraw::build3dCurves(pShape->getTopoShapePtr()->getShape()); + + return Py::Object(new TopoShapePy(new TopoShape(nShape))); + } }; PyObject* initModule() diff --git a/src/Mod/TechDraw/App/DrawComplexSection.cpp b/src/Mod/TechDraw/App/DrawComplexSection.cpp index 2e20052a4e..ebcfb76901 100644 --- a/src/Mod/TechDraw/App/DrawComplexSection.cpp +++ b/src/Mod/TechDraw/App/DrawComplexSection.cpp @@ -281,11 +281,12 @@ void DrawComplexSection::makeSectionCut(const TopoDS_Shape& baseShape) connectAlignWatcher = QObject::connect(&m_alignWatcher, &QFutureWatcherBase::finished, &m_alignWatcher, [this] { this->onSectionCutFinished(); }); -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - m_alignFuture = QtConcurrent::run(this, &DrawComplexSection::makeAlignedPieces, baseShape); -#else - m_alignFuture = QtConcurrent::run(&DrawComplexSection::makeAlignedPieces, this, baseShape); -#endif + + // We create a lambda closure to hold a copy of baseShape. + // This is important because this variable might be local to the calling + // function and might get destructed before the parallel processing finishes. + auto lambda = [this, baseShape]{this->makeAlignedPieces(baseShape);}; + m_alignFuture = QtConcurrent::run(std::move(lambda)); m_alignWatcher.setFuture(m_alignFuture); waitingForAlign(true); } diff --git a/src/Mod/TechDraw/App/DrawViewDetail.cpp b/src/Mod/TechDraw/App/DrawViewDetail.cpp index 5da9a48fde..5f5cab16a3 100644 --- a/src/Mod/TechDraw/App/DrawViewDetail.cpp +++ b/src/Mod/TechDraw/App/DrawViewDetail.cpp @@ -187,11 +187,13 @@ void DrawViewDetail::detailExec(TopoDS_Shape& shape, DrawViewPart* dvp, DrawView connectDetailWatcher = QObject::connect(&m_detailWatcher, &QFutureWatcherBase::finished, &m_detailWatcher, [this] { this->onMakeDetailFinished(); }); -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - m_detailFuture = QtConcurrent::run(this, &DrawViewDetail::makeDetailShape, shape, dvp, dvs); -#else - m_detailFuture = QtConcurrent::run(&DrawViewDetail::makeDetailShape, this, shape, dvp, dvs); -#endif + + // We create a lambda closure to hold a copy of shape. + // This is important because this variable might be local to the calling + // function and might get destructed before the parallel processing finishes. + // TODO: What about dvp and dvs? Do they live past makeDetailShape? + auto lambda = [this, shape, dvp, dvs]{this->makeDetailShape(shape, dvp, dvs);}; + m_detailFuture = QtConcurrent::run(std::move(lambda)); m_detailWatcher.setFuture(m_detailFuture); waitingForDetail(true); } diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index 82a085a091..e6f39aef75 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -369,26 +369,18 @@ TechDraw::GeometryObjectPtr DrawViewPart::buildGeometryObject(TopoDS_Shape& shap go->projectShapeWithPolygonAlgo(shape, viewAxis); } else { - // TODO: we should give the thread its own copy of the shape because the passed one will be - // destroyed when the call stack we followed to get here unwinds and the thread could still be - // running. - // Should we pass a smart pointer instead of const& ?? - // bool copyGeometry = true; - // bool copyMesh = false; - // BRepBuilderAPI_Copy copier(shape, copyGeometry, copyMesh); - // copier.Shape(); - //projectShape (the HLR process) runs in a separate thread since it can take a long time //note that &m_hlrWatcher in the third parameter is not strictly required, but using the //4 parameter signature instead of the 3 parameter signature prevents clazy warning: //https://github.com/KDE/clazy/blob/1.11/docs/checks/README-connect-3arg-lambda.md connectHlrWatcher = QObject::connect(&m_hlrWatcher, &QFutureWatcherBase::finished, &m_hlrWatcher, [this] { this->onHlrFinished(); }); -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - m_hlrFuture = QtConcurrent::run(go.get(), &GeometryObject::projectShape, shape, viewAxis); -#else - m_hlrFuture = QtConcurrent::run(&GeometryObject::projectShape, go.get(), shape, viewAxis); -#endif + + // We create a lambda closure to hold a copy of go, shape and viewAxis. + // This is important because those variables might be local to the calling + // function and might get destructed before the parallel processing finishes. + auto lambda = [go, shape, viewAxis]{go->projectShape(shape, viewAxis);}; + m_hlrFuture = QtConcurrent::run(std::move(lambda)); m_hlrWatcher.setFuture(m_hlrFuture); waitingForHlr(true); } @@ -428,11 +420,9 @@ void DrawViewPart::onHlrFinished(void) connectFaceWatcher = QObject::connect(&m_faceWatcher, &QFutureWatcherBase::finished, &m_faceWatcher, [this] { this->onFacesFinished(); }); -#if QT_VERSION < QT_VERSION_CHECK(6,0,0) - m_faceFuture = QtConcurrent::run(this, &DrawViewPart::extractFaces); -#else - m_faceFuture = QtConcurrent::run(&DrawViewPart::extractFaces, this); -#endif + + auto lambda = [this]{this->extractFaces();}; + m_faceFuture = QtConcurrent::run(std::move(lambda)); m_faceWatcher.setFuture(m_faceFuture); waitingForFaces(true); } diff --git a/src/Mod/TechDraw/App/DrawViewPartPy.xml b/src/Mod/TechDraw/App/DrawViewPartPy.xml index e0fd128a37..7b916213f8 100644 --- a/src/Mod/TechDraw/App/DrawViewPartPy.xml +++ b/src/Mod/TechDraw/App/DrawViewPartPy.xml @@ -73,6 +73,16 @@ tag = makeCosmeticCircleArc(center, radius, start, end) - add a CosmeticEdge at center with radius radius(View coordinates) from start angle to end angle. Returns tag of new CosmeticEdge. + + + tag = makeCosmeticCircle3d(center, radius) - add a CosmeticEdge at center (3d point) with radius. Returns tag of new CosmeticEdge. + + + + + tag = makeCosmeticCircleArc3d(center, radius, start, end) - add a CosmeticEdge at center (3d point) with radius from start angle to end angle. Returns tag of new CosmeticEdge. + + ce = getCosmeticEdge(id) - returns CosmeticEdge with unique id. diff --git a/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp b/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp index c1cefa3b7f..90c16212da 100644 --- a/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp @@ -388,9 +388,9 @@ PyObject* DrawViewPartPy::makeCosmeticCircle(PyObject *args) } DrawViewPart* dvp = getDrawViewPartPtr(); - Base::Vector3d pnt1 = DrawUtil::invertY(static_cast(pPnt1)->value()); + Base::Vector3d pnt1 = static_cast(pPnt1)->value(); TechDraw::BaseGeomPtr bg = std::make_shared (pnt1, radius); - std::string newTag = dvp->addCosmeticEdge(bg); + std::string newTag = dvp->addCosmeticEdge(bg->inverted()); TechDraw::CosmeticEdge* ce = dvp->getCosmeticEdge(newTag); if (ce) { ce->permaRadius = radius; @@ -428,9 +428,97 @@ PyObject* DrawViewPartPy::makeCosmeticCircleArc(PyObject *args) //from here on is almost duplicate of makeCosmeticCircle DrawViewPart* dvp = getDrawViewPartPtr(); - Base::Vector3d pnt1 = DrawUtil::invertY(static_cast(pPnt1)->value()); + Base::Vector3d pnt1 = static_cast(pPnt1)->value(); TechDraw::BaseGeomPtr bg = std::make_shared (pnt1, radius, angle1, angle2); - std::string newTag = dvp->addCosmeticEdge(bg); + std::string newTag = dvp->addCosmeticEdge(bg->inverted()); + TechDraw::CosmeticEdge* ce = dvp->getCosmeticEdge(newTag); + if (ce) { + ce->permaRadius = radius; + ce->m_format.m_style = style; + ce->m_format.m_weight = weight; + if (!pColor) + ce->m_format.m_color = defCol; + else + ce->m_format.m_color = DrawUtil::pyTupleToColor(pColor); + } + else { + PyErr_SetString(PyExc_RuntimeError, "DVPPI:makeCosmeticCircleArc - arc creation failed"); + return nullptr; + } + + //int link = + dvp->add1CEToGE(newTag); + dvp->requestPaint(); + + return PyUnicode_FromString(newTag.c_str()); //return tag for new CE +} + +PyObject* DrawViewPartPy::makeCosmeticCircle3d(PyObject *args) +{ + PyObject* pPnt1 = nullptr; + double radius = 5.0; + int style = LineFormat::getDefEdgeStyle(); + double weight = LineFormat::getDefEdgeWidth(); + App::Color defCol = LineFormat::getDefEdgeColor(); + PyObject* pColor = nullptr; + + if (!PyArg_ParseTuple(args, "O!d|idO!", &(Base::VectorPy::Type), &pPnt1, + &radius, + &style, &weight, + &PyTuple_Type, &pColor)) { + return nullptr; + } + + DrawViewPart* dvp = getDrawViewPartPtr(); + Base::Vector3d pnt1 = static_cast(pPnt1)->value(); + // center, project and invert the 3d point + Base::Vector3d centroid = dvp->getOriginalCentroid(); + pnt1 = DrawUtil::invertY(dvp->projectPoint(pnt1 - centroid)); + TechDraw::BaseGeomPtr bg = std::make_shared (pnt1, radius); + std::string newTag = dvp->addCosmeticEdge(bg->inverted()); + TechDraw::CosmeticEdge* ce = dvp->getCosmeticEdge(newTag); + if (ce) { + ce->permaRadius = radius; + ce->m_format.m_style = style; + ce->m_format.m_weight = weight; + ce->m_format.m_color = pColor ? DrawUtil::pyTupleToColor(pColor) : defCol; + } + else { + PyErr_SetString(PyExc_RuntimeError, "DVPPI:makeCosmeticCircle - circle creation failed"); + return nullptr; + } + //int link = + dvp->add1CEToGE(newTag); + dvp->requestPaint(); + + return PyUnicode_FromString(newTag.c_str()); //return tag for new CE +} + +PyObject* DrawViewPartPy::makeCosmeticCircleArc3d(PyObject *args) +{ + PyObject* pPnt1 = nullptr; + double radius = 5.0; + double angle1 = 0.0; + double angle2 = 360.0; + int style = LineFormat::getDefEdgeStyle(); + double weight = LineFormat::getDefEdgeWidth(); + App::Color defCol = LineFormat::getDefEdgeColor(); + PyObject* pColor = nullptr; + + if (!PyArg_ParseTuple(args, "O!ddd|idO!", &(Base::VectorPy::Type), &pPnt1, + &radius, &angle1, &angle2, + &style, &weight, &PyTuple_Type, &pColor)) { + return nullptr; + } + + //from here on is almost duplicate of makeCosmeticCircle + DrawViewPart* dvp = getDrawViewPartPtr(); + Base::Vector3d pnt1 = static_cast(pPnt1)->value(); + // center, project and invert the 3d point + Base::Vector3d centroid = dvp->getOriginalCentroid(); + pnt1 = DrawUtil::invertY(dvp->projectPoint(pnt1 - centroid)); + TechDraw::BaseGeomPtr bg = std::make_shared (pnt1, radius, angle1, angle2); + std::string newTag = dvp->addCosmeticEdge(bg->inverted()); TechDraw::CosmeticEdge* ce = dvp->getCosmeticEdge(newTag); if (ce) { ce->permaRadius = radius; diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index f29486b417..cb72d0d190 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -462,11 +462,12 @@ void DrawViewSection::sectionExec(TopoDS_Shape& baseShape) QObject::connect(&m_cutWatcher, &QFutureWatcherBase::finished, &m_cutWatcher, [this] { this->onSectionCutFinished(); }); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - m_cutFuture = QtConcurrent::run(this, &DrawViewSection::makeSectionCut, baseShape); -#else - m_cutFuture = QtConcurrent::run(&DrawViewSection::makeSectionCut, this, baseShape); -#endif + + // We create a lambda closure to hold a copy of baseShape. + // This is important because this variable might be local to the calling + // function and might get destructed before the parallel processing finishes. + auto lambda = [this, baseShape]{this->makeSectionCut(baseShape);}; + m_cutFuture = QtConcurrent::run(std::move(lambda)); m_cutWatcher.setFuture(m_cutFuture); waitingForCut(true); } diff --git a/src/Mod/TechDraw/App/Geometry.cpp b/src/Mod/TechDraw/App/Geometry.cpp index b0c0d300ae..2a7d2e8138 100644 --- a/src/Mod/TechDraw/App/Geometry.cpp +++ b/src/Mod/TechDraw/App/Geometry.cpp @@ -423,7 +423,7 @@ bool BaseGeom::closed() // return a BaseGeom similar to this, but inverted with respect to Y axis BaseGeomPtr BaseGeom::inverted() { - Base::Console().Message("BG::inverted()\n"); +// Base::Console().Message("BG::inverted()\n"); TopoDS_Shape invertedShape = ShapeUtils::invertGeometry(occEdge); TopoDS_Edge invertedEdge = TopoDS::Edge(invertedShape); return baseFactory(invertedEdge); diff --git a/src/Mod/TechDraw/App/Geometry.h b/src/Mod/TechDraw/App/Geometry.h index ff13526280..504f722d7e 100644 --- a/src/Mod/TechDraw/App/Geometry.h +++ b/src/Mod/TechDraw/App/Geometry.h @@ -147,6 +147,11 @@ class TechDrawExport BaseGeom : public std::enable_shared_from_this void setCosmeticTag(std::string t) { cosmeticTag = t; } Part::TopoShape asTopoShape(double scale); + virtual double getStartAngle() { return 0.0; } + virtual double getEndAngle() { return 0.0; } + virtual bool clockwiseAngle() { return false; } + virtual void clockwiseAngle(bool direction) { (void) direction; } + protected: void createNewTag(); @@ -217,6 +222,10 @@ class TechDrawExport AOE: public Ellipse ~AOE() override = default; public: + double getStartAngle() override { return startAngle; } + double getEndAngle() override { return endAngle; } + bool clockwiseAngle() override { return cw; } + void clockwiseAngle(bool direction) override { cw = direction; } Base::Vector3d startPnt; //TODO: The points are used for drawing, the angles for bounding box calcs - seems redundant Base::Vector3d endPnt; Base::Vector3d midPnt; @@ -241,6 +250,11 @@ class TechDrawExport AOC: public Circle ~AOC() override = default; public: + double getStartAngle() override { return startAngle; } + double getEndAngle() override { return endAngle; } + bool clockwiseAngle() override { return cw; } + void clockwiseAngle(bool direction) override { cw = direction; } + std::string toString() const override; void Save(Base::Writer& w) const override; void Restore(Base::XMLReader& r) override; @@ -284,6 +298,9 @@ class TechDrawExport BSpline: public BaseGeom ~BSpline() override = default; public: + double getStartAngle() override { return startAngle; } + double getEndAngle() override { return endAngle; } + Base::Vector3d startPnt; Base::Vector3d endPnt; Base::Vector3d midPnt; diff --git a/src/Mod/TechDraw/App/ProjectionAlgos.cpp b/src/Mod/TechDraw/App/ProjectionAlgos.cpp index 2a6842dc86..cd88254d11 100644 --- a/src/Mod/TechDraw/App/ProjectionAlgos.cpp +++ b/src/Mod/TechDraw/App/ProjectionAlgos.cpp @@ -50,6 +50,18 @@ using namespace std; // ProjectionAlgos //=========================================================================== +namespace TechDraw { + //added by tanderson. aka blobfish. + //projection algorithms build a 2d curve(pcurve) but no 3d curve. + //this causes problems with meshing algorithms after save and load. + const TopoDS_Shape& build3dCurves(const TopoDS_Shape &shape) + { + TopExp_Explorer it; + for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next()) + BRepLib::BuildCurve3d(TopoDS::Edge(it.Current())); + return shape; + } +} ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d &Dir) : Input(Input), Direction(Dir) @@ -61,16 +73,6 @@ ProjectionAlgos::~ProjectionAlgos() { } -//added by tanderson. aka blobfish. -//projection algorithms build a 2d curve(pcurve) but no 3d curve. -//this causes problems with meshing algorithms after save and load. -static const TopoDS_Shape& build3dCurves(const TopoDS_Shape &shape) -{ - TopExp_Explorer it; - for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next()) - BRepLib::BuildCurve3d(TopoDS::Edge(it.Current())); - return shape; -} void ProjectionAlgos::execute() { diff --git a/src/Mod/TechDraw/App/ProjectionAlgos.h b/src/Mod/TechDraw/App/ProjectionAlgos.h index f4e8199fe1..771661e0c8 100644 --- a/src/Mod/TechDraw/App/ProjectionAlgos.h +++ b/src/Mod/TechDraw/App/ProjectionAlgos.h @@ -38,6 +38,8 @@ class BRepAdaptor_Curve; namespace TechDraw { + const TopoDS_Shape& build3dCurves(const TopoDS_Shape& shape); + /** Algo class for projecting shapes and creating SVG output of it */ class TechDrawExport ProjectionAlgos diff --git a/src/Mod/TechDraw/Gui/CMakeLists.txt b/src/Mod/TechDraw/Gui/CMakeLists.txt index fb93a034ba..8329fa4690 100644 --- a/src/Mod/TechDraw/Gui/CMakeLists.txt +++ b/src/Mod/TechDraw/Gui/CMakeLists.txt @@ -87,6 +87,7 @@ set(TechDrawGui_UIC_SRCS TaskProjection.ui TaskComplexSection.ui TaskDimRepair.ui + TaskCosmeticCircle.ui ) @@ -228,6 +229,9 @@ SET(TechDrawGui_SRCS TaskDimRepair.cpp TaskDimRepair.h TaskDimRepair.ui + TaskCosmeticCircle.cpp + TaskCosmeticCircle.h + TaskCosmeticCircle.ui Widgets/CompassDialWidget.cpp Widgets/CompassDialWidget.h Widgets/CompassWidget.cpp diff --git a/src/Mod/TechDraw/Gui/CommandAnnotate.cpp b/src/Mod/TechDraw/Gui/CommandAnnotate.cpp index b3ed6e0ea3..ef3b6cdcba 100644 --- a/src/Mod/TechDraw/Gui/CommandAnnotate.cpp +++ b/src/Mod/TechDraw/Gui/CommandAnnotate.cpp @@ -57,6 +57,7 @@ #include "TaskRichAnno.h" #include "TaskSurfaceFinishSymbols.h" #include "TaskWeldingSymbol.h" +#include "TaskCosmeticCircle.h" #include "ViewProviderViewPart.h" @@ -73,6 +74,7 @@ void execCenterLine(Gui::Command* cmd); void exec2LineCenterLine(Gui::Command* cmd); void exec2PointCenterLine(Gui::Command* cmd); void execLine2Points(Gui::Command* cmd); +void execCosmeticCircle(Gui::Command* cmd); std::vector getSelectedSubElements(Gui::Command* cmd, TechDraw::DrawViewPart* &dvp, std::string subType = "Edge"); @@ -1110,6 +1112,153 @@ void execLine2Points(Gui::Command* cmd) is3d)); } +//=========================================================================== +// TechDraw_CosmeticCircle +//=========================================================================== + +DEF_STD_CMD_A(CmdTechDrawCosmeticCircle) + +CmdTechDrawCosmeticCircle::CmdTechDrawCosmeticCircle() + : Command("TechDraw_CosmeticCircle") +{ + sAppModule = "TechDraw"; + sGroup = QT_TR_NOOP("TechDraw"); + sMenuText = QT_TR_NOOP("Add Cosmetic Circle"); + sToolTipText = sMenuText; + sWhatsThis = "TechDraw_CosmeticCircle"; + sStatusTip = sToolTipText; + sPixmap = "actions/TechDraw_CosmeticCircle"; +} + +void CmdTechDrawCosmeticCircle::activated(int iMsg) +{ + Q_UNUSED(iMsg); + + Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); + if (dlg) { + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), + QObject::tr("Close active task dialog and try again.")); + return; + } + + execCosmeticCircle(this); + + updateActive(); + Gui::Selection().clearSelection(); +} + +bool CmdTechDrawCosmeticCircle::isActive() +{ + bool havePage = DrawGuiUtil::needPage(this); + bool haveView = DrawGuiUtil::needView(this, true); + return (havePage && haveView); +} + +void execCosmeticCircle(Gui::Command* cmd) +{ + TechDraw::DrawPage* page = DrawGuiUtil::findPage(cmd); + if (!page) { + return; + } + + std::vector selection = cmd->getSelection().getSelectionEx(); + TechDraw::DrawViewPart* baseFeat = nullptr; + std::vector subNames2D; + std::vector< std::pair > objs3D; + if (selection.empty()) { + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong Selection"), + QObject::tr("Selection is empty.")); + return; + } + + for (auto& so: selection) { + if (so.getObject()->isDerivedFrom(TechDraw::DrawViewPart::getClassTypeId())) { + baseFeat = static_cast (so.getObject()); + subNames2D = so.getSubNames(); + } else if (so.getObject()->isDerivedFrom(Part::Feature::getClassTypeId())) { + std::vector subNames3D = so.getSubNames(); + for (auto& sub3D: subNames3D) { + std::pair temp; + temp.first = static_cast(so.getObject()); + temp.second = sub3D; + objs3D.push_back(temp); + } + } else { + //garbage + } + } + + if (!baseFeat) { + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong Selection"), + QObject::tr("You must select a base View for the circle.")); + return; + } + + std::vector edgeNames; + std::vector vertexNames; + for (auto& s: subNames2D) { + std::string geomType = DrawUtil::getGeomTypeFromName(s); + if (geomType == "Vertex") { + vertexNames.push_back(s); + } else if (geomType == "Edge") { + edgeNames.push_back(s); + } + } + + //check if editing existing edge + if (!edgeNames.empty() && (edgeNames.size() == 1)) { + TechDraw::CosmeticEdge* ce = baseFeat->getCosmeticEdgeBySelection(edgeNames.front()); + if (!ce) { + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong Selection"), + QObject::tr("Selection is not a Cosmetic edge.")); + return; + } + Gui::Control().showDialog(new TaskDlgCosmeticCircle(baseFeat, + edgeNames.front())); + return; + } + + std::vector points; + std::vector is3d; + //get the 2D points + if (!vertexNames.empty()) { + for (auto& v2d: vertexNames) { + int idx = DrawUtil::getIndexFromName(v2d); + TechDraw::VertexPtr v = baseFeat->getProjVertexByIndex(idx); + if (v) { + points.push_back(v->point()); + is3d.push_back(false); + } + } + } + //get the 3D points + if (!objs3D.empty()) { + for (auto& o3D: objs3D) { + int idx = DrawUtil::getIndexFromName(o3D.second); + Part::TopoShape s = o3D.first->Shape.getShape(); + TopoDS_Vertex v = TopoDS::Vertex(s.getSubShape(TopAbs_VERTEX, idx)); + Base::Vector3d p = DrawUtil::vertex2Vector(v); + points.push_back(p); + is3d.push_back(true); + } + } + + if (points.empty()) { + QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong Selection"), + QObject::tr("Please select a center for the circle.")); + return; + } + + bool centerIs3d = false; + if (!is3d.empty()) { + centerIs3d = is3d.front(); + } + + Gui::Control().showDialog(new TaskDlgCosmeticCircle(baseFeat, + points.front(), + centerIs3d)); +} + //=========================================================================== // TechDraw_CosmeticEraser //=========================================================================== @@ -1500,6 +1649,7 @@ void CreateTechDrawCommandsAnnotate() rcCmdMgr.addCommand(new CmdTechDraw2LineCenterLine()); rcCmdMgr.addCommand(new CmdTechDraw2PointCenterLine()); rcCmdMgr.addCommand(new CmdTechDraw2PointCosmeticLine()); + rcCmdMgr.addCommand(new CmdTechDrawCosmeticCircle()); rcCmdMgr.addCommand(new CmdTechDrawAnnotation()); rcCmdMgr.addCommand(new CmdTechDrawCosmeticEraser()); rcCmdMgr.addCommand(new CmdTechDrawDecorateLine()); diff --git a/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc b/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc index 84bc48b256..e19c7dad52 100644 --- a/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc +++ b/src/Mod/TechDraw/Gui/Resources/TechDraw.qrc @@ -54,6 +54,7 @@ icons/actions/TechDraw_WeldSymbol.svg icons/actions/TechDraw_SurfaceFinishSymbols.svg icons/actions/TechDraw_ComplexSection.svg + icons/actions/TechDraw_CosmeticCircle.svg icons/arrow-ccw.svg icons/arrow-cw.svg icons/arrow-down.svg diff --git a/src/Mod/TechDraw/Gui/Resources/icons/actions/TechDraw_CosmeticCircle.svg b/src/Mod/TechDraw/Gui/Resources/icons/actions/TechDraw_CosmeticCircle.svg new file mode 100644 index 0000000000..22efc682e8 --- /dev/null +++ b/src/Mod/TechDraw/Gui/Resources/icons/actions/TechDraw_CosmeticCircle.svg @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts index 8eaf9f453c..704c86144c 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw.ts @@ -2141,8 +2141,8 @@ - - + + Edit SectionView @@ -3522,8 +3522,8 @@ - - + + Operation Failed @@ -3826,7 +3826,7 @@ it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. @@ -3840,7 +3840,7 @@ it has a weld symbol that would become broken. - + Object dependencies @@ -6056,11 +6056,12 @@ Do you want to continue? + ComplexSection - + Can not continue. Object * %1 or %2 not found. @@ -7821,7 +7822,7 @@ using the given X/Y Spacing - + Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts index c8122fb90c..cea300e9a3 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_be.ts @@ -2141,8 +2141,8 @@ Стварыць складовы перасек - - + + Edit SectionView Змяніць выгляд перасеку @@ -3522,8 +3522,8 @@ Напрамак выгляду ў каардынатах асноўнага выгляду - - + + Operation Failed Аперацыя завяршылася няўдачай @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. Вы не можаце выдаліць лінію зноскі, бо на ёй ёсць знак зварнога шва, які можа стаць пашкоджаным. - + You cannot delete this view because it has one or more dependent views that would become broken. Вы не можаце выдаліць выгляд, бо ў ім ёсць адзін ці некалькі залежных выглядаў, якія могуць стаць пашкоджанымі. @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies Залежнасці аб'екта @@ -5603,7 +5603,7 @@ Do you want to continue? Save PDF file - Save PDF file + Захаваць файл PDF @@ -6096,11 +6096,12 @@ Do you want to continue? + ComplexSection Складовы перасек - + Can not continue. Object * %1 or %2 not found. Не атрымалася прыцягнуць. Аб'ект * %1 ці %2 не знойдзены. @@ -7867,7 +7868,7 @@ using the given X/Y Spacing Няма чаго прымяняць. Напрамак перасеку яшчэ не абраны - + Can not continue. Object * %1 or %2 not found. Не атрымалася прыцягнуць. Аб'ект * %1 ці %2 не знойдзены. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts index 01e6f940e4..311e81edd7 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ca.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Ha fallat l'operació @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. No podeu suprimir aquesta línia guia perquè conté un símbol de soldadura que es trencaria. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies Dependències de l'objecte @@ -6086,11 +6086,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7862,7 +7863,7 @@ usant l'espaiat X/Y donat No hi ha res a aplicar. Encara no s'ha triat la direcció de la secció - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts index eacbc7e25a..5bc2570d09 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_cs.ts @@ -134,12 +134,12 @@ Insert Arch Workbench Object - Vložit objekt pracovního prostředí Arch + Vložit objekt pracovního prostředí architektury Insert a View of a Section Plane from Arch Workbench - Vložit pohled roviny řezu z pracovního prostředí Arch + Vloží pohled roviny řezu z pracovního prostředí architektury @@ -152,7 +152,7 @@ Insert Balloon Annotation - Vloží balonový popisek + Vloží balonovou poznámku @@ -341,12 +341,12 @@ Insert Draft Workbench Object - Vložit objekt pracovního prostředí Draft + Vložit objekt pracovního prostředí návrhu Insert a View of a Draft Workbench object - Vložit zobrazení objektu z pracovního prostředí Draft + Vloží pohled na objekt z pracovního prostředí návrhu @@ -436,7 +436,7 @@ Evenly space horizontal dimensions:<br>- Specify the cascade spacing (optional)<br>- Select two or more horizontal dimensions<br>- The first dimension defines the position<br>- Click this tool - Rovnoměrné rozmístění horizontálních rozměrů:<br>- Zadejte kaskádové rozmístění (volitelné)<br>- Vyberte dva nebo více horizontálních rozměrů<br>- První rozměr určuje polohu<br>- Klikněte na tento nástroj + Rovnoměrné rozmístění vodorovných rozměrů:<br>- Zadejte kaskádové rozmístění (volitelné)<br>- Vyberte dva nebo více vodorovných rozměrů<br>- První rozměr určuje polohu<br>- Klikněte na tento nástroj @@ -456,7 +456,7 @@ Evenly space horizontal dimensions:<br>- Specify the cascade spacing (optional)<br>- Select two or more horizontal dimensions<br>- The first dimension defines the position<br>- Click this tool - Rovnoměrné rozmístění horizontálních rozměrů:<br>- Zadejte kaskádové rozmístění (volitelné)<br>- Vyberte dva nebo více horizontálních rozměrů<br>- První rozměr určuje polohu<br>- Klikněte na tento nástroj + Rovnoměrné rozmístění vodorovných rozměrů:<br>- Zadejte kaskádové rozmístění (volitelné)<br>- Vyberte dva nebo více vodorovných rozměrů<br>- První rozměr určuje polohu<br>- Klikněte na tento nástroj @@ -476,7 +476,7 @@ Evenly space oblique dimensions:<br>- Specify the cascade spacing (optional)<br>- Select two or more parallel oblique dimensions<br>- The first dimension defines the position<br>- Click this tool - Rozměry dvojité kliky:<br>- Určete mezeru mezi kaskádami (volitelné)<br>- Vyberte dva nebo více paralelních rozměrů lomu<br>- První rozměr definuje pozici<br>- Klikněte na tento nástroj + Rovnoměrné rozmístění šikmých rozměrů:<br>- Zadejte kaskádové rozmístění (volitelné)<br>- Vyberte dva nebo více šikmých paralelních rozměrů<br>- První rozměr určuje polohu<br>- Klikněte na tento nástroj @@ -496,7 +496,7 @@ Evenly space vertical dimensions:<br>- Specify the cascade spacing (optional)<br>- Select two or more vertical dimensions<br>- The first dimension defines the position<br>- Click this tool - Svislé rozměry prostoru ve svislém směru:<br>- Určete mezeru mezi kaskádami (volitelné)<br>- Vyberte dva nebo více vertikálních rozměrů<br>- První rozměr definuje pozici<br>- klikněte na tento nástroj + Rovnoměrné rozmístění svislých rozměrů:<br>- Zadejte kaskádové rozmístění (volitelné)<br>- Vyberte dva nebo více svislých rozměrů<br>- První rozměr určuje polohu<br>- Klikněte na tento nástroj @@ -1168,7 +1168,7 @@ Position Oblique Chain Dimensions - Rozměry segmentu pozice + Poloha šikmého řetězce @@ -2001,7 +2001,7 @@ Create DraftView - Vytvořit Draft pohled + Vytvořit pohled návrhu @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3435,14 +3435,14 @@ Rich text creator - Rozšířený editor textu + Editor rozsáhlého textu Rich text editor - Rozšířený editor textu + Editor rozsáhlého textu @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operace se nezdařila @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. Nemůžete smazat tento odkaz, protože obsahuje symbol svaru, který by se rozbil. - + You cannot delete this view because it has one or more dependent views that would become broken. Nemůžete smazat tento názor, protože má jeden nebo více závislých názorů, které by byly porušeny. @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies Závislosti objektu @@ -4375,7 +4375,7 @@ při vylíhnutí plochy s modelem PAT Annotation - Vysvětlivka + Poznámka @@ -4538,7 +4538,7 @@ při vylíhnutí plochy s modelem PAT Shape of balloon annotations - Shape of balloon annotations + Tvar balonových poznámek @@ -6095,11 +6095,12 @@ Chcete pokračovat? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -6125,12 +6126,12 @@ Chcete pokračovat? Position from the view center - Position from the view center + Pozice ze středu pohledu Position - Position + Poloha @@ -6282,7 +6283,7 @@ Chcete pokračovat? Position - Position + Poloha @@ -6550,7 +6551,7 @@ Chcete pokračovat? Click to drag detail highlight to new position - Click to drag detail highlight to new position + Kliknutím přetáhnete zvýraznění detailu na novou polohu @@ -6566,7 +6567,7 @@ Chcete pokračovat? x position of detail highlight within view - x position of detail highlight within view + poloha x detailního zvýraznění v pohledu @@ -6576,7 +6577,7 @@ Chcete pokračovat? y position of detail highlight within view - y position of detail highlight within view + poloha y detailního zvýraznění v pohledu @@ -7635,7 +7636,7 @@ using the given X/Y Spacing Rich Text Annotation Block - Blok rozšířené textové poznámky + Blok rozsáhlé textové poznámky @@ -7655,7 +7656,7 @@ using the given X/Y Spacing Start Rich Text Editor - Otevřít rozšířený textový editor + Otevřít editor rozsáhlého textu @@ -7725,12 +7726,12 @@ using the given X/Y Spacing Input the annotation text directly or start the rich text editor - Input the annotation text directly or start the rich text editor + Vložte text poznámky přímo nebo spusťte editor rozsáhlého textu RichTextAnnotation - RichTextAnnotation + RozsáhláTextováPoznámka @@ -7843,7 +7844,7 @@ using the given X/Y Spacing Position from the 3D origin of the object in the view - Position from the 3D origin of the object in the view + Poloha z počátku 3D objektu v pohledu @@ -7871,7 +7872,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -8420,7 +8421,7 @@ using the given X/Y Spacing TechDraw Annotation - TechDraw Annotation + TechDraw poznámka @@ -8649,7 +8650,7 @@ using the given X/Y Spacing Add hole or shaft fit - Přidat uložení otvoru nebo hřídele + Přidat díru nebo uložení hřídele @@ -8658,11 +8659,11 @@ using the given X/Y Spacing - click the tool button, a panel opens<br> - select shaft fit / hole fit<br> - select the desired ISO 286 fit field using the combo box - Add a hole or shaft fit to a dimension<br> - - select one length dimension or diameter dimension<br> - - click the tool button, a panel opens<br> - - select shaft fit / hole fit<br> - - select the desired ISO 286 fit field using the combo box + Přidat díru nebo uložení hřídele do rozměru<br> + - vyberte jeden rozměr délky nebo rozměr průměru<br> + - klikněte na tlačítko nástroje, otevře se panel<br> + - vyberte požadovanou položku pro umístění hřídele / díry<br> + - vyberte požadované pole ISO 286 pomocí kompaktního boxu @@ -8865,7 +8866,7 @@ je zde otevřený dialog. Annotation - Vysvětlivka + Poznámka @@ -8897,7 +8898,7 @@ je zde otevřený dialog. Draft - Ponor + Zkosení diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts index e79839fdbf..0f407f8483 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_de.ts @@ -2141,8 +2141,8 @@ Komplexe Schnittansicht erstellen - - + + Edit SectionView Schnittansicht bearbeiten @@ -3372,7 +3372,7 @@ PDF (*.pdf) - PDF (*.PDF) + PDF (*.pdf) @@ -3522,8 +3522,8 @@ Die Richtung derAnsicht in BaseView-Koordinaten - - + + Operation Failed Vorgang fehlgeschlagen @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. Diese Hinweislinie kann nicht gelöscht werden, weil ihr ein Schweißsymbol zugeordnet ist, das dadurch unbrauchbar werden würde. - + You cannot delete this view because it has one or more dependent views that would become broken. Diese Ansicht kann nicht gelöscht werden, da von ihr eine oder mehrere Ansichten abhängen, die beschädigt werden könnten. @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies Objektabhängigkeiten @@ -5597,12 +5597,12 @@ Do you want to continue? Save PDF file - Save PDF file + PDF-Datei speichern PDF (*.pdf) - PDF (*.PDF) + PDF (*.pdf) @@ -6090,11 +6090,12 @@ Do you want to continue? + ComplexSection Komplexe Schnittansicht - + Can not continue. Object * %1 or %2 not found. Kann nicht fortfahren. Objekt * %1 oder %2 nicht gefunden. @@ -7861,7 +7862,7 @@ mit dem vorgegebenen X/Y-Abstand Nichts zu tun. Es wurde keine Schnittausrichtung ausgewählt - + Can not continue. Object * %1 or %2 not found. Kann nicht fortfahren. Objekt * %1 oder %2 nicht gefunden. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts index 4e0de02f8f..27cbd917fe 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_el.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Εξαρτήσεις αντικειμένου @@ -6099,11 +6099,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7875,7 +7876,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts index 4435336d8d..5c999b5011 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-AR.ts @@ -2141,8 +2141,8 @@ Crear sección compleja - - + + Edit SectionView Editar vista de corte @@ -3522,8 +3522,8 @@ La dirección de la vista en coordenadas BaseView - - + + Operation Failed Operación Fallida @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. tiene un símbolo de soldadura que se rompería. - + You cannot delete this view because it has one or more dependent views that would become broken. No puede eliminar esta vista porque tiene una o más vistas dependientes que se romperían. @@ -3844,7 +3844,7 @@ tiene un símbolo de soldadura que se rompería. - + Object dependencies Dependencias del objeto @@ -5603,7 +5603,7 @@ Do you want to continue? Save PDF file - Save PDF file + Guardar archivo PDF @@ -6097,11 +6097,12 @@ Do you want to continue? + ComplexSection - Sección Compleja + Sección compleja - + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. @@ -7873,7 +7874,7 @@ usando el espacio X/Y dado Nada que aplicar. Aún no se seleccionó la dirección del corte - + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. @@ -8907,7 +8908,7 @@ hay un diálogo de tareas abiertas. LeaderLine - Línea de Referencia + Línea de referencia @@ -8947,7 +8948,7 @@ hay un diálogo de tareas abiertas. GeomHatch - GeomHatch + RayadoGeométrico diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts index 59c1955cdd..1dd7ec343a 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_es-ES.ts @@ -2141,8 +2141,8 @@ Crear sección compleja - - + + Edit SectionView Editar Vista de Sección @@ -3522,8 +3522,8 @@ La dirección de la vista en coordenadas BaseView - - + + Operation Failed Operación fallida @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. tiene un símbolo de soldadura que se rompería. - + You cannot delete this view because it has one or more dependent views that would become broken. No se puede borrar esta vista porque tiene una o más vistas dependientes que se romperían. @@ -3844,7 +3844,7 @@ tiene un símbolo de soldadura que se rompería. - + Object dependencies Dependencias del objeto @@ -5603,7 +5603,7 @@ Do you want to continue? Save PDF file - Save PDF file + Guardar archivo PDF @@ -6097,11 +6097,12 @@ Do you want to continue? + ComplexSection Sección Compleja - + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. @@ -7873,7 +7874,7 @@ usando el Espaciado X/Y dado Nada que aplicar. No se ha elegido todavía la dirección de la sección - + Can not continue. Object * %1 or %2 not found. No se puede continuar. Objeto * %1 o %2 no encontrado. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts index 5f4486f889..00eaaebf4e 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_eu.ts @@ -2141,8 +2141,8 @@ Sortu sekzio konplexua - - + + Edit SectionView Editatu sekzio-bista @@ -3522,8 +3522,8 @@ Bistaren norabidea oinarri-bistaren koordenatuetan - - + + Operation Failed Eragiketak huts egin du @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. hautsi daitekeen soldadura-ikur bat duelako. - + You cannot delete this view because it has one or more dependent views that would become broken. Ezin da bista hau ezabatu, hautsita geratuko liratekeen mendeko bista bat edo gehiago dituelako. @@ -3844,7 +3844,7 @@ hautsi daitekeen soldadura-ikur bat duelako. - + Object dependencies Objektuaren mendekotasunak @@ -5606,7 +5606,7 @@ Jarraitu nahi duzu? Save PDF file - Save PDF file + Gorde PDF fitxategia @@ -6100,11 +6100,12 @@ Jarraitu nahi duzu? + ComplexSection Sekzio konplexua - + Can not continue. Object * %1 or %2 not found. Ezin da jarraitu. Ez da * %1 edo %2 objektua aurkitu. @@ -7876,7 +7877,7 @@ emandako X/Y espazioa erabilita Ez dago aplikatzeko ezer. Oraindik ez da sekzio-norabiderik aukeratu - + Can not continue. Object * %1 or %2 not found. Ezin da jarraitu. Ez da * %1 edo %2 objektua aurkitu. @@ -8792,7 +8793,7 @@ emandako X/Y espazioa erabilita You cannot delete this balloon now because there is an open task dialog. - Ezin da bunbuilo hau ezabatu orain zeregin baten + Ezin da bunbuilo hau ezabatu orain ataza baten elkarrizketa-koadroa irekita dagoelako. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts index bb565a1b5e..69f3bbe890 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fi.ts @@ -2141,8 +2141,8 @@ Luo monitasoinen leikkaus - - + + Edit SectionView Muokkaa leikkausnäkymää @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Toiminto ei onnistunut @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. Tätä Reittiviivaa ei voi poistaa, koska siihen on liitetty hitsaussymboli, joka rikkoutuisi. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies Objektin riippuvuudet @@ -6091,11 +6091,12 @@ Haluatko jatkaa? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Ei voi jatkaa. Objektia *%1 tai %2 ei löytynyt. @@ -7865,7 +7866,7 @@ käyttäen annettuja X/Y-välimatkoja Ei mitään suoritettavaa. Poikkileikkaussuuntaa ei ole vielä valittu - + Can not continue. Object * %1 or %2 not found. Ei voi jatkaa. Objektia *%1 tai %2 ei löytynyt. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts index 1747fa14d4..7a1601d8e0 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_fr.ts @@ -2294,8 +2294,8 @@ Créer une vue en coupe complexe - - + + Edit SectionView Éditer la vue en coupe @@ -3676,8 +3676,8 @@ Direction de la vue dans les coordonnées de la vue de base - - + + Operation Failed L'opération a échoué @@ -3984,7 +3984,7 @@ it has a weld symbol that would become broken. elle comporte un symbole de soudure qui se casserait. - + You cannot delete this view because it has one or more dependent views that would become broken. Vous ne pouvez pas supprimer cette vue car elle possède une ou plusieurs vues dépendantes qui deviendraient orphelines. @@ -3998,7 +3998,7 @@ elle comporte un symbole de soudure qui se casserait. - + Object dependencies Dépendances des objets @@ -5751,7 +5751,7 @@ Do you want to continue? Save PDF file - Save PDF file + Enregistrer le fichier PDF @@ -6245,11 +6245,12 @@ Do you want to continue? + ComplexSection Coupe complexe - + Can not continue. Object * %1 or %2 not found. Impossible de continuer. Objet * %1 ou %2 non trouvé. @@ -8022,7 +8023,7 @@ Peut être lent pour les modèles complexes. Rien à appliquer. Aucune direction de section n'a encore été choisie - + Can not continue. Object * %1 or %2 not found. Impossible de continuer. Objet * %1 ou %2 non trouvé. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts index 21b8e3a934..bf0bdbd363 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_gl.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Dependencias do obxecto @@ -6099,11 +6099,12 @@ Quere seguir? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7875,7 +7876,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts index a6517160ba..b6a99de89a 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hr.ts @@ -2157,8 +2157,8 @@ Stvorite složeni presjek - - + + Edit SectionView Uređivanje pogleda presjeka @@ -3544,8 +3544,8 @@ Smjer pogleda u koordinatama baznog pogleda - - + + Operation Failed Operacija nije uspjela @@ -3856,7 +3856,7 @@ ima simbol spajanja koji bi se pokidao. - + You cannot delete this view because it has one or more dependent views that would become broken. Ne možete izbrisati ovaj pogled jer ima jedan ili više ovisnih prikaza koji bi se slomili. @@ -3870,7 +3870,7 @@ ima simbol spajanja koji bi se pokidao. - + Object dependencies Zavisnosti objekta @@ -6184,11 +6184,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Ne može se nastaviti. Objekt * %1 ili %2 nije pronađen. @@ -7968,7 +7969,7 @@ koristeći zadani X/Y razmak Ništa se ne primjenjuje. Još nije odabran pravac presjeka - + Can not continue. Object * %1 or %2 not found. Ne može se nastaviti. Objekt * %1 ili %2 nije pronađen. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts index acbde01150..2883e82279 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_hu.ts @@ -2141,8 +2141,8 @@ Összetett szakasz létrehozása - - + + Edit SectionView Szakasznézet szerkesztés @@ -3522,8 +3522,8 @@ Az alapnézet koordinátái által meghatározott irány megtekintése - - + + Operation Failed Sikertelen művelet @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. olyan hegesztési szimbólummal rendelkezik, amely megtörne. - + You cannot delete this view because it has one or more dependent views that would become broken. Nem törölheti ezt a nézetet, mert egy vagy több nézetnek függősége van, amely megszakadna. @@ -3844,7 +3844,7 @@ olyan hegesztési szimbólummal rendelkezik, amely megtörne. - + Object dependencies Objektumfüggőségek @@ -6093,11 +6093,12 @@ Szeretné folytatni? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Nem folytatható. * %1 vagy %2 tárgy nem található. @@ -7868,7 +7869,7 @@ a megadott X/Y távolság használatával Nincs mit alkalmazni. Még nincs a szakaszirány kiválasztva - + Can not continue. Object * %1 or %2 not found. Nem folytatható. * %1 vagy %2 tárgy nem található. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts index f565ba146e..896e41b137 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_id.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. View ini tidak dapat dihapus karena beberapa view yang terhubung akan rusak. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Objek dependensi @@ -6097,11 +6097,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7873,7 +7874,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts index 6be05e0d45..a852851a14 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_it.ts @@ -2143,8 +2143,8 @@ Crea Sezione Complessa - - + + Edit SectionView Modifica Vista Sezione @@ -3524,8 +3524,8 @@ La direzione della vista nelle coordinate BaseView - - + + Operation Failed Operazione non riuscita @@ -3832,7 +3832,7 @@ it has a weld symbol that would become broken. essa ha un simbolo di saldatura che si romperebbe. - + You cannot delete this view because it has one or more dependent views that would become broken. Non puoi eliminare questa vista perché ha una o più viste dipendenti che diventerebbero orfani. @@ -3846,7 +3846,7 @@ it has a weld symbol that would become broken. - + Object dependencies Dipendenze dell'oggetto @@ -6098,11 +6098,12 @@ Do you want to continue? + ComplexSection Sezione complessa - + Can not continue. Object * %1 or %2 not found. Impossibile continuare. Oggetto * %1 o %2 non trovato. @@ -7873,7 +7874,7 @@ usando la spaziatura X/Y specificata Nulla da applicare. Nessuna direzione di sezione selezionata - + Can not continue. Object * %1 or %2 not found. Impossibile continuare. Oggetto * %1 o %2 non trovato. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts index 194fc2c871..35b37f6800 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ja.ts @@ -2141,8 +2141,8 @@ 複雑な断面を作成 - - + + Edit SectionView 断面ビューを編集 @@ -3522,8 +3522,8 @@ BaseView 座標内のビュー方向 - - + + Operation Failed 操作に失敗しました @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. 壊れてしまう溶接記号があるため、この引き出し線を削除することはできません。 - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies オブジェクトの依存関係 @@ -6088,11 +6088,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7860,7 +7861,7 @@ using the given X/Y Spacing 適用対象がありません。断面方向が未選択です。 - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts index b5ad9df16f..142cf5d387 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ka.ts @@ -2141,8 +2141,8 @@ რთული კვეთის შექმნა - - + + Edit SectionView სექციის ხედის ჩასწორება @@ -3522,8 +3522,8 @@ ხედის მიმართულება BaseView-ის კოორდინატებში - - + + Operation Failed ოპერაცია წარუმატებლად დასრულდა @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. რომ მას აქვს შედუღების ნიშანი, რომელიც გაფუჭდება. - + You cannot delete this view because it has one or more dependent views that would become broken. თქვენ არ შეგიძლიათ ამ ხედის წაშლა იმიტომ, რომ მას გააჩნია ერთი ან მეტი დამოკიდებული ხედი, რომელიც გაფუჭდებოდა. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies ობიექტის დამოკიდებულებები @@ -5601,7 +5601,7 @@ Do you want to continue? Save PDF file - Save PDF file + PDF ფაილის შენახვა @@ -6095,11 +6095,12 @@ Do you want to continue? + ComplexSection კომპლექსურიჭრილი - + Can not continue. Object * %1 or %2 not found. გაგრძელება შეუძლებელია. ობიექტები * %1 ან %2 ვერ ვიპოვე. @@ -7871,7 +7872,7 @@ using the given X/Y Spacing გადასატარებელი არაფერია. კვეთის მიმართულება არჩეული არაა - + Can not continue. Object * %1 or %2 not found. გაგრძელება შეუძლებელია. ობიექტები * %1 ან %2 ვერ ვიპოვე. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts index 7a2d3f055f..0b31bd6064 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ko.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies 객체 종속성 @@ -6098,11 +6098,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7874,7 +7875,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts index ac08d47a87..4e7a551d90 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_nl.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Sectieweergave bewerken @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Bewerking mislukt @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. een Lassymbool heeft dat kapot zou gaan. - + You cannot delete this view because it has one or more dependent views that would become broken. U kunt deze weergave niet verwijderen omdat deze een of meerdere afhankelijke weergave(s) heeft, die dan beschadigd raken. @@ -3844,7 +3844,7 @@ een Lassymbool heeft dat kapot zou gaan. - + Object dependencies Object afhankelijkheden @@ -5604,7 +5604,7 @@ Do you want to continue? Save PDF file - Save PDF file + Pdf-bestand opslaan @@ -6098,11 +6098,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7874,7 +7875,7 @@ met behulp van de gegeven X/Y afstand Niets om toe te passen. Nog geen sectierichting gekozen - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts index b209c2e8c7..0e9f3829ca 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pl.ts @@ -2166,8 +2166,8 @@ Utwórz przekrój złożony - - + + Edit SectionView Edytuj widok przekroju @@ -3547,8 +3547,8 @@ Kierunek widoku określony współrzędnymi Widoku podstawowego - - + + Operation Failed Operacja nie powiodła się @@ -3855,7 +3855,7 @@ it has a weld symbol that would become broken. zawiera symbol spoiny który zostałby uszkodzony. - + You cannot delete this view because it has one or more dependent views that would become broken. Nie można usunąć tego widoku, ponieważ ma on co najmniej jeden obiekt zależny, który zostałby uszkodzony. @@ -3869,7 +3869,7 @@ zawiera symbol spoiny który zostałby uszkodzony. - + Object dependencies Zależności obiektu @@ -5631,7 +5631,7 @@ Czy chcesz kontynuować? Save PDF file - Save PDF file + Zapisz plik PDF @@ -6125,11 +6125,12 @@ Czy chcesz kontynuować? + ComplexSection Przekrój złożony - + Can not continue. Object * %1 or %2 not found. Nie można kontynuować. Obiekt * %1 lub %2 nie został znaleziony. @@ -7901,7 +7902,7 @@ przy użyciu podanego odstępu X/Y Nie ma nic do zastosowania. Nie wybrano jeszcze kierunku widoku dla przekroju - + Can not continue. Object * %1 or %2 not found. Nie można kontynuować. Obiekt * %1 lub %2 nie został znaleziony. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts index a879610ce2..902968c4d5 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-BR.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Falha na operação @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. ela tem um símbolo de solda que quebraria. - + You cannot delete this view because it has one or more dependent views that would become broken. Você não pode excluir esta visão porque ela tem uma ou mais visualizações dependentes que se tornariam quebradas. @@ -3844,7 +3844,7 @@ ela tem um símbolo de solda que quebraria. - + Object dependencies Dependências do objeto @@ -6098,11 +6098,12 @@ Do you want to continue? + ComplexSection Seção complexa - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7874,7 +7875,7 @@ usando o espaçamento X/Y fornecido Nada para aplicar. Nenhuma direção de seção selecionada ainda - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts index d81b439378..7f5f67c17a 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_pt-PT.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Falha na Operação @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. ela tem um símbolo de soldadura que se quebrará. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3844,7 +3844,7 @@ ela tem um símbolo de soldadura que se quebrará. - + Object dependencies Dependências do objeto @@ -6097,11 +6097,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7873,7 +7874,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts index ffa653f4bb..d92d20be83 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ro.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Dependențe obiect @@ -6097,11 +6097,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7873,7 +7874,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts index e4334a7680..adfdff8e95 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_ru.ts @@ -2141,8 +2141,8 @@ Создать Сложное сечение - - + + Edit SectionView Изменить вид Сечения @@ -3522,8 +3522,8 @@ Направление просмотра в координатах BaseView - - + + Operation Failed Операция неудачна @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. содержит символ сварки, который может быть повреждён. - + You cannot delete this view because it has one or more dependent views that would become broken. Вы не можете удалить этот вид, потомучто это повредит один или более других зависимых от него видов. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Зависимости объекта @@ -5601,7 +5601,7 @@ Do you want to continue? Save PDF file - Save PDF file + Сохранить PDF файл @@ -6095,11 +6095,12 @@ Do you want to continue? + ComplexSection Комплексный раздел - + Can not continue. Object * %1 or %2 not found. Невозможно продолжить. Объект * %1 или %2 не найден. @@ -7438,7 +7439,7 @@ You can pick further points to get line segments. Top - Верх + Сверху @@ -7870,7 +7871,7 @@ using the given X/Y Spacing Нечего применять. Направление раздела пока не выбрано - + Can not continue. Object * %1 or %2 not found. Невозможно продолжить. Объект * %1 или %2 не найден. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts index 8374d7c523..3d91e089d4 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sl.ts @@ -2141,8 +2141,8 @@ Ustvari sestavljeni prerez - - + + Edit SectionView Uredi prerezni pogled @@ -3522,8 +3522,8 @@ Smer pogleda v sorednicah osnovnega pogleda - - + + Operation Failed Opravilo spodletelo @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. oznako za varjenje, ki bi postala okvarjena. - + You cannot delete this view because it has one or more dependent views that would become broken. Tega pogleda ne morete izbrisati, ker vsebuje enega ali več odvisnih pogledov, ki bi se tako pokvarili. @@ -3844,7 +3844,7 @@ oznako za varjenje, ki bi postala okvarjena. - + Object dependencies Odvisnosti predmetov @@ -6098,11 +6098,12 @@ Ali želite nadaljevati? + ComplexSection Zapleten presek - + Can not continue. Object * %1 or %2 not found. Ne da se nadaljevati. Predmetov * %1 ali %2 ni mogoče najti. @@ -7874,7 +7875,7 @@ s pomočjo podanih X/Y odmikov Ni kaj uveljaviti. Nobena usmeritev prereza še ni izbrana - + Can not continue. Object * %1 or %2 not found. Ne da se nadaljevati. Predmetov * %1 ali %2 ni mogoče najti. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts index 8836cdcc48..33c4edac4f 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr-CS.ts @@ -2141,8 +2141,8 @@ Napravi složeni presek - - + + Edit SectionView Uredi pun presek @@ -3522,8 +3522,8 @@ Pravac pogleda u koordinatama baznog pogleda - - + + Operation Failed Operacija nije izvršena @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. ima simbol zavarivanja koji bi se pokvario. - + You cannot delete this view because it has one or more dependent views that would become broken. Ne možeš obrisati ovaj pogled jer ima jedan ili više zavisnih objekata koji će postati neispravni. @@ -3844,7 +3844,7 @@ ima simbol zavarivanja koji bi se pokvario. - + Object dependencies Međuzavisnosti objekata @@ -5600,7 +5600,7 @@ Da li želiš da nastaviš? Save PDF file - Save PDF file + Sačuvaj PDF datoteku @@ -6094,11 +6094,12 @@ Da li želiš da nastaviš? + ComplexSection Složeni presek - + Can not continue. Object * %1 or %2 not found. Ne mogu da nastavim. Objekat * %1 ili %2 nije pronađen. @@ -7869,7 +7870,7 @@ using the given X/Y Spacing Nema šta da se primeni. Još nije odabran pravac preseka - + Can not continue. Object * %1 or %2 not found. Ne mogu da nastavim. Objekat * %1 ili %2 nije pronađen. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts index d6e495fbd6..f15a248f09 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sr.ts @@ -2141,8 +2141,8 @@ Направи сложени пресек - - + + Edit SectionView Уреди пун пресек @@ -3522,8 +3522,8 @@ Правац погледа у координатама базног погледа - - + + Operation Failed Операција није извршена @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. има симбол заваривања који би се покварио. - + You cannot delete this view because it has one or more dependent views that would become broken. Не можеш обрисати овај поглед јер има један или више зависних објеката који ће постати неисправни. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Међузависности објеката @@ -5600,7 +5600,7 @@ Do you want to continue? Save PDF file - Save PDF file + Сачувај PDF датотеку @@ -6094,11 +6094,12 @@ Do you want to continue? + ComplexSection Сложени пресек - + Can not continue. Object * %1 or %2 not found. Не могу да наставим. Објекат * %1 или %2 није пронађен. @@ -7869,7 +7870,7 @@ using the given X/Y Spacing Нема шта да се примени. Још није одабран правац пресека - + Can not continue. Object * %1 or %2 not found. Не могу да наставим. Објекат * %1 или %2 није пронађен. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts index 4ae3bbbdb5..86afef1cdb 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_sv-SE.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operationen misslyckades @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. den har en svetssymbol som skulle bli trasig. - + You cannot delete this view because it has one or more dependent views that would become broken. Du kan inte ta bort denna vy eftersom den har en eller flera beroende vyer som skulle brytas. @@ -3844,7 +3844,7 @@ den har en svetssymbol som skulle bli trasig. - + Object dependencies Objektberoenden @@ -6098,11 +6098,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7874,7 +7875,7 @@ med hjälp av det givna X/Y-avstånden Inget att tillämpa. Ingen sektionsriktning vald ännu - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts index 56294913e7..b83b4b9097 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_tr.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Kesit Görünümünü Düzenle @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed İşlem başarısız oldu @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. Bu ölçü çizgisini silemezsiniz çünkü bozulabilecek bir kaynak sembolü içeriyor. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies Nesne bağımlılıkları @@ -6094,11 +6094,12 @@ Devam etmek istiyor musun? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7870,7 +7871,7 @@ gösterimleri otomatik dağıtır Hiçbir şey uygulanmadı. Kesit yönü henüz seçilmedi - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts index 18b5e81d1c..07dad969a0 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_uk.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. Не можна видалити цей вид, оскільки він має один або більше залежних видів, що будуть зламані. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Залежності обʼєктів @@ -6097,11 +6097,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7873,7 +7874,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts index 34d59248eb..c032c7e28c 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_val-ES.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Ha fallat l'operació @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. it has a weld symbol that would become broken. - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies Dependències de l'objecte @@ -6088,11 +6088,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7864,7 +7865,7 @@ using the given X/Y Spacing No hi ha res a aplicar. Encara no s'ha triat la direcció de la secció - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts index 90cb11b808..6a25175282 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-CN.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView Edit SectionView @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed Operation Failed @@ -3829,7 +3829,7 @@ it has a weld symbol that would become broken. 指引线 - + You cannot delete this view because it has one or more dependent views that would become broken. 您不能删除此视图,因为它有一个或多个依赖的视图会被损坏。 @@ -3843,7 +3843,7 @@ it has a weld symbol that would become broken. - + Object dependencies 对象依赖关系 @@ -6096,11 +6096,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7872,7 +7873,7 @@ using the given X/Y Spacing Nothing to apply. No section direction picked yet - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts index a411d682ca..aeec6cce19 100644 --- a/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts +++ b/src/Mod/TechDraw/Gui/Resources/translations/TechDraw_zh-TW.ts @@ -2141,8 +2141,8 @@ Create ComplexSection - - + + Edit SectionView 編輯剖面視圖 @@ -3522,8 +3522,8 @@ The view direction in BaseView coordinates - - + + Operation Failed 操作失敗 @@ -3830,7 +3830,7 @@ it has a weld symbol that would become broken. 它有銲接符號會損壞。 - + You cannot delete this view because it has one or more dependent views that would become broken. You cannot delete this view because it has one or more dependent views that would become broken. @@ -3844,7 +3844,7 @@ it has a weld symbol that would become broken. - + Object dependencies 物件相依 @@ -6090,11 +6090,12 @@ Do you want to continue? + ComplexSection ComplexSection - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. @@ -7865,7 +7866,7 @@ using the given X/Y Spacing 無法套用。尚未挑選剖面方向 - + Can not continue. Object * %1 or %2 not found. Can not continue. Object * %1 or %2 not found. diff --git a/src/Mod/TechDraw/Gui/TaskCosmeticCircle.cpp b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.cpp new file mode 100644 index 0000000000..07df28f69d --- /dev/null +++ b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.cpp @@ -0,0 +1,304 @@ +/*************************************************************************** + * Copyright (c) 2023 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#include "PreCompiled.h" +#ifndef _PreComp_ +# include +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ui_TaskCosmeticCircle.h" +#include "TaskCosmeticCircle.h" + + +using namespace Gui; +using namespace TechDraw; +using namespace TechDrawGui; +using DU = DrawUtil; + +//ctor for edit +TaskCosmeticCircle::TaskCosmeticCircle(TechDraw::DrawViewPart* partFeat, + std::string circleName) : + ui(new Ui_TaskCosmeticCircle), + m_partFeat(partFeat), + m_circleName(circleName), + m_ce(nullptr), + m_saveCE(nullptr), + m_createMode(false) +{ + //existence of partFeat is checked in calling command + + m_ce = m_partFeat->getCosmeticEdgeBySelection(m_circleName); + if (!m_ce) { + Base::Console().Error("TaskCosmeticCircle - bad parameters. Can not proceed.\n"); + return; + } + + ui->setupUi(this); + + setUiEdit(); +} + +//ctor for creation +TaskCosmeticCircle::TaskCosmeticCircle(TechDraw::DrawViewPart* partFeat, + Base::Vector3d center, bool is3d) : + ui(new Ui_TaskCosmeticCircle), + m_partFeat(partFeat), + m_ce(nullptr), + m_saveCE(nullptr), + m_center(center), + m_createMode(true), + m_is3d(is3d) +{ + //existence of partFeat is checked in calling command + + ui->setupUi(this); + + setUiPrimary(); +} + +TaskCosmeticCircle::~TaskCosmeticCircle() +{ + if (m_saveCE) { + delete m_saveCE; + } +} + +void TaskCosmeticCircle::updateTask() +{ +// blockUpdate = true; + +// blockUpdate = false; +} + +void TaskCosmeticCircle::changeEvent(QEvent *e) +{ + if (e->type() == QEvent::LanguageChange) { + ui->retranslateUi(this); + } +} + +void TaskCosmeticCircle::setUiPrimary() +{ + setWindowTitle(QObject::tr("Create Cosmetic Line")); +// Base::Console().Message("TCC::setUiPrimary() - m_center: %s is3d: %d\n", +// DU::formatVector(m_center).c_str(), m_is3d); + double rotDeg = m_partFeat->Rotation.getValue(); + double rotRad = rotDeg * M_PI / 180.0; + Base::Vector3d centroid = m_partFeat->getCurrentCentroid(); + Base::Vector3d p1; + if (m_is3d) { + // center, project and invert the 3d point + p1 = DrawUtil::invertY(m_partFeat->projectPoint(m_center - centroid)); + ui->rb2d1->setChecked(false); + ui->rb3d1->setChecked(true); + } else { + // invert, unscale and unrotate the selected 2d point + // shift by centroid? + p1 = DU::invertY(m_center) / m_partFeat->getScale(); + if (rotDeg != 0.0) { + // we always rotate around the origin. + p1.RotateZ(-rotRad); + } + ui->rb2d1->setChecked(true); + ui->rb3d1->setChecked(false); + } + + ui->qsbCenterX->setUnit(Base::Unit::Length); + ui->qsbCenterX->setValue(p1.x); + ui->qsbCenterY->setUnit(Base::Unit::Length); + ui->qsbCenterY->setValue(p1.y); + ui->qsbCenterY->setUnit(Base::Unit::Length); + ui->qsbCenterZ->setValue(p1.z); +} + +void TaskCosmeticCircle::setUiEdit() +{ + setWindowTitle(QObject::tr("Edit Cosmetic Line")); + + ui->rb2d1->setChecked(true); + ui->rb3d1->setChecked(false); + + Base::Vector3d p1 = DrawUtil::invertY(m_ce->permaStart); + ui->qsbCenterX->setValue(p1.x); + ui->qsbCenterY->setValue(p1.y); + ui->qsbCenterZ->setValue(p1.z); + + ui->qsbRadius->setValue(m_ce->permaRadius); + + double angleDeg = m_ce->m_geometry->getStartAngle() * 180.0 / M_PI; + ui->qsbStartAngle->setValue(angleDeg); + angleDeg = m_ce->m_geometry->getEndAngle() * 180.0 / M_PI; + ui->qsbEndAngle->setValue(angleDeg); +} + +//****************************************************************************** +void TaskCosmeticCircle::createCosmeticCircle(void) +{ +// Base::Console().Message("TCL::createCosmeticCircle()\n"); + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create Cosmetic Line")); + + double x = ui->qsbCenterX->value().getValue(); + double y = ui->qsbCenterY->value().getValue(); + double z = ui->qsbCenterZ->value().getValue(); + Base::Vector3d p0(x, y, z); + + TechDraw::BaseGeomPtr bg; + if (ui->qsbStartAngle->value().getValue() == 0.0 && + ui->qsbEndAngle->value().getValue() == 0.0) { + bg = std::make_shared (p0, ui->qsbRadius->value().getValue()); + } else { + bg = std::make_shared(p0, ui->qsbRadius->value().getValue(), + ui->qsbStartAngle->value().getValue(), + ui->qsbEndAngle->value().getValue()); + } + + // note cEdges are inverted when added to the dvp geometry, so we need to + // invert them here + m_tag = m_partFeat->addCosmeticEdge(bg->inverted()); + m_ce = m_partFeat->getCosmeticEdge(m_tag); + + Gui::Command::commitCommand(); +} + +void TaskCosmeticCircle::updateCosmeticCircle(void) +{ +// Base::Console().Message("TCL::updateCosmeticCircle()\n"); + double x = ui->qsbCenterX->value().getValue(); + double y = ui->qsbCenterY->value().getValue(); + double z = ui->qsbCenterZ->value().getValue(); + Base::Vector3d p0(x, y, z); + + //replace the geometry + m_ce->permaRadius = ui->qsbRadius->value().getValue(); + + TechDraw::BaseGeomPtr bg; + if (ui->qsbStartAngle->value().getValue() == 0.0 && + ui->qsbEndAngle->value().getValue() == 0.0) { + bg = std::make_shared (p0, m_ce->permaRadius); + } else { + bg = std::make_shared(p0, ui->qsbRadius->value().getValue(), + ui->qsbStartAngle->value().getValue(), + ui->qsbEndAngle->value().getValue()); + } + m_ce->m_geometry = bg->inverted(); + p0 = DU::invertY(p0); + m_ce->permaStart = p0; + m_ce->permaEnd = p0; +} + +//****************************************************************************** + +bool TaskCosmeticCircle::accept() +{ + if (m_createMode) { + createCosmeticCircle(); + m_partFeat->add1CEToGE(m_tag); + m_partFeat->refreshCEGeoms(); + m_partFeat->requestPaint(); + } else { + //update mode + Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Update CosmeticCircle")); + updateCosmeticCircle(); + m_partFeat->refreshCEGeoms(); + m_partFeat->requestPaint(); + Gui::Command::updateActive(); + Gui::Command::commitCommand(); + } + + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); + + return true; +} + +bool TaskCosmeticCircle::reject() +{ + //there's nothing to do. + Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); + return false; +} +//////////////////////////////////////////////////////////////////////////////// +TaskDlgCosmeticCircle::TaskDlgCosmeticCircle(TechDraw::DrawViewPart* partFeat, + Base::Vector3d point, + bool is3d) + : TaskDialog() +{ + widget = new TaskCosmeticCircle(partFeat, point, is3d); + taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/TechDraw_CosmeticCircle"), + widget->windowTitle(), true, nullptr); + taskbox->groupLayout()->addWidget(widget); + Content.push_back(taskbox); +} + +TaskDlgCosmeticCircle::TaskDlgCosmeticCircle(TechDraw::DrawViewPart* partFeat, + std::string circleName) + : TaskDialog() +{ + widget = new TaskCosmeticCircle(partFeat, circleName); + taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/TechDraw_CosmeticCircle"), + widget->windowTitle(), true, nullptr); + taskbox->groupLayout()->addWidget(widget); + Content.push_back(taskbox); +} + +TaskDlgCosmeticCircle::~TaskDlgCosmeticCircle() +{ +} + +void TaskDlgCosmeticCircle::update() +{ +// widget->updateTask(); +} + +//==== calls from the TaskView =============================================================== +void TaskDlgCosmeticCircle::open() +{ +} + +void TaskDlgCosmeticCircle::clicked(int) +{ +} + +bool TaskDlgCosmeticCircle::accept() +{ + widget->accept(); + return true; +} + +bool TaskDlgCosmeticCircle::reject() +{ + widget->reject(); + return true; +} + +#include + diff --git a/src/Mod/TechDraw/Gui/TaskCosmeticCircle.h b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.h new file mode 100644 index 0000000000..12fc33ad8d --- /dev/null +++ b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.h @@ -0,0 +1,128 @@ +/*************************************************************************** + * Copyright (c) 2023 WandererFan * + * * + * This file is part of the FreeCAD CAx development system. * + * * + * This library is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Library General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + * This library is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU Library General Public License for more details. * + * * + * You should have received a copy of the GNU Library General Public * + * License along with this library; see the file COPYING.LIB. If not, * + * write to the Free Software Foundation, Inc., 59 Temple Place, * + * Suite 330, Boston, MA 02111-1307, USA * + * * + ***************************************************************************/ + +#ifndef TECHDRAWGUI_TASKCOSMETICCIRCLE_H +#define TECHDRAWGUI_TASKCOSMETICCIRCLE_H + +#include +#include +#include +#include + + +namespace TechDraw +{ +class DrawPage; +class DrawView; +class DrawViewPart; +class CosmeticEdge; +class Face; +class LineFormat; +} + +namespace TechDrawGui +{ +class QGSPage; +class QGVPage; +class QGIView; +class QGIPrimPath; +class MDIViewPage; +class ViewProviderViewPart; +class Ui_TaskCosmeticCircle; + +class TaskCosmeticCircle : public QWidget +{ + Q_OBJECT + +public: + TaskCosmeticCircle(TechDraw::DrawViewPart* partFeat, + Base::Vector3d center, bool is3d); + TaskCosmeticCircle(TechDraw::DrawViewPart* partFeat, + std::string circleName); + ~TaskCosmeticCircle() override; + + virtual bool accept(); + virtual bool reject(); + void updateTask(); + +protected: + void changeEvent(QEvent *e) override; + + void setUiPrimary(); + void setUiEdit(); + + void createCosmeticCircle(); + void updateCosmeticCircle(); + +private: + std::unique_ptr ui; + + TechDraw::DrawViewPart* m_partFeat; + + std::string m_circleName; + TechDraw::CosmeticEdge* m_ce; + TechDraw::CosmeticEdge* m_saveCE; + Base::Vector3d m_center; + double m_radius; + bool m_createMode; + std::string m_tag; + bool m_is3d; +}; + +class TaskDlgCosmeticCircle : public Gui::TaskView::TaskDialog +{ + Q_OBJECT + +public: + TaskDlgCosmeticCircle(TechDraw::DrawViewPart* partFeat, + Base::Vector3d center, bool is3d); + TaskDlgCosmeticCircle(TechDraw::DrawViewPart* partFeat, + std::string circleName) +; ~TaskDlgCosmeticCircle() override; + +public: + /// is called the TaskView when the dialog is opened + void open() override; + /// is called by the framework if an button is clicked which has no accept or reject role + void clicked(int) override; + /// is called by the framework if the dialog is accepted (Ok) + bool accept() override; + /// is called by the framework if the dialog is rejected (Cancel) + bool reject() override; + /// is called by the framework if the user presses the help button + void helpRequested() override { return;} + bool isAllowedAlterDocument() const override + { return false; } + void update(); + +protected: + +private: + TaskCosmeticCircle* widget; + + Gui::TaskView::TaskBox* taskbox; +}; + +} //namespace TechDrawGui + +#endif // #ifndef TECHDRAWGUI_TASKCOSMETICCIRCLE_H + diff --git a/src/Mod/TechDraw/Gui/TaskCosmeticCircle.ui b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.ui new file mode 100644 index 0000000000..12bde53ed7 --- /dev/null +++ b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.ui @@ -0,0 +1,252 @@ + + + TechDrawGui::TaskCosmeticCircle + + + + 0 + 0 + 350 + 368 + + + + + 0 + 0 + + + + + 250 + 0 + + + + Cosmetic Circle + + + + + + + + View + + + + + + + false + + + false + + + Qt::NoFocus + + + false + + + + + + + + + + + Treat the center point as a 2d point within the parent View. Z coordinate is ignored. + + + 2d Point + + + true + + + true + + + + + + + Treat the center point as a 3d point and project it onto the parent View. + + + 3d Point + + + true + + + + + + + Circle Center + + + + + + + + + + + X: + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Y: + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Z: + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + Radius: + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + 10.000000000000000 + + + + + + + + + + + Start Angle: + + + + + + + End angle (conventional) of arc in degrees. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + End Angle: + + + + + + + Start angle (conventional) of arc in degrees. + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + Arc of Circle + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + Gui::QuantitySpinBox + QWidget +
Gui/QuantitySpinBox.h
+
+
+ + + + +
diff --git a/src/Mod/TechDraw/Gui/Workbench.cpp b/src/Mod/TechDraw/Gui/Workbench.cpp index 60d11b8105..75d3bc62b9 100644 --- a/src/Mod/TechDraw/Gui/Workbench.cpp +++ b/src/Mod/TechDraw/Gui/Workbench.cpp @@ -176,6 +176,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const *lines << "TechDraw_2LineCenterLine"; *lines << "TechDraw_2PointCenterLine"; *lines << "TechDraw_2PointCosmeticLine"; + *lines << "TechDraw_CosmeticCircle"; *lines << "Separator"; *lines << "TechDraw_DecorateLine"; *lines << "TechDraw_ShowAll"; @@ -376,6 +377,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const *anno << "TechDraw_CosmeticVertexGroup"; *anno << "TechDraw_CenterLineGroup"; *anno << "TechDraw_2PointCosmeticLine"; + *anno << "TechDraw_CosmeticCircle"; *anno << "TechDraw_CosmeticEraser"; *anno << "TechDraw_DecorateLine"; *anno << "TechDraw_ShowAll"; @@ -485,6 +487,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const *anno << "TechDraw_CosmeticVertexGroup"; *anno << "TechDraw_CenterLineGroup"; *anno << "TechDraw_2PointCosmeticLine"; + *anno << "TechDraw_CosmeticCircle"; *anno << "TechDraw_CosmeticEraser"; *anno << "TechDraw_DecorateLine"; *anno << "TechDraw_ShowAll"; diff --git a/src/Mod/Test/Document.py b/src/Mod/Test/Document.py index 4fe36310b7..404bdf8e88 100644 --- a/src/Mod/Test/Document.py +++ b/src/Mod/Test/Document.py @@ -29,10 +29,31 @@ import math # --------------------------------------------------------------------------- +class Proxy: + def __init__(self, obj): + self.Dictionary = {} + self.obj = obj + obj.Proxy = self + + def dumps(self): + return self.Dictionary + + def loads(self, data): + self.Dictionary = data + + class DocumentBasicCases(unittest.TestCase): def setUp(self): self.Doc = FreeCAD.newDocument("CreateTest") + def saveAndRestore(self): + # saving and restoring + SaveName = tempfile.gettempdir() + os.sep + "CreateTest.FCStd" + self.Doc.saveAs(SaveName) + FreeCAD.closeDocument("CreateTest") + self.Doc = FreeCAD.open(SaveName) + return self.Doc + def testAccessByNameOrID(self): obj = self.Doc.addObject("App::DocumentObject", "MyName") @@ -587,6 +608,26 @@ class DocumentBasicCases(unittest.TestCase): self.assertIn("Test", self.Doc.Python.PropertiesList) self.assertIn("Test", self.Doc.Link.PropertiesList) + def testNoProxy(self): + test = self.Doc.addObject("App::DocumentObject", "Object") + test.addProperty("App::PropertyPythonObject", "Dictionary") + test.Dictionary = {"Stored data": [3, 5, 7]} + + doc = self.saveAndRestore() + obj = doc.Object + + self.assertEqual(obj.Dictionary, {"Stored data": [3, 5, 7]}) + + def testWithProxy(self): + test = self.Doc.addObject("App::FeaturePython", "Python") + proxy = Proxy(test) + proxy.Dictionary["Stored data"] = [3, 5, 7] + + doc = self.saveAndRestore() + obj = doc.Python.Proxy + + self.assertEqual(obj.Dictionary, {"Stored data": [3, 5, 7]}) + def tearDown(self): # closing doc FreeCAD.closeDocument("CreateTest") diff --git a/src/Mod/Tux/Resources/translations/Tux.ts b/src/Mod/Tux/Resources/translations/Tux.ts index 1cf3264dc1..70b40abff8 100644 --- a/src/Mod/Tux/Resources/translations/Tux.ts +++ b/src/Mod/Tux/Resources/translations/Tux.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select - + Zoom - + Rotate - + Pan - + Tilt - + Navigation style - + Page Up or Page Down key. - + Rotation focus - + Middle mouse button or H key. - + Middle mouse button. - + Navigation style not recognized. - + Settings - + Orbit style - + Compact - + Tooltip - + Turntable - + Free Turntable - + Trackball - + Undefined diff --git a/src/Mod/Tux/Resources/translations/Tux_be.ts b/src/Mod/Tux/Resources/translations/Tux_be.ts index 22e6a4898c..81f17eeff2 100644 --- a/src/Mod/Tux/Resources/translations/Tux_be.ts +++ b/src/Mod/Tux/Resources/translations/Tux_be.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Абраць - + Zoom Маштаб - + Rotate Павярнуць - + Pan Зрух - + Tilt Нахіл - + Navigation style Стыль навігацыі - + Page Up or Page Down key. Клавіша <Page Up> ці <Page down>. - + Rotation focus Фокус кручэння - + Middle mouse button or H key. <Сярэдняя кнопка мышы> ці клавіша <H>. - + Middle mouse button. <Сярэдняя кнопка мышы>. - + Navigation style not recognized. Стыль навігацыі не распазнаны. - + Settings Налады - + Orbit style Стыль арбіты - + Compact Сціслы - + Tooltip Парада - + Turntable Паваротны круг - + Free Turntable Свабодны паваротны круг - + Trackball Трэкбол - + Undefined Не вызначана diff --git a/src/Mod/Tux/Resources/translations/Tux_ca.ts b/src/Mod/Tux/Resources/translations/Tux_ca.ts index 856bb9562c..04cc3f8e27 100644 --- a/src/Mod/Tux/Resources/translations/Tux_ca.ts +++ b/src/Mod/Tux/Resources/translations/Tux_ca.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Selecciona - + Zoom Lupa - + Rotate Rotació - + Pan Panoràmica - + Tilt Inclinació - + Navigation style Estil de navegació - + Page Up or Page Down key. Tecla de Re Pàg o Av Pàg. - + Rotation focus Enfocament de rotació - + Middle mouse button or H key. Botó central del ratolí o tecla H. - + Middle mouse button. Feu rodar el botó central del ratolí. - + Navigation style not recognized. Estil de navegació no reconegut. - + Settings Paràmetres - + Orbit style Estil d'òrbita - + Compact Compacte - + Tooltip Consell - + Turntable Torn - + Free Turntable Plataforma giratòria lliure - + Trackball Ratolí de bola - + Undefined Indefinit diff --git a/src/Mod/Tux/Resources/translations/Tux_cs.ts b/src/Mod/Tux/Resources/translations/Tux_cs.ts index 4ba27b02a6..179fd926fa 100644 --- a/src/Mod/Tux/Resources/translations/Tux_cs.ts +++ b/src/Mod/Tux/Resources/translations/Tux_cs.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Vybrat - + Zoom Přiblížení - + Rotate Otočit - + Pan Posun - + Tilt Naklonit - + Navigation style Styl navigace - + Page Up or Page Down key. Tlačítka Page Up nebo Page Down. - + Rotation focus Střed rotace - + Middle mouse button or H key. Prostřední tlačítko myši nebo klávesa H. - + Middle mouse button. Prostřední tlačítko myši. - + Navigation style not recognized. Navigační styl nebyl rozeznán. - + Settings Nastavení - + Orbit style Styl orbitu - + Compact Kompaktní - + Tooltip Popisek nástroje - + Turntable Otočný stůl - + Free Turntable Volný otočný stůl - + Trackball Trackball - + Undefined Nedefinovaná diff --git a/src/Mod/Tux/Resources/translations/Tux_de.ts b/src/Mod/Tux/Resources/translations/Tux_de.ts index fa3b791202..430d082ae2 100644 --- a/src/Mod/Tux/Resources/translations/Tux_de.ts +++ b/src/Mod/Tux/Resources/translations/Tux_de.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Auswählen - + Zoom Vergrößern - + Rotate Drehen - + Pan Schwenken - + Tilt Neigen - + Navigation style Navigationsstil - + Page Up or Page Down key. Bild-auf- oder Bild-ab-Taste. - + Rotation focus Drehpunkt - + Middle mouse button or H key. Mittlere Maustaste oder H-Taste. - + Middle mouse button. Mittlere Maustaste. - + Navigation style not recognized. Navigationsstil nicht erkannt. - + Settings Einstellungen - + Orbit style Orbit Stil - + Compact Kompakt - + Tooltip Quick-Info - + Turntable Drehscheibe - + Free Turntable Freie Drehscheibe - + Trackball Trackball - + Undefined Unbestimmt diff --git a/src/Mod/Tux/Resources/translations/Tux_el.ts b/src/Mod/Tux/Resources/translations/Tux_el.ts index cb3539a554..4032d8c886 100644 --- a/src/Mod/Tux/Resources/translations/Tux_el.ts +++ b/src/Mod/Tux/Resources/translations/Tux_el.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Επιλέξτε - + Zoom Εστίαση - + Rotate Περιστρέψτε - + Pan Μεταφορική Κίνηση Κάμερας - + Tilt Ρύθμιση Κλίσης Κάμερας - + Navigation style Τύπος Πλοήγησης - + Page Up or Page Down key. Το πλήκτρο Μετακίνησης της Σελίδας προς τα Πάνω ή προς τα Κάτω. - + Rotation focus Άξονας περιστροφής - + Middle mouse button or H key. Μεσαίο πλήκτρο του ποντικιού ή πλήκτρο H. - + Middle mouse button. Μεσαίο πλήκτρο του ποντικιού. - + Navigation style not recognized. Ο τύπος πλοήγησης δεν αναγνωρίζεται. - + Settings Ρυθμίσεις - + Orbit style Τύπος μορφοποίησης τροχιάς - + Compact Συμπαγής - + Tooltip Επεξήγηση εργαλείου - + Turntable Περιστρεφόμενη βάση - + Free Turntable Ελεύθερη Περιστροφική πλάκα - + Trackball Ιχνόσφαιρα - + Undefined Απροσδιόριστο diff --git a/src/Mod/Tux/Resources/translations/Tux_es-AR.ts b/src/Mod/Tux/Resources/translations/Tux_es-AR.ts index 9102bfed7d..6b64c831ec 100644 --- a/src/Mod/Tux/Resources/translations/Tux_es-AR.ts +++ b/src/Mod/Tux/Resources/translations/Tux_es-AR.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Seleccionar - + Zoom Zoom - + Rotate Rotar - + Pan Panear - + Tilt Inclinación - + Navigation style Estilo de navegación - + Page Up or Page Down key. Tecla Page Up o Page Down. - + Rotation focus Foco de rotación - + Middle mouse button or H key. Botón central del ratón o la tecla H. - + Middle mouse button. Botón central del ratón. - + Navigation style not recognized. Estilo de navegación no reconocido. - + Settings Configuración - + Orbit style Estilo de órbita - + Compact Compactar - + Tooltip Descripción - + Turntable Mesa giratoria - + Free Turntable Turntable libre - + Trackball Trackball - + Undefined Indefinido diff --git a/src/Mod/Tux/Resources/translations/Tux_es-ES.ts b/src/Mod/Tux/Resources/translations/Tux_es-ES.ts index 4a42322795..02f244a77d 100644 --- a/src/Mod/Tux/Resources/translations/Tux_es-ES.ts +++ b/src/Mod/Tux/Resources/translations/Tux_es-ES.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Seleccionar - + Zoom Aumentar/Disminuir - + Rotate Girar - + Pan Panear - + Tilt Inclinación - + Navigation style Estilo de navegación - + Page Up or Page Down key. Tecla Page Up o Page Down. - + Rotation focus Foco de rotación - + Middle mouse button or H key. Botón central del ratón o la tecla H. - + Middle mouse button. Botón central del ratón. - + Navigation style not recognized. Estilo de navegación no reconocido. - + Settings Opciones - + Orbit style Estilo órbita - + Compact Compacto - + Tooltip Información sobre herramientas - + Turntable Mesa giratoria - + Free Turntable Turntable libre - + Trackball Trackball - + Undefined Indefinido diff --git a/src/Mod/Tux/Resources/translations/Tux_eu.ts b/src/Mod/Tux/Resources/translations/Tux_eu.ts index 81c28e3531..737036270e 100644 --- a/src/Mod/Tux/Resources/translations/Tux_eu.ts +++ b/src/Mod/Tux/Resources/translations/Tux_eu.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Hautatu - + Zoom Zooma - + Rotate Biratu - + Pan Mugitu ezker-eskuin - + Tilt Inklinatu - + Navigation style Nabigazio-estiloa - + Page Up or Page Down key. Page Up edo Page Down tekla. - + Rotation focus Biraketa-fokua - + Middle mouse button or H key. Saguaren erdiko botoia edo H tekla. - + Middle mouse button. Saguaren erdiko botoia. - + Navigation style not recognized. Nabigazio-estiloa ez da onartzen. - + Settings Ezarpenak - + Orbit style Orbita-estiloa - + Compact Trinkoa - + Tooltip Argibidea - + Turntable Tornua - + Free Turntable Tornu librea - + Trackball Trackball - + Undefined Definitu gabea diff --git a/src/Mod/Tux/Resources/translations/Tux_fi.ts b/src/Mod/Tux/Resources/translations/Tux_fi.ts index c7f0b298d5..72cd99871b 100644 --- a/src/Mod/Tux/Resources/translations/Tux_fi.ts +++ b/src/Mod/Tux/Resources/translations/Tux_fi.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Valitse - + Zoom Zoomaus - + Rotate Pyöritä - + Pan Panoroi - + Tilt Kallistus - + Navigation style Siirtymistyyli - + Page Up or Page Down key. Page Up- tai Page Down -näppäin. - + Rotation focus Kierron kohdistus - + Middle mouse button or H key. Hiiren keskipainike tai H-näppäin. - + Middle mouse button. Hiiren keskipainike. - + Navigation style not recognized. Navigointityyliä ei tunnistettu. - + Settings Asetukset - + Orbit style Kiertoradan tyyli - + Compact Tiivis - + Tooltip Vihje - + Turntable Pyörähdyspöytä - + Free Turntable Free Turntable - + Trackball Trackball - + Undefined Määrittelemätön diff --git a/src/Mod/Tux/Resources/translations/Tux_fr.ts b/src/Mod/Tux/Resources/translations/Tux_fr.ts index 76ab2dde26..2bbb088708 100644 --- a/src/Mod/Tux/Resources/translations/Tux_fr.ts +++ b/src/Mod/Tux/Resources/translations/Tux_fr.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Sélectionnez - + Zoom Zoom - + Rotate Pivoter - + Pan Panoramique - + Tilt Inclinaison - + Navigation style Style de navigation - + Page Up or Page Down key. Touche clavier Page haut ou Page bas. - + Rotation focus Focus de rotation - + Middle mouse button or H key. Roulette de la souris ou touche H. - + Middle mouse button. Bouton central de la souris. - + Navigation style not recognized. Style de navigation non reconnu. - + Settings Paramètres - + Orbit style Style d'orbite - + Compact Compact - + Tooltip Infobulle - + Turntable Vue en rotation - + Free Turntable Vue en rotation libre - + Trackball Trackball - + Undefined Non défini diff --git a/src/Mod/Tux/Resources/translations/Tux_gl.ts b/src/Mod/Tux/Resources/translations/Tux_gl.ts index 9b2b35ddba..e40325a859 100644 --- a/src/Mod/Tux/Resources/translations/Tux_gl.ts +++ b/src/Mod/Tux/Resources/translations/Tux_gl.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Escolmar - + Zoom Zoom - + Rotate Xirar - + Pan Panorámica - + Tilt Inclinar - + Navigation style Estilo de Navegación - + Page Up or Page Down key. Tecla Av Páx ou Ret Páx. - + Rotation focus Foco de rotación - + Middle mouse button or H key. Botón central do rato ou tecla H. - + Middle mouse button. Botón central do rato. - + Navigation style not recognized. Estilo de navegación non recoñecido. - + Settings Axustes - + Orbit style Estilo orbital - + Compact Compacto - + Tooltip Suxestión - + Turntable Plataforma xiratoria - + Free Turntable Free Turntable - + Trackball Trackball - + Undefined Indeterminado diff --git a/src/Mod/Tux/Resources/translations/Tux_hr.ts b/src/Mod/Tux/Resources/translations/Tux_hr.ts index 997ebdefd7..15998dae14 100644 --- a/src/Mod/Tux/Resources/translations/Tux_hr.ts +++ b/src/Mod/Tux/Resources/translations/Tux_hr.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Odaberite - + Zoom Uvećaj - + Rotate Rotiraj - + Pan Pomicanje - + Tilt Naginjanje - + Navigation style Stil navigacije - + Page Up or Page Down key. Tipke Stranica iznad ili Stranica ispod. - + Rotation focus Središte rotacije - + Middle mouse button or H key. Srednja tipka miša ili tipka H. - + Middle mouse button. Srednja tika miša. - + Navigation style not recognized. Stil navigacije nije prepoznat. - + Settings Postavke - + Orbit style Način okretanja - + Compact Kompaktan - + Tooltip Naziv alata - + Turntable Okretano - + Free Turntable Slobodna okretna ploča - + Trackball Prećeno - + Undefined Nedefinirano diff --git a/src/Mod/Tux/Resources/translations/Tux_hu.ts b/src/Mod/Tux/Resources/translations/Tux_hu.ts index 3249cc2709..2b24c576f5 100644 --- a/src/Mod/Tux/Resources/translations/Tux_hu.ts +++ b/src/Mod/Tux/Resources/translations/Tux_hu.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Kiválaszt - + Zoom Nagyítás - + Rotate Forgatás - + Pan Mozgatás - + Tilt Függőleges döntés - + Navigation style Navigációs stílus - + Page Up or Page Down key. Page Up vagy Page Down billentyű. - + Rotation focus Elforgatási középpontja - + Middle mouse button or H key. Középső egér gomb vagy H billentyű. - + Middle mouse button. Középső egér gomb. - + Navigation style not recognized. Navigációs stílus nem felismerhető. - + Settings Beállítások - + Orbit style Orbit stílus - + Compact Tömörített - + Tooltip Buboréksúgó - + Turntable Fordítótábla - + Free Turntable Forgóasztal - + Trackball Trackball - + Undefined Nem definiált diff --git a/src/Mod/Tux/Resources/translations/Tux_id.ts b/src/Mod/Tux/Resources/translations/Tux_id.ts index fbe7c85195..5ab7d92366 100644 --- a/src/Mod/Tux/Resources/translations/Tux_id.ts +++ b/src/Mod/Tux/Resources/translations/Tux_id.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Memilih - + Zoom Perbesaran - + Rotate Putar - + Pan Geser - + Tilt Miring - + Navigation style Gaya navigasi - + Page Up or Page Down key. Tombol Page Up atau Page Down. - + Rotation focus Fokus rotasi - + Middle mouse button or H key. Tombol tengah tetikus atau tombol H. - + Middle mouse button. Tombol tengah tetikus. - + Navigation style not recognized. Gaya navigasi tidak dikenali. - + Settings Setelan - + Orbit style Gaya Orbit - + Compact Ringkas - + Tooltip Keterangan alat - + Turntable Turntable - + Free Turntable Free Turntable - + Trackball Trackball - + Undefined Tidak terdefinisi diff --git a/src/Mod/Tux/Resources/translations/Tux_it.ts b/src/Mod/Tux/Resources/translations/Tux_it.ts index 030f91531c..70fa3b85b5 100644 --- a/src/Mod/Tux/Resources/translations/Tux_it.ts +++ b/src/Mod/Tux/Resources/translations/Tux_it.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Seleziona - + Zoom Zoom - + Rotate Ruota - + Pan Panoramica - + Tilt Inclinazione - + Navigation style Stile di navigazione - + Page Up or Page Down key. Pagina su o Pagina giù. - + Rotation focus Centro di rotazione - + Middle mouse button or H key. Tasto centrale del mouse o tasto H. - + Middle mouse button. Tasto centrale del mouse. - + Navigation style not recognized. Stile di navigazione non valido. - + Settings Impostazioni - + Orbit style Stile orbita - + Compact Compatto - + Tooltip Suggerimento - + Turntable Piatto - + Free Turntable Piatto Libero - + Trackball Trackball - + Undefined Non definito diff --git a/src/Mod/Tux/Resources/translations/Tux_ja.ts b/src/Mod/Tux/Resources/translations/Tux_ja.ts index 013ae95058..9373ba29a5 100644 --- a/src/Mod/Tux/Resources/translations/Tux_ja.ts +++ b/src/Mod/Tux/Resources/translations/Tux_ja.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select 選択 - + Zoom ズーム - + Rotate 回転 - + Pan パン - + Tilt チルト - + Navigation style ナビゲーションスタイル - + Page Up or Page Down key. PageUpキーまたはPageDownキー - + Rotation focus 回転中心 - + Middle mouse button or H key. マウス中央ボタンまたはHキー - + Middle mouse button. マウス中央ボタン - + Navigation style not recognized. ナビゲーションスタイルが認識されません。 - + Settings 設定 - + Orbit style 軌道スタイル - + Compact コンパクト - + Tooltip ツールチップ - + Turntable ターンテーブル - + Free Turntable フリーターンテーブル - + Trackball トラックボール - + Undefined 未定義 diff --git a/src/Mod/Tux/Resources/translations/Tux_ka.ts b/src/Mod/Tux/Resources/translations/Tux_ka.ts index 94370f7bcc..638313d017 100644 --- a/src/Mod/Tux/Resources/translations/Tux_ka.ts +++ b/src/Mod/Tux/Resources/translations/Tux_ka.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select არჩევა - + Zoom გადიდება - + Rotate შებრუნება - + Pan პანორამა - + Tilt ტრიალი - + Navigation style ნავიგაციის სტილი - + Page Up or Page Down key. ღილაკები PageUp ან PageDown. - + Rotation focus ტრიალის ცენტრი - + Middle mouse button or H key. თაგუნის შუა ღილაკი ან ღილაკი H. - + Middle mouse button. თაგუნის შუა ღილაკი. - + Navigation style not recognized. ნავიგაციის უცნობი სტილი. - + Settings მორგება - + Orbit style ტრიალის სტილი - + Compact კომპაქტურად - + Tooltip მინიშნება - + Turntable გრუნტი - + Free Turntable თავისუფალი გრუნტი - + Trackball ტრეკბოლი - + Undefined განუსაზღვრელი diff --git a/src/Mod/Tux/Resources/translations/Tux_ko.ts b/src/Mod/Tux/Resources/translations/Tux_ko.ts index 2210e0fa69..bd6d54950a 100644 --- a/src/Mod/Tux/Resources/translations/Tux_ko.ts +++ b/src/Mod/Tux/Resources/translations/Tux_ko.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select 선택 - + Zoom 확대/축소 - + Rotate 회전하기 - + Pan 좌우회전 - + Tilt 상하회전 - + Navigation style 탐색 스타일 - + Page Up or Page Down key. Page Up / Down 키 - + Rotation focus 회전 시점 - + Middle mouse button or H key. 마우스 가운데 버튼 또는 H 키. - + Middle mouse button. 마우스 가운데 버튼 - + Navigation style not recognized. 탐색 스타일이 인식되지 않습니다. - + Settings Settings - + Orbit style 궤도 스타일 - + Compact 소형 - + Tooltip 툴팁 - + Turntable 턴테이블 - + Free Turntable Free Turntable - + Trackball 트랙볼 - + Undefined 정의되지 않음 diff --git a/src/Mod/Tux/Resources/translations/Tux_nl.ts b/src/Mod/Tux/Resources/translations/Tux_nl.ts index a034e39572..9bf6a3761c 100644 --- a/src/Mod/Tux/Resources/translations/Tux_nl.ts +++ b/src/Mod/Tux/Resources/translations/Tux_nl.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Selecteer - + Zoom Inzoomen - + Rotate Draaien - + Pan Pan - + Tilt Kantelen - + Navigation style Navigatie stijl - + Page Up or Page Down key. Page Up of Page Down toets. - + Rotation focus Rotatie focus - + Middle mouse button or H key. Middelste muisknop of toets H. - + Middle mouse button. Middelste muisknop. - + Navigation style not recognized. Navigatie stijl is niet herkend. - + Settings Instellingen - + Orbit style Rotatiebaan stijl - + Compact Compact - + Tooltip Tooltip - + Turntable Draaitafel - + Free Turntable Vrije draaitafel - + Trackball Trackball - + Undefined niet gedefinieerd diff --git a/src/Mod/Tux/Resources/translations/Tux_pl.ts b/src/Mod/Tux/Resources/translations/Tux_pl.ts index d5426efbe3..47300fce7c 100644 --- a/src/Mod/Tux/Resources/translations/Tux_pl.ts +++ b/src/Mod/Tux/Resources/translations/Tux_pl.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Wybierz - + Zoom Powiększ - + Rotate Obróć - + Pan Panorama - + Tilt Nachylenie - + Navigation style Styl nawigacji - + Page Up or Page Down key. Klawisz strona w górę lub strona w dół. - + Rotation focus Tryb obrotu - + Middle mouse button or H key. Środkowy przycisk myszki lub klawisz H. - + Middle mouse button. Środkowy przycisk myszki. - + Navigation style not recognized. Styl nawigacji nie jest rozpoznany. - + Settings Ustawienia - + Orbit style Technika orbitalna - + Compact Kompaktowy - + Tooltip Podpowiedź - + Turntable Turntable - + Free Turntable Free Turntable - + Trackball Trackball - + Undefined Niezdefiniowany diff --git a/src/Mod/Tux/Resources/translations/Tux_pt-BR.ts b/src/Mod/Tux/Resources/translations/Tux_pt-BR.ts index 287da19a31..d016781236 100644 --- a/src/Mod/Tux/Resources/translations/Tux_pt-BR.ts +++ b/src/Mod/Tux/Resources/translations/Tux_pt-BR.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Selecionar - + Zoom Ampliar - + Rotate Rotacionar - + Pan Arrastar vista (pan) - + Tilt Inclinação - + Navigation style Estilo de navegação - + Page Up or Page Down key. Tecla Page Up ou Page Down. - + Rotation focus Foco de rotação - + Middle mouse button or H key. Botão do meio do mouse ou tecla H. - + Middle mouse button. Botão do meio do mouse. - + Navigation style not recognized. Estilo de navegação não reconhecido. - + Settings Configurações - + Orbit style Estilo de orbita - + Compact Compacto - + Tooltip Sugestão - + Turntable Plataforma - + Free Turntable Girarmesa Livre - + Trackball Trackball - + Undefined Indefinido diff --git a/src/Mod/Tux/Resources/translations/Tux_pt-PT.ts b/src/Mod/Tux/Resources/translations/Tux_pt-PT.ts index 3a92c8c32e..e1c4282e4b 100644 --- a/src/Mod/Tux/Resources/translations/Tux_pt-PT.ts +++ b/src/Mod/Tux/Resources/translations/Tux_pt-PT.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Selecionar - + Zoom Zoom - + Rotate Rodar - + Pan Arrastar vista (pan) - + Tilt Inclinação - + Navigation style Estilo de navegação - + Page Up or Page Down key. Tecla Page Up ou Page Down. - + Rotation focus Foco de rotação - + Middle mouse button or H key. Botão do meio do rato ou a tecla H. - + Middle mouse button. Botão do meio do rato. - + Navigation style not recognized. Estilo de navegação não reconhecido. - + Settings Ajustes - + Orbit style Estilo da Órbita - + Compact Compacto - + Tooltip Sugestão - + Turntable Plataforma giratória - + Free Turntable Free Turntable - + Trackball Trackball - + Undefined Indefinido diff --git a/src/Mod/Tux/Resources/translations/Tux_ro.ts b/src/Mod/Tux/Resources/translations/Tux_ro.ts index 2ff0b327cb..e78366ad60 100644 --- a/src/Mod/Tux/Resources/translations/Tux_ro.ts +++ b/src/Mod/Tux/Resources/translations/Tux_ro.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Selectaţi - + Zoom Zoom - + Rotate Rotire - + Pan Panoramic - + Tilt Înclinare - + Navigation style Stil de navigare - + Page Up or Page Down key. Apasați tasta Page Up sau tasta Page Down. - + Rotation focus Rotația focarului - + Middle mouse button or H key. Rozeta mausului sau tasta H. - + Middle mouse button. Rozeta mausului. - + Navigation style not recognized. Stil de navigare invalid. - + Settings Setari - + Orbit style Stil de rotație - + Compact Compactează - + Tooltip Sugestii - + Turntable Placa turnantă - + Free Turntable Gratuit de Turntable - + Trackball Trackball - + Undefined Nedefinit diff --git a/src/Mod/Tux/Resources/translations/Tux_ru.ts b/src/Mod/Tux/Resources/translations/Tux_ru.ts index 98a2ed7864..1c717a1d6e 100644 --- a/src/Mod/Tux/Resources/translations/Tux_ru.ts +++ b/src/Mod/Tux/Resources/translations/Tux_ru.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Выбрать - + Zoom Масштаб - + Rotate Повернуть - + Pan Сдвиг - + Tilt Наклон (вращение) - + Navigation style Стиль навигации - + Page Up or Page Down key. Клавиши Page Up или Page Down. - + Rotation focus Центр вращения - + Middle mouse button or H key. Средняя кнопка мыши или клавиша H. - + Middle mouse button. Средняя кнопка мыши. - + Navigation style not recognized. Стиль навигации не распознан. - + Settings Настройки - + Orbit style Орбитальный стиль - + Compact Компактно - + Tooltip Подсказка - + Turntable Поворотный стол - + Free Turntable Свободный Поворотный стол - + Trackball Трекбол - + Undefined Не определено diff --git a/src/Mod/Tux/Resources/translations/Tux_sl.ts b/src/Mod/Tux/Resources/translations/Tux_sl.ts index 533de55250..9c4df95b96 100644 --- a/src/Mod/Tux/Resources/translations/Tux_sl.ts +++ b/src/Mod/Tux/Resources/translations/Tux_sl.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Izberi - + Zoom Približaj/Oddalji - + Rotate Zavrti - + Pan Premik - + Tilt Nagib - + Navigation style Slog krmarjenja - + Page Up or Page Down key. Tipka Page Up ali Page Down. - + Rotation focus Osredotoči vrtilno središče - + Middle mouse button or H key. Srednja miškina tipka ali tipka H. - + Middle mouse button. Srednja miškina tipka. - + Navigation style not recognized. Stil navigacije ni prepoznan. - + Settings Nastavitve - + Orbit style Slog vrtenja - + Compact Kompakten - + Tooltip Namig orodja - + Turntable Sukajoči pogled - + Free Turntable Prostosukajoča plošča - + Trackball Sledilna kroglica - + Undefined Nedoločeno diff --git a/src/Mod/Tux/Resources/translations/Tux_sr-CS.ts b/src/Mod/Tux/Resources/translations/Tux_sr-CS.ts index b0ad46c58d..d25017d35c 100644 --- a/src/Mod/Tux/Resources/translations/Tux_sr-CS.ts +++ b/src/Mod/Tux/Resources/translations/Tux_sr-CS.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Izaberi - + Zoom Zumiraj - + Rotate Rotiraj - + Pan Pomeri - + Tilt Nagni - + Navigation style Stil navigacije - + Page Up or Page Down key. Tipke Page Up ili Page Down. - + Rotation focus Centar rotacije - + Middle mouse button or H key. Srednji taster miša ili tipka „H“. - + Middle mouse button. Srednji taster miša. - + Navigation style not recognized. Stil navigacije nije prepoznat. - + Settings Podešavanja - + Orbit style Način okretanja orbit - + Compact Zbijeno - + Tooltip Kratak opis alatke - + Turntable Gramofon - + Free Turntable Obični gramofon - + Trackball Trackball - + Undefined Nedefinisano diff --git a/src/Mod/Tux/Resources/translations/Tux_sr.ts b/src/Mod/Tux/Resources/translations/Tux_sr.ts index a29128cacc..72cc39e7db 100644 --- a/src/Mod/Tux/Resources/translations/Tux_sr.ts +++ b/src/Mod/Tux/Resources/translations/Tux_sr.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Изабери - + Zoom Зумирај - + Rotate Ротирај - + Pan Помери - + Tilt Нагни - + Navigation style Стил навигације - + Page Up or Page Down key. Типке Page Up или Page Down. - + Rotation focus Центар ротације - + Middle mouse button or H key. Средњи тастер миша или типка „H“. - + Middle mouse button. Средњи тастер миша. - + Navigation style not recognized. Стил навигације није препознат. - + Settings Подешавања - + Orbit style Начин окретања орбит - + Compact Збијено - + Tooltip Кратак опис алатке - + Turntable Грамофон - + Free Turntable Обични грамофон - + Trackball Trackball - + Undefined Недефинисано diff --git a/src/Mod/Tux/Resources/translations/Tux_sv-SE.ts b/src/Mod/Tux/Resources/translations/Tux_sv-SE.ts index 7321e90aa5..7b15acebde 100644 --- a/src/Mod/Tux/Resources/translations/Tux_sv-SE.ts +++ b/src/Mod/Tux/Resources/translations/Tux_sv-SE.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Markera - + Zoom Zooma - + Rotate Rotera - + Pan Panorera - + Tilt Luta - + Navigation style Navigationsstil - + Page Up or Page Down key. Page Up eller Page Down-tangenten. - + Rotation focus Rotationsfokus - + Middle mouse button or H key. Mittersta musknappen eller H-tangenten. - + Middle mouse button. Mus-knappen i mitten. - + Navigation style not recognized. Navigationsstilen känns inte igen. - + Settings Inställningar - + Orbit style Orbit stil - + Compact Kompakt - + Tooltip Verktygstips - + Turntable Skivtallrik - + Free Turntable Free Turntable - + Trackball Trackball - + Undefined Odefinierad diff --git a/src/Mod/Tux/Resources/translations/Tux_tr.ts b/src/Mod/Tux/Resources/translations/Tux_tr.ts index 1f39b26d07..d82a29b523 100644 --- a/src/Mod/Tux/Resources/translations/Tux_tr.ts +++ b/src/Mod/Tux/Resources/translations/Tux_tr.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Seç - + Zoom Yakınlaştır - + Rotate Döndür - + Pan Yassılaştır - + Tilt Eğimi ayarla - + Navigation style Gezinme stili - + Page Up or Page Down key. Sayfa Yukarı veya Sayfa Aşağı Tuşu. - + Rotation focus Döndürme odaklaması - + Middle mouse button or H key. Farenin orta butonu ya da H tuşu. - + Middle mouse button. Farenin orta tuşu. - + Navigation style not recognized. Gezinme stili tanınmıyor. - + Settings Ayarlar - + Orbit style Yörünge stili - + Compact Kompakt - + Tooltip Ipucu - + Turntable Döner tabla - + Free Turntable Free Turntable - + Trackball Trackball - + Undefined Tanımlanmamış diff --git a/src/Mod/Tux/Resources/translations/Tux_uk.ts b/src/Mod/Tux/Resources/translations/Tux_uk.ts index 5693a968b0..97ce837e9d 100644 --- a/src/Mod/Tux/Resources/translations/Tux_uk.ts +++ b/src/Mod/Tux/Resources/translations/Tux_uk.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Вибрати - + Zoom Масштаб - + Rotate Обертання - + Pan Посунути - + Tilt Нахил - + Navigation style Стиль навігації - + Page Up or Page Down key. Клавіша Page Up або Page Down. - + Rotation focus Фокус обертання - + Middle mouse button or H key. Середня кнопка миші або клавіша H. - + Middle mouse button. Середня кнопка миші. - + Navigation style not recognized. Стиль навігації не визначений. - + Settings Параметри - + Orbit style Стиль орбіти - + Compact Зменшити - + Tooltip Підказка - + Turntable Поворотна - + Free Turntable Free Turntable - + Trackball Трекбол - + Undefined Невизначено diff --git a/src/Mod/Tux/Resources/translations/Tux_val-ES.ts b/src/Mod/Tux/Resources/translations/Tux_val-ES.ts index 80f7d08acd..061a3389c6 100644 --- a/src/Mod/Tux/Resources/translations/Tux_val-ES.ts +++ b/src/Mod/Tux/Resources/translations/Tux_val-ES.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select Selecciona - + Zoom Zoom - + Rotate Gira - + Pan Panoràmica - + Tilt Inclinació - + Navigation style Estil de navegació - + Page Up or Page Down key. Tecla de Re Pàg o Av Pàg. - + Rotation focus Focus de rotació - + Middle mouse button or H key. Botó central del ratolí o la tecla H. - + Middle mouse button. Botó central del ratolí. - + Navigation style not recognized. No es reconeix l'estil de navegació. - + Settings Paràmetres - + Orbit style Estil d'òrbita - + Compact Compacte - + Tooltip Indicador de funció - + Turntable En rotació - + Free Turntable Free Turntable - + Trackball Ratolí de bola - + Undefined Sense definir diff --git a/src/Mod/Tux/Resources/translations/Tux_zh-CN.ts b/src/Mod/Tux/Resources/translations/Tux_zh-CN.ts index a3f6d888b1..38b59ab4f7 100644 --- a/src/Mod/Tux/Resources/translations/Tux_zh-CN.ts +++ b/src/Mod/Tux/Resources/translations/Tux_zh-CN.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select 选择 - + Zoom 缩放 - + Rotate 旋转 - + Pan 平移 - + Tilt 倾斜 - + Navigation style 导航样式 - + Page Up or Page Down key. 向上翻页 或 向下翻页 键。 - + Rotation focus 回转中心 - + Middle mouse button or H key. 鼠标中键或 H 键。 - + Middle mouse button. 鼠标中键。 - + Navigation style not recognized. 无法识别导航样式。 - + Settings 设置 - + Orbit style 环绕模式 - + Compact 压缩 - + Tooltip 工具提示 - + Turntable 转盘 - + Free Turntable 自由转盘 - + Trackball 轨迹球 - + Undefined 未定义 diff --git a/src/Mod/Tux/Resources/translations/Tux_zh-TW.ts b/src/Mod/Tux/Resources/translations/Tux_zh-TW.ts index 9150d10b7c..472c032d10 100644 --- a/src/Mod/Tux/Resources/translations/Tux_zh-TW.ts +++ b/src/Mod/Tux/Resources/translations/Tux_zh-TW.ts @@ -4,97 +4,97 @@ NavigationIndicator - + Select 選擇 - + Zoom 縮放 - + Rotate 旋轉 - + Pan 平移 - + Tilt 傾斜 - + Navigation style 導覽列樣式 - + Page Up or Page Down key. Page Up 或 Page Down 按鍵。 - + Rotation focus 旋轉中心 - + Middle mouse button or H key. 滑鼠中鍵或 H 鍵 - + Middle mouse button. 滑鼠中鍵。 - + Navigation style not recognized. 無法辨識導覽列樣式 - + Settings 設定 - + Orbit style 環繞模式 - + Compact 緊湊 - + Tooltip 工具提示 - + Turntable 可旋轉 - + Free Turntable Free Turntable - + Trackball 軌跡球 - + Undefined 未定義 diff --git a/src/Mod/Web/Gui/Resources/translations/Web_fr.ts b/src/Mod/Web/Gui/Resources/translations/Web_fr.ts index b35816e2f9..945fe808f0 100644 --- a/src/Mod/Web/Gui/Resources/translations/Web_fr.ts +++ b/src/Mod/Web/Gui/Resources/translations/Web_fr.ts @@ -151,7 +151,7 @@ There were errors while loading the file. Some data might have been modified or not recovered at all. Look in the report view for more specific information about the objects involved. - Des erreurs sont survenues lors du chargement du fichier. Certaines données pourraient avoir été modifiées, ou pas récupérées du tout. Consultez la vue rapport pour plus d’informations sur les objets concernés. + Des erreurs sont survenues lors du chargement du fichier. Certaines données pourraient avoir été modifiées ou pas du tout récupérées. Consultez la Vue rapport pour plus d’informations sur les objets concernés. diff --git a/tests/src/App/CMakeLists.txt b/tests/src/App/CMakeLists.txt index 2e3019782a..14f763c1a8 100644 --- a/tests/src/App/CMakeLists.txt +++ b/tests/src/App/CMakeLists.txt @@ -4,6 +4,7 @@ target_sources( ${CMAKE_CURRENT_SOURCE_DIR}/Application.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Branding.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ComplexGeoData.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/Document.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Expression.cpp ${CMAKE_CURRENT_SOURCE_DIR}/ElementMap.cpp ${CMAKE_CURRENT_SOURCE_DIR}/IndexedName.cpp diff --git a/tests/src/App/Document.cpp b/tests/src/App/Document.cpp new file mode 100644 index 0000000000..027c60c583 --- /dev/null +++ b/tests/src/App/Document.cpp @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: LGPL-2.1-or-later + +#include "gtest/gtest.h" +#include + +#include "App/Application.h" +#include "App/Document.h" +#include "App/StringHasher.h" +#include "Base/Writer.h" + +using ::testing::Eq; +using ::testing::Ne; + +// NOLINTBEGIN(readability-magic-numbers) + +class FakeWriter: public Base::Writer +{ + void writeFiles() override + {} + std::ostream& Stream() override + { + return std::cout; + } +}; + +class DocumentTest: public ::testing::Test +{ +protected: + static void SetUpTestSuite() + { + if (App::Application::GetARGC() == 0) { + constexpr int argc = 1; + std::array argv {"FreeCAD"}; + App::Application::Config()["ExeName"] = "FreeCAD"; + App::Application::init(argc, const_cast(argv.data())); // NOLINT + } + } + + void SetUp() override + { + _docName = App::GetApplication().getUniqueDocumentName("test"); + _doc = App::GetApplication().newDocument(_docName.c_str(), "testUser"); + } + + void TearDown() override + { + App::GetApplication().closeDocument(_docName.c_str()); + } + + App::Document* doc() + { + return _doc; + } + +private: + std::string _docName; + App::Document* _doc {}; +}; + + +TEST_F(DocumentTest, addStringHasherIndicatesUnwrittenWhenNew) +{ + // Arrange + App::StringHasherRef hasher(new App::StringHasher); + + // Act + auto addResult = doc()->addStringHasher(hasher); + + // Assert + EXPECT_TRUE(addResult.first); + EXPECT_THAT(addResult.second, Ne(-1)); +} + +TEST_F(DocumentTest, addStringHasherIndicatesAlreadyWritten) +{ + // Arrange + App::StringHasherRef hasher(new App::StringHasher); + doc()->addStringHasher(hasher); + + // Act + auto addResult = doc()->addStringHasher(hasher); + + // Assert + EXPECT_FALSE(addResult.first); +} + +TEST_F(DocumentTest, getStringHasherGivesExpectedHasher) +{ + // Arrange + App::StringHasherRef hasher(new App::StringHasher); + auto pair = doc()->addStringHasher(hasher); + int index = pair.second; + + // Act + auto foundHasher = doc()->getStringHasher(index); + + // Assert + EXPECT_EQ(hasher, foundHasher); +} + +// NOLINTEND(readability-magic-numbers) diff --git a/tests/src/App/MappedName.cpp b/tests/src/App/MappedName.cpp index bffb347776..2d01858562 100644 --- a/tests/src/App/MappedName.cpp +++ b/tests/src/App/MappedName.cpp @@ -213,20 +213,20 @@ TEST(MappedName, moveConstructor) TEST(MappedName, fromRawData) { // Act - Data::MappedName mappedName = Data::MappedName::fromRawData("TESTTEST", 10); + Data::MappedName mappedName = Data::MappedName::fromRawData("TESTTEST", 8); // Assert EXPECT_EQ(mappedName.isRaw(), true); EXPECT_EQ(mappedName.empty(), false); - EXPECT_EQ(mappedName.size(), 10); - EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 10)); + EXPECT_EQ(mappedName.size(), 8); + EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 8)); EXPECT_EQ(mappedName.postfixBytes(), QByteArray()); } TEST(MappedName, fromRawDataQByteArray) { // Arrange - QByteArray testByteArray("TESTTEST", 10); + QByteArray testByteArray("TESTTEST", 8); // Act Data::MappedName mappedName = Data::MappedName::fromRawData(testByteArray); @@ -234,15 +234,15 @@ TEST(MappedName, fromRawDataQByteArray) // Assert EXPECT_EQ(mappedName.isRaw(), true); EXPECT_EQ(mappedName.empty(), false); - EXPECT_EQ(mappedName.size(), 10); - EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 10)); + EXPECT_EQ(mappedName.size(), 8); + EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 8)); EXPECT_EQ(mappedName.postfixBytes(), QByteArray()); } TEST(MappedName, fromRawDataCopy) { // Arrange - QByteArray testByteArray("TESTTEST", 10); + QByteArray testByteArray("TESTTEST", 8); Data::MappedName temp = Data::MappedName::fromRawData(testByteArray); temp.append("TESTPOSTFIX"); temp.compact(); // Always call compact before accessing data! @@ -253,8 +253,8 @@ TEST(MappedName, fromRawDataCopy) // Assert EXPECT_EQ(mappedName.isRaw(), true); EXPECT_EQ(mappedName.empty(), false); - EXPECT_EQ(mappedName.size(), 21); - EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 10)); + EXPECT_EQ(mappedName.size(), 19); + EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 8)); EXPECT_EQ(mappedName.postfixBytes(), QByteArray("TESTPOSTFIX")); } @@ -682,7 +682,7 @@ TEST(MappedName, copy) TEST(MappedName, compact) { // Arrange - Data::MappedName mappedName = Data::MappedName::fromRawData("TESTTEST", 10); + Data::MappedName mappedName = Data::MappedName::fromRawData("TESTTEST", 8); // Act mappedName.compact(); @@ -690,8 +690,8 @@ TEST(MappedName, compact) // Assert EXPECT_EQ(mappedName.isRaw(), false); EXPECT_EQ(mappedName.empty(), false); - EXPECT_EQ(mappedName.size(), 10); - EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 10)); + EXPECT_EQ(mappedName.size(), 8); + EXPECT_EQ(mappedName.dataBytes(), QByteArray("TESTTEST", 8)); EXPECT_EQ(mappedName.postfixBytes(), QByteArray()); } diff --git a/tests/src/Mod/Sketcher/App/SketchObject.cpp b/tests/src/Mod/Sketcher/App/SketchObject.cpp index bcb4dbc164..46e6c0cd7a 100644 --- a/tests/src/Mod/Sketcher/App/SketchObject.cpp +++ b/tests/src/Mod/Sketcher/App/SketchObject.cpp @@ -6,6 +6,8 @@ #include #include +#include +#include #include #include @@ -162,3 +164,96 @@ TEST_F(SketchObjectTest, testGeoIdFromShapeTypeRootPoint) EXPECT_EQ(geoId, Sketcher::GeoEnum::RtPnt); EXPECT_EQ(posId, Sketcher::PointPos::start); } + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionNoUnits1) +{ + std::string expr = Sketcher::SketchObject::reverseAngleConstraintExpression("180 - 60"); + EXPECT_EQ(expr, std::string("60")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionNoUnits2) +{ + std::string expr = Sketcher::SketchObject::reverseAngleConstraintExpression("60"); + EXPECT_EQ(expr, std::string("180 - (60)")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionWithUnits1) +{ + std::string expr = Sketcher::SketchObject::reverseAngleConstraintExpression("180 ° - 60 °"); + EXPECT_EQ(expr, std::string("60 °")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionWithUnits2) +{ + std::string expr = Sketcher::SketchObject::reverseAngleConstraintExpression("60 °"); + EXPECT_EQ(expr, std::string("180 ° - (60 °)")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionWithUnits3) +{ + std::string expr = Sketcher::SketchObject::reverseAngleConstraintExpression("60 deg"); + EXPECT_EQ(expr, std::string("180 ° - (60 deg)")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionWithUnits4) +{ + std::string expr = Sketcher::SketchObject::reverseAngleConstraintExpression("1rad"); + EXPECT_EQ(expr, std::string("180 ° - (1rad)")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionApplyAndReverse1) +{ + std::string expr = "180"; + expr = Sketcher::SketchObject::reverseAngleConstraintExpression(expr); + expr = Sketcher::SketchObject::reverseAngleConstraintExpression(expr); + EXPECT_EQ(expr, std::string("(180)")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionApplyAndReverse2) +{ + std::string expr = "(30 + 15) * 2 / 3"; + expr = Sketcher::SketchObject::reverseAngleConstraintExpression(expr); + expr = Sketcher::SketchObject::reverseAngleConstraintExpression(expr); + EXPECT_EQ(expr, std::string("((30 + 15) * 2 / 3)")); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionSimple) +{ + // Arrange + auto constraint = new Sketcher::Constraint(); // Ownership will be transferred to the sketch + constraint->Type = Sketcher::ConstraintType::Angle; + auto id = getObject()->addConstraint(constraint); + + App::ObjectIdentifier path(App::ObjectIdentifier::parse(getObject(), "Constraints[0]")); + std::shared_ptr shared_expr(App::Expression::parse(getObject(), "0")); + getObject()->setExpression(path, shared_expr); + + getObject()->setConstraintExpression(id, "180 - (60)"); + + // Act + getObject()->reverseAngleConstraintToSupplementary(constraint, id); + + // Assert + EXPECT_EQ(std::string("60"), getObject()->getConstraintExpression(id)); +} + +TEST_F(SketchObjectTest, testReverseAngleConstraintToSupplementaryExpressionApplyAndReverse) +{ + // Arrange + auto constraint = new Sketcher::Constraint(); // Ownership will be transferred to the sketch + constraint->Type = Sketcher::ConstraintType::Angle; + auto id = getObject()->addConstraint(constraint); + + App::ObjectIdentifier path(App::ObjectIdentifier::parse(getObject(), "Constraints[0]")); + std::shared_ptr shared_expr(App::Expression::parse(getObject(), "0")); + getObject()->setExpression(path, shared_expr); + + getObject()->setConstraintExpression(id, "32 °"); + + // Act + getObject()->reverseAngleConstraintToSupplementary(constraint, id); + getObject()->reverseAngleConstraintToSupplementary(constraint, id); + + // Assert + EXPECT_EQ(std::string("32 °"), getObject()->getConstraintExpression(id)); +}